@learncard/react 2.8.60 → 2.8.62
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/dist/base.css +1 -1
- package/dist/base.js +1 -1
- package/dist/cjs/{BoostGenericCard-dd01e934.js → BoostGenericCard-55f710ad.js} +41 -5
- package/dist/cjs/BoostGenericCard-55f710ad.js.map +1 -0
- package/dist/cjs/{CertificateDisplayCard-e228ff3d.js → CertificateDisplayCard-9f619468.js} +43 -7
- package/dist/cjs/CertificateDisplayCard-9f619468.js.map +1 -0
- package/dist/cjs/{MeritBadgeDisplayCard-5cbc63e8.js → MeritBadgeDisplayCard-81bd14b8.js} +7 -5
- package/dist/cjs/MeritBadgeDisplayCard-81bd14b8.js.map +1 -0
- package/dist/cjs/{MeritBadgeSkillsCount-54879719.js → MeritBadgeSkillsCount-85cf4a91.js} +3 -3
- package/dist/cjs/{MeritBadgeSkillsCount-54879719.js.map → MeritBadgeSkillsCount-85cf4a91.js.map} +1 -1
- package/dist/cjs/{Notification-d212fa7b.js → Notification-3fe4a359.js} +2 -2
- package/dist/cjs/{Notification-d212fa7b.js.map → Notification-3fe4a359.js.map} +1 -1
- package/dist/cjs/{NotificationBoostCard-cf2140c0.js → NotificationBoostCard-be514ddb.js} +2 -2
- package/dist/cjs/{NotificationBoostCard-cf2140c0.js.map → NotificationBoostCard-be514ddb.js.map} +1 -1
- package/dist/cjs/PuzzlePiece-088d2b00.js +77 -0
- package/dist/cjs/PuzzlePiece-088d2b00.js.map +1 -0
- package/dist/cjs/{SchoolIDCard-39a099d2.js → SchoolIDCard-42d7c96f.js} +628 -347
- package/dist/cjs/SchoolIDCard-42d7c96f.js.map +1 -0
- package/dist/cjs/{VCCard-32aeadb3.js → VCCard-f5bc1db8.js} +3 -3
- package/dist/cjs/{VCCard-32aeadb3.js.map → VCCard-f5bc1db8.js.map} +1 -1
- package/dist/cjs/{VCDisplayBackFace-4543749f.js → VCDisplayBackFace-6000a58b.js} +3 -3
- package/dist/cjs/{VCDisplayBackFace-4543749f.js.map → VCDisplayBackFace-6000a58b.js.map} +1 -1
- package/dist/cjs/{VCDisplayCard-353cc9ed.js → VCDisplayCard-9512d8f2.js} +3 -3
- package/dist/cjs/{VCDisplayCard-353cc9ed.js.map → VCDisplayCard-9512d8f2.js.map} +1 -1
- package/dist/cjs/{VCDisplayCard2-50acd7c8.js → VCDisplayCard2-2a1d5f57.js} +11 -9
- package/dist/cjs/VCDisplayCard2-2a1d5f57.js.map +1 -0
- package/dist/cjs/{VCVerificationPill-88723dfa.js → VCVerificationPill-d6303ad0.js} +2 -2
- package/dist/cjs/{VCVerificationPill-88723dfa.js.map → VCVerificationPill-d6303ad0.js.map} +1 -1
- package/dist/cjs/{VerifierStateBadgeAndText-08aea854.js → VerifierStateBadgeAndText-67eddbaf.js} +2 -2
- package/dist/cjs/{VerifierStateBadgeAndText-08aea854.js.map → VerifierStateBadgeAndText-67eddbaf.js.map} +1 -1
- package/dist/cjs/{credential.helpers-90b66932.js → credential.helpers-60b421b9.js} +4 -4
- package/dist/cjs/{credential.helpers-90b66932.js.map → credential.helpers-60b421b9.js.map} +1 -1
- package/dist/cjs/{index-a9e3ddf5.js → index-0cac2c5b.js} +1 -1
- package/dist/cjs/{index-a9e3ddf5.js.map → index-0cac2c5b.js.map} +1 -1
- package/dist/cjs/index.js +78 -21
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/index13.js +19 -20
- package/dist/cjs/index13.js.map +1 -1
- package/dist/cjs/index21.js +7 -7
- package/dist/cjs/index23.js +3 -3
- package/dist/cjs/index24.js +3 -3
- package/dist/cjs/index3.js +6 -7
- package/dist/cjs/index3.js.map +1 -1
- package/dist/cjs/index30.js +1 -1
- package/dist/cjs/index38.js +12 -13
- package/dist/cjs/index38.js.map +1 -1
- package/dist/cjs/index39.js +6 -6
- package/dist/cjs/index40.js +7 -7
- package/dist/cjs/index41.js +8 -9
- package/dist/cjs/index41.js.map +1 -1
- package/dist/cjs/index42.js +2 -2
- package/dist/cjs/index45.js +2 -2
- package/dist/cjs/index6.js +7 -8
- package/dist/cjs/index6.js.map +1 -1
- package/dist/cjs/{types-8eab1382.js → types-f01c65d1.js} +2 -2
- package/dist/cjs/{types-8eab1382.js.map → types-f01c65d1.js.map} +1 -1
- package/dist/cjs/{types.esm-6ce4cc67.js → types.esm-ae4cdf49.js} +1086 -1032
- package/dist/cjs/types.esm-ae4cdf49.js.map +1 -0
- package/dist/esm/{BoostGenericCard-5b70fa63.js → BoostGenericCard-4cfa6556.js} +41 -5
- package/dist/esm/BoostGenericCard-4cfa6556.js.map +1 -0
- package/dist/esm/{CertificateDisplayCard-d2a0d0e3.js → CertificateDisplayCard-58c52cdb.js} +42 -7
- package/dist/esm/CertificateDisplayCard-58c52cdb.js.map +1 -0
- package/dist/esm/{MeritBadgeDisplayCard-bc462990.js → MeritBadgeDisplayCard-c87b0271.js} +7 -5
- package/dist/esm/MeritBadgeDisplayCard-c87b0271.js.map +1 -0
- package/dist/esm/{MeritBadgeSkillsCount-d2408dfe.js → MeritBadgeSkillsCount-77ceb64c.js} +3 -3
- package/dist/esm/{MeritBadgeSkillsCount-d2408dfe.js.map → MeritBadgeSkillsCount-77ceb64c.js.map} +1 -1
- package/dist/esm/{Notification-95d159d2.js → Notification-76adb92c.js} +2 -2
- package/dist/esm/{Notification-95d159d2.js.map → Notification-76adb92c.js.map} +1 -1
- package/dist/esm/{NotificationBoostCard-42596c2c.js → NotificationBoostCard-e6f1ab86.js} +2 -2
- package/dist/esm/{NotificationBoostCard-42596c2c.js.map → NotificationBoostCard-e6f1ab86.js.map} +1 -1
- package/dist/esm/PuzzlePiece-4541648e.js +71 -0
- package/dist/esm/PuzzlePiece-4541648e.js.map +1 -0
- package/dist/esm/{SchoolIDCard-752092fb.js → SchoolIDCard-7c3ba74c.js} +628 -347
- package/dist/esm/SchoolIDCard-7c3ba74c.js.map +1 -0
- package/dist/esm/{VCCard-afbea3f5.js → VCCard-a5dda1f4.js} +3 -3
- package/dist/esm/{VCCard-afbea3f5.js.map → VCCard-a5dda1f4.js.map} +1 -1
- package/dist/esm/{VCDisplayBackFace-f08563e9.js → VCDisplayBackFace-af01c8b3.js} +3 -3
- package/dist/esm/{VCDisplayBackFace-f08563e9.js.map → VCDisplayBackFace-af01c8b3.js.map} +1 -1
- package/dist/esm/{VCDisplayCard-7fc1dd02.js → VCDisplayCard-36f34504.js} +3 -3
- package/dist/esm/{VCDisplayCard-7fc1dd02.js.map → VCDisplayCard-36f34504.js.map} +1 -1
- package/dist/esm/{VCDisplayCard2-415128f5.js → VCDisplayCard2-04e304db.js} +11 -9
- package/dist/esm/VCDisplayCard2-04e304db.js.map +1 -0
- package/dist/esm/{VCVerificationPill-2ef031c2.js → VCVerificationPill-0e2c1172.js} +2 -2
- package/dist/esm/{VCVerificationPill-2ef031c2.js.map → VCVerificationPill-0e2c1172.js.map} +1 -1
- package/dist/esm/{VerifierStateBadgeAndText-151db666.js → VerifierStateBadgeAndText-2e5414f4.js} +2 -2
- package/dist/esm/{VerifierStateBadgeAndText-151db666.js.map → VerifierStateBadgeAndText-2e5414f4.js.map} +1 -1
- package/dist/esm/{credential.helpers-5731a09d.js → credential.helpers-97c7e3d4.js} +4 -4
- package/dist/esm/{credential.helpers-5731a09d.js.map → credential.helpers-97c7e3d4.js.map} +1 -1
- package/dist/esm/{index-1fa04a2d.js → index-eae3ca64.js} +1 -1
- package/dist/esm/{index-1fa04a2d.js.map → index-eae3ca64.js.map} +1 -1
- package/dist/esm/index.js +75 -20
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/index13.js +18 -19
- package/dist/esm/index13.js.map +1 -1
- package/dist/esm/index21.js +7 -7
- package/dist/esm/index23.js +3 -3
- package/dist/esm/index24.js +3 -3
- package/dist/esm/index3.js +6 -7
- package/dist/esm/index3.js.map +1 -1
- package/dist/esm/index30.js +1 -1
- package/dist/esm/index38.js +12 -13
- package/dist/esm/index38.js.map +1 -1
- package/dist/esm/index39.js +6 -6
- package/dist/esm/index40.js +7 -7
- package/dist/esm/index41.js +8 -9
- package/dist/esm/index41.js.map +1 -1
- package/dist/esm/index42.js +2 -2
- package/dist/esm/index45.js +2 -2
- package/dist/esm/index6.js +6 -7
- package/dist/esm/index6.js.map +1 -1
- package/dist/esm/{types-cfde3c2b.js → types-05bc737d.js} +2 -2
- package/dist/esm/{types-cfde3c2b.js.map → types-05bc737d.js.map} +1 -1
- package/dist/esm/{types.esm-00eeb9f6.js → types.esm-c7016566.js} +1086 -1032
- package/dist/esm/types.esm-c7016566.js.map +1 -0
- package/dist/index.d.ts +16 -2
- package/dist/main.css +1 -1
- package/dist/main.js +1 -1
- package/package.json +10 -3
- package/dist/cjs/BoostGenericCard-dd01e934.js.map +0 -1
- package/dist/cjs/CertDisplayCardSkillsCount-8cc13d5b.js +0 -45
- package/dist/cjs/CertDisplayCardSkillsCount-8cc13d5b.js.map +0 -1
- package/dist/cjs/CertificateDisplayCard-e228ff3d.js.map +0 -1
- package/dist/cjs/MeritBadgeDisplayCard-5cbc63e8.js.map +0 -1
- package/dist/cjs/PuzzlePiece-937c216a.js +0 -31
- package/dist/cjs/PuzzlePiece-937c216a.js.map +0 -1
- package/dist/cjs/SchoolIDCard-39a099d2.js.map +0 -1
- package/dist/cjs/VCDisplayCard2-50acd7c8.js.map +0 -1
- package/dist/cjs/types.esm-6ce4cc67.js.map +0 -1
- package/dist/esm/BoostGenericCard-5b70fa63.js.map +0 -1
- package/dist/esm/CertDisplayCardSkillsCount-c5a21373.js +0 -39
- package/dist/esm/CertDisplayCardSkillsCount-c5a21373.js.map +0 -1
- package/dist/esm/CertificateDisplayCard-d2a0d0e3.js.map +0 -1
- package/dist/esm/MeritBadgeDisplayCard-bc462990.js.map +0 -1
- package/dist/esm/PuzzlePiece-1fb12c2e.js +0 -25
- package/dist/esm/PuzzlePiece-1fb12c2e.js.map +0 -1
- package/dist/esm/SchoolIDCard-752092fb.js.map +0 -1
- package/dist/esm/VCDisplayCard2-415128f5.js.map +0 -1
- package/dist/esm/types.esm-00eeb9f6.js.map +0 -1
|
@@ -16,10 +16,10 @@ Object.defineProperty(Barcode$2, "__esModule", {
|
|
|
16
16
|
value: true
|
|
17
17
|
});
|
|
18
18
|
|
|
19
|
-
function _classCallCheck$
|
|
19
|
+
function _classCallCheck$v(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
20
20
|
|
|
21
21
|
var Barcode$1 = function Barcode(data, options) {
|
|
22
|
-
_classCallCheck$
|
|
22
|
+
_classCallCheck$v(this, Barcode);
|
|
23
23
|
|
|
24
24
|
this.data = data;
|
|
25
25
|
this.text = options.text || data;
|
|
@@ -33,26 +33,26 @@ Object.defineProperty(CODE39$1, "__esModule", {
|
|
|
33
33
|
});
|
|
34
34
|
CODE39$1.CODE39 = undefined;
|
|
35
35
|
|
|
36
|
-
var _createClass$
|
|
36
|
+
var _createClass$o = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
|
37
37
|
|
|
38
|
-
var _Barcode2$
|
|
38
|
+
var _Barcode2$c = Barcode$2;
|
|
39
39
|
|
|
40
|
-
var _Barcode3$
|
|
40
|
+
var _Barcode3$c = _interopRequireDefault$B(_Barcode2$c);
|
|
41
41
|
|
|
42
|
-
function _interopRequireDefault$
|
|
42
|
+
function _interopRequireDefault$B(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
43
43
|
|
|
44
|
-
function _classCallCheck$
|
|
44
|
+
function _classCallCheck$u(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
45
45
|
|
|
46
|
-
function _possibleConstructorReturn$
|
|
46
|
+
function _possibleConstructorReturn$q(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
|
47
47
|
|
|
48
|
-
function _inherits$
|
|
48
|
+
function _inherits$q(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // Encoding documentation:
|
|
49
49
|
// https://en.wikipedia.org/wiki/Code_39#Encoding
|
|
50
50
|
|
|
51
51
|
var CODE39 = function (_Barcode) {
|
|
52
|
-
_inherits$
|
|
52
|
+
_inherits$q(CODE39, _Barcode);
|
|
53
53
|
|
|
54
54
|
function CODE39(data, options) {
|
|
55
|
-
_classCallCheck$
|
|
55
|
+
_classCallCheck$u(this, CODE39);
|
|
56
56
|
|
|
57
57
|
data = data.toUpperCase();
|
|
58
58
|
|
|
@@ -61,10 +61,10 @@ var CODE39 = function (_Barcode) {
|
|
|
61
61
|
data += getCharacter(mod43checksum(data));
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
return _possibleConstructorReturn$
|
|
64
|
+
return _possibleConstructorReturn$q(this, (CODE39.__proto__ || Object.getPrototypeOf(CODE39)).call(this, data, options));
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
-
_createClass$
|
|
67
|
+
_createClass$o(CODE39, [{
|
|
68
68
|
key: "encode",
|
|
69
69
|
value: function encode() {
|
|
70
70
|
// First character is always a *
|
|
@@ -91,7 +91,7 @@ var CODE39 = function (_Barcode) {
|
|
|
91
91
|
}]);
|
|
92
92
|
|
|
93
93
|
return CODE39;
|
|
94
|
-
}(_Barcode3$
|
|
94
|
+
}(_Barcode3$c.default);
|
|
95
95
|
|
|
96
96
|
// All characters. The position in the array is the (checksum) value
|
|
97
97
|
|
|
@@ -138,9 +138,9 @@ var CODE128_AUTO = {};
|
|
|
138
138
|
|
|
139
139
|
var CODE128$1 = {};
|
|
140
140
|
|
|
141
|
-
var constants$
|
|
141
|
+
var constants$3 = {};
|
|
142
142
|
|
|
143
|
-
Object.defineProperty(constants$
|
|
143
|
+
Object.defineProperty(constants$3, "__esModule", {
|
|
144
144
|
value: true
|
|
145
145
|
});
|
|
146
146
|
|
|
@@ -149,80 +149,80 @@ var _SET_BY_CODE;
|
|
|
149
149
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
150
150
|
|
|
151
151
|
// constants for internal usage
|
|
152
|
-
var SET_A = constants$
|
|
153
|
-
var SET_B = constants$
|
|
154
|
-
var SET_C = constants$
|
|
152
|
+
var SET_A = constants$3.SET_A = 0;
|
|
153
|
+
var SET_B = constants$3.SET_B = 1;
|
|
154
|
+
var SET_C = constants$3.SET_C = 2;
|
|
155
155
|
|
|
156
156
|
// Special characters
|
|
157
|
-
constants$
|
|
158
|
-
var START_A = constants$
|
|
159
|
-
var START_B = constants$
|
|
160
|
-
var START_C = constants$
|
|
161
|
-
constants$
|
|
162
|
-
constants$
|
|
163
|
-
constants$
|
|
157
|
+
constants$3.SHIFT = 98;
|
|
158
|
+
var START_A = constants$3.START_A = 103;
|
|
159
|
+
var START_B = constants$3.START_B = 104;
|
|
160
|
+
var START_C = constants$3.START_C = 105;
|
|
161
|
+
constants$3.MODULO = 103;
|
|
162
|
+
constants$3.STOP = 106;
|
|
163
|
+
constants$3.FNC1 = 207;
|
|
164
164
|
|
|
165
165
|
// Get set by start code
|
|
166
|
-
constants$
|
|
166
|
+
constants$3.SET_BY_CODE = (_SET_BY_CODE = {}, _defineProperty(_SET_BY_CODE, START_A, SET_A), _defineProperty(_SET_BY_CODE, START_B, SET_B), _defineProperty(_SET_BY_CODE, START_C, SET_C), _SET_BY_CODE);
|
|
167
167
|
|
|
168
168
|
// Get next set by code
|
|
169
|
-
constants$
|
|
169
|
+
constants$3.SWAP = {
|
|
170
170
|
101: SET_A,
|
|
171
171
|
100: SET_B,
|
|
172
172
|
99: SET_C
|
|
173
173
|
};
|
|
174
174
|
|
|
175
|
-
constants$
|
|
176
|
-
constants$
|
|
177
|
-
constants$
|
|
175
|
+
constants$3.A_START_CHAR = String.fromCharCode(208); // START_A + 105
|
|
176
|
+
constants$3.B_START_CHAR = String.fromCharCode(209); // START_B + 105
|
|
177
|
+
constants$3.C_START_CHAR = String.fromCharCode(210); // START_C + 105
|
|
178
178
|
|
|
179
179
|
// 128A (Code Set A)
|
|
180
180
|
// ASCII characters 00 to 95 (0–9, A–Z and control codes), special characters, and FNC 1–4
|
|
181
|
-
constants$
|
|
181
|
+
constants$3.A_CHARS = "[\x00-\x5F\xC8-\xCF]";
|
|
182
182
|
|
|
183
183
|
// 128B (Code Set B)
|
|
184
184
|
// ASCII characters 32 to 127 (0–9, A–Z, a–z), special characters, and FNC 1–4
|
|
185
|
-
constants$
|
|
185
|
+
constants$3.B_CHARS = "[\x20-\x7F\xC8-\xCF]";
|
|
186
186
|
|
|
187
187
|
// 128C (Code Set C)
|
|
188
188
|
// 00–99 (encodes two digits with a single code point) and FNC1
|
|
189
|
-
constants$
|
|
189
|
+
constants$3.C_CHARS = "(\xCF*[0-9]{2}\xCF*)";
|
|
190
190
|
|
|
191
191
|
// CODE128 includes 107 symbols:
|
|
192
192
|
// 103 data symbols, 3 start symbols (A, B and C), and 1 stop symbol (the last one)
|
|
193
193
|
// Each symbol consist of three black bars (1) and three white spaces (0).
|
|
194
|
-
constants$
|
|
194
|
+
constants$3.BARS = [11011001100, 11001101100, 11001100110, 10010011000, 10010001100, 10001001100, 10011001000, 10011000100, 10001100100, 11001001000, 11001000100, 11000100100, 10110011100, 10011011100, 10011001110, 10111001100, 10011101100, 10011100110, 11001110010, 11001011100, 11001001110, 11011100100, 11001110100, 11101101110, 11101001100, 11100101100, 11100100110, 11101100100, 11100110100, 11100110010, 11011011000, 11011000110, 11000110110, 10100011000, 10001011000, 10001000110, 10110001000, 10001101000, 10001100010, 11010001000, 11000101000, 11000100010, 10110111000, 10110001110, 10001101110, 10111011000, 10111000110, 10001110110, 11101110110, 11010001110, 11000101110, 11011101000, 11011100010, 11011101110, 11101011000, 11101000110, 11100010110, 11101101000, 11101100010, 11100011010, 11101111010, 11001000010, 11110001010, 10100110000, 10100001100, 10010110000, 10010000110, 10000101100, 10000100110, 10110010000, 10110000100, 10011010000, 10011000010, 10000110100, 10000110010, 11000010010, 11001010000, 11110111010, 11000010100, 10001111010, 10100111100, 10010111100, 10010011110, 10111100100, 10011110100, 10011110010, 11110100100, 11110010100, 11110010010, 11011011110, 11011110110, 11110110110, 10101111000, 10100011110, 10001011110, 10111101000, 10111100010, 11110101000, 11110100010, 10111011110, 10111101110, 11101011110, 11110101110, 11010000100, 11010010000, 11010011100, 1100011101011];
|
|
195
195
|
|
|
196
196
|
Object.defineProperty(CODE128$1, "__esModule", {
|
|
197
197
|
value: true
|
|
198
198
|
});
|
|
199
199
|
|
|
200
|
-
var _createClass$
|
|
200
|
+
var _createClass$n = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
|
201
201
|
|
|
202
|
-
var _Barcode2$
|
|
202
|
+
var _Barcode2$b = Barcode$2;
|
|
203
203
|
|
|
204
|
-
var _Barcode3$
|
|
204
|
+
var _Barcode3$b = _interopRequireDefault$A(_Barcode2$b);
|
|
205
205
|
|
|
206
|
-
var _constants$
|
|
206
|
+
var _constants$b = constants$3;
|
|
207
207
|
|
|
208
|
-
function _interopRequireDefault$
|
|
208
|
+
function _interopRequireDefault$A(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
209
209
|
|
|
210
|
-
function _classCallCheck$
|
|
210
|
+
function _classCallCheck$t(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
211
211
|
|
|
212
|
-
function _possibleConstructorReturn$
|
|
212
|
+
function _possibleConstructorReturn$p(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
|
213
213
|
|
|
214
|
-
function _inherits$
|
|
214
|
+
function _inherits$p(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
|
215
215
|
|
|
216
216
|
// This is the master class,
|
|
217
217
|
// it does require the start code to be included in the string
|
|
218
218
|
var CODE128 = function (_Barcode) {
|
|
219
|
-
_inherits$
|
|
219
|
+
_inherits$p(CODE128, _Barcode);
|
|
220
220
|
|
|
221
221
|
function CODE128(data, options) {
|
|
222
|
-
_classCallCheck$
|
|
222
|
+
_classCallCheck$t(this, CODE128);
|
|
223
223
|
|
|
224
224
|
// Get array of ascii codes from data
|
|
225
|
-
var _this = _possibleConstructorReturn$
|
|
225
|
+
var _this = _possibleConstructorReturn$p(this, (CODE128.__proto__ || Object.getPrototypeOf(CODE128)).call(this, data.substring(1), options));
|
|
226
226
|
|
|
227
227
|
_this.bytes = data.split('').map(function (char) {
|
|
228
228
|
return char.charCodeAt(0);
|
|
@@ -230,7 +230,7 @@ var CODE128 = function (_Barcode) {
|
|
|
230
230
|
return _this;
|
|
231
231
|
}
|
|
232
232
|
|
|
233
|
-
_createClass$
|
|
233
|
+
_createClass$n(CODE128, [{
|
|
234
234
|
key: 'valid',
|
|
235
235
|
value: function valid() {
|
|
236
236
|
// ASCII value ranges 0-127, 200-211
|
|
@@ -247,14 +247,14 @@ var CODE128 = function (_Barcode) {
|
|
|
247
247
|
// Remove the start code from the bytes and set its index
|
|
248
248
|
var startIndex = bytes.shift() - 105;
|
|
249
249
|
// Get start set by index
|
|
250
|
-
var startSet = _constants$
|
|
250
|
+
var startSet = _constants$b.SET_BY_CODE[startIndex];
|
|
251
251
|
|
|
252
252
|
if (startSet === undefined) {
|
|
253
253
|
throw new RangeError('The encoding does not start with a start character.');
|
|
254
254
|
}
|
|
255
255
|
|
|
256
256
|
if (this.shouldEncodeAsEan128() === true) {
|
|
257
|
-
bytes.unshift(_constants$
|
|
257
|
+
bytes.unshift(_constants$b.FNC1);
|
|
258
258
|
}
|
|
259
259
|
|
|
260
260
|
// Start encode with the right type
|
|
@@ -268,9 +268,9 @@ var CODE128 = function (_Barcode) {
|
|
|
268
268
|
// Add the encoded bits
|
|
269
269
|
encodingResult.result +
|
|
270
270
|
// Add the checksum
|
|
271
|
-
CODE128.getBar((encodingResult.checksum + startIndex) % _constants$
|
|
271
|
+
CODE128.getBar((encodingResult.checksum + startIndex) % _constants$b.MODULO) +
|
|
272
272
|
// Add the end bits
|
|
273
|
-
CODE128.getBar(_constants$
|
|
273
|
+
CODE128.getBar(_constants$b.STOP)
|
|
274
274
|
};
|
|
275
275
|
}
|
|
276
276
|
|
|
@@ -291,7 +291,7 @@ var CODE128 = function (_Barcode) {
|
|
|
291
291
|
}], [{
|
|
292
292
|
key: 'getBar',
|
|
293
293
|
value: function getBar(index) {
|
|
294
|
-
return _constants$
|
|
294
|
+
return _constants$b.BARS[index] ? _constants$b.BARS[index].toString() : '';
|
|
295
295
|
}
|
|
296
296
|
|
|
297
297
|
// Correct an index by a set and shift it from the bytes array
|
|
@@ -299,10 +299,10 @@ var CODE128 = function (_Barcode) {
|
|
|
299
299
|
}, {
|
|
300
300
|
key: 'correctIndex',
|
|
301
301
|
value: function correctIndex(bytes, set) {
|
|
302
|
-
if (set === _constants$
|
|
302
|
+
if (set === _constants$b.SET_A) {
|
|
303
303
|
var charCode = bytes.shift();
|
|
304
304
|
return charCode < 32 ? charCode + 64 : charCode - 32;
|
|
305
|
-
} else if (set === _constants$
|
|
305
|
+
} else if (set === _constants$b.SET_B) {
|
|
306
306
|
return bytes.shift() - 32;
|
|
307
307
|
} else {
|
|
308
308
|
return (bytes.shift() - 48) * 10 + bytes.shift() - 48;
|
|
@@ -321,7 +321,7 @@ var CODE128 = function (_Barcode) {
|
|
|
321
321
|
// Special characters
|
|
322
322
|
if (bytes[0] >= 200) {
|
|
323
323
|
index = bytes.shift() - 105;
|
|
324
|
-
var nextSet = _constants$
|
|
324
|
+
var nextSet = _constants$b.SWAP[index];
|
|
325
325
|
|
|
326
326
|
// Swap to other set
|
|
327
327
|
if (nextSet !== undefined) {
|
|
@@ -330,9 +330,9 @@ var CODE128 = function (_Barcode) {
|
|
|
330
330
|
// Continue on current set but encode a special character
|
|
331
331
|
else {
|
|
332
332
|
// Shift
|
|
333
|
-
if ((set === _constants$
|
|
333
|
+
if ((set === _constants$b.SET_A || set === _constants$b.SET_B) && index === _constants$b.SHIFT) {
|
|
334
334
|
// Convert the next character so that is encoded correctly
|
|
335
|
-
bytes[0] = set === _constants$
|
|
335
|
+
bytes[0] = set === _constants$b.SET_A ? bytes[0] > 95 ? bytes[0] - 96 : bytes[0] : bytes[0] < 32 ? bytes[0] + 96 : bytes[0];
|
|
336
336
|
}
|
|
337
337
|
nextCode = CODE128.next(bytes, pos + 1, set);
|
|
338
338
|
}
|
|
@@ -355,7 +355,7 @@ var CODE128 = function (_Barcode) {
|
|
|
355
355
|
}]);
|
|
356
356
|
|
|
357
357
|
return CODE128;
|
|
358
|
-
}(_Barcode3$
|
|
358
|
+
}(_Barcode3$b.default);
|
|
359
359
|
|
|
360
360
|
CODE128$1.default = CODE128;
|
|
361
361
|
|
|
@@ -365,22 +365,22 @@ Object.defineProperty(auto, "__esModule", {
|
|
|
365
365
|
value: true
|
|
366
366
|
});
|
|
367
367
|
|
|
368
|
-
var _constants$
|
|
368
|
+
var _constants$a = constants$3;
|
|
369
369
|
|
|
370
370
|
// Match Set functions
|
|
371
371
|
var matchSetALength = function matchSetALength(string) {
|
|
372
|
-
return string.match(new RegExp('^' + _constants$
|
|
372
|
+
return string.match(new RegExp('^' + _constants$a.A_CHARS + '*'))[0].length;
|
|
373
373
|
};
|
|
374
374
|
var matchSetBLength = function matchSetBLength(string) {
|
|
375
|
-
return string.match(new RegExp('^' + _constants$
|
|
375
|
+
return string.match(new RegExp('^' + _constants$a.B_CHARS + '*'))[0].length;
|
|
376
376
|
};
|
|
377
377
|
var matchSetC = function matchSetC(string) {
|
|
378
|
-
return string.match(new RegExp('^' + _constants$
|
|
378
|
+
return string.match(new RegExp('^' + _constants$a.C_CHARS + '*'))[0];
|
|
379
379
|
};
|
|
380
380
|
|
|
381
381
|
// CODE128A or CODE128B
|
|
382
382
|
function autoSelectFromAB(string, isA) {
|
|
383
|
-
var ranges = isA ? _constants$
|
|
383
|
+
var ranges = isA ? _constants$a.A_CHARS : _constants$a.B_CHARS;
|
|
384
384
|
var untilC = string.match(new RegExp('^(' + ranges + '+?)(([0-9]{2}){2,})([^0-9]|$)'));
|
|
385
385
|
|
|
386
386
|
if (untilC) {
|
|
@@ -420,11 +420,11 @@ auto.default = function (string) {
|
|
|
420
420
|
|
|
421
421
|
// Select 128C if the string start with enough digits
|
|
422
422
|
if (cLength >= 2) {
|
|
423
|
-
newString = _constants$
|
|
423
|
+
newString = _constants$a.C_START_CHAR + autoSelectFromC(string);
|
|
424
424
|
} else {
|
|
425
425
|
// Select A/B depending on the longest match
|
|
426
426
|
var isA = matchSetALength(string) > matchSetBLength(string);
|
|
427
|
-
newString = (isA ? _constants$
|
|
427
|
+
newString = (isA ? _constants$a.A_START_CHAR : _constants$a.B_START_CHAR) + autoSelectFromAB(string, isA);
|
|
428
428
|
}
|
|
429
429
|
|
|
430
430
|
return newString.replace(/[\xCD\xCE]([^])[\xCD\xCE]/, // Any sequence between 205 and 206 characters
|
|
@@ -437,39 +437,39 @@ Object.defineProperty(CODE128_AUTO, "__esModule", {
|
|
|
437
437
|
value: true
|
|
438
438
|
});
|
|
439
439
|
|
|
440
|
-
var _CODE2$
|
|
440
|
+
var _CODE2$6 = CODE128$1;
|
|
441
441
|
|
|
442
|
-
var _CODE3$
|
|
442
|
+
var _CODE3$5 = _interopRequireDefault$z(_CODE2$6);
|
|
443
443
|
|
|
444
444
|
var _auto = auto;
|
|
445
445
|
|
|
446
|
-
var _auto2 = _interopRequireDefault$
|
|
446
|
+
var _auto2 = _interopRequireDefault$z(_auto);
|
|
447
447
|
|
|
448
|
-
function _interopRequireDefault$
|
|
448
|
+
function _interopRequireDefault$z(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
449
449
|
|
|
450
|
-
function _classCallCheck$
|
|
450
|
+
function _classCallCheck$s(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
451
451
|
|
|
452
|
-
function _possibleConstructorReturn$
|
|
452
|
+
function _possibleConstructorReturn$o(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
|
453
453
|
|
|
454
|
-
function _inherits$
|
|
454
|
+
function _inherits$o(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
|
455
455
|
|
|
456
456
|
var CODE128AUTO = function (_CODE) {
|
|
457
|
-
_inherits$
|
|
457
|
+
_inherits$o(CODE128AUTO, _CODE);
|
|
458
458
|
|
|
459
459
|
function CODE128AUTO(data, options) {
|
|
460
|
-
_classCallCheck$
|
|
460
|
+
_classCallCheck$s(this, CODE128AUTO);
|
|
461
461
|
|
|
462
462
|
// ASCII value ranges 0-127, 200-211
|
|
463
463
|
if (/^[\x00-\x7F\xC8-\xD3]+$/.test(data)) {
|
|
464
|
-
var _this = _possibleConstructorReturn$
|
|
464
|
+
var _this = _possibleConstructorReturn$o(this, (CODE128AUTO.__proto__ || Object.getPrototypeOf(CODE128AUTO)).call(this, (0, _auto2.default)(data), options));
|
|
465
465
|
} else {
|
|
466
|
-
var _this = _possibleConstructorReturn$
|
|
466
|
+
var _this = _possibleConstructorReturn$o(this, (CODE128AUTO.__proto__ || Object.getPrototypeOf(CODE128AUTO)).call(this, data, options));
|
|
467
467
|
}
|
|
468
|
-
return _possibleConstructorReturn$
|
|
468
|
+
return _possibleConstructorReturn$o(_this);
|
|
469
469
|
}
|
|
470
470
|
|
|
471
471
|
return CODE128AUTO;
|
|
472
|
-
}(_CODE3$
|
|
472
|
+
}(_CODE3$5.default);
|
|
473
473
|
|
|
474
474
|
CODE128_AUTO.default = CODE128AUTO;
|
|
475
475
|
|
|
@@ -479,40 +479,40 @@ Object.defineProperty(CODE128A$1, "__esModule", {
|
|
|
479
479
|
value: true
|
|
480
480
|
});
|
|
481
481
|
|
|
482
|
-
var _createClass$
|
|
482
|
+
var _createClass$m = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
|
483
483
|
|
|
484
|
-
var _CODE2$
|
|
484
|
+
var _CODE2$5 = CODE128$1;
|
|
485
485
|
|
|
486
|
-
var _CODE3$
|
|
486
|
+
var _CODE3$4 = _interopRequireDefault$y(_CODE2$5);
|
|
487
487
|
|
|
488
|
-
var _constants$
|
|
488
|
+
var _constants$9 = constants$3;
|
|
489
489
|
|
|
490
|
-
function _interopRequireDefault$
|
|
490
|
+
function _interopRequireDefault$y(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
491
491
|
|
|
492
|
-
function _classCallCheck$
|
|
492
|
+
function _classCallCheck$r(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
493
493
|
|
|
494
|
-
function _possibleConstructorReturn$
|
|
494
|
+
function _possibleConstructorReturn$n(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
|
495
495
|
|
|
496
|
-
function _inherits$
|
|
496
|
+
function _inherits$n(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
|
497
497
|
|
|
498
498
|
var CODE128A = function (_CODE) {
|
|
499
|
-
_inherits$
|
|
499
|
+
_inherits$n(CODE128A, _CODE);
|
|
500
500
|
|
|
501
501
|
function CODE128A(string, options) {
|
|
502
|
-
_classCallCheck$
|
|
502
|
+
_classCallCheck$r(this, CODE128A);
|
|
503
503
|
|
|
504
|
-
return _possibleConstructorReturn$
|
|
504
|
+
return _possibleConstructorReturn$n(this, (CODE128A.__proto__ || Object.getPrototypeOf(CODE128A)).call(this, _constants$9.A_START_CHAR + string, options));
|
|
505
505
|
}
|
|
506
506
|
|
|
507
|
-
_createClass$
|
|
507
|
+
_createClass$m(CODE128A, [{
|
|
508
508
|
key: 'valid',
|
|
509
509
|
value: function valid() {
|
|
510
|
-
return new RegExp('^' + _constants$
|
|
510
|
+
return new RegExp('^' + _constants$9.A_CHARS + '+$').test(this.data);
|
|
511
511
|
}
|
|
512
512
|
}]);
|
|
513
513
|
|
|
514
514
|
return CODE128A;
|
|
515
|
-
}(_CODE3$
|
|
515
|
+
}(_CODE3$4.default);
|
|
516
516
|
|
|
517
517
|
CODE128A$1.default = CODE128A;
|
|
518
518
|
|
|
@@ -522,40 +522,40 @@ Object.defineProperty(CODE128B$1, "__esModule", {
|
|
|
522
522
|
value: true
|
|
523
523
|
});
|
|
524
524
|
|
|
525
|
-
var _createClass$
|
|
525
|
+
var _createClass$l = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
|
526
526
|
|
|
527
|
-
var _CODE2$
|
|
527
|
+
var _CODE2$4 = CODE128$1;
|
|
528
528
|
|
|
529
|
-
var _CODE3$
|
|
529
|
+
var _CODE3$3 = _interopRequireDefault$x(_CODE2$4);
|
|
530
530
|
|
|
531
|
-
var _constants$
|
|
531
|
+
var _constants$8 = constants$3;
|
|
532
532
|
|
|
533
|
-
function _interopRequireDefault$
|
|
533
|
+
function _interopRequireDefault$x(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
534
534
|
|
|
535
|
-
function _classCallCheck$
|
|
535
|
+
function _classCallCheck$q(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
536
536
|
|
|
537
|
-
function _possibleConstructorReturn$
|
|
537
|
+
function _possibleConstructorReturn$m(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
|
538
538
|
|
|
539
|
-
function _inherits$
|
|
539
|
+
function _inherits$m(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
|
540
540
|
|
|
541
541
|
var CODE128B = function (_CODE) {
|
|
542
|
-
_inherits$
|
|
542
|
+
_inherits$m(CODE128B, _CODE);
|
|
543
543
|
|
|
544
544
|
function CODE128B(string, options) {
|
|
545
|
-
_classCallCheck$
|
|
545
|
+
_classCallCheck$q(this, CODE128B);
|
|
546
546
|
|
|
547
|
-
return _possibleConstructorReturn$
|
|
547
|
+
return _possibleConstructorReturn$m(this, (CODE128B.__proto__ || Object.getPrototypeOf(CODE128B)).call(this, _constants$8.B_START_CHAR + string, options));
|
|
548
548
|
}
|
|
549
549
|
|
|
550
|
-
_createClass$
|
|
550
|
+
_createClass$l(CODE128B, [{
|
|
551
551
|
key: 'valid',
|
|
552
552
|
value: function valid() {
|
|
553
|
-
return new RegExp('^' + _constants$
|
|
553
|
+
return new RegExp('^' + _constants$8.B_CHARS + '+$').test(this.data);
|
|
554
554
|
}
|
|
555
555
|
}]);
|
|
556
556
|
|
|
557
557
|
return CODE128B;
|
|
558
|
-
}(_CODE3$
|
|
558
|
+
}(_CODE3$3.default);
|
|
559
559
|
|
|
560
560
|
CODE128B$1.default = CODE128B;
|
|
561
561
|
|
|
@@ -565,40 +565,40 @@ Object.defineProperty(CODE128C$1, "__esModule", {
|
|
|
565
565
|
value: true
|
|
566
566
|
});
|
|
567
567
|
|
|
568
|
-
var _createClass$
|
|
568
|
+
var _createClass$k = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
|
569
569
|
|
|
570
|
-
var _CODE2$
|
|
570
|
+
var _CODE2$3 = CODE128$1;
|
|
571
571
|
|
|
572
|
-
var _CODE3 = _interopRequireDefault$
|
|
572
|
+
var _CODE3$2 = _interopRequireDefault$w(_CODE2$3);
|
|
573
573
|
|
|
574
|
-
var _constants$
|
|
574
|
+
var _constants$7 = constants$3;
|
|
575
575
|
|
|
576
|
-
function _interopRequireDefault$
|
|
576
|
+
function _interopRequireDefault$w(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
577
577
|
|
|
578
|
-
function _classCallCheck$
|
|
578
|
+
function _classCallCheck$p(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
579
579
|
|
|
580
|
-
function _possibleConstructorReturn$
|
|
580
|
+
function _possibleConstructorReturn$l(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
|
581
581
|
|
|
582
|
-
function _inherits$
|
|
582
|
+
function _inherits$l(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
|
583
583
|
|
|
584
584
|
var CODE128C = function (_CODE) {
|
|
585
|
-
_inherits$
|
|
585
|
+
_inherits$l(CODE128C, _CODE);
|
|
586
586
|
|
|
587
587
|
function CODE128C(string, options) {
|
|
588
|
-
_classCallCheck$
|
|
588
|
+
_classCallCheck$p(this, CODE128C);
|
|
589
589
|
|
|
590
|
-
return _possibleConstructorReturn$
|
|
590
|
+
return _possibleConstructorReturn$l(this, (CODE128C.__proto__ || Object.getPrototypeOf(CODE128C)).call(this, _constants$7.C_START_CHAR + string, options));
|
|
591
591
|
}
|
|
592
592
|
|
|
593
|
-
_createClass$
|
|
593
|
+
_createClass$k(CODE128C, [{
|
|
594
594
|
key: 'valid',
|
|
595
595
|
value: function valid() {
|
|
596
|
-
return new RegExp('^' + _constants$
|
|
596
|
+
return new RegExp('^' + _constants$7.C_CHARS + '+$').test(this.data);
|
|
597
597
|
}
|
|
598
598
|
}]);
|
|
599
599
|
|
|
600
600
|
return CODE128C;
|
|
601
|
-
}(_CODE3.default);
|
|
601
|
+
}(_CODE3$2.default);
|
|
602
602
|
|
|
603
603
|
CODE128C$1.default = CODE128C;
|
|
604
604
|
|
|
@@ -609,21 +609,21 @@ CODE128$2.CODE128C = CODE128$2.CODE128B = CODE128$2.CODE128A = CODE128$2.CODE128
|
|
|
609
609
|
|
|
610
610
|
var _CODE128_AUTO = CODE128_AUTO;
|
|
611
611
|
|
|
612
|
-
var _CODE128_AUTO2 = _interopRequireDefault$
|
|
612
|
+
var _CODE128_AUTO2 = _interopRequireDefault$v(_CODE128_AUTO);
|
|
613
613
|
|
|
614
614
|
var _CODE128A = CODE128A$1;
|
|
615
615
|
|
|
616
|
-
var _CODE128A2 = _interopRequireDefault$
|
|
616
|
+
var _CODE128A2 = _interopRequireDefault$v(_CODE128A);
|
|
617
617
|
|
|
618
618
|
var _CODE128B = CODE128B$1;
|
|
619
619
|
|
|
620
|
-
var _CODE128B2 = _interopRequireDefault$
|
|
620
|
+
var _CODE128B2 = _interopRequireDefault$v(_CODE128B);
|
|
621
621
|
|
|
622
622
|
var _CODE128C = CODE128C$1;
|
|
623
623
|
|
|
624
|
-
var _CODE128C2 = _interopRequireDefault$
|
|
624
|
+
var _CODE128C2 = _interopRequireDefault$v(_CODE128C);
|
|
625
625
|
|
|
626
|
-
function _interopRequireDefault$
|
|
626
|
+
function _interopRequireDefault$v(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
627
627
|
|
|
628
628
|
CODE128$2.CODE128 = _CODE128_AUTO2.default;
|
|
629
629
|
CODE128$2.CODE128A = _CODE128A2.default;
|
|
@@ -634,16 +634,16 @@ var EAN_UPC = {};
|
|
|
634
634
|
|
|
635
635
|
var EAN13$1 = {};
|
|
636
636
|
|
|
637
|
-
var constants$
|
|
637
|
+
var constants$2 = {};
|
|
638
638
|
|
|
639
|
-
Object.defineProperty(constants$
|
|
639
|
+
Object.defineProperty(constants$2, "__esModule", {
|
|
640
640
|
value: true
|
|
641
641
|
});
|
|
642
642
|
// Standard start end and middle bits
|
|
643
|
-
constants$
|
|
644
|
-
constants$
|
|
643
|
+
constants$2.SIDE_BIN = '101';
|
|
644
|
+
constants$2.MIDDLE_BIN = '01010';
|
|
645
645
|
|
|
646
|
-
constants$
|
|
646
|
+
constants$2.BINARIES = {
|
|
647
647
|
'L': [// The L (left) type of encoding
|
|
648
648
|
'0001101', '0011001', '0010011', '0111101', '0100011', '0110001', '0101111', '0111011', '0110111', '0001011'],
|
|
649
649
|
'G': [// The G type of encoding
|
|
@@ -657,13 +657,13 @@ constants$1.BINARIES = {
|
|
|
657
657
|
};
|
|
658
658
|
|
|
659
659
|
// Define the EAN-2 structure
|
|
660
|
-
constants$
|
|
660
|
+
constants$2.EAN2_STRUCTURE = ['LL', 'LG', 'GL', 'GG'];
|
|
661
661
|
|
|
662
662
|
// Define the EAN-5 structure
|
|
663
|
-
constants$
|
|
663
|
+
constants$2.EAN5_STRUCTURE = ['GGLLL', 'GLGLL', 'GLLGL', 'GLLLG', 'LGGLL', 'LLGGL', 'LLLGG', 'LGLGL', 'LGLLG', 'LLGLG'];
|
|
664
664
|
|
|
665
665
|
// Define the EAN-13 structure
|
|
666
|
-
constants$
|
|
666
|
+
constants$2.EAN13_STRUCTURE = ['LLLLLL', 'LLGLGG', 'LLGGLG', 'LLGGGL', 'LGLLGG', 'LGGLLG', 'LGGGLL', 'LGLGLG', 'LGLGGL', 'LGGLGL'];
|
|
667
667
|
|
|
668
668
|
var EAN$1 = {};
|
|
669
669
|
|
|
@@ -673,12 +673,12 @@ Object.defineProperty(encoder, "__esModule", {
|
|
|
673
673
|
value: true
|
|
674
674
|
});
|
|
675
675
|
|
|
676
|
-
var _constants$
|
|
676
|
+
var _constants$6 = constants$2;
|
|
677
677
|
|
|
678
678
|
// Encode data string
|
|
679
679
|
var encode$1 = function encode(data, structure, separator) {
|
|
680
680
|
var encoded = data.split('').map(function (val, idx) {
|
|
681
|
-
return _constants$
|
|
681
|
+
return _constants$6.BINARIES[structure[idx]];
|
|
682
682
|
}).map(function (val, idx) {
|
|
683
683
|
return val ? val[data[idx]] : '';
|
|
684
684
|
});
|
|
@@ -699,35 +699,35 @@ Object.defineProperty(EAN$1, "__esModule", {
|
|
|
699
699
|
value: true
|
|
700
700
|
});
|
|
701
701
|
|
|
702
|
-
var _createClass$
|
|
702
|
+
var _createClass$j = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
|
703
703
|
|
|
704
|
-
var _constants$
|
|
704
|
+
var _constants$5 = constants$2;
|
|
705
705
|
|
|
706
706
|
var _encoder$4 = encoder;
|
|
707
707
|
|
|
708
|
-
var _encoder2$4 = _interopRequireDefault$
|
|
708
|
+
var _encoder2$4 = _interopRequireDefault$u(_encoder$4);
|
|
709
709
|
|
|
710
|
-
var _Barcode2$
|
|
710
|
+
var _Barcode2$a = Barcode$2;
|
|
711
711
|
|
|
712
|
-
var _Barcode3$
|
|
712
|
+
var _Barcode3$a = _interopRequireDefault$u(_Barcode2$a);
|
|
713
713
|
|
|
714
|
-
function _interopRequireDefault$
|
|
714
|
+
function _interopRequireDefault$u(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
715
715
|
|
|
716
|
-
function _classCallCheck$
|
|
716
|
+
function _classCallCheck$o(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
717
717
|
|
|
718
|
-
function _possibleConstructorReturn$
|
|
718
|
+
function _possibleConstructorReturn$k(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
|
719
719
|
|
|
720
|
-
function _inherits$
|
|
720
|
+
function _inherits$k(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
|
721
721
|
|
|
722
722
|
// Base class for EAN8 & EAN13
|
|
723
723
|
var EAN = function (_Barcode) {
|
|
724
|
-
_inherits$
|
|
724
|
+
_inherits$k(EAN, _Barcode);
|
|
725
725
|
|
|
726
726
|
function EAN(data, options) {
|
|
727
|
-
_classCallCheck$
|
|
727
|
+
_classCallCheck$o(this, EAN);
|
|
728
728
|
|
|
729
729
|
// Make sure the font is not bigger than the space between the guard bars
|
|
730
|
-
var _this = _possibleConstructorReturn$
|
|
730
|
+
var _this = _possibleConstructorReturn$k(this, (EAN.__proto__ || Object.getPrototypeOf(EAN)).call(this, data, options));
|
|
731
731
|
|
|
732
732
|
_this.fontSize = !options.flat && options.fontSize > options.width * 10 ? options.width * 10 : options.fontSize;
|
|
733
733
|
|
|
@@ -736,7 +736,7 @@ var EAN = function (_Barcode) {
|
|
|
736
736
|
return _this;
|
|
737
737
|
}
|
|
738
738
|
|
|
739
|
-
_createClass$
|
|
739
|
+
_createClass$j(EAN, [{
|
|
740
740
|
key: 'encode',
|
|
741
741
|
value: function encode() {
|
|
742
742
|
return this.options.flat ? this.encodeFlat() : this.encodeGuarded();
|
|
@@ -767,12 +767,12 @@ var EAN = function (_Barcode) {
|
|
|
767
767
|
var textOptions = { fontSize: this.fontSize };
|
|
768
768
|
var guardOptions = { height: this.guardHeight };
|
|
769
769
|
|
|
770
|
-
return [{ data: _constants$
|
|
770
|
+
return [{ data: _constants$5.SIDE_BIN, options: guardOptions }, { data: this.leftEncode(), text: this.leftText(), options: textOptions }, { data: _constants$5.MIDDLE_BIN, options: guardOptions }, { data: this.rightEncode(), text: this.rightText(), options: textOptions }, { data: _constants$5.SIDE_BIN, options: guardOptions }];
|
|
771
771
|
}
|
|
772
772
|
}, {
|
|
773
773
|
key: 'encodeFlat',
|
|
774
774
|
value: function encodeFlat() {
|
|
775
|
-
var data = [_constants$
|
|
775
|
+
var data = [_constants$5.SIDE_BIN, this.leftEncode(), _constants$5.MIDDLE_BIN, this.rightEncode(), _constants$5.SIDE_BIN];
|
|
776
776
|
|
|
777
777
|
return {
|
|
778
778
|
data: data.join(''),
|
|
@@ -782,7 +782,7 @@ var EAN = function (_Barcode) {
|
|
|
782
782
|
}]);
|
|
783
783
|
|
|
784
784
|
return EAN;
|
|
785
|
-
}(_Barcode3$
|
|
785
|
+
}(_Barcode3$a.default);
|
|
786
786
|
|
|
787
787
|
EAN$1.default = EAN;
|
|
788
788
|
|
|
@@ -790,23 +790,23 @@ Object.defineProperty(EAN13$1, "__esModule", {
|
|
|
790
790
|
value: true
|
|
791
791
|
});
|
|
792
792
|
|
|
793
|
-
var _createClass$
|
|
793
|
+
var _createClass$i = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
|
794
794
|
|
|
795
795
|
var _get$1 = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
|
|
796
796
|
|
|
797
|
-
var _constants$
|
|
797
|
+
var _constants$4 = constants$2;
|
|
798
798
|
|
|
799
799
|
var _EAN2$2 = EAN$1;
|
|
800
800
|
|
|
801
|
-
var _EAN3$2 = _interopRequireDefault$
|
|
801
|
+
var _EAN3$2 = _interopRequireDefault$t(_EAN2$2);
|
|
802
802
|
|
|
803
|
-
function _interopRequireDefault$
|
|
803
|
+
function _interopRequireDefault$t(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
804
804
|
|
|
805
|
-
function _classCallCheck$
|
|
805
|
+
function _classCallCheck$n(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
806
806
|
|
|
807
|
-
function _possibleConstructorReturn$
|
|
807
|
+
function _possibleConstructorReturn$j(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
|
808
808
|
|
|
809
|
-
function _inherits$
|
|
809
|
+
function _inherits$j(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // Encoding documentation:
|
|
810
810
|
// https://en.wikipedia.org/wiki/International_Article_Number_(EAN)#Binary_encoding_of_data_digits_into_EAN-13_barcode
|
|
811
811
|
|
|
812
812
|
// Calculate the checksum digit
|
|
@@ -822,10 +822,10 @@ var checksum$4 = function checksum(number) {
|
|
|
822
822
|
};
|
|
823
823
|
|
|
824
824
|
var EAN13 = function (_EAN) {
|
|
825
|
-
_inherits$
|
|
825
|
+
_inherits$j(EAN13, _EAN);
|
|
826
826
|
|
|
827
827
|
function EAN13(data, options) {
|
|
828
|
-
_classCallCheck$
|
|
828
|
+
_classCallCheck$n(this, EAN13);
|
|
829
829
|
|
|
830
830
|
// Add checksum if it does not exist
|
|
831
831
|
if (data.search(/^[0-9]{12}$/) !== -1) {
|
|
@@ -833,13 +833,13 @@ var EAN13 = function (_EAN) {
|
|
|
833
833
|
}
|
|
834
834
|
|
|
835
835
|
// Adds a last character to the end of the barcode
|
|
836
|
-
var _this = _possibleConstructorReturn$
|
|
836
|
+
var _this = _possibleConstructorReturn$j(this, (EAN13.__proto__ || Object.getPrototypeOf(EAN13)).call(this, data, options));
|
|
837
837
|
|
|
838
838
|
_this.lastChar = options.lastChar;
|
|
839
839
|
return _this;
|
|
840
840
|
}
|
|
841
841
|
|
|
842
|
-
_createClass$
|
|
842
|
+
_createClass$i(EAN13, [{
|
|
843
843
|
key: 'valid',
|
|
844
844
|
value: function valid() {
|
|
845
845
|
return this.data.search(/^[0-9]{13}$/) !== -1 && +this.data[12] === checksum$4(this.data);
|
|
@@ -853,7 +853,7 @@ var EAN13 = function (_EAN) {
|
|
|
853
853
|
key: 'leftEncode',
|
|
854
854
|
value: function leftEncode() {
|
|
855
855
|
var data = this.data.substr(1, 6);
|
|
856
|
-
var structure = _constants$
|
|
856
|
+
var structure = _constants$4.EAN13_STRUCTURE[this.data[0]];
|
|
857
857
|
return _get$1(EAN13.prototype.__proto__ || Object.getPrototypeOf(EAN13.prototype), 'leftEncode', this).call(this, data, structure);
|
|
858
858
|
}
|
|
859
859
|
}, {
|
|
@@ -910,21 +910,21 @@ Object.defineProperty(EAN8$1, "__esModule", {
|
|
|
910
910
|
value: true
|
|
911
911
|
});
|
|
912
912
|
|
|
913
|
-
var _createClass$
|
|
913
|
+
var _createClass$h = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
|
914
914
|
|
|
915
915
|
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
|
|
916
916
|
|
|
917
917
|
var _EAN2$1 = EAN$1;
|
|
918
918
|
|
|
919
|
-
var _EAN3$1 = _interopRequireDefault$
|
|
919
|
+
var _EAN3$1 = _interopRequireDefault$s(_EAN2$1);
|
|
920
920
|
|
|
921
|
-
function _interopRequireDefault$
|
|
921
|
+
function _interopRequireDefault$s(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
922
922
|
|
|
923
|
-
function _classCallCheck$
|
|
923
|
+
function _classCallCheck$m(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
924
924
|
|
|
925
|
-
function _possibleConstructorReturn$
|
|
925
|
+
function _possibleConstructorReturn$i(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
|
926
926
|
|
|
927
|
-
function _inherits$
|
|
927
|
+
function _inherits$i(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // Encoding documentation:
|
|
928
928
|
// http://www.barcodeisland.com/ean8.phtml
|
|
929
929
|
|
|
930
930
|
// Calculate the checksum digit
|
|
@@ -939,20 +939,20 @@ var checksum$3 = function checksum(number) {
|
|
|
939
939
|
};
|
|
940
940
|
|
|
941
941
|
var EAN8 = function (_EAN) {
|
|
942
|
-
_inherits$
|
|
942
|
+
_inherits$i(EAN8, _EAN);
|
|
943
943
|
|
|
944
944
|
function EAN8(data, options) {
|
|
945
|
-
_classCallCheck$
|
|
945
|
+
_classCallCheck$m(this, EAN8);
|
|
946
946
|
|
|
947
947
|
// Add checksum if it does not exist
|
|
948
948
|
if (data.search(/^[0-9]{7}$/) !== -1) {
|
|
949
949
|
data += checksum$3(data);
|
|
950
950
|
}
|
|
951
951
|
|
|
952
|
-
return _possibleConstructorReturn$
|
|
952
|
+
return _possibleConstructorReturn$i(this, (EAN8.__proto__ || Object.getPrototypeOf(EAN8)).call(this, data, options));
|
|
953
953
|
}
|
|
954
954
|
|
|
955
|
-
_createClass$
|
|
955
|
+
_createClass$h(EAN8, [{
|
|
956
956
|
key: 'valid',
|
|
957
957
|
value: function valid() {
|
|
958
958
|
return this.data.search(/^[0-9]{8}$/) !== -1 && +this.data[7] === checksum$3(this.data);
|
|
@@ -992,25 +992,25 @@ Object.defineProperty(EAN5$1, "__esModule", {
|
|
|
992
992
|
value: true
|
|
993
993
|
});
|
|
994
994
|
|
|
995
|
-
var _createClass$
|
|
995
|
+
var _createClass$g = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
|
996
996
|
|
|
997
|
-
var _constants$
|
|
997
|
+
var _constants$3 = constants$2;
|
|
998
998
|
|
|
999
999
|
var _encoder$3 = encoder;
|
|
1000
1000
|
|
|
1001
|
-
var _encoder2$3 = _interopRequireDefault$
|
|
1001
|
+
var _encoder2$3 = _interopRequireDefault$r(_encoder$3);
|
|
1002
1002
|
|
|
1003
|
-
var _Barcode2$
|
|
1003
|
+
var _Barcode2$9 = Barcode$2;
|
|
1004
1004
|
|
|
1005
|
-
var _Barcode3$
|
|
1005
|
+
var _Barcode3$9 = _interopRequireDefault$r(_Barcode2$9);
|
|
1006
1006
|
|
|
1007
|
-
function _interopRequireDefault$
|
|
1007
|
+
function _interopRequireDefault$r(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
1008
1008
|
|
|
1009
|
-
function _classCallCheck$
|
|
1009
|
+
function _classCallCheck$l(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
1010
1010
|
|
|
1011
|
-
function _possibleConstructorReturn$
|
|
1011
|
+
function _possibleConstructorReturn$h(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
|
1012
1012
|
|
|
1013
|
-
function _inherits$
|
|
1013
|
+
function _inherits$h(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // Encoding documentation:
|
|
1014
1014
|
// https://en.wikipedia.org/wiki/EAN_5#Encoding
|
|
1015
1015
|
|
|
1016
1016
|
var checksum$2 = function checksum(data) {
|
|
@@ -1023,15 +1023,15 @@ var checksum$2 = function checksum(data) {
|
|
|
1023
1023
|
};
|
|
1024
1024
|
|
|
1025
1025
|
var EAN5 = function (_Barcode) {
|
|
1026
|
-
_inherits$
|
|
1026
|
+
_inherits$h(EAN5, _Barcode);
|
|
1027
1027
|
|
|
1028
1028
|
function EAN5(data, options) {
|
|
1029
|
-
_classCallCheck$
|
|
1029
|
+
_classCallCheck$l(this, EAN5);
|
|
1030
1030
|
|
|
1031
|
-
return _possibleConstructorReturn$
|
|
1031
|
+
return _possibleConstructorReturn$h(this, (EAN5.__proto__ || Object.getPrototypeOf(EAN5)).call(this, data, options));
|
|
1032
1032
|
}
|
|
1033
1033
|
|
|
1034
|
-
_createClass$
|
|
1034
|
+
_createClass$g(EAN5, [{
|
|
1035
1035
|
key: 'valid',
|
|
1036
1036
|
value: function valid() {
|
|
1037
1037
|
return this.data.search(/^[0-9]{5}$/) !== -1;
|
|
@@ -1039,7 +1039,7 @@ var EAN5 = function (_Barcode) {
|
|
|
1039
1039
|
}, {
|
|
1040
1040
|
key: 'encode',
|
|
1041
1041
|
value: function encode() {
|
|
1042
|
-
var structure = _constants$
|
|
1042
|
+
var structure = _constants$3.EAN5_STRUCTURE[checksum$2(this.data)];
|
|
1043
1043
|
return {
|
|
1044
1044
|
data: '1011' + (0, _encoder2$3.default)(this.data, structure, '01'),
|
|
1045
1045
|
text: this.text
|
|
@@ -1048,7 +1048,7 @@ var EAN5 = function (_Barcode) {
|
|
|
1048
1048
|
}]);
|
|
1049
1049
|
|
|
1050
1050
|
return EAN5;
|
|
1051
|
-
}(_Barcode3$
|
|
1051
|
+
}(_Barcode3$9.default);
|
|
1052
1052
|
|
|
1053
1053
|
EAN5$1.default = EAN5;
|
|
1054
1054
|
|
|
@@ -1058,37 +1058,37 @@ Object.defineProperty(EAN2$1, "__esModule", {
|
|
|
1058
1058
|
value: true
|
|
1059
1059
|
});
|
|
1060
1060
|
|
|
1061
|
-
var _createClass$
|
|
1061
|
+
var _createClass$f = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
|
1062
1062
|
|
|
1063
|
-
var _constants$
|
|
1063
|
+
var _constants$2 = constants$2;
|
|
1064
1064
|
|
|
1065
1065
|
var _encoder$2 = encoder;
|
|
1066
1066
|
|
|
1067
|
-
var _encoder2$2 = _interopRequireDefault$
|
|
1067
|
+
var _encoder2$2 = _interopRequireDefault$q(_encoder$2);
|
|
1068
1068
|
|
|
1069
|
-
var _Barcode2$
|
|
1069
|
+
var _Barcode2$8 = Barcode$2;
|
|
1070
1070
|
|
|
1071
|
-
var _Barcode3$
|
|
1071
|
+
var _Barcode3$8 = _interopRequireDefault$q(_Barcode2$8);
|
|
1072
1072
|
|
|
1073
|
-
function _interopRequireDefault$
|
|
1073
|
+
function _interopRequireDefault$q(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
1074
1074
|
|
|
1075
|
-
function _classCallCheck$
|
|
1075
|
+
function _classCallCheck$k(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
1076
1076
|
|
|
1077
|
-
function _possibleConstructorReturn$
|
|
1077
|
+
function _possibleConstructorReturn$g(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
|
1078
1078
|
|
|
1079
|
-
function _inherits$
|
|
1079
|
+
function _inherits$g(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // Encoding documentation:
|
|
1080
1080
|
// https://en.wikipedia.org/wiki/EAN_2#Encoding
|
|
1081
1081
|
|
|
1082
1082
|
var EAN2 = function (_Barcode) {
|
|
1083
|
-
_inherits$
|
|
1083
|
+
_inherits$g(EAN2, _Barcode);
|
|
1084
1084
|
|
|
1085
1085
|
function EAN2(data, options) {
|
|
1086
|
-
_classCallCheck$
|
|
1086
|
+
_classCallCheck$k(this, EAN2);
|
|
1087
1087
|
|
|
1088
|
-
return _possibleConstructorReturn$
|
|
1088
|
+
return _possibleConstructorReturn$g(this, (EAN2.__proto__ || Object.getPrototypeOf(EAN2)).call(this, data, options));
|
|
1089
1089
|
}
|
|
1090
1090
|
|
|
1091
|
-
_createClass$
|
|
1091
|
+
_createClass$f(EAN2, [{
|
|
1092
1092
|
key: 'valid',
|
|
1093
1093
|
value: function valid() {
|
|
1094
1094
|
return this.data.search(/^[0-9]{2}$/) !== -1;
|
|
@@ -1097,7 +1097,7 @@ var EAN2 = function (_Barcode) {
|
|
|
1097
1097
|
key: 'encode',
|
|
1098
1098
|
value: function encode() {
|
|
1099
1099
|
// Choose the structure based on the number mod 4
|
|
1100
|
-
var structure = _constants$
|
|
1100
|
+
var structure = _constants$2.EAN2_STRUCTURE[parseInt(this.data) % 4];
|
|
1101
1101
|
return {
|
|
1102
1102
|
// Start bits + Encode the two digits with 01 in between
|
|
1103
1103
|
data: '1011' + (0, _encoder2$2.default)(this.data, structure, '01'),
|
|
@@ -1107,7 +1107,7 @@ var EAN2 = function (_Barcode) {
|
|
|
1107
1107
|
}]);
|
|
1108
1108
|
|
|
1109
1109
|
return EAN2;
|
|
1110
|
-
}(_Barcode3$
|
|
1110
|
+
}(_Barcode3$8.default);
|
|
1111
1111
|
|
|
1112
1112
|
EAN2$1.default = EAN2;
|
|
1113
1113
|
|
|
@@ -1117,39 +1117,39 @@ Object.defineProperty(UPC$1, "__esModule", {
|
|
|
1117
1117
|
value: true
|
|
1118
1118
|
});
|
|
1119
1119
|
|
|
1120
|
-
var _createClass$
|
|
1120
|
+
var _createClass$e = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
|
1121
1121
|
|
|
1122
1122
|
UPC$1.checksum = checksum$1;
|
|
1123
1123
|
|
|
1124
1124
|
var _encoder$1 = encoder;
|
|
1125
1125
|
|
|
1126
|
-
var _encoder2$1 = _interopRequireDefault$
|
|
1126
|
+
var _encoder2$1 = _interopRequireDefault$p(_encoder$1);
|
|
1127
1127
|
|
|
1128
|
-
var _Barcode2$
|
|
1128
|
+
var _Barcode2$7 = Barcode$2;
|
|
1129
1129
|
|
|
1130
|
-
var _Barcode3$
|
|
1130
|
+
var _Barcode3$7 = _interopRequireDefault$p(_Barcode2$7);
|
|
1131
1131
|
|
|
1132
|
-
function _interopRequireDefault$
|
|
1132
|
+
function _interopRequireDefault$p(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
1133
1133
|
|
|
1134
|
-
function _classCallCheck$
|
|
1134
|
+
function _classCallCheck$j(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
1135
1135
|
|
|
1136
|
-
function _possibleConstructorReturn$
|
|
1136
|
+
function _possibleConstructorReturn$f(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
|
1137
1137
|
|
|
1138
|
-
function _inherits$
|
|
1138
|
+
function _inherits$f(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // Encoding documentation:
|
|
1139
1139
|
// https://en.wikipedia.org/wiki/Universal_Product_Code#Encoding
|
|
1140
1140
|
|
|
1141
1141
|
var UPC = function (_Barcode) {
|
|
1142
|
-
_inherits$
|
|
1142
|
+
_inherits$f(UPC, _Barcode);
|
|
1143
1143
|
|
|
1144
1144
|
function UPC(data, options) {
|
|
1145
|
-
_classCallCheck$
|
|
1145
|
+
_classCallCheck$j(this, UPC);
|
|
1146
1146
|
|
|
1147
1147
|
// Add checksum if it does not exist
|
|
1148
1148
|
if (data.search(/^[0-9]{11}$/) !== -1) {
|
|
1149
1149
|
data += checksum$1(data);
|
|
1150
1150
|
}
|
|
1151
1151
|
|
|
1152
|
-
var _this = _possibleConstructorReturn$
|
|
1152
|
+
var _this = _possibleConstructorReturn$f(this, (UPC.__proto__ || Object.getPrototypeOf(UPC)).call(this, data, options));
|
|
1153
1153
|
|
|
1154
1154
|
_this.displayValue = options.displayValue;
|
|
1155
1155
|
|
|
@@ -1165,7 +1165,7 @@ var UPC = function (_Barcode) {
|
|
|
1165
1165
|
return _this;
|
|
1166
1166
|
}
|
|
1167
1167
|
|
|
1168
|
-
_createClass$
|
|
1168
|
+
_createClass$e(UPC, [{
|
|
1169
1169
|
key: "valid",
|
|
1170
1170
|
value: function valid() {
|
|
1171
1171
|
return this.data.search(/^[0-9]{12}$/) !== -1 && this.data[11] == checksum$1(this.data);
|
|
@@ -1255,7 +1255,7 @@ var UPC = function (_Barcode) {
|
|
|
1255
1255
|
}]);
|
|
1256
1256
|
|
|
1257
1257
|
return UPC;
|
|
1258
|
-
}(_Barcode3$
|
|
1258
|
+
}(_Barcode3$7.default);
|
|
1259
1259
|
|
|
1260
1260
|
// Calulate the checksum digit
|
|
1261
1261
|
// https://en.wikipedia.org/wiki/International_Article_Number_(EAN)#Calculation_of_checksum_digit
|
|
@@ -1283,25 +1283,25 @@ Object.defineProperty(UPCE$1, "__esModule", {
|
|
|
1283
1283
|
value: true
|
|
1284
1284
|
});
|
|
1285
1285
|
|
|
1286
|
-
var _createClass$
|
|
1286
|
+
var _createClass$d = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
|
1287
1287
|
|
|
1288
1288
|
var _encoder = encoder;
|
|
1289
1289
|
|
|
1290
|
-
var _encoder2 = _interopRequireDefault$
|
|
1290
|
+
var _encoder2 = _interopRequireDefault$o(_encoder);
|
|
1291
1291
|
|
|
1292
|
-
var _Barcode2$
|
|
1292
|
+
var _Barcode2$6 = Barcode$2;
|
|
1293
1293
|
|
|
1294
|
-
var _Barcode3$
|
|
1294
|
+
var _Barcode3$6 = _interopRequireDefault$o(_Barcode2$6);
|
|
1295
1295
|
|
|
1296
1296
|
var _UPC$1 = UPC$1;
|
|
1297
1297
|
|
|
1298
|
-
function _interopRequireDefault$
|
|
1298
|
+
function _interopRequireDefault$o(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
1299
1299
|
|
|
1300
|
-
function _classCallCheck$
|
|
1300
|
+
function _classCallCheck$i(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
1301
1301
|
|
|
1302
|
-
function _possibleConstructorReturn$
|
|
1302
|
+
function _possibleConstructorReturn$e(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
|
1303
1303
|
|
|
1304
|
-
function _inherits$
|
|
1304
|
+
function _inherits$e(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // Encoding documentation:
|
|
1305
1305
|
// https://en.wikipedia.org/wiki/Universal_Product_Code#Encoding
|
|
1306
1306
|
//
|
|
1307
1307
|
// UPC-E documentation:
|
|
@@ -1312,12 +1312,12 @@ var EXPANSIONS = ["XX00000XXX", "XX10000XXX", "XX20000XXX", "XXX00000XX", "XXXX0
|
|
|
1312
1312
|
var PARITIES = [["EEEOOO", "OOOEEE"], ["EEOEOO", "OOEOEE"], ["EEOOEO", "OOEEOE"], ["EEOOOE", "OOEEEO"], ["EOEEOO", "OEOOEE"], ["EOOEEO", "OEEOOE"], ["EOOOEE", "OEEEOO"], ["EOEOEO", "OEOEOE"], ["EOEOOE", "OEOEEO"], ["EOOEOE", "OEEOEO"]];
|
|
1313
1313
|
|
|
1314
1314
|
var UPCE = function (_Barcode) {
|
|
1315
|
-
_inherits$
|
|
1315
|
+
_inherits$e(UPCE, _Barcode);
|
|
1316
1316
|
|
|
1317
1317
|
function UPCE(data, options) {
|
|
1318
|
-
_classCallCheck$
|
|
1318
|
+
_classCallCheck$i(this, UPCE);
|
|
1319
1319
|
|
|
1320
|
-
var _this = _possibleConstructorReturn$
|
|
1320
|
+
var _this = _possibleConstructorReturn$e(this, (UPCE.__proto__ || Object.getPrototypeOf(UPCE)).call(this, data, options));
|
|
1321
1321
|
// Code may be 6 or 8 digits;
|
|
1322
1322
|
// A 7 digit code is ambiguous as to whether the extra digit
|
|
1323
1323
|
// is a UPC-A check or number system digit.
|
|
@@ -1337,10 +1337,10 @@ var UPCE = function (_Barcode) {
|
|
|
1337
1337
|
_this.isValid = true;
|
|
1338
1338
|
} else {
|
|
1339
1339
|
// checksum mismatch
|
|
1340
|
-
return _possibleConstructorReturn$
|
|
1340
|
+
return _possibleConstructorReturn$e(_this);
|
|
1341
1341
|
}
|
|
1342
1342
|
} else {
|
|
1343
|
-
return _possibleConstructorReturn$
|
|
1343
|
+
return _possibleConstructorReturn$e(_this);
|
|
1344
1344
|
}
|
|
1345
1345
|
|
|
1346
1346
|
_this.displayValue = options.displayValue;
|
|
@@ -1357,7 +1357,7 @@ var UPCE = function (_Barcode) {
|
|
|
1357
1357
|
return _this;
|
|
1358
1358
|
}
|
|
1359
1359
|
|
|
1360
|
-
_createClass$
|
|
1360
|
+
_createClass$d(UPCE, [{
|
|
1361
1361
|
key: 'valid',
|
|
1362
1362
|
value: function valid() {
|
|
1363
1363
|
return this.isValid;
|
|
@@ -1440,7 +1440,7 @@ var UPCE = function (_Barcode) {
|
|
|
1440
1440
|
}]);
|
|
1441
1441
|
|
|
1442
1442
|
return UPCE;
|
|
1443
|
-
}(_Barcode3$
|
|
1443
|
+
}(_Barcode3$6.default);
|
|
1444
1444
|
|
|
1445
1445
|
function expandToUPCA(middleDigits, numberSystem) {
|
|
1446
1446
|
var lastUpcE = parseInt(middleDigits[middleDigits.length - 1]);
|
|
@@ -1470,29 +1470,29 @@ EAN_UPC.UPCE = EAN_UPC.UPC = EAN_UPC.EAN2 = EAN_UPC.EAN5 = EAN_UPC.EAN8 = EAN_UP
|
|
|
1470
1470
|
|
|
1471
1471
|
var _EAN = EAN13$1;
|
|
1472
1472
|
|
|
1473
|
-
var _EAN2 = _interopRequireDefault$
|
|
1473
|
+
var _EAN2 = _interopRequireDefault$n(_EAN);
|
|
1474
1474
|
|
|
1475
1475
|
var _EAN3 = EAN8$1;
|
|
1476
1476
|
|
|
1477
|
-
var _EAN4 = _interopRequireDefault$
|
|
1477
|
+
var _EAN4 = _interopRequireDefault$n(_EAN3);
|
|
1478
1478
|
|
|
1479
1479
|
var _EAN5 = EAN5$1;
|
|
1480
1480
|
|
|
1481
|
-
var _EAN6 = _interopRequireDefault$
|
|
1481
|
+
var _EAN6 = _interopRequireDefault$n(_EAN5);
|
|
1482
1482
|
|
|
1483
1483
|
var _EAN7 = EAN2$1;
|
|
1484
1484
|
|
|
1485
|
-
var _EAN8 = _interopRequireDefault$
|
|
1485
|
+
var _EAN8 = _interopRequireDefault$n(_EAN7);
|
|
1486
1486
|
|
|
1487
1487
|
var _UPC = UPC$1;
|
|
1488
1488
|
|
|
1489
|
-
var _UPC2 = _interopRequireDefault$
|
|
1489
|
+
var _UPC2 = _interopRequireDefault$n(_UPC);
|
|
1490
1490
|
|
|
1491
1491
|
var _UPCE = UPCE$1;
|
|
1492
1492
|
|
|
1493
|
-
var _UPCE2 = _interopRequireDefault$
|
|
1493
|
+
var _UPCE2 = _interopRequireDefault$n(_UPCE);
|
|
1494
1494
|
|
|
1495
|
-
function _interopRequireDefault$
|
|
1495
|
+
function _interopRequireDefault$n(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
1496
1496
|
|
|
1497
1497
|
EAN_UPC.EAN13 = _EAN2.default;
|
|
1498
1498
|
EAN_UPC.EAN8 = _EAN4.default;
|
|
@@ -1505,46 +1505,46 @@ var ITF$2 = {};
|
|
|
1505
1505
|
|
|
1506
1506
|
var ITF$1 = {};
|
|
1507
1507
|
|
|
1508
|
-
var constants = {};
|
|
1508
|
+
var constants$1 = {};
|
|
1509
1509
|
|
|
1510
|
-
Object.defineProperty(constants, "__esModule", {
|
|
1510
|
+
Object.defineProperty(constants$1, "__esModule", {
|
|
1511
1511
|
value: true
|
|
1512
1512
|
});
|
|
1513
|
-
constants.START_BIN = '1010';
|
|
1514
|
-
constants.END_BIN = '11101';
|
|
1513
|
+
constants$1.START_BIN = '1010';
|
|
1514
|
+
constants$1.END_BIN = '11101';
|
|
1515
1515
|
|
|
1516
|
-
constants.BINARIES = ['00110', '10001', '01001', '11000', '00101', '10100', '01100', '00011', '10010', '01010'];
|
|
1516
|
+
constants$1.BINARIES = ['00110', '10001', '01001', '11000', '00101', '10100', '01100', '00011', '10010', '01010'];
|
|
1517
1517
|
|
|
1518
1518
|
Object.defineProperty(ITF$1, "__esModule", {
|
|
1519
1519
|
value: true
|
|
1520
1520
|
});
|
|
1521
1521
|
|
|
1522
|
-
var _createClass$
|
|
1522
|
+
var _createClass$c = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
|
1523
1523
|
|
|
1524
|
-
var _constants = constants;
|
|
1524
|
+
var _constants$1 = constants$1;
|
|
1525
1525
|
|
|
1526
|
-
var _Barcode2$
|
|
1526
|
+
var _Barcode2$5 = Barcode$2;
|
|
1527
1527
|
|
|
1528
|
-
var _Barcode3$
|
|
1528
|
+
var _Barcode3$5 = _interopRequireDefault$m(_Barcode2$5);
|
|
1529
1529
|
|
|
1530
|
-
function _interopRequireDefault$
|
|
1530
|
+
function _interopRequireDefault$m(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
1531
1531
|
|
|
1532
|
-
function _classCallCheck$
|
|
1532
|
+
function _classCallCheck$h(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
1533
1533
|
|
|
1534
|
-
function _possibleConstructorReturn$
|
|
1534
|
+
function _possibleConstructorReturn$d(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
|
1535
1535
|
|
|
1536
|
-
function _inherits$
|
|
1536
|
+
function _inherits$d(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
|
1537
1537
|
|
|
1538
1538
|
var ITF = function (_Barcode) {
|
|
1539
|
-
_inherits$
|
|
1539
|
+
_inherits$d(ITF, _Barcode);
|
|
1540
1540
|
|
|
1541
1541
|
function ITF() {
|
|
1542
|
-
_classCallCheck$
|
|
1542
|
+
_classCallCheck$h(this, ITF);
|
|
1543
1543
|
|
|
1544
|
-
return _possibleConstructorReturn$
|
|
1544
|
+
return _possibleConstructorReturn$d(this, (ITF.__proto__ || Object.getPrototypeOf(ITF)).apply(this, arguments));
|
|
1545
1545
|
}
|
|
1546
1546
|
|
|
1547
|
-
_createClass$
|
|
1547
|
+
_createClass$c(ITF, [{
|
|
1548
1548
|
key: 'valid',
|
|
1549
1549
|
value: function valid() {
|
|
1550
1550
|
return this.data.search(/^([0-9]{2})+$/) !== -1;
|
|
@@ -1560,7 +1560,7 @@ var ITF = function (_Barcode) {
|
|
|
1560
1560
|
}).join('');
|
|
1561
1561
|
|
|
1562
1562
|
return {
|
|
1563
|
-
data: _constants.START_BIN + encoded + _constants.END_BIN,
|
|
1563
|
+
data: _constants$1.START_BIN + encoded + _constants$1.END_BIN,
|
|
1564
1564
|
text: this.text
|
|
1565
1565
|
};
|
|
1566
1566
|
}
|
|
@@ -1570,16 +1570,16 @@ var ITF = function (_Barcode) {
|
|
|
1570
1570
|
}, {
|
|
1571
1571
|
key: 'encodePair',
|
|
1572
1572
|
value: function encodePair(pair) {
|
|
1573
|
-
var second = _constants.BINARIES[pair[1]];
|
|
1573
|
+
var second = _constants$1.BINARIES[pair[1]];
|
|
1574
1574
|
|
|
1575
|
-
return _constants.BINARIES[pair[0]].split('').map(function (first, idx) {
|
|
1575
|
+
return _constants$1.BINARIES[pair[0]].split('').map(function (first, idx) {
|
|
1576
1576
|
return (first === '1' ? '111' : '1') + (second[idx] === '1' ? '000' : '0');
|
|
1577
1577
|
}).join('');
|
|
1578
1578
|
}
|
|
1579
1579
|
}]);
|
|
1580
1580
|
|
|
1581
1581
|
return ITF;
|
|
1582
|
-
}(_Barcode3$
|
|
1582
|
+
}(_Barcode3$5.default);
|
|
1583
1583
|
|
|
1584
1584
|
ITF$1.default = ITF;
|
|
1585
1585
|
|
|
@@ -1589,19 +1589,19 @@ Object.defineProperty(ITF14$1, "__esModule", {
|
|
|
1589
1589
|
value: true
|
|
1590
1590
|
});
|
|
1591
1591
|
|
|
1592
|
-
var _createClass$
|
|
1592
|
+
var _createClass$b = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
|
1593
1593
|
|
|
1594
1594
|
var _ITF2$1 = ITF$1;
|
|
1595
1595
|
|
|
1596
|
-
var _ITF3$1 = _interopRequireDefault$
|
|
1596
|
+
var _ITF3$1 = _interopRequireDefault$l(_ITF2$1);
|
|
1597
1597
|
|
|
1598
|
-
function _interopRequireDefault$
|
|
1598
|
+
function _interopRequireDefault$l(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
1599
1599
|
|
|
1600
|
-
function _classCallCheck$
|
|
1600
|
+
function _classCallCheck$g(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
1601
1601
|
|
|
1602
|
-
function _possibleConstructorReturn$
|
|
1602
|
+
function _possibleConstructorReturn$c(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
|
1603
1603
|
|
|
1604
|
-
function _inherits$
|
|
1604
|
+
function _inherits$c(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
|
1605
1605
|
|
|
1606
1606
|
// Calculate the checksum digit
|
|
1607
1607
|
var checksum = function checksum(data) {
|
|
@@ -1615,19 +1615,19 @@ var checksum = function checksum(data) {
|
|
|
1615
1615
|
};
|
|
1616
1616
|
|
|
1617
1617
|
var ITF14 = function (_ITF) {
|
|
1618
|
-
_inherits$
|
|
1618
|
+
_inherits$c(ITF14, _ITF);
|
|
1619
1619
|
|
|
1620
1620
|
function ITF14(data, options) {
|
|
1621
|
-
_classCallCheck$
|
|
1621
|
+
_classCallCheck$g(this, ITF14);
|
|
1622
1622
|
|
|
1623
1623
|
// Add checksum if it does not exist
|
|
1624
1624
|
if (data.search(/^[0-9]{13}$/) !== -1) {
|
|
1625
1625
|
data += checksum(data);
|
|
1626
1626
|
}
|
|
1627
|
-
return _possibleConstructorReturn$
|
|
1627
|
+
return _possibleConstructorReturn$c(this, (ITF14.__proto__ || Object.getPrototypeOf(ITF14)).call(this, data, options));
|
|
1628
1628
|
}
|
|
1629
1629
|
|
|
1630
|
-
_createClass$
|
|
1630
|
+
_createClass$b(ITF14, [{
|
|
1631
1631
|
key: 'valid',
|
|
1632
1632
|
value: function valid() {
|
|
1633
1633
|
return this.data.search(/^[0-9]{14}$/) !== -1 && +this.data[13] === checksum(this.data);
|
|
@@ -1646,13 +1646,13 @@ ITF$2.ITF14 = ITF$2.ITF = undefined;
|
|
|
1646
1646
|
|
|
1647
1647
|
var _ITF$1 = ITF$1;
|
|
1648
1648
|
|
|
1649
|
-
var _ITF2 = _interopRequireDefault$
|
|
1649
|
+
var _ITF2 = _interopRequireDefault$k(_ITF$1);
|
|
1650
1650
|
|
|
1651
1651
|
var _ITF3 = ITF14$1;
|
|
1652
1652
|
|
|
1653
|
-
var _ITF4 = _interopRequireDefault$
|
|
1653
|
+
var _ITF4 = _interopRequireDefault$k(_ITF3);
|
|
1654
1654
|
|
|
1655
|
-
function _interopRequireDefault$
|
|
1655
|
+
function _interopRequireDefault$k(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
1656
1656
|
|
|
1657
1657
|
ITF$2.ITF = _ITF2.default;
|
|
1658
1658
|
ITF$2.ITF14 = _ITF4.default;
|
|
@@ -1665,31 +1665,31 @@ Object.defineProperty(MSI$1, "__esModule", {
|
|
|
1665
1665
|
value: true
|
|
1666
1666
|
});
|
|
1667
1667
|
|
|
1668
|
-
var _createClass$
|
|
1668
|
+
var _createClass$a = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
|
1669
1669
|
|
|
1670
|
-
var _Barcode2$
|
|
1670
|
+
var _Barcode2$4 = Barcode$2;
|
|
1671
1671
|
|
|
1672
|
-
var _Barcode3$
|
|
1672
|
+
var _Barcode3$4 = _interopRequireDefault$j(_Barcode2$4);
|
|
1673
1673
|
|
|
1674
|
-
function _interopRequireDefault$
|
|
1674
|
+
function _interopRequireDefault$j(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
1675
1675
|
|
|
1676
|
-
function _classCallCheck$
|
|
1676
|
+
function _classCallCheck$f(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
1677
1677
|
|
|
1678
|
-
function _possibleConstructorReturn$
|
|
1678
|
+
function _possibleConstructorReturn$b(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
|
1679
1679
|
|
|
1680
|
-
function _inherits$
|
|
1680
|
+
function _inherits$b(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // Encoding documentation
|
|
1681
1681
|
// https://en.wikipedia.org/wiki/MSI_Barcode#Character_set_and_binary_lookup
|
|
1682
1682
|
|
|
1683
1683
|
var MSI = function (_Barcode) {
|
|
1684
|
-
_inherits$
|
|
1684
|
+
_inherits$b(MSI, _Barcode);
|
|
1685
1685
|
|
|
1686
1686
|
function MSI(data, options) {
|
|
1687
|
-
_classCallCheck$
|
|
1687
|
+
_classCallCheck$f(this, MSI);
|
|
1688
1688
|
|
|
1689
|
-
return _possibleConstructorReturn$
|
|
1689
|
+
return _possibleConstructorReturn$b(this, (MSI.__proto__ || Object.getPrototypeOf(MSI)).call(this, data, options));
|
|
1690
1690
|
}
|
|
1691
1691
|
|
|
1692
|
-
_createClass$
|
|
1692
|
+
_createClass$a(MSI, [{
|
|
1693
1693
|
key: "encode",
|
|
1694
1694
|
value: function encode() {
|
|
1695
1695
|
// Start bits
|
|
@@ -1723,7 +1723,7 @@ var MSI = function (_Barcode) {
|
|
|
1723
1723
|
}]);
|
|
1724
1724
|
|
|
1725
1725
|
return MSI;
|
|
1726
|
-
}(_Barcode3$
|
|
1726
|
+
}(_Barcode3$4.default);
|
|
1727
1727
|
|
|
1728
1728
|
function addZeroes(number, n) {
|
|
1729
1729
|
for (var i = 0; i < n; i++) {
|
|
@@ -1772,25 +1772,25 @@ Object.defineProperty(MSI10$1, "__esModule", {
|
|
|
1772
1772
|
|
|
1773
1773
|
var _MSI2$4 = MSI$1;
|
|
1774
1774
|
|
|
1775
|
-
var _MSI3$4 = _interopRequireDefault$
|
|
1775
|
+
var _MSI3$4 = _interopRequireDefault$i(_MSI2$4);
|
|
1776
1776
|
|
|
1777
1777
|
var _checksums$3 = checksums;
|
|
1778
1778
|
|
|
1779
|
-
function _interopRequireDefault$
|
|
1779
|
+
function _interopRequireDefault$i(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
1780
1780
|
|
|
1781
|
-
function _classCallCheck$
|
|
1781
|
+
function _classCallCheck$e(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
1782
1782
|
|
|
1783
|
-
function _possibleConstructorReturn$
|
|
1783
|
+
function _possibleConstructorReturn$a(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
|
1784
1784
|
|
|
1785
|
-
function _inherits$
|
|
1785
|
+
function _inherits$a(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
|
1786
1786
|
|
|
1787
1787
|
var MSI10 = function (_MSI) {
|
|
1788
|
-
_inherits$
|
|
1788
|
+
_inherits$a(MSI10, _MSI);
|
|
1789
1789
|
|
|
1790
1790
|
function MSI10(data, options) {
|
|
1791
|
-
_classCallCheck$
|
|
1791
|
+
_classCallCheck$e(this, MSI10);
|
|
1792
1792
|
|
|
1793
|
-
return _possibleConstructorReturn$
|
|
1793
|
+
return _possibleConstructorReturn$a(this, (MSI10.__proto__ || Object.getPrototypeOf(MSI10)).call(this, data + (0, _checksums$3.mod10)(data), options));
|
|
1794
1794
|
}
|
|
1795
1795
|
|
|
1796
1796
|
return MSI10;
|
|
@@ -1806,25 +1806,25 @@ Object.defineProperty(MSI11$1, "__esModule", {
|
|
|
1806
1806
|
|
|
1807
1807
|
var _MSI2$3 = MSI$1;
|
|
1808
1808
|
|
|
1809
|
-
var _MSI3$3 = _interopRequireDefault$
|
|
1809
|
+
var _MSI3$3 = _interopRequireDefault$h(_MSI2$3);
|
|
1810
1810
|
|
|
1811
1811
|
var _checksums$2 = checksums;
|
|
1812
1812
|
|
|
1813
|
-
function _interopRequireDefault$
|
|
1813
|
+
function _interopRequireDefault$h(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
1814
1814
|
|
|
1815
|
-
function _classCallCheck$
|
|
1815
|
+
function _classCallCheck$d(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
1816
1816
|
|
|
1817
|
-
function _possibleConstructorReturn$
|
|
1817
|
+
function _possibleConstructorReturn$9(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
|
1818
1818
|
|
|
1819
|
-
function _inherits$
|
|
1819
|
+
function _inherits$9(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
|
1820
1820
|
|
|
1821
1821
|
var MSI11 = function (_MSI) {
|
|
1822
|
-
_inherits$
|
|
1822
|
+
_inherits$9(MSI11, _MSI);
|
|
1823
1823
|
|
|
1824
1824
|
function MSI11(data, options) {
|
|
1825
|
-
_classCallCheck$
|
|
1825
|
+
_classCallCheck$d(this, MSI11);
|
|
1826
1826
|
|
|
1827
|
-
return _possibleConstructorReturn$
|
|
1827
|
+
return _possibleConstructorReturn$9(this, (MSI11.__proto__ || Object.getPrototypeOf(MSI11)).call(this, data + (0, _checksums$2.mod11)(data), options));
|
|
1828
1828
|
}
|
|
1829
1829
|
|
|
1830
1830
|
return MSI11;
|
|
@@ -1840,27 +1840,27 @@ Object.defineProperty(MSI1010$1, "__esModule", {
|
|
|
1840
1840
|
|
|
1841
1841
|
var _MSI2$2 = MSI$1;
|
|
1842
1842
|
|
|
1843
|
-
var _MSI3$2 = _interopRequireDefault$
|
|
1843
|
+
var _MSI3$2 = _interopRequireDefault$g(_MSI2$2);
|
|
1844
1844
|
|
|
1845
1845
|
var _checksums$1 = checksums;
|
|
1846
1846
|
|
|
1847
|
-
function _interopRequireDefault$
|
|
1847
|
+
function _interopRequireDefault$g(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
1848
1848
|
|
|
1849
|
-
function _classCallCheck$
|
|
1849
|
+
function _classCallCheck$c(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
1850
1850
|
|
|
1851
|
-
function _possibleConstructorReturn$
|
|
1851
|
+
function _possibleConstructorReturn$8(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
|
1852
1852
|
|
|
1853
|
-
function _inherits$
|
|
1853
|
+
function _inherits$8(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
|
1854
1854
|
|
|
1855
1855
|
var MSI1010 = function (_MSI) {
|
|
1856
|
-
_inherits$
|
|
1856
|
+
_inherits$8(MSI1010, _MSI);
|
|
1857
1857
|
|
|
1858
1858
|
function MSI1010(data, options) {
|
|
1859
|
-
_classCallCheck$
|
|
1859
|
+
_classCallCheck$c(this, MSI1010);
|
|
1860
1860
|
|
|
1861
1861
|
data += (0, _checksums$1.mod10)(data);
|
|
1862
1862
|
data += (0, _checksums$1.mod10)(data);
|
|
1863
|
-
return _possibleConstructorReturn$
|
|
1863
|
+
return _possibleConstructorReturn$8(this, (MSI1010.__proto__ || Object.getPrototypeOf(MSI1010)).call(this, data, options));
|
|
1864
1864
|
}
|
|
1865
1865
|
|
|
1866
1866
|
return MSI1010;
|
|
@@ -1876,27 +1876,27 @@ Object.defineProperty(MSI1110$1, "__esModule", {
|
|
|
1876
1876
|
|
|
1877
1877
|
var _MSI2$1 = MSI$1;
|
|
1878
1878
|
|
|
1879
|
-
var _MSI3$1 = _interopRequireDefault$
|
|
1879
|
+
var _MSI3$1 = _interopRequireDefault$f(_MSI2$1);
|
|
1880
1880
|
|
|
1881
1881
|
var _checksums = checksums;
|
|
1882
1882
|
|
|
1883
|
-
function _interopRequireDefault$
|
|
1883
|
+
function _interopRequireDefault$f(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
1884
1884
|
|
|
1885
|
-
function _classCallCheck$
|
|
1885
|
+
function _classCallCheck$b(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
1886
1886
|
|
|
1887
|
-
function _possibleConstructorReturn$
|
|
1887
|
+
function _possibleConstructorReturn$7(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
|
1888
1888
|
|
|
1889
|
-
function _inherits$
|
|
1889
|
+
function _inherits$7(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
|
1890
1890
|
|
|
1891
1891
|
var MSI1110 = function (_MSI) {
|
|
1892
|
-
_inherits$
|
|
1892
|
+
_inherits$7(MSI1110, _MSI);
|
|
1893
1893
|
|
|
1894
1894
|
function MSI1110(data, options) {
|
|
1895
|
-
_classCallCheck$
|
|
1895
|
+
_classCallCheck$b(this, MSI1110);
|
|
1896
1896
|
|
|
1897
1897
|
data += (0, _checksums.mod11)(data);
|
|
1898
1898
|
data += (0, _checksums.mod10)(data);
|
|
1899
|
-
return _possibleConstructorReturn$
|
|
1899
|
+
return _possibleConstructorReturn$7(this, (MSI1110.__proto__ || Object.getPrototypeOf(MSI1110)).call(this, data, options));
|
|
1900
1900
|
}
|
|
1901
1901
|
|
|
1902
1902
|
return MSI1110;
|
|
@@ -1911,25 +1911,25 @@ MSI$2.MSI1110 = MSI$2.MSI1010 = MSI$2.MSI11 = MSI$2.MSI10 = MSI$2.MSI = undefine
|
|
|
1911
1911
|
|
|
1912
1912
|
var _MSI$1 = MSI$1;
|
|
1913
1913
|
|
|
1914
|
-
var _MSI2 = _interopRequireDefault$
|
|
1914
|
+
var _MSI2 = _interopRequireDefault$e(_MSI$1);
|
|
1915
1915
|
|
|
1916
1916
|
var _MSI3 = MSI10$1;
|
|
1917
1917
|
|
|
1918
|
-
var _MSI4 = _interopRequireDefault$
|
|
1918
|
+
var _MSI4 = _interopRequireDefault$e(_MSI3);
|
|
1919
1919
|
|
|
1920
1920
|
var _MSI5 = MSI11$1;
|
|
1921
1921
|
|
|
1922
|
-
var _MSI6 = _interopRequireDefault$
|
|
1922
|
+
var _MSI6 = _interopRequireDefault$e(_MSI5);
|
|
1923
1923
|
|
|
1924
1924
|
var _MSI7 = MSI1010$1;
|
|
1925
1925
|
|
|
1926
|
-
var _MSI8 = _interopRequireDefault$
|
|
1926
|
+
var _MSI8 = _interopRequireDefault$e(_MSI7);
|
|
1927
1927
|
|
|
1928
1928
|
var _MSI9 = MSI1110$1;
|
|
1929
1929
|
|
|
1930
|
-
var _MSI10 = _interopRequireDefault$
|
|
1930
|
+
var _MSI10 = _interopRequireDefault$e(_MSI9);
|
|
1931
1931
|
|
|
1932
|
-
function _interopRequireDefault$
|
|
1932
|
+
function _interopRequireDefault$e(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
1933
1933
|
|
|
1934
1934
|
MSI$2.MSI = _MSI2.default;
|
|
1935
1935
|
MSI$2.MSI10 = _MSI4.default;
|
|
@@ -1944,34 +1944,34 @@ Object.defineProperty(pharmacode$1, "__esModule", {
|
|
|
1944
1944
|
});
|
|
1945
1945
|
pharmacode$1.pharmacode = undefined;
|
|
1946
1946
|
|
|
1947
|
-
var _createClass$
|
|
1947
|
+
var _createClass$9 = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
|
1948
1948
|
|
|
1949
|
-
var _Barcode2$
|
|
1949
|
+
var _Barcode2$3 = Barcode$2;
|
|
1950
1950
|
|
|
1951
|
-
var _Barcode3$
|
|
1951
|
+
var _Barcode3$3 = _interopRequireDefault$d(_Barcode2$3);
|
|
1952
1952
|
|
|
1953
|
-
function _interopRequireDefault$
|
|
1953
|
+
function _interopRequireDefault$d(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
1954
1954
|
|
|
1955
|
-
function _classCallCheck$
|
|
1955
|
+
function _classCallCheck$a(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
1956
1956
|
|
|
1957
|
-
function _possibleConstructorReturn$
|
|
1957
|
+
function _possibleConstructorReturn$6(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
|
1958
1958
|
|
|
1959
|
-
function _inherits$
|
|
1959
|
+
function _inherits$6(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // Encoding documentation
|
|
1960
1960
|
// http://www.gomaro.ch/ftproot/Laetus_PHARMA-CODE.pdf
|
|
1961
1961
|
|
|
1962
1962
|
var pharmacode = function (_Barcode) {
|
|
1963
|
-
_inherits$
|
|
1963
|
+
_inherits$6(pharmacode, _Barcode);
|
|
1964
1964
|
|
|
1965
1965
|
function pharmacode(data, options) {
|
|
1966
|
-
_classCallCheck$
|
|
1966
|
+
_classCallCheck$a(this, pharmacode);
|
|
1967
1967
|
|
|
1968
|
-
var _this = _possibleConstructorReturn$
|
|
1968
|
+
var _this = _possibleConstructorReturn$6(this, (pharmacode.__proto__ || Object.getPrototypeOf(pharmacode)).call(this, data, options));
|
|
1969
1969
|
|
|
1970
1970
|
_this.number = parseInt(data, 10);
|
|
1971
1971
|
return _this;
|
|
1972
1972
|
}
|
|
1973
1973
|
|
|
1974
|
-
_createClass$
|
|
1974
|
+
_createClass$9(pharmacode, [{
|
|
1975
1975
|
key: "encode",
|
|
1976
1976
|
value: function encode() {
|
|
1977
1977
|
var z = this.number;
|
|
@@ -2007,7 +2007,7 @@ var pharmacode = function (_Barcode) {
|
|
|
2007
2007
|
}]);
|
|
2008
2008
|
|
|
2009
2009
|
return pharmacode;
|
|
2010
|
-
}(_Barcode3$
|
|
2010
|
+
}(_Barcode3$3.default);
|
|
2011
2011
|
|
|
2012
2012
|
pharmacode$1.pharmacode = pharmacode;
|
|
2013
2013
|
|
|
@@ -2018,38 +2018,38 @@ Object.defineProperty(codabar$1, "__esModule", {
|
|
|
2018
2018
|
});
|
|
2019
2019
|
codabar$1.codabar = undefined;
|
|
2020
2020
|
|
|
2021
|
-
var _createClass$
|
|
2021
|
+
var _createClass$8 = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
|
2022
2022
|
|
|
2023
|
-
var _Barcode2$
|
|
2023
|
+
var _Barcode2$2 = Barcode$2;
|
|
2024
2024
|
|
|
2025
|
-
var _Barcode3$
|
|
2025
|
+
var _Barcode3$2 = _interopRequireDefault$c(_Barcode2$2);
|
|
2026
2026
|
|
|
2027
|
-
function _interopRequireDefault$
|
|
2027
|
+
function _interopRequireDefault$c(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
2028
2028
|
|
|
2029
|
-
function _classCallCheck$
|
|
2029
|
+
function _classCallCheck$9(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
2030
2030
|
|
|
2031
|
-
function _possibleConstructorReturn$
|
|
2031
|
+
function _possibleConstructorReturn$5(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
|
2032
2032
|
|
|
2033
|
-
function _inherits$
|
|
2033
|
+
function _inherits$5(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // Encoding specification:
|
|
2034
2034
|
// http://www.barcodeisland.com/codabar.phtml
|
|
2035
2035
|
|
|
2036
2036
|
var codabar = function (_Barcode) {
|
|
2037
|
-
_inherits$
|
|
2037
|
+
_inherits$5(codabar, _Barcode);
|
|
2038
2038
|
|
|
2039
2039
|
function codabar(data, options) {
|
|
2040
|
-
_classCallCheck$
|
|
2040
|
+
_classCallCheck$9(this, codabar);
|
|
2041
2041
|
|
|
2042
2042
|
if (data.search(/^[0-9\-\$\:\.\+\/]+$/) === 0) {
|
|
2043
2043
|
data = "A" + data + "A";
|
|
2044
2044
|
}
|
|
2045
2045
|
|
|
2046
|
-
var _this = _possibleConstructorReturn$
|
|
2046
|
+
var _this = _possibleConstructorReturn$5(this, (codabar.__proto__ || Object.getPrototypeOf(codabar)).call(this, data.toUpperCase(), options));
|
|
2047
2047
|
|
|
2048
2048
|
_this.text = _this.options.text || _this.text.replace(/[A-D]/g, '');
|
|
2049
2049
|
return _this;
|
|
2050
2050
|
}
|
|
2051
2051
|
|
|
2052
|
-
_createClass$
|
|
2052
|
+
_createClass$8(codabar, [{
|
|
2053
2053
|
key: "valid",
|
|
2054
2054
|
value: function valid() {
|
|
2055
2055
|
return this.data.search(/^[A-D][0-9\-\$\:\.\+\/]+[A-D]$/) !== -1;
|
|
@@ -2100,10 +2100,288 @@ var codabar = function (_Barcode) {
|
|
|
2100
2100
|
}]);
|
|
2101
2101
|
|
|
2102
2102
|
return codabar;
|
|
2103
|
-
}(_Barcode3$
|
|
2103
|
+
}(_Barcode3$2.default);
|
|
2104
2104
|
|
|
2105
2105
|
codabar$1.codabar = codabar;
|
|
2106
2106
|
|
|
2107
|
+
var CODE93$2 = {};
|
|
2108
|
+
|
|
2109
|
+
var CODE93$1 = {};
|
|
2110
|
+
|
|
2111
|
+
var constants = {};
|
|
2112
|
+
|
|
2113
|
+
Object.defineProperty(constants, "__esModule", {
|
|
2114
|
+
value: true
|
|
2115
|
+
});
|
|
2116
|
+
// The position in the array is the (checksum) value
|
|
2117
|
+
constants.SYMBOLS = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '-', '.', ' ', '$', '/', '+', '%',
|
|
2118
|
+
// Only used for csum and multi-symbols character encodings
|
|
2119
|
+
'($)', '(%)', '(/)', '(+)',
|
|
2120
|
+
// Start/Stop
|
|
2121
|
+
'\xff'];
|
|
2122
|
+
|
|
2123
|
+
// Order matches SYMBOLS array
|
|
2124
|
+
constants.BINARIES = ['100010100', '101001000', '101000100', '101000010', '100101000', '100100100', '100100010', '101010000', '100010010', '100001010', '110101000', '110100100', '110100010', '110010100', '110010010', '110001010', '101101000', '101100100', '101100010', '100110100', '100011010', '101011000', '101001100', '101000110', '100101100', '100010110', '110110100', '110110010', '110101100', '110100110', '110010110', '110011010', '101101100', '101100110', '100110110', '100111010', '100101110', '111010100', '111010010', '111001010', '101101110', '101110110', '110101110', '100100110', '111011010', '111010110', '100110010', '101011110'];
|
|
2125
|
+
|
|
2126
|
+
// Multi-symbol characters (Full ASCII Code 93)
|
|
2127
|
+
constants.MULTI_SYMBOLS = {
|
|
2128
|
+
'\x00': ['(%)', 'U'],
|
|
2129
|
+
'\x01': ['($)', 'A'],
|
|
2130
|
+
'\x02': ['($)', 'B'],
|
|
2131
|
+
'\x03': ['($)', 'C'],
|
|
2132
|
+
'\x04': ['($)', 'D'],
|
|
2133
|
+
'\x05': ['($)', 'E'],
|
|
2134
|
+
'\x06': ['($)', 'F'],
|
|
2135
|
+
'\x07': ['($)', 'G'],
|
|
2136
|
+
'\x08': ['($)', 'H'],
|
|
2137
|
+
'\x09': ['($)', 'I'],
|
|
2138
|
+
'\x0a': ['($)', 'J'],
|
|
2139
|
+
'\x0b': ['($)', 'K'],
|
|
2140
|
+
'\x0c': ['($)', 'L'],
|
|
2141
|
+
'\x0d': ['($)', 'M'],
|
|
2142
|
+
'\x0e': ['($)', 'N'],
|
|
2143
|
+
'\x0f': ['($)', 'O'],
|
|
2144
|
+
'\x10': ['($)', 'P'],
|
|
2145
|
+
'\x11': ['($)', 'Q'],
|
|
2146
|
+
'\x12': ['($)', 'R'],
|
|
2147
|
+
'\x13': ['($)', 'S'],
|
|
2148
|
+
'\x14': ['($)', 'T'],
|
|
2149
|
+
'\x15': ['($)', 'U'],
|
|
2150
|
+
'\x16': ['($)', 'V'],
|
|
2151
|
+
'\x17': ['($)', 'W'],
|
|
2152
|
+
'\x18': ['($)', 'X'],
|
|
2153
|
+
'\x19': ['($)', 'Y'],
|
|
2154
|
+
'\x1a': ['($)', 'Z'],
|
|
2155
|
+
'\x1b': ['(%)', 'A'],
|
|
2156
|
+
'\x1c': ['(%)', 'B'],
|
|
2157
|
+
'\x1d': ['(%)', 'C'],
|
|
2158
|
+
'\x1e': ['(%)', 'D'],
|
|
2159
|
+
'\x1f': ['(%)', 'E'],
|
|
2160
|
+
'!': ['(/)', 'A'],
|
|
2161
|
+
'"': ['(/)', 'B'],
|
|
2162
|
+
'#': ['(/)', 'C'],
|
|
2163
|
+
'&': ['(/)', 'F'],
|
|
2164
|
+
'\'': ['(/)', 'G'],
|
|
2165
|
+
'(': ['(/)', 'H'],
|
|
2166
|
+
')': ['(/)', 'I'],
|
|
2167
|
+
'*': ['(/)', 'J'],
|
|
2168
|
+
',': ['(/)', 'L'],
|
|
2169
|
+
':': ['(/)', 'Z'],
|
|
2170
|
+
';': ['(%)', 'F'],
|
|
2171
|
+
'<': ['(%)', 'G'],
|
|
2172
|
+
'=': ['(%)', 'H'],
|
|
2173
|
+
'>': ['(%)', 'I'],
|
|
2174
|
+
'?': ['(%)', 'J'],
|
|
2175
|
+
'@': ['(%)', 'V'],
|
|
2176
|
+
'[': ['(%)', 'K'],
|
|
2177
|
+
'\\': ['(%)', 'L'],
|
|
2178
|
+
']': ['(%)', 'M'],
|
|
2179
|
+
'^': ['(%)', 'N'],
|
|
2180
|
+
'_': ['(%)', 'O'],
|
|
2181
|
+
'`': ['(%)', 'W'],
|
|
2182
|
+
'a': ['(+)', 'A'],
|
|
2183
|
+
'b': ['(+)', 'B'],
|
|
2184
|
+
'c': ['(+)', 'C'],
|
|
2185
|
+
'd': ['(+)', 'D'],
|
|
2186
|
+
'e': ['(+)', 'E'],
|
|
2187
|
+
'f': ['(+)', 'F'],
|
|
2188
|
+
'g': ['(+)', 'G'],
|
|
2189
|
+
'h': ['(+)', 'H'],
|
|
2190
|
+
'i': ['(+)', 'I'],
|
|
2191
|
+
'j': ['(+)', 'J'],
|
|
2192
|
+
'k': ['(+)', 'K'],
|
|
2193
|
+
'l': ['(+)', 'L'],
|
|
2194
|
+
'm': ['(+)', 'M'],
|
|
2195
|
+
'n': ['(+)', 'N'],
|
|
2196
|
+
'o': ['(+)', 'O'],
|
|
2197
|
+
'p': ['(+)', 'P'],
|
|
2198
|
+
'q': ['(+)', 'Q'],
|
|
2199
|
+
'r': ['(+)', 'R'],
|
|
2200
|
+
's': ['(+)', 'S'],
|
|
2201
|
+
't': ['(+)', 'T'],
|
|
2202
|
+
'u': ['(+)', 'U'],
|
|
2203
|
+
'v': ['(+)', 'V'],
|
|
2204
|
+
'w': ['(+)', 'W'],
|
|
2205
|
+
'x': ['(+)', 'X'],
|
|
2206
|
+
'y': ['(+)', 'Y'],
|
|
2207
|
+
'z': ['(+)', 'Z'],
|
|
2208
|
+
'{': ['(%)', 'P'],
|
|
2209
|
+
'|': ['(%)', 'Q'],
|
|
2210
|
+
'}': ['(%)', 'R'],
|
|
2211
|
+
'~': ['(%)', 'S'],
|
|
2212
|
+
'\x7f': ['(%)', 'T']
|
|
2213
|
+
};
|
|
2214
|
+
|
|
2215
|
+
Object.defineProperty(CODE93$1, "__esModule", {
|
|
2216
|
+
value: true
|
|
2217
|
+
});
|
|
2218
|
+
|
|
2219
|
+
var _createClass$7 = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
|
2220
|
+
|
|
2221
|
+
var _constants = constants;
|
|
2222
|
+
|
|
2223
|
+
var _Barcode2$1 = Barcode$2;
|
|
2224
|
+
|
|
2225
|
+
var _Barcode3$1 = _interopRequireDefault$b(_Barcode2$1);
|
|
2226
|
+
|
|
2227
|
+
function _interopRequireDefault$b(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
2228
|
+
|
|
2229
|
+
function _classCallCheck$8(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
2230
|
+
|
|
2231
|
+
function _possibleConstructorReturn$4(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
|
2232
|
+
|
|
2233
|
+
function _inherits$4(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // Encoding documentation:
|
|
2234
|
+
// https://en.wikipedia.org/wiki/Code_93#Detailed_outline
|
|
2235
|
+
|
|
2236
|
+
var CODE93 = function (_Barcode) {
|
|
2237
|
+
_inherits$4(CODE93, _Barcode);
|
|
2238
|
+
|
|
2239
|
+
function CODE93(data, options) {
|
|
2240
|
+
_classCallCheck$8(this, CODE93);
|
|
2241
|
+
|
|
2242
|
+
return _possibleConstructorReturn$4(this, (CODE93.__proto__ || Object.getPrototypeOf(CODE93)).call(this, data, options));
|
|
2243
|
+
}
|
|
2244
|
+
|
|
2245
|
+
_createClass$7(CODE93, [{
|
|
2246
|
+
key: 'valid',
|
|
2247
|
+
value: function valid() {
|
|
2248
|
+
return (/^[0-9A-Z\-. $/+%]+$/.test(this.data)
|
|
2249
|
+
);
|
|
2250
|
+
}
|
|
2251
|
+
}, {
|
|
2252
|
+
key: 'encode',
|
|
2253
|
+
value: function encode() {
|
|
2254
|
+
var symbols = this.data.split('').flatMap(function (c) {
|
|
2255
|
+
return _constants.MULTI_SYMBOLS[c] || c;
|
|
2256
|
+
});
|
|
2257
|
+
var encoded = symbols.map(function (s) {
|
|
2258
|
+
return CODE93.getEncoding(s);
|
|
2259
|
+
}).join('');
|
|
2260
|
+
|
|
2261
|
+
// Compute checksum symbols
|
|
2262
|
+
var csumC = CODE93.checksum(symbols, 20);
|
|
2263
|
+
var csumK = CODE93.checksum(symbols.concat(csumC), 15);
|
|
2264
|
+
|
|
2265
|
+
return {
|
|
2266
|
+
text: this.text,
|
|
2267
|
+
data:
|
|
2268
|
+
// Add the start bits
|
|
2269
|
+
CODE93.getEncoding('\xff') +
|
|
2270
|
+
// Add the encoded bits
|
|
2271
|
+
encoded +
|
|
2272
|
+
// Add the checksum
|
|
2273
|
+
CODE93.getEncoding(csumC) + CODE93.getEncoding(csumK) +
|
|
2274
|
+
// Add the stop bits
|
|
2275
|
+
CODE93.getEncoding('\xff') +
|
|
2276
|
+
// Add the termination bit
|
|
2277
|
+
'1'
|
|
2278
|
+
};
|
|
2279
|
+
}
|
|
2280
|
+
|
|
2281
|
+
// Get the binary encoding of a symbol
|
|
2282
|
+
|
|
2283
|
+
}], [{
|
|
2284
|
+
key: 'getEncoding',
|
|
2285
|
+
value: function getEncoding(symbol) {
|
|
2286
|
+
return _constants.BINARIES[CODE93.symbolValue(symbol)];
|
|
2287
|
+
}
|
|
2288
|
+
|
|
2289
|
+
// Get the symbol for a symbol value
|
|
2290
|
+
|
|
2291
|
+
}, {
|
|
2292
|
+
key: 'getSymbol',
|
|
2293
|
+
value: function getSymbol(symbolValue) {
|
|
2294
|
+
return _constants.SYMBOLS[symbolValue];
|
|
2295
|
+
}
|
|
2296
|
+
|
|
2297
|
+
// Get the symbol value of a symbol
|
|
2298
|
+
|
|
2299
|
+
}, {
|
|
2300
|
+
key: 'symbolValue',
|
|
2301
|
+
value: function symbolValue(symbol) {
|
|
2302
|
+
return _constants.SYMBOLS.indexOf(symbol);
|
|
2303
|
+
}
|
|
2304
|
+
|
|
2305
|
+
// Calculate a checksum symbol
|
|
2306
|
+
|
|
2307
|
+
}, {
|
|
2308
|
+
key: 'checksum',
|
|
2309
|
+
value: function checksum(symbols, maxWeight) {
|
|
2310
|
+
var csum = symbols.slice().reverse().reduce(function (sum, symbol, idx) {
|
|
2311
|
+
var weight = idx % maxWeight + 1;
|
|
2312
|
+
return sum + CODE93.symbolValue(symbol) * weight;
|
|
2313
|
+
}, 0);
|
|
2314
|
+
|
|
2315
|
+
return CODE93.getSymbol(csum % 47);
|
|
2316
|
+
}
|
|
2317
|
+
}]);
|
|
2318
|
+
|
|
2319
|
+
return CODE93;
|
|
2320
|
+
}(_Barcode3$1.default);
|
|
2321
|
+
|
|
2322
|
+
CODE93$1.default = CODE93;
|
|
2323
|
+
|
|
2324
|
+
var CODE93FullASCII$1 = {};
|
|
2325
|
+
|
|
2326
|
+
Object.defineProperty(CODE93FullASCII$1, "__esModule", {
|
|
2327
|
+
value: true
|
|
2328
|
+
});
|
|
2329
|
+
|
|
2330
|
+
var _createClass$6 = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
|
2331
|
+
|
|
2332
|
+
var _CODE2$2 = CODE93$1;
|
|
2333
|
+
|
|
2334
|
+
var _CODE3$1 = _interopRequireDefault$a(_CODE2$2);
|
|
2335
|
+
|
|
2336
|
+
function _interopRequireDefault$a(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
2337
|
+
|
|
2338
|
+
function _classCallCheck$7(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
2339
|
+
|
|
2340
|
+
function _possibleConstructorReturn$3(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
|
2341
|
+
|
|
2342
|
+
function _inherits$3(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // Encoding documentation
|
|
2343
|
+
// https://en.wikipedia.org/wiki/Code_93#Full_ASCII_Code_93
|
|
2344
|
+
|
|
2345
|
+
var CODE93FullASCII = function (_CODE) {
|
|
2346
|
+
_inherits$3(CODE93FullASCII, _CODE);
|
|
2347
|
+
|
|
2348
|
+
function CODE93FullASCII(data, options) {
|
|
2349
|
+
_classCallCheck$7(this, CODE93FullASCII);
|
|
2350
|
+
|
|
2351
|
+
return _possibleConstructorReturn$3(this, (CODE93FullASCII.__proto__ || Object.getPrototypeOf(CODE93FullASCII)).call(this, data, options));
|
|
2352
|
+
}
|
|
2353
|
+
|
|
2354
|
+
_createClass$6(CODE93FullASCII, [{
|
|
2355
|
+
key: 'valid',
|
|
2356
|
+
value: function valid() {
|
|
2357
|
+
return (/^[\x00-\x7f]+$/.test(this.data)
|
|
2358
|
+
);
|
|
2359
|
+
}
|
|
2360
|
+
}]);
|
|
2361
|
+
|
|
2362
|
+
return CODE93FullASCII;
|
|
2363
|
+
}(_CODE3$1.default);
|
|
2364
|
+
|
|
2365
|
+
CODE93FullASCII$1.default = CODE93FullASCII;
|
|
2366
|
+
|
|
2367
|
+
Object.defineProperty(CODE93$2, "__esModule", {
|
|
2368
|
+
value: true
|
|
2369
|
+
});
|
|
2370
|
+
CODE93$2.CODE93FullASCII = CODE93$2.CODE93 = undefined;
|
|
2371
|
+
|
|
2372
|
+
var _CODE$1 = CODE93$1;
|
|
2373
|
+
|
|
2374
|
+
var _CODE2$1 = _interopRequireDefault$9(_CODE$1);
|
|
2375
|
+
|
|
2376
|
+
var _CODE93FullASCII = CODE93FullASCII$1;
|
|
2377
|
+
|
|
2378
|
+
var _CODE93FullASCII2 = _interopRequireDefault$9(_CODE93FullASCII);
|
|
2379
|
+
|
|
2380
|
+
function _interopRequireDefault$9(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
2381
|
+
|
|
2382
|
+
CODE93$2.CODE93 = _CODE2$1.default;
|
|
2383
|
+
CODE93$2.CODE93FullASCII = _CODE93FullASCII2.default;
|
|
2384
|
+
|
|
2107
2385
|
var GenericBarcode$1 = {};
|
|
2108
2386
|
|
|
2109
2387
|
Object.defineProperty(GenericBarcode$1, "__esModule", {
|
|
@@ -2178,6 +2456,8 @@ var _pharmacode = pharmacode$1;
|
|
|
2178
2456
|
|
|
2179
2457
|
var _codabar = codabar$1;
|
|
2180
2458
|
|
|
2459
|
+
var _CODE3 = CODE93$2;
|
|
2460
|
+
|
|
2181
2461
|
var _GenericBarcode = GenericBarcode$1;
|
|
2182
2462
|
|
|
2183
2463
|
barcodes.default = {
|
|
@@ -2189,6 +2469,7 @@ barcodes.default = {
|
|
|
2189
2469
|
MSI: _MSI.MSI, MSI10: _MSI.MSI10, MSI11: _MSI.MSI11, MSI1010: _MSI.MSI1010, MSI1110: _MSI.MSI1110,
|
|
2190
2470
|
pharmacode: _pharmacode.pharmacode,
|
|
2191
2471
|
codabar: _codabar.codabar,
|
|
2472
|
+
CODE93: _CODE3.CODE93, CODE93FullASCII: _CODE3.CODE93FullASCII,
|
|
2192
2473
|
GenericBarcode: _GenericBarcode.GenericBarcode
|
|
2193
2474
|
};
|
|
2194
2475
|
|
|
@@ -4743,4 +5024,4 @@ const SchoolIDCard = ({
|
|
|
4743
5024
|
};
|
|
4744
5025
|
|
|
4745
5026
|
exports.SchoolIDCard = SchoolIDCard;
|
|
4746
|
-
//# sourceMappingURL=SchoolIDCard-
|
|
5027
|
+
//# sourceMappingURL=SchoolIDCard-42d7c96f.js.map
|