@emailmaker/emailmaker 1.1.5 → 1.1.6
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/{emailmaker-core.7d5d6426.js → emailmaker-core.0e62ec4f.js} +1 -1
- package/emailmaker-esm.js +2 -2
- package/emailmaker.d.ts +18 -10
- package/emailmaker.js +2 -2
- package/iframe/js/amp.BtGt-xkd.js +1 -1
- package/iframe/js/iframe-eblock.js +1 -1
- package/iframe/js/iframe.js +1 -1
- package/iframe/js/rules.CNqvmp_P.js +1 -1
- package/iframe/js/sanitize-html.BzjMWt1k.js +1 -1
- package/package.json +1 -1
- package/static/core/{d5bba58c.js → 18a6d849.js} +1 -1
- package/static/core/{9ffd0912.js → 2395566a.js} +4 -4
- package/static/core/{771d97fd.js → 32c094cc.js} +1 -1
- package/static/core/{bb9df2d2.js → 33abfdde.js} +2 -2
- package/static/core/37da3ac2.js +1 -0
- package/static/core/{b810b62b.js → 3ba2a2df.js} +1 -1
- package/static/core/{f11f8091.js → 5929a1fb.js} +2 -2
- package/static/core/5f2e1ad8.js +1 -0
- package/static/core/{925dcb4a.js → 77e5c7c2.js} +1 -1
- package/static/core/8c582ee0.js +1 -0
- package/static/core/92011db22.js +1 -0
- package/static/core/{e572105f.js → 92ad1565.js} +16 -16
- package/static/core/9856c4cd.js +1 -0
- package/static/core/992af66a.js +1 -0
- package/static/core/{a389d04a.js → aa02cba4.js} +6 -6
- package/static/core/{bd0eba9e.js → b2851f05.js} +1 -1
- package/static/core/{c4ddaf1d.js → b949d092.js} +2 -2
- package/static/core/bbb9f7e92.js +1 -0
- package/static/core/c229993d.js +47 -0
- package/static/core/{37cc0ac5.js → c900a8e5.js} +2 -2
- package/static/core/{72ee0271.js → cea7a3d0.js} +1 -1
- package/static/core/{5be0cf92.js → e46bb831.js} +1 -1
- package/static/core/{69b8570a.js → e544e2af.js} +9 -9
- package/static/core/{33d703fb.js → f75a0a8d.js} +2 -2
- package/static/core/25f8e56b2.js +0 -1
- package/static/core/2a6d9ce7.js +0 -1
- package/static/core/3872445e.js +0 -1
- package/static/core/45958f0e.js +0 -1
- package/static/core/62164d9a2.js +0 -1
- package/static/core/8cc8d689.js +0 -1
- package/static/core/94941958.js +0 -1
- package/static/core/d62f3e6a.js +0 -47
- package/static/core/f96a3228.js +0 -1
- /package/iframe/{iframe-eblock.7d5d6426.html → iframe-eblock.0e62ec4f.html} +0 -0
- /package/iframe/{iframe.7d5d6426.html → iframe.0e62ec4f.html} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__emailmaker__.define(`static/core/37da3ac2.js`,[`require`,`exports`,`module`,`static/core/354bf8a9.js`],function(e,t,n){e("./354bf8a9.js"),t.conf={comments:{lineComment:`;`,blockComment:[`#|`,`|#`]},brackets:[[`(`,`)`],[`{`,`}`],[`[`,`]`]],autoClosingPairs:[{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`"`,close:`"`}],surroundingPairs:[{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`"`,close:`"`}]},t.language={defaultToken:``,ignoreCase:!0,tokenPostfix:`.scheme`,brackets:[{open:`(`,close:`)`,token:`delimiter.parenthesis`},{open:`{`,close:`}`,token:`delimiter.curly`},{open:`[`,close:`]`,token:`delimiter.square`}],keywords:[`case`,`do`,`let`,`loop`,`if`,`else`,`when`,`cons`,`car`,`cdr`,`cond`,`lambda`,`lambda*`,`syntax-rules`,`format`,`set!`,`quote`,`eval`,`append`,`list`,`list?`,`member?`,`load`],constants:[`#t`,`#f`],operators:[`eq?`,`eqv?`,`equal?`,`and`,`or`,`not`,`null?`],tokenizer:{root:[[/#[xXoObB][0-9a-fA-F]+/,`number.hex`],[/[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?/,`number.float`],[/(?:\b(?:(define|define-syntax|define-macro))\b)(\s+)((?:\w|\-|\!|\?)*)/,[`keyword`,`white`,`variable`]],{include:`@whitespace`},{include:`@strings`},[/[a-zA-Z_#][a-zA-Z0-9_\-\?\!\*]*/,{cases:{"@keywords":`keyword`,"@constants":`constant`,"@operators":`operators`,"@default":`identifier`}}]],comment:[[/[^\|#]+/,`comment`],[/#\|/,`comment`,`@push`],[/\|#/,`comment`,`@pop`],[/[\|#]/,`comment`]],whitespace:[[/[ \t\r\n]+/,`white`],[/#\|/,`comment`,`@comment`],[/;.*$/,`comment`]],strings:[[/"$/,`string`,`@popall`],[/"(?=.)/,`string`,`@multiLineString`]],multiLineString:[[/[^\\"]+$/,`string`,`@popall`],[/[^\\"]+/,`string`],[/\\./,`string.escape`],[/"/,`string`,`@popall`],[/\\$/,`string`]]}}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
__emailmaker__.define(`static/core/b810b62b.js`,[`require`,`exports`,`module`,`static/core/354bf8a9.js`,`static/core/e572105f.js`],function(e,t,n){e("./354bf8a9.js");let r=e("./e572105f.js");var i,a,o={},s={},c={};function l(){return i?c:(i=1,Object.defineProperty(c,"__esModule",{value:!0}),c.default=function e(t,n){(function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)})(this,e),this.data=t,this.text=n.text||t,this.options=n},c)}function u(){if(a)return s;a=1,Object.defineProperty(s,"__esModule",{value:!0}),s.CODE39=void 0;var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=function(e){function n(e,t){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,n),e=e.toUpperCase(),t.mod43&&(e+=function(e){return r[e]}(function(e){for(var t=0,n=0;n<e.length;n++)t+=c(e[n]);return t%=43}(e))),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),t(n,[{key:`encode`,value:function(){for(var e=o(`*`),t=0;t<this.data.length;t++)e+=o(this.data[t])+`0`;return{data:e+=o(`*`),text:this.text}}},{key:`valid`,value:function(){return this.data.search(/^[0-9A-Z\-\.\ \$\/\+\%]+$/)!==-1}}]),n}(((e=l())&&e.__esModule?e:{default:e}).default),r=`0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%*`.split(``),i=[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];function o(e){return function(e){return i[e].toString(2)}(c(e))}function c(e){return r.indexOf(e)}return s.CODE39=n,s}var d,ee,f={},p={},m={},h={};function g(){if(d)return h;var e;function t(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}d=1,Object.defineProperty(h,"__esModule",{value:!0});var n=h.SET_A=0,r=h.SET_B=1,i=h.SET_C=2;h.SHIFT=98;var a=h.START_A=103,o=h.START_B=104,s=h.START_C=105;return h.MODULO=103,h.STOP=106,h.FNC1=207,h.SET_BY_CODE=(t(e={},a,n),t(e,o,r),t(e,s,i),e),h.SWAP={101:n,100:r,99:i},h.A_START_CHAR=`Ð`,h.B_START_CHAR=`Ñ`,h.C_START_CHAR=`Ò`,h.A_CHARS=`[\0-_È-Ï]`,h.B_CHARS=`[ -È-Ï]`,h.C_CHARS=`(Ï*[0-9]{2}Ï*)`,h.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],h}function _(){if(ee)return m;ee=1,Object.defineProperty(m,"__esModule",{value:!0});var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=(e=l())&&e.__esModule?e:{default:e},r=g();return m.default=function(e){function n(e,t){(function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)})(this,n);var r=function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e.substring(1),t));return r.bytes=e.split(``).map(function(e){return e.charCodeAt(0)}),r}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),t(n,[{key:`valid`,value:function(){return/^[\x00-\x7F\xC8-\xD3]+$/.test(this.data)}},{key:`encode`,value:function(){var e=this.bytes,t=e.shift()-105,i=r.SET_BY_CODE[t];if(i===void 0)throw RangeError(`The encoding does not start with a start character.`);!0===this.shouldEncodeAsEan128()&&e.unshift(r.FNC1);var a=n.next(e,1,i);return{text:this.text===this.data?this.text.replace(/[^\x20-\x7E]/g,``):this.text,data:n.getBar(t)+a.result+n.getBar((a.checksum+t)%r.MODULO)+n.getBar(r.STOP)}}},{key:`shouldEncodeAsEan128`,value:function(){var e=this.options.ean128||!1;return typeof e==`string`&&(e=e.toLowerCase()===`true`),e}}],[{key:`getBar`,value:function(e){return r.BARS[e]?r.BARS[e].toString():``}},{key:`correctIndex`,value:function(e,t){if(t===r.SET_A){var n=e.shift();return n<32?n+64:n-32}return t===r.SET_B?e.shift()-32:10*(e.shift()-48)+e.shift()-48}},{key:`next`,value:function(e,t,i){if(!e.length)return{result:``,checksum:0};var a=void 0,o=void 0;if(e[0]>=200){o=e.shift()-105;var s=r.SWAP[o];s===void 0?(i!==r.SET_A&&i!==r.SET_B||o!==r.SHIFT||(e[0]=i===r.SET_A?e[0]>95?e[0]-96:e[0]:e[0]<32?e[0]+96:e[0]),a=n.next(e,t+1,i)):a=n.next(e,t+1,s)}else o=n.correctIndex(e,i),a=n.next(e,t+1,i);var c=o*t;return{result:n.getBar(o)+a.result,checksum:c+a.checksum}}}]),n}(n.default),m}var te,ne,v={};function re(){if(ne)return p;ne=1,Object.defineProperty(p,"__esModule",{value:!0});var e=n(_()),t=n(function(){if(te)return v;te=1,Object.defineProperty(v,"__esModule",{value:!0});var e=g(),t=function(t){return t.match(RegExp(`^`+e.A_CHARS+`*`))[0].length},n=function(t){return t.match(RegExp(`^`+e.B_CHARS+`*`))[0].length},r=function(t){return t.match(RegExp(`^`+e.C_CHARS+`*`))[0]};function i(t,n){var r=n?e.A_CHARS:e.B_CHARS,o=t.match(RegExp(`^(`+r+`+?)(([0-9]{2}){2,})([^0-9]|$)`));if(o)return o[1]+`Ì`+a(t.substring(o[1].length));var s=t.match(RegExp(`^`+r+`+`))[0];return s.length===t.length?t:s+String.fromCharCode(n?205:206)+i(t.substring(s.length),!n)}function a(e){var a=r(e),o=a.length;if(o===e.length)return e;e=e.substring(o);var s=t(e)>=n(e);return a+String.fromCharCode(s?206:205)+i(e,s)}return v.default=function(o){var s=void 0;if(r(o).length>=2)s=e.C_START_CHAR+a(o);else{var c=t(o)>n(o);s=(c?e.A_START_CHAR:e.B_START_CHAR)+i(o,c)}return s.replace(/[\xCD\xCE]([^])[\xCD\xCE]/,function(e,t){return`Ë`+t})},v}());function n(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}return p.default=function(e){function n(e,i){if(function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,n),/^[\x00-\x7F\xC8-\xD3]+$/.test(e))var a=r(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,(0,t.default)(e),i));else a=r(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,i));return r(a)}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),n}(e.default),p}var ie,y={};function ae(){if(ie)return y;ie=1,Object.defineProperty(y,"__esModule",{value:!0});var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=(e=_())&&e.__esModule?e:{default:e},r=g();return y.default=function(e){function n(e,t){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,n),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,r.A_START_CHAR+e,t))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),t(n,[{key:`valid`,value:function(){return RegExp(`^`+r.A_CHARS+`+$`).test(this.data)}}]),n}(n.default),y}var oe,b={};function se(){if(oe)return b;oe=1,Object.defineProperty(b,"__esModule",{value:!0});var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=(e=_())&&e.__esModule?e:{default:e},r=g();return b.default=function(e){function n(e,t){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,n),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,r.B_START_CHAR+e,t))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),t(n,[{key:`valid`,value:function(){return RegExp(`^`+r.B_CHARS+`+$`).test(this.data)}}]),n}(n.default),b}var ce,le,ue={};function de(){if(ce)return ue;ce=1,Object.defineProperty(ue,"__esModule",{value:!0});var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=(e=_())&&e.__esModule?e:{default:e},r=g();return ue.default=function(e){function n(e,t){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,n),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,r.C_START_CHAR+e,t))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),t(n,[{key:`valid`,value:function(){return RegExp(`^`+r.C_CHARS+`+$`).test(this.data)}}]),n}(n.default),ue}var fe,x={},pe={},S={};function C(){return fe||(fe=1,Object.defineProperty(S,"__esModule",{value:!0}),S.SIDE_BIN=`101`,S.MIDDLE_BIN=`01010`,S.BINARIES={L:[`0001101`,`0011001`,`0010011`,`0111101`,`0100011`,`0110001`,`0101111`,`0111011`,`0110111`,`0001011`],G:[`0100111`,`0110011`,`0011011`,`0100001`,`0011101`,`0111001`,`0000101`,`0010001`,`0001001`,`0010111`],R:[`1110010`,`1100110`,`1101100`,`1000010`,`1011100`,`1001110`,`1010000`,`1000100`,`1001000`,`1110100`],O:[`0001101`,`0011001`,`0010011`,`0111101`,`0100011`,`0110001`,`0101111`,`0111011`,`0110111`,`0001011`],E:[`0100111`,`0110011`,`0011011`,`0100001`,`0011101`,`0111001`,`0000101`,`0010001`,`0001001`,`0010111`]},S.EAN2_STRUCTURE=[`LL`,`LG`,`GL`,`GG`],S.EAN5_STRUCTURE=[`GGLLL`,`GLGLL`,`GLLGL`,`GLLLG`,`LGGLL`,`LLGGL`,`LLLGG`,`LGLGL`,`LGLLG`,`LLGLG`],S.EAN13_STRUCTURE=[`LLLLLL`,`LLGLGG`,`LLGGLG`,`LLGGGL`,`LGLLGG`,`LGGLLG`,`LGGGLL`,`LGLGLG`,`LGLGGL`,`LGGLGL`]),S}var me,he,ge,w={},T={};function E(){if(me)return T;me=1,Object.defineProperty(T,"__esModule",{value:!0});var e=C();return T.default=function(t,n,r){var i=t.split(``).map(function(t,r){return e.BINARIES[n[r]]}).map(function(e,n){return e?e[t[n]]:``});if(r){var a=t.length-1;i=i.map(function(e,t){return t<a?e+r:e})}return i.join(``)},T}function _e(){if(he)return w;he=1,Object.defineProperty(w,"__esModule",{value:!0});var e=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),t=C(),n=r(E());function r(e){return e&&e.__esModule?e:{default:e}}return w.default=function(r){function i(e,t){(function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)})(this,i);var n=function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,e,t));return n.fontSize=!t.flat&&t.fontSize>10*t.width?10*t.width:t.fontSize,n.guardHeight=t.height+n.fontSize/2+t.textMargin,n}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(i,r),e(i,[{key:`encode`,value:function(){return this.options.flat?this.encodeFlat():this.encodeGuarded()}},{key:`leftText`,value:function(e,t){return this.text.substr(e,t)}},{key:`leftEncode`,value:function(e,t){return(0,n.default)(e,t)}},{key:`rightText`,value:function(e,t){return this.text.substr(e,t)}},{key:`rightEncode`,value:function(e,t){return(0,n.default)(e,t)}},{key:`encodeGuarded`,value:function(){var e={fontSize:this.fontSize},n={height:this.guardHeight};return[{data:t.SIDE_BIN,options:n},{data:this.leftEncode(),text:this.leftText(),options:e},{data:t.MIDDLE_BIN,options:n},{data:this.rightEncode(),text:this.rightText(),options:e},{data:t.SIDE_BIN,options:n}]}},{key:`encodeFlat`,value:function(){return{data:[t.SIDE_BIN,this.leftEncode(),t.MIDDLE_BIN,this.rightEncode(),t.SIDE_BIN].join(``),text:this.text}}}]),i}(r(l()).default),w}function ve(){if(ge)return pe;ge=1,Object.defineProperty(pe,"__esModule",{value:!0});var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=function e(t,n,r){t===null&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(i===void 0){var a=Object.getPrototypeOf(t);return a===null?void 0:e(a,n,r)}if(`value`in i)return i.value;var o=i.get;return o===void 0?void 0:o.call(r)},r=C(),i=(e=_e())&&e.__esModule?e:{default:e},a=function(e){return(10-e.substr(0,12).split(``).map(function(e){return+e}).reduce(function(e,t,n){return n%2?e+3*t:e+t},0)%10)%10};return pe.default=function(e){function i(e,t){(function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)})(this,i),e.search(/^[0-9]{12}$/)!==-1&&(e+=a(e));var n=function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,e,t));return n.lastChar=t.lastChar,n}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(i,e),t(i,[{key:`valid`,value:function(){return this.data.search(/^[0-9]{13}$/)!==-1&&+this.data[12]===a(this.data)}},{key:`leftText`,value:function(){return n(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),`leftText`,this).call(this,1,6)}},{key:`leftEncode`,value:function(){var e=this.data.substr(1,6),t=r.EAN13_STRUCTURE[this.data[0]];return n(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),`leftEncode`,this).call(this,e,t)}},{key:`rightText`,value:function(){return n(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),`rightText`,this).call(this,7,6)}},{key:`rightEncode`,value:function(){var e=this.data.substr(7,6);return n(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),`rightEncode`,this).call(this,e,`RRRRRR`)}},{key:`encodeGuarded`,value:function(){var e=n(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),`encodeGuarded`,this).call(this);return this.options.displayValue&&(e.unshift({data:`000000000000`,text:this.text.substr(0,1),options:{textAlign:`left`,fontSize:this.fontSize}}),this.options.lastChar&&(e.push({data:`00`}),e.push({data:`00000`,text:this.options.lastChar,options:{fontSize:this.fontSize}}))),e}}]),i}(i.default),pe}var ye,D={};function be(){if(ye)return D;ye=1,Object.defineProperty(D,"__esModule",{value:!0});var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=function e(t,n,r){t===null&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(i===void 0){var a=Object.getPrototypeOf(t);return a===null?void 0:e(a,n,r)}if(`value`in i)return i.value;var o=i.get;return o===void 0?void 0:o.call(r)},r=(e=_e())&&e.__esModule?e:{default:e},i=function(e){return(10-e.substr(0,7).split(``).map(function(e){return+e}).reduce(function(e,t,n){return n%2?e+t:e+3*t},0)%10)%10};return D.default=function(e){function r(e,t){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,r),e.search(/^[0-9]{7}$/)!==-1&&(e+=i(e)),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,e,t))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(r,e),t(r,[{key:`valid`,value:function(){return this.data.search(/^[0-9]{8}$/)!==-1&&+this.data[7]===i(this.data)}},{key:`leftText`,value:function(){return n(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),`leftText`,this).call(this,0,4)}},{key:`leftEncode`,value:function(){var e=this.data.substr(0,4);return n(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),`leftEncode`,this).call(this,e,`LLLL`)}},{key:`rightText`,value:function(){return n(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),`rightText`,this).call(this,4,4)}},{key:`rightEncode`,value:function(){var e=this.data.substr(4,4);return n(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),`rightEncode`,this).call(this,e,`RRRR`)}}]),r}(r.default),D}var xe,O={};function Se(){if(xe)return O;xe=1,Object.defineProperty(O,"__esModule",{value:!0});var e=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),t=C(),n=i(E()),r=i(l());function i(e){return e&&e.__esModule?e:{default:e}}return O.default=function(r){function i(e,t){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,i),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,e,t))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(i,r),e(i,[{key:`valid`,value:function(){return this.data.search(/^[0-9]{5}$/)!==-1}},{key:`encode`,value:function(){var e,r=t.EAN5_STRUCTURE[e=this.data,e.split(``).map(function(e){return+e}).reduce(function(e,t,n){return n%2?e+9*t:e+3*t},0)%10];return{data:`1011`+(0,n.default)(this.data,r,`01`),text:this.text}}}]),i}(r.default),O}var Ce,k={};function we(){if(Ce)return k;Ce=1,Object.defineProperty(k,"__esModule",{value:!0});var e=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),t=C(),n=r(E());function r(e){return e&&e.__esModule?e:{default:e}}return k.default=function(r){function i(e,t){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,i),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,e,t))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(i,r),e(i,[{key:`valid`,value:function(){return this.data.search(/^[0-9]{2}$/)!==-1}},{key:`encode`,value:function(){var e=t.EAN2_STRUCTURE[parseInt(this.data)%4];return{data:`1011`+(0,n.default)(this.data,e,`01`),text:this.text}}}]),i}(r(l()).default),k}var Te,A={};function Ee(){if(Te)return A;Te=1,Object.defineProperty(A,"__esModule",{value:!0});var e=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();A.checksum=i;var t=n(E());function n(e){return e&&e.__esModule?e:{default:e}}var r=function(n){function r(e,t){(function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)})(this,r),e.search(/^[0-9]{11}$/)!==-1&&(e+=i(e));var n=function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,e,t));return n.displayValue=t.displayValue,t.fontSize>10*t.width?n.fontSize=10*t.width:n.fontSize=t.fontSize,n.guardHeight=t.height+n.fontSize/2+t.textMargin,n}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(r,n),e(r,[{key:`valid`,value:function(){return this.data.search(/^[0-9]{12}$/)!==-1&&this.data[11]==i(this.data)}},{key:`encode`,value:function(){return this.options.flat?this.flatEncoding():this.guardedEncoding()}},{key:`flatEncoding`,value:function(){var e=``;return e+=`101`,e+=(0,t.default)(this.data.substr(0,6),`LLLLLL`),e+=`01010`,e+=(0,t.default)(this.data.substr(6,6),`RRRRRR`),{data:e+=`101`,text:this.text}}},{key:`guardedEncoding`,value:function(){var e=[];return this.displayValue&&e.push({data:`00000000`,text:this.text.substr(0,1),options:{textAlign:`left`,fontSize:this.fontSize}}),e.push({data:`101`+(0,t.default)(this.data[0],`L`),options:{height:this.guardHeight}}),e.push({data:(0,t.default)(this.data.substr(1,5),`LLLLL`),text:this.text.substr(1,5),options:{fontSize:this.fontSize}}),e.push({data:`01010`,options:{height:this.guardHeight}}),e.push({data:(0,t.default)(this.data.substr(6,5),`RRRRR`),text:this.text.substr(6,5),options:{fontSize:this.fontSize}}),e.push({data:(0,t.default)(this.data[11],`R`)+`101`,options:{height:this.guardHeight}}),this.displayValue&&e.push({data:`00000000`,text:this.text.substr(11,1),options:{textAlign:`right`,fontSize:this.fontSize}}),e}}]),r}(n(l()).default);function i(e){var t,n=0;for(t=1;t<11;t+=2)n+=parseInt(e[t]);for(t=0;t<11;t+=2)n+=3*parseInt(e[t]);return(10-n%10)%10}return A.default=r,A}var De,Oe,j={};function ke(){if(De)return j;De=1,Object.defineProperty(j,"__esModule",{value:!0});var e=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),t=i(E()),n=i(l()),r=Ee();function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}var o=[`XX00000XXX`,`XX10000XXX`,`XX20000XXX`,`XXX00000XX`,`XXXX00000X`,`XXXXX00005`,`XXXXX00006`,`XXXXX00007`,`XXXXX00008`,`XXXXX00009`],s=[[`EEEOOO`,`OOOEEE`],[`EEOEOO`,`OOEOEE`],[`EEOOEO`,`OOEEOE`],[`EEOOOE`,`OOEEEO`],[`EOEEOO`,`OEOOEE`],[`EOOEEO`,`OEEOOE`],[`EOOOEE`,`OEEEOO`],[`EOEOEO`,`OEOEOE`],[`EOEOOE`,`OEOEEO`],[`EOOEOE`,`OEEOEO`]],c=function(n){function r(e,t){(function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)})(this,r);var n=a(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,e,t));if(n.isValid=!1,e.search(/^[0-9]{6}$/)!==-1)n.middleDigits=e,n.upcA=u(e,`0`),n.text=t.text||``+n.upcA[0]+e+n.upcA[n.upcA.length-1],n.isValid=!0;else{if(e.search(/^[01][0-9]{7}$/)===-1||(n.middleDigits=e.substring(1,e.length-1),n.upcA=u(n.middleDigits,e[0]),n.upcA[n.upcA.length-1]!==e[e.length-1]))return a(n);n.isValid=!0}return n.displayValue=t.displayValue,t.fontSize>10*t.width?n.fontSize=10*t.width:n.fontSize=t.fontSize,n.guardHeight=t.height+n.fontSize/2+t.textMargin,n}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(r,n),e(r,[{key:`valid`,value:function(){return this.isValid}},{key:`encode`,value:function(){return this.options.flat?this.flatEncoding():this.guardedEncoding()}},{key:`flatEncoding`,value:function(){var e=``;return e+=`101`,e+=this.encodeMiddleDigits(),{data:e+=`010101`,text:this.text}}},{key:`guardedEncoding`,value:function(){var e=[];return this.displayValue&&e.push({data:`00000000`,text:this.text[0],options:{textAlign:`left`,fontSize:this.fontSize}}),e.push({data:`101`,options:{height:this.guardHeight}}),e.push({data:this.encodeMiddleDigits(),text:this.text.substring(1,7),options:{fontSize:this.fontSize}}),e.push({data:`010101`,options:{height:this.guardHeight}}),this.displayValue&&e.push({data:`00000000`,text:this.text[7],options:{textAlign:`right`,fontSize:this.fontSize}}),e}},{key:`encodeMiddleDigits`,value:function(){var e=this.upcA[0],n=this.upcA[this.upcA.length-1],r=s[parseInt(n)][parseInt(e)];return(0,t.default)(this.middleDigits,r)}}]),r}(n.default);function u(e,t){for(var n=o[parseInt(e[e.length-1])],i=``,a=0,s=0;s<n.length;s++){var c=n[s];i+=c===`X`?e[a++]:c}return(i=``+t+i)+(0,r.checksum)(i)}return j.default=c,j}var Ae,je,M={},N={},P={};function Me(){if(je)return N;je=1,Object.defineProperty(N,"__esModule",{value:!0});var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=(Ae||(Ae=1,Object.defineProperty(P,"__esModule",{value:!0}),P.START_BIN=`1010`,P.END_BIN=`11101`,P.BINARIES=[`00110`,`10001`,`01001`,`11000`,`00101`,`10100`,`01100`,`00011`,`10010`,`01010`]),P);return N.default=function(e){function r(){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,r),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(r.__proto__||Object.getPrototypeOf(r)).apply(this,arguments))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(r,e),t(r,[{key:`valid`,value:function(){return this.data.search(/^([0-9]{2})+$/)!==-1}},{key:`encode`,value:function(){var e=this,t=this.data.match(/.{2}/g).map(function(t){return e.encodePair(t)}).join(``);return{data:n.START_BIN+t+n.END_BIN,text:this.text}}},{key:`encodePair`,value:function(e){var t=n.BINARIES[e[1]];return n.BINARIES[e[0]].split(``).map(function(e,n){return(e===`1`?`111`:`1`)+(t[n]===`1`?`000`:`0`)}).join(``)}}]),r}(((e=l())&&e.__esModule?e:{default:e}).default),N}var Ne,Pe,F={};function Fe(){if(Ne)return F;Ne=1,Object.defineProperty(F,"__esModule",{value:!0});var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=(e=Me())&&e.__esModule?e:{default:e},r=function(e){var t=e.substr(0,13).split(``).map(function(e){return parseInt(e,10)}).reduce(function(e,t,n){return e+t*(3-n%2*2)},0);return 10*Math.ceil(t/10)-t};return F.default=function(e){function n(e,t){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,n),e.search(/^[0-9]{13}$/)!==-1&&(e+=r(e)),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),t(n,[{key:`valid`,value:function(){return this.data.search(/^[0-9]{14}$/)!==-1&&+this.data[13]===r(this.data)}}]),n}(n.default),F}var Ie,I={},L={};function R(){if(Ie)return L;Ie=1,Object.defineProperty(L,"__esModule",{value:!0});var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=function(e){function n(e,t){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,n),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),t(n,[{key:`encode`,value:function(){for(var e=`110`,t=0;t<this.data.length;t++){var n=parseInt(this.data[t]).toString(2);n=r(n,4-n.length);for(var i=0;i<n.length;i++)e+=n[i]==`0`?`100`:`110`}return{data:e+=`1001`,text:this.text}}},{key:`valid`,value:function(){return this.data.search(/^[0-9]+$/)!==-1}}]),n}(((e=l())&&e.__esModule?e:{default:e}).default);function r(e,t){for(var n=0;n<t;n++)e=`0`+e;return e}return L.default=n,L}var Le,Re,z={},B={};function V(){return Le?B:(Le=1,Object.defineProperty(B,"__esModule",{value:!0}),B.mod10=function(e){for(var t=0,n=0;n<e.length;n++){var r=parseInt(e[n]);(n+e.length)%2==0?t+=r:t+=2*r%10+Math.floor(2*r/10)}return(10-t%10)%10},B.mod11=function(e){for(var t=0,n=[2,3,4,5,6,7],r=0;r<e.length;r++){var i=parseInt(e[e.length-1-r]);t+=n[r%n.length]*i}return(11-t%11)%11},B)}function ze(){if(Re)return z;Re=1,Object.defineProperty(z,"__esModule",{value:!0});var e,t=(e=R())&&e.__esModule?e:{default:e},n=V();return z.default=function(e){function t(e,r){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,t),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e+(0,n.mod10)(e),r))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(t.default),z}var Be,H={};function Ve(){if(Be)return H;Be=1,Object.defineProperty(H,"__esModule",{value:!0});var e,t=(e=R())&&e.__esModule?e:{default:e},n=V();return H.default=function(e){function t(e,r){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,t),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e+(0,n.mod11)(e),r))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(t.default),H}var He,U={};function Ue(){if(He)return U;He=1,Object.defineProperty(U,"__esModule",{value:!0});var e,t=(e=R())&&e.__esModule?e:{default:e},n=V();return U.default=function(e){function t(e,r){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,t),e+=(0,n.mod10)(e),e+=(0,n.mod10)(e),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(t.default),U}var We,Ge,Ke={};function qe(){if(We)return Ke;We=1,Object.defineProperty(Ke,"__esModule",{value:!0});var e,t=(e=R())&&e.__esModule?e:{default:e},n=V();return Ke.default=function(e){function t(e,r){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,t),e+=(0,n.mod11)(e),e+=(0,n.mod10)(e),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(t.default),Ke}var Je,W={};function Ye(){if(Je)return W;Je=1,Object.defineProperty(W,"__esModule",{value:!0}),W.pharmacode=void 0;var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();return W.pharmacode=function(e){function n(e,t){(function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)})(this,n);var r=function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t));return r.number=parseInt(e,10),r}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),t(n,[{key:`encode`,value:function(){for(var e=this.number,t=``;!isNaN(e)&&e!=0;)e%2==0?(t=`11100`+t,e=(e-2)/2):(t=`100`+t,e=(e-1)/2);return{data:t=t.slice(0,-2),text:this.text}}},{key:`valid`,value:function(){return this.number>=3&&this.number<=131070}}]),n}(((e=l())&&e.__esModule?e:{default:e}).default),W}var Xe,G={};function Ze(){if(Xe)return G;Xe=1,Object.defineProperty(G,"__esModule",{value:!0}),G.codabar=void 0;var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();return G.codabar=function(e){function n(e,t){(function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)})(this,n),e.search(/^[0-9\-\$\:\.\+\/]+$/)===0&&(e=`A`+e+`A`);var r=function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e.toUpperCase(),t));return r.text=r.options.text||r.text.replace(/[A-D]/g,``),r}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),t(n,[{key:`valid`,value:function(){return this.data.search(/^[A-D][0-9\-\$\:\.\+\/]+[A-D]$/)!==-1}},{key:`encode`,value:function(){for(var e=[],t=this.getEncodings(),n=0;n<this.data.length;n++)e.push(t[this.data.charAt(n)]),n!==this.data.length-1&&e.push(`0`);return{text:this.text,data:e.join(``)}}},{key:`getEncodings`,value:function(){return{0:`101010011`,1:`101011001`,2:`101001011`,3:`110010101`,4:`101101001`,5:`110101001`,6:`100101011`,7:`100101101`,8:`100110101`,9:`110100101`,"-":`101001101`,$:`101100101`,":":`1101011011`,"/":`1101101011`,".":`1101101101`,"+":`1011011011`,A:`1011001001`,B:`1001001011`,C:`1010010011`,D:`1010011001`}}}]),n}(((e=l())&&e.__esModule?e:{default:e}).default),G}var Qe,$e,K={},q={},J={};function et(){if($e)return q;$e=1,Object.defineProperty(q,"__esModule",{value:!0});var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=(Qe||(Qe=1,Object.defineProperty(J,"__esModule",{value:!0}),J.SYMBOLS=`0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,-,., ,$,/,+,%,($),(%),(/),(+),ÿ`.split(`,`),J.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`.split(`.`),J.MULTI_SYMBOLS={"\0":[`(%)`,`U`],"":[`($)`,`A`],"":[`($)`,`B`],"":[`($)`,`C`],"":[`($)`,`D`],"":[`($)`,`E`],"":[`($)`,`F`],"\x07":[`($)`,`G`],"\b":[`($)`,`H`]," ":[`($)`,`I`],"\n":[`($)`,`J`],"\v":[`($)`,`K`],"\f":[`($)`,`L`],"\r":[`($)`,`M`],"":[`($)`,`N`],"":[`($)`,`O`],"":[`($)`,`P`],"":[`($)`,`Q`],"":[`($)`,`R`],"":[`($)`,`S`],"":[`($)`,`T`],"":[`($)`,`U`],"":[`($)`,`V`],"":[`($)`,`W`],"":[`($)`,`X`],"":[`($)`,`Y`],"":[`($)`,`Z`],"\x1B":[`(%)`,`A`],"":[`(%)`,`B`],"":[`(%)`,`C`],"":[`(%)`,`D`],"":[`(%)`,`E`],"!":[`(/)`,`A`],'"':[`(/)`,`B`],"#":[`(/)`,`C`],"&":[`(/)`,`F`],"'":[`(/)`,`G`],"(":[`(/)`,`H`],")":[`(/)`,`I`],"*":[`(/)`,`J`],",":[`(/)`,`L`],":":[`(/)`,`Z`],";":[`(%)`,`F`],"<":[`(%)`,`G`],"=":[`(%)`,`H`],">":[`(%)`,`I`],"?":[`(%)`,`J`],"@":[`(%)`,`V`],"[":[`(%)`,`K`],"\\":[`(%)`,`L`],"]":[`(%)`,`M`],"^":[`(%)`,`N`],_:[`(%)`,`O`],"`":[`(%)`,`W`],a:[`(+)`,`A`],b:[`(+)`,`B`],c:[`(+)`,`C`],d:[`(+)`,`D`],e:[`(+)`,`E`],f:[`(+)`,`F`],g:[`(+)`,`G`],h:[`(+)`,`H`],i:[`(+)`,`I`],j:[`(+)`,`J`],k:[`(+)`,`K`],l:[`(+)`,`L`],m:[`(+)`,`M`],n:[`(+)`,`N`],o:[`(+)`,`O`],p:[`(+)`,`P`],q:[`(+)`,`Q`],r:[`(+)`,`R`],s:[`(+)`,`S`],t:[`(+)`,`T`],u:[`(+)`,`U`],v:[`(+)`,`V`],w:[`(+)`,`W`],x:[`(+)`,`X`],y:[`(+)`,`Y`],z:[`(+)`,`Z`],"{":[`(%)`,`P`],"|":[`(%)`,`Q`],"}":[`(%)`,`R`],"~":[`(%)`,`S`],"":[`(%)`,`T`]}),J);return q.default=function(e){function r(e,t){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,r),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,e,t))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(r,e),t(r,[{key:`valid`,value:function(){return/^[0-9A-Z\-. $/+%]+$/.test(this.data)}},{key:`encode`,value:function(){var e=this.data.split(``).flatMap(function(e){return n.MULTI_SYMBOLS[e]||e}),t=e.map(function(e){return r.getEncoding(e)}).join(``),i=r.checksum(e,20),a=r.checksum(e.concat(i),15);return{text:this.text,data:r.getEncoding(`ÿ`)+t+r.getEncoding(i)+r.getEncoding(a)+r.getEncoding(`ÿ`)+`1`}}}],[{key:`getEncoding`,value:function(e){return n.BINARIES[r.symbolValue(e)]}},{key:`getSymbol`,value:function(e){return n.SYMBOLS[e]}},{key:`symbolValue`,value:function(e){return n.SYMBOLS.indexOf(e)}},{key:`checksum`,value:function(e,t){var n=e.slice().reverse().reduce(function(e,n,i){var a=i%t+1;return e+r.symbolValue(n)*a},0);return r.getSymbol(n%47)}}]),r}(((e=l())&&e.__esModule?e:{default:e}).default),q}var tt,nt,Y={};function rt(){if(tt)return Y;tt=1,Object.defineProperty(Y,"__esModule",{value:!0});var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();return Y.default=function(e){function n(e,t){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,n),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),t(n,[{key:`valid`,value:function(){return/^[\x00-\x7f]+$/.test(this.data)}}]),n}(((e=et())&&e.__esModule?e:{default:e}).default),Y}var it,at,X={};function ot(){if(it)return X;it=1,Object.defineProperty(X,"__esModule",{value:!0}),X.GenericBarcode=void 0;var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();return X.GenericBarcode=function(e){function n(e,t){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,n),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),t(n,[{key:`encode`,value:function(){return{data:`10101010101010101010101010101010101010101`,text:this.text}}},{key:`valid`,value:function(){return!0}}]),n}(((e=l())&&e.__esModule?e:{default:e}).default),X}function st(){if(at)return o;at=1,Object.defineProperty(o,"__esModule",{value:!0});var e=u(),t=function(){if(le)return f;le=1,Object.defineProperty(f,"__esModule",{value:!0}),f.CODE128C=f.CODE128B=f.CODE128A=f.CODE128=void 0;var e=i(re()),t=i(ae()),n=i(se()),r=i(de());function i(e){return e&&e.__esModule?e:{default:e}}return f.CODE128=e.default,f.CODE128A=t.default,f.CODE128B=n.default,f.CODE128C=r.default,f}(),n=function(){if(Oe)return x;Oe=1,Object.defineProperty(x,"__esModule",{value:!0}),x.UPCE=x.UPC=x.EAN2=x.EAN5=x.EAN8=x.EAN13=void 0;var e=o(ve()),t=o(be()),n=o(Se()),r=o(we()),i=o(Ee()),a=o(ke());function o(e){return e&&e.__esModule?e:{default:e}}return x.EAN13=e.default,x.EAN8=t.default,x.EAN5=n.default,x.EAN2=r.default,x.UPC=i.default,x.UPCE=a.default,x}(),r=function(){if(Pe)return M;Pe=1,Object.defineProperty(M,"__esModule",{value:!0}),M.ITF14=M.ITF=void 0;var e=n(Me()),t=n(Fe());function n(e){return e&&e.__esModule?e:{default:e}}return M.ITF=e.default,M.ITF14=t.default,M}(),i=function(){if(Ge)return I;Ge=1,Object.defineProperty(I,"__esModule",{value:!0}),I.MSI1110=I.MSI1010=I.MSI11=I.MSI10=I.MSI=void 0;var e=a(R()),t=a(ze()),n=a(Ve()),r=a(Ue()),i=a(qe());function a(e){return e&&e.__esModule?e:{default:e}}return I.MSI=e.default,I.MSI10=t.default,I.MSI11=n.default,I.MSI1010=r.default,I.MSI1110=i.default,I}(),a=Ye(),s=Ze(),c=function(){if(nt)return K;nt=1,Object.defineProperty(K,"__esModule",{value:!0}),K.CODE93FullASCII=K.CODE93=void 0;var e=n(et()),t=n(rt());function n(e){return e&&e.__esModule?e:{default:e}}return K.CODE93=e.default,K.CODE93FullASCII=t.default,K}(),l=ot();return o.default={CODE39:e.CODE39,CODE128:t.CODE128,CODE128A:t.CODE128A,CODE128B:t.CODE128B,CODE128C:t.CODE128C,EAN13:n.EAN13,EAN8:n.EAN8,EAN5:n.EAN5,EAN2:n.EAN2,UPC:n.UPC,UPCE:n.UPCE,ITF14:r.ITF14,ITF:r.ITF,MSI:i.MSI,MSI10:i.MSI10,MSI11:i.MSI11,MSI1010:i.MSI1010,MSI1110:i.MSI1110,pharmacode:a.pharmacode,codabar:s.codabar,CODE93:c.CODE93,CODE93FullASCII:c.CODE93FullASCII,GenericBarcode:l.GenericBarcode},o}var ct,lt={};function ut(){if(ct)return lt;ct=1,Object.defineProperty(lt,"__esModule",{value:!0});var e=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};return lt.default=function(t,n){return e({},t,n)},lt}var dt,ft={},pt,mt={},ht,gt={},_t={},vt={};function yt(){return ht?vt:(ht=1,Object.defineProperty(vt,"__esModule",{value:!0}),vt.default=function(e){var t=[`width`,`height`,`textMargin`,`fontSize`,`margin`,`marginTop`,`marginBottom`,`marginLeft`,`marginRight`];for(var n in t)t.hasOwnProperty(n)&&typeof e[n=t[n]]==`string`&&(e[n]=parseInt(e[n],10));return typeof e.displayValue==`string`&&(e.displayValue=e.displayValue!=`false`),e},vt)}var bt,xt,St={};function Ct(){return bt?St:(bt=1,Object.defineProperty(St,"__esModule",{value:!0}),St.default={width:2,height:100,format:`auto`,displayValue:!0,fontOptions:``,font:`monospace`,text:void 0,textAlign:`center`,textPosition:`bottom`,textMargin:2,fontSize:20,background:`#ffffff`,lineColor:`#000000`,margin:10,marginTop:void 0,marginBottom:void 0,marginLeft:void 0,marginRight:void 0,valid:function(){}},St)}var wt,Tt,Et={},Dt={},Z={};function Ot(){if(wt)return Z;wt=1,Object.defineProperty(Z,"__esModule",{value:!0}),Z.getTotalWidthOfEncodings=Z.calculateEncodingAttributes=Z.getBarcodePadding=Z.getEncodingHeight=Z.getMaximumHeightOfEncodings=void 0;var e,t=(e=ut())&&e.__esModule?e:{default:e};function n(e,t){return t.height+(t.displayValue&&e.text.length>0?t.fontSize+t.textMargin:0)+t.marginTop+t.marginBottom}function r(e,t,n){if(n.displayValue&&t<e){if(n.textAlign==`center`)return Math.floor((e-t)/2);if(n.textAlign==`left`)return 0;if(n.textAlign==`right`)return Math.floor(e-t)}return 0}function i(e,t,n){var r;if(n)r=n;else{if(typeof document>`u`)return 0;r=document.createElement(`canvas`).getContext(`2d`)}r.font=t.fontOptions+` `+t.fontSize+`px `+t.font;var i=r.measureText(e);return i?i.width:0}return Z.getMaximumHeightOfEncodings=function(e){for(var t=0,n=0;n<e.length;n++)e[n].height>t&&(t=e[n].height);return t},Z.getEncodingHeight=n,Z.getBarcodePadding=r,Z.calculateEncodingAttributes=function(e,a,o){for(var s=0;s<e.length;s++){var c,l=e[s],u=(0,t.default)(a,l.options);c=u.displayValue?i(l.text,u,o):0;var d=l.data.length*u.width;l.width=Math.ceil(Math.max(c,d)),l.height=n(l,u),l.barcodePadding=r(c,d,u)}},Z.getTotalWidthOfEncodings=function(e){for(var t=0,n=0;n<e.length;n++)t+=e[n].width;return t},Z}function kt(){if(Tt)return Dt;Tt=1,Object.defineProperty(Dt,"__esModule",{value:!0});var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=(e=ut())&&e.__esModule?e:{default:e},r=Ot();return Dt.default=function(){function e(t,n,r){(function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)})(this,e),this.canvas=t,this.encodings=n,this.options=r}return t(e,[{key:`render`,value:function(){if(!this.canvas.getContext)throw Error(`The browser does not support canvas.`);this.prepareCanvas();for(var e=0;e<this.encodings.length;e++){var t=(0,n.default)(this.options,this.encodings[e].options);this.drawCanvasBarcode(t,this.encodings[e]),this.drawCanvasText(t,this.encodings[e]),this.moveCanvasDrawing(this.encodings[e])}this.restoreCanvas()}},{key:`prepareCanvas`,value:function(){var e=this.canvas.getContext(`2d`);e.save(),(0,r.calculateEncodingAttributes)(this.encodings,this.options,e);var t=(0,r.getTotalWidthOfEncodings)(this.encodings),n=(0,r.getMaximumHeightOfEncodings)(this.encodings);this.canvas.width=t+this.options.marginLeft+this.options.marginRight,this.canvas.height=n,e.clearRect(0,0,this.canvas.width,this.canvas.height),this.options.background&&(e.fillStyle=this.options.background,e.fillRect(0,0,this.canvas.width,this.canvas.height)),e.translate(this.options.marginLeft,0)}},{key:`drawCanvasBarcode`,value:function(e,t){var n,r=this.canvas.getContext(`2d`),i=t.data;n=e.textPosition==`top`?e.marginTop+e.fontSize+e.textMargin:e.marginTop,r.fillStyle=e.lineColor;for(var a=0;a<i.length;a++){var o=a*e.width+t.barcodePadding;i[a]===`1`?r.fillRect(o,n,e.width,e.height):i[a]&&r.fillRect(o,n,e.width,e.height*i[a])}}},{key:`drawCanvasText`,value:function(e,t){var n,r,i=this.canvas.getContext(`2d`),a=e.fontOptions+` `+e.fontSize+`px `+e.font;e.displayValue&&(r=e.textPosition==`top`?e.marginTop+e.fontSize-e.textMargin:e.height+e.textMargin+e.marginTop+e.fontSize,i.font=a,e.textAlign==`left`||t.barcodePadding>0?(n=0,i.textAlign=`left`):e.textAlign==`right`?(n=t.width-1,i.textAlign=`right`):(n=t.width/2,i.textAlign=`center`),i.fillText(t.text,n,r))}},{key:`moveCanvasDrawing`,value:function(e){this.canvas.getContext(`2d`).translate(e.width,0)}},{key:`restoreCanvas`,value:function(){this.canvas.getContext(`2d`).restore()}}]),e}(),Dt}var At,jt={};function Mt(){if(At)return jt;At=1,Object.defineProperty(jt,"__esModule",{value:!0});var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=(e=ut())&&e.__esModule?e:{default:e},r=Ot(),i=`http://www.w3.org/2000/svg`;return jt.default=function(){function e(t,n,r){(function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)})(this,e),this.svg=t,this.encodings=n,this.options=r,this.document=r.xmlDocument||document}return t(e,[{key:`render`,value:function(){var e=this.options.marginLeft;this.prepareSVG();for(var t=0;t<this.encodings.length;t++){var r=this.encodings[t],i=(0,n.default)(this.options,r.options),a=this.createGroup(e,i.marginTop,this.svg);this.setGroupOptions(a,i),this.drawSvgBarcode(a,i,r),this.drawSVGText(a,i,r),e+=r.width}}},{key:`prepareSVG`,value:function(){for(;this.svg.firstChild;)this.svg.removeChild(this.svg.firstChild);(0,r.calculateEncodingAttributes)(this.encodings,this.options);var e=(0,r.getTotalWidthOfEncodings)(this.encodings),t=(0,r.getMaximumHeightOfEncodings)(this.encodings),n=e+this.options.marginLeft+this.options.marginRight;this.setSvgAttributes(n,t),this.options.background&&this.drawRect(0,0,n,t,this.svg).setAttribute(`fill`,this.options.background)}},{key:`drawSvgBarcode`,value:function(e,t,n){var r,i=n.data;r=t.textPosition==`top`?t.fontSize+t.textMargin:0;for(var a=0,o=0,s=0;s<i.length;s++)o=s*t.width+n.barcodePadding,i[s]===`1`?a++:a>0&&(this.drawRect(o-t.width*a,r,t.width*a,t.height,e),a=0);a>0&&this.drawRect(o-t.width*(a-1),r,t.width*a,t.height,e)}},{key:`drawSVGText`,value:function(e,t,n){var r,a,o=this.document.createElementNS(i,`text`);t.displayValue&&(o.setAttribute(`font-family`,t.font),o.setAttribute(`font-size`,t.fontSize),t.fontOptions.includes(`bold`)&&o.setAttribute(`font-weight`,`bold`),t.fontOptions.includes(`italic`)&&o.setAttribute(`font-style`,`italic`),a=t.textPosition==`top`?t.fontSize-t.textMargin:t.height+t.textMargin+t.fontSize,t.textAlign==`left`||n.barcodePadding>0?(r=0,o.setAttribute(`text-anchor`,`start`)):t.textAlign==`right`?(r=n.width-1,o.setAttribute(`text-anchor`,`end`)):(r=n.width/2,o.setAttribute(`text-anchor`,`middle`)),o.setAttribute(`x`,r),o.setAttribute(`y`,a),o.appendChild(this.document.createTextNode(n.text)),e.appendChild(o))}},{key:`setSvgAttributes`,value:function(e,t){var n=this.svg;n.setAttribute(`width`,e+`px`),n.setAttribute(`height`,t+`px`),n.setAttribute(`x`,`0px`),n.setAttribute(`y`,`0px`),n.setAttribute(`viewBox`,`0 0 `+e+` `+t),n.setAttribute(`xmlns`,i),n.setAttribute(`version`,`1.1`)}},{key:`createGroup`,value:function(e,t,n){var r=this.document.createElementNS(i,`g`);return r.setAttribute(`transform`,`translate(`+e+`, `+t+`)`),n.appendChild(r),r}},{key:`setGroupOptions`,value:function(e,t){e.setAttribute(`fill`,t.lineColor)}},{key:`drawRect`,value:function(e,t,n,r,a){var o=this.document.createElementNS(i,`rect`);return o.setAttribute(`x`,e),o.setAttribute(`y`,t),o.setAttribute(`width`,n),o.setAttribute(`height`,r),a.appendChild(o),o}}]),e}(),jt}var Nt,Pt,Q={};function Ft(){if(Nt)return Q;Nt=1,Object.defineProperty(Q,"__esModule",{value:!0});var e=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();return Q.default=function(){function t(e,n,r){(function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)})(this,t),this.object=e,this.encodings=n,this.options=r}return e(t,[{key:`render`,value:function(){this.object.encodings=this.encodings}}]),t}(),Q}var It,Lt,$={};function Rt(){if(It)return $;function e(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function t(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}function n(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}It=1,Object.defineProperty($,"__esModule",{value:!0});var r=function(){function r(n,i){e(this,r);var a=t(this,(r.__proto__||Object.getPrototypeOf(r)).call(this));return a.name=`InvalidInputException`,a.symbology=n,a.input=i,a.message=`"`+a.input+`" is not a valid input for `+a.symbology,a}return n(r,Error),r}(),i=function(){function r(){e(this,r);var n=t(this,(r.__proto__||Object.getPrototypeOf(r)).call(this));return n.name=`InvalidElementException`,n.message=`Not supported type to render on`,n}return n(r,Error),r}(),a=function(){function r(){e(this,r);var n=t(this,(r.__proto__||Object.getPrototypeOf(r)).call(this));return n.name=`NoElementException`,n.message=`No element to render on.`,n}return n(r,Error),r}();return $.InvalidInputException=r,$.InvalidElementException=i,$.NoElementException=a,$}function zt(){if(Lt)return gt;Lt=1,Object.defineProperty(gt,"__esModule",{value:!0});var e=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},t=i(function(){if(xt)return _t;xt=1,Object.defineProperty(_t,"__esModule",{value:!0});var e=n(yt()),t=n(Ct());function n(e){return e&&e.__esModule?e:{default:e}}return _t.default=function(n){var r={};for(var i in t.default)t.default.hasOwnProperty(i)&&(n.hasAttribute(`jsbarcode-`+i.toLowerCase())&&(r[i]=n.getAttribute(`jsbarcode-`+i.toLowerCase())),n.hasAttribute(`data-`+i.toLowerCase())&&(r[i]=n.getAttribute(`data-`+i.toLowerCase())));return r.value=n.getAttribute(`jsbarcode-value`)||n.getAttribute(`data-value`),(0,e.default)(r)},_t}()),n=i(function(){if(Pt)return Et;Pt=1,Object.defineProperty(Et,"__esModule",{value:!0});var e=r(kt()),t=r(Mt()),n=r(Ft());function r(e){return e&&e.__esModule?e:{default:e}}return Et.default={CanvasRenderer:e.default,SVGRenderer:t.default,ObjectRenderer:n.default},Et}()),r=Rt();function i(e){return e&&e.__esModule?e:{default:e}}function a(i){if(typeof i==`string`)return function(e){var t=document.querySelectorAll(e);if(t.length!==0){for(var n=[],r=0;r<t.length;r++)n.push(a(t[r]));return n}}(i);if(Array.isArray(i)){for(var o=[],s=0;s<i.length;s++)o.push(a(i[s]));return o}if(typeof HTMLCanvasElement<`u`&&i instanceof HTMLImageElement)return function(e){var r=document.createElement(`canvas`);return{element:r,options:(0,t.default)(e),renderer:n.default.CanvasRenderer,afterRender:function(){e.setAttribute(`src`,r.toDataURL())}}}(i);if(i&&i.nodeName&&i.nodeName.toLowerCase()===`svg`||typeof SVGElement<`u`&&i instanceof SVGElement)return{element:i,options:(0,t.default)(i),renderer:n.default.SVGRenderer};if(typeof HTMLCanvasElement<`u`&&i instanceof HTMLCanvasElement)return{element:i,options:(0,t.default)(i),renderer:n.default.CanvasRenderer};if(i&&i.getContext)return{element:i,renderer:n.default.CanvasRenderer};if(i&&(i===void 0?`undefined`:e(i))===`object`&&!i.nodeName)return{element:i,renderer:n.default.ObjectRenderer};throw new r.InvalidElementException}return gt.default=a,gt}var Bt,Vt,Ht,Ut={};function Wt(){if(Bt)return Ut;Bt=1,Object.defineProperty(Ut,"__esModule",{value:!0});var e=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();return Ut.default=function(){function t(e){(function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)})(this,t),this.api=e}return e(t,[{key:`handleCatch`,value:function(e){if(e.name!==`InvalidInputException`)throw e;if(this.api._options.valid===this.api._defaults.valid)throw e.message;this.api._options.valid(!1),this.api.render=function(){}}},{key:`wrapBarcodeCall`,value:function(e){try{var t=e.apply(void 0,arguments);return this.api._options.valid(!0),t}catch(e){return this.handleCatch(e),this.api}}}]),t}(),Ut}var Gt=r.T(function(){if(Ht)return Vt;Ht=1;var e=l(st()),t=l(ut()),n=l((dt||(dt=1,Object.defineProperty(ft,"__esModule",{value:!0}),ft.default=function(e){var t=[];return function e(n){if(Array.isArray(n))for(var r=0;r<n.length;r++)e(n[r]);else n.text=n.text||``,n.data=n.data||``,t.push(n)}(e),t}),ft)),r=l((pt||(pt=1,Object.defineProperty(mt,"__esModule",{value:!0}),mt.default=function(e){return e.marginTop=e.marginTop||e.margin,e.marginBottom=e.marginBottom||e.margin,e.marginRight=e.marginRight||e.margin,e.marginLeft=e.marginLeft||e.margin,e}),mt)),i=l(zt()),a=l(yt()),o=l(Wt()),s=Rt(),c=l(Ct());function l(e){return e&&e.__esModule?e:{default:e}}var u=function(){},d=function(e,t,n){var r=new u;if(e===void 0)throw Error(`No element to render on was provided.`);return r._renderProperties=(0,i.default)(e),r._encodings=[],r._options=c.default,r._errorHandler=new o.default(r),t!==void 0&&((n||={}).format||(n.format=m()),r.options(n)[n.format](t,n).render()),r};for(var ee in d.getModule=function(t){return e.default[t]},e.default)e.default.hasOwnProperty(ee)&&f(e.default,ee);function f(e,n){u.prototype[n]=u.prototype[n.toUpperCase()]=u.prototype[n.toLowerCase()]=function(r,i){var o=this;return o._errorHandler.wrapBarcodeCall(function(){i.text=i.text===void 0?void 0:``+i.text;var s=(0,t.default)(o._options,i);s=(0,a.default)(s);var c=e[n],l=p(r,c,s);return o._encodings.push(l),o})}}function p(e,r,i){var a=new r(e=``+e,i);if(!a.valid())throw new s.InvalidInputException(a.constructor.name,e);var o=a.encode();o=(0,n.default)(o);for(var c=0;c<o.length;c++)o[c].options=(0,t.default)(i,o[c].options);return o}function m(){return e.default.CODE128?`CODE128`:Object.keys(e.default)[0]}function h(e,i,a){i=(0,n.default)(i);for(var o=0;o<i.length;o++)i[o].options=(0,t.default)(a,i[o].options),(0,r.default)(i[o].options);(0,r.default)(a),new e.renderer(e.element,i,a).render(),e.afterRender&&e.afterRender()}return u.prototype.options=function(e){return this._options=(0,t.default)(this._options,e),this},u.prototype.blank=function(e){var t=Array(e+1).join(`0`);return this._encodings.push({data:t}),this},u.prototype.init=function(){var n;if(this._renderProperties)for(var r in Array.isArray(this._renderProperties)||(this._renderProperties=[this._renderProperties]),this._renderProperties){n=this._renderProperties[r];var i=(0,t.default)(this._options,n.options);i.format==`auto`&&(i.format=m()),this._errorHandler.wrapBarcodeCall(function(){var t=p(i.value,e.default[i.format.toUpperCase()],i);h(n,t,i)})}},u.prototype.render=function(){if(!this._renderProperties)throw new s.NoElementException;if(Array.isArray(this._renderProperties))for(var e=0;e<this._renderProperties.length;e++)h(this._renderProperties[e],this._encodings,this._options);else h(this._renderProperties,this._encodings,this._options);return this},u.prototype._defaults=c.default,typeof window<`u`&&(window.JsBarcode=d),typeof jQuery<`u`&&(jQuery.fn.JsBarcode=function(e,t){var n=[];return jQuery(this).each(function(){n.push(this)}),d(n,e,t)}),Vt=d}());t.J=Object.freeze({__proto__:null,default:Gt})});
|
|
1
|
+
__emailmaker__.define(`static/core/3ba2a2df.js`,[`require`,`exports`,`module`,`static/core/354bf8a9.js`,`static/core/92ad1565.js`],function(e,t,n){e("./354bf8a9.js");let r=e("./92ad1565.js");var i,a,o={},s={},c={};function l(){return i?c:(i=1,Object.defineProperty(c,"__esModule",{value:!0}),c.default=function e(t,n){(function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)})(this,e),this.data=t,this.text=n.text||t,this.options=n},c)}function u(){if(a)return s;a=1,Object.defineProperty(s,"__esModule",{value:!0}),s.CODE39=void 0;var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=function(e){function n(e,t){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,n),e=e.toUpperCase(),t.mod43&&(e+=function(e){return r[e]}(function(e){for(var t=0,n=0;n<e.length;n++)t+=c(e[n]);return t%=43}(e))),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),t(n,[{key:`encode`,value:function(){for(var e=o(`*`),t=0;t<this.data.length;t++)e+=o(this.data[t])+`0`;return{data:e+=o(`*`),text:this.text}}},{key:`valid`,value:function(){return this.data.search(/^[0-9A-Z\-\.\ \$\/\+\%]+$/)!==-1}}]),n}(((e=l())&&e.__esModule?e:{default:e}).default),r=`0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%*`.split(``),i=[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];function o(e){return function(e){return i[e].toString(2)}(c(e))}function c(e){return r.indexOf(e)}return s.CODE39=n,s}var d,ee,f={},p={},m={},h={};function g(){if(d)return h;var e;function t(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}d=1,Object.defineProperty(h,"__esModule",{value:!0});var n=h.SET_A=0,r=h.SET_B=1,i=h.SET_C=2;h.SHIFT=98;var a=h.START_A=103,o=h.START_B=104,s=h.START_C=105;return h.MODULO=103,h.STOP=106,h.FNC1=207,h.SET_BY_CODE=(t(e={},a,n),t(e,o,r),t(e,s,i),e),h.SWAP={101:n,100:r,99:i},h.A_START_CHAR=`Ð`,h.B_START_CHAR=`Ñ`,h.C_START_CHAR=`Ò`,h.A_CHARS=`[\0-_È-Ï]`,h.B_CHARS=`[ -È-Ï]`,h.C_CHARS=`(Ï*[0-9]{2}Ï*)`,h.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],h}function _(){if(ee)return m;ee=1,Object.defineProperty(m,"__esModule",{value:!0});var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=(e=l())&&e.__esModule?e:{default:e},r=g();return m.default=function(e){function n(e,t){(function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)})(this,n);var r=function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e.substring(1),t));return r.bytes=e.split(``).map(function(e){return e.charCodeAt(0)}),r}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),t(n,[{key:`valid`,value:function(){return/^[\x00-\x7F\xC8-\xD3]+$/.test(this.data)}},{key:`encode`,value:function(){var e=this.bytes,t=e.shift()-105,i=r.SET_BY_CODE[t];if(i===void 0)throw RangeError(`The encoding does not start with a start character.`);!0===this.shouldEncodeAsEan128()&&e.unshift(r.FNC1);var a=n.next(e,1,i);return{text:this.text===this.data?this.text.replace(/[^\x20-\x7E]/g,``):this.text,data:n.getBar(t)+a.result+n.getBar((a.checksum+t)%r.MODULO)+n.getBar(r.STOP)}}},{key:`shouldEncodeAsEan128`,value:function(){var e=this.options.ean128||!1;return typeof e==`string`&&(e=e.toLowerCase()===`true`),e}}],[{key:`getBar`,value:function(e){return r.BARS[e]?r.BARS[e].toString():``}},{key:`correctIndex`,value:function(e,t){if(t===r.SET_A){var n=e.shift();return n<32?n+64:n-32}return t===r.SET_B?e.shift()-32:10*(e.shift()-48)+e.shift()-48}},{key:`next`,value:function(e,t,i){if(!e.length)return{result:``,checksum:0};var a=void 0,o=void 0;if(e[0]>=200){o=e.shift()-105;var s=r.SWAP[o];s===void 0?(i!==r.SET_A&&i!==r.SET_B||o!==r.SHIFT||(e[0]=i===r.SET_A?e[0]>95?e[0]-96:e[0]:e[0]<32?e[0]+96:e[0]),a=n.next(e,t+1,i)):a=n.next(e,t+1,s)}else o=n.correctIndex(e,i),a=n.next(e,t+1,i);var c=o*t;return{result:n.getBar(o)+a.result,checksum:c+a.checksum}}}]),n}(n.default),m}var te,ne,v={};function re(){if(ne)return p;ne=1,Object.defineProperty(p,"__esModule",{value:!0});var e=n(_()),t=n(function(){if(te)return v;te=1,Object.defineProperty(v,"__esModule",{value:!0});var e=g(),t=function(t){return t.match(RegExp(`^`+e.A_CHARS+`*`))[0].length},n=function(t){return t.match(RegExp(`^`+e.B_CHARS+`*`))[0].length},r=function(t){return t.match(RegExp(`^`+e.C_CHARS+`*`))[0]};function i(t,n){var r=n?e.A_CHARS:e.B_CHARS,o=t.match(RegExp(`^(`+r+`+?)(([0-9]{2}){2,})([^0-9]|$)`));if(o)return o[1]+`Ì`+a(t.substring(o[1].length));var s=t.match(RegExp(`^`+r+`+`))[0];return s.length===t.length?t:s+String.fromCharCode(n?205:206)+i(t.substring(s.length),!n)}function a(e){var a=r(e),o=a.length;if(o===e.length)return e;e=e.substring(o);var s=t(e)>=n(e);return a+String.fromCharCode(s?206:205)+i(e,s)}return v.default=function(o){var s=void 0;if(r(o).length>=2)s=e.C_START_CHAR+a(o);else{var c=t(o)>n(o);s=(c?e.A_START_CHAR:e.B_START_CHAR)+i(o,c)}return s.replace(/[\xCD\xCE]([^])[\xCD\xCE]/,function(e,t){return`Ë`+t})},v}());function n(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}return p.default=function(e){function n(e,i){if(function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,n),/^[\x00-\x7F\xC8-\xD3]+$/.test(e))var a=r(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,(0,t.default)(e),i));else a=r(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,i));return r(a)}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),n}(e.default),p}var ie,y={};function ae(){if(ie)return y;ie=1,Object.defineProperty(y,"__esModule",{value:!0});var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=(e=_())&&e.__esModule?e:{default:e},r=g();return y.default=function(e){function n(e,t){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,n),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,r.A_START_CHAR+e,t))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),t(n,[{key:`valid`,value:function(){return RegExp(`^`+r.A_CHARS+`+$`).test(this.data)}}]),n}(n.default),y}var oe,b={};function se(){if(oe)return b;oe=1,Object.defineProperty(b,"__esModule",{value:!0});var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=(e=_())&&e.__esModule?e:{default:e},r=g();return b.default=function(e){function n(e,t){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,n),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,r.B_START_CHAR+e,t))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),t(n,[{key:`valid`,value:function(){return RegExp(`^`+r.B_CHARS+`+$`).test(this.data)}}]),n}(n.default),b}var ce,le,ue={};function de(){if(ce)return ue;ce=1,Object.defineProperty(ue,"__esModule",{value:!0});var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=(e=_())&&e.__esModule?e:{default:e},r=g();return ue.default=function(e){function n(e,t){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,n),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,r.C_START_CHAR+e,t))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),t(n,[{key:`valid`,value:function(){return RegExp(`^`+r.C_CHARS+`+$`).test(this.data)}}]),n}(n.default),ue}var fe,x={},pe={},S={};function C(){return fe||(fe=1,Object.defineProperty(S,"__esModule",{value:!0}),S.SIDE_BIN=`101`,S.MIDDLE_BIN=`01010`,S.BINARIES={L:[`0001101`,`0011001`,`0010011`,`0111101`,`0100011`,`0110001`,`0101111`,`0111011`,`0110111`,`0001011`],G:[`0100111`,`0110011`,`0011011`,`0100001`,`0011101`,`0111001`,`0000101`,`0010001`,`0001001`,`0010111`],R:[`1110010`,`1100110`,`1101100`,`1000010`,`1011100`,`1001110`,`1010000`,`1000100`,`1001000`,`1110100`],O:[`0001101`,`0011001`,`0010011`,`0111101`,`0100011`,`0110001`,`0101111`,`0111011`,`0110111`,`0001011`],E:[`0100111`,`0110011`,`0011011`,`0100001`,`0011101`,`0111001`,`0000101`,`0010001`,`0001001`,`0010111`]},S.EAN2_STRUCTURE=[`LL`,`LG`,`GL`,`GG`],S.EAN5_STRUCTURE=[`GGLLL`,`GLGLL`,`GLLGL`,`GLLLG`,`LGGLL`,`LLGGL`,`LLLGG`,`LGLGL`,`LGLLG`,`LLGLG`],S.EAN13_STRUCTURE=[`LLLLLL`,`LLGLGG`,`LLGGLG`,`LLGGGL`,`LGLLGG`,`LGGLLG`,`LGGGLL`,`LGLGLG`,`LGLGGL`,`LGGLGL`]),S}var me,he,ge,w={},T={};function E(){if(me)return T;me=1,Object.defineProperty(T,"__esModule",{value:!0});var e=C();return T.default=function(t,n,r){var i=t.split(``).map(function(t,r){return e.BINARIES[n[r]]}).map(function(e,n){return e?e[t[n]]:``});if(r){var a=t.length-1;i=i.map(function(e,t){return t<a?e+r:e})}return i.join(``)},T}function _e(){if(he)return w;he=1,Object.defineProperty(w,"__esModule",{value:!0});var e=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),t=C(),n=r(E());function r(e){return e&&e.__esModule?e:{default:e}}return w.default=function(r){function i(e,t){(function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)})(this,i);var n=function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,e,t));return n.fontSize=!t.flat&&t.fontSize>10*t.width?10*t.width:t.fontSize,n.guardHeight=t.height+n.fontSize/2+t.textMargin,n}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(i,r),e(i,[{key:`encode`,value:function(){return this.options.flat?this.encodeFlat():this.encodeGuarded()}},{key:`leftText`,value:function(e,t){return this.text.substr(e,t)}},{key:`leftEncode`,value:function(e,t){return(0,n.default)(e,t)}},{key:`rightText`,value:function(e,t){return this.text.substr(e,t)}},{key:`rightEncode`,value:function(e,t){return(0,n.default)(e,t)}},{key:`encodeGuarded`,value:function(){var e={fontSize:this.fontSize},n={height:this.guardHeight};return[{data:t.SIDE_BIN,options:n},{data:this.leftEncode(),text:this.leftText(),options:e},{data:t.MIDDLE_BIN,options:n},{data:this.rightEncode(),text:this.rightText(),options:e},{data:t.SIDE_BIN,options:n}]}},{key:`encodeFlat`,value:function(){return{data:[t.SIDE_BIN,this.leftEncode(),t.MIDDLE_BIN,this.rightEncode(),t.SIDE_BIN].join(``),text:this.text}}}]),i}(r(l()).default),w}function ve(){if(ge)return pe;ge=1,Object.defineProperty(pe,"__esModule",{value:!0});var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=function e(t,n,r){t===null&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(i===void 0){var a=Object.getPrototypeOf(t);return a===null?void 0:e(a,n,r)}if(`value`in i)return i.value;var o=i.get;return o===void 0?void 0:o.call(r)},r=C(),i=(e=_e())&&e.__esModule?e:{default:e},a=function(e){return(10-e.substr(0,12).split(``).map(function(e){return+e}).reduce(function(e,t,n){return n%2?e+3*t:e+t},0)%10)%10};return pe.default=function(e){function i(e,t){(function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)})(this,i),e.search(/^[0-9]{12}$/)!==-1&&(e+=a(e));var n=function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,e,t));return n.lastChar=t.lastChar,n}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(i,e),t(i,[{key:`valid`,value:function(){return this.data.search(/^[0-9]{13}$/)!==-1&&+this.data[12]===a(this.data)}},{key:`leftText`,value:function(){return n(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),`leftText`,this).call(this,1,6)}},{key:`leftEncode`,value:function(){var e=this.data.substr(1,6),t=r.EAN13_STRUCTURE[this.data[0]];return n(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),`leftEncode`,this).call(this,e,t)}},{key:`rightText`,value:function(){return n(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),`rightText`,this).call(this,7,6)}},{key:`rightEncode`,value:function(){var e=this.data.substr(7,6);return n(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),`rightEncode`,this).call(this,e,`RRRRRR`)}},{key:`encodeGuarded`,value:function(){var e=n(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),`encodeGuarded`,this).call(this);return this.options.displayValue&&(e.unshift({data:`000000000000`,text:this.text.substr(0,1),options:{textAlign:`left`,fontSize:this.fontSize}}),this.options.lastChar&&(e.push({data:`00`}),e.push({data:`00000`,text:this.options.lastChar,options:{fontSize:this.fontSize}}))),e}}]),i}(i.default),pe}var ye,D={};function be(){if(ye)return D;ye=1,Object.defineProperty(D,"__esModule",{value:!0});var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=function e(t,n,r){t===null&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(i===void 0){var a=Object.getPrototypeOf(t);return a===null?void 0:e(a,n,r)}if(`value`in i)return i.value;var o=i.get;return o===void 0?void 0:o.call(r)},r=(e=_e())&&e.__esModule?e:{default:e},i=function(e){return(10-e.substr(0,7).split(``).map(function(e){return+e}).reduce(function(e,t,n){return n%2?e+t:e+3*t},0)%10)%10};return D.default=function(e){function r(e,t){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,r),e.search(/^[0-9]{7}$/)!==-1&&(e+=i(e)),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,e,t))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(r,e),t(r,[{key:`valid`,value:function(){return this.data.search(/^[0-9]{8}$/)!==-1&&+this.data[7]===i(this.data)}},{key:`leftText`,value:function(){return n(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),`leftText`,this).call(this,0,4)}},{key:`leftEncode`,value:function(){var e=this.data.substr(0,4);return n(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),`leftEncode`,this).call(this,e,`LLLL`)}},{key:`rightText`,value:function(){return n(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),`rightText`,this).call(this,4,4)}},{key:`rightEncode`,value:function(){var e=this.data.substr(4,4);return n(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),`rightEncode`,this).call(this,e,`RRRR`)}}]),r}(r.default),D}var xe,O={};function Se(){if(xe)return O;xe=1,Object.defineProperty(O,"__esModule",{value:!0});var e=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),t=C(),n=i(E()),r=i(l());function i(e){return e&&e.__esModule?e:{default:e}}return O.default=function(r){function i(e,t){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,i),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,e,t))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(i,r),e(i,[{key:`valid`,value:function(){return this.data.search(/^[0-9]{5}$/)!==-1}},{key:`encode`,value:function(){var e,r=t.EAN5_STRUCTURE[e=this.data,e.split(``).map(function(e){return+e}).reduce(function(e,t,n){return n%2?e+9*t:e+3*t},0)%10];return{data:`1011`+(0,n.default)(this.data,r,`01`),text:this.text}}}]),i}(r.default),O}var Ce,k={};function we(){if(Ce)return k;Ce=1,Object.defineProperty(k,"__esModule",{value:!0});var e=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),t=C(),n=r(E());function r(e){return e&&e.__esModule?e:{default:e}}return k.default=function(r){function i(e,t){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,i),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,e,t))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(i,r),e(i,[{key:`valid`,value:function(){return this.data.search(/^[0-9]{2}$/)!==-1}},{key:`encode`,value:function(){var e=t.EAN2_STRUCTURE[parseInt(this.data)%4];return{data:`1011`+(0,n.default)(this.data,e,`01`),text:this.text}}}]),i}(r(l()).default),k}var Te,A={};function Ee(){if(Te)return A;Te=1,Object.defineProperty(A,"__esModule",{value:!0});var e=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();A.checksum=i;var t=n(E());function n(e){return e&&e.__esModule?e:{default:e}}var r=function(n){function r(e,t){(function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)})(this,r),e.search(/^[0-9]{11}$/)!==-1&&(e+=i(e));var n=function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,e,t));return n.displayValue=t.displayValue,t.fontSize>10*t.width?n.fontSize=10*t.width:n.fontSize=t.fontSize,n.guardHeight=t.height+n.fontSize/2+t.textMargin,n}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(r,n),e(r,[{key:`valid`,value:function(){return this.data.search(/^[0-9]{12}$/)!==-1&&this.data[11]==i(this.data)}},{key:`encode`,value:function(){return this.options.flat?this.flatEncoding():this.guardedEncoding()}},{key:`flatEncoding`,value:function(){var e=``;return e+=`101`,e+=(0,t.default)(this.data.substr(0,6),`LLLLLL`),e+=`01010`,e+=(0,t.default)(this.data.substr(6,6),`RRRRRR`),{data:e+=`101`,text:this.text}}},{key:`guardedEncoding`,value:function(){var e=[];return this.displayValue&&e.push({data:`00000000`,text:this.text.substr(0,1),options:{textAlign:`left`,fontSize:this.fontSize}}),e.push({data:`101`+(0,t.default)(this.data[0],`L`),options:{height:this.guardHeight}}),e.push({data:(0,t.default)(this.data.substr(1,5),`LLLLL`),text:this.text.substr(1,5),options:{fontSize:this.fontSize}}),e.push({data:`01010`,options:{height:this.guardHeight}}),e.push({data:(0,t.default)(this.data.substr(6,5),`RRRRR`),text:this.text.substr(6,5),options:{fontSize:this.fontSize}}),e.push({data:(0,t.default)(this.data[11],`R`)+`101`,options:{height:this.guardHeight}}),this.displayValue&&e.push({data:`00000000`,text:this.text.substr(11,1),options:{textAlign:`right`,fontSize:this.fontSize}}),e}}]),r}(n(l()).default);function i(e){var t,n=0;for(t=1;t<11;t+=2)n+=parseInt(e[t]);for(t=0;t<11;t+=2)n+=3*parseInt(e[t]);return(10-n%10)%10}return A.default=r,A}var De,Oe,j={};function ke(){if(De)return j;De=1,Object.defineProperty(j,"__esModule",{value:!0});var e=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),t=i(E()),n=i(l()),r=Ee();function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}var o=[`XX00000XXX`,`XX10000XXX`,`XX20000XXX`,`XXX00000XX`,`XXXX00000X`,`XXXXX00005`,`XXXXX00006`,`XXXXX00007`,`XXXXX00008`,`XXXXX00009`],s=[[`EEEOOO`,`OOOEEE`],[`EEOEOO`,`OOEOEE`],[`EEOOEO`,`OOEEOE`],[`EEOOOE`,`OOEEEO`],[`EOEEOO`,`OEOOEE`],[`EOOEEO`,`OEEOOE`],[`EOOOEE`,`OEEEOO`],[`EOEOEO`,`OEOEOE`],[`EOEOOE`,`OEOEEO`],[`EOOEOE`,`OEEOEO`]],c=function(n){function r(e,t){(function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)})(this,r);var n=a(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,e,t));if(n.isValid=!1,e.search(/^[0-9]{6}$/)!==-1)n.middleDigits=e,n.upcA=u(e,`0`),n.text=t.text||``+n.upcA[0]+e+n.upcA[n.upcA.length-1],n.isValid=!0;else{if(e.search(/^[01][0-9]{7}$/)===-1||(n.middleDigits=e.substring(1,e.length-1),n.upcA=u(n.middleDigits,e[0]),n.upcA[n.upcA.length-1]!==e[e.length-1]))return a(n);n.isValid=!0}return n.displayValue=t.displayValue,t.fontSize>10*t.width?n.fontSize=10*t.width:n.fontSize=t.fontSize,n.guardHeight=t.height+n.fontSize/2+t.textMargin,n}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(r,n),e(r,[{key:`valid`,value:function(){return this.isValid}},{key:`encode`,value:function(){return this.options.flat?this.flatEncoding():this.guardedEncoding()}},{key:`flatEncoding`,value:function(){var e=``;return e+=`101`,e+=this.encodeMiddleDigits(),{data:e+=`010101`,text:this.text}}},{key:`guardedEncoding`,value:function(){var e=[];return this.displayValue&&e.push({data:`00000000`,text:this.text[0],options:{textAlign:`left`,fontSize:this.fontSize}}),e.push({data:`101`,options:{height:this.guardHeight}}),e.push({data:this.encodeMiddleDigits(),text:this.text.substring(1,7),options:{fontSize:this.fontSize}}),e.push({data:`010101`,options:{height:this.guardHeight}}),this.displayValue&&e.push({data:`00000000`,text:this.text[7],options:{textAlign:`right`,fontSize:this.fontSize}}),e}},{key:`encodeMiddleDigits`,value:function(){var e=this.upcA[0],n=this.upcA[this.upcA.length-1],r=s[parseInt(n)][parseInt(e)];return(0,t.default)(this.middleDigits,r)}}]),r}(n.default);function u(e,t){for(var n=o[parseInt(e[e.length-1])],i=``,a=0,s=0;s<n.length;s++){var c=n[s];i+=c===`X`?e[a++]:c}return(i=``+t+i)+(0,r.checksum)(i)}return j.default=c,j}var Ae,je,M={},N={},P={};function Me(){if(je)return N;je=1,Object.defineProperty(N,"__esModule",{value:!0});var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=(Ae||(Ae=1,Object.defineProperty(P,"__esModule",{value:!0}),P.START_BIN=`1010`,P.END_BIN=`11101`,P.BINARIES=[`00110`,`10001`,`01001`,`11000`,`00101`,`10100`,`01100`,`00011`,`10010`,`01010`]),P);return N.default=function(e){function r(){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,r),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(r.__proto__||Object.getPrototypeOf(r)).apply(this,arguments))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(r,e),t(r,[{key:`valid`,value:function(){return this.data.search(/^([0-9]{2})+$/)!==-1}},{key:`encode`,value:function(){var e=this,t=this.data.match(/.{2}/g).map(function(t){return e.encodePair(t)}).join(``);return{data:n.START_BIN+t+n.END_BIN,text:this.text}}},{key:`encodePair`,value:function(e){var t=n.BINARIES[e[1]];return n.BINARIES[e[0]].split(``).map(function(e,n){return(e===`1`?`111`:`1`)+(t[n]===`1`?`000`:`0`)}).join(``)}}]),r}(((e=l())&&e.__esModule?e:{default:e}).default),N}var Ne,Pe,F={};function Fe(){if(Ne)return F;Ne=1,Object.defineProperty(F,"__esModule",{value:!0});var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=(e=Me())&&e.__esModule?e:{default:e},r=function(e){var t=e.substr(0,13).split(``).map(function(e){return parseInt(e,10)}).reduce(function(e,t,n){return e+t*(3-n%2*2)},0);return 10*Math.ceil(t/10)-t};return F.default=function(e){function n(e,t){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,n),e.search(/^[0-9]{13}$/)!==-1&&(e+=r(e)),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),t(n,[{key:`valid`,value:function(){return this.data.search(/^[0-9]{14}$/)!==-1&&+this.data[13]===r(this.data)}}]),n}(n.default),F}var Ie,I={},L={};function R(){if(Ie)return L;Ie=1,Object.defineProperty(L,"__esModule",{value:!0});var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=function(e){function n(e,t){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,n),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),t(n,[{key:`encode`,value:function(){for(var e=`110`,t=0;t<this.data.length;t++){var n=parseInt(this.data[t]).toString(2);n=r(n,4-n.length);for(var i=0;i<n.length;i++)e+=n[i]==`0`?`100`:`110`}return{data:e+=`1001`,text:this.text}}},{key:`valid`,value:function(){return this.data.search(/^[0-9]+$/)!==-1}}]),n}(((e=l())&&e.__esModule?e:{default:e}).default);function r(e,t){for(var n=0;n<t;n++)e=`0`+e;return e}return L.default=n,L}var Le,Re,z={},B={};function V(){return Le?B:(Le=1,Object.defineProperty(B,"__esModule",{value:!0}),B.mod10=function(e){for(var t=0,n=0;n<e.length;n++){var r=parseInt(e[n]);(n+e.length)%2==0?t+=r:t+=2*r%10+Math.floor(2*r/10)}return(10-t%10)%10},B.mod11=function(e){for(var t=0,n=[2,3,4,5,6,7],r=0;r<e.length;r++){var i=parseInt(e[e.length-1-r]);t+=n[r%n.length]*i}return(11-t%11)%11},B)}function ze(){if(Re)return z;Re=1,Object.defineProperty(z,"__esModule",{value:!0});var e,t=(e=R())&&e.__esModule?e:{default:e},n=V();return z.default=function(e){function t(e,r){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,t),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e+(0,n.mod10)(e),r))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(t.default),z}var Be,H={};function Ve(){if(Be)return H;Be=1,Object.defineProperty(H,"__esModule",{value:!0});var e,t=(e=R())&&e.__esModule?e:{default:e},n=V();return H.default=function(e){function t(e,r){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,t),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e+(0,n.mod11)(e),r))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(t.default),H}var He,U={};function Ue(){if(He)return U;He=1,Object.defineProperty(U,"__esModule",{value:!0});var e,t=(e=R())&&e.__esModule?e:{default:e},n=V();return U.default=function(e){function t(e,r){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,t),e+=(0,n.mod10)(e),e+=(0,n.mod10)(e),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(t.default),U}var We,Ge,Ke={};function qe(){if(We)return Ke;We=1,Object.defineProperty(Ke,"__esModule",{value:!0});var e,t=(e=R())&&e.__esModule?e:{default:e},n=V();return Ke.default=function(e){function t(e,r){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,t),e+=(0,n.mod11)(e),e+=(0,n.mod10)(e),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(t.default),Ke}var Je,W={};function Ye(){if(Je)return W;Je=1,Object.defineProperty(W,"__esModule",{value:!0}),W.pharmacode=void 0;var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();return W.pharmacode=function(e){function n(e,t){(function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)})(this,n);var r=function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t));return r.number=parseInt(e,10),r}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),t(n,[{key:`encode`,value:function(){for(var e=this.number,t=``;!isNaN(e)&&e!=0;)e%2==0?(t=`11100`+t,e=(e-2)/2):(t=`100`+t,e=(e-1)/2);return{data:t=t.slice(0,-2),text:this.text}}},{key:`valid`,value:function(){return this.number>=3&&this.number<=131070}}]),n}(((e=l())&&e.__esModule?e:{default:e}).default),W}var Xe,G={};function Ze(){if(Xe)return G;Xe=1,Object.defineProperty(G,"__esModule",{value:!0}),G.codabar=void 0;var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();return G.codabar=function(e){function n(e,t){(function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)})(this,n),e.search(/^[0-9\-\$\:\.\+\/]+$/)===0&&(e=`A`+e+`A`);var r=function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e.toUpperCase(),t));return r.text=r.options.text||r.text.replace(/[A-D]/g,``),r}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),t(n,[{key:`valid`,value:function(){return this.data.search(/^[A-D][0-9\-\$\:\.\+\/]+[A-D]$/)!==-1}},{key:`encode`,value:function(){for(var e=[],t=this.getEncodings(),n=0;n<this.data.length;n++)e.push(t[this.data.charAt(n)]),n!==this.data.length-1&&e.push(`0`);return{text:this.text,data:e.join(``)}}},{key:`getEncodings`,value:function(){return{0:`101010011`,1:`101011001`,2:`101001011`,3:`110010101`,4:`101101001`,5:`110101001`,6:`100101011`,7:`100101101`,8:`100110101`,9:`110100101`,"-":`101001101`,$:`101100101`,":":`1101011011`,"/":`1101101011`,".":`1101101101`,"+":`1011011011`,A:`1011001001`,B:`1001001011`,C:`1010010011`,D:`1010011001`}}}]),n}(((e=l())&&e.__esModule?e:{default:e}).default),G}var Qe,$e,K={},q={},J={};function et(){if($e)return q;$e=1,Object.defineProperty(q,"__esModule",{value:!0});var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=(Qe||(Qe=1,Object.defineProperty(J,"__esModule",{value:!0}),J.SYMBOLS=`0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,-,., ,$,/,+,%,($),(%),(/),(+),ÿ`.split(`,`),J.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`.split(`.`),J.MULTI_SYMBOLS={"\0":[`(%)`,`U`],"":[`($)`,`A`],"":[`($)`,`B`],"":[`($)`,`C`],"":[`($)`,`D`],"":[`($)`,`E`],"":[`($)`,`F`],"\x07":[`($)`,`G`],"\b":[`($)`,`H`]," ":[`($)`,`I`],"\n":[`($)`,`J`],"\v":[`($)`,`K`],"\f":[`($)`,`L`],"\r":[`($)`,`M`],"":[`($)`,`N`],"":[`($)`,`O`],"":[`($)`,`P`],"":[`($)`,`Q`],"":[`($)`,`R`],"":[`($)`,`S`],"":[`($)`,`T`],"":[`($)`,`U`],"":[`($)`,`V`],"":[`($)`,`W`],"":[`($)`,`X`],"":[`($)`,`Y`],"":[`($)`,`Z`],"\x1B":[`(%)`,`A`],"":[`(%)`,`B`],"":[`(%)`,`C`],"":[`(%)`,`D`],"":[`(%)`,`E`],"!":[`(/)`,`A`],'"':[`(/)`,`B`],"#":[`(/)`,`C`],"&":[`(/)`,`F`],"'":[`(/)`,`G`],"(":[`(/)`,`H`],")":[`(/)`,`I`],"*":[`(/)`,`J`],",":[`(/)`,`L`],":":[`(/)`,`Z`],";":[`(%)`,`F`],"<":[`(%)`,`G`],"=":[`(%)`,`H`],">":[`(%)`,`I`],"?":[`(%)`,`J`],"@":[`(%)`,`V`],"[":[`(%)`,`K`],"\\":[`(%)`,`L`],"]":[`(%)`,`M`],"^":[`(%)`,`N`],_:[`(%)`,`O`],"`":[`(%)`,`W`],a:[`(+)`,`A`],b:[`(+)`,`B`],c:[`(+)`,`C`],d:[`(+)`,`D`],e:[`(+)`,`E`],f:[`(+)`,`F`],g:[`(+)`,`G`],h:[`(+)`,`H`],i:[`(+)`,`I`],j:[`(+)`,`J`],k:[`(+)`,`K`],l:[`(+)`,`L`],m:[`(+)`,`M`],n:[`(+)`,`N`],o:[`(+)`,`O`],p:[`(+)`,`P`],q:[`(+)`,`Q`],r:[`(+)`,`R`],s:[`(+)`,`S`],t:[`(+)`,`T`],u:[`(+)`,`U`],v:[`(+)`,`V`],w:[`(+)`,`W`],x:[`(+)`,`X`],y:[`(+)`,`Y`],z:[`(+)`,`Z`],"{":[`(%)`,`P`],"|":[`(%)`,`Q`],"}":[`(%)`,`R`],"~":[`(%)`,`S`],"":[`(%)`,`T`]}),J);return q.default=function(e){function r(e,t){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,r),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,e,t))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(r,e),t(r,[{key:`valid`,value:function(){return/^[0-9A-Z\-. $/+%]+$/.test(this.data)}},{key:`encode`,value:function(){var e=this.data.split(``).flatMap(function(e){return n.MULTI_SYMBOLS[e]||e}),t=e.map(function(e){return r.getEncoding(e)}).join(``),i=r.checksum(e,20),a=r.checksum(e.concat(i),15);return{text:this.text,data:r.getEncoding(`ÿ`)+t+r.getEncoding(i)+r.getEncoding(a)+r.getEncoding(`ÿ`)+`1`}}}],[{key:`getEncoding`,value:function(e){return n.BINARIES[r.symbolValue(e)]}},{key:`getSymbol`,value:function(e){return n.SYMBOLS[e]}},{key:`symbolValue`,value:function(e){return n.SYMBOLS.indexOf(e)}},{key:`checksum`,value:function(e,t){var n=e.slice().reverse().reduce(function(e,n,i){var a=i%t+1;return e+r.symbolValue(n)*a},0);return r.getSymbol(n%47)}}]),r}(((e=l())&&e.__esModule?e:{default:e}).default),q}var tt,nt,Y={};function rt(){if(tt)return Y;tt=1,Object.defineProperty(Y,"__esModule",{value:!0});var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();return Y.default=function(e){function n(e,t){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,n),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),t(n,[{key:`valid`,value:function(){return/^[\x00-\x7f]+$/.test(this.data)}}]),n}(((e=et())&&e.__esModule?e:{default:e}).default),Y}var it,at,X={};function ot(){if(it)return X;it=1,Object.defineProperty(X,"__esModule",{value:!0}),X.GenericBarcode=void 0;var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();return X.GenericBarcode=function(e){function n(e,t){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,n),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),t(n,[{key:`encode`,value:function(){return{data:`10101010101010101010101010101010101010101`,text:this.text}}},{key:`valid`,value:function(){return!0}}]),n}(((e=l())&&e.__esModule?e:{default:e}).default),X}function st(){if(at)return o;at=1,Object.defineProperty(o,"__esModule",{value:!0});var e=u(),t=function(){if(le)return f;le=1,Object.defineProperty(f,"__esModule",{value:!0}),f.CODE128C=f.CODE128B=f.CODE128A=f.CODE128=void 0;var e=i(re()),t=i(ae()),n=i(se()),r=i(de());function i(e){return e&&e.__esModule?e:{default:e}}return f.CODE128=e.default,f.CODE128A=t.default,f.CODE128B=n.default,f.CODE128C=r.default,f}(),n=function(){if(Oe)return x;Oe=1,Object.defineProperty(x,"__esModule",{value:!0}),x.UPCE=x.UPC=x.EAN2=x.EAN5=x.EAN8=x.EAN13=void 0;var e=o(ve()),t=o(be()),n=o(Se()),r=o(we()),i=o(Ee()),a=o(ke());function o(e){return e&&e.__esModule?e:{default:e}}return x.EAN13=e.default,x.EAN8=t.default,x.EAN5=n.default,x.EAN2=r.default,x.UPC=i.default,x.UPCE=a.default,x}(),r=function(){if(Pe)return M;Pe=1,Object.defineProperty(M,"__esModule",{value:!0}),M.ITF14=M.ITF=void 0;var e=n(Me()),t=n(Fe());function n(e){return e&&e.__esModule?e:{default:e}}return M.ITF=e.default,M.ITF14=t.default,M}(),i=function(){if(Ge)return I;Ge=1,Object.defineProperty(I,"__esModule",{value:!0}),I.MSI1110=I.MSI1010=I.MSI11=I.MSI10=I.MSI=void 0;var e=a(R()),t=a(ze()),n=a(Ve()),r=a(Ue()),i=a(qe());function a(e){return e&&e.__esModule?e:{default:e}}return I.MSI=e.default,I.MSI10=t.default,I.MSI11=n.default,I.MSI1010=r.default,I.MSI1110=i.default,I}(),a=Ye(),s=Ze(),c=function(){if(nt)return K;nt=1,Object.defineProperty(K,"__esModule",{value:!0}),K.CODE93FullASCII=K.CODE93=void 0;var e=n(et()),t=n(rt());function n(e){return e&&e.__esModule?e:{default:e}}return K.CODE93=e.default,K.CODE93FullASCII=t.default,K}(),l=ot();return o.default={CODE39:e.CODE39,CODE128:t.CODE128,CODE128A:t.CODE128A,CODE128B:t.CODE128B,CODE128C:t.CODE128C,EAN13:n.EAN13,EAN8:n.EAN8,EAN5:n.EAN5,EAN2:n.EAN2,UPC:n.UPC,UPCE:n.UPCE,ITF14:r.ITF14,ITF:r.ITF,MSI:i.MSI,MSI10:i.MSI10,MSI11:i.MSI11,MSI1010:i.MSI1010,MSI1110:i.MSI1110,pharmacode:a.pharmacode,codabar:s.codabar,CODE93:c.CODE93,CODE93FullASCII:c.CODE93FullASCII,GenericBarcode:l.GenericBarcode},o}var ct,lt={};function ut(){if(ct)return lt;ct=1,Object.defineProperty(lt,"__esModule",{value:!0});var e=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};return lt.default=function(t,n){return e({},t,n)},lt}var dt,ft={},pt,mt={},ht,gt={},_t={},vt={};function yt(){return ht?vt:(ht=1,Object.defineProperty(vt,"__esModule",{value:!0}),vt.default=function(e){var t=[`width`,`height`,`textMargin`,`fontSize`,`margin`,`marginTop`,`marginBottom`,`marginLeft`,`marginRight`];for(var n in t)t.hasOwnProperty(n)&&typeof e[n=t[n]]==`string`&&(e[n]=parseInt(e[n],10));return typeof e.displayValue==`string`&&(e.displayValue=e.displayValue!=`false`),e},vt)}var bt,xt,St={};function Ct(){return bt?St:(bt=1,Object.defineProperty(St,"__esModule",{value:!0}),St.default={width:2,height:100,format:`auto`,displayValue:!0,fontOptions:``,font:`monospace`,text:void 0,textAlign:`center`,textPosition:`bottom`,textMargin:2,fontSize:20,background:`#ffffff`,lineColor:`#000000`,margin:10,marginTop:void 0,marginBottom:void 0,marginLeft:void 0,marginRight:void 0,valid:function(){}},St)}var wt,Tt,Et={},Dt={},Z={};function Ot(){if(wt)return Z;wt=1,Object.defineProperty(Z,"__esModule",{value:!0}),Z.getTotalWidthOfEncodings=Z.calculateEncodingAttributes=Z.getBarcodePadding=Z.getEncodingHeight=Z.getMaximumHeightOfEncodings=void 0;var e,t=(e=ut())&&e.__esModule?e:{default:e};function n(e,t){return t.height+(t.displayValue&&e.text.length>0?t.fontSize+t.textMargin:0)+t.marginTop+t.marginBottom}function r(e,t,n){if(n.displayValue&&t<e){if(n.textAlign==`center`)return Math.floor((e-t)/2);if(n.textAlign==`left`)return 0;if(n.textAlign==`right`)return Math.floor(e-t)}return 0}function i(e,t,n){var r;if(n)r=n;else{if(typeof document>`u`)return 0;r=document.createElement(`canvas`).getContext(`2d`)}r.font=t.fontOptions+` `+t.fontSize+`px `+t.font;var i=r.measureText(e);return i?i.width:0}return Z.getMaximumHeightOfEncodings=function(e){for(var t=0,n=0;n<e.length;n++)e[n].height>t&&(t=e[n].height);return t},Z.getEncodingHeight=n,Z.getBarcodePadding=r,Z.calculateEncodingAttributes=function(e,a,o){for(var s=0;s<e.length;s++){var c,l=e[s],u=(0,t.default)(a,l.options);c=u.displayValue?i(l.text,u,o):0;var d=l.data.length*u.width;l.width=Math.ceil(Math.max(c,d)),l.height=n(l,u),l.barcodePadding=r(c,d,u)}},Z.getTotalWidthOfEncodings=function(e){for(var t=0,n=0;n<e.length;n++)t+=e[n].width;return t},Z}function kt(){if(Tt)return Dt;Tt=1,Object.defineProperty(Dt,"__esModule",{value:!0});var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=(e=ut())&&e.__esModule?e:{default:e},r=Ot();return Dt.default=function(){function e(t,n,r){(function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)})(this,e),this.canvas=t,this.encodings=n,this.options=r}return t(e,[{key:`render`,value:function(){if(!this.canvas.getContext)throw Error(`The browser does not support canvas.`);this.prepareCanvas();for(var e=0;e<this.encodings.length;e++){var t=(0,n.default)(this.options,this.encodings[e].options);this.drawCanvasBarcode(t,this.encodings[e]),this.drawCanvasText(t,this.encodings[e]),this.moveCanvasDrawing(this.encodings[e])}this.restoreCanvas()}},{key:`prepareCanvas`,value:function(){var e=this.canvas.getContext(`2d`);e.save(),(0,r.calculateEncodingAttributes)(this.encodings,this.options,e);var t=(0,r.getTotalWidthOfEncodings)(this.encodings),n=(0,r.getMaximumHeightOfEncodings)(this.encodings);this.canvas.width=t+this.options.marginLeft+this.options.marginRight,this.canvas.height=n,e.clearRect(0,0,this.canvas.width,this.canvas.height),this.options.background&&(e.fillStyle=this.options.background,e.fillRect(0,0,this.canvas.width,this.canvas.height)),e.translate(this.options.marginLeft,0)}},{key:`drawCanvasBarcode`,value:function(e,t){var n,r=this.canvas.getContext(`2d`),i=t.data;n=e.textPosition==`top`?e.marginTop+e.fontSize+e.textMargin:e.marginTop,r.fillStyle=e.lineColor;for(var a=0;a<i.length;a++){var o=a*e.width+t.barcodePadding;i[a]===`1`?r.fillRect(o,n,e.width,e.height):i[a]&&r.fillRect(o,n,e.width,e.height*i[a])}}},{key:`drawCanvasText`,value:function(e,t){var n,r,i=this.canvas.getContext(`2d`),a=e.fontOptions+` `+e.fontSize+`px `+e.font;e.displayValue&&(r=e.textPosition==`top`?e.marginTop+e.fontSize-e.textMargin:e.height+e.textMargin+e.marginTop+e.fontSize,i.font=a,e.textAlign==`left`||t.barcodePadding>0?(n=0,i.textAlign=`left`):e.textAlign==`right`?(n=t.width-1,i.textAlign=`right`):(n=t.width/2,i.textAlign=`center`),i.fillText(t.text,n,r))}},{key:`moveCanvasDrawing`,value:function(e){this.canvas.getContext(`2d`).translate(e.width,0)}},{key:`restoreCanvas`,value:function(){this.canvas.getContext(`2d`).restore()}}]),e}(),Dt}var At,jt={};function Mt(){if(At)return jt;At=1,Object.defineProperty(jt,"__esModule",{value:!0});var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=(e=ut())&&e.__esModule?e:{default:e},r=Ot(),i=`http://www.w3.org/2000/svg`;return jt.default=function(){function e(t,n,r){(function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)})(this,e),this.svg=t,this.encodings=n,this.options=r,this.document=r.xmlDocument||document}return t(e,[{key:`render`,value:function(){var e=this.options.marginLeft;this.prepareSVG();for(var t=0;t<this.encodings.length;t++){var r=this.encodings[t],i=(0,n.default)(this.options,r.options),a=this.createGroup(e,i.marginTop,this.svg);this.setGroupOptions(a,i),this.drawSvgBarcode(a,i,r),this.drawSVGText(a,i,r),e+=r.width}}},{key:`prepareSVG`,value:function(){for(;this.svg.firstChild;)this.svg.removeChild(this.svg.firstChild);(0,r.calculateEncodingAttributes)(this.encodings,this.options);var e=(0,r.getTotalWidthOfEncodings)(this.encodings),t=(0,r.getMaximumHeightOfEncodings)(this.encodings),n=e+this.options.marginLeft+this.options.marginRight;this.setSvgAttributes(n,t),this.options.background&&this.drawRect(0,0,n,t,this.svg).setAttribute(`fill`,this.options.background)}},{key:`drawSvgBarcode`,value:function(e,t,n){var r,i=n.data;r=t.textPosition==`top`?t.fontSize+t.textMargin:0;for(var a=0,o=0,s=0;s<i.length;s++)o=s*t.width+n.barcodePadding,i[s]===`1`?a++:a>0&&(this.drawRect(o-t.width*a,r,t.width*a,t.height,e),a=0);a>0&&this.drawRect(o-t.width*(a-1),r,t.width*a,t.height,e)}},{key:`drawSVGText`,value:function(e,t,n){var r,a,o=this.document.createElementNS(i,`text`);t.displayValue&&(o.setAttribute(`font-family`,t.font),o.setAttribute(`font-size`,t.fontSize),t.fontOptions.includes(`bold`)&&o.setAttribute(`font-weight`,`bold`),t.fontOptions.includes(`italic`)&&o.setAttribute(`font-style`,`italic`),a=t.textPosition==`top`?t.fontSize-t.textMargin:t.height+t.textMargin+t.fontSize,t.textAlign==`left`||n.barcodePadding>0?(r=0,o.setAttribute(`text-anchor`,`start`)):t.textAlign==`right`?(r=n.width-1,o.setAttribute(`text-anchor`,`end`)):(r=n.width/2,o.setAttribute(`text-anchor`,`middle`)),o.setAttribute(`x`,r),o.setAttribute(`y`,a),o.appendChild(this.document.createTextNode(n.text)),e.appendChild(o))}},{key:`setSvgAttributes`,value:function(e,t){var n=this.svg;n.setAttribute(`width`,e+`px`),n.setAttribute(`height`,t+`px`),n.setAttribute(`x`,`0px`),n.setAttribute(`y`,`0px`),n.setAttribute(`viewBox`,`0 0 `+e+` `+t),n.setAttribute(`xmlns`,i),n.setAttribute(`version`,`1.1`)}},{key:`createGroup`,value:function(e,t,n){var r=this.document.createElementNS(i,`g`);return r.setAttribute(`transform`,`translate(`+e+`, `+t+`)`),n.appendChild(r),r}},{key:`setGroupOptions`,value:function(e,t){e.setAttribute(`fill`,t.lineColor)}},{key:`drawRect`,value:function(e,t,n,r,a){var o=this.document.createElementNS(i,`rect`);return o.setAttribute(`x`,e),o.setAttribute(`y`,t),o.setAttribute(`width`,n),o.setAttribute(`height`,r),a.appendChild(o),o}}]),e}(),jt}var Nt,Pt,Q={};function Ft(){if(Nt)return Q;Nt=1,Object.defineProperty(Q,"__esModule",{value:!0});var e=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();return Q.default=function(){function t(e,n,r){(function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)})(this,t),this.object=e,this.encodings=n,this.options=r}return e(t,[{key:`render`,value:function(){this.object.encodings=this.encodings}}]),t}(),Q}var It,Lt,$={};function Rt(){if(It)return $;function e(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function t(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}function n(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}It=1,Object.defineProperty($,"__esModule",{value:!0});var r=function(){function r(n,i){e(this,r);var a=t(this,(r.__proto__||Object.getPrototypeOf(r)).call(this));return a.name=`InvalidInputException`,a.symbology=n,a.input=i,a.message=`"`+a.input+`" is not a valid input for `+a.symbology,a}return n(r,Error),r}(),i=function(){function r(){e(this,r);var n=t(this,(r.__proto__||Object.getPrototypeOf(r)).call(this));return n.name=`InvalidElementException`,n.message=`Not supported type to render on`,n}return n(r,Error),r}(),a=function(){function r(){e(this,r);var n=t(this,(r.__proto__||Object.getPrototypeOf(r)).call(this));return n.name=`NoElementException`,n.message=`No element to render on.`,n}return n(r,Error),r}();return $.InvalidInputException=r,$.InvalidElementException=i,$.NoElementException=a,$}function zt(){if(Lt)return gt;Lt=1,Object.defineProperty(gt,"__esModule",{value:!0});var e=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},t=i(function(){if(xt)return _t;xt=1,Object.defineProperty(_t,"__esModule",{value:!0});var e=n(yt()),t=n(Ct());function n(e){return e&&e.__esModule?e:{default:e}}return _t.default=function(n){var r={};for(var i in t.default)t.default.hasOwnProperty(i)&&(n.hasAttribute(`jsbarcode-`+i.toLowerCase())&&(r[i]=n.getAttribute(`jsbarcode-`+i.toLowerCase())),n.hasAttribute(`data-`+i.toLowerCase())&&(r[i]=n.getAttribute(`data-`+i.toLowerCase())));return r.value=n.getAttribute(`jsbarcode-value`)||n.getAttribute(`data-value`),(0,e.default)(r)},_t}()),n=i(function(){if(Pt)return Et;Pt=1,Object.defineProperty(Et,"__esModule",{value:!0});var e=r(kt()),t=r(Mt()),n=r(Ft());function r(e){return e&&e.__esModule?e:{default:e}}return Et.default={CanvasRenderer:e.default,SVGRenderer:t.default,ObjectRenderer:n.default},Et}()),r=Rt();function i(e){return e&&e.__esModule?e:{default:e}}function a(i){if(typeof i==`string`)return function(e){var t=document.querySelectorAll(e);if(t.length!==0){for(var n=[],r=0;r<t.length;r++)n.push(a(t[r]));return n}}(i);if(Array.isArray(i)){for(var o=[],s=0;s<i.length;s++)o.push(a(i[s]));return o}if(typeof HTMLCanvasElement<`u`&&i instanceof HTMLImageElement)return function(e){var r=document.createElement(`canvas`);return{element:r,options:(0,t.default)(e),renderer:n.default.CanvasRenderer,afterRender:function(){e.setAttribute(`src`,r.toDataURL())}}}(i);if(i&&i.nodeName&&i.nodeName.toLowerCase()===`svg`||typeof SVGElement<`u`&&i instanceof SVGElement)return{element:i,options:(0,t.default)(i),renderer:n.default.SVGRenderer};if(typeof HTMLCanvasElement<`u`&&i instanceof HTMLCanvasElement)return{element:i,options:(0,t.default)(i),renderer:n.default.CanvasRenderer};if(i&&i.getContext)return{element:i,renderer:n.default.CanvasRenderer};if(i&&(i===void 0?`undefined`:e(i))===`object`&&!i.nodeName)return{element:i,renderer:n.default.ObjectRenderer};throw new r.InvalidElementException}return gt.default=a,gt}var Bt,Vt,Ht,Ut={};function Wt(){if(Bt)return Ut;Bt=1,Object.defineProperty(Ut,"__esModule",{value:!0});var e=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();return Ut.default=function(){function t(e){(function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)})(this,t),this.api=e}return e(t,[{key:`handleCatch`,value:function(e){if(e.name!==`InvalidInputException`)throw e;if(this.api._options.valid===this.api._defaults.valid)throw e.message;this.api._options.valid(!1),this.api.render=function(){}}},{key:`wrapBarcodeCall`,value:function(e){try{var t=e.apply(void 0,arguments);return this.api._options.valid(!0),t}catch(e){return this.handleCatch(e),this.api}}}]),t}(),Ut}var Gt=r.D(function(){if(Ht)return Vt;Ht=1;var e=l(st()),t=l(ut()),n=l((dt||(dt=1,Object.defineProperty(ft,"__esModule",{value:!0}),ft.default=function(e){var t=[];return function e(n){if(Array.isArray(n))for(var r=0;r<n.length;r++)e(n[r]);else n.text=n.text||``,n.data=n.data||``,t.push(n)}(e),t}),ft)),r=l((pt||(pt=1,Object.defineProperty(mt,"__esModule",{value:!0}),mt.default=function(e){return e.marginTop=e.marginTop||e.margin,e.marginBottom=e.marginBottom||e.margin,e.marginRight=e.marginRight||e.margin,e.marginLeft=e.marginLeft||e.margin,e}),mt)),i=l(zt()),a=l(yt()),o=l(Wt()),s=Rt(),c=l(Ct());function l(e){return e&&e.__esModule?e:{default:e}}var u=function(){},d=function(e,t,n){var r=new u;if(e===void 0)throw Error(`No element to render on was provided.`);return r._renderProperties=(0,i.default)(e),r._encodings=[],r._options=c.default,r._errorHandler=new o.default(r),t!==void 0&&((n||={}).format||(n.format=m()),r.options(n)[n.format](t,n).render()),r};for(var ee in d.getModule=function(t){return e.default[t]},e.default)e.default.hasOwnProperty(ee)&&f(e.default,ee);function f(e,n){u.prototype[n]=u.prototype[n.toUpperCase()]=u.prototype[n.toLowerCase()]=function(r,i){var o=this;return o._errorHandler.wrapBarcodeCall(function(){i.text=i.text===void 0?void 0:``+i.text;var s=(0,t.default)(o._options,i);s=(0,a.default)(s);var c=e[n],l=p(r,c,s);return o._encodings.push(l),o})}}function p(e,r,i){var a=new r(e=``+e,i);if(!a.valid())throw new s.InvalidInputException(a.constructor.name,e);var o=a.encode();o=(0,n.default)(o);for(var c=0;c<o.length;c++)o[c].options=(0,t.default)(i,o[c].options);return o}function m(){return e.default.CODE128?`CODE128`:Object.keys(e.default)[0]}function h(e,i,a){i=(0,n.default)(i);for(var o=0;o<i.length;o++)i[o].options=(0,t.default)(a,i[o].options),(0,r.default)(i[o].options);(0,r.default)(a),new e.renderer(e.element,i,a).render(),e.afterRender&&e.afterRender()}return u.prototype.options=function(e){return this._options=(0,t.default)(this._options,e),this},u.prototype.blank=function(e){var t=Array(e+1).join(`0`);return this._encodings.push({data:t}),this},u.prototype.init=function(){var n;if(this._renderProperties)for(var r in Array.isArray(this._renderProperties)||(this._renderProperties=[this._renderProperties]),this._renderProperties){n=this._renderProperties[r];var i=(0,t.default)(this._options,n.options);i.format==`auto`&&(i.format=m()),this._errorHandler.wrapBarcodeCall(function(){var t=p(i.value,e.default[i.format.toUpperCase()],i);h(n,t,i)})}},u.prototype.render=function(){if(!this._renderProperties)throw new s.NoElementException;if(Array.isArray(this._renderProperties))for(var e=0;e<this._renderProperties.length;e++)h(this._renderProperties[e],this._encodings,this._options);else h(this._renderProperties,this._encodings,this._options);return this},u.prototype._defaults=c.default,typeof window<`u`&&(window.JsBarcode=d),typeof jQuery<`u`&&(jQuery.fn.JsBarcode=function(e,t){var n=[];return jQuery(this).each(function(){n.push(this)}),d(n,e,t)}),Vt=d}());t.J=Object.freeze({__proto__:null,default:Gt})});
|