Files
P4RS3LT0NGV3/js/vendor/JsBarcode.min.js
T
2026-06-13 17:12:42 -07:00

2 lines
66 KiB
JavaScript

"use strict";var JsBarcode=(()=>{var f=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(n){throw e=0,n}};var l=f(ie=>{"use strict";Object.defineProperty(ie,"__esModule",{value:!0});function qr(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var Lr=function t(e,n){qr(this,t),this.data=e,this.text=n.text||e,this.options=n};ie.default=Lr});var dt=f(X=>{"use strict";Object.defineProperty(X,"__esModule",{value:!0});X.CODE39=void 0;var jr=(function(){function t(e,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}})(),Nr=l(),Cr=Gr(Nr);function Gr(t){return t&&t.__esModule?t:{default:t}}function Hr(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Fr(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function $r(t,e){if(typeof e!="function"&&e!==null)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)}var Ur=(function(t){$r(e,t);function e(n,r){return Hr(this,e),n=n.toUpperCase(),r.mod43&&(n+=Vr(Yr(n))),Fr(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,n,r))}return jr(e,[{key:"encode",value:function(){for(var r=ae("*"),i=0;i<this.data.length;i++)r+=ae(this.data[i])+"0";return r+=ae("*"),{data:r,text:this.text}}},{key:"valid",value:function(){return this.data.search(/^[0-9A-Z\-\.\ \$\/\+\%]+$/)!==-1}}]),e})(Cr.default),lt=["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","-","."," ","$","/","+","%","*"],Xr=[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 ae(t){return zr(ht(t))}function zr(t){return Xr[t].toString(2)}function Vr(t){return lt[t]}function ht(t){return lt.indexOf(t)}function Yr(t){for(var e=0,n=0;n<t.length;n++)e+=ht(t[n]);return e=e%43,e}X.CODE39=Ur});var m=f(c=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var D;function ue(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var _t=c.SET_A=0,vt=c.SET_B=1,st=c.SET_C=2,Hf=c.SHIFT=98,Jr=c.START_A=103,Wr=c.START_B=104,Qr=c.START_C=105,Ff=c.MODULO=103,$f=c.STOP=106,Uf=c.FNC1=207,Xf=c.SET_BY_CODE=(D={},ue(D,Jr,_t),ue(D,Wr,vt),ue(D,Qr,st),D),zf=c.SWAP={101:_t,100:vt,99:st},Vf=c.A_START_CHAR="\xD0",Yf=c.B_START_CHAR="\xD1",Jf=c.C_START_CHAR="\xD2",Wf=c.A_CHARS="[\0-_\xC8-\xCF]",Qf=c.B_CHARS="[ -\x7F\xC8-\xCF]",Zf=c.C_CHARS="(\xCF*[0-9]{2}\xCF*)",Kf=c.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]});var B=f(oe=>{"use strict";Object.defineProperty(oe,"__esModule",{value:!0});var Zr=(function(){function t(e,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}})(),Kr=l(),en=tn(Kr),d=m();function tn(t){return t&&t.__esModule?t:{default:t}}function rn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function nn(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function an(t,e){if(typeof e!="function"&&e!==null)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)}var un=(function(t){an(e,t);function e(n,r){rn(this,e);var i=nn(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,n.substring(1),r));return i.bytes=n.split("").map(function(a){return a.charCodeAt(0)}),i}return Zr(e,[{key:"valid",value:function(){return/^[\x00-\x7F\xC8-\xD3]+$/.test(this.data)}},{key:"encode",value:function(){var r=this.bytes,i=r.shift()-105,a=d.SET_BY_CODE[i];if(a===void 0)throw new RangeError("The encoding does not start with a start character.");this.shouldEncodeAsEan128()===!0&&r.unshift(d.FNC1);var u=e.next(r,1,a);return{text:this.text===this.data?this.text.replace(/[^\x20-\x7E]/g,""):this.text,data:e.getBar(i)+u.result+e.getBar((u.checksum+i)%d.MODULO)+e.getBar(d.STOP)}}},{key:"shouldEncodeAsEan128",value:function(){var r=this.options.ean128||!1;return typeof r=="string"&&(r=r.toLowerCase()==="true"),r}}],[{key:"getBar",value:function(r){return d.BARS[r]?d.BARS[r].toString():""}},{key:"correctIndex",value:function(r,i){if(i===d.SET_A){var a=r.shift();return a<32?a+64:a-32}else return i===d.SET_B?r.shift()-32:(r.shift()-48)*10+r.shift()-48}},{key:"next",value:function(r,i,a){if(!r.length)return{result:"",checksum:0};var u=void 0,o=void 0;if(r[0]>=200){o=r.shift()-105;var s=d.SWAP[o];s!==void 0?u=e.next(r,i+1,s):((a===d.SET_A||a===d.SET_B)&&o===d.SHIFT&&(r[0]=a===d.SET_A?r[0]>95?r[0]-96:r[0]:r[0]<32?r[0]+96:r[0]),u=e.next(r,i+1,a))}else o=e.correctIndex(r,a),u=e.next(r,i+1,a);var g=e.getBar(o),Br=o*i;return{result:g+u.result,checksum:Br+u.checksum}}}]),e})(en.default);oe.default=un});var Et=f(ce=>{"use strict";Object.defineProperty(ce,"__esModule",{value:!0});var O=m(),yt=function(e){return e.match(new RegExp("^"+O.A_CHARS+"*"))[0].length},pt=function(e){return e.match(new RegExp("^"+O.B_CHARS+"*"))[0].length},gt=function(e){return e.match(new RegExp("^"+O.C_CHARS+"*"))[0]};function fe(t,e){var n=e?O.A_CHARS:O.B_CHARS,r=t.match(new RegExp("^("+n+"+?)(([0-9]{2}){2,})([^0-9]|$)"));if(r)return r[1]+"\xCC"+Ot(t.substring(r[1].length));var i=t.match(new RegExp("^"+n+"+"))[0];return i.length===t.length?t:i+String.fromCharCode(e?205:206)+fe(t.substring(i.length),!e)}function Ot(t){var e=gt(t),n=e.length;if(n===t.length)return t;t=t.substring(n);var r=yt(t)>=pt(t);return e+String.fromCharCode(r?206:205)+fe(t,r)}ce.default=function(t){var e=void 0,n=gt(t).length;if(n>=2)e=O.C_START_CHAR+Ot(t);else{var r=yt(t)>pt(t);e=(r?O.A_START_CHAR:O.B_START_CHAR)+fe(t,r)}return e.replace(/[\xCD\xCE]([^])[\xCD\xCE]/,function(i,a){return"\xCB"+a})}});var wt=f(he=>{"use strict";Object.defineProperty(he,"__esModule",{value:!0});var on=B(),fn=bt(on),cn=Et(),ln=bt(cn);function bt(t){return t&&t.__esModule?t:{default:t}}function hn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function le(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function dn(t,e){if(typeof e!="function"&&e!==null)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)}var _n=(function(t){dn(e,t);function e(n,r){if(hn(this,e),/^[\x00-\x7F\xC8-\xD3]+$/.test(n))var i=le(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,(0,ln.default)(n),r));else var i=le(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,n,r));return le(i)}return e})(fn.default);he.default=_n});var St=f(de=>{"use strict";Object.defineProperty(de,"__esModule",{value:!0});var vn=(function(){function t(e,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}})(),sn=B(),yn=pn(sn),mt=m();function pn(t){return t&&t.__esModule?t:{default:t}}function gn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function On(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function En(t,e){if(typeof e!="function"&&e!==null)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)}var bn=(function(t){En(e,t);function e(n,r){return gn(this,e),On(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,mt.A_START_CHAR+n,r))}return vn(e,[{key:"valid",value:function(){return new RegExp("^"+mt.A_CHARS+"+$").test(this.data)}}]),e})(yn.default);de.default=bn});var Rt=f(_e=>{"use strict";Object.defineProperty(_e,"__esModule",{value:!0});var wn=(function(){function t(e,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}})(),mn=B(),Sn=xn(mn),xt=m();function xn(t){return t&&t.__esModule?t:{default:t}}function Rn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function An(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Tn(t,e){if(typeof e!="function"&&e!==null)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)}var Pn=(function(t){Tn(e,t);function e(n,r){return Rn(this,e),An(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,xt.B_START_CHAR+n,r))}return wn(e,[{key:"valid",value:function(){return new RegExp("^"+xt.B_CHARS+"+$").test(this.data)}}]),e})(Sn.default);_e.default=Pn});var Tt=f(ve=>{"use strict";Object.defineProperty(ve,"__esModule",{value:!0});var Mn=(function(){function t(e,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}})(),In=B(),kn=Dn(In),At=m();function Dn(t){return t&&t.__esModule?t:{default:t}}function Bn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function qn(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Ln(t,e){if(typeof e!="function"&&e!==null)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)}var jn=(function(t){Ln(e,t);function e(n,r){return Bn(this,e),qn(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,At.C_START_CHAR+n,r))}return Mn(e,[{key:"valid",value:function(){return new RegExp("^"+At.C_CHARS+"+$").test(this.data)}}]),e})(kn.default);ve.default=jn});var Pt=f(y=>{"use strict";Object.defineProperty(y,"__esModule",{value:!0});y.CODE128C=y.CODE128B=y.CODE128A=y.CODE128=void 0;var Nn=wt(),Cn=z(Nn),Gn=St(),Hn=z(Gn),Fn=Rt(),$n=z(Fn),Un=Tt(),Xn=z(Un);function z(t){return t&&t.__esModule?t:{default:t}}y.CODE128=Cn.default;y.CODE128A=Hn.default;y.CODE128B=$n.default;y.CODE128C=Xn.default});var S=f(E=>{"use strict";Object.defineProperty(E,"__esModule",{value:!0});var f0=E.SIDE_BIN="101",c0=E.MIDDLE_BIN="01010",l0=E.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"]},h0=E.EAN2_STRUCTURE=["LL","LG","GL","GG"],d0=E.EAN5_STRUCTURE=["GGLLL","GLGLL","GLLGL","GLLLG","LGGLL","LLGGL","LLLGG","LGLGL","LGLLG","LLGLG"],_0=E.EAN13_STRUCTURE=["LLLLLL","LLGLGG","LLGGLG","LLGGGL","LGLLGG","LGGLLG","LGGGLL","LGLGLG","LGLGGL","LGGLGL"]});var x=f(se=>{"use strict";Object.defineProperty(se,"__esModule",{value:!0});var zn=S(),Vn=function(e,n,r){var i=e.split("").map(function(u,o){return zn.BINARIES[n[o]]}).map(function(u,o){return u?u[e[o]]:""});if(r){var a=e.length-1;i=i.map(function(u,o){return o<a?u+r:u})}return i.join("")};se.default=Vn});var pe=f(ye=>{"use strict";Object.defineProperty(ye,"__esModule",{value:!0});var Yn=(function(){function t(e,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}})(),R=S(),Jn=x(),Mt=It(Jn),Wn=l(),Qn=It(Wn);function It(t){return t&&t.__esModule?t:{default:t}}function Zn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Kn(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function ei(t,e){if(typeof e!="function"&&e!==null)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)}var ti=(function(t){ei(e,t);function e(n,r){Zn(this,e);var i=Kn(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,n,r));return i.fontSize=!r.flat&&r.fontSize>r.width*10?r.width*10:r.fontSize,i.guardHeight=r.height+i.fontSize/2+r.textMargin,i}return Yn(e,[{key:"encode",value:function(){return this.options.flat?this.encodeFlat():this.encodeGuarded()}},{key:"leftText",value:function(r,i){return this.text.substr(r,i)}},{key:"leftEncode",value:function(r,i){return(0,Mt.default)(r,i)}},{key:"rightText",value:function(r,i){return this.text.substr(r,i)}},{key:"rightEncode",value:function(r,i){return(0,Mt.default)(r,i)}},{key:"encodeGuarded",value:function(){var r={fontSize:this.fontSize},i={height:this.guardHeight};return[{data:R.SIDE_BIN,options:i},{data:this.leftEncode(),text:this.leftText(),options:r},{data:R.MIDDLE_BIN,options:i},{data:this.rightEncode(),text:this.rightText(),options:r},{data:R.SIDE_BIN,options:i}]}},{key:"encodeFlat",value:function(){var r=[R.SIDE_BIN,this.leftEncode(),R.MIDDLE_BIN,this.rightEncode(),R.SIDE_BIN];return{data:r.join(""),text:this.text}}}]),e})(Qn.default);ye.default=ti});var Dt=f(ge=>{"use strict";Object.defineProperty(ge,"__esModule",{value:!0});var ri=(function(){function t(e,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}})(),q=function t(e,n,r){e===null&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(i===void 0){var a=Object.getPrototypeOf(e);return a===null?void 0:t(a,n,r)}else{if("value"in i)return i.value;var u=i.get;return u===void 0?void 0:u.call(r)}},ni=S(),ii=pe(),ai=ui(ii);function ui(t){return t&&t.__esModule?t:{default:t}}function oi(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function fi(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function ci(t,e){if(typeof e!="function"&&e!==null)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)}var kt=function(e){var n=e.substr(0,12).split("").map(function(r){return+r}).reduce(function(r,i,a){return a%2?r+i*3:r+i},0);return(10-n%10)%10},li=(function(t){ci(e,t);function e(n,r){oi(this,e),n.search(/^[0-9]{12}$/)!==-1&&(n+=kt(n));var i=fi(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,n,r));return i.lastChar=r.lastChar,i}return ri(e,[{key:"valid",value:function(){return this.data.search(/^[0-9]{13}$/)!==-1&&+this.data[12]===kt(this.data)}},{key:"leftText",value:function(){return q(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"leftText",this).call(this,1,6)}},{key:"leftEncode",value:function(){var r=this.data.substr(1,6),i=ni.EAN13_STRUCTURE[this.data[0]];return q(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"leftEncode",this).call(this,r,i)}},{key:"rightText",value:function(){return q(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"rightText",this).call(this,7,6)}},{key:"rightEncode",value:function(){var r=this.data.substr(7,6);return q(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"rightEncode",this).call(this,r,"RRRRRR")}},{key:"encodeGuarded",value:function(){var r=q(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"encodeGuarded",this).call(this);return this.options.displayValue&&(r.unshift({data:"000000000000",text:this.text.substr(0,1),options:{textAlign:"left",fontSize:this.fontSize}}),this.options.lastChar&&(r.push({data:"00"}),r.push({data:"00000",text:this.options.lastChar,options:{fontSize:this.fontSize}}))),r}}]),e})(ai.default);ge.default=li});var qt=f(Oe=>{"use strict";Object.defineProperty(Oe,"__esModule",{value:!0});var hi=(function(){function t(e,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}})(),V=function t(e,n,r){e===null&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(i===void 0){var a=Object.getPrototypeOf(e);return a===null?void 0:t(a,n,r)}else{if("value"in i)return i.value;var u=i.get;return u===void 0?void 0:u.call(r)}},di=pe(),_i=vi(di);function vi(t){return t&&t.__esModule?t:{default:t}}function si(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function yi(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function pi(t,e){if(typeof e!="function"&&e!==null)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)}var Bt=function(e){var n=e.substr(0,7).split("").map(function(r){return+r}).reduce(function(r,i,a){return a%2?r+i:r+i*3},0);return(10-n%10)%10},gi=(function(t){pi(e,t);function e(n,r){return si(this,e),n.search(/^[0-9]{7}$/)!==-1&&(n+=Bt(n)),yi(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,n,r))}return hi(e,[{key:"valid",value:function(){return this.data.search(/^[0-9]{8}$/)!==-1&&+this.data[7]===Bt(this.data)}},{key:"leftText",value:function(){return V(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"leftText",this).call(this,0,4)}},{key:"leftEncode",value:function(){var r=this.data.substr(0,4);return V(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"leftEncode",this).call(this,r,"LLLL")}},{key:"rightText",value:function(){return V(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"rightText",this).call(this,4,4)}},{key:"rightEncode",value:function(){var r=this.data.substr(4,4);return V(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"rightEncode",this).call(this,r,"RRRR")}}]),e})(_i.default);Oe.default=gi});var jt=f(Ee=>{"use strict";Object.defineProperty(Ee,"__esModule",{value:!0});var Oi=(function(){function t(e,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}})(),Ei=S(),bi=x(),wi=Lt(bi),mi=l(),Si=Lt(mi);function Lt(t){return t&&t.__esModule?t:{default:t}}function xi(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ri(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Ai(t,e){if(typeof e!="function"&&e!==null)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)}var Ti=function(e){var n=e.split("").map(function(r){return+r}).reduce(function(r,i,a){return a%2?r+i*9:r+i*3},0);return n%10},Pi=(function(t){Ai(e,t);function e(n,r){return xi(this,e),Ri(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,n,r))}return Oi(e,[{key:"valid",value:function(){return this.data.search(/^[0-9]{5}$/)!==-1}},{key:"encode",value:function(){var r=Ei.EAN5_STRUCTURE[Ti(this.data)];return{data:"1011"+(0,wi.default)(this.data,r,"01"),text:this.text}}}]),e})(Si.default);Ee.default=Pi});var Ct=f(be=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0});var Mi=(function(){function t(e,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}})(),Ii=S(),ki=x(),Di=Nt(ki),Bi=l(),qi=Nt(Bi);function Nt(t){return t&&t.__esModule?t:{default:t}}function Li(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ji(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Ni(t,e){if(typeof e!="function"&&e!==null)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)}var Ci=(function(t){Ni(e,t);function e(n,r){return Li(this,e),ji(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,n,r))}return Mi(e,[{key:"valid",value:function(){return this.data.search(/^[0-9]{2}$/)!==-1}},{key:"encode",value:function(){var r=Ii.EAN2_STRUCTURE[parseInt(this.data)%4];return{data:"1011"+(0,Di.default)(this.data,r,"01"),text:this.text}}}]),e})(qi.default);be.default=Ci});var me=f(Y=>{"use strict";Object.defineProperty(Y,"__esModule",{value:!0});var Gi=(function(){function t(e,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}})();Y.checksum=we;var Hi=x(),A=Gt(Hi),Fi=l(),$i=Gt(Fi);function Gt(t){return t&&t.__esModule?t:{default:t}}function Ui(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Xi(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function zi(t,e){if(typeof e!="function"&&e!==null)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)}var Vi=(function(t){zi(e,t);function e(n,r){Ui(this,e),n.search(/^[0-9]{11}$/)!==-1&&(n+=we(n));var i=Xi(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,n,r));return i.displayValue=r.displayValue,r.fontSize>r.width*10?i.fontSize=r.width*10:i.fontSize=r.fontSize,i.guardHeight=r.height+i.fontSize/2+r.textMargin,i}return Gi(e,[{key:"valid",value:function(){return this.data.search(/^[0-9]{12}$/)!==-1&&this.data[11]==we(this.data)}},{key:"encode",value:function(){return this.options.flat?this.flatEncoding():this.guardedEncoding()}},{key:"flatEncoding",value:function(){var r="";return r+="101",r+=(0,A.default)(this.data.substr(0,6),"LLLLLL"),r+="01010",r+=(0,A.default)(this.data.substr(6,6),"RRRRRR"),r+="101",{data:r,text:this.text}}},{key:"guardedEncoding",value:function(){var r=[];return this.displayValue&&r.push({data:"00000000",text:this.text.substr(0,1),options:{textAlign:"left",fontSize:this.fontSize}}),r.push({data:"101"+(0,A.default)(this.data[0],"L"),options:{height:this.guardHeight}}),r.push({data:(0,A.default)(this.data.substr(1,5),"LLLLL"),text:this.text.substr(1,5),options:{fontSize:this.fontSize}}),r.push({data:"01010",options:{height:this.guardHeight}}),r.push({data:(0,A.default)(this.data.substr(6,5),"RRRRR"),text:this.text.substr(6,5),options:{fontSize:this.fontSize}}),r.push({data:(0,A.default)(this.data[11],"R")+"101",options:{height:this.guardHeight}}),this.displayValue&&r.push({data:"00000000",text:this.text.substr(11,1),options:{textAlign:"right",fontSize:this.fontSize}}),r}}]),e})($i.default);function we(t){var e=0,n;for(n=1;n<11;n+=2)e+=parseInt(t[n]);for(n=0;n<11;n+=2)e+=parseInt(t[n])*3;return(10-e%10)%10}Y.default=Vi});var $t=f(xe=>{"use strict";Object.defineProperty(xe,"__esModule",{value:!0});var Yi=(function(){function t(e,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}})(),Ji=x(),Wi=Ft(Ji),Qi=l(),Zi=Ft(Qi),Ki=me();function Ft(t){return t&&t.__esModule?t:{default:t}}function ea(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Se(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function ta(t,e){if(typeof e!="function"&&e!==null)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)}var ra=["XX00000XXX","XX10000XXX","XX20000XXX","XXX00000XX","XXXX00000X","XXXXX00005","XXXXX00006","XXXXX00007","XXXXX00008","XXXXX00009"],na=[["EEEOOO","OOOEEE"],["EEOEOO","OOEOEE"],["EEOOEO","OOEEOE"],["EEOOOE","OOEEEO"],["EOEEOO","OEOOEE"],["EOOEEO","OEEOOE"],["EOOOEE","OEEEOO"],["EOEOEO","OEOEOE"],["EOEOOE","OEOEEO"],["EOOEOE","OEEOEO"]],ia=(function(t){ta(e,t);function e(n,r){ea(this,e);var i=Se(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,n,r));if(i.isValid=!1,n.search(/^[0-9]{6}$/)!==-1)i.middleDigits=n,i.upcA=Ht(n,"0"),i.text=r.text||""+i.upcA[0]+n+i.upcA[i.upcA.length-1],i.isValid=!0;else if(n.search(/^[01][0-9]{7}$/)!==-1)if(i.middleDigits=n.substring(1,n.length-1),i.upcA=Ht(i.middleDigits,n[0]),i.upcA[i.upcA.length-1]===n[n.length-1])i.isValid=!0;else return Se(i);else return Se(i);return i.displayValue=r.displayValue,r.fontSize>r.width*10?i.fontSize=r.width*10:i.fontSize=r.fontSize,i.guardHeight=r.height+i.fontSize/2+r.textMargin,i}return Yi(e,[{key:"valid",value:function(){return this.isValid}},{key:"encode",value:function(){return this.options.flat?this.flatEncoding():this.guardedEncoding()}},{key:"flatEncoding",value:function(){var r="";return r+="101",r+=this.encodeMiddleDigits(),r+="010101",{data:r,text:this.text}}},{key:"guardedEncoding",value:function(){var r=[];return this.displayValue&&r.push({data:"00000000",text:this.text[0],options:{textAlign:"left",fontSize:this.fontSize}}),r.push({data:"101",options:{height:this.guardHeight}}),r.push({data:this.encodeMiddleDigits(),text:this.text.substring(1,7),options:{fontSize:this.fontSize}}),r.push({data:"010101",options:{height:this.guardHeight}}),this.displayValue&&r.push({data:"00000000",text:this.text[7],options:{textAlign:"right",fontSize:this.fontSize}}),r}},{key:"encodeMiddleDigits",value:function(){var r=this.upcA[0],i=this.upcA[this.upcA.length-1],a=na[parseInt(i)][parseInt(r)];return(0,Wi.default)(this.middleDigits,a)}}]),e})(Zi.default);function Ht(t,e){for(var n=parseInt(t[t.length-1]),r=ra[n],i="",a=0,u=0;u<r.length;u++){var o=r[u];o==="X"?i+=t[a++]:i+=o}return i=""+e+i,""+i+(0,Ki.checksum)(i)}xe.default=ia});var Ut=f(h=>{"use strict";Object.defineProperty(h,"__esModule",{value:!0});h.UPCE=h.UPC=h.EAN2=h.EAN5=h.EAN8=h.EAN13=void 0;var aa=Dt(),ua=T(aa),oa=qt(),fa=T(oa),ca=jt(),la=T(ca),ha=Ct(),da=T(ha),_a=me(),va=T(_a),sa=$t(),ya=T(sa);function T(t){return t&&t.__esModule?t:{default:t}}h.EAN13=ua.default;h.EAN8=fa.default;h.EAN5=la.default;h.EAN2=da.default;h.UPC=va.default;h.UPCE=ya.default});var Xt=f(L=>{"use strict";Object.defineProperty(L,"__esModule",{value:!0});var S0=L.START_BIN="1010",x0=L.END_BIN="11101",R0=L.BINARIES=["00110","10001","01001","11000","00101","10100","01100","00011","10010","01010"]});var Ae=f(Re=>{"use strict";Object.defineProperty(Re,"__esModule",{value:!0});var pa=(function(){function t(e,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}})(),J=Xt(),ga=l(),Oa=Ea(ga);function Ea(t){return t&&t.__esModule?t:{default:t}}function ba(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function wa(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function ma(t,e){if(typeof e!="function"&&e!==null)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)}var Sa=(function(t){ma(e,t);function e(){return ba(this,e),wa(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return pa(e,[{key:"valid",value:function(){return this.data.search(/^([0-9]{2})+$/)!==-1}},{key:"encode",value:function(){var r=this,i=this.data.match(/.{2}/g).map(function(a){return r.encodePair(a)}).join("");return{data:J.START_BIN+i+J.END_BIN,text:this.text}}},{key:"encodePair",value:function(r){var i=J.BINARIES[r[1]];return J.BINARIES[r[0]].split("").map(function(a,u){return(a==="1"?"111":"1")+(i[u]==="1"?"000":"0")}).join("")}}]),e})(Oa.default);Re.default=Sa});var Vt=f(Te=>{"use strict";Object.defineProperty(Te,"__esModule",{value:!0});var xa=(function(){function t(e,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}})(),Ra=Ae(),Aa=Ta(Ra);function Ta(t){return t&&t.__esModule?t:{default:t}}function Pa(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ma(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Ia(t,e){if(typeof e!="function"&&e!==null)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)}var zt=function(e){var n=e.substr(0,13).split("").map(function(r){return parseInt(r,10)}).reduce(function(r,i,a){return r+i*(3-a%2*2)},0);return Math.ceil(n/10)*10-n},ka=(function(t){Ia(e,t);function e(n,r){return Pa(this,e),n.search(/^[0-9]{13}$/)!==-1&&(n+=zt(n)),Ma(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,n,r))}return xa(e,[{key:"valid",value:function(){return this.data.search(/^[0-9]{14}$/)!==-1&&+this.data[13]===zt(this.data)}}]),e})(Aa.default);Te.default=ka});var Jt=f(P=>{"use strict";Object.defineProperty(P,"__esModule",{value:!0});P.ITF14=P.ITF=void 0;var Da=Ae(),Ba=Yt(Da),qa=Vt(),La=Yt(qa);function Yt(t){return t&&t.__esModule?t:{default:t}}P.ITF=Ba.default;P.ITF14=La.default});var M=f(Pe=>{"use strict";Object.defineProperty(Pe,"__esModule",{value:!0});var ja=(function(){function t(e,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}})(),Na=l(),Ca=Ga(Na);function Ga(t){return t&&t.__esModule?t:{default:t}}function Ha(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Fa(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function $a(t,e){if(typeof e!="function"&&e!==null)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)}var Ua=(function(t){$a(e,t);function e(n,r){return Ha(this,e),Fa(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,n,r))}return ja(e,[{key:"encode",value:function(){for(var r="110",i=0;i<this.data.length;i++){var a=parseInt(this.data[i]),u=a.toString(2);u=Xa(u,4-u.length);for(var o=0;o<u.length;o++)r+=u[o]=="0"?"100":"110"}return r+="1001",{data:r,text:this.text}}},{key:"valid",value:function(){return this.data.search(/^[0-9]+$/)!==-1}}]),e})(Ca.default);function Xa(t,e){for(var n=0;n<e;n++)t="0"+t;return t}Pe.default=Ua});var j=f(W=>{"use strict";Object.defineProperty(W,"__esModule",{value:!0});W.mod10=za;W.mod11=Va;function za(t){for(var e=0,n=0;n<t.length;n++){var r=parseInt(t[n]);(n+t.length)%2===0?e+=r:e+=r*2%10+Math.floor(r*2/10)}return(10-e%10)%10}function Va(t){for(var e=0,n=[2,3,4,5,6,7],r=0;r<t.length;r++){var i=parseInt(t[t.length-1-r]);e+=n[r%n.length]*i}return(11-e%11)%11}});var Wt=f(Me=>{"use strict";Object.defineProperty(Me,"__esModule",{value:!0});var Ya=M(),Ja=Qa(Ya),Wa=j();function Qa(t){return t&&t.__esModule?t:{default:t}}function Za(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ka(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function eu(t,e){if(typeof e!="function"&&e!==null)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)}var tu=(function(t){eu(e,t);function e(n,r){return Za(this,e),Ka(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,n+(0,Wa.mod10)(n),r))}return e})(Ja.default);Me.default=tu});var Qt=f(Ie=>{"use strict";Object.defineProperty(Ie,"__esModule",{value:!0});var ru=M(),nu=au(ru),iu=j();function au(t){return t&&t.__esModule?t:{default:t}}function uu(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ou(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function fu(t,e){if(typeof e!="function"&&e!==null)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)}var cu=(function(t){fu(e,t);function e(n,r){return uu(this,e),ou(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,n+(0,iu.mod11)(n),r))}return e})(nu.default);Ie.default=cu});var Kt=f(ke=>{"use strict";Object.defineProperty(ke,"__esModule",{value:!0});var lu=M(),hu=du(lu),Zt=j();function du(t){return t&&t.__esModule?t:{default:t}}function _u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function vu(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function su(t,e){if(typeof e!="function"&&e!==null)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)}var yu=(function(t){su(e,t);function e(n,r){return _u(this,e),n+=(0,Zt.mod10)(n),n+=(0,Zt.mod10)(n),vu(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,n,r))}return e})(hu.default);ke.default=yu});var tr=f(De=>{"use strict";Object.defineProperty(De,"__esModule",{value:!0});var pu=M(),gu=Ou(pu),er=j();function Ou(t){return t&&t.__esModule?t:{default:t}}function Eu(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function bu(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function wu(t,e){if(typeof e!="function"&&e!==null)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)}var mu=(function(t){wu(e,t);function e(n,r){return Eu(this,e),n+=(0,er.mod11)(n),n+=(0,er.mod10)(n),bu(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,n,r))}return e})(gu.default);De.default=mu});var rr=f(_=>{"use strict";Object.defineProperty(_,"__esModule",{value:!0});_.MSI1110=_.MSI1010=_.MSI11=_.MSI10=_.MSI=void 0;var Su=M(),xu=N(Su),Ru=Wt(),Au=N(Ru),Tu=Qt(),Pu=N(Tu),Mu=Kt(),Iu=N(Mu),ku=tr(),Du=N(ku);function N(t){return t&&t.__esModule?t:{default:t}}_.MSI=xu.default;_.MSI10=Au.default;_.MSI11=Pu.default;_.MSI1010=Iu.default;_.MSI1110=Du.default});var nr=f(Q=>{"use strict";Object.defineProperty(Q,"__esModule",{value:!0});Q.pharmacode=void 0;var Bu=(function(){function t(e,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}})(),qu=l(),Lu=ju(qu);function ju(t){return t&&t.__esModule?t:{default:t}}function Nu(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Cu(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Gu(t,e){if(typeof e!="function"&&e!==null)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)}var Hu=(function(t){Gu(e,t);function e(n,r){Nu(this,e);var i=Cu(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,n,r));return i.number=parseInt(n,10),i}return Bu(e,[{key:"encode",value:function(){for(var r=this.number,i="";!isNaN(r)&&r!=0;)r%2===0?(i="11100"+i,r=(r-2)/2):(i="100"+i,r=(r-1)/2);return i=i.slice(0,-2),{data:i,text:this.text}}},{key:"valid",value:function(){return this.number>=3&&this.number<=131070}}]),e})(Lu.default);Q.pharmacode=Hu});var ir=f(Z=>{"use strict";Object.defineProperty(Z,"__esModule",{value:!0});Z.codabar=void 0;var Fu=(function(){function t(e,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}})(),$u=l(),Uu=Xu($u);function Xu(t){return t&&t.__esModule?t:{default:t}}function zu(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Vu(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Yu(t,e){if(typeof e!="function"&&e!==null)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)}var Ju=(function(t){Yu(e,t);function e(n,r){zu(this,e),n.search(/^[0-9\-\$\:\.\+\/]+$/)===0&&(n="A"+n+"A");var i=Vu(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,n.toUpperCase(),r));return i.text=i.options.text||i.text.replace(/[A-D]/g,""),i}return Fu(e,[{key:"valid",value:function(){return this.data.search(/^[A-D][0-9\-\$\:\.\+\/]+[A-D]$/)!==-1}},{key:"encode",value:function(){for(var r=[],i=this.getEncodings(),a=0;a<this.data.length;a++)r.push(i[this.data.charAt(a)]),a!==this.data.length-1&&r.push("0");return{text:this.text,data:r.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"}}}]),e})(Uu.default);Z.codabar=Ju});var ar=f(C=>{"use strict";Object.defineProperty(C,"__esModule",{value:!0});var G0=C.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","-","."," ","$","/","+","%","($)","(%)","(/)","(+)","\xFF"],H0=C.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"],F0=C.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"],"\x7F":["(%)","T"]}});var qe=f(Be=>{"use strict";Object.defineProperty(Be,"__esModule",{value:!0});var Wu=(function(){function t(e,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}})(),K=ar(),Qu=l(),Zu=Ku(Qu);function Ku(t){return t&&t.__esModule?t:{default:t}}function eo(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function to(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function ro(t,e){if(typeof e!="function"&&e!==null)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)}var no=(function(t){ro(e,t);function e(n,r){return eo(this,e),to(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,n,r))}return Wu(e,[{key:"valid",value:function(){return/^[0-9A-Z\-. $/+%]+$/.test(this.data)}},{key:"encode",value:function(){var r=this.data.split("").flatMap(function(o){return K.MULTI_SYMBOLS[o]||o}),i=r.map(function(o){return e.getEncoding(o)}).join(""),a=e.checksum(r,20),u=e.checksum(r.concat(a),15);return{text:this.text,data:e.getEncoding("\xFF")+i+e.getEncoding(a)+e.getEncoding(u)+e.getEncoding("\xFF")+"1"}}}],[{key:"getEncoding",value:function(r){return K.BINARIES[e.symbolValue(r)]}},{key:"getSymbol",value:function(r){return K.SYMBOLS[r]}},{key:"symbolValue",value:function(r){return K.SYMBOLS.indexOf(r)}},{key:"checksum",value:function(r,i){var a=r.slice().reverse().reduce(function(u,o,s){var g=s%i+1;return u+e.symbolValue(o)*g},0);return e.getSymbol(a%47)}}]),e})(Zu.default);Be.default=no});var ur=f(Le=>{"use strict";Object.defineProperty(Le,"__esModule",{value:!0});var io=(function(){function t(e,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}})(),ao=qe(),uo=oo(ao);function oo(t){return t&&t.__esModule?t:{default:t}}function fo(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function co(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function lo(t,e){if(typeof e!="function"&&e!==null)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)}var ho=(function(t){lo(e,t);function e(n,r){return fo(this,e),co(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,n,r))}return io(e,[{key:"valid",value:function(){return/^[\x00-\x7f]+$/.test(this.data)}}]),e})(uo.default);Le.default=ho});var fr=f(I=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0});I.CODE93FullASCII=I.CODE93=void 0;var _o=qe(),vo=or(_o),so=ur(),yo=or(so);function or(t){return t&&t.__esModule?t:{default:t}}I.CODE93=vo.default;I.CODE93FullASCII=yo.default});var cr=f(ee=>{"use strict";Object.defineProperty(ee,"__esModule",{value:!0});ee.GenericBarcode=void 0;var po=(function(){function t(e,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}})(),go=l(),Oo=Eo(go);function Eo(t){return t&&t.__esModule?t:{default:t}}function bo(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function wo(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function mo(t,e){if(typeof e!="function"&&e!==null)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)}var So=(function(t){mo(e,t);function e(n,r){return bo(this,e),wo(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,n,r))}return po(e,[{key:"encode",value:function(){return{data:"10101010101010101010101010101010101010101",text:this.text}}},{key:"valid",value:function(){return!0}}]),e})(Oo.default);ee.GenericBarcode=So});var dr=f(je=>{"use strict";Object.defineProperty(je,"__esModule",{value:!0});var xo=dt(),te=Pt(),k=Ut(),lr=Jt(),G=rr(),Ro=nr(),Ao=ir(),hr=fr(),To=cr();je.default={CODE39:xo.CODE39,CODE128:te.CODE128,CODE128A:te.CODE128A,CODE128B:te.CODE128B,CODE128C:te.CODE128C,EAN13:k.EAN13,EAN8:k.EAN8,EAN5:k.EAN5,EAN2:k.EAN2,UPC:k.UPC,UPCE:k.UPCE,ITF14:lr.ITF14,ITF:lr.ITF,MSI:G.MSI,MSI10:G.MSI10,MSI11:G.MSI11,MSI1010:G.MSI1010,MSI1110:G.MSI1110,pharmacode:Ro.pharmacode,codabar:Ao.codabar,CODE93:hr.CODE93,CODE93FullASCII:hr.CODE93FullASCII,GenericBarcode:To.GenericBarcode}});var H=f(Ne=>{"use strict";Object.defineProperty(Ne,"__esModule",{value:!0});var Po=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t};Ne.default=function(t,e){return Po({},t,e)}});var _r=f(Ce=>{"use strict";Object.defineProperty(Ce,"__esModule",{value:!0});Ce.default=Mo;function Mo(t){var e=[];function n(r){if(Array.isArray(r))for(var i=0;i<r.length;i++)n(r[i]);else r.text=r.text||"",r.data=r.data||"",e.push(r)}return n(t),e}});var vr=f(Ge=>{"use strict";Object.defineProperty(Ge,"__esModule",{value:!0});Ge.default=Io;function Io(t){return t.marginTop=t.marginTop||t.margin,t.marginBottom=t.marginBottom||t.margin,t.marginRight=t.marginRight||t.margin,t.marginLeft=t.marginLeft||t.margin,t}});var Fe=f(He=>{"use strict";Object.defineProperty(He,"__esModule",{value:!0});He.default=ko;function ko(t){var e=["width","height","textMargin","fontSize","margin","marginTop","marginBottom","marginLeft","marginRight"];for(var n in e)e.hasOwnProperty(n)&&(n=e[n],typeof t[n]=="string"&&(t[n]=parseInt(t[n],10)));return typeof t.displayValue=="string"&&(t.displayValue=t.displayValue!="false"),t}});var Ue=f($e=>{"use strict";Object.defineProperty($e,"__esModule",{value:!0});var Do={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(){}};$e.default=Do});var pr=f(Xe=>{"use strict";Object.defineProperty(Xe,"__esModule",{value:!0});var Bo=Fe(),qo=yr(Bo),Lo=Ue(),sr=yr(Lo);function yr(t){return t&&t.__esModule?t:{default:t}}function jo(t){var e={};for(var n in sr.default)sr.default.hasOwnProperty(n)&&(t.hasAttribute("jsbarcode-"+n.toLowerCase())&&(e[n]=t.getAttribute("jsbarcode-"+n.toLowerCase())),t.hasAttribute("data-"+n.toLowerCase())&&(e[n]=t.getAttribute("data-"+n.toLowerCase())));return e.value=t.getAttribute("jsbarcode-value")||t.getAttribute("data-value"),e=(0,qo.default)(e),e}Xe.default=jo});var ze=f(v=>{"use strict";Object.defineProperty(v,"__esModule",{value:!0});v.getTotalWidthOfEncodings=v.calculateEncodingAttributes=v.getBarcodePadding=v.getEncodingHeight=v.getMaximumHeightOfEncodings=void 0;var No=H(),Co=Go(No);function Go(t){return t&&t.__esModule?t:{default:t}}function gr(t,e){return e.height+(e.displayValue&&t.text.length>0?e.fontSize+e.textMargin:0)+e.marginTop+e.marginBottom}function Or(t,e,n){if(n.displayValue&&e<t){if(n.textAlign=="center")return Math.floor((t-e)/2);if(n.textAlign=="left")return 0;if(n.textAlign=="right")return Math.floor(t-e)}return 0}function Ho(t,e,n){for(var r=0;r<t.length;r++){var i=t[r],a=(0,Co.default)(e,i.options),u;a.displayValue?u=Uo(i.text,a,n):u=0;var o=i.data.length*a.width;i.width=Math.ceil(Math.max(u,o)),i.height=gr(i,a),i.barcodePadding=Or(u,o,a)}}function Fo(t){for(var e=0,n=0;n<t.length;n++)e+=t[n].width;return e}function $o(t){for(var e=0,n=0;n<t.length;n++)t[n].height>e&&(e=t[n].height);return e}function Uo(t,e,n){var r;if(n)r=n;else if(typeof document<"u")r=document.createElement("canvas").getContext("2d");else return 0;r.font=e.fontOptions+" "+e.fontSize+"px "+e.font;var i=r.measureText(t);if(!i)return 0;var a=i.width;return a}v.getMaximumHeightOfEncodings=$o;v.getEncodingHeight=gr;v.getBarcodePadding=Or;v.calculateEncodingAttributes=Ho;v.getTotalWidthOfEncodings=Fo});var Er=f(Ye=>{"use strict";Object.defineProperty(Ye,"__esModule",{value:!0});var Xo=(function(){function t(e,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}})(),zo=H(),Vo=Yo(zo),Ve=ze();function Yo(t){return t&&t.__esModule?t:{default:t}}function Jo(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var Wo=(function(){function t(e,n,r){Jo(this,t),this.canvas=e,this.encodings=n,this.options=r}return Xo(t,[{key:"render",value:function(){if(!this.canvas.getContext)throw new Error("The browser does not support canvas.");this.prepareCanvas();for(var n=0;n<this.encodings.length;n++){var r=(0,Vo.default)(this.options,this.encodings[n].options);this.drawCanvasBarcode(r,this.encodings[n]),this.drawCanvasText(r,this.encodings[n]),this.moveCanvasDrawing(this.encodings[n])}this.restoreCanvas()}},{key:"prepareCanvas",value:function(){var n=this.canvas.getContext("2d");n.save(),(0,Ve.calculateEncodingAttributes)(this.encodings,this.options,n);var r=(0,Ve.getTotalWidthOfEncodings)(this.encodings),i=(0,Ve.getMaximumHeightOfEncodings)(this.encodings);this.canvas.width=r+this.options.marginLeft+this.options.marginRight,this.canvas.height=i,n.clearRect(0,0,this.canvas.width,this.canvas.height),this.options.background&&(n.fillStyle=this.options.background,n.fillRect(0,0,this.canvas.width,this.canvas.height)),n.translate(this.options.marginLeft,0)}},{key:"drawCanvasBarcode",value:function(n,r){var i=this.canvas.getContext("2d"),a=r.data,u;n.textPosition=="top"?u=n.marginTop+n.fontSize+n.textMargin:u=n.marginTop,i.fillStyle=n.lineColor;for(var o=0;o<a.length;o++){var s=o*n.width+r.barcodePadding;a[o]==="1"?i.fillRect(s,u,n.width,n.height):a[o]&&i.fillRect(s,u,n.width,n.height*a[o])}}},{key:"drawCanvasText",value:function(n,r){var i=this.canvas.getContext("2d"),a=n.fontOptions+" "+n.fontSize+"px "+n.font;if(n.displayValue){var u,o;n.textPosition=="top"?o=n.marginTop+n.fontSize-n.textMargin:o=n.height+n.textMargin+n.marginTop+n.fontSize,i.font=a,n.textAlign=="left"||r.barcodePadding>0?(u=0,i.textAlign="left"):n.textAlign=="right"?(u=r.width-1,i.textAlign="right"):(u=r.width/2,i.textAlign="center"),i.fillText(r.text,u,o)}}},{key:"moveCanvasDrawing",value:function(n){var r=this.canvas.getContext("2d");r.translate(n.width,0)}},{key:"restoreCanvas",value:function(){var n=this.canvas.getContext("2d");n.restore()}}]),t})();Ye.default=Wo});var br=f(We=>{"use strict";Object.defineProperty(We,"__esModule",{value:!0});var Qo=(function(){function t(e,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}})(),Zo=H(),Ko=ef(Zo),Je=ze();function ef(t){return t&&t.__esModule?t:{default:t}}function tf(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var re="http://www.w3.org/2000/svg",rf=(function(){function t(e,n,r){tf(this,t),this.svg=e,this.encodings=n,this.options=r,this.document=r.xmlDocument||document}return Qo(t,[{key:"render",value:function(){var n=this.options.marginLeft;this.prepareSVG();for(var r=0;r<this.encodings.length;r++){var i=this.encodings[r],a=(0,Ko.default)(this.options,i.options),u=this.createGroup(n,a.marginTop,this.svg);this.setGroupOptions(u,a),this.drawSvgBarcode(u,a,i),this.drawSVGText(u,a,i),n+=i.width}}},{key:"prepareSVG",value:function(){for(;this.svg.firstChild;)this.svg.removeChild(this.svg.firstChild);(0,Je.calculateEncodingAttributes)(this.encodings,this.options);var n=(0,Je.getTotalWidthOfEncodings)(this.encodings),r=(0,Je.getMaximumHeightOfEncodings)(this.encodings),i=n+this.options.marginLeft+this.options.marginRight;this.setSvgAttributes(i,r),this.options.background&&this.drawRect(0,0,i,r,this.svg).setAttribute("fill",this.options.background)}},{key:"drawSvgBarcode",value:function(n,r,i){var a=i.data,u;r.textPosition=="top"?u=r.fontSize+r.textMargin:u=0;for(var o=0,s=0,g=0;g<a.length;g++)s=g*r.width+i.barcodePadding,a[g]==="1"?o++:o>0&&(this.drawRect(s-r.width*o,u,r.width*o,r.height,n),o=0);o>0&&this.drawRect(s-r.width*(o-1),u,r.width*o,r.height,n)}},{key:"drawSVGText",value:function(n,r,i){var a=this.document.createElementNS(re,"text");if(r.displayValue){var u,o;a.setAttribute("font-family",r.font),a.setAttribute("font-size",r.fontSize),r.fontOptions.includes("bold")&&a.setAttribute("font-weight","bold"),r.fontOptions.includes("italic")&&a.setAttribute("font-style","italic"),r.textPosition=="top"?o=r.fontSize-r.textMargin:o=r.height+r.textMargin+r.fontSize,r.textAlign=="left"||i.barcodePadding>0?(u=0,a.setAttribute("text-anchor","start")):r.textAlign=="right"?(u=i.width-1,a.setAttribute("text-anchor","end")):(u=i.width/2,a.setAttribute("text-anchor","middle")),a.setAttribute("x",u),a.setAttribute("y",o),a.appendChild(this.document.createTextNode(i.text)),n.appendChild(a)}}},{key:"setSvgAttributes",value:function(n,r){var i=this.svg;i.setAttribute("width",n+"px"),i.setAttribute("height",r+"px"),i.setAttribute("x","0px"),i.setAttribute("y","0px"),i.setAttribute("viewBox","0 0 "+n+" "+r),i.setAttribute("xmlns",re),i.setAttribute("version","1.1")}},{key:"createGroup",value:function(n,r,i){var a=this.document.createElementNS(re,"g");return a.setAttribute("transform","translate("+n+", "+r+")"),i.appendChild(a),a}},{key:"setGroupOptions",value:function(n,r){n.setAttribute("fill",r.lineColor)}},{key:"drawRect",value:function(n,r,i,a,u){var o=this.document.createElementNS(re,"rect");return o.setAttribute("x",n),o.setAttribute("y",r),o.setAttribute("width",i),o.setAttribute("height",a),u.appendChild(o),o}}]),t})();We.default=rf});var wr=f(Qe=>{"use strict";Object.defineProperty(Qe,"__esModule",{value:!0});var nf=(function(){function t(e,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}})();function af(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var uf=(function(){function t(e,n,r){af(this,t),this.object=e,this.encodings=n,this.options=r}return nf(t,[{key:"render",value:function(){this.object.encodings=this.encodings}}]),t})();Qe.default=uf});var mr=f(Ke=>{"use strict";Object.defineProperty(Ke,"__esModule",{value:!0});var of=Er(),ff=Ze(of),cf=br(),lf=Ze(cf),hf=wr(),df=Ze(hf);function Ze(t){return t&&t.__esModule?t:{default:t}}Ke.default={CanvasRenderer:ff.default,SVGRenderer:lf.default,ObjectRenderer:df.default}});var nt=f(F=>{"use strict";Object.defineProperty(F,"__esModule",{value:!0});function et(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function tt(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function rt(t,e){if(typeof e!="function"&&e!==null)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)}var _f=(function(t){rt(e,t);function e(n,r){et(this,e);var i=tt(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return i.name="InvalidInputException",i.symbology=n,i.input=r,i.message='"'+i.input+'" is not a valid input for '+i.symbology,i}return e})(Error),vf=(function(t){rt(e,t);function e(){et(this,e);var n=tt(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return n.name="InvalidElementException",n.message="Not supported type to render on",n}return e})(Error),sf=(function(t){rt(e,t);function e(){et(this,e);var n=tt(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return n.name="NoElementException",n.message="No element to render on.",n}return e})(Error);F.InvalidInputException=_f;F.InvalidElementException=vf;F.NoElementException=sf});var xr=f(ut=>{"use strict";Object.defineProperty(ut,"__esModule",{value:!0});var yf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pf=pr(),it=Sr(pf),gf=mr(),$=Sr(gf),Of=nt();function Sr(t){return t&&t.__esModule?t:{default:t}}function at(t){if(typeof t=="string")return Ef(t);if(Array.isArray(t)){for(var e=[],n=0;n<t.length;n++)e.push(at(t[n]));return e}else{if(typeof HTMLCanvasElement<"u"&&t instanceof HTMLImageElement)return bf(t);if(t&&t.nodeName&&t.nodeName.toLowerCase()==="svg"||typeof SVGElement<"u"&&t instanceof SVGElement)return{element:t,options:(0,it.default)(t),renderer:$.default.SVGRenderer};if(typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement)return{element:t,options:(0,it.default)(t),renderer:$.default.CanvasRenderer};if(t&&t.getContext)return{element:t,renderer:$.default.CanvasRenderer};if(t&&(typeof t>"u"?"undefined":yf(t))==="object"&&!t.nodeName)return{element:t,renderer:$.default.ObjectRenderer};throw new Of.InvalidElementException}}function Ef(t){var e=document.querySelectorAll(t);if(e.length!==0){for(var n=[],r=0;r<e.length;r++)n.push(at(e[r]));return n}}function bf(t){var e=document.createElement("canvas");return{element:e,options:(0,it.default)(t),renderer:$.default.CanvasRenderer,afterRender:function(){t.setAttribute("src",e.toDataURL())}}}ut.default=at});var Rr=f(ot=>{"use strict";Object.defineProperty(ot,"__esModule",{value:!0});var wf=(function(){function t(e,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}})();function mf(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var Sf=(function(){function t(e){mf(this,t),this.api=e}return wf(t,[{key:"handleCatch",value:function(n){if(n.name==="InvalidInputException")if(this.api._options.valid!==this.api._defaults.valid)this.api._options.valid(!1);else throw n.message;else throw n;this.api.render=function(){}}},{key:"wrapBarcodeCall",value:function(n){try{var r=n.apply(void 0,arguments);return this.api._options.valid(!0),r}catch(i){return this.handleCatch(i),this.api}}}]),t})();ot.default=Sf});var jf=f((c1,Dr)=>{var xf=dr(),w=b(xf),Rf=H(),U=b(Rf),Af=_r(),Tr=b(Af),Tf=vr(),Ar=b(Tf),Pf=xr(),Mf=b(Pf),If=Fe(),kf=b(If),Df=Rr(),Bf=b(Df),Pr=nt(),qf=Ue(),Mr=b(qf);function b(t){return t&&t.__esModule?t:{default:t}}var p=function(){},ne=function(e,n,r){var i=new p;if(typeof e>"u")throw Error("No element to render on was provided.");return i._renderProperties=(0,Mf.default)(e),i._encodings=[],i._options=Mr.default,i._errorHandler=new Bf.default(i),typeof n<"u"&&(r=r||{},r.format||(r.format=kr()),i.options(r)[r.format](n,r).render()),i};ne.getModule=function(t){return w.default[t]};for(ft in w.default)w.default.hasOwnProperty(ft)&&Lf(w.default,ft);var ft;function Lf(t,e){p.prototype[e]=p.prototype[e.toUpperCase()]=p.prototype[e.toLowerCase()]=function(n,r){var i=this;return i._errorHandler.wrapBarcodeCall(function(){r.text=typeof r.text>"u"?void 0:""+r.text;var a=(0,U.default)(i._options,r);a=(0,kf.default)(a);var u=t[e],o=Ir(n,u,a);return i._encodings.push(o),i})}}function Ir(t,e,n){t=""+t;var r=new e(t,n);if(!r.valid())throw new Pr.InvalidInputException(r.constructor.name,t);var i=r.encode();i=(0,Tr.default)(i);for(var a=0;a<i.length;a++)i[a].options=(0,U.default)(n,i[a].options);return i}function kr(){return w.default.CODE128?"CODE128":Object.keys(w.default)[0]}p.prototype.options=function(t){return this._options=(0,U.default)(this._options,t),this};p.prototype.blank=function(t){var e=new Array(t+1).join("0");return this._encodings.push({data:e}),this};p.prototype.init=function(){if(this._renderProperties){Array.isArray(this._renderProperties)||(this._renderProperties=[this._renderProperties]);var t;for(var e in this._renderProperties){t=this._renderProperties[e];var n=(0,U.default)(this._options,t.options);n.format=="auto"&&(n.format=kr()),this._errorHandler.wrapBarcodeCall(function(){var r=n.value,i=w.default[n.format.toUpperCase()],a=Ir(r,i,n);ct(t,a,n)})}}};p.prototype.render=function(){if(!this._renderProperties)throw new Pr.NoElementException;if(Array.isArray(this._renderProperties))for(var t=0;t<this._renderProperties.length;t++)ct(this._renderProperties[t],this._encodings,this._options);else ct(this._renderProperties,this._encodings,this._options);return this};p.prototype._defaults=Mr.default;function ct(t,e,n){e=(0,Tr.default)(e);for(var r=0;r<e.length;r++)e[r].options=(0,U.default)(n,e[r].options),(0,Ar.default)(e[r].options);(0,Ar.default)(n);var i=t.renderer,a=new i(t.element,e,n);a.render(),t.afterRender&&t.afterRender()}typeof window<"u"&&(window.JsBarcode=ne);typeof jQuery<"u"&&(jQuery.fn.JsBarcode=function(t,e){var n=[];return jQuery(this).each(function(){n.push(this)}),ne(n,t,e)});Dr.exports=ne});return jf();})();