hlrender 0.0.138 → 0.0.140
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/{_pdf-3e3edebc.js → _pdf-cdb84afc.js} +10 -10
- package/{_txt-4e2ecc06.js → _txt-6e540baf.js} +10 -10
- package/{_unsupport-e6f84e26.js → _unsupport-2b9e5fba.js} +1 -1
- package/{affix-widget-b0bd1a26.js → affix-widget-e7798066.js} +15 -15
- package/{alert-widget-e54cb7f4.js → alert-widget-62aff3a6.js} +15 -15
- package/{anchor-widget-5f091d11.js → anchor-widget-fce9d845.js} +12 -12
- package/{auto-complete-widget-57f8c0e7.js → auto-complete-widget-9f4d5f7b.js} +15 -15
- package/{avatar-widget-c288d63d.js → avatar-widget-952882d9.js} +15 -15
- package/{backtop-widget-3d54226e.js → backtop-widget-cff373c8.js} +15 -15
- package/{badge-widget-8acb0c82.js → badge-widget-334d56fb.js} +15 -15
- package/barcode-widget-a80a8770.js +2696 -0
- package/{baseImp-1b9355d2.js → baseImp-df7b65ff.js} +5 -5
- package/{breadcrumb-widget-c6755d6b.js → breadcrumb-widget-160657a9.js} +12 -12
- package/{button-widget-b05e4690.js → button-widget-fd0d1f85.js} +15 -15
- package/{cache-widget-7077a030.js → cache-widget-2e4b6c83.js} +14 -14
- package/{card-widget-fb553cda.js → card-widget-989a1469.js} +13 -13
- package/{carousel-widget-fe11a287.js → carousel-widget-87f91572.js} +13 -13
- package/{cascader-widget-5a886d49.js → cascader-widget-1b26fd91.js} +14 -14
- package/{chart-widget-0aa7ea40.js → chart-widget-e60614e5.js} +12 -12
- package/{checkbox-widget-84c09d07.js → checkbox-widget-0d017343.js} +14 -14
- package/{collapse-widget-c087b2df.js → collapse-widget-d220a6ac.js} +13 -13
- package/{color-picker-widget-8d4b012d.js → color-picker-widget-15a31ec7.js} +14 -14
- package/{cont-cell-widget-1f5af847.js → cont-cell-widget-ba7cd2a7.js} +1 -1
- package/{cont-cell-widget.vue_vue_type_script_setup_true_name_cont-cell-widget_lang-9d79d3d3.js → cont-cell-widget.vue_vue_type_script_setup_true_name_cont-cell-widget_lang-b6a750ee.js} +5 -5
- package/{cont-widget-a87b7d7c.js → cont-widget-85f85933.js} +5 -5
- package/{content-wrapper-567a6faf.js → content-wrapper-e9cd3fef.js} +6 -6
- package/{content-wrapper.vue_vue_type_script_setup_true_lang-131fb31a.js → content-wrapper.vue_vue_type_script_setup_true_lang-52d323bd.js} +3 -3
- package/{date-picker-range-widget-0e1bf5e9.js → date-picker-range-widget-b271beb9.js} +14 -14
- package/{date-picker-widget-45e11211.js → date-picker-widget-076d1b61.js} +14 -14
- package/default-slot-widget-2293bd1d.js +26 -0
- package/{default-slot-widget.vue_vue_type_script_setup_true_name_default-slot-widget_lang-8cc5dc14.js → default-slot-widget.vue_vue_type_script_setup_true_name_default-slot-widget_lang-1f74e994.js} +7 -7
- package/{descriptions-widget-5dda5522.js → descriptions-widget-2e0c004c.js} +13 -13
- package/{dialog-c4706078.js → dialog-9acc103b.js} +2 -2
- package/{dialog-widget-45f2a6a8.js → dialog-widget-a369a3e6.js} +14 -14
- package/{divider-widget-74895eb7.js → divider-widget-2f432df7.js} +15 -15
- package/drag-wrapper-a8450f3c.js +244 -0
- package/{drawer-widget-f8f175ab.js → drawer-widget-1f000c3c.js} +14 -14
- package/{dropdown-widget-c3781e0a.js → dropdown-widget-d275b613.js} +13 -13
- package/{empty-widget-4a854aa4.js → empty-widget-a28f146d.js} +15 -15
- package/{enum-type-bb2bfafa.js → enum-type-58e23005.js} +77 -75
- package/{enum-type-4a798b1a.js → enum-type-f3133577.js} +32 -9
- package/{expression-490b4335.js → expression-8b6f7687.js} +1 -1
- package/feedback-widget-2f35f513.js +26 -0
- package/{feedback-widget.vue_vue_type_script_setup_true_name_feedback-widget_lang-060df774.js → feedback-widget.vue_vue_type_script_setup_true_name_feedback-widget_lang-13030f0c.js} +5 -5
- package/{fieldobj-a9f1231d.js → fieldobj-a02ef2e2.js} +1 -1
- package/{file-upload-widget-4acfb0c0.js → file-upload-widget-ea9b32c2.js} +19 -19
- package/{form-item-wrapper-14987803.js → form-item-wrapper-eaf885e6.js} +10 -10
- package/{form-widget-4a8adbeb.js → form-widget-6f7eaf39.js} +57 -55
- package/{grid-col-widget-d2ab53a1.js → grid-col-widget-a0fba7ab.js} +1 -1
- package/{grid-col-widget.vue_vue_type_script_setup_true_name_grid-col-widget_lang-76ff5dfa.js → grid-col-widget.vue_vue_type_script_setup_true_name_grid-col-widget_lang-f42dc4d4.js} +5 -5
- package/{grid-widget-b4864397.js → grid-widget-fa0867c3.js} +5 -5
- package/{html-text-widget-e409615c.js → html-text-widget-1a035241.js} +13 -13
- package/{icon-widget-198c97a3.js → icon-widget-8ea10b7a.js} +12 -12
- package/{iframe-widget-88ef0855.js → iframe-widget-fdcbd295.js} +12 -12
- package/{image-widget-b4e6fc06.js → image-widget-c0853c91.js} +12 -12
- package/{index-f6240372.js → index-979d8892.js} +1208 -1101
- package/{index-79892b9c.js → index-da0d157b.js} +1 -1
- package/{index-cda65e40.js → index-f78fbbeb.js} +3 -3
- package/{input-number-widget-3f018315.js → input-number-widget-fb864728.js} +14 -14
- package/{input-widget-33d18b8b.js → input-widget-0d3d3ee0.js} +15 -15
- package/{label-wrapper-f087426c.js → label-wrapper-36b48c7a.js} +5 -5
- package/{label-wrapper.vue_vue_type_style_index_0_lang-62dc93f6.js → label-wrapper.vue_vue_type_style_index_0_lang-74566ee5.js} +3 -3
- package/{link-widget-5bd3d4b3.js → link-widget-843c1236.js} +15 -15
- package/{ltable-col-widget-e4a78a11.js → ltable-col-widget-fbfab46e.js} +1 -1
- package/{ltable-col-widget.vue_vue_type_script_setup_true_name_ltable-col-widget_lang-7f1adfe3.js → ltable-col-widget.vue_vue_type_script_setup_true_name_ltable-col-widget_lang-58833baa.js} +85 -86
- package/{ltable-widget-5b59d003.js → ltable-widget-9a34d74f.js} +5 -5
- package/{menu-widget-38506dc7.js → menu-widget-dc8d5780.js} +18 -18
- package/{model-widget-7f740f10.js → model-widget-89008e97.js} +12 -12
- package/multirow-58ad99da.js +229 -0
- package/{multirow-widget-7fb52aeb.js → multirow-widget-b60b1428.js} +14 -14
- package/noimg-89eb860b.js +4 -0
- package/package.json +3 -3
- package/{pagination-widget-93b4ff18.js → pagination-widget-32535ab0.js} +12 -12
- package/{picture-upload-widget-2b281639.js → picture-upload-widget-ff26df6b.js} +34 -34
- package/{progress-widget-69257fe5.js → progress-widget-2acd7cd5.js} +13 -13
- package/{propresult-e7e86b43.js → propresult-c5aa6107.js} +1 -1
- package/qrcode-widget-9378df8d.js +1525 -0
- package/{radio-widget-3419a061.js → radio-widget-707d3022.js} +14 -14
- package/{range-widget-bc9eb3bc.js → range-widget-b807b64a.js} +15 -15
- package/{rate-widget-51ea66b0.js → rate-widget-02971bac.js} +14 -14
- package/render.es.js +31 -31
- package/render.style.css +1 -1
- package/render.umd.js +543 -536
- package/{result-widget-48bbee71.js → result-widget-84c65928.js} +13 -13
- package/{rich-editor-widget-f6a707d6.js → rich-editor-widget-e3d8355c.js} +14 -14
- package/{router-widget-9d95900e.js → router-widget-dcb8c262.js} +12 -12
- package/{select-widget-9f5875de.js → select-widget-2b05e4ad.js} +14 -14
- package/{sfc-ca9005bb.js → sfc-923fe44b.js} +24 -24
- package/{sfcview-e342deea.js → sfcview-00af6113.js} +6 -6
- package/{share-field-70e53805.js → share-field-400ac785.js} +212 -212
- package/{share-file-81d7679e.js → share-file-f88746ee.js} +91 -87
- package/{slider-widget-c1e7cf1b.js → slider-widget-db50317c.js} +14 -14
- package/{slot-afdbaf6a.js → slot-6c074606.js} +3 -3
- package/{static-text-widget-c498c4f8.js → static-text-widget-905c9384.js} +13 -13
- package/{steps-widget-0794d0f5.js → steps-widget-ee105d50.js} +12 -12
- package/{subMenu-widget-2cbfb9e4.js → subMenu-widget-b0d22b12.js} +7 -7
- package/{subMenu-widget.vue_vue_type_script_setup_true_lang-27a0540a.js → subMenu-widget.vue_vue_type_script_setup_true_lang-287e6546.js} +6 -6
- package/{switch-widget-658399b0.js → switch-widget-ec49af95.js} +14 -14
- package/{tab-pane-widget-6bb27163.js → tab-pane-widget-50780c7f.js} +1 -1
- package/{tab-pane-widget.vue_vue_type_script_setup_true_name_tab-pane-widget_lang-bf376251.js → tab-pane-widget.vue_vue_type_script_setup_true_name_tab-pane-widget_lang-a16718fa.js} +5 -5
- package/{table-col-widget-c6667f25.js → table-col-widget-8a0d855a.js} +10 -10
- package/{table-col-widget.vue_vue_type_script_setup_true_name_table-col-widget_lang-d683bcb7.js → table-col-widget.vue_vue_type_script_setup_true_name_table-col-widget_lang-f5e913d7.js} +5 -5
- package/{table-widget-81bb288f.js → table-widget-9a7dac8f.js} +14 -14
- package/{tabs-widget-7359728f.js → tabs-widget-7469b515.js} +7 -7
- package/{tag-widget-eb60301a.js → tag-widget-34f24c18.js} +15 -15
- package/{text-widget-3de85e13.js → text-widget-22b4e468.js} +15 -15
- package/{textarea-widget-beafa36f.js → textarea-widget-3cc28caf.js} +14 -14
- package/{time-picker-range-widget-c889d4c1.js → time-picker-range-widget-af4def18.js} +14 -14
- package/{time-picker-widget-11438a8b.js → time-picker-widget-19168f19.js} +14 -14
- package/{time-select-widget-53ecd39a.js → time-select-widget-c435dca1.js} +14 -14
- package/{tmpl-widget-5036dded.js → tmpl-widget-ae841f04.js} +13 -13
- package/{tree-select-widget-fcf77445.js → tree-select-widget-84f7cd8f.js} +14 -14
- package/{tree-widget-8b15bfd7.js → tree-widget-e5add9ae.js} +12 -12
- package/verifycode-widget-85b3d2b4.js +163 -0
- package/{widget-wrapper.vue_vue_type_script_setup_true_name_form-item-wrapper_lang-2eadd5b2.js → widget-wrapper.vue_vue_type_script_setup_true_name_form-item-wrapper_lang-cb6e938b.js} +6 -6
- package/{wrapper-widget-b8e27139.js → wrapper-widget-827d047f.js} +6 -6
- package/default-slot-widget-a4037130.js +0 -26
- package/drag-wrapper-f6aa00f6.js +0 -244
- package/feedback-widget-fc966cfd.js +0 -26
- package/multirow-3a97c61a.js +0 -229
|
@@ -0,0 +1,2696 @@
|
|
|
1
|
+
import { defineComponent as ht, ref as Ct, watch as Nt, openBlock as Gt, createBlock as Ft, mergeProps as Ht, unref as B, withCtx as zt, createElementVNode as Xt, normalizeClass as Ut, normalizeStyle as Vt } from "vue";
|
|
2
|
+
import { w as qt } from "./expression-8b6f7687.js";
|
|
3
|
+
import { I as Jt } from "./field-base-5547436d.js";
|
|
4
|
+
import { b as Yt } from "./share-field-400ac785.js";
|
|
5
|
+
import { _ as Wt } from "./widget-wrapper.vue_vue_type_script_setup_true_name_form-item-wrapper_lang-cb6e938b.js";
|
|
6
|
+
import { R as Qt } from "./enum-type-f3133577.js";
|
|
7
|
+
import "./source-map-b04aec4a.js";
|
|
8
|
+
import "./uuid-4999945f.js";
|
|
9
|
+
import "./_commonjsHelpers-e7ea1525.js";
|
|
10
|
+
import "./esprima-e8d15055.js";
|
|
11
|
+
import "./widget-base-4c2d6265.js";
|
|
12
|
+
import "./multirow-58ad99da.js";
|
|
13
|
+
import "./baseImp-df7b65ff.js";
|
|
14
|
+
import "./enum-type-58e23005.js";
|
|
15
|
+
import "./icon-a0e0cdb0.js";
|
|
16
|
+
import "./dialog-9acc103b.js";
|
|
17
|
+
import "element-plus";
|
|
18
|
+
import "./index-979d8892.js";
|
|
19
|
+
import "./slot-6c074606.js";
|
|
20
|
+
import "./index-da0d157b.js";
|
|
21
|
+
import "./_plugin-vue_export-helper-dad06003.js";
|
|
22
|
+
import "./fieldobj-a02ef2e2.js";
|
|
23
|
+
var ge = {}, Z = {}, l = {};
|
|
24
|
+
Object.defineProperty(l, "__esModule", {
|
|
25
|
+
value: !0
|
|
26
|
+
});
|
|
27
|
+
function Zt(t, e) {
|
|
28
|
+
if (!(t instanceof e))
|
|
29
|
+
throw new TypeError("Cannot call a class as a function");
|
|
30
|
+
}
|
|
31
|
+
var Kt = function t(e, r) {
|
|
32
|
+
Zt(this, t), this.data = e, this.text = r.text || e, this.options = r;
|
|
33
|
+
};
|
|
34
|
+
l.default = Kt;
|
|
35
|
+
Object.defineProperty(Z, "__esModule", {
|
|
36
|
+
value: !0
|
|
37
|
+
});
|
|
38
|
+
Z.CODE39 = void 0;
|
|
39
|
+
var en = function() {
|
|
40
|
+
function t(e, r) {
|
|
41
|
+
for (var n = 0; n < r.length; n++) {
|
|
42
|
+
var a = r[n];
|
|
43
|
+
a.enumerable = a.enumerable || !1, a.configurable = !0, "value" in a && (a.writable = !0), Object.defineProperty(e, a.key, a);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
return function(e, r, n) {
|
|
47
|
+
return r && t(e.prototype, r), n && t(e, n), e;
|
|
48
|
+
};
|
|
49
|
+
}(), tn = l, nn = rn(tn);
|
|
50
|
+
function rn(t) {
|
|
51
|
+
return t && t.__esModule ? t : { default: t };
|
|
52
|
+
}
|
|
53
|
+
function an(t, e) {
|
|
54
|
+
if (!(t instanceof e))
|
|
55
|
+
throw new TypeError("Cannot call a class as a function");
|
|
56
|
+
}
|
|
57
|
+
function on(t, e) {
|
|
58
|
+
if (!t)
|
|
59
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
60
|
+
return e && (typeof e == "object" || typeof e == "function") ? e : t;
|
|
61
|
+
}
|
|
62
|
+
function un(t, e) {
|
|
63
|
+
if (typeof e != "function" && e !== null)
|
|
64
|
+
throw new TypeError("Super expression must either be null or a function, not " + typeof e);
|
|
65
|
+
t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e);
|
|
66
|
+
}
|
|
67
|
+
var fn = function(t) {
|
|
68
|
+
un(e, t);
|
|
69
|
+
function e(r, n) {
|
|
70
|
+
return an(this, e), r = r.toUpperCase(), n.mod43 && (r += hn(dn(r))), on(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, r, n));
|
|
71
|
+
}
|
|
72
|
+
return en(e, [{
|
|
73
|
+
key: "encode",
|
|
74
|
+
value: function() {
|
|
75
|
+
for (var n = ce("*"), a = 0; a < this.data.length; a++)
|
|
76
|
+
n += ce(this.data[a]) + "0";
|
|
77
|
+
return n += ce("*"), {
|
|
78
|
+
data: n,
|
|
79
|
+
text: this.text
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
}, {
|
|
83
|
+
key: "valid",
|
|
84
|
+
value: function() {
|
|
85
|
+
return this.data.search(/^[0-9A-Z\-\.\ \$\/\+\%]+$/) !== -1;
|
|
86
|
+
}
|
|
87
|
+
}]), e;
|
|
88
|
+
}(nn.default), dt = ["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", "-", ".", " ", "$", "/", "+", "%", "*"], cn = [20957, 29783, 23639, 30485, 20951, 29813, 23669, 20855, 29789, 23645, 29975, 23831, 30533, 22295, 30149, 24005, 21623, 29981, 23837, 22301, 30023, 23879, 30545, 22343, 30161, 24017, 21959, 30065, 23921, 22385, 29015, 18263, 29141, 17879, 29045, 18293, 17783, 29021, 18269, 17477, 17489, 17681, 20753, 35770];
|
|
89
|
+
function ce(t) {
|
|
90
|
+
return ln(_t(t));
|
|
91
|
+
}
|
|
92
|
+
function ln(t) {
|
|
93
|
+
return cn[t].toString(2);
|
|
94
|
+
}
|
|
95
|
+
function hn(t) {
|
|
96
|
+
return dt[t];
|
|
97
|
+
}
|
|
98
|
+
function _t(t) {
|
|
99
|
+
return dt.indexOf(t);
|
|
100
|
+
}
|
|
101
|
+
function dn(t) {
|
|
102
|
+
for (var e = 0, r = 0; r < t.length; r++)
|
|
103
|
+
e += _t(t[r]);
|
|
104
|
+
return e = e % 43, e;
|
|
105
|
+
}
|
|
106
|
+
Z.CODE39 = fn;
|
|
107
|
+
var p = {}, Oe = {}, M = {}, f = {};
|
|
108
|
+
Object.defineProperty(f, "__esModule", {
|
|
109
|
+
value: !0
|
|
110
|
+
});
|
|
111
|
+
var L;
|
|
112
|
+
function le(t, e, r) {
|
|
113
|
+
return e in t ? Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = r, t;
|
|
114
|
+
}
|
|
115
|
+
var vt = f.SET_A = 0, st = f.SET_B = 1, yt = f.SET_C = 2;
|
|
116
|
+
f.SHIFT = 98;
|
|
117
|
+
var _n = f.START_A = 103, vn = f.START_B = 104, sn = f.START_C = 105;
|
|
118
|
+
f.MODULO = 103;
|
|
119
|
+
f.STOP = 106;
|
|
120
|
+
f.FNC1 = 207;
|
|
121
|
+
f.SET_BY_CODE = (L = {}, le(L, _n, vt), le(L, vn, st), le(L, sn, yt), L);
|
|
122
|
+
f.SWAP = {
|
|
123
|
+
101: vt,
|
|
124
|
+
100: st,
|
|
125
|
+
99: yt
|
|
126
|
+
};
|
|
127
|
+
f.A_START_CHAR = String.fromCharCode(208);
|
|
128
|
+
f.B_START_CHAR = String.fromCharCode(209);
|
|
129
|
+
f.C_START_CHAR = String.fromCharCode(210);
|
|
130
|
+
f.A_CHARS = "[\0-_È-Ï]";
|
|
131
|
+
f.B_CHARS = "[ -È-Ï]";
|
|
132
|
+
f.C_CHARS = "(Ï*[0-9]{2}Ï*)";
|
|
133
|
+
f.BARS = [11011001100, 11001101100, 11001100110, 10010011e3, 10010001100, 10001001100, 10011001e3, 10011000100, 10001100100, 11001001e3, 11001000100, 11000100100, 10110011100, 10011011100, 10011001110, 10111001100, 10011101100, 10011100110, 11001110010, 11001011100, 11001001110, 11011100100, 11001110100, 11101101110, 11101001100, 11100101100, 11100100110, 11101100100, 11100110100, 11100110010, 11011011e3, 11011000110, 11000110110, 10100011e3, 10001011e3, 10001000110, 10110001e3, 10001101e3, 10001100010, 11010001e3, 11000101e3, 11000100010, 10110111e3, 10110001110, 10001101110, 10111011e3, 10111000110, 10001110110, 11101110110, 11010001110, 11000101110, 11011101e3, 11011100010, 11011101110, 11101011e3, 11101000110, 11100010110, 11101101e3, 11101100010, 11100011010, 11101111010, 11001000010, 11110001010, 1010011e4, 10100001100, 1001011e4, 10010000110, 10000101100, 10000100110, 1011001e4, 10110000100, 1001101e4, 10011000010, 10000110100, 10000110010, 11000010010, 1100101e4, 11110111010, 11000010100, 10001111010, 10100111100, 10010111100, 10010011110, 10111100100, 10011110100, 10011110010, 11110100100, 11110010100, 11110010010, 11011011110, 11011110110, 11110110110, 10101111e3, 10100011110, 10001011110, 10111101e3, 10111100010, 11110101e3, 11110100010, 10111011110, 10111101110, 11101011110, 11110101110, 11010000100, 1101001e4, 11010011100, 1100011101011];
|
|
134
|
+
Object.defineProperty(M, "__esModule", {
|
|
135
|
+
value: !0
|
|
136
|
+
});
|
|
137
|
+
var yn = function() {
|
|
138
|
+
function t(e, r) {
|
|
139
|
+
for (var n = 0; n < r.length; n++) {
|
|
140
|
+
var a = r[n];
|
|
141
|
+
a.enumerable = a.enumerable || !1, a.configurable = !0, "value" in a && (a.writable = !0), Object.defineProperty(e, a.key, a);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
return function(e, r, n) {
|
|
145
|
+
return r && t(e.prototype, r), n && t(e, n), e;
|
|
146
|
+
};
|
|
147
|
+
}(), pn = l, gn = On(pn), d = f;
|
|
148
|
+
function On(t) {
|
|
149
|
+
return t && t.__esModule ? t : { default: t };
|
|
150
|
+
}
|
|
151
|
+
function En(t, e) {
|
|
152
|
+
if (!(t instanceof e))
|
|
153
|
+
throw new TypeError("Cannot call a class as a function");
|
|
154
|
+
}
|
|
155
|
+
function bn(t, e) {
|
|
156
|
+
if (!t)
|
|
157
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
158
|
+
return e && (typeof e == "object" || typeof e == "function") ? e : t;
|
|
159
|
+
}
|
|
160
|
+
function mn(t, e) {
|
|
161
|
+
if (typeof e != "function" && e !== null)
|
|
162
|
+
throw new TypeError("Super expression must either be null or a function, not " + typeof e);
|
|
163
|
+
t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e);
|
|
164
|
+
}
|
|
165
|
+
var wn = function(t) {
|
|
166
|
+
mn(e, t);
|
|
167
|
+
function e(r, n) {
|
|
168
|
+
En(this, e);
|
|
169
|
+
var a = bn(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, r.substring(1), n));
|
|
170
|
+
return a.bytes = r.split("").map(function(i) {
|
|
171
|
+
return i.charCodeAt(0);
|
|
172
|
+
}), a;
|
|
173
|
+
}
|
|
174
|
+
return yn(e, [{
|
|
175
|
+
key: "valid",
|
|
176
|
+
value: function() {
|
|
177
|
+
return /^[\x00-\x7F\xC8-\xD3]+$/.test(this.data);
|
|
178
|
+
}
|
|
179
|
+
// The public encoding function
|
|
180
|
+
}, {
|
|
181
|
+
key: "encode",
|
|
182
|
+
value: function() {
|
|
183
|
+
var n = this.bytes, a = n.shift() - 105, i = d.SET_BY_CODE[a];
|
|
184
|
+
if (i === void 0)
|
|
185
|
+
throw new RangeError("The encoding does not start with a start character.");
|
|
186
|
+
this.shouldEncodeAsEan128() === !0 && n.unshift(d.FNC1);
|
|
187
|
+
var o = e.next(n, 1, i);
|
|
188
|
+
return {
|
|
189
|
+
text: this.text === this.data ? this.text.replace(/[^\x20-\x7E]/g, "") : this.text,
|
|
190
|
+
data: (
|
|
191
|
+
// Add the start bits
|
|
192
|
+
e.getBar(a) + // Add the encoded bits
|
|
193
|
+
o.result + // Add the checksum
|
|
194
|
+
e.getBar((o.checksum + a) % d.MODULO) + // Add the end bits
|
|
195
|
+
e.getBar(d.STOP)
|
|
196
|
+
)
|
|
197
|
+
};
|
|
198
|
+
}
|
|
199
|
+
// GS1-128/EAN-128
|
|
200
|
+
}, {
|
|
201
|
+
key: "shouldEncodeAsEan128",
|
|
202
|
+
value: function() {
|
|
203
|
+
var n = this.options.ean128 || !1;
|
|
204
|
+
return typeof n == "string" && (n = n.toLowerCase() === "true"), n;
|
|
205
|
+
}
|
|
206
|
+
// Get a bar symbol by index
|
|
207
|
+
}], [{
|
|
208
|
+
key: "getBar",
|
|
209
|
+
value: function(n) {
|
|
210
|
+
return d.BARS[n] ? d.BARS[n].toString() : "";
|
|
211
|
+
}
|
|
212
|
+
// Correct an index by a set and shift it from the bytes array
|
|
213
|
+
}, {
|
|
214
|
+
key: "correctIndex",
|
|
215
|
+
value: function(n, a) {
|
|
216
|
+
if (a === d.SET_A) {
|
|
217
|
+
var i = n.shift();
|
|
218
|
+
return i < 32 ? i + 64 : i - 32;
|
|
219
|
+
} else
|
|
220
|
+
return a === d.SET_B ? n.shift() - 32 : (n.shift() - 48) * 10 + n.shift() - 48;
|
|
221
|
+
}
|
|
222
|
+
}, {
|
|
223
|
+
key: "next",
|
|
224
|
+
value: function(n, a, i) {
|
|
225
|
+
if (!n.length)
|
|
226
|
+
return { result: "", checksum: 0 };
|
|
227
|
+
var o = void 0, u = void 0;
|
|
228
|
+
if (n[0] >= 200) {
|
|
229
|
+
u = n.shift() - 105;
|
|
230
|
+
var c = d.SWAP[u];
|
|
231
|
+
c !== void 0 ? o = e.next(n, a + 1, c) : ((i === d.SET_A || i === d.SET_B) && u === d.SHIFT && (n[0] = i === d.SET_A ? n[0] > 95 ? n[0] - 96 : n[0] : n[0] < 32 ? n[0] + 96 : n[0]), o = e.next(n, a + 1, i));
|
|
232
|
+
} else
|
|
233
|
+
u = e.correctIndex(n, i), o = e.next(n, a + 1, i);
|
|
234
|
+
var v = e.getBar(u), b = u * a;
|
|
235
|
+
return {
|
|
236
|
+
result: v + o.result,
|
|
237
|
+
checksum: b + o.checksum
|
|
238
|
+
};
|
|
239
|
+
}
|
|
240
|
+
}]), e;
|
|
241
|
+
}(gn.default);
|
|
242
|
+
M.default = wn;
|
|
243
|
+
var Ee = {};
|
|
244
|
+
Object.defineProperty(Ee, "__esModule", {
|
|
245
|
+
value: !0
|
|
246
|
+
});
|
|
247
|
+
var O = f, pt = function(e) {
|
|
248
|
+
return e.match(new RegExp("^" + O.A_CHARS + "*"))[0].length;
|
|
249
|
+
}, gt = function(e) {
|
|
250
|
+
return e.match(new RegExp("^" + O.B_CHARS + "*"))[0].length;
|
|
251
|
+
}, Ot = function(e) {
|
|
252
|
+
return e.match(new RegExp("^" + O.C_CHARS + "*"))[0];
|
|
253
|
+
};
|
|
254
|
+
function be(t, e) {
|
|
255
|
+
var r = e ? O.A_CHARS : O.B_CHARS, n = t.match(new RegExp("^(" + r + "+?)(([0-9]{2}){2,})([^0-9]|$)"));
|
|
256
|
+
if (n)
|
|
257
|
+
return n[1] + String.fromCharCode(204) + Et(t.substring(n[1].length));
|
|
258
|
+
var a = t.match(new RegExp("^" + r + "+"))[0];
|
|
259
|
+
return a.length === t.length ? t : a + String.fromCharCode(e ? 205 : 206) + be(t.substring(a.length), !e);
|
|
260
|
+
}
|
|
261
|
+
function Et(t) {
|
|
262
|
+
var e = Ot(t), r = e.length;
|
|
263
|
+
if (r === t.length)
|
|
264
|
+
return t;
|
|
265
|
+
t = t.substring(r);
|
|
266
|
+
var n = pt(t) >= gt(t);
|
|
267
|
+
return e + String.fromCharCode(n ? 206 : 205) + be(t, n);
|
|
268
|
+
}
|
|
269
|
+
Ee.default = function(t) {
|
|
270
|
+
var e = void 0, r = Ot(t).length;
|
|
271
|
+
if (r >= 2)
|
|
272
|
+
e = O.C_START_CHAR + Et(t);
|
|
273
|
+
else {
|
|
274
|
+
var n = pt(t) > gt(t);
|
|
275
|
+
e = (n ? O.A_START_CHAR : O.B_START_CHAR) + be(t, n);
|
|
276
|
+
}
|
|
277
|
+
return e.replace(
|
|
278
|
+
/[\xCD\xCE]([^])[\xCD\xCE]/,
|
|
279
|
+
// Any sequence between 205 and 206 characters
|
|
280
|
+
function(a, i) {
|
|
281
|
+
return String.fromCharCode(203) + i;
|
|
282
|
+
}
|
|
283
|
+
);
|
|
284
|
+
};
|
|
285
|
+
Object.defineProperty(Oe, "__esModule", {
|
|
286
|
+
value: !0
|
|
287
|
+
});
|
|
288
|
+
var $n = M, xn = bt($n), Sn = Ee, An = bt(Sn);
|
|
289
|
+
function bt(t) {
|
|
290
|
+
return t && t.__esModule ? t : { default: t };
|
|
291
|
+
}
|
|
292
|
+
function Rn(t, e) {
|
|
293
|
+
if (!(t instanceof e))
|
|
294
|
+
throw new TypeError("Cannot call a class as a function");
|
|
295
|
+
}
|
|
296
|
+
function he(t, e) {
|
|
297
|
+
if (!t)
|
|
298
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
299
|
+
return e && (typeof e == "object" || typeof e == "function") ? e : t;
|
|
300
|
+
}
|
|
301
|
+
function Pn(t, e) {
|
|
302
|
+
if (typeof e != "function" && e !== null)
|
|
303
|
+
throw new TypeError("Super expression must either be null or a function, not " + typeof e);
|
|
304
|
+
t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e);
|
|
305
|
+
}
|
|
306
|
+
var Tn = function(t) {
|
|
307
|
+
Pn(e, t);
|
|
308
|
+
function e(r, n) {
|
|
309
|
+
if (Rn(this, e), /^[\x00-\x7F\xC8-\xD3]+$/.test(r))
|
|
310
|
+
var a = he(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, (0, An.default)(r), n));
|
|
311
|
+
else
|
|
312
|
+
var a = he(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, r, n));
|
|
313
|
+
return he(a);
|
|
314
|
+
}
|
|
315
|
+
return e;
|
|
316
|
+
}(xn.default);
|
|
317
|
+
Oe.default = Tn;
|
|
318
|
+
var me = {};
|
|
319
|
+
Object.defineProperty(me, "__esModule", {
|
|
320
|
+
value: !0
|
|
321
|
+
});
|
|
322
|
+
var Mn = function() {
|
|
323
|
+
function t(e, r) {
|
|
324
|
+
for (var n = 0; n < r.length; n++) {
|
|
325
|
+
var a = r[n];
|
|
326
|
+
a.enumerable = a.enumerable || !1, a.configurable = !0, "value" in a && (a.writable = !0), Object.defineProperty(e, a.key, a);
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
return function(e, r, n) {
|
|
330
|
+
return r && t(e.prototype, r), n && t(e, n), e;
|
|
331
|
+
};
|
|
332
|
+
}(), In = M, kn = Dn(In), We = f;
|
|
333
|
+
function Dn(t) {
|
|
334
|
+
return t && t.__esModule ? t : { default: t };
|
|
335
|
+
}
|
|
336
|
+
function jn(t, e) {
|
|
337
|
+
if (!(t instanceof e))
|
|
338
|
+
throw new TypeError("Cannot call a class as a function");
|
|
339
|
+
}
|
|
340
|
+
function Bn(t, e) {
|
|
341
|
+
if (!t)
|
|
342
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
343
|
+
return e && (typeof e == "object" || typeof e == "function") ? e : t;
|
|
344
|
+
}
|
|
345
|
+
function Ln(t, e) {
|
|
346
|
+
if (typeof e != "function" && e !== null)
|
|
347
|
+
throw new TypeError("Super expression must either be null or a function, not " + typeof e);
|
|
348
|
+
t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e);
|
|
349
|
+
}
|
|
350
|
+
var Cn = function(t) {
|
|
351
|
+
Ln(e, t);
|
|
352
|
+
function e(r, n) {
|
|
353
|
+
return jn(this, e), Bn(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, We.A_START_CHAR + r, n));
|
|
354
|
+
}
|
|
355
|
+
return Mn(e, [{
|
|
356
|
+
key: "valid",
|
|
357
|
+
value: function() {
|
|
358
|
+
return new RegExp("^" + We.A_CHARS + "+$").test(this.data);
|
|
359
|
+
}
|
|
360
|
+
}]), e;
|
|
361
|
+
}(kn.default);
|
|
362
|
+
me.default = Cn;
|
|
363
|
+
var we = {};
|
|
364
|
+
Object.defineProperty(we, "__esModule", {
|
|
365
|
+
value: !0
|
|
366
|
+
});
|
|
367
|
+
var Nn = function() {
|
|
368
|
+
function t(e, r) {
|
|
369
|
+
for (var n = 0; n < r.length; n++) {
|
|
370
|
+
var a = r[n];
|
|
371
|
+
a.enumerable = a.enumerable || !1, a.configurable = !0, "value" in a && (a.writable = !0), Object.defineProperty(e, a.key, a);
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
return function(e, r, n) {
|
|
375
|
+
return r && t(e.prototype, r), n && t(e, n), e;
|
|
376
|
+
};
|
|
377
|
+
}(), Gn = M, Fn = Hn(Gn), Qe = f;
|
|
378
|
+
function Hn(t) {
|
|
379
|
+
return t && t.__esModule ? t : { default: t };
|
|
380
|
+
}
|
|
381
|
+
function zn(t, e) {
|
|
382
|
+
if (!(t instanceof e))
|
|
383
|
+
throw new TypeError("Cannot call a class as a function");
|
|
384
|
+
}
|
|
385
|
+
function Xn(t, e) {
|
|
386
|
+
if (!t)
|
|
387
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
388
|
+
return e && (typeof e == "object" || typeof e == "function") ? e : t;
|
|
389
|
+
}
|
|
390
|
+
function Un(t, e) {
|
|
391
|
+
if (typeof e != "function" && e !== null)
|
|
392
|
+
throw new TypeError("Super expression must either be null or a function, not " + typeof e);
|
|
393
|
+
t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e);
|
|
394
|
+
}
|
|
395
|
+
var Vn = function(t) {
|
|
396
|
+
Un(e, t);
|
|
397
|
+
function e(r, n) {
|
|
398
|
+
return zn(this, e), Xn(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, Qe.B_START_CHAR + r, n));
|
|
399
|
+
}
|
|
400
|
+
return Nn(e, [{
|
|
401
|
+
key: "valid",
|
|
402
|
+
value: function() {
|
|
403
|
+
return new RegExp("^" + Qe.B_CHARS + "+$").test(this.data);
|
|
404
|
+
}
|
|
405
|
+
}]), e;
|
|
406
|
+
}(Fn.default);
|
|
407
|
+
we.default = Vn;
|
|
408
|
+
var $e = {};
|
|
409
|
+
Object.defineProperty($e, "__esModule", {
|
|
410
|
+
value: !0
|
|
411
|
+
});
|
|
412
|
+
var qn = function() {
|
|
413
|
+
function t(e, r) {
|
|
414
|
+
for (var n = 0; n < r.length; n++) {
|
|
415
|
+
var a = r[n];
|
|
416
|
+
a.enumerable = a.enumerable || !1, a.configurable = !0, "value" in a && (a.writable = !0), Object.defineProperty(e, a.key, a);
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
return function(e, r, n) {
|
|
420
|
+
return r && t(e.prototype, r), n && t(e, n), e;
|
|
421
|
+
};
|
|
422
|
+
}(), Jn = M, Yn = Wn(Jn), Ze = f;
|
|
423
|
+
function Wn(t) {
|
|
424
|
+
return t && t.__esModule ? t : { default: t };
|
|
425
|
+
}
|
|
426
|
+
function Qn(t, e) {
|
|
427
|
+
if (!(t instanceof e))
|
|
428
|
+
throw new TypeError("Cannot call a class as a function");
|
|
429
|
+
}
|
|
430
|
+
function Zn(t, e) {
|
|
431
|
+
if (!t)
|
|
432
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
433
|
+
return e && (typeof e == "object" || typeof e == "function") ? e : t;
|
|
434
|
+
}
|
|
435
|
+
function Kn(t, e) {
|
|
436
|
+
if (typeof e != "function" && e !== null)
|
|
437
|
+
throw new TypeError("Super expression must either be null or a function, not " + typeof e);
|
|
438
|
+
t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e);
|
|
439
|
+
}
|
|
440
|
+
var er = function(t) {
|
|
441
|
+
Kn(e, t);
|
|
442
|
+
function e(r, n) {
|
|
443
|
+
return Qn(this, e), Zn(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, Ze.C_START_CHAR + r, n));
|
|
444
|
+
}
|
|
445
|
+
return qn(e, [{
|
|
446
|
+
key: "valid",
|
|
447
|
+
value: function() {
|
|
448
|
+
return new RegExp("^" + Ze.C_CHARS + "+$").test(this.data);
|
|
449
|
+
}
|
|
450
|
+
}]), e;
|
|
451
|
+
}(Yn.default);
|
|
452
|
+
$e.default = er;
|
|
453
|
+
Object.defineProperty(p, "__esModule", {
|
|
454
|
+
value: !0
|
|
455
|
+
});
|
|
456
|
+
p.CODE128C = p.CODE128B = p.CODE128A = p.CODE128 = void 0;
|
|
457
|
+
var tr = Oe, nr = K(tr), rr = me, ar = K(rr), ir = we, or = K(ir), ur = $e, fr = K(ur);
|
|
458
|
+
function K(t) {
|
|
459
|
+
return t && t.__esModule ? t : { default: t };
|
|
460
|
+
}
|
|
461
|
+
p.CODE128 = nr.default;
|
|
462
|
+
p.CODE128A = ar.default;
|
|
463
|
+
p.CODE128B = or.default;
|
|
464
|
+
p.CODE128C = fr.default;
|
|
465
|
+
var h = {}, xe = {}, y = {};
|
|
466
|
+
Object.defineProperty(y, "__esModule", {
|
|
467
|
+
value: !0
|
|
468
|
+
});
|
|
469
|
+
y.SIDE_BIN = "101";
|
|
470
|
+
y.MIDDLE_BIN = "01010";
|
|
471
|
+
y.BINARIES = {
|
|
472
|
+
L: [
|
|
473
|
+
// The L (left) type of encoding
|
|
474
|
+
"0001101",
|
|
475
|
+
"0011001",
|
|
476
|
+
"0010011",
|
|
477
|
+
"0111101",
|
|
478
|
+
"0100011",
|
|
479
|
+
"0110001",
|
|
480
|
+
"0101111",
|
|
481
|
+
"0111011",
|
|
482
|
+
"0110111",
|
|
483
|
+
"0001011"
|
|
484
|
+
],
|
|
485
|
+
G: [
|
|
486
|
+
// The G type of encoding
|
|
487
|
+
"0100111",
|
|
488
|
+
"0110011",
|
|
489
|
+
"0011011",
|
|
490
|
+
"0100001",
|
|
491
|
+
"0011101",
|
|
492
|
+
"0111001",
|
|
493
|
+
"0000101",
|
|
494
|
+
"0010001",
|
|
495
|
+
"0001001",
|
|
496
|
+
"0010111"
|
|
497
|
+
],
|
|
498
|
+
R: [
|
|
499
|
+
// The R (right) type of encoding
|
|
500
|
+
"1110010",
|
|
501
|
+
"1100110",
|
|
502
|
+
"1101100",
|
|
503
|
+
"1000010",
|
|
504
|
+
"1011100",
|
|
505
|
+
"1001110",
|
|
506
|
+
"1010000",
|
|
507
|
+
"1000100",
|
|
508
|
+
"1001000",
|
|
509
|
+
"1110100"
|
|
510
|
+
],
|
|
511
|
+
O: [
|
|
512
|
+
// The O (odd) encoding for UPC-E
|
|
513
|
+
"0001101",
|
|
514
|
+
"0011001",
|
|
515
|
+
"0010011",
|
|
516
|
+
"0111101",
|
|
517
|
+
"0100011",
|
|
518
|
+
"0110001",
|
|
519
|
+
"0101111",
|
|
520
|
+
"0111011",
|
|
521
|
+
"0110111",
|
|
522
|
+
"0001011"
|
|
523
|
+
],
|
|
524
|
+
E: [
|
|
525
|
+
// The E (even) encoding for UPC-E
|
|
526
|
+
"0100111",
|
|
527
|
+
"0110011",
|
|
528
|
+
"0011011",
|
|
529
|
+
"0100001",
|
|
530
|
+
"0011101",
|
|
531
|
+
"0111001",
|
|
532
|
+
"0000101",
|
|
533
|
+
"0010001",
|
|
534
|
+
"0001001",
|
|
535
|
+
"0010111"
|
|
536
|
+
]
|
|
537
|
+
};
|
|
538
|
+
y.EAN2_STRUCTURE = ["LL", "LG", "GL", "GG"];
|
|
539
|
+
y.EAN5_STRUCTURE = ["GGLLL", "GLGLL", "GLLGL", "GLLLG", "LGGLL", "LLGGL", "LLLGG", "LGLGL", "LGLLG", "LLGLG"];
|
|
540
|
+
y.EAN13_STRUCTURE = ["LLLLLL", "LLGLGG", "LLGGLG", "LLGGGL", "LGLLGG", "LGGLLG", "LGGGLL", "LGLGLG", "LGLGGL", "LGGLGL"];
|
|
541
|
+
var ee = {}, w = {};
|
|
542
|
+
Object.defineProperty(w, "__esModule", {
|
|
543
|
+
value: !0
|
|
544
|
+
});
|
|
545
|
+
var cr = y, lr = function(e, r, n) {
|
|
546
|
+
var a = e.split("").map(function(o, u) {
|
|
547
|
+
return cr.BINARIES[r[u]];
|
|
548
|
+
}).map(function(o, u) {
|
|
549
|
+
return o ? o[e[u]] : "";
|
|
550
|
+
});
|
|
551
|
+
if (n) {
|
|
552
|
+
var i = e.length - 1;
|
|
553
|
+
a = a.map(function(o, u) {
|
|
554
|
+
return u < i ? o + n : o;
|
|
555
|
+
});
|
|
556
|
+
}
|
|
557
|
+
return a.join("");
|
|
558
|
+
};
|
|
559
|
+
w.default = lr;
|
|
560
|
+
Object.defineProperty(ee, "__esModule", {
|
|
561
|
+
value: !0
|
|
562
|
+
});
|
|
563
|
+
var hr = function() {
|
|
564
|
+
function t(e, r) {
|
|
565
|
+
for (var n = 0; n < r.length; n++) {
|
|
566
|
+
var a = r[n];
|
|
567
|
+
a.enumerable = a.enumerable || !1, a.configurable = !0, "value" in a && (a.writable = !0), Object.defineProperty(e, a.key, a);
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
return function(e, r, n) {
|
|
571
|
+
return r && t(e.prototype, r), n && t(e, n), e;
|
|
572
|
+
};
|
|
573
|
+
}(), S = y, dr = w, Ke = mt(dr), _r = l, vr = mt(_r);
|
|
574
|
+
function mt(t) {
|
|
575
|
+
return t && t.__esModule ? t : { default: t };
|
|
576
|
+
}
|
|
577
|
+
function sr(t, e) {
|
|
578
|
+
if (!(t instanceof e))
|
|
579
|
+
throw new TypeError("Cannot call a class as a function");
|
|
580
|
+
}
|
|
581
|
+
function yr(t, e) {
|
|
582
|
+
if (!t)
|
|
583
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
584
|
+
return e && (typeof e == "object" || typeof e == "function") ? e : t;
|
|
585
|
+
}
|
|
586
|
+
function pr(t, e) {
|
|
587
|
+
if (typeof e != "function" && e !== null)
|
|
588
|
+
throw new TypeError("Super expression must either be null or a function, not " + typeof e);
|
|
589
|
+
t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e);
|
|
590
|
+
}
|
|
591
|
+
var gr = function(t) {
|
|
592
|
+
pr(e, t);
|
|
593
|
+
function e(r, n) {
|
|
594
|
+
sr(this, e);
|
|
595
|
+
var a = yr(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, r, n));
|
|
596
|
+
return a.fontSize = !n.flat && n.fontSize > n.width * 10 ? n.width * 10 : n.fontSize, a.guardHeight = n.height + a.fontSize / 2 + n.textMargin, a;
|
|
597
|
+
}
|
|
598
|
+
return hr(e, [{
|
|
599
|
+
key: "encode",
|
|
600
|
+
value: function() {
|
|
601
|
+
return this.options.flat ? this.encodeFlat() : this.encodeGuarded();
|
|
602
|
+
}
|
|
603
|
+
}, {
|
|
604
|
+
key: "leftText",
|
|
605
|
+
value: function(n, a) {
|
|
606
|
+
return this.text.substr(n, a);
|
|
607
|
+
}
|
|
608
|
+
}, {
|
|
609
|
+
key: "leftEncode",
|
|
610
|
+
value: function(n, a) {
|
|
611
|
+
return (0, Ke.default)(n, a);
|
|
612
|
+
}
|
|
613
|
+
}, {
|
|
614
|
+
key: "rightText",
|
|
615
|
+
value: function(n, a) {
|
|
616
|
+
return this.text.substr(n, a);
|
|
617
|
+
}
|
|
618
|
+
}, {
|
|
619
|
+
key: "rightEncode",
|
|
620
|
+
value: function(n, a) {
|
|
621
|
+
return (0, Ke.default)(n, a);
|
|
622
|
+
}
|
|
623
|
+
}, {
|
|
624
|
+
key: "encodeGuarded",
|
|
625
|
+
value: function() {
|
|
626
|
+
var n = { fontSize: this.fontSize }, a = { height: this.guardHeight };
|
|
627
|
+
return [{ data: S.SIDE_BIN, options: a }, { data: this.leftEncode(), text: this.leftText(), options: n }, { data: S.MIDDLE_BIN, options: a }, { data: this.rightEncode(), text: this.rightText(), options: n }, { data: S.SIDE_BIN, options: a }];
|
|
628
|
+
}
|
|
629
|
+
}, {
|
|
630
|
+
key: "encodeFlat",
|
|
631
|
+
value: function() {
|
|
632
|
+
var n = [S.SIDE_BIN, this.leftEncode(), S.MIDDLE_BIN, this.rightEncode(), S.SIDE_BIN];
|
|
633
|
+
return {
|
|
634
|
+
data: n.join(""),
|
|
635
|
+
text: this.text
|
|
636
|
+
};
|
|
637
|
+
}
|
|
638
|
+
}]), e;
|
|
639
|
+
}(vr.default);
|
|
640
|
+
ee.default = gr;
|
|
641
|
+
Object.defineProperty(xe, "__esModule", {
|
|
642
|
+
value: !0
|
|
643
|
+
});
|
|
644
|
+
var Or = function() {
|
|
645
|
+
function t(e, r) {
|
|
646
|
+
for (var n = 0; n < r.length; n++) {
|
|
647
|
+
var a = r[n];
|
|
648
|
+
a.enumerable = a.enumerable || !1, a.configurable = !0, "value" in a && (a.writable = !0), Object.defineProperty(e, a.key, a);
|
|
649
|
+
}
|
|
650
|
+
}
|
|
651
|
+
return function(e, r, n) {
|
|
652
|
+
return r && t(e.prototype, r), n && t(e, n), e;
|
|
653
|
+
};
|
|
654
|
+
}(), C = function t(e, r, n) {
|
|
655
|
+
e === null && (e = Function.prototype);
|
|
656
|
+
var a = Object.getOwnPropertyDescriptor(e, r);
|
|
657
|
+
if (a === void 0) {
|
|
658
|
+
var i = Object.getPrototypeOf(e);
|
|
659
|
+
return i === null ? void 0 : t(i, r, n);
|
|
660
|
+
} else {
|
|
661
|
+
if ("value" in a)
|
|
662
|
+
return a.value;
|
|
663
|
+
var o = a.get;
|
|
664
|
+
return o === void 0 ? void 0 : o.call(n);
|
|
665
|
+
}
|
|
666
|
+
}, Er = y, br = ee, mr = wr(br);
|
|
667
|
+
function wr(t) {
|
|
668
|
+
return t && t.__esModule ? t : { default: t };
|
|
669
|
+
}
|
|
670
|
+
function $r(t, e) {
|
|
671
|
+
if (!(t instanceof e))
|
|
672
|
+
throw new TypeError("Cannot call a class as a function");
|
|
673
|
+
}
|
|
674
|
+
function xr(t, e) {
|
|
675
|
+
if (!t)
|
|
676
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
677
|
+
return e && (typeof e == "object" || typeof e == "function") ? e : t;
|
|
678
|
+
}
|
|
679
|
+
function Sr(t, e) {
|
|
680
|
+
if (typeof e != "function" && e !== null)
|
|
681
|
+
throw new TypeError("Super expression must either be null or a function, not " + typeof e);
|
|
682
|
+
t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e);
|
|
683
|
+
}
|
|
684
|
+
var et = function(e) {
|
|
685
|
+
var r = e.substr(0, 12).split("").map(function(n) {
|
|
686
|
+
return +n;
|
|
687
|
+
}).reduce(function(n, a, i) {
|
|
688
|
+
return i % 2 ? n + a * 3 : n + a;
|
|
689
|
+
}, 0);
|
|
690
|
+
return (10 - r % 10) % 10;
|
|
691
|
+
}, Ar = function(t) {
|
|
692
|
+
Sr(e, t);
|
|
693
|
+
function e(r, n) {
|
|
694
|
+
$r(this, e), r.search(/^[0-9]{12}$/) !== -1 && (r += et(r));
|
|
695
|
+
var a = xr(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, r, n));
|
|
696
|
+
return a.lastChar = n.lastChar, a;
|
|
697
|
+
}
|
|
698
|
+
return Or(e, [{
|
|
699
|
+
key: "valid",
|
|
700
|
+
value: function() {
|
|
701
|
+
return this.data.search(/^[0-9]{13}$/) !== -1 && +this.data[12] === et(this.data);
|
|
702
|
+
}
|
|
703
|
+
}, {
|
|
704
|
+
key: "leftText",
|
|
705
|
+
value: function() {
|
|
706
|
+
return C(e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), "leftText", this).call(this, 1, 6);
|
|
707
|
+
}
|
|
708
|
+
}, {
|
|
709
|
+
key: "leftEncode",
|
|
710
|
+
value: function() {
|
|
711
|
+
var n = this.data.substr(1, 6), a = Er.EAN13_STRUCTURE[this.data[0]];
|
|
712
|
+
return C(e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), "leftEncode", this).call(this, n, a);
|
|
713
|
+
}
|
|
714
|
+
}, {
|
|
715
|
+
key: "rightText",
|
|
716
|
+
value: function() {
|
|
717
|
+
return C(e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), "rightText", this).call(this, 7, 6);
|
|
718
|
+
}
|
|
719
|
+
}, {
|
|
720
|
+
key: "rightEncode",
|
|
721
|
+
value: function() {
|
|
722
|
+
var n = this.data.substr(7, 6);
|
|
723
|
+
return C(e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), "rightEncode", this).call(this, n, "RRRRRR");
|
|
724
|
+
}
|
|
725
|
+
// The "standard" way of printing EAN13 barcodes with guard bars
|
|
726
|
+
}, {
|
|
727
|
+
key: "encodeGuarded",
|
|
728
|
+
value: function() {
|
|
729
|
+
var n = C(e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), "encodeGuarded", this).call(this);
|
|
730
|
+
return this.options.displayValue && (n.unshift({
|
|
731
|
+
data: "000000000000",
|
|
732
|
+
text: this.text.substr(0, 1),
|
|
733
|
+
options: { textAlign: "left", fontSize: this.fontSize }
|
|
734
|
+
}), this.options.lastChar && (n.push({
|
|
735
|
+
data: "00"
|
|
736
|
+
}), n.push({
|
|
737
|
+
data: "00000",
|
|
738
|
+
text: this.options.lastChar,
|
|
739
|
+
options: { fontSize: this.fontSize }
|
|
740
|
+
}))), n;
|
|
741
|
+
}
|
|
742
|
+
}]), e;
|
|
743
|
+
}(mr.default);
|
|
744
|
+
xe.default = Ar;
|
|
745
|
+
var Se = {};
|
|
746
|
+
Object.defineProperty(Se, "__esModule", {
|
|
747
|
+
value: !0
|
|
748
|
+
});
|
|
749
|
+
var Rr = function() {
|
|
750
|
+
function t(e, r) {
|
|
751
|
+
for (var n = 0; n < r.length; n++) {
|
|
752
|
+
var a = r[n];
|
|
753
|
+
a.enumerable = a.enumerable || !1, a.configurable = !0, "value" in a && (a.writable = !0), Object.defineProperty(e, a.key, a);
|
|
754
|
+
}
|
|
755
|
+
}
|
|
756
|
+
return function(e, r, n) {
|
|
757
|
+
return r && t(e.prototype, r), n && t(e, n), e;
|
|
758
|
+
};
|
|
759
|
+
}(), q = function t(e, r, n) {
|
|
760
|
+
e === null && (e = Function.prototype);
|
|
761
|
+
var a = Object.getOwnPropertyDescriptor(e, r);
|
|
762
|
+
if (a === void 0) {
|
|
763
|
+
var i = Object.getPrototypeOf(e);
|
|
764
|
+
return i === null ? void 0 : t(i, r, n);
|
|
765
|
+
} else {
|
|
766
|
+
if ("value" in a)
|
|
767
|
+
return a.value;
|
|
768
|
+
var o = a.get;
|
|
769
|
+
return o === void 0 ? void 0 : o.call(n);
|
|
770
|
+
}
|
|
771
|
+
}, Pr = ee, Tr = Mr(Pr);
|
|
772
|
+
function Mr(t) {
|
|
773
|
+
return t && t.__esModule ? t : { default: t };
|
|
774
|
+
}
|
|
775
|
+
function Ir(t, e) {
|
|
776
|
+
if (!(t instanceof e))
|
|
777
|
+
throw new TypeError("Cannot call a class as a function");
|
|
778
|
+
}
|
|
779
|
+
function kr(t, e) {
|
|
780
|
+
if (!t)
|
|
781
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
782
|
+
return e && (typeof e == "object" || typeof e == "function") ? e : t;
|
|
783
|
+
}
|
|
784
|
+
function Dr(t, e) {
|
|
785
|
+
if (typeof e != "function" && e !== null)
|
|
786
|
+
throw new TypeError("Super expression must either be null or a function, not " + typeof e);
|
|
787
|
+
t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e);
|
|
788
|
+
}
|
|
789
|
+
var tt = function(e) {
|
|
790
|
+
var r = e.substr(0, 7).split("").map(function(n) {
|
|
791
|
+
return +n;
|
|
792
|
+
}).reduce(function(n, a, i) {
|
|
793
|
+
return i % 2 ? n + a : n + a * 3;
|
|
794
|
+
}, 0);
|
|
795
|
+
return (10 - r % 10) % 10;
|
|
796
|
+
}, jr = function(t) {
|
|
797
|
+
Dr(e, t);
|
|
798
|
+
function e(r, n) {
|
|
799
|
+
return Ir(this, e), r.search(/^[0-9]{7}$/) !== -1 && (r += tt(r)), kr(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, r, n));
|
|
800
|
+
}
|
|
801
|
+
return Rr(e, [{
|
|
802
|
+
key: "valid",
|
|
803
|
+
value: function() {
|
|
804
|
+
return this.data.search(/^[0-9]{8}$/) !== -1 && +this.data[7] === tt(this.data);
|
|
805
|
+
}
|
|
806
|
+
}, {
|
|
807
|
+
key: "leftText",
|
|
808
|
+
value: function() {
|
|
809
|
+
return q(e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), "leftText", this).call(this, 0, 4);
|
|
810
|
+
}
|
|
811
|
+
}, {
|
|
812
|
+
key: "leftEncode",
|
|
813
|
+
value: function() {
|
|
814
|
+
var n = this.data.substr(0, 4);
|
|
815
|
+
return q(e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), "leftEncode", this).call(this, n, "LLLL");
|
|
816
|
+
}
|
|
817
|
+
}, {
|
|
818
|
+
key: "rightText",
|
|
819
|
+
value: function() {
|
|
820
|
+
return q(e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), "rightText", this).call(this, 4, 4);
|
|
821
|
+
}
|
|
822
|
+
}, {
|
|
823
|
+
key: "rightEncode",
|
|
824
|
+
value: function() {
|
|
825
|
+
var n = this.data.substr(4, 4);
|
|
826
|
+
return q(e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), "rightEncode", this).call(this, n, "RRRR");
|
|
827
|
+
}
|
|
828
|
+
}]), e;
|
|
829
|
+
}(Tr.default);
|
|
830
|
+
Se.default = jr;
|
|
831
|
+
var Ae = {};
|
|
832
|
+
Object.defineProperty(Ae, "__esModule", {
|
|
833
|
+
value: !0
|
|
834
|
+
});
|
|
835
|
+
var Br = function() {
|
|
836
|
+
function t(e, r) {
|
|
837
|
+
for (var n = 0; n < r.length; n++) {
|
|
838
|
+
var a = r[n];
|
|
839
|
+
a.enumerable = a.enumerable || !1, a.configurable = !0, "value" in a && (a.writable = !0), Object.defineProperty(e, a.key, a);
|
|
840
|
+
}
|
|
841
|
+
}
|
|
842
|
+
return function(e, r, n) {
|
|
843
|
+
return r && t(e.prototype, r), n && t(e, n), e;
|
|
844
|
+
};
|
|
845
|
+
}(), Lr = y, Cr = w, Nr = wt(Cr), Gr = l, Fr = wt(Gr);
|
|
846
|
+
function wt(t) {
|
|
847
|
+
return t && t.__esModule ? t : { default: t };
|
|
848
|
+
}
|
|
849
|
+
function Hr(t, e) {
|
|
850
|
+
if (!(t instanceof e))
|
|
851
|
+
throw new TypeError("Cannot call a class as a function");
|
|
852
|
+
}
|
|
853
|
+
function zr(t, e) {
|
|
854
|
+
if (!t)
|
|
855
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
856
|
+
return e && (typeof e == "object" || typeof e == "function") ? e : t;
|
|
857
|
+
}
|
|
858
|
+
function Xr(t, e) {
|
|
859
|
+
if (typeof e != "function" && e !== null)
|
|
860
|
+
throw new TypeError("Super expression must either be null or a function, not " + typeof e);
|
|
861
|
+
t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e);
|
|
862
|
+
}
|
|
863
|
+
var Ur = function(e) {
|
|
864
|
+
var r = e.split("").map(function(n) {
|
|
865
|
+
return +n;
|
|
866
|
+
}).reduce(function(n, a, i) {
|
|
867
|
+
return i % 2 ? n + a * 9 : n + a * 3;
|
|
868
|
+
}, 0);
|
|
869
|
+
return r % 10;
|
|
870
|
+
}, Vr = function(t) {
|
|
871
|
+
Xr(e, t);
|
|
872
|
+
function e(r, n) {
|
|
873
|
+
return Hr(this, e), zr(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, r, n));
|
|
874
|
+
}
|
|
875
|
+
return Br(e, [{
|
|
876
|
+
key: "valid",
|
|
877
|
+
value: function() {
|
|
878
|
+
return this.data.search(/^[0-9]{5}$/) !== -1;
|
|
879
|
+
}
|
|
880
|
+
}, {
|
|
881
|
+
key: "encode",
|
|
882
|
+
value: function() {
|
|
883
|
+
var n = Lr.EAN5_STRUCTURE[Ur(this.data)];
|
|
884
|
+
return {
|
|
885
|
+
data: "1011" + (0, Nr.default)(this.data, n, "01"),
|
|
886
|
+
text: this.text
|
|
887
|
+
};
|
|
888
|
+
}
|
|
889
|
+
}]), e;
|
|
890
|
+
}(Fr.default);
|
|
891
|
+
Ae.default = Vr;
|
|
892
|
+
var Re = {};
|
|
893
|
+
Object.defineProperty(Re, "__esModule", {
|
|
894
|
+
value: !0
|
|
895
|
+
});
|
|
896
|
+
var qr = function() {
|
|
897
|
+
function t(e, r) {
|
|
898
|
+
for (var n = 0; n < r.length; n++) {
|
|
899
|
+
var a = r[n];
|
|
900
|
+
a.enumerable = a.enumerable || !1, a.configurable = !0, "value" in a && (a.writable = !0), Object.defineProperty(e, a.key, a);
|
|
901
|
+
}
|
|
902
|
+
}
|
|
903
|
+
return function(e, r, n) {
|
|
904
|
+
return r && t(e.prototype, r), n && t(e, n), e;
|
|
905
|
+
};
|
|
906
|
+
}(), Jr = y, Yr = w, Wr = $t(Yr), Qr = l, Zr = $t(Qr);
|
|
907
|
+
function $t(t) {
|
|
908
|
+
return t && t.__esModule ? t : { default: t };
|
|
909
|
+
}
|
|
910
|
+
function Kr(t, e) {
|
|
911
|
+
if (!(t instanceof e))
|
|
912
|
+
throw new TypeError("Cannot call a class as a function");
|
|
913
|
+
}
|
|
914
|
+
function ea(t, e) {
|
|
915
|
+
if (!t)
|
|
916
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
917
|
+
return e && (typeof e == "object" || typeof e == "function") ? e : t;
|
|
918
|
+
}
|
|
919
|
+
function ta(t, e) {
|
|
920
|
+
if (typeof e != "function" && e !== null)
|
|
921
|
+
throw new TypeError("Super expression must either be null or a function, not " + typeof e);
|
|
922
|
+
t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e);
|
|
923
|
+
}
|
|
924
|
+
var na = function(t) {
|
|
925
|
+
ta(e, t);
|
|
926
|
+
function e(r, n) {
|
|
927
|
+
return Kr(this, e), ea(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, r, n));
|
|
928
|
+
}
|
|
929
|
+
return qr(e, [{
|
|
930
|
+
key: "valid",
|
|
931
|
+
value: function() {
|
|
932
|
+
return this.data.search(/^[0-9]{2}$/) !== -1;
|
|
933
|
+
}
|
|
934
|
+
}, {
|
|
935
|
+
key: "encode",
|
|
936
|
+
value: function() {
|
|
937
|
+
var n = Jr.EAN2_STRUCTURE[parseInt(this.data) % 4];
|
|
938
|
+
return {
|
|
939
|
+
// Start bits + Encode the two digits with 01 in between
|
|
940
|
+
data: "1011" + (0, Wr.default)(this.data, n, "01"),
|
|
941
|
+
text: this.text
|
|
942
|
+
};
|
|
943
|
+
}
|
|
944
|
+
}]), e;
|
|
945
|
+
}(Zr.default);
|
|
946
|
+
Re.default = na;
|
|
947
|
+
var F = {};
|
|
948
|
+
Object.defineProperty(F, "__esModule", {
|
|
949
|
+
value: !0
|
|
950
|
+
});
|
|
951
|
+
var ra = function() {
|
|
952
|
+
function t(e, r) {
|
|
953
|
+
for (var n = 0; n < r.length; n++) {
|
|
954
|
+
var a = r[n];
|
|
955
|
+
a.enumerable = a.enumerable || !1, a.configurable = !0, "value" in a && (a.writable = !0), Object.defineProperty(e, a.key, a);
|
|
956
|
+
}
|
|
957
|
+
}
|
|
958
|
+
return function(e, r, n) {
|
|
959
|
+
return r && t(e.prototype, r), n && t(e, n), e;
|
|
960
|
+
};
|
|
961
|
+
}();
|
|
962
|
+
F.checksum = se;
|
|
963
|
+
var aa = w, A = xt(aa), ia = l, oa = xt(ia);
|
|
964
|
+
function xt(t) {
|
|
965
|
+
return t && t.__esModule ? t : { default: t };
|
|
966
|
+
}
|
|
967
|
+
function ua(t, e) {
|
|
968
|
+
if (!(t instanceof e))
|
|
969
|
+
throw new TypeError("Cannot call a class as a function");
|
|
970
|
+
}
|
|
971
|
+
function fa(t, e) {
|
|
972
|
+
if (!t)
|
|
973
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
974
|
+
return e && (typeof e == "object" || typeof e == "function") ? e : t;
|
|
975
|
+
}
|
|
976
|
+
function ca(t, e) {
|
|
977
|
+
if (typeof e != "function" && e !== null)
|
|
978
|
+
throw new TypeError("Super expression must either be null or a function, not " + typeof e);
|
|
979
|
+
t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e);
|
|
980
|
+
}
|
|
981
|
+
var la = function(t) {
|
|
982
|
+
ca(e, t);
|
|
983
|
+
function e(r, n) {
|
|
984
|
+
ua(this, e), r.search(/^[0-9]{11}$/) !== -1 && (r += se(r));
|
|
985
|
+
var a = fa(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, r, n));
|
|
986
|
+
return a.displayValue = n.displayValue, n.fontSize > n.width * 10 ? a.fontSize = n.width * 10 : a.fontSize = n.fontSize, a.guardHeight = n.height + a.fontSize / 2 + n.textMargin, a;
|
|
987
|
+
}
|
|
988
|
+
return ra(e, [{
|
|
989
|
+
key: "valid",
|
|
990
|
+
value: function() {
|
|
991
|
+
return this.data.search(/^[0-9]{12}$/) !== -1 && this.data[11] == se(this.data);
|
|
992
|
+
}
|
|
993
|
+
}, {
|
|
994
|
+
key: "encode",
|
|
995
|
+
value: function() {
|
|
996
|
+
return this.options.flat ? this.flatEncoding() : this.guardedEncoding();
|
|
997
|
+
}
|
|
998
|
+
}, {
|
|
999
|
+
key: "flatEncoding",
|
|
1000
|
+
value: function() {
|
|
1001
|
+
var n = "";
|
|
1002
|
+
return n += "101", n += (0, A.default)(this.data.substr(0, 6), "LLLLLL"), n += "01010", n += (0, A.default)(this.data.substr(6, 6), "RRRRRR"), n += "101", {
|
|
1003
|
+
data: n,
|
|
1004
|
+
text: this.text
|
|
1005
|
+
};
|
|
1006
|
+
}
|
|
1007
|
+
}, {
|
|
1008
|
+
key: "guardedEncoding",
|
|
1009
|
+
value: function() {
|
|
1010
|
+
var n = [];
|
|
1011
|
+
return this.displayValue && n.push({
|
|
1012
|
+
data: "00000000",
|
|
1013
|
+
text: this.text.substr(0, 1),
|
|
1014
|
+
options: { textAlign: "left", fontSize: this.fontSize }
|
|
1015
|
+
}), n.push({
|
|
1016
|
+
data: "101" + (0, A.default)(this.data[0], "L"),
|
|
1017
|
+
options: { height: this.guardHeight }
|
|
1018
|
+
}), n.push({
|
|
1019
|
+
data: (0, A.default)(this.data.substr(1, 5), "LLLLL"),
|
|
1020
|
+
text: this.text.substr(1, 5),
|
|
1021
|
+
options: { fontSize: this.fontSize }
|
|
1022
|
+
}), n.push({
|
|
1023
|
+
data: "01010",
|
|
1024
|
+
options: { height: this.guardHeight }
|
|
1025
|
+
}), n.push({
|
|
1026
|
+
data: (0, A.default)(this.data.substr(6, 5), "RRRRR"),
|
|
1027
|
+
text: this.text.substr(6, 5),
|
|
1028
|
+
options: { fontSize: this.fontSize }
|
|
1029
|
+
}), n.push({
|
|
1030
|
+
data: (0, A.default)(this.data[11], "R") + "101",
|
|
1031
|
+
options: { height: this.guardHeight }
|
|
1032
|
+
}), this.displayValue && n.push({
|
|
1033
|
+
data: "00000000",
|
|
1034
|
+
text: this.text.substr(11, 1),
|
|
1035
|
+
options: { textAlign: "right", fontSize: this.fontSize }
|
|
1036
|
+
}), n;
|
|
1037
|
+
}
|
|
1038
|
+
}]), e;
|
|
1039
|
+
}(oa.default);
|
|
1040
|
+
function se(t) {
|
|
1041
|
+
var e = 0, r;
|
|
1042
|
+
for (r = 1; r < 11; r += 2)
|
|
1043
|
+
e += parseInt(t[r]);
|
|
1044
|
+
for (r = 0; r < 11; r += 2)
|
|
1045
|
+
e += parseInt(t[r]) * 3;
|
|
1046
|
+
return (10 - e % 10) % 10;
|
|
1047
|
+
}
|
|
1048
|
+
F.default = la;
|
|
1049
|
+
var Pe = {};
|
|
1050
|
+
Object.defineProperty(Pe, "__esModule", {
|
|
1051
|
+
value: !0
|
|
1052
|
+
});
|
|
1053
|
+
var ha = function() {
|
|
1054
|
+
function t(e, r) {
|
|
1055
|
+
for (var n = 0; n < r.length; n++) {
|
|
1056
|
+
var a = r[n];
|
|
1057
|
+
a.enumerable = a.enumerable || !1, a.configurable = !0, "value" in a && (a.writable = !0), Object.defineProperty(e, a.key, a);
|
|
1058
|
+
}
|
|
1059
|
+
}
|
|
1060
|
+
return function(e, r, n) {
|
|
1061
|
+
return r && t(e.prototype, r), n && t(e, n), e;
|
|
1062
|
+
};
|
|
1063
|
+
}(), da = w, _a = St(da), va = l, sa = St(va), ya = F;
|
|
1064
|
+
function St(t) {
|
|
1065
|
+
return t && t.__esModule ? t : { default: t };
|
|
1066
|
+
}
|
|
1067
|
+
function pa(t, e) {
|
|
1068
|
+
if (!(t instanceof e))
|
|
1069
|
+
throw new TypeError("Cannot call a class as a function");
|
|
1070
|
+
}
|
|
1071
|
+
function de(t, e) {
|
|
1072
|
+
if (!t)
|
|
1073
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
1074
|
+
return e && (typeof e == "object" || typeof e == "function") ? e : t;
|
|
1075
|
+
}
|
|
1076
|
+
function ga(t, e) {
|
|
1077
|
+
if (typeof e != "function" && e !== null)
|
|
1078
|
+
throw new TypeError("Super expression must either be null or a function, not " + typeof e);
|
|
1079
|
+
t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e);
|
|
1080
|
+
}
|
|
1081
|
+
var Oa = ["XX00000XXX", "XX10000XXX", "XX20000XXX", "XXX00000XX", "XXXX00000X", "XXXXX00005", "XXXXX00006", "XXXXX00007", "XXXXX00008", "XXXXX00009"], Ea = [["EEEOOO", "OOOEEE"], ["EEOEOO", "OOEOEE"], ["EEOOEO", "OOEEOE"], ["EEOOOE", "OOEEEO"], ["EOEEOO", "OEOOEE"], ["EOOEEO", "OEEOOE"], ["EOOOEE", "OEEEOO"], ["EOEOEO", "OEOEOE"], ["EOEOOE", "OEOEEO"], ["EOOEOE", "OEEOEO"]], ba = function(t) {
|
|
1082
|
+
ga(e, t);
|
|
1083
|
+
function e(r, n) {
|
|
1084
|
+
pa(this, e);
|
|
1085
|
+
var a = de(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, r, n));
|
|
1086
|
+
if (a.isValid = !1, r.search(/^[0-9]{6}$/) !== -1)
|
|
1087
|
+
a.middleDigits = r, a.upcA = nt(r, "0"), a.text = n.text || "" + a.upcA[0] + r + a.upcA[a.upcA.length - 1], a.isValid = !0;
|
|
1088
|
+
else if (r.search(/^[01][0-9]{7}$/) !== -1)
|
|
1089
|
+
if (a.middleDigits = r.substring(1, r.length - 1), a.upcA = nt(a.middleDigits, r[0]), a.upcA[a.upcA.length - 1] === r[r.length - 1])
|
|
1090
|
+
a.isValid = !0;
|
|
1091
|
+
else
|
|
1092
|
+
return de(a);
|
|
1093
|
+
else
|
|
1094
|
+
return de(a);
|
|
1095
|
+
return a.displayValue = n.displayValue, n.fontSize > n.width * 10 ? a.fontSize = n.width * 10 : a.fontSize = n.fontSize, a.guardHeight = n.height + a.fontSize / 2 + n.textMargin, a;
|
|
1096
|
+
}
|
|
1097
|
+
return ha(e, [{
|
|
1098
|
+
key: "valid",
|
|
1099
|
+
value: function() {
|
|
1100
|
+
return this.isValid;
|
|
1101
|
+
}
|
|
1102
|
+
}, {
|
|
1103
|
+
key: "encode",
|
|
1104
|
+
value: function() {
|
|
1105
|
+
return this.options.flat ? this.flatEncoding() : this.guardedEncoding();
|
|
1106
|
+
}
|
|
1107
|
+
}, {
|
|
1108
|
+
key: "flatEncoding",
|
|
1109
|
+
value: function() {
|
|
1110
|
+
var n = "";
|
|
1111
|
+
return n += "101", n += this.encodeMiddleDigits(), n += "010101", {
|
|
1112
|
+
data: n,
|
|
1113
|
+
text: this.text
|
|
1114
|
+
};
|
|
1115
|
+
}
|
|
1116
|
+
}, {
|
|
1117
|
+
key: "guardedEncoding",
|
|
1118
|
+
value: function() {
|
|
1119
|
+
var n = [];
|
|
1120
|
+
return this.displayValue && n.push({
|
|
1121
|
+
data: "00000000",
|
|
1122
|
+
text: this.text[0],
|
|
1123
|
+
options: { textAlign: "left", fontSize: this.fontSize }
|
|
1124
|
+
}), n.push({
|
|
1125
|
+
data: "101",
|
|
1126
|
+
options: { height: this.guardHeight }
|
|
1127
|
+
}), n.push({
|
|
1128
|
+
data: this.encodeMiddleDigits(),
|
|
1129
|
+
text: this.text.substring(1, 7),
|
|
1130
|
+
options: { fontSize: this.fontSize }
|
|
1131
|
+
}), n.push({
|
|
1132
|
+
data: "010101",
|
|
1133
|
+
options: { height: this.guardHeight }
|
|
1134
|
+
}), this.displayValue && n.push({
|
|
1135
|
+
data: "00000000",
|
|
1136
|
+
text: this.text[7],
|
|
1137
|
+
options: { textAlign: "right", fontSize: this.fontSize }
|
|
1138
|
+
}), n;
|
|
1139
|
+
}
|
|
1140
|
+
}, {
|
|
1141
|
+
key: "encodeMiddleDigits",
|
|
1142
|
+
value: function() {
|
|
1143
|
+
var n = this.upcA[0], a = this.upcA[this.upcA.length - 1], i = Ea[parseInt(a)][parseInt(n)];
|
|
1144
|
+
return (0, _a.default)(this.middleDigits, i);
|
|
1145
|
+
}
|
|
1146
|
+
}]), e;
|
|
1147
|
+
}(sa.default);
|
|
1148
|
+
function nt(t, e) {
|
|
1149
|
+
for (var r = parseInt(t[t.length - 1]), n = Oa[r], a = "", i = 0, o = 0; o < n.length; o++) {
|
|
1150
|
+
var u = n[o];
|
|
1151
|
+
u === "X" ? a += t[i++] : a += u;
|
|
1152
|
+
}
|
|
1153
|
+
return a = "" + e + a, "" + a + (0, ya.checksum)(a);
|
|
1154
|
+
}
|
|
1155
|
+
Pe.default = ba;
|
|
1156
|
+
Object.defineProperty(h, "__esModule", {
|
|
1157
|
+
value: !0
|
|
1158
|
+
});
|
|
1159
|
+
h.UPCE = h.UPC = h.EAN2 = h.EAN5 = h.EAN8 = h.EAN13 = void 0;
|
|
1160
|
+
var ma = xe, wa = I(ma), $a = Se, xa = I($a), Sa = Ae, Aa = I(Sa), Ra = Re, Pa = I(Ra), Ta = F, Ma = I(Ta), Ia = Pe, ka = I(Ia);
|
|
1161
|
+
function I(t) {
|
|
1162
|
+
return t && t.__esModule ? t : { default: t };
|
|
1163
|
+
}
|
|
1164
|
+
h.EAN13 = wa.default;
|
|
1165
|
+
h.EAN8 = xa.default;
|
|
1166
|
+
h.EAN5 = Aa.default;
|
|
1167
|
+
h.EAN2 = Pa.default;
|
|
1168
|
+
h.UPC = Ma.default;
|
|
1169
|
+
h.UPCE = ka.default;
|
|
1170
|
+
var P = {}, te = {}, H = {};
|
|
1171
|
+
Object.defineProperty(H, "__esModule", {
|
|
1172
|
+
value: !0
|
|
1173
|
+
});
|
|
1174
|
+
H.START_BIN = "1010";
|
|
1175
|
+
H.END_BIN = "11101";
|
|
1176
|
+
H.BINARIES = ["00110", "10001", "01001", "11000", "00101", "10100", "01100", "00011", "10010", "01010"];
|
|
1177
|
+
Object.defineProperty(te, "__esModule", {
|
|
1178
|
+
value: !0
|
|
1179
|
+
});
|
|
1180
|
+
var Da = function() {
|
|
1181
|
+
function t(e, r) {
|
|
1182
|
+
for (var n = 0; n < r.length; n++) {
|
|
1183
|
+
var a = r[n];
|
|
1184
|
+
a.enumerable = a.enumerable || !1, a.configurable = !0, "value" in a && (a.writable = !0), Object.defineProperty(e, a.key, a);
|
|
1185
|
+
}
|
|
1186
|
+
}
|
|
1187
|
+
return function(e, r, n) {
|
|
1188
|
+
return r && t(e.prototype, r), n && t(e, n), e;
|
|
1189
|
+
};
|
|
1190
|
+
}(), J = H, ja = l, Ba = La(ja);
|
|
1191
|
+
function La(t) {
|
|
1192
|
+
return t && t.__esModule ? t : { default: t };
|
|
1193
|
+
}
|
|
1194
|
+
function Ca(t, e) {
|
|
1195
|
+
if (!(t instanceof e))
|
|
1196
|
+
throw new TypeError("Cannot call a class as a function");
|
|
1197
|
+
}
|
|
1198
|
+
function Na(t, e) {
|
|
1199
|
+
if (!t)
|
|
1200
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
1201
|
+
return e && (typeof e == "object" || typeof e == "function") ? e : t;
|
|
1202
|
+
}
|
|
1203
|
+
function Ga(t, e) {
|
|
1204
|
+
if (typeof e != "function" && e !== null)
|
|
1205
|
+
throw new TypeError("Super expression must either be null or a function, not " + typeof e);
|
|
1206
|
+
t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e);
|
|
1207
|
+
}
|
|
1208
|
+
var Fa = function(t) {
|
|
1209
|
+
Ga(e, t);
|
|
1210
|
+
function e() {
|
|
1211
|
+
return Ca(this, e), Na(this, (e.__proto__ || Object.getPrototypeOf(e)).apply(this, arguments));
|
|
1212
|
+
}
|
|
1213
|
+
return Da(e, [{
|
|
1214
|
+
key: "valid",
|
|
1215
|
+
value: function() {
|
|
1216
|
+
return this.data.search(/^([0-9]{2})+$/) !== -1;
|
|
1217
|
+
}
|
|
1218
|
+
}, {
|
|
1219
|
+
key: "encode",
|
|
1220
|
+
value: function() {
|
|
1221
|
+
var n = this, a = this.data.match(/.{2}/g).map(function(i) {
|
|
1222
|
+
return n.encodePair(i);
|
|
1223
|
+
}).join("");
|
|
1224
|
+
return {
|
|
1225
|
+
data: J.START_BIN + a + J.END_BIN,
|
|
1226
|
+
text: this.text
|
|
1227
|
+
};
|
|
1228
|
+
}
|
|
1229
|
+
// Calculate the data of a number pair
|
|
1230
|
+
}, {
|
|
1231
|
+
key: "encodePair",
|
|
1232
|
+
value: function(n) {
|
|
1233
|
+
var a = J.BINARIES[n[1]];
|
|
1234
|
+
return J.BINARIES[n[0]].split("").map(function(i, o) {
|
|
1235
|
+
return (i === "1" ? "111" : "1") + (a[o] === "1" ? "000" : "0");
|
|
1236
|
+
}).join("");
|
|
1237
|
+
}
|
|
1238
|
+
}]), e;
|
|
1239
|
+
}(Ba.default);
|
|
1240
|
+
te.default = Fa;
|
|
1241
|
+
var Te = {};
|
|
1242
|
+
Object.defineProperty(Te, "__esModule", {
|
|
1243
|
+
value: !0
|
|
1244
|
+
});
|
|
1245
|
+
var Ha = function() {
|
|
1246
|
+
function t(e, r) {
|
|
1247
|
+
for (var n = 0; n < r.length; n++) {
|
|
1248
|
+
var a = r[n];
|
|
1249
|
+
a.enumerable = a.enumerable || !1, a.configurable = !0, "value" in a && (a.writable = !0), Object.defineProperty(e, a.key, a);
|
|
1250
|
+
}
|
|
1251
|
+
}
|
|
1252
|
+
return function(e, r, n) {
|
|
1253
|
+
return r && t(e.prototype, r), n && t(e, n), e;
|
|
1254
|
+
};
|
|
1255
|
+
}(), za = te, Xa = Ua(za);
|
|
1256
|
+
function Ua(t) {
|
|
1257
|
+
return t && t.__esModule ? t : { default: t };
|
|
1258
|
+
}
|
|
1259
|
+
function Va(t, e) {
|
|
1260
|
+
if (!(t instanceof e))
|
|
1261
|
+
throw new TypeError("Cannot call a class as a function");
|
|
1262
|
+
}
|
|
1263
|
+
function qa(t, e) {
|
|
1264
|
+
if (!t)
|
|
1265
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
1266
|
+
return e && (typeof e == "object" || typeof e == "function") ? e : t;
|
|
1267
|
+
}
|
|
1268
|
+
function Ja(t, e) {
|
|
1269
|
+
if (typeof e != "function" && e !== null)
|
|
1270
|
+
throw new TypeError("Super expression must either be null or a function, not " + typeof e);
|
|
1271
|
+
t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e);
|
|
1272
|
+
}
|
|
1273
|
+
var rt = function(e) {
|
|
1274
|
+
var r = e.substr(0, 13).split("").map(function(n) {
|
|
1275
|
+
return parseInt(n, 10);
|
|
1276
|
+
}).reduce(function(n, a, i) {
|
|
1277
|
+
return n + a * (3 - i % 2 * 2);
|
|
1278
|
+
}, 0);
|
|
1279
|
+
return Math.ceil(r / 10) * 10 - r;
|
|
1280
|
+
}, Ya = function(t) {
|
|
1281
|
+
Ja(e, t);
|
|
1282
|
+
function e(r, n) {
|
|
1283
|
+
return Va(this, e), r.search(/^[0-9]{13}$/) !== -1 && (r += rt(r)), qa(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, r, n));
|
|
1284
|
+
}
|
|
1285
|
+
return Ha(e, [{
|
|
1286
|
+
key: "valid",
|
|
1287
|
+
value: function() {
|
|
1288
|
+
return this.data.search(/^[0-9]{14}$/) !== -1 && +this.data[13] === rt(this.data);
|
|
1289
|
+
}
|
|
1290
|
+
}]), e;
|
|
1291
|
+
}(Xa.default);
|
|
1292
|
+
Te.default = Ya;
|
|
1293
|
+
Object.defineProperty(P, "__esModule", {
|
|
1294
|
+
value: !0
|
|
1295
|
+
});
|
|
1296
|
+
P.ITF14 = P.ITF = void 0;
|
|
1297
|
+
var Wa = te, Qa = At(Wa), Za = Te, Ka = At(Za);
|
|
1298
|
+
function At(t) {
|
|
1299
|
+
return t && t.__esModule ? t : { default: t };
|
|
1300
|
+
}
|
|
1301
|
+
P.ITF = Qa.default;
|
|
1302
|
+
P.ITF14 = Ka.default;
|
|
1303
|
+
var s = {}, $ = {};
|
|
1304
|
+
Object.defineProperty($, "__esModule", {
|
|
1305
|
+
value: !0
|
|
1306
|
+
});
|
|
1307
|
+
var ei = function() {
|
|
1308
|
+
function t(e, r) {
|
|
1309
|
+
for (var n = 0; n < r.length; n++) {
|
|
1310
|
+
var a = r[n];
|
|
1311
|
+
a.enumerable = a.enumerable || !1, a.configurable = !0, "value" in a && (a.writable = !0), Object.defineProperty(e, a.key, a);
|
|
1312
|
+
}
|
|
1313
|
+
}
|
|
1314
|
+
return function(e, r, n) {
|
|
1315
|
+
return r && t(e.prototype, r), n && t(e, n), e;
|
|
1316
|
+
};
|
|
1317
|
+
}(), ti = l, ni = ri(ti);
|
|
1318
|
+
function ri(t) {
|
|
1319
|
+
return t && t.__esModule ? t : { default: t };
|
|
1320
|
+
}
|
|
1321
|
+
function ai(t, e) {
|
|
1322
|
+
if (!(t instanceof e))
|
|
1323
|
+
throw new TypeError("Cannot call a class as a function");
|
|
1324
|
+
}
|
|
1325
|
+
function ii(t, e) {
|
|
1326
|
+
if (!t)
|
|
1327
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
1328
|
+
return e && (typeof e == "object" || typeof e == "function") ? e : t;
|
|
1329
|
+
}
|
|
1330
|
+
function oi(t, e) {
|
|
1331
|
+
if (typeof e != "function" && e !== null)
|
|
1332
|
+
throw new TypeError("Super expression must either be null or a function, not " + typeof e);
|
|
1333
|
+
t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e);
|
|
1334
|
+
}
|
|
1335
|
+
var ui = function(t) {
|
|
1336
|
+
oi(e, t);
|
|
1337
|
+
function e(r, n) {
|
|
1338
|
+
return ai(this, e), ii(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, r, n));
|
|
1339
|
+
}
|
|
1340
|
+
return ei(e, [{
|
|
1341
|
+
key: "encode",
|
|
1342
|
+
value: function() {
|
|
1343
|
+
for (var n = "110", a = 0; a < this.data.length; a++) {
|
|
1344
|
+
var i = parseInt(this.data[a]), o = i.toString(2);
|
|
1345
|
+
o = fi(o, 4 - o.length);
|
|
1346
|
+
for (var u = 0; u < o.length; u++)
|
|
1347
|
+
n += o[u] == "0" ? "100" : "110";
|
|
1348
|
+
}
|
|
1349
|
+
return n += "1001", {
|
|
1350
|
+
data: n,
|
|
1351
|
+
text: this.text
|
|
1352
|
+
};
|
|
1353
|
+
}
|
|
1354
|
+
}, {
|
|
1355
|
+
key: "valid",
|
|
1356
|
+
value: function() {
|
|
1357
|
+
return this.data.search(/^[0-9]+$/) !== -1;
|
|
1358
|
+
}
|
|
1359
|
+
}]), e;
|
|
1360
|
+
}(ni.default);
|
|
1361
|
+
function fi(t, e) {
|
|
1362
|
+
for (var r = 0; r < e; r++)
|
|
1363
|
+
t = "0" + t;
|
|
1364
|
+
return t;
|
|
1365
|
+
}
|
|
1366
|
+
$.default = ui;
|
|
1367
|
+
var Me = {}, x = {};
|
|
1368
|
+
Object.defineProperty(x, "__esModule", {
|
|
1369
|
+
value: !0
|
|
1370
|
+
});
|
|
1371
|
+
x.mod10 = ci;
|
|
1372
|
+
x.mod11 = li;
|
|
1373
|
+
function ci(t) {
|
|
1374
|
+
for (var e = 0, r = 0; r < t.length; r++) {
|
|
1375
|
+
var n = parseInt(t[r]);
|
|
1376
|
+
(r + t.length) % 2 === 0 ? e += n : e += n * 2 % 10 + Math.floor(n * 2 / 10);
|
|
1377
|
+
}
|
|
1378
|
+
return (10 - e % 10) % 10;
|
|
1379
|
+
}
|
|
1380
|
+
function li(t) {
|
|
1381
|
+
for (var e = 0, r = [2, 3, 4, 5, 6, 7], n = 0; n < t.length; n++) {
|
|
1382
|
+
var a = parseInt(t[t.length - 1 - n]);
|
|
1383
|
+
e += r[n % r.length] * a;
|
|
1384
|
+
}
|
|
1385
|
+
return (11 - e % 11) % 11;
|
|
1386
|
+
}
|
|
1387
|
+
Object.defineProperty(Me, "__esModule", {
|
|
1388
|
+
value: !0
|
|
1389
|
+
});
|
|
1390
|
+
var hi = $, di = vi(hi), _i = x;
|
|
1391
|
+
function vi(t) {
|
|
1392
|
+
return t && t.__esModule ? t : { default: t };
|
|
1393
|
+
}
|
|
1394
|
+
function si(t, e) {
|
|
1395
|
+
if (!(t instanceof e))
|
|
1396
|
+
throw new TypeError("Cannot call a class as a function");
|
|
1397
|
+
}
|
|
1398
|
+
function yi(t, e) {
|
|
1399
|
+
if (!t)
|
|
1400
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
1401
|
+
return e && (typeof e == "object" || typeof e == "function") ? e : t;
|
|
1402
|
+
}
|
|
1403
|
+
function pi(t, e) {
|
|
1404
|
+
if (typeof e != "function" && e !== null)
|
|
1405
|
+
throw new TypeError("Super expression must either be null or a function, not " + typeof e);
|
|
1406
|
+
t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e);
|
|
1407
|
+
}
|
|
1408
|
+
var gi = function(t) {
|
|
1409
|
+
pi(e, t);
|
|
1410
|
+
function e(r, n) {
|
|
1411
|
+
return si(this, e), yi(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, r + (0, _i.mod10)(r), n));
|
|
1412
|
+
}
|
|
1413
|
+
return e;
|
|
1414
|
+
}(di.default);
|
|
1415
|
+
Me.default = gi;
|
|
1416
|
+
var Ie = {};
|
|
1417
|
+
Object.defineProperty(Ie, "__esModule", {
|
|
1418
|
+
value: !0
|
|
1419
|
+
});
|
|
1420
|
+
var Oi = $, Ei = mi(Oi), bi = x;
|
|
1421
|
+
function mi(t) {
|
|
1422
|
+
return t && t.__esModule ? t : { default: t };
|
|
1423
|
+
}
|
|
1424
|
+
function wi(t, e) {
|
|
1425
|
+
if (!(t instanceof e))
|
|
1426
|
+
throw new TypeError("Cannot call a class as a function");
|
|
1427
|
+
}
|
|
1428
|
+
function $i(t, e) {
|
|
1429
|
+
if (!t)
|
|
1430
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
1431
|
+
return e && (typeof e == "object" || typeof e == "function") ? e : t;
|
|
1432
|
+
}
|
|
1433
|
+
function xi(t, e) {
|
|
1434
|
+
if (typeof e != "function" && e !== null)
|
|
1435
|
+
throw new TypeError("Super expression must either be null or a function, not " + typeof e);
|
|
1436
|
+
t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e);
|
|
1437
|
+
}
|
|
1438
|
+
var Si = function(t) {
|
|
1439
|
+
xi(e, t);
|
|
1440
|
+
function e(r, n) {
|
|
1441
|
+
return wi(this, e), $i(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, r + (0, bi.mod11)(r), n));
|
|
1442
|
+
}
|
|
1443
|
+
return e;
|
|
1444
|
+
}(Ei.default);
|
|
1445
|
+
Ie.default = Si;
|
|
1446
|
+
var ke = {};
|
|
1447
|
+
Object.defineProperty(ke, "__esModule", {
|
|
1448
|
+
value: !0
|
|
1449
|
+
});
|
|
1450
|
+
var Ai = $, Ri = Pi(Ai), at = x;
|
|
1451
|
+
function Pi(t) {
|
|
1452
|
+
return t && t.__esModule ? t : { default: t };
|
|
1453
|
+
}
|
|
1454
|
+
function Ti(t, e) {
|
|
1455
|
+
if (!(t instanceof e))
|
|
1456
|
+
throw new TypeError("Cannot call a class as a function");
|
|
1457
|
+
}
|
|
1458
|
+
function Mi(t, e) {
|
|
1459
|
+
if (!t)
|
|
1460
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
1461
|
+
return e && (typeof e == "object" || typeof e == "function") ? e : t;
|
|
1462
|
+
}
|
|
1463
|
+
function Ii(t, e) {
|
|
1464
|
+
if (typeof e != "function" && e !== null)
|
|
1465
|
+
throw new TypeError("Super expression must either be null or a function, not " + typeof e);
|
|
1466
|
+
t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e);
|
|
1467
|
+
}
|
|
1468
|
+
var ki = function(t) {
|
|
1469
|
+
Ii(e, t);
|
|
1470
|
+
function e(r, n) {
|
|
1471
|
+
return Ti(this, e), r += (0, at.mod10)(r), r += (0, at.mod10)(r), Mi(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, r, n));
|
|
1472
|
+
}
|
|
1473
|
+
return e;
|
|
1474
|
+
}(Ri.default);
|
|
1475
|
+
ke.default = ki;
|
|
1476
|
+
var De = {};
|
|
1477
|
+
Object.defineProperty(De, "__esModule", {
|
|
1478
|
+
value: !0
|
|
1479
|
+
});
|
|
1480
|
+
var Di = $, ji = Bi(Di), it = x;
|
|
1481
|
+
function Bi(t) {
|
|
1482
|
+
return t && t.__esModule ? t : { default: t };
|
|
1483
|
+
}
|
|
1484
|
+
function Li(t, e) {
|
|
1485
|
+
if (!(t instanceof e))
|
|
1486
|
+
throw new TypeError("Cannot call a class as a function");
|
|
1487
|
+
}
|
|
1488
|
+
function Ci(t, e) {
|
|
1489
|
+
if (!t)
|
|
1490
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
1491
|
+
return e && (typeof e == "object" || typeof e == "function") ? e : t;
|
|
1492
|
+
}
|
|
1493
|
+
function Ni(t, e) {
|
|
1494
|
+
if (typeof e != "function" && e !== null)
|
|
1495
|
+
throw new TypeError("Super expression must either be null or a function, not " + typeof e);
|
|
1496
|
+
t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e);
|
|
1497
|
+
}
|
|
1498
|
+
var Gi = function(t) {
|
|
1499
|
+
Ni(e, t);
|
|
1500
|
+
function e(r, n) {
|
|
1501
|
+
return Li(this, e), r += (0, it.mod11)(r), r += (0, it.mod10)(r), Ci(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, r, n));
|
|
1502
|
+
}
|
|
1503
|
+
return e;
|
|
1504
|
+
}(ji.default);
|
|
1505
|
+
De.default = Gi;
|
|
1506
|
+
Object.defineProperty(s, "__esModule", {
|
|
1507
|
+
value: !0
|
|
1508
|
+
});
|
|
1509
|
+
s.MSI1110 = s.MSI1010 = s.MSI11 = s.MSI10 = s.MSI = void 0;
|
|
1510
|
+
var Fi = $, Hi = z(Fi), zi = Me, Xi = z(zi), Ui = Ie, Vi = z(Ui), qi = ke, Ji = z(qi), Yi = De, Wi = z(Yi);
|
|
1511
|
+
function z(t) {
|
|
1512
|
+
return t && t.__esModule ? t : { default: t };
|
|
1513
|
+
}
|
|
1514
|
+
s.MSI = Hi.default;
|
|
1515
|
+
s.MSI10 = Xi.default;
|
|
1516
|
+
s.MSI11 = Vi.default;
|
|
1517
|
+
s.MSI1010 = Ji.default;
|
|
1518
|
+
s.MSI1110 = Wi.default;
|
|
1519
|
+
var ne = {};
|
|
1520
|
+
Object.defineProperty(ne, "__esModule", {
|
|
1521
|
+
value: !0
|
|
1522
|
+
});
|
|
1523
|
+
ne.pharmacode = void 0;
|
|
1524
|
+
var Qi = function() {
|
|
1525
|
+
function t(e, r) {
|
|
1526
|
+
for (var n = 0; n < r.length; n++) {
|
|
1527
|
+
var a = r[n];
|
|
1528
|
+
a.enumerable = a.enumerable || !1, a.configurable = !0, "value" in a && (a.writable = !0), Object.defineProperty(e, a.key, a);
|
|
1529
|
+
}
|
|
1530
|
+
}
|
|
1531
|
+
return function(e, r, n) {
|
|
1532
|
+
return r && t(e.prototype, r), n && t(e, n), e;
|
|
1533
|
+
};
|
|
1534
|
+
}(), Zi = l, Ki = eo(Zi);
|
|
1535
|
+
function eo(t) {
|
|
1536
|
+
return t && t.__esModule ? t : { default: t };
|
|
1537
|
+
}
|
|
1538
|
+
function to(t, e) {
|
|
1539
|
+
if (!(t instanceof e))
|
|
1540
|
+
throw new TypeError("Cannot call a class as a function");
|
|
1541
|
+
}
|
|
1542
|
+
function no(t, e) {
|
|
1543
|
+
if (!t)
|
|
1544
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
1545
|
+
return e && (typeof e == "object" || typeof e == "function") ? e : t;
|
|
1546
|
+
}
|
|
1547
|
+
function ro(t, e) {
|
|
1548
|
+
if (typeof e != "function" && e !== null)
|
|
1549
|
+
throw new TypeError("Super expression must either be null or a function, not " + typeof e);
|
|
1550
|
+
t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e);
|
|
1551
|
+
}
|
|
1552
|
+
var ao = function(t) {
|
|
1553
|
+
ro(e, t);
|
|
1554
|
+
function e(r, n) {
|
|
1555
|
+
to(this, e);
|
|
1556
|
+
var a = no(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, r, n));
|
|
1557
|
+
return a.number = parseInt(r, 10), a;
|
|
1558
|
+
}
|
|
1559
|
+
return Qi(e, [{
|
|
1560
|
+
key: "encode",
|
|
1561
|
+
value: function() {
|
|
1562
|
+
for (var n = this.number, a = ""; !isNaN(n) && n != 0; )
|
|
1563
|
+
n % 2 === 0 ? (a = "11100" + a, n = (n - 2) / 2) : (a = "100" + a, n = (n - 1) / 2);
|
|
1564
|
+
return a = a.slice(0, -2), {
|
|
1565
|
+
data: a,
|
|
1566
|
+
text: this.text
|
|
1567
|
+
};
|
|
1568
|
+
}
|
|
1569
|
+
}, {
|
|
1570
|
+
key: "valid",
|
|
1571
|
+
value: function() {
|
|
1572
|
+
return this.number >= 3 && this.number <= 131070;
|
|
1573
|
+
}
|
|
1574
|
+
}]), e;
|
|
1575
|
+
}(Ki.default);
|
|
1576
|
+
ne.pharmacode = ao;
|
|
1577
|
+
var re = {};
|
|
1578
|
+
Object.defineProperty(re, "__esModule", {
|
|
1579
|
+
value: !0
|
|
1580
|
+
});
|
|
1581
|
+
re.codabar = void 0;
|
|
1582
|
+
var io = function() {
|
|
1583
|
+
function t(e, r) {
|
|
1584
|
+
for (var n = 0; n < r.length; n++) {
|
|
1585
|
+
var a = r[n];
|
|
1586
|
+
a.enumerable = a.enumerable || !1, a.configurable = !0, "value" in a && (a.writable = !0), Object.defineProperty(e, a.key, a);
|
|
1587
|
+
}
|
|
1588
|
+
}
|
|
1589
|
+
return function(e, r, n) {
|
|
1590
|
+
return r && t(e.prototype, r), n && t(e, n), e;
|
|
1591
|
+
};
|
|
1592
|
+
}(), oo = l, uo = fo(oo);
|
|
1593
|
+
function fo(t) {
|
|
1594
|
+
return t && t.__esModule ? t : { default: t };
|
|
1595
|
+
}
|
|
1596
|
+
function co(t, e) {
|
|
1597
|
+
if (!(t instanceof e))
|
|
1598
|
+
throw new TypeError("Cannot call a class as a function");
|
|
1599
|
+
}
|
|
1600
|
+
function lo(t, e) {
|
|
1601
|
+
if (!t)
|
|
1602
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
1603
|
+
return e && (typeof e == "object" || typeof e == "function") ? e : t;
|
|
1604
|
+
}
|
|
1605
|
+
function ho(t, e) {
|
|
1606
|
+
if (typeof e != "function" && e !== null)
|
|
1607
|
+
throw new TypeError("Super expression must either be null or a function, not " + typeof e);
|
|
1608
|
+
t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e);
|
|
1609
|
+
}
|
|
1610
|
+
var _o = function(t) {
|
|
1611
|
+
ho(e, t);
|
|
1612
|
+
function e(r, n) {
|
|
1613
|
+
co(this, e), r.search(/^[0-9\-\$\:\.\+\/]+$/) === 0 && (r = "A" + r + "A");
|
|
1614
|
+
var a = lo(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, r.toUpperCase(), n));
|
|
1615
|
+
return a.text = a.options.text || a.text.replace(/[A-D]/g, ""), a;
|
|
1616
|
+
}
|
|
1617
|
+
return io(e, [{
|
|
1618
|
+
key: "valid",
|
|
1619
|
+
value: function() {
|
|
1620
|
+
return this.data.search(/^[A-D][0-9\-\$\:\.\+\/]+[A-D]$/) !== -1;
|
|
1621
|
+
}
|
|
1622
|
+
}, {
|
|
1623
|
+
key: "encode",
|
|
1624
|
+
value: function() {
|
|
1625
|
+
for (var n = [], a = this.getEncodings(), i = 0; i < this.data.length; i++)
|
|
1626
|
+
n.push(a[this.data.charAt(i)]), i !== this.data.length - 1 && n.push("0");
|
|
1627
|
+
return {
|
|
1628
|
+
text: this.text,
|
|
1629
|
+
data: n.join("")
|
|
1630
|
+
};
|
|
1631
|
+
}
|
|
1632
|
+
}, {
|
|
1633
|
+
key: "getEncodings",
|
|
1634
|
+
value: function() {
|
|
1635
|
+
return {
|
|
1636
|
+
0: "101010011",
|
|
1637
|
+
1: "101011001",
|
|
1638
|
+
2: "101001011",
|
|
1639
|
+
3: "110010101",
|
|
1640
|
+
4: "101101001",
|
|
1641
|
+
5: "110101001",
|
|
1642
|
+
6: "100101011",
|
|
1643
|
+
7: "100101101",
|
|
1644
|
+
8: "100110101",
|
|
1645
|
+
9: "110100101",
|
|
1646
|
+
"-": "101001101",
|
|
1647
|
+
$: "101100101",
|
|
1648
|
+
":": "1101011011",
|
|
1649
|
+
"/": "1101101011",
|
|
1650
|
+
".": "1101101101",
|
|
1651
|
+
"+": "1011011011",
|
|
1652
|
+
A: "1011001001",
|
|
1653
|
+
B: "1001001011",
|
|
1654
|
+
C: "1010010011",
|
|
1655
|
+
D: "1010011001"
|
|
1656
|
+
};
|
|
1657
|
+
}
|
|
1658
|
+
}]), e;
|
|
1659
|
+
}(uo.default);
|
|
1660
|
+
re.codabar = _o;
|
|
1661
|
+
var T = {}, ae = {}, X = {};
|
|
1662
|
+
Object.defineProperty(X, "__esModule", {
|
|
1663
|
+
value: !0
|
|
1664
|
+
});
|
|
1665
|
+
X.SYMBOLS = [
|
|
1666
|
+
"0",
|
|
1667
|
+
"1",
|
|
1668
|
+
"2",
|
|
1669
|
+
"3",
|
|
1670
|
+
"4",
|
|
1671
|
+
"5",
|
|
1672
|
+
"6",
|
|
1673
|
+
"7",
|
|
1674
|
+
"8",
|
|
1675
|
+
"9",
|
|
1676
|
+
"A",
|
|
1677
|
+
"B",
|
|
1678
|
+
"C",
|
|
1679
|
+
"D",
|
|
1680
|
+
"E",
|
|
1681
|
+
"F",
|
|
1682
|
+
"G",
|
|
1683
|
+
"H",
|
|
1684
|
+
"I",
|
|
1685
|
+
"J",
|
|
1686
|
+
"K",
|
|
1687
|
+
"L",
|
|
1688
|
+
"M",
|
|
1689
|
+
"N",
|
|
1690
|
+
"O",
|
|
1691
|
+
"P",
|
|
1692
|
+
"Q",
|
|
1693
|
+
"R",
|
|
1694
|
+
"S",
|
|
1695
|
+
"T",
|
|
1696
|
+
"U",
|
|
1697
|
+
"V",
|
|
1698
|
+
"W",
|
|
1699
|
+
"X",
|
|
1700
|
+
"Y",
|
|
1701
|
+
"Z",
|
|
1702
|
+
"-",
|
|
1703
|
+
".",
|
|
1704
|
+
" ",
|
|
1705
|
+
"$",
|
|
1706
|
+
"/",
|
|
1707
|
+
"+",
|
|
1708
|
+
"%",
|
|
1709
|
+
// Only used for csum and multi-symbols character encodings
|
|
1710
|
+
"($)",
|
|
1711
|
+
"(%)",
|
|
1712
|
+
"(/)",
|
|
1713
|
+
"(+)",
|
|
1714
|
+
// Start/Stop
|
|
1715
|
+
"ÿ"
|
|
1716
|
+
];
|
|
1717
|
+
X.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"];
|
|
1718
|
+
X.MULTI_SYMBOLS = {
|
|
1719
|
+
"\0": ["(%)", "U"],
|
|
1720
|
+
"": ["($)", "A"],
|
|
1721
|
+
"": ["($)", "B"],
|
|
1722
|
+
"": ["($)", "C"],
|
|
1723
|
+
"": ["($)", "D"],
|
|
1724
|
+
"": ["($)", "E"],
|
|
1725
|
+
"": ["($)", "F"],
|
|
1726
|
+
"\x07": ["($)", "G"],
|
|
1727
|
+
"\b": ["($)", "H"],
|
|
1728
|
+
" ": ["($)", "I"],
|
|
1729
|
+
"\n": ["($)", "J"],
|
|
1730
|
+
"\v": ["($)", "K"],
|
|
1731
|
+
"\f": ["($)", "L"],
|
|
1732
|
+
"\r": ["($)", "M"],
|
|
1733
|
+
"": ["($)", "N"],
|
|
1734
|
+
"": ["($)", "O"],
|
|
1735
|
+
"": ["($)", "P"],
|
|
1736
|
+
"": ["($)", "Q"],
|
|
1737
|
+
"": ["($)", "R"],
|
|
1738
|
+
"": ["($)", "S"],
|
|
1739
|
+
"": ["($)", "T"],
|
|
1740
|
+
"": ["($)", "U"],
|
|
1741
|
+
"": ["($)", "V"],
|
|
1742
|
+
"": ["($)", "W"],
|
|
1743
|
+
"": ["($)", "X"],
|
|
1744
|
+
"": ["($)", "Y"],
|
|
1745
|
+
"": ["($)", "Z"],
|
|
1746
|
+
"\x1B": ["(%)", "A"],
|
|
1747
|
+
"": ["(%)", "B"],
|
|
1748
|
+
"": ["(%)", "C"],
|
|
1749
|
+
"": ["(%)", "D"],
|
|
1750
|
+
"": ["(%)", "E"],
|
|
1751
|
+
"!": ["(/)", "A"],
|
|
1752
|
+
'"': ["(/)", "B"],
|
|
1753
|
+
"#": ["(/)", "C"],
|
|
1754
|
+
"&": ["(/)", "F"],
|
|
1755
|
+
"'": ["(/)", "G"],
|
|
1756
|
+
"(": ["(/)", "H"],
|
|
1757
|
+
")": ["(/)", "I"],
|
|
1758
|
+
"*": ["(/)", "J"],
|
|
1759
|
+
",": ["(/)", "L"],
|
|
1760
|
+
":": ["(/)", "Z"],
|
|
1761
|
+
";": ["(%)", "F"],
|
|
1762
|
+
"<": ["(%)", "G"],
|
|
1763
|
+
"=": ["(%)", "H"],
|
|
1764
|
+
">": ["(%)", "I"],
|
|
1765
|
+
"?": ["(%)", "J"],
|
|
1766
|
+
"@": ["(%)", "V"],
|
|
1767
|
+
"[": ["(%)", "K"],
|
|
1768
|
+
"\\": ["(%)", "L"],
|
|
1769
|
+
"]": ["(%)", "M"],
|
|
1770
|
+
"^": ["(%)", "N"],
|
|
1771
|
+
_: ["(%)", "O"],
|
|
1772
|
+
"`": ["(%)", "W"],
|
|
1773
|
+
a: ["(+)", "A"],
|
|
1774
|
+
b: ["(+)", "B"],
|
|
1775
|
+
c: ["(+)", "C"],
|
|
1776
|
+
d: ["(+)", "D"],
|
|
1777
|
+
e: ["(+)", "E"],
|
|
1778
|
+
f: ["(+)", "F"],
|
|
1779
|
+
g: ["(+)", "G"],
|
|
1780
|
+
h: ["(+)", "H"],
|
|
1781
|
+
i: ["(+)", "I"],
|
|
1782
|
+
j: ["(+)", "J"],
|
|
1783
|
+
k: ["(+)", "K"],
|
|
1784
|
+
l: ["(+)", "L"],
|
|
1785
|
+
m: ["(+)", "M"],
|
|
1786
|
+
n: ["(+)", "N"],
|
|
1787
|
+
o: ["(+)", "O"],
|
|
1788
|
+
p: ["(+)", "P"],
|
|
1789
|
+
q: ["(+)", "Q"],
|
|
1790
|
+
r: ["(+)", "R"],
|
|
1791
|
+
s: ["(+)", "S"],
|
|
1792
|
+
t: ["(+)", "T"],
|
|
1793
|
+
u: ["(+)", "U"],
|
|
1794
|
+
v: ["(+)", "V"],
|
|
1795
|
+
w: ["(+)", "W"],
|
|
1796
|
+
x: ["(+)", "X"],
|
|
1797
|
+
y: ["(+)", "Y"],
|
|
1798
|
+
z: ["(+)", "Z"],
|
|
1799
|
+
"{": ["(%)", "P"],
|
|
1800
|
+
"|": ["(%)", "Q"],
|
|
1801
|
+
"}": ["(%)", "R"],
|
|
1802
|
+
"~": ["(%)", "S"],
|
|
1803
|
+
"": ["(%)", "T"]
|
|
1804
|
+
};
|
|
1805
|
+
Object.defineProperty(ae, "__esModule", {
|
|
1806
|
+
value: !0
|
|
1807
|
+
});
|
|
1808
|
+
var vo = function() {
|
|
1809
|
+
function t(e, r) {
|
|
1810
|
+
for (var n = 0; n < r.length; n++) {
|
|
1811
|
+
var a = r[n];
|
|
1812
|
+
a.enumerable = a.enumerable || !1, a.configurable = !0, "value" in a && (a.writable = !0), Object.defineProperty(e, a.key, a);
|
|
1813
|
+
}
|
|
1814
|
+
}
|
|
1815
|
+
return function(e, r, n) {
|
|
1816
|
+
return r && t(e.prototype, r), n && t(e, n), e;
|
|
1817
|
+
};
|
|
1818
|
+
}(), Y = X, so = l, yo = po(so);
|
|
1819
|
+
function po(t) {
|
|
1820
|
+
return t && t.__esModule ? t : { default: t };
|
|
1821
|
+
}
|
|
1822
|
+
function go(t, e) {
|
|
1823
|
+
if (!(t instanceof e))
|
|
1824
|
+
throw new TypeError("Cannot call a class as a function");
|
|
1825
|
+
}
|
|
1826
|
+
function Oo(t, e) {
|
|
1827
|
+
if (!t)
|
|
1828
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
1829
|
+
return e && (typeof e == "object" || typeof e == "function") ? e : t;
|
|
1830
|
+
}
|
|
1831
|
+
function Eo(t, e) {
|
|
1832
|
+
if (typeof e != "function" && e !== null)
|
|
1833
|
+
throw new TypeError("Super expression must either be null or a function, not " + typeof e);
|
|
1834
|
+
t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e);
|
|
1835
|
+
}
|
|
1836
|
+
var bo = function(t) {
|
|
1837
|
+
Eo(e, t);
|
|
1838
|
+
function e(r, n) {
|
|
1839
|
+
return go(this, e), Oo(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, r, n));
|
|
1840
|
+
}
|
|
1841
|
+
return vo(e, [{
|
|
1842
|
+
key: "valid",
|
|
1843
|
+
value: function() {
|
|
1844
|
+
return /^[0-9A-Z\-. $/+%]+$/.test(this.data);
|
|
1845
|
+
}
|
|
1846
|
+
}, {
|
|
1847
|
+
key: "encode",
|
|
1848
|
+
value: function() {
|
|
1849
|
+
var n = this.data.split("").flatMap(function(u) {
|
|
1850
|
+
return Y.MULTI_SYMBOLS[u] || u;
|
|
1851
|
+
}), a = n.map(function(u) {
|
|
1852
|
+
return e.getEncoding(u);
|
|
1853
|
+
}).join(""), i = e.checksum(n, 20), o = e.checksum(n.concat(i), 15);
|
|
1854
|
+
return {
|
|
1855
|
+
text: this.text,
|
|
1856
|
+
data: (
|
|
1857
|
+
// Add the start bits
|
|
1858
|
+
e.getEncoding("ÿ") + // Add the encoded bits
|
|
1859
|
+
a + // Add the checksum
|
|
1860
|
+
e.getEncoding(i) + e.getEncoding(o) + // Add the stop bits
|
|
1861
|
+
e.getEncoding("ÿ") + // Add the termination bit
|
|
1862
|
+
"1"
|
|
1863
|
+
)
|
|
1864
|
+
};
|
|
1865
|
+
}
|
|
1866
|
+
// Get the binary encoding of a symbol
|
|
1867
|
+
}], [{
|
|
1868
|
+
key: "getEncoding",
|
|
1869
|
+
value: function(n) {
|
|
1870
|
+
return Y.BINARIES[e.symbolValue(n)];
|
|
1871
|
+
}
|
|
1872
|
+
// Get the symbol for a symbol value
|
|
1873
|
+
}, {
|
|
1874
|
+
key: "getSymbol",
|
|
1875
|
+
value: function(n) {
|
|
1876
|
+
return Y.SYMBOLS[n];
|
|
1877
|
+
}
|
|
1878
|
+
// Get the symbol value of a symbol
|
|
1879
|
+
}, {
|
|
1880
|
+
key: "symbolValue",
|
|
1881
|
+
value: function(n) {
|
|
1882
|
+
return Y.SYMBOLS.indexOf(n);
|
|
1883
|
+
}
|
|
1884
|
+
// Calculate a checksum symbol
|
|
1885
|
+
}, {
|
|
1886
|
+
key: "checksum",
|
|
1887
|
+
value: function(n, a) {
|
|
1888
|
+
var i = n.slice().reverse().reduce(function(o, u, c) {
|
|
1889
|
+
var v = c % a + 1;
|
|
1890
|
+
return o + e.symbolValue(u) * v;
|
|
1891
|
+
}, 0);
|
|
1892
|
+
return e.getSymbol(i % 47);
|
|
1893
|
+
}
|
|
1894
|
+
}]), e;
|
|
1895
|
+
}(yo.default);
|
|
1896
|
+
ae.default = bo;
|
|
1897
|
+
var je = {};
|
|
1898
|
+
Object.defineProperty(je, "__esModule", {
|
|
1899
|
+
value: !0
|
|
1900
|
+
});
|
|
1901
|
+
var mo = function() {
|
|
1902
|
+
function t(e, r) {
|
|
1903
|
+
for (var n = 0; n < r.length; n++) {
|
|
1904
|
+
var a = r[n];
|
|
1905
|
+
a.enumerable = a.enumerable || !1, a.configurable = !0, "value" in a && (a.writable = !0), Object.defineProperty(e, a.key, a);
|
|
1906
|
+
}
|
|
1907
|
+
}
|
|
1908
|
+
return function(e, r, n) {
|
|
1909
|
+
return r && t(e.prototype, r), n && t(e, n), e;
|
|
1910
|
+
};
|
|
1911
|
+
}(), wo = ae, $o = xo(wo);
|
|
1912
|
+
function xo(t) {
|
|
1913
|
+
return t && t.__esModule ? t : { default: t };
|
|
1914
|
+
}
|
|
1915
|
+
function So(t, e) {
|
|
1916
|
+
if (!(t instanceof e))
|
|
1917
|
+
throw new TypeError("Cannot call a class as a function");
|
|
1918
|
+
}
|
|
1919
|
+
function Ao(t, e) {
|
|
1920
|
+
if (!t)
|
|
1921
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
1922
|
+
return e && (typeof e == "object" || typeof e == "function") ? e : t;
|
|
1923
|
+
}
|
|
1924
|
+
function Ro(t, e) {
|
|
1925
|
+
if (typeof e != "function" && e !== null)
|
|
1926
|
+
throw new TypeError("Super expression must either be null or a function, not " + typeof e);
|
|
1927
|
+
t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e);
|
|
1928
|
+
}
|
|
1929
|
+
var Po = function(t) {
|
|
1930
|
+
Ro(e, t);
|
|
1931
|
+
function e(r, n) {
|
|
1932
|
+
return So(this, e), Ao(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, r, n));
|
|
1933
|
+
}
|
|
1934
|
+
return mo(e, [{
|
|
1935
|
+
key: "valid",
|
|
1936
|
+
value: function() {
|
|
1937
|
+
return /^[\x00-\x7f]+$/.test(this.data);
|
|
1938
|
+
}
|
|
1939
|
+
}]), e;
|
|
1940
|
+
}($o.default);
|
|
1941
|
+
je.default = Po;
|
|
1942
|
+
Object.defineProperty(T, "__esModule", {
|
|
1943
|
+
value: !0
|
|
1944
|
+
});
|
|
1945
|
+
T.CODE93FullASCII = T.CODE93 = void 0;
|
|
1946
|
+
var To = ae, Mo = Rt(To), Io = je, ko = Rt(Io);
|
|
1947
|
+
function Rt(t) {
|
|
1948
|
+
return t && t.__esModule ? t : { default: t };
|
|
1949
|
+
}
|
|
1950
|
+
T.CODE93 = Mo.default;
|
|
1951
|
+
T.CODE93FullASCII = ko.default;
|
|
1952
|
+
var ie = {};
|
|
1953
|
+
Object.defineProperty(ie, "__esModule", {
|
|
1954
|
+
value: !0
|
|
1955
|
+
});
|
|
1956
|
+
ie.GenericBarcode = void 0;
|
|
1957
|
+
var Do = function() {
|
|
1958
|
+
function t(e, r) {
|
|
1959
|
+
for (var n = 0; n < r.length; n++) {
|
|
1960
|
+
var a = r[n];
|
|
1961
|
+
a.enumerable = a.enumerable || !1, a.configurable = !0, "value" in a && (a.writable = !0), Object.defineProperty(e, a.key, a);
|
|
1962
|
+
}
|
|
1963
|
+
}
|
|
1964
|
+
return function(e, r, n) {
|
|
1965
|
+
return r && t(e.prototype, r), n && t(e, n), e;
|
|
1966
|
+
};
|
|
1967
|
+
}(), jo = l, Bo = Lo(jo);
|
|
1968
|
+
function Lo(t) {
|
|
1969
|
+
return t && t.__esModule ? t : { default: t };
|
|
1970
|
+
}
|
|
1971
|
+
function Co(t, e) {
|
|
1972
|
+
if (!(t instanceof e))
|
|
1973
|
+
throw new TypeError("Cannot call a class as a function");
|
|
1974
|
+
}
|
|
1975
|
+
function No(t, e) {
|
|
1976
|
+
if (!t)
|
|
1977
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
1978
|
+
return e && (typeof e == "object" || typeof e == "function") ? e : t;
|
|
1979
|
+
}
|
|
1980
|
+
function Go(t, e) {
|
|
1981
|
+
if (typeof e != "function" && e !== null)
|
|
1982
|
+
throw new TypeError("Super expression must either be null or a function, not " + typeof e);
|
|
1983
|
+
t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e);
|
|
1984
|
+
}
|
|
1985
|
+
var Fo = function(t) {
|
|
1986
|
+
Go(e, t);
|
|
1987
|
+
function e(r, n) {
|
|
1988
|
+
return Co(this, e), No(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, r, n));
|
|
1989
|
+
}
|
|
1990
|
+
return Do(e, [{
|
|
1991
|
+
key: "encode",
|
|
1992
|
+
value: function() {
|
|
1993
|
+
return {
|
|
1994
|
+
data: "10101010101010101010101010101010101010101",
|
|
1995
|
+
text: this.text
|
|
1996
|
+
};
|
|
1997
|
+
}
|
|
1998
|
+
// Resturn true/false if the string provided is valid for this encoder
|
|
1999
|
+
}, {
|
|
2000
|
+
key: "valid",
|
|
2001
|
+
value: function() {
|
|
2002
|
+
return !0;
|
|
2003
|
+
}
|
|
2004
|
+
}]), e;
|
|
2005
|
+
}(Bo.default);
|
|
2006
|
+
ie.GenericBarcode = Fo;
|
|
2007
|
+
Object.defineProperty(ge, "__esModule", {
|
|
2008
|
+
value: !0
|
|
2009
|
+
});
|
|
2010
|
+
var Ho = Z, W = p, R = h, ot = P, N = s, zo = ne, Xo = re, ut = T, Uo = ie;
|
|
2011
|
+
ge.default = {
|
|
2012
|
+
CODE39: Ho.CODE39,
|
|
2013
|
+
CODE128: W.CODE128,
|
|
2014
|
+
CODE128A: W.CODE128A,
|
|
2015
|
+
CODE128B: W.CODE128B,
|
|
2016
|
+
CODE128C: W.CODE128C,
|
|
2017
|
+
EAN13: R.EAN13,
|
|
2018
|
+
EAN8: R.EAN8,
|
|
2019
|
+
EAN5: R.EAN5,
|
|
2020
|
+
EAN2: R.EAN2,
|
|
2021
|
+
UPC: R.UPC,
|
|
2022
|
+
UPCE: R.UPCE,
|
|
2023
|
+
ITF14: ot.ITF14,
|
|
2024
|
+
ITF: ot.ITF,
|
|
2025
|
+
MSI: N.MSI,
|
|
2026
|
+
MSI10: N.MSI10,
|
|
2027
|
+
MSI11: N.MSI11,
|
|
2028
|
+
MSI1010: N.MSI1010,
|
|
2029
|
+
MSI1110: N.MSI1110,
|
|
2030
|
+
pharmacode: zo.pharmacode,
|
|
2031
|
+
codabar: Xo.codabar,
|
|
2032
|
+
CODE93: ut.CODE93,
|
|
2033
|
+
CODE93FullASCII: ut.CODE93FullASCII,
|
|
2034
|
+
GenericBarcode: Uo.GenericBarcode
|
|
2035
|
+
};
|
|
2036
|
+
var k = {};
|
|
2037
|
+
Object.defineProperty(k, "__esModule", {
|
|
2038
|
+
value: !0
|
|
2039
|
+
});
|
|
2040
|
+
var Vo = Object.assign || function(t) {
|
|
2041
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
2042
|
+
var r = arguments[e];
|
|
2043
|
+
for (var n in r)
|
|
2044
|
+
Object.prototype.hasOwnProperty.call(r, n) && (t[n] = r[n]);
|
|
2045
|
+
}
|
|
2046
|
+
return t;
|
|
2047
|
+
};
|
|
2048
|
+
k.default = function(t, e) {
|
|
2049
|
+
return Vo({}, t, e);
|
|
2050
|
+
};
|
|
2051
|
+
var Be = {};
|
|
2052
|
+
Object.defineProperty(Be, "__esModule", {
|
|
2053
|
+
value: !0
|
|
2054
|
+
});
|
|
2055
|
+
Be.default = qo;
|
|
2056
|
+
function qo(t) {
|
|
2057
|
+
var e = [];
|
|
2058
|
+
function r(n) {
|
|
2059
|
+
if (Array.isArray(n))
|
|
2060
|
+
for (var a = 0; a < n.length; a++)
|
|
2061
|
+
r(n[a]);
|
|
2062
|
+
else
|
|
2063
|
+
n.text = n.text || "", n.data = n.data || "", e.push(n);
|
|
2064
|
+
}
|
|
2065
|
+
return r(t), e;
|
|
2066
|
+
}
|
|
2067
|
+
var Le = {};
|
|
2068
|
+
Object.defineProperty(Le, "__esModule", {
|
|
2069
|
+
value: !0
|
|
2070
|
+
});
|
|
2071
|
+
Le.default = Jo;
|
|
2072
|
+
function Jo(t) {
|
|
2073
|
+
return t.marginTop = t.marginTop || t.margin, t.marginBottom = t.marginBottom || t.margin, t.marginRight = t.marginRight || t.margin, t.marginLeft = t.marginLeft || t.margin, t;
|
|
2074
|
+
}
|
|
2075
|
+
var Ce = {}, Ne = {}, oe = {};
|
|
2076
|
+
Object.defineProperty(oe, "__esModule", {
|
|
2077
|
+
value: !0
|
|
2078
|
+
});
|
|
2079
|
+
oe.default = Yo;
|
|
2080
|
+
function Yo(t) {
|
|
2081
|
+
var e = ["width", "height", "textMargin", "fontSize", "margin", "marginTop", "marginBottom", "marginLeft", "marginRight"];
|
|
2082
|
+
for (var r in e)
|
|
2083
|
+
e.hasOwnProperty(r) && (r = e[r], typeof t[r] == "string" && (t[r] = parseInt(t[r], 10)));
|
|
2084
|
+
return typeof t.displayValue == "string" && (t.displayValue = t.displayValue != "false"), t;
|
|
2085
|
+
}
|
|
2086
|
+
var ue = {};
|
|
2087
|
+
Object.defineProperty(ue, "__esModule", {
|
|
2088
|
+
value: !0
|
|
2089
|
+
});
|
|
2090
|
+
var Wo = {
|
|
2091
|
+
width: 2,
|
|
2092
|
+
height: 100,
|
|
2093
|
+
format: "auto",
|
|
2094
|
+
displayValue: !0,
|
|
2095
|
+
fontOptions: "",
|
|
2096
|
+
font: "monospace",
|
|
2097
|
+
text: void 0,
|
|
2098
|
+
textAlign: "center",
|
|
2099
|
+
textPosition: "bottom",
|
|
2100
|
+
textMargin: 2,
|
|
2101
|
+
fontSize: 20,
|
|
2102
|
+
background: "#ffffff",
|
|
2103
|
+
lineColor: "#000000",
|
|
2104
|
+
margin: 10,
|
|
2105
|
+
marginTop: void 0,
|
|
2106
|
+
marginBottom: void 0,
|
|
2107
|
+
marginLeft: void 0,
|
|
2108
|
+
marginRight: void 0,
|
|
2109
|
+
valid: function() {
|
|
2110
|
+
}
|
|
2111
|
+
};
|
|
2112
|
+
ue.default = Wo;
|
|
2113
|
+
Object.defineProperty(Ne, "__esModule", {
|
|
2114
|
+
value: !0
|
|
2115
|
+
});
|
|
2116
|
+
var Qo = oe, Zo = Pt(Qo), Ko = ue, ft = Pt(Ko);
|
|
2117
|
+
function Pt(t) {
|
|
2118
|
+
return t && t.__esModule ? t : { default: t };
|
|
2119
|
+
}
|
|
2120
|
+
function eu(t) {
|
|
2121
|
+
var e = {};
|
|
2122
|
+
for (var r in ft.default)
|
|
2123
|
+
ft.default.hasOwnProperty(r) && (t.hasAttribute("jsbarcode-" + r.toLowerCase()) && (e[r] = t.getAttribute("jsbarcode-" + r.toLowerCase())), t.hasAttribute("data-" + r.toLowerCase()) && (e[r] = t.getAttribute("data-" + r.toLowerCase())));
|
|
2124
|
+
return e.value = t.getAttribute("jsbarcode-value") || t.getAttribute("data-value"), e = (0, Zo.default)(e), e;
|
|
2125
|
+
}
|
|
2126
|
+
Ne.default = eu;
|
|
2127
|
+
var Ge = {}, Fe = {}, _ = {};
|
|
2128
|
+
Object.defineProperty(_, "__esModule", {
|
|
2129
|
+
value: !0
|
|
2130
|
+
});
|
|
2131
|
+
_.getTotalWidthOfEncodings = _.calculateEncodingAttributes = _.getBarcodePadding = _.getEncodingHeight = _.getMaximumHeightOfEncodings = void 0;
|
|
2132
|
+
var tu = k, nu = ru(tu);
|
|
2133
|
+
function ru(t) {
|
|
2134
|
+
return t && t.__esModule ? t : { default: t };
|
|
2135
|
+
}
|
|
2136
|
+
function Tt(t, e) {
|
|
2137
|
+
return e.height + (e.displayValue && t.text.length > 0 ? e.fontSize + e.textMargin : 0) + e.marginTop + e.marginBottom;
|
|
2138
|
+
}
|
|
2139
|
+
function Mt(t, e, r) {
|
|
2140
|
+
if (r.displayValue && e < t) {
|
|
2141
|
+
if (r.textAlign == "center")
|
|
2142
|
+
return Math.floor((t - e) / 2);
|
|
2143
|
+
if (r.textAlign == "left")
|
|
2144
|
+
return 0;
|
|
2145
|
+
if (r.textAlign == "right")
|
|
2146
|
+
return Math.floor(t - e);
|
|
2147
|
+
}
|
|
2148
|
+
return 0;
|
|
2149
|
+
}
|
|
2150
|
+
function au(t, e, r) {
|
|
2151
|
+
for (var n = 0; n < t.length; n++) {
|
|
2152
|
+
var a = t[n], i = (0, nu.default)(e, a.options), o;
|
|
2153
|
+
i.displayValue ? o = uu(a.text, i, r) : o = 0;
|
|
2154
|
+
var u = a.data.length * i.width;
|
|
2155
|
+
a.width = Math.ceil(Math.max(o, u)), a.height = Tt(a, i), a.barcodePadding = Mt(o, u, i);
|
|
2156
|
+
}
|
|
2157
|
+
}
|
|
2158
|
+
function iu(t) {
|
|
2159
|
+
for (var e = 0, r = 0; r < t.length; r++)
|
|
2160
|
+
e += t[r].width;
|
|
2161
|
+
return e;
|
|
2162
|
+
}
|
|
2163
|
+
function ou(t) {
|
|
2164
|
+
for (var e = 0, r = 0; r < t.length; r++)
|
|
2165
|
+
t[r].height > e && (e = t[r].height);
|
|
2166
|
+
return e;
|
|
2167
|
+
}
|
|
2168
|
+
function uu(t, e, r) {
|
|
2169
|
+
var n;
|
|
2170
|
+
if (r)
|
|
2171
|
+
n = r;
|
|
2172
|
+
else if (typeof document < "u")
|
|
2173
|
+
n = document.createElement("canvas").getContext("2d");
|
|
2174
|
+
else
|
|
2175
|
+
return 0;
|
|
2176
|
+
n.font = e.fontOptions + " " + e.fontSize + "px " + e.font;
|
|
2177
|
+
var a = n.measureText(t);
|
|
2178
|
+
if (!a)
|
|
2179
|
+
return 0;
|
|
2180
|
+
var i = a.width;
|
|
2181
|
+
return i;
|
|
2182
|
+
}
|
|
2183
|
+
_.getMaximumHeightOfEncodings = ou;
|
|
2184
|
+
_.getEncodingHeight = Tt;
|
|
2185
|
+
_.getBarcodePadding = Mt;
|
|
2186
|
+
_.calculateEncodingAttributes = au;
|
|
2187
|
+
_.getTotalWidthOfEncodings = iu;
|
|
2188
|
+
Object.defineProperty(Fe, "__esModule", {
|
|
2189
|
+
value: !0
|
|
2190
|
+
});
|
|
2191
|
+
var fu = function() {
|
|
2192
|
+
function t(e, r) {
|
|
2193
|
+
for (var n = 0; n < r.length; n++) {
|
|
2194
|
+
var a = r[n];
|
|
2195
|
+
a.enumerable = a.enumerable || !1, a.configurable = !0, "value" in a && (a.writable = !0), Object.defineProperty(e, a.key, a);
|
|
2196
|
+
}
|
|
2197
|
+
}
|
|
2198
|
+
return function(e, r, n) {
|
|
2199
|
+
return r && t(e.prototype, r), n && t(e, n), e;
|
|
2200
|
+
};
|
|
2201
|
+
}(), cu = k, lu = hu(cu), _e = _;
|
|
2202
|
+
function hu(t) {
|
|
2203
|
+
return t && t.__esModule ? t : { default: t };
|
|
2204
|
+
}
|
|
2205
|
+
function du(t, e) {
|
|
2206
|
+
if (!(t instanceof e))
|
|
2207
|
+
throw new TypeError("Cannot call a class as a function");
|
|
2208
|
+
}
|
|
2209
|
+
var _u = function() {
|
|
2210
|
+
function t(e, r, n) {
|
|
2211
|
+
du(this, t), this.canvas = e, this.encodings = r, this.options = n;
|
|
2212
|
+
}
|
|
2213
|
+
return fu(t, [{
|
|
2214
|
+
key: "render",
|
|
2215
|
+
value: function() {
|
|
2216
|
+
if (!this.canvas.getContext)
|
|
2217
|
+
throw new Error("The browser does not support canvas.");
|
|
2218
|
+
this.prepareCanvas();
|
|
2219
|
+
for (var r = 0; r < this.encodings.length; r++) {
|
|
2220
|
+
var n = (0, lu.default)(this.options, this.encodings[r].options);
|
|
2221
|
+
this.drawCanvasBarcode(n, this.encodings[r]), this.drawCanvasText(n, this.encodings[r]), this.moveCanvasDrawing(this.encodings[r]);
|
|
2222
|
+
}
|
|
2223
|
+
this.restoreCanvas();
|
|
2224
|
+
}
|
|
2225
|
+
}, {
|
|
2226
|
+
key: "prepareCanvas",
|
|
2227
|
+
value: function() {
|
|
2228
|
+
var r = this.canvas.getContext("2d");
|
|
2229
|
+
r.save(), (0, _e.calculateEncodingAttributes)(this.encodings, this.options, r);
|
|
2230
|
+
var n = (0, _e.getTotalWidthOfEncodings)(this.encodings), a = (0, _e.getMaximumHeightOfEncodings)(this.encodings);
|
|
2231
|
+
this.canvas.width = n + this.options.marginLeft + this.options.marginRight, this.canvas.height = a, r.clearRect(0, 0, this.canvas.width, this.canvas.height), this.options.background && (r.fillStyle = this.options.background, r.fillRect(0, 0, this.canvas.width, this.canvas.height)), r.translate(this.options.marginLeft, 0);
|
|
2232
|
+
}
|
|
2233
|
+
}, {
|
|
2234
|
+
key: "drawCanvasBarcode",
|
|
2235
|
+
value: function(r, n) {
|
|
2236
|
+
var a = this.canvas.getContext("2d"), i = n.data, o;
|
|
2237
|
+
r.textPosition == "top" ? o = r.marginTop + r.fontSize + r.textMargin : o = r.marginTop, a.fillStyle = r.lineColor;
|
|
2238
|
+
for (var u = 0; u < i.length; u++) {
|
|
2239
|
+
var c = u * r.width + n.barcodePadding;
|
|
2240
|
+
i[u] === "1" ? a.fillRect(c, o, r.width, r.height) : i[u] && a.fillRect(c, o, r.width, r.height * i[u]);
|
|
2241
|
+
}
|
|
2242
|
+
}
|
|
2243
|
+
}, {
|
|
2244
|
+
key: "drawCanvasText",
|
|
2245
|
+
value: function(r, n) {
|
|
2246
|
+
var a = this.canvas.getContext("2d"), i = r.fontOptions + " " + r.fontSize + "px " + r.font;
|
|
2247
|
+
if (r.displayValue) {
|
|
2248
|
+
var o, u;
|
|
2249
|
+
r.textPosition == "top" ? u = r.marginTop + r.fontSize - r.textMargin : u = r.height + r.textMargin + r.marginTop + r.fontSize, a.font = i, r.textAlign == "left" || n.barcodePadding > 0 ? (o = 0, a.textAlign = "left") : r.textAlign == "right" ? (o = n.width - 1, a.textAlign = "right") : (o = n.width / 2, a.textAlign = "center"), a.fillText(n.text, o, u);
|
|
2250
|
+
}
|
|
2251
|
+
}
|
|
2252
|
+
}, {
|
|
2253
|
+
key: "moveCanvasDrawing",
|
|
2254
|
+
value: function(r) {
|
|
2255
|
+
var n = this.canvas.getContext("2d");
|
|
2256
|
+
n.translate(r.width, 0);
|
|
2257
|
+
}
|
|
2258
|
+
}, {
|
|
2259
|
+
key: "restoreCanvas",
|
|
2260
|
+
value: function() {
|
|
2261
|
+
var r = this.canvas.getContext("2d");
|
|
2262
|
+
r.restore();
|
|
2263
|
+
}
|
|
2264
|
+
}]), t;
|
|
2265
|
+
}();
|
|
2266
|
+
Fe.default = _u;
|
|
2267
|
+
var He = {};
|
|
2268
|
+
Object.defineProperty(He, "__esModule", {
|
|
2269
|
+
value: !0
|
|
2270
|
+
});
|
|
2271
|
+
var vu = function() {
|
|
2272
|
+
function t(e, r) {
|
|
2273
|
+
for (var n = 0; n < r.length; n++) {
|
|
2274
|
+
var a = r[n];
|
|
2275
|
+
a.enumerable = a.enumerable || !1, a.configurable = !0, "value" in a && (a.writable = !0), Object.defineProperty(e, a.key, a);
|
|
2276
|
+
}
|
|
2277
|
+
}
|
|
2278
|
+
return function(e, r, n) {
|
|
2279
|
+
return r && t(e.prototype, r), n && t(e, n), e;
|
|
2280
|
+
};
|
|
2281
|
+
}(), su = k, yu = pu(su), ve = _;
|
|
2282
|
+
function pu(t) {
|
|
2283
|
+
return t && t.__esModule ? t : { default: t };
|
|
2284
|
+
}
|
|
2285
|
+
function gu(t, e) {
|
|
2286
|
+
if (!(t instanceof e))
|
|
2287
|
+
throw new TypeError("Cannot call a class as a function");
|
|
2288
|
+
}
|
|
2289
|
+
var Q = "http://www.w3.org/2000/svg", Ou = function() {
|
|
2290
|
+
function t(e, r, n) {
|
|
2291
|
+
gu(this, t), this.svg = e, this.encodings = r, this.options = n, this.document = n.xmlDocument || document;
|
|
2292
|
+
}
|
|
2293
|
+
return vu(t, [{
|
|
2294
|
+
key: "render",
|
|
2295
|
+
value: function() {
|
|
2296
|
+
var r = this.options.marginLeft;
|
|
2297
|
+
this.prepareSVG();
|
|
2298
|
+
for (var n = 0; n < this.encodings.length; n++) {
|
|
2299
|
+
var a = this.encodings[n], i = (0, yu.default)(this.options, a.options), o = this.createGroup(r, i.marginTop, this.svg);
|
|
2300
|
+
this.setGroupOptions(o, i), this.drawSvgBarcode(o, i, a), this.drawSVGText(o, i, a), r += a.width;
|
|
2301
|
+
}
|
|
2302
|
+
}
|
|
2303
|
+
}, {
|
|
2304
|
+
key: "prepareSVG",
|
|
2305
|
+
value: function() {
|
|
2306
|
+
for (; this.svg.firstChild; )
|
|
2307
|
+
this.svg.removeChild(this.svg.firstChild);
|
|
2308
|
+
(0, ve.calculateEncodingAttributes)(this.encodings, this.options);
|
|
2309
|
+
var r = (0, ve.getTotalWidthOfEncodings)(this.encodings), n = (0, ve.getMaximumHeightOfEncodings)(this.encodings), a = r + this.options.marginLeft + this.options.marginRight;
|
|
2310
|
+
this.setSvgAttributes(a, n), this.options.background && this.drawRect(0, 0, a, n, this.svg).setAttribute("style", "fill:" + this.options.background + ";");
|
|
2311
|
+
}
|
|
2312
|
+
}, {
|
|
2313
|
+
key: "drawSvgBarcode",
|
|
2314
|
+
value: function(r, n, a) {
|
|
2315
|
+
var i = a.data, o;
|
|
2316
|
+
n.textPosition == "top" ? o = n.fontSize + n.textMargin : o = 0;
|
|
2317
|
+
for (var u = 0, c = 0, v = 0; v < i.length; v++)
|
|
2318
|
+
c = v * n.width + a.barcodePadding, i[v] === "1" ? u++ : u > 0 && (this.drawRect(c - n.width * u, o, n.width * u, n.height, r), u = 0);
|
|
2319
|
+
u > 0 && this.drawRect(c - n.width * (u - 1), o, n.width * u, n.height, r);
|
|
2320
|
+
}
|
|
2321
|
+
}, {
|
|
2322
|
+
key: "drawSVGText",
|
|
2323
|
+
value: function(r, n, a) {
|
|
2324
|
+
var i = this.document.createElementNS(Q, "text");
|
|
2325
|
+
if (n.displayValue) {
|
|
2326
|
+
var o, u;
|
|
2327
|
+
i.setAttribute("style", "font:" + n.fontOptions + " " + n.fontSize + "px " + n.font), n.textPosition == "top" ? u = n.fontSize - n.textMargin : u = n.height + n.textMargin + n.fontSize, n.textAlign == "left" || a.barcodePadding > 0 ? (o = 0, i.setAttribute("text-anchor", "start")) : n.textAlign == "right" ? (o = a.width - 1, i.setAttribute("text-anchor", "end")) : (o = a.width / 2, i.setAttribute("text-anchor", "middle")), i.setAttribute("x", o), i.setAttribute("y", u), i.appendChild(this.document.createTextNode(a.text)), r.appendChild(i);
|
|
2328
|
+
}
|
|
2329
|
+
}
|
|
2330
|
+
}, {
|
|
2331
|
+
key: "setSvgAttributes",
|
|
2332
|
+
value: function(r, n) {
|
|
2333
|
+
var a = this.svg;
|
|
2334
|
+
a.setAttribute("width", r + "px"), a.setAttribute("height", n + "px"), a.setAttribute("x", "0px"), a.setAttribute("y", "0px"), a.setAttribute("viewBox", "0 0 " + r + " " + n), a.setAttribute("xmlns", Q), a.setAttribute("version", "1.1"), a.setAttribute("style", "transform: translate(0,0)");
|
|
2335
|
+
}
|
|
2336
|
+
}, {
|
|
2337
|
+
key: "createGroup",
|
|
2338
|
+
value: function(r, n, a) {
|
|
2339
|
+
var i = this.document.createElementNS(Q, "g");
|
|
2340
|
+
return i.setAttribute("transform", "translate(" + r + ", " + n + ")"), a.appendChild(i), i;
|
|
2341
|
+
}
|
|
2342
|
+
}, {
|
|
2343
|
+
key: "setGroupOptions",
|
|
2344
|
+
value: function(r, n) {
|
|
2345
|
+
r.setAttribute("style", "fill:" + n.lineColor + ";");
|
|
2346
|
+
}
|
|
2347
|
+
}, {
|
|
2348
|
+
key: "drawRect",
|
|
2349
|
+
value: function(r, n, a, i, o) {
|
|
2350
|
+
var u = this.document.createElementNS(Q, "rect");
|
|
2351
|
+
return u.setAttribute("x", r), u.setAttribute("y", n), u.setAttribute("width", a), u.setAttribute("height", i), o.appendChild(u), u;
|
|
2352
|
+
}
|
|
2353
|
+
}]), t;
|
|
2354
|
+
}();
|
|
2355
|
+
He.default = Ou;
|
|
2356
|
+
var ze = {};
|
|
2357
|
+
Object.defineProperty(ze, "__esModule", {
|
|
2358
|
+
value: !0
|
|
2359
|
+
});
|
|
2360
|
+
var Eu = function() {
|
|
2361
|
+
function t(e, r) {
|
|
2362
|
+
for (var n = 0; n < r.length; n++) {
|
|
2363
|
+
var a = r[n];
|
|
2364
|
+
a.enumerable = a.enumerable || !1, a.configurable = !0, "value" in a && (a.writable = !0), Object.defineProperty(e, a.key, a);
|
|
2365
|
+
}
|
|
2366
|
+
}
|
|
2367
|
+
return function(e, r, n) {
|
|
2368
|
+
return r && t(e.prototype, r), n && t(e, n), e;
|
|
2369
|
+
};
|
|
2370
|
+
}();
|
|
2371
|
+
function bu(t, e) {
|
|
2372
|
+
if (!(t instanceof e))
|
|
2373
|
+
throw new TypeError("Cannot call a class as a function");
|
|
2374
|
+
}
|
|
2375
|
+
var mu = function() {
|
|
2376
|
+
function t(e, r, n) {
|
|
2377
|
+
bu(this, t), this.object = e, this.encodings = r, this.options = n;
|
|
2378
|
+
}
|
|
2379
|
+
return Eu(t, [{
|
|
2380
|
+
key: "render",
|
|
2381
|
+
value: function() {
|
|
2382
|
+
this.object.encodings = this.encodings;
|
|
2383
|
+
}
|
|
2384
|
+
}]), t;
|
|
2385
|
+
}();
|
|
2386
|
+
ze.default = mu;
|
|
2387
|
+
Object.defineProperty(Ge, "__esModule", {
|
|
2388
|
+
value: !0
|
|
2389
|
+
});
|
|
2390
|
+
var wu = Fe, $u = Xe(wu), xu = He, Su = Xe(xu), Au = ze, Ru = Xe(Au);
|
|
2391
|
+
function Xe(t) {
|
|
2392
|
+
return t && t.__esModule ? t : { default: t };
|
|
2393
|
+
}
|
|
2394
|
+
Ge.default = { CanvasRenderer: $u.default, SVGRenderer: Su.default, ObjectRenderer: Ru.default };
|
|
2395
|
+
var D = {};
|
|
2396
|
+
Object.defineProperty(D, "__esModule", {
|
|
2397
|
+
value: !0
|
|
2398
|
+
});
|
|
2399
|
+
function Ue(t, e) {
|
|
2400
|
+
if (!(t instanceof e))
|
|
2401
|
+
throw new TypeError("Cannot call a class as a function");
|
|
2402
|
+
}
|
|
2403
|
+
function Ve(t, e) {
|
|
2404
|
+
if (!t)
|
|
2405
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
2406
|
+
return e && (typeof e == "object" || typeof e == "function") ? e : t;
|
|
2407
|
+
}
|
|
2408
|
+
function qe(t, e) {
|
|
2409
|
+
if (typeof e != "function" && e !== null)
|
|
2410
|
+
throw new TypeError("Super expression must either be null or a function, not " + typeof e);
|
|
2411
|
+
t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e);
|
|
2412
|
+
}
|
|
2413
|
+
var Pu = function(t) {
|
|
2414
|
+
qe(e, t);
|
|
2415
|
+
function e(r, n) {
|
|
2416
|
+
Ue(this, e);
|
|
2417
|
+
var a = Ve(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this));
|
|
2418
|
+
return a.name = "InvalidInputException", a.symbology = r, a.input = n, a.message = '"' + a.input + '" is not a valid input for ' + a.symbology, a;
|
|
2419
|
+
}
|
|
2420
|
+
return e;
|
|
2421
|
+
}(Error), Tu = function(t) {
|
|
2422
|
+
qe(e, t);
|
|
2423
|
+
function e() {
|
|
2424
|
+
Ue(this, e);
|
|
2425
|
+
var r = Ve(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this));
|
|
2426
|
+
return r.name = "InvalidElementException", r.message = "Not supported type to render on", r;
|
|
2427
|
+
}
|
|
2428
|
+
return e;
|
|
2429
|
+
}(Error), Mu = function(t) {
|
|
2430
|
+
qe(e, t);
|
|
2431
|
+
function e() {
|
|
2432
|
+
Ue(this, e);
|
|
2433
|
+
var r = Ve(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this));
|
|
2434
|
+
return r.name = "NoElementException", r.message = "No element to render on.", r;
|
|
2435
|
+
}
|
|
2436
|
+
return e;
|
|
2437
|
+
}(Error);
|
|
2438
|
+
D.InvalidInputException = Pu;
|
|
2439
|
+
D.InvalidElementException = Tu;
|
|
2440
|
+
D.NoElementException = Mu;
|
|
2441
|
+
Object.defineProperty(Ce, "__esModule", {
|
|
2442
|
+
value: !0
|
|
2443
|
+
});
|
|
2444
|
+
var Iu = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
|
|
2445
|
+
return typeof t;
|
|
2446
|
+
} : function(t) {
|
|
2447
|
+
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
2448
|
+
}, ku = Ne, ye = It(ku), Du = Ge, G = It(Du), ju = D;
|
|
2449
|
+
function It(t) {
|
|
2450
|
+
return t && t.__esModule ? t : { default: t };
|
|
2451
|
+
}
|
|
2452
|
+
function Je(t) {
|
|
2453
|
+
if (typeof t == "string")
|
|
2454
|
+
return Bu(t);
|
|
2455
|
+
if (Array.isArray(t)) {
|
|
2456
|
+
for (var e = [], r = 0; r < t.length; r++)
|
|
2457
|
+
e.push(Je(t[r]));
|
|
2458
|
+
return e;
|
|
2459
|
+
} else {
|
|
2460
|
+
if (typeof HTMLCanvasElement < "u" && t instanceof HTMLImageElement)
|
|
2461
|
+
return Lu(t);
|
|
2462
|
+
if (t && t.nodeName && t.nodeName.toLowerCase() === "svg" || typeof SVGElement < "u" && t instanceof SVGElement)
|
|
2463
|
+
return {
|
|
2464
|
+
element: t,
|
|
2465
|
+
options: (0, ye.default)(t),
|
|
2466
|
+
renderer: G.default.SVGRenderer
|
|
2467
|
+
};
|
|
2468
|
+
if (typeof HTMLCanvasElement < "u" && t instanceof HTMLCanvasElement)
|
|
2469
|
+
return {
|
|
2470
|
+
element: t,
|
|
2471
|
+
options: (0, ye.default)(t),
|
|
2472
|
+
renderer: G.default.CanvasRenderer
|
|
2473
|
+
};
|
|
2474
|
+
if (t && t.getContext)
|
|
2475
|
+
return {
|
|
2476
|
+
element: t,
|
|
2477
|
+
renderer: G.default.CanvasRenderer
|
|
2478
|
+
};
|
|
2479
|
+
if (t && (typeof t > "u" ? "undefined" : Iu(t)) === "object" && !t.nodeName)
|
|
2480
|
+
return {
|
|
2481
|
+
element: t,
|
|
2482
|
+
renderer: G.default.ObjectRenderer
|
|
2483
|
+
};
|
|
2484
|
+
throw new ju.InvalidElementException();
|
|
2485
|
+
}
|
|
2486
|
+
}
|
|
2487
|
+
function Bu(t) {
|
|
2488
|
+
var e = document.querySelectorAll(t);
|
|
2489
|
+
if (e.length !== 0) {
|
|
2490
|
+
for (var r = [], n = 0; n < e.length; n++)
|
|
2491
|
+
r.push(Je(e[n]));
|
|
2492
|
+
return r;
|
|
2493
|
+
}
|
|
2494
|
+
}
|
|
2495
|
+
function Lu(t) {
|
|
2496
|
+
var e = document.createElement("canvas");
|
|
2497
|
+
return {
|
|
2498
|
+
element: e,
|
|
2499
|
+
options: (0, ye.default)(t),
|
|
2500
|
+
renderer: G.default.CanvasRenderer,
|
|
2501
|
+
afterRender: function() {
|
|
2502
|
+
t.setAttribute("src", e.toDataURL());
|
|
2503
|
+
}
|
|
2504
|
+
};
|
|
2505
|
+
}
|
|
2506
|
+
Ce.default = Je;
|
|
2507
|
+
var Ye = {};
|
|
2508
|
+
Object.defineProperty(Ye, "__esModule", {
|
|
2509
|
+
value: !0
|
|
2510
|
+
});
|
|
2511
|
+
var Cu = function() {
|
|
2512
|
+
function t(e, r) {
|
|
2513
|
+
for (var n = 0; n < r.length; n++) {
|
|
2514
|
+
var a = r[n];
|
|
2515
|
+
a.enumerable = a.enumerable || !1, a.configurable = !0, "value" in a && (a.writable = !0), Object.defineProperty(e, a.key, a);
|
|
2516
|
+
}
|
|
2517
|
+
}
|
|
2518
|
+
return function(e, r, n) {
|
|
2519
|
+
return r && t(e.prototype, r), n && t(e, n), e;
|
|
2520
|
+
};
|
|
2521
|
+
}();
|
|
2522
|
+
function Nu(t, e) {
|
|
2523
|
+
if (!(t instanceof e))
|
|
2524
|
+
throw new TypeError("Cannot call a class as a function");
|
|
2525
|
+
}
|
|
2526
|
+
var Gu = function() {
|
|
2527
|
+
function t(e) {
|
|
2528
|
+
Nu(this, t), this.api = e;
|
|
2529
|
+
}
|
|
2530
|
+
return Cu(t, [{
|
|
2531
|
+
key: "handleCatch",
|
|
2532
|
+
value: function(r) {
|
|
2533
|
+
if (r.name === "InvalidInputException")
|
|
2534
|
+
if (this.api._options.valid !== this.api._defaults.valid)
|
|
2535
|
+
this.api._options.valid(!1);
|
|
2536
|
+
else
|
|
2537
|
+
throw r.message;
|
|
2538
|
+
else
|
|
2539
|
+
throw r;
|
|
2540
|
+
this.api.render = function() {
|
|
2541
|
+
};
|
|
2542
|
+
}
|
|
2543
|
+
}, {
|
|
2544
|
+
key: "wrapBarcodeCall",
|
|
2545
|
+
value: function(r) {
|
|
2546
|
+
try {
|
|
2547
|
+
var n = r.apply(void 0, arguments);
|
|
2548
|
+
return this.api._options.valid(!0), n;
|
|
2549
|
+
} catch (a) {
|
|
2550
|
+
return this.handleCatch(a), this.api;
|
|
2551
|
+
}
|
|
2552
|
+
}
|
|
2553
|
+
}]), t;
|
|
2554
|
+
}();
|
|
2555
|
+
Ye.default = Gu;
|
|
2556
|
+
var Fu = ge, m = E(Fu), Hu = k, U = E(Hu), zu = Be, kt = E(zu), Xu = Le, ct = E(Xu), Uu = Ce, Vu = E(Uu), qu = oe, Ju = E(qu), Yu = Ye, Wu = E(Yu), Dt = D, Qu = ue, jt = E(Qu);
|
|
2557
|
+
function E(t) {
|
|
2558
|
+
return t && t.__esModule ? t : { default: t };
|
|
2559
|
+
}
|
|
2560
|
+
var g = function() {
|
|
2561
|
+
}, fe = function(e, r, n) {
|
|
2562
|
+
var a = new g();
|
|
2563
|
+
if (typeof e > "u")
|
|
2564
|
+
throw Error("No element to render on was provided.");
|
|
2565
|
+
return a._renderProperties = (0, Vu.default)(e), a._encodings = [], a._options = jt.default, a._errorHandler = new Wu.default(a), typeof r < "u" && (n = n || {}, n.format || (n.format = Lt()), a.options(n)[n.format](r, n).render()), a;
|
|
2566
|
+
};
|
|
2567
|
+
fe.getModule = function(t) {
|
|
2568
|
+
return m.default[t];
|
|
2569
|
+
};
|
|
2570
|
+
for (var lt in m.default)
|
|
2571
|
+
m.default.hasOwnProperty(lt) && Zu(m.default, lt);
|
|
2572
|
+
function Zu(t, e) {
|
|
2573
|
+
g.prototype[e] = g.prototype[e.toUpperCase()] = g.prototype[e.toLowerCase()] = function(r, n) {
|
|
2574
|
+
var a = this;
|
|
2575
|
+
return a._errorHandler.wrapBarcodeCall(function() {
|
|
2576
|
+
n.text = typeof n.text > "u" ? void 0 : "" + n.text;
|
|
2577
|
+
var i = (0, U.default)(a._options, n);
|
|
2578
|
+
i = (0, Ju.default)(i);
|
|
2579
|
+
var o = t[e], u = Bt(r, o, i);
|
|
2580
|
+
return a._encodings.push(u), a;
|
|
2581
|
+
});
|
|
2582
|
+
};
|
|
2583
|
+
}
|
|
2584
|
+
function Bt(t, e, r) {
|
|
2585
|
+
t = "" + t;
|
|
2586
|
+
var n = new e(t, r);
|
|
2587
|
+
if (!n.valid())
|
|
2588
|
+
throw new Dt.InvalidInputException(n.constructor.name, t);
|
|
2589
|
+
var a = n.encode();
|
|
2590
|
+
a = (0, kt.default)(a);
|
|
2591
|
+
for (var i = 0; i < a.length; i++)
|
|
2592
|
+
a[i].options = (0, U.default)(r, a[i].options);
|
|
2593
|
+
return a;
|
|
2594
|
+
}
|
|
2595
|
+
function Lt() {
|
|
2596
|
+
return m.default.CODE128 ? "CODE128" : Object.keys(m.default)[0];
|
|
2597
|
+
}
|
|
2598
|
+
g.prototype.options = function(t) {
|
|
2599
|
+
return this._options = (0, U.default)(this._options, t), this;
|
|
2600
|
+
};
|
|
2601
|
+
g.prototype.blank = function(t) {
|
|
2602
|
+
var e = new Array(t + 1).join("0");
|
|
2603
|
+
return this._encodings.push({ data: e }), this;
|
|
2604
|
+
};
|
|
2605
|
+
g.prototype.init = function() {
|
|
2606
|
+
if (this._renderProperties) {
|
|
2607
|
+
Array.isArray(this._renderProperties) || (this._renderProperties = [this._renderProperties]);
|
|
2608
|
+
var t;
|
|
2609
|
+
for (var e in this._renderProperties) {
|
|
2610
|
+
t = this._renderProperties[e];
|
|
2611
|
+
var r = (0, U.default)(this._options, t.options);
|
|
2612
|
+
r.format == "auto" && (r.format = Lt()), this._errorHandler.wrapBarcodeCall(function() {
|
|
2613
|
+
var n = r.value, a = m.default[r.format.toUpperCase()], i = Bt(n, a, r);
|
|
2614
|
+
pe(t, i, r);
|
|
2615
|
+
});
|
|
2616
|
+
}
|
|
2617
|
+
}
|
|
2618
|
+
};
|
|
2619
|
+
g.prototype.render = function() {
|
|
2620
|
+
if (!this._renderProperties)
|
|
2621
|
+
throw new Dt.NoElementException();
|
|
2622
|
+
if (Array.isArray(this._renderProperties))
|
|
2623
|
+
for (var t = 0; t < this._renderProperties.length; t++)
|
|
2624
|
+
pe(this._renderProperties[t], this._encodings, this._options);
|
|
2625
|
+
else
|
|
2626
|
+
pe(this._renderProperties, this._encodings, this._options);
|
|
2627
|
+
return this;
|
|
2628
|
+
};
|
|
2629
|
+
g.prototype._defaults = jt.default;
|
|
2630
|
+
function pe(t, e, r) {
|
|
2631
|
+
e = (0, kt.default)(e);
|
|
2632
|
+
for (var n = 0; n < e.length; n++)
|
|
2633
|
+
e[n].options = (0, U.default)(r, e[n].options), (0, ct.default)(e[n].options);
|
|
2634
|
+
(0, ct.default)(r);
|
|
2635
|
+
var a = t.renderer, i = new a(t.element, e, r);
|
|
2636
|
+
i.render(), t.afterRender && t.afterRender();
|
|
2637
|
+
}
|
|
2638
|
+
typeof window < "u" && (window.JsBarcode = fe);
|
|
2639
|
+
typeof jQuery < "u" && (jQuery.fn.JsBarcode = function(t, e) {
|
|
2640
|
+
var r = [];
|
|
2641
|
+
return jQuery(this).each(function() {
|
|
2642
|
+
r.push(this);
|
|
2643
|
+
}), fe(r, t, e);
|
|
2644
|
+
});
|
|
2645
|
+
var Ku = fe;
|
|
2646
|
+
async function ef(t, e = 300, r = 150, n) {
|
|
2647
|
+
const a = document.createElement("canvas");
|
|
2648
|
+
if (!a.getContext("2d"))
|
|
2649
|
+
throw new Error("Canvas context is not available.");
|
|
2650
|
+
return a.width = e, a.height = r, await Ku(a, t, n), a.toDataURL("image/png");
|
|
2651
|
+
}
|
|
2652
|
+
const tf = ["src"], nf = ht({ componentName: qt.FieldWidget }), Sf = /* @__PURE__ */ ht({
|
|
2653
|
+
...nf,
|
|
2654
|
+
__name: "barcode-widget",
|
|
2655
|
+
props: { ...Jt },
|
|
2656
|
+
setup(t, { expose: e }) {
|
|
2657
|
+
const r = t, { exposed: n, extendAttrs: a, fieldObj: i } = Yt(r), o = Ct(""), u = () => {
|
|
2658
|
+
var c, v, b;
|
|
2659
|
+
ef((c = a.value) == null ? void 0 : c.content, 300, 150, {
|
|
2660
|
+
...a.value,
|
|
2661
|
+
width: (v = a.value) == null ? void 0 : v.lineWidth,
|
|
2662
|
+
height: (b = a.value) == null ? void 0 : b.lineHeight
|
|
2663
|
+
}).then((j) => {
|
|
2664
|
+
o.value = j;
|
|
2665
|
+
}).catch((j) => {
|
|
2666
|
+
import("./noimg-89eb860b.js").then((V) => {
|
|
2667
|
+
o.value = V.default;
|
|
2668
|
+
});
|
|
2669
|
+
});
|
|
2670
|
+
};
|
|
2671
|
+
return Nt(() => a.value, (c) => {
|
|
2672
|
+
u();
|
|
2673
|
+
}, { immediate: !0 }), e({ ...n }), (c, v) => (Gt(), Ft(Wt, Ht(c.$props, {
|
|
2674
|
+
"prop-options": { fieldObj: B(i) }
|
|
2675
|
+
}), {
|
|
2676
|
+
default: zt(() => {
|
|
2677
|
+
var b, j, V;
|
|
2678
|
+
return [
|
|
2679
|
+
Xt("img", {
|
|
2680
|
+
ref: "fieldEditor",
|
|
2681
|
+
class: Ut(B(Qt)((b = B(a)) == null ? void 0 : b.customClass)),
|
|
2682
|
+
src: o.value,
|
|
2683
|
+
style: Vt({
|
|
2684
|
+
width: (j = B(a)) == null ? void 0 : j.ctrlWidth,
|
|
2685
|
+
height: (V = B(a)) == null ? void 0 : V.ctrlHeight
|
|
2686
|
+
})
|
|
2687
|
+
}, null, 14, tf)
|
|
2688
|
+
];
|
|
2689
|
+
}),
|
|
2690
|
+
_: 1
|
|
2691
|
+
}, 16, ["prop-options"]));
|
|
2692
|
+
}
|
|
2693
|
+
});
|
|
2694
|
+
export {
|
|
2695
|
+
Sf as default
|
|
2696
|
+
};
|