(r=>{var n={};function o(e){if(n[e])return n[e].exports;var t=n[e]={i:e,l:!1,exports:{}};r[e].call(t.exports,t,t.exports,o);t.l=!0;return t.exports}o.m=r;o.c=n;o.d=function(e,t,r){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})};o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});Object.defineProperty(e,"__esModule",{value:!0})};o.t=function(t,e){1&e&&(t=o(t));if(8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);o.r(r);Object.defineProperty(r,"default",{enumerable:!0,value:t});if(2&e&&"string"!=typeof t)for(var n in t)o.d(r,n,function(e){return t[e]}.bind(null,n));return r};o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};o.d(t,"a",t);return t};o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};o.p="";o(o.s=0)})([function(e,t,r){var n=r(1),o=d(n),n=r(36),u=d(n),n=r(37),a=d(n),n=r(38),i=d(n),n=r(39),l=d(n),n=r(41),s=d(n),n=r(49),f=d(n),c=r(48),n=r(42),p=d(n);function d(e){return e&&e.__esModule?e:{default:e}}function h(){}function y(e,t,r){var n=new h;if(void 0===e)throw Error("No element to render on was provided.");n._renderProperties=(0,l.default)(e);n._encodings=[];n._options=p.default;n._errorHandler=new f.default(n);if(void 0!==t){r=r||{};r.format||(r.format=_());n.options(r)[r.format](t,r).render()}return n}y.getModule=function(e){return o.default[e]};for(var v in o.default)o.default.hasOwnProperty(v)&&((i,a)=>{h.prototype[a]=h.prototype[a.toUpperCase()]=h.prototype[a.toLowerCase()]=function(r,n){var o=this;return o._errorHandler.wrapBarcodeCall(function(){n.text=void 0===n.text?void 0:""+n.text;var e=(0,u.default)(o._options,n),e=(0,s.default)(e),t=i[a],t=b(r,t,e);o._encodings.push(t);return o})}})(o.default,v);function b(e,t,r){e=""+e;var n=new t(e,r);if(!n.valid())throw new c.InvalidInputException(n.constructor.name,e);for(var o=n.encode(),o=(0,a.default)(o),i=0;i{var t=o;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}});e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e);function o(e,t){var r=this,n=o;if(!(r instanceof n))throw new TypeError("Cannot call a class as a function");e=e.toUpperCase();t.mod43&&(e+=(r=(e=>{for(var t=0,r=0;r{var t=i;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}});e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e);function i(e,t){var r,n=this,o=i;if(!(n instanceof o))throw new TypeError("Cannot call a class as a function");r=/^[\x00-\x7F\xC8-\xD3]+$/.test(e)?u(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,(0,a.default)(e),t)):u(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,e,t));return u(r)}return i})(n.default);t.default=o},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var n=function(e,t,r){t&&o(e.prototype,t);r&&o(e,r);return e};function o(e,t){for(var r=0;r{var t=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}});e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e);function a(e,t){var r=this,n=a;if(!(r instanceof n))throw new TypeError("Cannot call a class as a function");var o=((e,t)=>{if(e)return!t||"object"!=typeof t&&"function"!=typeof t?e:t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")})(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,e.substring(1),t));o.bytes=e.split("").map(function(e){return e.charCodeAt(0)});return o}n(a,[{key:"valid",value:function(){return/^[\x00-\x7F\xC8-\xD3]+$/.test(this.data)}},{key:"encode",value:function(){var e=this.bytes,t=e.shift()-105,r=u.SET_BY_CODE[t];if(void 0===r)throw new RangeError("The encoding does not start with a start character.");!0===this.shouldEncodeAsEan128()&&e.unshift(u.FNC1);e=a.next(e,1,r);return{text:this.text===this.data?this.text.replace(/[^\x20-\x7E]/g,""):this.text,data:a.getBar(t)+e.result+a.getBar((e.checksum+t)%u.MODULO)+a.getBar(u.STOP)}}},{key:"shouldEncodeAsEan128",value:function(){var e=this.options.ean128||!1;"string"==typeof e&&(e="true"===e.toLowerCase());return e}}],[{key:"getBar",value:function(e){return u.BARS[e]?u.BARS[e].toString():""}},{key:"correctIndex",value:function(e,t){var r;return t===u.SET_A?(r=e.shift(),r<32?r+64:r-32):t===u.SET_B?e.shift()-32:10*(e.shift()-48)+e.shift()-48}},{key:"next",value:function(e,t,r){if(!e.length)return{result:"",checksum:0};var n=void 0,o=void 0;if(200<=e[0]){var o=e.shift()-105,i=u.SWAP[o];if(void 0!==i)n=a.next(e,t+1,i);else{r!==u.SET_A&&r!==u.SET_B||o!==u.SHIFT||(e[0]=r===u.SET_A?95=o(e);return t+String.fromCharCode(r?206:205)+u(e,r)}t.default=function(e){var t=void 0,r=i(e).length;t=2<=r?a.C_START_CHAR+l(e):(r=n(e)>o(e),(r?a.A_START_CHAR:a.B_START_CHAR)+u(e,r));return t.replace(/[\xCD\xCE]([^])[\xCD\xCE]/,function(e,t){return String.fromCharCode(203)+t})}},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var n=function(e,t,r){t&&o(e.prototype,t);r&&o(e,r);return e};function o(e,t){for(var r=0;r{var t=o;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}});e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e);function o(e,t){var r=this,n=o;if(!(r instanceof n))throw new TypeError("Cannot call a class as a function");r=this,n=(o.__proto__||Object.getPrototypeOf(o)).call(this,u.A_START_CHAR+e,t);if(r)return!n||"object"!=typeof n&&"function"!=typeof n?r:n;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}n(o,[{key:"valid",value:function(){return new RegExp("^"+u.A_CHARS+"+$").test(this.data)}}]);return o})(a.default);t.default=a},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var n=function(e,t,r){t&&o(e.prototype,t);r&&o(e,r);return e};function o(e,t){for(var r=0;r{var t=o;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}});e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e);function o(e,t){var r=this,n=o;if(!(r instanceof n))throw new TypeError("Cannot call a class as a function");r=this,n=(o.__proto__||Object.getPrototypeOf(o)).call(this,u.B_START_CHAR+e,t);if(r)return!n||"object"!=typeof n&&"function"!=typeof n?r:n;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}n(o,[{key:"valid",value:function(){return new RegExp("^"+u.B_CHARS+"+$").test(this.data)}}]);return o})(a.default);t.default=a},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var n=function(e,t,r){t&&o(e.prototype,t);r&&o(e,r);return e};function o(e,t){for(var r=0;r{var t=o;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}});e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e);function o(e,t){var r=this,n=o;if(!(r instanceof n))throw new TypeError("Cannot call a class as a function");r=this,n=(o.__proto__||Object.getPrototypeOf(o)).call(this,u.C_START_CHAR+e,t);if(r)return!n||"object"!=typeof n&&"function"!=typeof n?r:n;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}n(o,[{key:"valid",value:function(){return new RegExp("^"+u.C_CHARS+"+$").test(this.data)}}]);return o})(a.default);t.default=a},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});t.UPCE=t.UPC=t.EAN2=t.EAN5=t.EAN8=t.EAN13=void 0;var n=r(13),n=s(n),o=r(17),o=s(o),i=r(18),i=s(i),a=r(19),a=s(a),u=r(20),u=s(u),l=r(21),l=s(l);function s(e){return e&&e.__esModule?e:{default:e}}t.EAN13=n.default;t.EAN8=o.default;t.EAN5=i.default;t.EAN2=a.default;t.UPC=u.default;t.UPCE=l.default},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var n=function(e,t,r){t&&o(e.prototype,t);r&&o(e,r);return e};function o(e,t){for(var r=0;r{var t=i;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}});e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e);function i(e,t){var r=this,n=i;if(!(r instanceof n))throw new TypeError("Cannot call a class as a function");-1!==e.search(/^[0-9]{12}$/)&&(e+=l(e));var o=((e,t)=>{if(e)return!t||"object"!=typeof t&&"function"!=typeof t?e:t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")})(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,e,t));o.lastChar=t.lastChar;return o}n(i,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{13}$/)&&+this.data[12]===l(this.data)}},{key:"leftText",value:function(){return a(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=u.EAN13_STRUCTURE[this.data[0]];return a(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"leftEncode",this).call(this,e,t)}},{key:"rightText",value:function(){return a(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 a(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"rightEncode",this).call(this,e,"RRRRRR")}},{key:"encodeGuarded",value:function(){var e=a(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"encodeGuarded",this).call(this);if(this.options.displayValue){e.unshift({data:"000000000000",text:this.text.substr(0,1),options:{textAlign:"left",fontSize:this.fontSize}});if(this.options.lastChar){e.push({data:"00"});e.push({data:"00000",text:this.options.lastChar,options:{fontSize:this.fontSize}})}}return e}}]);return i})(i.default);t.default=i},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});t.SIDE_BIN="101",t.MIDDLE_BIN="01010",t.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"]},t.EAN2_STRUCTURE=["LL","LG","GL","GG"],t.EAN5_STRUCTURE=["GGLLL","GLGLL","GLLGL","GLLLG","LGGLL","LLGGL","LLLGG","LGLGL","LGLLG","LLGLG"],t.EAN13_STRUCTURE=["LLLLLL","LLGLGG","LLGGLG","LLGGGL","LGLLGG","LGGLLG","LGGGLL","LGLGLG","LGLGGL","LGGLGL"]},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var n=function(e,t,r){t&&o(e.prototype,t);r&&o(e,r);return e};function o(e,t){for(var r=0;r{var t=i;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}});e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e);function i(e,t){var r=this,n=i;if(!(r instanceof n))throw new TypeError("Cannot call a class as a function");var o=((e,t)=>{if(e)return!t||"object"!=typeof t&&"function"!=typeof t?e:t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")})(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,e,t));o.fontSize=!t.flat&&t.fontSize>10*t.width?10*t.width:t.fontSize;o.guardHeight=t.height+o.fontSize/2+t.textMargin;return o}n(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,u.default)(e,t)}},{key:"rightText",value:function(e,t){return this.text.substr(e,t)}},{key:"rightEncode",value:function(e,t){return(0,u.default)(e,t)}},{key:"encodeGuarded",value:function(){var e={fontSize:this.fontSize},t={height:this.guardHeight};return[{data:a.SIDE_BIN,options:t},{data:this.leftEncode(),text:this.leftText(),options:e},{data:a.MIDDLE_BIN,options:t},{data:this.rightEncode(),text:this.rightText(),options:e},{data:a.SIDE_BIN,options:t}]}},{key:"encodeFlat",value:function(){var e=[a.SIDE_BIN,this.leftEncode(),a.MIDDLE_BIN,this.rightEncode(),a.SIDE_BIN];return{data:e.join(""),text:this.text}}}]);return i})(i.default);t.default=i},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var a=r(14);t.default=function(r,n,o){var i,e=r.split("").map(function(e,t){return a.BINARIES[n[t]]}).map(function(e,t){return e?e[r[t]]:""});o&&(i=r.length-1,e=e.map(function(e,t){return t{var t=o;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}});e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e);function o(e,t){var r=this,n=o;if(!(r instanceof n))throw new TypeError("Cannot call a class as a function");-1!==e.search(/^[0-9]{7}$/)&&(e+=u(e));r=this,n=(o.__proto__||Object.getPrototypeOf(o)).call(this,e,t);if(r)return!n||"object"!=typeof n&&"function"!=typeof n?r:n;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}n(o,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{8}$/)&&+this.data[7]===u(this.data)}},{key:"leftText",value:function(){return i(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"leftText",this).call(this,0,4)}},{key:"leftEncode",value:function(){var e=this.data.substr(0,4);return i(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"leftEncode",this).call(this,e,"LLLL")}},{key:"rightText",value:function(){return i(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"rightText",this).call(this,4,4)}},{key:"rightEncode",value:function(){var e=this.data.substr(4,4);return i(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"rightEncode",this).call(this,e,"RRRR")}}]);return o})(a.default);t.default=a},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var n=function(e,t,r){t&&o(e.prototype,t);r&&o(e,r);return e};function o(e,t){for(var r=0;r{var t=o;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}});e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e);function o(e,t){var r=this,n=o;if(!(r instanceof n))throw new TypeError("Cannot call a class as a function");r=this,n=(o.__proto__||Object.getPrototypeOf(o)).call(this,e,t);if(r)return!n||"object"!=typeof n&&"function"!=typeof n?r:n;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}n(o,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{5}$/)}},{key:"encode",value:function(){var e,t=i.EAN5_STRUCTURE[e=this.data,t=e.split("").map(function(e){return+e}).reduce(function(e,t,r){return r%2?e+9*t:e+3*t},0),t%10];return{data:"1011"+(0,u.default)(this.data,t,"01"),text:this.text}}}]);return o})(a.default);t.default=a},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var n=function(e,t,r){t&&o(e.prototype,t);r&&o(e,r);return e};function o(e,t){for(var r=0;r{var t=o;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}});e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e);function o(e,t){var r=this,n=o;if(!(r instanceof n))throw new TypeError("Cannot call a class as a function");r=this,n=(o.__proto__||Object.getPrototypeOf(o)).call(this,e,t);if(r)return!n||"object"!=typeof n&&"function"!=typeof n?r:n;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}n(o,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{2}$/)}},{key:"encode",value:function(){var e=i.EAN2_STRUCTURE[parseInt(this.data)%4];return{data:"1011"+(0,u.default)(this.data,e,"01"),text:this.text}}}]);return o})(a.default);t.default=a},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var n=function(e,t,r){t&&o(e.prototype,t);r&&o(e,r);return e};function o(e,t){for(var r=0;r{var t=i;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}});e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e);function i(e,t){var r=this,n=i;if(!(r instanceof n))throw new TypeError("Cannot call a class as a function");-1!==e.search(/^[0-9]{11}$/)&&(e+=l(e));var o=((e,t)=>{if(e)return!t||"object"!=typeof t&&"function"!=typeof t?e:t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")})(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,e,t));o.displayValue=t.displayValue;o.fontSize=10*t.width{var t=i;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}});e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e);function i(e,t){var r=this,n=i;if(!(r instanceof n))throw new TypeError("Cannot call a class as a function");var o=s(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,e,t));o.isValid=!1;if(-1!==e.search(/^[0-9]{6}$/)){o.middleDigits=e;o.upcA=p(e,"0");o.text=t.text||""+o.upcA[0]+e+o.upcA[o.upcA.length-1]}else{if(-1===e.search(/^[01][0-9]{7}$/))return s(o);o.middleDigits=e.substring(1,e.length-1);o.upcA=p(o.middleDigits,e[0]);if(o.upcA[o.upcA.length-1]!==e[e.length-1])return s(o)}o.isValid=!0;o.displayValue=t.displayValue;o.fontSize=10*t.width{var t=r;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}});e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e);function r(){var e=this,t=r;if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");e=this,t=(r.__proto__||Object.getPrototypeOf(r)).apply(this,arguments);if(e)return!t||"object"!=typeof t&&"function"!=typeof t?e:t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}n(r,[{key:"valid",value:function(){return-1!==this.data.search(/^([0-9]{2})+$/)}},{key:"encode",value:function(){var t=this,e=this.data.match(/.{2}/g).map(function(e){return t.encodePair(e)}).join("");return{data:i.START_BIN+e+i.END_BIN,text:this.text}}},{key:"encodePair",value:function(e){var r=i.BINARIES[e[1]];return i.BINARIES[e[0]].split("").map(function(e,t){return("1"===e?"111":"1")+("1"===r[t]?"000":"0")}).join("")}}]);return r})(a.default);t.default=a},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});t.START_BIN="1010",t.END_BIN="11101",t.BINARIES=["00110","10001","01001","11000","00101","10100","01100","00011","10010","01010"]},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var n=function(e,t,r){t&&o(e.prototype,t);r&&o(e,r);return e};function o(e,t){for(var r=0;r{var t=o;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}});e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e);function o(e,t){var r=this,n=o;if(!(r instanceof n))throw new TypeError("Cannot call a class as a function");-1!==e.search(/^[0-9]{13}$/)&&(e+=a(e));r=this,n=(o.__proto__||Object.getPrototypeOf(o)).call(this,e,t);if(r)return!n||"object"!=typeof n&&"function"!=typeof n?r:n;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}n(o,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{14}$/)&&+this.data[13]===a(this.data)}}]);return o})(i.default);t.default=i},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});t.MSI1110=t.MSI1010=t.MSI11=t.MSI10=t.MSI=void 0;var n=r(27),n=l(n),o=r(28),o=l(o),i=r(30),i=l(i),a=r(31),a=l(a),u=r(32),u=l(u);function l(e){return e&&e.__esModule?e:{default:e}}t.MSI=n.default;t.MSI10=o.default;t.MSI11=i.default;t.MSI1010=a.default;t.MSI1110=u.default},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var n=function(e,t,r){t&&o(e.prototype,t);r&&o(e,r);return e};function o(e,t){for(var r=0;r{var t=o;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}});e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e);function o(e,t){var r=this,n=o;if(!(r instanceof n))throw new TypeError("Cannot call a class as a function");r=this,n=(o.__proto__||Object.getPrototypeOf(o)).call(this,e,t);if(r)return!n||"object"!=typeof n&&"function"!=typeof n?r:n;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}n(o,[{key:"encode",value:function(){for(var e="110",t=0;t{for(var r=0;r{var t=o;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}});e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e);function o(e,t){var r=this,n=o;if(!(r instanceof n))throw new TypeError("Cannot call a class as a function");r=this,n=(o.__proto__||Object.getPrototypeOf(o)).call(this,e+(0,i.mod10)(e),t);if(r)return!n||"object"!=typeof n&&"function"!=typeof n?r:n;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return o})(o.default);t.default=o},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});t.mod10=function(e){for(var t=0,r=0;r{var t=o;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}});e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e);function o(e,t){var r=this,n=o;if(!(r instanceof n))throw new TypeError("Cannot call a class as a function");r=this,n=(o.__proto__||Object.getPrototypeOf(o)).call(this,e+(0,i.mod11)(e),t);if(r)return!n||"object"!=typeof n&&"function"!=typeof n?r:n;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return o})(o.default);t.default=o},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var n,o=r(27),o=(n=o,n&&n.__esModule?n:{default:n}),i=r(29);o=(e=>{var t=o;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}});e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e);function o(e,t){var r=this,n=o;if(!(r instanceof n))throw new TypeError("Cannot call a class as a function");e+=(0,i.mod10)(e);e+=(0,i.mod10)(e);r=this,n=(o.__proto__||Object.getPrototypeOf(o)).call(this,e,t);if(r)return!n||"object"!=typeof n&&"function"!=typeof n?r:n;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return o})(o.default);t.default=o},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var n,o=r(27),o=(n=o,n&&n.__esModule?n:{default:n}),i=r(29);o=(e=>{var t=o;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}});e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e);function o(e,t){var r=this,n=o;if(!(r instanceof n))throw new TypeError("Cannot call a class as a function");e+=(0,i.mod11)(e);e+=(0,i.mod10)(e);r=this,n=(o.__proto__||Object.getPrototypeOf(o)).call(this,e,t);if(r)return!n||"object"!=typeof n&&"function"!=typeof n?r:n;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return o})(o.default);t.default=o},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});t.pharmacode=void 0;var n=function(e,t,r){t&&o(e.prototype,t);r&&o(e,r);return e};function o(e,t){for(var r=0;r{var t=i;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}});e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e);function i(e,t){var r=this,n=i;if(!(r instanceof n))throw new TypeError("Cannot call a class as a function");var o=((e,t)=>{if(e)return!t||"object"!=typeof t&&"function"!=typeof t?e:t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")})(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,e,t));o.number=parseInt(e,10);return o}n(i,[{key:"encode",value:function(){for(var e=this.number,t="";!isNaN(e)&&0!=e;)if(e%2==0){t="11100"+t;e=(e-2)/2}else{t="100"+t;e=(e-1)/2}t=t.slice(0,-2);return{data:t,text:this.text}}},{key:"valid",value:function(){return 3<=this.number&&this.number<=131070}}]);return i})(i.default);t.pharmacode=i},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});t.codabar=void 0;var n=function(e,t,r){t&&o(e.prototype,t);r&&o(e,r);return e};function o(e,t){for(var r=0;r{var t=i;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}});e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e);function i(e,t){var r=this,n=i;if(!(r instanceof n))throw new TypeError("Cannot call a class as a function");0===e.search(/^[0-9\-\$\:\.\+\/]+$/)&&(e="A"+e+"A");var o=((e,t)=>{if(e)return!t||"object"!=typeof t&&"function"!=typeof t?e:t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")})(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,e.toUpperCase(),t));o.text=o.options.text||o.text.replace(/[A-D]/g,"");return o}n(i,[{key:"valid",value:function(){return-1!==this.data.search(/^[A-D][0-9\-\$\:\.\+\/]+[A-D]$/)}},{key:"encode",value:function(){for(var e=[],t=this.getEncodings(),r=0;r{var t=o;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}});e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e);function o(e,t){var r=this,n=o;if(!(r instanceof n))throw new TypeError("Cannot call a class as a function");r=this,n=(o.__proto__||Object.getPrototypeOf(o)).call(this,e,t);if(r)return!n||"object"!=typeof n&&"function"!=typeof n?r:n;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}n(o,[{key:"encode",value:function(){return{data:"10101010101010101010101010101010101010101",text:this.text}}},{key:"valid",value:function(){return!0}}]);return o})(i.default);t.GenericBarcode=i},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var n=Object.assign||function(e){for(var t=1;t{function i(e,t,r){var n=this,o=i;if(!(n instanceof o))throw new TypeError("Cannot call a class as a function");this.canvas=e;this.encodings=t;this.options=r}n(i,[{key:"render",value:function(){if(!this.canvas.getContext)throw new Error("The browser does not support canvas.");this.prepareCanvas();for(var e=0;et&&(t=e[r].height);return t};t.getEncodingHeight=s;t.getBarcodePadding=f;t.calculateEncodingAttributes=function(e,t,r){for(var n=0;n{if(r)n=r;else{if("undefined"==typeof document)return 0;n=document.createElement("canvas").getContext("2d")}n.font=t.fontOptions+" "+t.fontSize+"px "+t.font;var n=n.measureText(e);return n?(n=n.width,n):0})(o.text,i,r):0,u=o.data.length*i.width;o.width=Math.ceil(Math.max(a,u));o.height=s(o,i);o.barcodePadding=f(a,u,i)}};t.getTotalWidthOfEncodings=function(e){for(var t=0,r=0;r{function i(e,t,r){var n=this,o=i;if(!(n instanceof o))throw new TypeError("Cannot call a class as a function");this.svg=e;this.encodings=t;this.options=r;this.document=r.xmlDocument||document}n(i,[{key:"render",value:function(){var e=this.options.marginLeft;this.prepareSVG();for(var t=0;t{function i(e,t,r){var n=this,o=i;if(!(n instanceof o))throw new TypeError("Cannot call a class as a function");this.object=e;this.encodings=t;this.options=r}n(i,[{key:"render",value:function(){this.object.encodings=this.encodings}}]);return i})();t.default=i},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(e)return!t||"object"!=typeof t&&"function"!=typeof t?e:t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}function a(e,t){if("function"!=typeof t&&null!==t)throw new 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)}var n=(e=>{a(n,e);function n(e,t){o(this,n);var r=i(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));r.name="InvalidInputException";r.symbology=e;r.input=t;r.message='"'+r.input+'" is not a valid input for '+r.symbology;return r}return n})(Error),u=(e=>{a(t,e);function t(){o(this,t);var e=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));e.name="InvalidElementException";e.message="Not supported type to render on";return e}return t})(Error),l=(e=>{a(t,e);function t(){o(this,t);var e=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));e.name="NoElementException";e.message="No element to render on.";return e}return t})(Error);t.InvalidInputException=n;t.InvalidElementException=u;t.NoElementException=l},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var o=function(e,t,r){t&&n(e.prototype,t);r&&n(e,r);return e};function n(e,t){for(var r=0;r{function n(e){var t=this,r=n;if(!(t instanceof r))throw new TypeError("Cannot call a class as a function");this.api=e}o(n,[{key:"handleCatch",value:function(e){if("InvalidInputException"!==e.name)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);this.api._options.valid(!0);return t}catch(e){this.handleCatch(e);return this.api}}}]);return n})();t.default=i}]); //# sourceMappingURL=JsBarcode.all.js.map