/******/layui.define(function(exports){(function(modules){// webpackBootstrap/******/// The module cache/******/varinstalledModules={};/******//******/// The require function/******/function__webpack_require__(moduleId){/******//******/// Check if module is in cache/******/if(installedModules[moduleId]){/******/returninstalledModules[moduleId].exports;/******/}/******/// Create a new module (and put it into the cache)/******/varmodule=installedModules[moduleId]={/******/i:moduleId,/******/l:false,/******/exports:{}/******/};/******//******/// Execute the module function/******/modules[moduleId].call(module.exports,module,module.exports,__webpack_require__);/******//******/// Flag the module as loaded/******/module.l=true;/******//******/// Return the exports of the module/******/returnmodule.exports;/******/}/******//******//******/// expose the modules object (__webpack_modules__)/******/__webpack_require__.m=modules;/******//******/// expose the module cache/******/__webpack_require__.c=installedModules;/******//******/// identity function for calling harmony imports with the correct context/******/__webpack_require__.i=function(value){returnvalue;};/******//******/// define getter function for harmony exports/******/__webpack_require__.d=function(exports,name,getter){/******/if(!__webpack_require__.o(exports,name)){/******/Object.defineProperty(exports,name,{/******/configurable:false,/******/enumerable:true,/******/get:getter/******/});/******/}/******/};/******//******/// getDefaultExport function for compatibility with non-harmony modules/******/__webpack_require__.n=function(module){/******/vargetter=module&&module.__esModule?/******/functiongetDefault(){returnmodule['default'];}:/******/functiongetModuleExports(){returnmodule;};/******/__webpack_require__.d(getter,'a',getter);/******/returngetter;/******/};/******//******/// Object.prototype.hasOwnProperty.call/******/__webpack_require__.o=function(object,property){returnObject.prototype.hasOwnProperty.call(object,property);};/******//******/// __webpack_public_path__/******/__webpack_require__.p="";/******//******/// Load entry module and return exports/******/return__webpack_require__(__webpack_require__.s=20);/******/})/************************************************************************//******/([/* 0 *//***/(function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});function_classCallCheck(instance,Constructor){if(!(instanceinstanceofConstructor)){thrownewTypeError("Cannot call a class as a function");}}varBarcode=functionBarcode(data,options){_classCallCheck(this,Barcode);this.data=data;this.text=options.text||data;this.options=options;};exports.default=Barcode;/***/}),/* 1 *//***/(function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var_SET_BY_CODE;function_defineProperty(obj,key,value){if(keyinobj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}returnobj;}// constants for internal usagevarSET_A=exports.SET_A=0;varSET_B=exports.SET_B=1;varSET_C=exports.SET_C=2;// Special charactersvarSHIFT=exports.SHIFT=98;varSTART_A=exports.START_A=103;varSTART_B=exports.START_B=104;varSTART_C=exports.START_C=105;varMODULO=exports.MODULO=103;varSTOP=exports.STOP=106;varFNC1=exports.FNC1=207;// Get set by start codevarSET_BY_CODE=exports.SET_BY_CODE=(_SET_BY_CODE={},_defineProperty(_SET_BY_CODE,START_A,SET_A),_defineProperty(_SET_BY_CODE,START_B,SET_B),_defineProperty(_SET_BY_CODE,START_C,SET_C),_SET_BY_CODE);// Get next set by codevarSWAP=exports.SWAP={101:SET_A,100:SET_B,99:SET_C};varA_START_CHAR=exports.A_START_CHAR=String.fromCharCode(208);// START_A + 105varB_START_CHAR=exports.B_START_CHAR=String.fromCharCode(209);// START_B + 105varC_START_CHAR=exports.C_START_CHAR=String.fromCharCode(210);// START_C + 105// 128A (Code Set A)// ASCII characters 00 to 95 (0–9, A–Z and control codes), special characters, and FNC 1–4varA_CHARS=exports.A_CHARS="[\x00-\x5F\xC8-\xCF]";// 128B (Code Set B)// ASCII characters 32 to 127 (0–9, A–Z, a–z), special characters, and FNC 1–4varB_CHARS=exports.B_CHARS="[\x20-\x7F\xC8-\xCF]";// 128C (Code Set C)// 00–99 (encodes two digits with a single code point) and FNC1varC_CHARS=exports.C_CHARS="(\xCF*[0-9]{2}\xCF*)";// CODE128 includes 107 symbols:// 103 data symbols, 3 start symbols (A, B and C), and 1 stop symbol (the last one)// Each symbol consist of three black bars (1) and three white spaces (0).varBARS=exports.BARS=[11011001100,11001101100,11001100110,10010011000,10010001100,10001001100,10011001000,10011000100,10001100100,11001001000,11001000100,11000100100,10110011100,10011011100,10011001110,10111001100,10011101100,10011100110,11001110010,11001011100,11001001110,11011100100,11001110100,11101101110,11101001100,11100101100,11100100110,11101100100,11100110100,11100110010,11011011000,11011000110,11000110110,10100011000,10001011000,10001000110,10110001000,10001101000,10001100010,11010001000,11000101000,11000100010,10110111000,10110001110,10001101110,10111011000,10111000110,10001110110,11101110110,11010001110,11000101110,11011101000,11011100010,11011101110,11101011000,11101000110,11100010110,11101101000,11101100010,11100011010,11101111010,11001000010,11110001010,10100110000,10100001100,10010110000,10010000110,10000101100,10000100110,10110010000,10110000100,10011010000,10011000010,10000110100,10000110010,11000010010,11001010000,11110111010,11000010100,10001111010,10100111100,10010111100,10010011110,10111100100,10011110100,10011110010,11110100100,11110010100,11110010010,11011011110,11011110110,11110110110,10101111000,10100011110,10001011110,10111101000,10111100010,11110101000,11110100010,10111011110,10111101110,11101011110,11110101110,11010000100,11010010000,11010011100,1100011101011];/***/}),/* 2 *//***/(function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});// Standard start end and middle bitsvarSIDE_BIN=exports.SIDE_BIN='101';varMIDDLE_BIN=exports.MIDDLE_BIN='01010';varBINARIES=exports.BINARIES={'L':[// The L (left) type of encoding'0001101','0011001','0010011','0111101','0100011','0110001','0101111','0111011','0110111','0001011'],'G':[// The G type of encoding'0100111','0110011','0011011','0100001','0011101','0111001','0000101','0010001','0001001','0010111'],'R':[// The R (right) type of encoding'1110010','1100110','1101100','1000010','1011100','1001110','1010000','1000100','1001000','1110100'],'O':[// The O (odd) encoding for UPC-E'0001101','0011001','0010011','0111101','0100011','0110001','0101111','0111011','0110111','0001011'],'E':[// The E (even) encoding for UPC-E'0100111','0110011','0011011','0100001','0011101','0111001','0000101','0010001','0001001','0010111']};// Define the EAN-2 structurevarEAN2_STRUCTURE=exports.EAN2_STRUCTURE=['LL','LG','GL','GG'];// Define the EAN-5 structurevarEAN5_STRUCTURE=exports.EAN5_STRUCTURE=['GGLLL','GLGLL','GLLGL','GLLLG','LGGLL','LLGGL','LLLGG','LGLGL','LGLLG','LLGLG'];// Define the EAN-13 structurevarEAN13_STRUCTURE=exports.EAN13_STRUCTURE=['LLLLLL','LLGLGG','LLGGLG','LLGGGL','LGLLGG','LGGLLG','LGGGLL','LGLGLG','LGLGGL','LGGLGL'];/***/}),/* 3 *//***/(function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var_constants=__webpack_require__(2);// Encode data stringvarencode=functionencode(data,structure,separator){varencoded=data.split('').map(function(val,idx){return_constants.BINARIES[structure[idx]];}).map(function(val,idx){returnval?val[data[idx]]:'';});if(separator){varlast=data.length-1;encoded=encoded.map(function(val,idx){returnidx<last?val+separator:val;});}returnencoded.join('');};exports.default=encode;/***/}),/* 4 *//***/(function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var_createClass=function(){functiondefineProperties(target,props){for(vari=0;i<props.length;i++){vardescriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"indescriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}returnfunction(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);returnConstructor;};}();var_Barcode2=__webpack_require__(0);var_Barcode3=_interopRequireDefault(_Barcode2);function_interopRequireDefault(obj){returnobj&&obj.__esModule?obj:{default:obj};}function_classCallCheck(instance,Constructor){if(!(instanceinstanceofConstructor)){thrownewTypeError("Cannot call a class as a function");}}function_possibleConstructorReturn(self,call){if(!self){thrownewReferenceError("this hasn't been initialised - super() hasn't been called");}returncall&&(typeofcall==="object"||typeofcall==="function")?call:self;}function_inherits(subClass,superClass){if(typeofsuperClass!=="function"&&superClass!==null){thrownewTypeError("Super expression must either be null or a function, not "+typeofsuperClass);}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}// Encoding documentation// https://en.wikipedia.org/wiki/MSI_Barcode#Character_set_and_binary_lookupvarMSI=function(_Barcode){_inherits(MSI,_Barcode);functionMSI(data,options){_classCallCheck(this,MSI);return_possibleConstructorReturn(this,(MSI.__proto__||Object.getPrototypeOf(MSI)).call(this,data,options));}_createClass(MSI,[{key:"encode",value:functionencode(){// Start bitsvarret="110";for(vari=0;i<this.data.length;i++){// Convert the character to binary (always 4 binary digits)vardigit=parseInt(this.data[i]);varbin=digit.toString(2);bin=addZeroes(bin,4-bin.length);// Add 100 for every zero and 110 for every 1for(varb=0;b<bin.length;b++){ret+=bin[b]=="0"?"100":"110";}}// End bitsret+="1001";return{data:ret,text:this.text};}},{key:"valid",value:functionvalid(){returnthis.data.search(/^[0-9]+$/)!==-1;}}]);returnMSI;}(_Barcode3.default);functionaddZeroes(number,n){for(vari=0;i<n;i++){number="0"+number;}returnnumber;}exports.default=MSI;/***/}),/* 5 *//***/(function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var_extends=Object.assign||function(target){for(vari=1;i<arguments.length;i++){varsource=arguments[i];for(varkeyinsource){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}returntarget;};exports.default=function(old,replaceObj){return_extends({},old,replaceObj);};/***/}),/* 6 *//***/(function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var_createClass=function(){functiondefineProperties(target,props){for(vari=0;i<props.length;i++){vardescriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"indescriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}returnfunction(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);returnConstructor;};}();var_Barcode2=__webpack_require__(0);var_Barcode3=_interopRequireDefault(_Barcode2);var_constants=__webpack_require__(1);function_interopRequireDefault(obj){returnobj&&obj.__esModule?obj:{default:obj};}function_classCallCheck(instance,Constructor){if(!(instanceinstanceofConstructor)){thrownewTypeError("Cannot call a class as a function");}}function_possibleConstructorReturn(self,call){if(!self){thrownewReferenceError("this hasn't been initialised - super() hasn't been called");}returncall&&(typeofcall==="object"||typeofcall==="function")?call:self;}function_inherits(subClass,superClass){if(typeofsuperClass!=="function"&&superClass!==null){thrownewTypeError("Super expression must either be null or a function, not "+typeofsuperClass);}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}// This is the master class,// it does require the start code to be included in the stringvarCODE128=function(_Barcode){_inherits(CODE128,_Barcode);functionCODE128(data,options){_classCallCheck(this,CODE128);// Get array of ascii codes from datavar_this=_possibleConstructorReturn(this,(CODE128.__proto__||Object.getPrototypeOf(CODE128)).call(this,data.substring(1),options));_this.bytes=data.split('').map(function(char){returnchar.charCodeAt(0);});return_this;}_createClass(CODE128,[{key:'valid',value:functionvalid(){// ASCII value ranges 0-127, 200-211return(/^[\x00-\x7F\xC8-\xD3]+$/.test(this.data));}// The public encoding function},{key:'encode',value:functionencode(){varbytes=this.bytes;// Remove the start code from the bytes and set its indexvarstartIndex=bytes.shift()-105;// Get start set by indexvarstartSet=_constants.SET_BY_CODE[startIndex];if(startSet===undefined){thrownewRangeError('The encoding does not start with a start character.');}if(this.shouldEncodeAsEan128()===true){bytes.unshift(_constants.FNC1);}// Start encode with the right typevarencodingResult=CODE128.next(bytes,1,startSet);return{text:this.text===this.data?this.text.replace(/[^\x20-\x7E]/g,''):this.text,data:// Add the start bitsCODE128.getBar(startIndex)+// Add the encoded bitsencodingResult.result+// Add the checksumCODE128.getBar((encodingResult.checksum+startIndex)%_constants.MODULO)+// Add the end bitsCODE128.getBar(_constants.STOP)};}// GS1-128/EAN-128},{key:'shouldEncodeAsEan128',value:functionshouldEncodeAsEan128(){varisEAN128=this.options.ean128||false;if(typeofisEAN128==='string'){isEAN128=isEAN128.toLowerCase()==='true';}returnisEAN128;}// Get a bar symbol by index}],[{key:'getBar',value:functiongetBar(index){return_constants.BARS[index]?_constants.BARS[index].toString():'';}// Correct an index by a set and shift it from the bytes array},{key:'correctIndex',value:functioncorrectIndex(bytes,set){if(set===_constants.SET_A){varcharCode=bytes.shift();returncharCode<32?charCode+64:charCode-32;}elseif(set===_constants.SET_B){returnbytes.shift()-32;}else{return(bytes.shift()-48)*10+bytes.shift()-48;}}},{key:'next',value:functionnext(bytes,pos,set){if(!bytes.length){return{result:'',checksum:0};}varnextCode=void0,index=void0;// Special charactersif(bytes[0]>=200){index=bytes.shift()-105;varnextSet=_constants.SWAP[index];// Swap to other setif(nextSet!==undefined){nextCode=CODE128.next(bytes,pos+1,nextSet);}// Continue on current set but encode a special characterelse{// Shiftif((set===_constants.SET_A||set===_constants.SET_B)&&index===_constants.SHIFT){// Convert the next character so that is encoded correctlybytes[0]=set===_constants.SET_A?bytes[0]>95?bytes[0]-96:bytes[0]:bytes[0]<32?bytes[0]+96:bytes[0];}nextCode=CODE128.next(bytes,pos+1,set);}}// Continue encodingelse{index=CODE128.correctIndex(bytes,set);nextCode=CODE128.next(bytes,pos+1,set);}// Get the correct binary encoding and calculate the weightvarenc=CODE128.getBar(index);varweight=index*pos;return{result:enc+nextCode.result,checksum:weight+nextCode.checksum};}}]);returnCODE128;}(_Barcode3.default);exports.default=CODE128;/***/}),/* 7 *//***/(function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.mod10=mod10;exports.mod11=mod11;functionmod10(number){varsum=0;for(vari=0;i<number.length;i++){varn=parseInt(number[i]);if((i+number.length)%2===0){sum+=n;}else{sum+=n*2%10+Math.floor(n*2/10);}}return(10-sum%10)%10;}functionmod11(number){varsum=0;varweights=[2,3,4,5,6,7];for(vari=0;i<number.length;i++){varn=parseInt(number[number.length-1-i]);sum+=weights[i%weights.length]*n;}return(11-sum%11)%11;}/***/}),/* 8 *//***/(function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});function_classCallCheck(instance,Constructor){if(!(instanceinstanceofConstructor)){thrownewTypeError("Cannot call a class as a function");}}function_possibleConstructorReturn(self,call){if(!self){thrownewReferenceError("this hasn't been initialised - super() hasn't been called");}returncall&&(typeofcall==="object"||typeofcall==="function")?call:self;}function_inherits(subClass,superClass){if(typeofsuperClass!=="function"&&superClass!==null){thrownewTypeError("Super expression must either be null or a function, not "+typeofsuperClass);}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}varInvalidInputException=function(_Error){_inherits(InvalidInputException,_Error);functionInvalidInputException(symbology,input){_classCallCheck(this,InvalidInputException);var_this=_possibleConstructorReturn(this,(InvalidInputException.__proto__||Object.getPrototypeOf(InvalidInputException)).call(this));_this.name="InvalidInputException";_this.symbology=symbology;_this.input=input;_this.message='"'+_this.input+'" is not a valid input for '+_this.symbology;return_this;}returnInvalidInputException;}(Error);varInvalidElementException=function(_Error2){_inherits(InvalidElementException,_Error2);functionInvalidElementException(){_classCallCheck(this,InvalidElementException);var_this2=_possibleConstructorReturn(this,(InvalidElementException.__proto__||Object.getPrototypeOf(InvalidElementException)).call(this));_this2.name="InvalidElementException";_this2.message="Not supported type to render on";return_this2;}returnInvalidElementException;}(Error);varNoElementException=function(_Error3){_inherits(NoElementException,_Error3);functionNoElementException(){_classCallCheck(this,NoElementException);var_this3=_possibleConstructorReturn(this,(NoElementException.__proto__||Object.getPrototypeOf(NoElementException)).call(this));_this3.name="NoElementException";_this3.message="No element to render on.";return_this3;}returnNoElementException;}(Error);exports.InvalidInputException=InvalidInputException;exports.InvalidElementException=InvalidElementException;exports.NoElementException=NoElementException;/***/}),/* 9 *//***/(function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=optionsFromStrings;// Convert string to integers/booleans where it should befunctionoptionsFromStrings(options){varintOptions=["width","height","textMargin","fontSize","margin","marginTop","marginBottom","marginLeft","marginRight"];for(varintOptioninintOptions){if(intOptions.hasOwnProperty(intOption)){intOption=intOptions[intOption];if(typeofoptions[intOption]==="string"){options[intOption]=parseInt(options[intOption],10);}}}if(typeofoptions["displayValue"]==="string"){options["displayValue"]=options["displayValue"]!="false";}returnoptions;}/***/}),/* 10 *//***/(function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});vardefaults={width:2,height:100,format:"auto",displayValue:true,fontOptions:"",font:"monospace",text:undefined,textAlign:"center",textPosition:"bottom",textMargin:2,fontSize:20,background:"#ffffff",lineColor:"#000000",margin:10,marginTop:undefined,marginBottom:undefined,marginLeft:undefined,marginRight:undefined,valid:functionvalid(){}};exports.default=defaults;/***/}),/* 11 *//***/(function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var_createClass=function(){functiondefineProperties(target,props){for(vari=0;i<props.length;i++){vardescriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"indescriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}returnfunction(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);returnConstructor;};}();var_constants=__webpack_require__(2);var_encoder=__webpack_require__(3);var_encoder2=_interopRequireDefault(_encoder);var_Barcode2=__webpack_require__(0);var_Barcode3=_interopRequireDefault(_Barcode2);function_interopRequireDefault(obj){returnobj&&obj.__esModule?obj:{default:obj};}function_classCallCheck(instance,Constructor){if(!(instanceinstanceofConstructor)){thrownewTypeError("Cannot call a class as a function");}}function_possibleConstructorReturn(self,call){if(!self){thrownewReferenceError("this hasn't been initialised - super() hasn't been called");}returncall&&(typeofcall==="object"||typeofcall==="function")?call:self;}function_inherits(subClass,superClass){if(typeofsuperClass!=="function"&&superClass!==null){thrownewTypeError("Super expression must either be null or a function, not "+typeofsuperClass);}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}// Base class for EAN8 & EAN13varEAN=function(_Barcode){_inherits(EAN,_Barcode);functionEAN(data,options){_classCallCheck(this,EAN);// Make sure the font is not bigger than the space between the guard barsvar_this=_possibleConstructorReturn(this,(EAN.__proto__||Object.getPrototypeOf(EAN)).call(this,data,options));_this.fontSize=!options.flat&&options.fontSize>options.width*10?options.width*10:options.fontSize;// Make the guard bars go down half the way of the text_this.guardHeight=options.height+_this.fontSize/2+options.textMargin;return_this;}_createClass(EAN,[{key:'encode',value:functionencode(){returnthis.options.flat?this.encodeFlat():this.encodeGuarded();}},{key:'leftText',value:functionleftText(from,to){returnthis.text.substr(from,to);}},{key:'leftEncode',value:functionleftEncode(data,structure){return(0,_encoder2.default)(data,structure);}},{key:'rightText',value:functionrightText(from,to){returnthis.text.substr(from,to);}},{key:'rightEncode',value:functionrightEncode(data,structure){return(0,_encoder2.default)(data,structure);}},{key:'encodeGuarded',value:functionencodeGuarded(){vartextOptions={fontSize:this.fontSize};varguardOptions={height:this.guardHeight};return[{data:_constants.SIDE_BIN,options:guardOptions},{data:this.leftEncode(),text:this.leftText(),options:textOptions},{data:_constants.MIDDLE_BIN,options:guardOptions},{data:this.rightEncode(),text:this.rightText(),options:textOptions},{data:_constants.SIDE_BIN,options:guardOptions}];}},{key:'encodeFlat',value:functionencodeFlat(){vardata=[_constants.SIDE_BIN,this.leftEncode(),_constants.MIDDLE_BIN,this.rightEncode(),_constants.SIDE_BIN];return{data:data.join(''),text:this.text};}}]);returnEAN;}(_Barcode3.default);exports.default=EAN;/***/}),/* 12 *//***/(function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var_createClass=function(){functiondefineProperties(target,props){for(vari=0;i<props.length;i++){vardescriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"indescriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}returnfunction(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);returnConstructor;};}();exports.checksum=checksum;var_encoder=__webpack_require__(3);var_encoder2=_interopRequireDefault(_encoder);var_Barcode2=__webpack_require__(0);var_Barcode3=_interopRequireDefault(_Barcode2);function_interopRequireDefault(obj){returnobj&&obj.__esModule?obj:{default:obj};}function_classCallCheck(instance,Constructor){if(!(instanceinstanceofConstructor)){thrownewTypeError("Cannot call a class as a function");}}function_possibleConstructorReturn(self,call){if(!self){thrownewReferenceError("this hasn't been initialised - super() hasn't been called");}returncall&&(typeofcall==="object"||typeofcall==="function")?call:self;}function_inherits(subClass,superClass){if(typeofsuperClass!=="function"&&superClass!==null){thrownewTypeError("Super expression must either be null or a function, not "+typeofsuperClass);}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}// Encoding documentation:// https://en.wikipedia.org/wiki/Universal_Product_Code#EncodingvarUPC=function(_Barcode){_inherits(UPC,_Barcode);functionUPC(data,options){_classCallCheck(this,UPC);// Add checksum if it does not existif(data.search(/^[0-9]{11}$/)!==-1){data+=checksum(data);}var_this=_possibleConstructorReturn(this,(UPC.__proto__||Object.getPrototypeOf(UPC)).call(this,data,options));_this.displayValue=options.displayValue;// Make sure the font is not bigger than the space between the guard barsif(options.fontSize>options.width*10){_this.fontSize=options.width*10;}else{_this.fontSize=options.fontSize;}// Make the guard bars go down half the way of the text_this.guardHeight=options.height+_this.fontSize/2+options.textMargin;return_this;}_createClass(UPC,[{key:"valid",value:functionvalid(){returnthis.data.search(/^[0-9]{12}$/)!==-1&&this.data[11]==checksum(this.data);}},{key:"encode",value:functionencode(){if(this.options.flat){returnthis.flatEncoding();}else{returnthis.guardedEncoding();}}},{key:"flatEncoding",value:functionflatEncoding(){varresult="";result+="101";result+=(0,_encoder2.default)(this.data.substr(0,6),"LLLLLL");result+="01010";result+=(0,_encoder2.default)(this.data.substr(6,6),"RRRRRR");result+="101";return{data:result,text:this.text};}},{key:"guardedEncoding",value:functionguardedEncoding(){varresult=[];// Add the first digitif(this.displayValue){result.push({data:"00000000",text:this.text.substr(0,1),options:{textAlign:"left",fontSize:this.fontSize}});}// Add the guard barsresult.push({data:"101"+(0,_encoder2.default)(this.data[0],"L"),options:{height:this.guardHeight}});// Add the left sideresult.push({data:(0,_encoder2.default)(this.data.substr(1,5),"LLLLL"),text:this.text.substr(1,5),options:{fontSize:this.fontSize}});// Add the middle bitsresult.push({data:"01010",options:{height:this.guardHeight}});// Add the right sideresult.push({data:(0,_encoder2.default)(this.data.substr(6,5),"RRRRR"),text:this.text.substr(6,5),options:{fontSize:this.fontSize}});// Add the end bitsresult.push({data:(0,_encoder2.default)(this.data[11],"R")+"101",options:{height:this.guardHeight}});// Add the last digitif(this.displayValue){result.push({data:"00000000",text:this.text.substr(11,1),options:{textAlign:"right",fontSize:this.fontSize}});}returnresult;}}]);returnUPC;}(_Barcode3.default);// Calulate the checksum digit// https://en.wikipedia.org/wiki/International_Article_Number_(EAN)#Calculation_of_checksum_digitfunctionchecksum(number){varresult=0;vari;for(i=1;i<11;i+=2){result+=parseInt(number[i]);}for(i=0;i<11;i+=2){result+=parseInt(number[i])*3;}return(10-result%10)%10;}exports.default=UPC;/***/}),/* 13 *//***/(function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var_createClass=function(){functiondefineProperties(target,props){for(vari=0;i<props.length;i++){vardescriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"indescriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}returnfunction(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);returnConstructor;};}();var_constants=__webpack_require__(36);var_Barcode2=__webpack_require__(0);var_Barcode3=_interopRequireDefault(_Barcode2);function_interopRequireDefault(obj){returnobj&&obj.__esModule?obj:{default:obj};}function_classCallCheck(instance,Constructor){if(!(instanceinstanceofConstructor)){thrownewTypeError("Cannot call a class as a function");}}function_possibleConstructorReturn(self,call){if(!self){thrownewReferenceError("this hasn't been initialised - super() hasn't been called");}returncall&&(typeofcall==="object"||typeofcall==="function")?call:self;}function_inherits(subClass,superClass){if(typeofsuperClass!=="function"&&superClass!==null){thrownewTypeError("Super expression must either be null or a function, not "+typeofsuperClass);}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}varITF=function(_Barcode){_inherits(ITF,_Barcode);functionITF(){_classCallCheck(this,ITF);return_possibleConstructorReturn(this,(ITF.__proto__||Object.getPrototypeOf(ITF)).apply(this,arguments));}_createClass(ITF,[{key:'valid',value:functionvalid(){returnthis.data.search(/^([0-9]{2})+$/)!==-1;}},{key:'encode',value:functionencode(){var_this2=this;// Calculate all the digit pairsvarencoded=this.data.match(/.{2}/g).map(function(pair){return_this2.encodePair(pair);}).join('');return{data:_constants.START_BIN+encoded+_constants.END_BIN,text:this.text};}// Calculate the data of a number pair},{key:'encodePair',value:functionencodePair(pair){varsecond=_constants.BINARIES[pair[1]];return_constants.BINARIES[pair[0]].split('').map(function(first,idx){return(first==='1'?'111':'1')+(second[idx]==='1'?'000':'0');}).join('');}}]);returnITF;}(_Barcode3.default);exports.default=ITF;/***/}),/* 14 *//***/(function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.getTotalWidthOfEncodings=exports.calculateEncodingAttributes=exports.getBarcodePadding=exports.getEncodingHeight=exports.getMaximumHeightOfEncodings=undefined;var_merge=__webpack_require__(5);var_merge2=_interopRequireDefault(_merge);function_interopRequireDefault(obj){returnobj&&obj.__esModule?obj:{default:obj};}functiongetEncodingHeight(encoding,options){returnoptions.height+(options.displayValue&&encoding.text.length>0?options.fontSize+options.textMargin:0)+options.marginTop+options.marginBottom;}functiongetBarcodePadding(textWidth,barcodeWidth,options){if(options.displayValue&&barcodeWidth<textWidth){if(options.textAlign=="center"){returnMath.floor((textWidth-barcodeWidth)/2);}elseif(options.textAlign=="left"){return0;}elseif(options.textAlign=="right"){returnMath.floor(textWidth-barcodeWidth);}}return0;}functioncalculateEncodingAttributes(encodings,barcodeOptions,context){for(vari=0;i<encodings.length;i++){varencoding=encodings[i];varoptions=(0,_merge2.default)(barcodeOptions,encoding.options);// Calculate the width of the encodingvartextWidth;if(options.displayValue){textWidth=messureText(encoding.text,options,context);}else{textWidth=0;}varbarcodeWidth=encoding.data.length*options.width;encoding.width=Math.ceil(Math.max(textWidth,barcodeWidth));encoding.height=getEncodingHeight(encoding,options);encoding.barcodePadding=getBarcodePadding(textWidth,barcodeWidth,options);}}functiongetTotalWidthOfEncodings(encodings){vartotalWidth=0;for(vari=0;i<encodings.length;i++){totalWidth+=encodings[i].width;}returntotalWidth;}functiongetMaximumHeightOfEncodings(encodings){varmaxHeight=0;for(vari=0;i<encodings.length;i++){if(encodings[i].height>maxHeight){maxHeight=encodings[i].height;}}returnmaxHeight;}functionmessureText(string,options,context){varctx;if(context){ctx=context;}elseif(typeofdocument!=="undefined"){ctx=document.createElement("canvas").getContext("2d");}else{// If the text cannot be messured we will return 0.// This will make some barcode with big text render incorrectlyreturn0;}ctx.font=options.fontOptions+" "+options.fontSize+"px "+options.font;// Calculate the width of the encodingvarsize=ctx.measureText(string).width;returnsize;}exports.getMaximumHeightOfEncodings=getMaximumHeightOfEncodings;exports.getEncodingHeight=getEncodingHeight;exports.getBarcodePadding=getBarcodePadding;exports.calculateEncodingAttributes=calculateEncodingAttributes;exports.getTotalWidthOfEncodings=getTotalWidthOfEncodings;/***/}),/* 15 *//***/(function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var_CODE=__webpack_require__(27);var_CODE2=__webpack_require__(26);var_EAN_UPC=__webpack_require__(33);var_ITF=__webpack_require__(37);var_MSI=__webpack_require__(42);var_pharmacode=__webpack_require__(44);var_codabar=__webpack_require__(43);var_GenericBarcode=__webpack_require__(34);exports.default={CODE39:_CODE.CODE39,CODE128:_CODE2.CODE128,CODE128A:_CODE2.CODE128A,CODE128B:_CODE2.CODE128B,CODE128C:_CODE2.CODE128C,EAN13:_EAN_UPC.EAN13,EAN8:_EAN_UPC.EAN8,EAN5:_EAN_UPC.EAN5,EAN2:_EAN_UPC.EAN2,UPC:_EAN_UPC.UPC,UPCE:_EAN_UPC.UPCE,ITF14:_ITF.ITF14,ITF:_ITF.ITF,MSI:_MSI.MSI,MSI10:_MSI.MSI10,MSI11:_MSI.MSI11,MSI1010:_MSI.MSI1010,MSI1110:_MSI.MSI1110,pharmacode:_pharmacode.pharmacode,codabar:_codabar.codabar,GenericBarcode:_GenericBarcode.GenericBarcode};/***/}),/* 16 *//***/(function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var_createClass=function(){functiondefineProperties(target,props){for(vari=0;i<props.length;i++){vardescriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"indescriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}returnfunction(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);returnConstructor;};}();function_classCallCheck(instance,Constructor){if(!(instanceinstanceofConstructor)){thrownewTypeError("Cannot call a class as a function");}}/*eslint no-console: 0 */varErrorHandler=function(){functionErrorHandler(api){_classCallCheck(this,ErrorHandler);this.api=api;}_createClass(ErrorHandler,[{key:"handleCatch",value:functionhandleCatch(e){// If babel supported extending of Error in a correct way instanceof would be used hereif(e.name==="InvalidInputException"){if(this.api._options.valid!==this.api._defaults.valid){this.api._options.valid(false);}else{throwe.message;}}else{throwe;}this.api.render=function(){};}},{key:"wrapBarcodeCall",value:functionwrapBarcodeCall(func){try{varresult=func.apply(undefined,arguments);this.api._options.valid(true);returnresult;}catch(e){this.handleCatch(e);returnthis.api;}}}]);returnErrorHandler;}();exports.default=ErrorHandler;/***/}),/* 17 *//***/(function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=fixOptions;functionfixOptions(options){// Fix the marginsoptions.marginTop=options.marginTop||options.margin;options.marginBottom=options.marginBottom||options.margin;options.marginRight=options.marginRight||options.margin;options.marginLeft=options.marginLeft||options.margin;returnoptions;}/***/}),/* 18 *//***/(function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var_typeof=typeofSymbol==="function"&&typeofSymbol.iterator==="symbol"?function(obj){returntypeofobj;}:function(obj){returnobj&&typeofSymbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeofobj;};/* global HTMLImageElement *//* global HTMLCanvasElement *//* global SVGElement */var_getOptionsFromElement=__webpack_require__(45);var_getOptionsFromElement2=_interopRequireDefault(_getOptionsFromElement);var_renderers=__webpack_require__(47);var_renderers2=_interopRequireDefault(_renderers);var_exceptions=__webpack_require__(8);function_interopRequireDefault(obj){returnobj&&obj.__esModule?obj:{default:obj};}// Takes an element and returns an object with information about how// it should be rendered// This could also return an array with these objects// {// element: The element that the renderer should draw on// renderer: The name of the renderer// afterRender (optional): If something has to done after the renderer// completed, calls afterRender (function)// options (optional): Options that can be defined in the element// }functiongetRenderProperties(element){// If the element is a string, query select call againif(typeofelement==="string"){returnquerySelectedRenderProperties(element);}// If element is array. Recursivly call with every object in the arrayelseif(Array.isArray(element)){varreturnArray=[];for(vari=0;i<element.length;i++){returnArray.push(getRenderProperties(element[i]));}returnreturnArray;}// If element, render on canvas and set the uri as srcelseif(typeofHTMLCanvasElement!=='undefined'&&elementinstanceofHTMLImageElement){returnnewCanvasRenderProperties(element);}// If SVGelseif(element&&element.nodeName==='svg'||typeofSVGElement!=='undefined'&&elementinstanceofSVGElement){return{element:element,options:(0,_getOptionsFromElement2.default)(element),renderer:_renderers2.default.SVGRenderer};}// If canvas (in browser)elseif(typeofHTMLCanvasElement!=='undefined'&&elementinstanceofHTMLCanvasElement){return{element:element,options:(0,_getOptionsFromElement2.default)(element),renderer:_renderers2.default.CanvasRenderer};}// If canvas (in node)elseif(element&&element.getContext){return{element:element,renderer:_renderers2.default.CanvasRenderer};}elseif(element&&(typeofelement==="undefined"?"undefined":_typeof(element))==='object'&&!element.nodeName){return{element:element,renderer:_renderers2.default.ObjectRenderer};}else{thrownew_exceptions.InvalidElementException();}}functionquerySelectedRenderProperties(string){varselector=document.querySelectorAll(string);if(selector.length===0){returnundefined;}else{varreturnArray=[];for(vari=0;i<selector.length;i++){returnArray.push(getRenderProperties(selector[i]));}returnreturnArray;}}functionnewCanvasRenderProperties(imgElement){varcanvas=document.createElement('canvas');return{element:canvas,options:(0,_getOptionsFromElement2.default)(imgElement),renderer:_renderers2.default.CanvasRenderer,afterRender:functionafterRender(){imgElement.setAttribute("src",canvas.toDataURL());}};}exports.default=getRenderProperties;/***/}),/* 19 *//***/(function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=linearizeEncodings;// Encodings can be nestled like [[1-1, 1-2], 2, [3-1, 3-2]// Convert to [1-1, 1-2, 2, 3-1, 3-2]functionlinearizeEncodings(encodings){varlinearEncodings=[];functionnextLevel(encoded){if(Array.isArray(encoded)){for(vari=0;i<encoded.length;i++){nextLevel(encoded[i]);}}else{encoded.text=encoded.text||"";encoded.data=encoded.data||"";linearEncodings.push(encoded);}}nextLevel(encodings);returnlinearEncodings;}/***/}),/* 20 *//***/(function(module,exports,__webpack_require__){"use strict";var_barcodes=__webpack_require__(15);var_barcodes2=_interopRequireDefault(_barcodes);var_merge=__webpack_require__(5);var_merge2=_interopRequireDefault(_merge);var_linearizeEncodings=__webpack_require__(19);var_linearizeEncodings2=_interopRequireDefault(_linearizeEncodings);var_fixOptions=__webpack_require__(17);var_fixOptions2=_interopRequireDefault(_fixOptions);var_getRenderProperties=__webpack_require__(18);var_getRenderProperties2=_interopRequireDefault(_getRenderProperties);var_optionsFromStrings=__webpack_require__(9);var_optionsFromStrings2=_interopRequireDefault(_optionsFromStrings);var_ErrorHandler=__webpack_require__(16);var_ErrorHandler2=_interopRequireDefault(_ErrorHandler);var_exceptions=__webpack_require__(8);var_defaults=__webpack_require__(10);var_defaults2=_interopRequireDefault(_defaults);function_interopRequireDefault(obj){returnobj&&obj.__esModule?obj:{default:obj};}// The protype of the object returned from the JsBarcode() call// Help functionsvarAPI=functionAPI(){};// The first call of the library API// Will return an object with all barcodes calls and the data that is used// by the renderers// Default values// Exceptions// Import all the barcodesvarJsBarcode=functionJsBarcode(element,text,options){varapi=newAPI();if(typeofelement==="undefined"){throwError("No element to render on was provided.");}// Variables that will be pased through the API callsapi._renderProperties=(0,_getRenderProperties2.default)(element);api._encodings=[];api._options=_defaults2.default;api._errorHandler=new_ErrorHandler2.default(api);// If text is set, use the simple syntax (render the barcode directly)if(typeoftext!=="undefined"){options=options||{};if(!options.format){options.format=autoSelectBarcode();}api.options(options)[options.format](text,options).render();}returnapi;};// To make tests work TODO: removeJsBarcode.getModule=function(name){return_barcodes2.default[name];};// Register all barcodesfor(varnamein_barcodes2.default){if(_barcodes2.default.hasOwnProperty(name)){// Security check if the propery is a prototype propertyregisterBarcode(_barcodes2.default,name);}}functionregisterBarcode(barcodes,name){API.prototype[name]=API.prototype[name.toUpperCase()]=API.prototype[name.toLowerCase()]=function(text,options){varapi=this;returnapi._errorHandler.wrapBarcodeCall(function(){// Ensure text is options.textoptions.text=typeofoptions.text==='undefined'?undefined:''+options.text;varnewOptions=(0,_merge2.default)(api._options,options);newOptions=(0,_optionsFromStrings2.default)(newOptions);varEncoder=barcodes[name];varencoded=encode(text,Encoder,newOptions);api._encodings.push(encoded);returnapi;});};}// encode() handles the Encoder call and builds the binary string to be renderedfunctionencode(text,Encoder,options){// Ensure that text is a stringtext=""+text;varencoder=newEncoder(text,options);// If the input is not valid for the encoder, throw error.// If the valid callback option is set, call it instead of throwing errorif(!encoder.valid()){thrownew_exceptions.InvalidInputException(encoder.constructor.name,text);}// Make a request for the binary data (and other infromation) that should be renderedvarencoded=encoder.encode();// Encodings can be nestled like [[1-1, 1-2], 2, [3-1, 3-2]// Convert to [1-1, 1-2, 2, 3-1, 3-2]encoded=(0,_linearizeEncodings2.default)(encoded);// Mergefor(vari=0;i<encoded.length;i++){encoded[i].options=(0,_merge2.default)(options,encoded[i].options);}returnencoded;}functionautoSelectBarcode(){// If CODE128 exists. Use itif(_barcodes2.default["CODE128"]){return"CODE128";}// Else, take the first (probably only) barcodereturnObject.keys(_barcodes2.default)[0];}// Sets global encoder options// Added to the api by the JsBarcode functionAPI.prototype.options=function(options){this._options=(0,_merge2.default)(this._options,options);returnthis;};// Will create a blank space (usually in between barcodes)API.prototype.blank=function(size){varzeroes=newArray(size+1).join("0");this._encodings.push({data:zeroes});returnthis;};// Initialize JsBarcode on all HTML elements defined.API.prototype.init=function(){// Should do nothing if no elements where foundif(!this._renderProperties){return;}// Make sure renderProperies is an arrayif(!Array.isArray(this._renderProperties)){this._renderProperties=[this._renderProperties];}varrenderProperty;for(variinthis._renderProperties){renderProperty=this._renderProperties[i];varoptions=(0,_merge2.default)(this._options,renderProperty.options);if(options.format=="auto"){options.format=autoSelectBarcode();}this._errorHandler.wrapBarcodeCall(function(){vartext=options.value;varEncoder=_barcodes2.default[options.format.toUpperCase()];varencoded=encode(text,Encoder,options);render(renderProperty,encoded,options);});}};// The render API call. Calls the real render function.API.prototype.render=function(){if(!this._renderProperties){thrownew_exceptions.NoElementException();}if(Array.isArray(this._renderProperties)){for(vari=0;i<this._renderProperties.length;i++){render(this._renderProperties[i],this._encodings,this._options);}}else{render(this._renderProperties,this._encodings,this._options);}returnthis;};API.prototype._defaults=_defaults2.default;// Prepares the encodings and calls the rendererfunctionrender(renderProperties,encodings,options){encodings=(0,_linearizeEncodings2.default)(encodings);for(vari=0;i<encodings.length;i++){encodings[i].options=(0,_merge2.default)(options,encodings[i].options);(0,_fixOptions2.default)(encodings[i].options);}(0,_fixOptions2.default)(options);varRenderer=renderProperties.renderer;varrenderer=newRenderer(renderProperties.element,encodings,options);renderer.render();if(renderProperties.afterRender){renderProperties.afterRender();}}// Export to browserif(typeofwindow!=="undefined"){window.JsBarcode=JsBarcode;}// Export to jQuery/*global jQuery */if(typeofjQuery!=='undefined'){jQuery.fn.JsBarcode=function(content,options){varelementArray=[];jQuery(this).each(function(){elementArray.push(this);});returnJsBarcode(elementArray,content,options);};}// Export to commonJSmodule.exports=JsBarcode;/***/}),/* 21 *//***/(function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var_createClass=function(){functiondefineProperties(target,props){for(vari=0;i<props.length;i++){vardescriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"indescriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}returnfunction(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);returnConstructor;};}();var_CODE2=__webpack_require__(6);var_CODE3=_interopRequireDefault(_CODE2);var_constants=__webpack_require__(1);function_interopRequireDefault(obj){returnobj&&obj.__esModule?obj:{default:obj};}function_classCallCheck(instance,Constructor){if(!(instanceinstanceofConstructor)){thrownewTypeError("Cannot call a class as a function");}}function_possibleConstructorReturn(self,call){if(!self){thrownewReferenceError("this hasn't been initialised - super() hasn't been called");}returncall&&(typeofcall==="object"||typeofcall==="function")?call:self;}function_inherits(subClass,superClass){if(typeofsuperClass!=="function"&&superClass!==null){thrownewTypeError("Super expression must either be null or a function, not "+typeofsuperClass);}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}varCODE128A=function(_CODE){_inherits(CODE128A,_CODE);functionCODE128A(string,options){_classCallCheck(this,CODE128A);return_possibleConstructorReturn(this,(CODE128A.__proto__||Object.getPrototypeOf(CODE128A)).call(this,_constants.A_START_CHAR+string,options));}_createClass(CODE128A,[{key:'valid',value:functionvalid(){returnnewRegExp('^'+_constants.A_CHARS+'+$').test(this.data);}}]);returnCODE128A;}(_CODE3.default);exports.default=CODE128A;/***/}),/* 22 *//***/(function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var_createClass=function(){functiondefineProperties(target,props){for(vari=0;i<props.length;i++){vardescriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"indescriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}returnfunction(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);returnConstructor;};}();var_CODE2=__webpack_require__(6);var_CODE3=_interopRequireDefault(_CODE2);var_constants=__webpack_require__(1);function_interopRequireDefault(obj){returnobj&&obj.__esModule?obj:{default:obj};}function_classCallCheck(instance,Constructor){if(!(instanceinstanceofConstructor)){thrownewTypeError("Cannot call a class as a function");}}function_possibleConstructorReturn(self,call){if(!self){thrownewReferenceError("this hasn't been initialised - super() hasn't been called");}returncall&&(typeofcall==="object"||typeofcall==="function")?call:self;}function_inherits(subClass,superClass){if(typeofsuperClass!=="function"&&superClass!==null){thrownewTypeError("Super expression must either be null or a function, not "+typeofsuperClass);}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}varCODE128B=function(_CODE){_inherits(CODE128B,_CODE);functionCODE128B(string,options){_classCallCheck(this,CODE128B);return_possibleConstructorReturn(this,(CODE128B.__proto__||Object.getPrototypeOf(CODE128B)).call(this,_constants.B_START_CHAR+string,options));}_createClass(CODE128B,[{key:'valid',value:functionvalid(){returnnewRegExp('^'+_constants.B_CHARS+'+$').test(this.data);}}]);returnCODE128B;}(_CODE3.default);exports.default=CODE128B;/***/}),/* 23 *//***/(function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var_createClass=function(){functiondefineProperties(target,props){for(vari=0;i<props.length;i++){vardescriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"indescriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}returnfunction(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);returnConstructor;};}();var_CODE2=__webpack_require__(6);var_CODE3=_interopRequireDefault(_CODE2);var_constants=__webpack_require__(1);function_interopRequireDefault(obj){returnobj&&obj.__esModule?obj:{default:obj};}function_classCallCheck(instance,Constructor){if(!(instanceinstanceofConstructor)){thrownewTypeError("Cannot call a class as a function");}}function_possibleConstructorReturn(self,call){if(!self){thrownewReferenceError("this hasn't been initialised - super() hasn't been called");}returncall&&(typeofcall==="object"||typeofcall==="function")?call:self;}function_inherits(subClass,superClass){if(typeofsuperClass!=="function"&&superClass!==null){thrownewTypeError("Super expression must either be null or a function, not "+typeofsuperClass);}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}varCODE128C=function(_CODE){_inherits(CODE128C,_CODE);functionCODE128C(string,options){_classCallCheck(this,CODE128C);return_possibleConstructorReturn(this,(CODE128C.__proto__||Object.getPrototypeOf(CODE128C)).call(this,_constants.C_START_CHAR+string,options));}_createClass(CODE128C,[{key:'valid',value:functionvalid(){returnnewRegExp('^'+_constants.C_CHARS+'+$').test(this.data);}}]);returnCODE128C;}(_CODE3.default);exports.default=CODE128C;/***/}),/* 24 *//***/(function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var_CODE2=__webpack_require__(6);var_CODE3=_interopRequireDefault(_CODE2);var_auto=__webpack_require__(25);var_auto2=_interopRequireDefault(_auto);function_interopRequireDefault(obj){returnobj&&obj.__esModule?obj:{default:obj};}function_classCallCheck(instance,Constructor){if(!(instanceinstanceofConstructor)){thrownewTypeError("Cannot call a class as a function");}}function_possibleConstructorReturn(self,call){if(!self){thrownewReferenceError("this hasn't been initialised - super() hasn't been called");}returncall&&(typeofcall==="object"||typeofcall==="function")?call:self;}function_inherits(subClass,superClass){if(typeofsuperClass!=="function"&&superClass!==null){thrownewTypeError("Super expression must either be null or a function, not "+typeofsuperClass);}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}varCODE128AUTO=function(_CODE){_inherits(CODE128AUTO,_CODE);functionCODE128AUTO(data,options){_classCallCheck(this,CODE128AUTO);// ASCII value ranges 0-127, 200-211if(/^[\x00-\x7F\xC8-\xD3]+$/.test(data)){var_this=_possibleConstructorReturn(this,(CODE128AUTO.__proto__||Object.getPrototypeOf(CODE128AUTO)).call(this,(0,_auto2.default)(data),options));}else{var_this=_possibleConstructorReturn(this,(CODE128AUTO.__proto__||Object.getPrototypeOf(CODE128AUTO)).call(this,data,options));}return_possibleConstructorReturn(_this);}returnCODE128AUTO;}(_CODE3.default);exports.default=CODE128AUTO;/***/}),/* 25 *//***/(function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var_constants=__webpack_require__(1);// Match Set functionsvarmatchSetALength=functionmatchSetALength(string){returnstring.match(newRegExp('^'+_constants.A_CHARS+'*'))[0].length;};varmatchSetBLength=functionmatchSetBLength(string){returnstring.match(newRegExp('^'+_constants.B_CHARS+'*'))[0].length;};varmatchSetC=functionmatchSetC(string){returnstring.match(newRegExp('^'+_constants.C_CHARS+'*'))[0];};// CODE128A or CODE128BfunctionautoSelectFromAB(string,isA){varranges=isA?_constants.A_CHARS:_constants.B_CHARS;varuntilC=string.match(newRegExp('^('+ranges+'+?)(([0-9]{2}){2,})([^0-9]|$)'));if(untilC){returnuntilC[1]+String.fromCharCode(204)+autoSelectFromC(string.substring(untilC[1].length));}varchars=string.match(newRegExp('^'+ranges+'+'))[0];if(chars.length===string.length){returnstring;}returnchars+String.fromCharCode(isA?205:206)+autoSelectFromAB(string.substring(chars.length),!isA);}// CODE128CfunctionautoSelectFromC(string){varcMatch=matchSetC(string);varlength=cMatch.length;if(length===string.length){returnstring;}string=string.substring(length);// Select A/B depending on the longest matchvarisA=matchSetALength(string)>=matchSetBLength(string);returncMatch+String.fromCharCode(isA?206:205)+autoSelectFromAB(string,isA);}// Detect Code Set (A, B or C) and format the stringexports.default=function(string){varnewString=void0;varcLength=matchSetC(string).length;// Select 128C if the string start with enough digitsif(cLength>=2){newString=_constants.C_START_CHAR+autoSelectFromC(string);}else{// Select A/B depending on the longest matchvarisA=matchSetALength(string)>matchSetBLength(string);newString=(isA?_constants.A_START_CHAR:_constants.B_START_CHAR)+autoSelectFromAB(string,isA);}returnnewString.replace(/[\xCD\xCE]([^])[\xCD\xCE]/,// Any sequence between 205 and 206 charactersfunction(match,char){returnString.fromCharCode(203)+char;});};/***/}),/* 26 *//***/(function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.CODE128C=exports.CODE128B=exports.CODE128A=exports.CODE128=undefined;var_CODE128_AUTO=__webpack_require__(24);var_CODE128_AUTO2=_interopRequireDefault(_CODE128_AUTO);var_CODE128A=__webpack_require__(21);var_CODE128A2=_interopRequireDefault(_CODE128A);var_CODE128B=__webpack_require__(22);var_CODE128B2=_interopRequireDefault(_CODE128B);var_CODE128C=__webpack_require__(23);var_CODE128C2=_interopRequireDefault(_CODE128C);function_interopRequireDefault(obj){returnobj&&obj.__esModule?obj:{default:obj};}exports.CODE128=_CODE128_AUTO2.default;exports.CODE128A=_CODE128A2.default;exports.CODE128B=_CODE128B2.default;exports.CODE128C=_CODE128C2.default;/***/}),/* 27 *//***/(function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.CODE39=undefined;var_createClass=function(){functiondefineProperties(target,props){for(vari=0;i<props.length;i++){vardescriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"indescriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}returnfunction(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);returnConstructor;};}();var_Barcode2=__webpack_require__(0);var_Barcode3=_interopRequireDefault(_Barcode2);function_interopRequireDefault(obj){returnobj&&obj.__esModule?obj:{default:obj};}function_classCallCheck(instance,Constructor){if(!(instanceinstanceofConstructor)){thrownewTypeError("Cannot call a class as a function");}}function_possibleConstructorReturn(self,call){if(!self){thrownewReferenceError("this hasn't been initialised - super() hasn't been called");}returncall&&(typeofcall==="object"||typeofcall==="function")?call:self;}function_inherits(subClass,superClass){if(typeofsuperClass!=="function"&&superClass!==null){thrownewTypeError("Super expression must either be null or a function, not "+typeofsuperClass);}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}// Encoding documentation:// https://en.wikipedia.org/wiki/Code_39#EncodingvarCODE39=function(_Barcode){_inherits(CODE39,_Barcode);functionCODE39(data,options){_classCallCheck(this,CODE39);data=data.toUpperCase();// Calculate mod43 checksum if enabledif(options.mod43){data+=getCharacter(mod43checksum(data));}return_possibleConstructorReturn(this,(CODE39.__proto__||Object.getPrototypeOf(CODE39)).call(this,data,options));}_createClass(CODE39,[{key:"encode",value:functionencode(){// First character is always a *varresult=getEncoding("*");// Take every character and add the binary representation to the resultfor(vari=0;i<this.data.length;i++){result+=getEncoding(this.data[i])+"0";}// Last character is always a *result+=getEncoding("*");return{data:result,text:this.text};}},{key:"valid",value:functionvalid(){returnthis.data.search(/^[0-9A-Z\-\.\ \$\/\+\%]+$/)!==-1;}}]);returnCODE39;}(_Barcode3.default);// All characters. The position in the array is the (checksum) valuevarcharacters=["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","-","."," ","$","/","+","%","*"];// The decimal representation of the characters, is converted to the// corresponding binary with the getEncoding functionvarencodings=[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];// Get the binary representation of a character by converting the encodings// from decimal to binaryfunctiongetEncoding(character){returngetBinary(characterValue(character));}functiongetBinary(characterValue){returnencodings[characterValue].toString(2);}functiongetCharacter(characterValue){returncharacters[characterValue];}functioncharacterValue(character){returncharacters.indexOf(character);}functionmod43checksum(data){varchecksum=0;for(vari=0;i<data.length;i++){checksum+=characterValue(data[i]);}checksum=checksum%43;returnchecksum;}exports.CODE39=CODE39;/***/}),/* 28 *//***/(function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var_createClass=function(){functiondefineProperties(target,props){for(vari=0;i<props.length;i++){vardescriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"indescriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}returnfunction(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);returnConstructor;};}();var_get=functionget(object,property,receiver){if(object===null)object=Function.prototype;vardesc=Object.getOwnPropertyDescriptor(object,property);if(desc===undefined){varparent=Object.getPrototypeOf(object);if(parent===null){returnundefined;}else{returnget(parent,property,receiver);}}elseif("value"indesc){returndesc.value;}else{vargetter=desc.get;if(getter===undefined){returnundefined;}returngetter.call(receiver);}};var_constants=__webpack_require__(2);var_EAN2=__webpack_require__(11);var_EAN3=_interopRequireDefault(_EAN2);function_interopRequireDefault(obj){returnobj&&obj.__esModule?obj:{default:obj};}function_classCallCheck(instance,Constructor){if(!(instanceinstanceofConstructor)){thrownewTypeError("Cannot call a class as a function");}}function_possibleConstructorReturn(self,call){if(!self){thrownewReferenceError("this hasn't been initialised - super() hasn't been called");}returncall&&(typeofcall==="object"||typeofcall==="function")?call:self;}function_inherits(subClass,superClass){if(typeofsuperClass!=="function"&&superClass!==null){thrownewTypeError("Super expression must either be null or a function, not "+typeofsuperClass);}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}// Encoding documentation:// https://en.wikipedia.org/wiki/International_Article_Number_(EAN)#Binary_encoding_of_data_digits_into_EAN-13_barcode// Calculate the checksum digit// https://en.wikipedia.org/wiki/International_Article_Number_(EAN)#Calculation_of_checksum_digitvarchecksum=functionchecksum(number){varres=number.substr(0,12).split('').map(function(n){return+n;}).reduce(function(sum,a,idx){returnidx%2?sum+a*3:sum+a;},0);return(10-res%10)%10;};varEAN13=function(_EAN){_inherits(EAN13,_EAN);functionEAN13(data,options){_classCallCheck(this,EAN13);// Add checksum if it does not existif(data.search(/^[0-9]{12}$/)!==-1){data+=checksum(data);}// Adds a last character to the end of the barcodevar_this=_possibleConstructorReturn(this,(EAN13.__proto__||Object.getPrototypeOf(EAN13)).call(this,data,options));_this.lastChar=options.lastChar;return_this;}_createClass(EAN13,[{key:'valid',value:functionvalid(){returnthis.data.search(/^[0-9]{13}$/)!==-1&&+this.data[12]===checksum(this.data);}},{key:'leftText',value:functionleftText(){return_get(EAN13.prototype.__proto__||Object.getPrototypeOf(EAN13.prototype),'leftText',this).call(this,1,6);}},{key:'leftEncode',value:functionleftEncode(){vardata=this.data.substr(1,6);varstructure=_constants.EAN13_STRUCTURE[this.data[0]];return_get(EAN13.prototype.__proto__||Object.getPrototypeOf(EAN13.prototype),'leftEncode',this).call(this,data,structure);}},{key:'rightText',value:functionrightText(){return_get(EAN13.prototype.__proto__||Object.getPrototypeOf(EAN13.prototype),'rightText',this).call(this,7,6);}},{key:'rightEncode',value:functionrightEncode(){vardata=this.data.substr(7,6);return_get(EAN13.prototype.__proto__||Object.getPrototypeOf(EAN13.prototype),'rightEncode',this).call(this,data,'RRRRRR');}// The "standard" way of printing EAN13 barcodes with guard bars},{key:'encodeGuarded',value:functionencodeGuarded(){vardata=_get(EAN13.prototype.__proto__||Object.getPrototypeOf(EAN13.prototype),'encodeGuarded',this).call(this);// Extend data with left digit & last characterif(this.options.displayValue){data.unshift({data:'000000000000',text:this.text.substr(0,1),options:{textAlign:'left',fontSize:this.fontSize}});if(this.options.lastChar){data.push({data:'00'});data.push({data:'00000',text:this.options.lastChar,options:{fontSize:this.fontSize}});}}returndata;}}]);returnEAN13;}(_EAN3.default);exports.default=EAN13;/***/}),/* 29 *//***/(function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var_createClass=function(){functiondefineProperties(target,props){for(vari=0;i<props.length;i++){vardescriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"indescriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}returnfunction(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);returnConstructor;};}();var_constants=__webpack_require__(2);var_encoder=__webpack_require__(3);var_encoder2=_interopRequireDefault(_encoder);var_Barcode2=__webpack_require__(0);var_Barcode3=_interopRequireDefault(_Barcode2);function_interopRequireDefault(obj){returnobj&&obj.__esModule?obj:{default:obj};}function_classCallCheck(instance,Constructor){if(!(instanceinstanceofConstructor)){thrownewTypeError("Cannot call a class as a function");}}function_possibleConstructorReturn(self,call){if(!self){thrownewReferenceError("this hasn't been initialised - super() hasn't been called");}returncall&&(typeofcall==="object"||typeofcall==="function")?call:self;}function_inherits(subClass,superClass){if(typeofsuperClass!=="function"&&superClass!==null){thrownewTypeError("Super expression must either be null or a function, not "+typeofsuperClass);}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}// Encoding documentation:// https://en.wikipedia.org/wiki/EAN_2#EncodingvarEAN2=function(_Barcode){_inherits(EAN2,_Barcode);functionEAN2(data,options){_classCallCheck(this,EAN2);return_possibleConstructorReturn(this,(EAN2.__proto__||Object.getPrototypeOf(EAN2)).call(this,data,options));}_createClass(EAN2,[{key:'valid',value:functionvalid(){returnthis.data.search(/^[0-9]{2}$/)!==-1;}},{key:'encode',value:functionencode(){// Choose the structure based on the number mod 4varstructure=_constants.EAN2_STRUCTURE[parseInt(this.data)%4];return{// Start bits + Encode the two digits with 01 in betweendata:'1011'+(0,_encoder2.default)(this.data,structure,'01'),text:this.text};}}]);returnEAN2;}(_Barcode3.default);exports.default=EAN2;/***/}),/* 30 *//***/(function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var_createClass=function(){functiondefineProperties(target,props){for(vari=0;i<props.length;i++){vardescriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"indescriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}returnfunction(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);returnConstructor;};}();var_constants=__webpack_require__(2);var_encoder=__webpack_require__(3);var_encoder2=_interopRequireDefault(_encoder);var_Barcode2=__webpack_require__(0);var_Barcode3=_interopRequireDefault(_Barcode2);function_interopRequireDefault(obj){returnobj&&obj.__esModule?obj:{default:obj};}function_classCallCheck(instance,Constructor){if(!(instanceinstanceofConstructor)){thrownewTypeError("Cannot call a class as a function");}}function_possibleConstructorReturn(self,call){if(!self){thrownewReferenceError("this hasn't been initialised - super() hasn't been called");}returncall&&(typeofcall==="object"||typeofcall==="function")?call:self;}function_inherits(subClass,superClass){if(typeofsuperClass!=="function"&&superClass!==null){thrownewTypeError("Super expression must either be null or a function, not "+typeofsuperClass);}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}// Encoding documentation:// https://en.wikipedia.org/wiki/EAN_5#Encodingvarchecksum=functionchecksum(data){varresult=data.split('').map(function(n){return+n;}).reduce(function(sum,a,idx){returnidx%2?sum+a*9:sum+a*3;},0);returnresult%10;};varEAN5=function(_Barcode){_inherits(EAN5,_Barcode);functionEAN5(data,options){_classCallCheck(this,EAN5);return_possibleConstructorReturn(this,(EAN5.__proto__||Object.getPrototypeOf(EAN5)).call(this,data,options));}_createClass(EAN5,[{key:'valid',value:functionvalid(){returnthis.data.search(/^[0-9]{5}$/)!==-1;}},{key:'encode',value:functionencode(){varstructure=_constants.EAN5_STRUCTURE[checksum(this.data)];return{data:'1011'+(0,_encoder2.default)(this.data,structure,'01'),text:this.text};}}]);returnEAN5;}(_Barcode3.default);exports.default=EAN5;/***/}),/* 31 *//***/(function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var_createClass=function(){functiondefineProperties(target,props){for(vari=0;i<props.length;i++){vardescriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"indescriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}returnfunction(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);returnConstructor;};}();var_get=functionget(object,property,receiver){if(object===null)object=Function.prototype;vardesc=Object.getOwnPropertyDescriptor(object,property);if(desc===undefined){varparent=Object.getPrototypeOf(object);if(parent===null){returnundefined;}else{returnget(parent,property,receiver);}}elseif("value"indesc){returndesc.value;}else{vargetter=desc.get;if(getter===undefined){returnundefined;}returngetter.call(receiver);}};var_EAN2=__webpack_require__(11);var_EAN3=_interopRequireDefault(_EAN2);function_interopRequireDefault(obj){returnobj&&obj.__esModule?obj:{default:obj};}function_classCallCheck(instance,Constructor){if(!(instanceinstanceofConstructor)){thrownewTypeError("Cannot call a class as a function");}}function_possibleConstructorReturn(self,call){if(!self){thrownewReferenceError("this hasn't been initialised - super() hasn't been called");}returncall&&(typeofcall==="object"||typeofcall==="function")?call:self;}function_inherits(subClass,superClass){if(typeofsuperClass!=="function"&&superClass!==null){thrownewTypeError("Super expression must either be null or a function, not "+typeofsuperClass);}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}// Encoding documentation:// http://www.barcodeisland.com/ean8.phtml// Calculate the checksum digitvarchecksum=functionchecksum(number){varres=number.substr(0,7).split('').map(function(n){return+n;}).reduce(function(sum,a,idx){returnidx%2?sum+a:sum+a*3;},0);return(10-res%10)%10;};varEAN8=function(_EAN){_inherits(EAN8,_EAN);functionEAN8(data,options){_classCallCheck(this,EAN8);// Add checksum if it does not existif(data.search(/^[0-9]{7}$/)!==-1){data+=checksum(data);}return_possibleConstructorReturn(this,(EAN8.__proto__||Object.getPrototypeOf(EAN8)).call(this,data,options));}_createClass(EAN8,[{key:'valid',value:functionvalid(){returnthis.data.search(/^[0-9]{8}$/)!==-1&&+this.data[7]===checksum(this.data);}},{key:'leftText',value:functionleftText(){return_get(EAN8.prototype.__proto__||Object.getPrototypeOf(EAN8.prototype),'leftText',this).call(this,0,4);}},{key:'leftEncode',value:functionleftEncode(){vardata=this.data.substr(0,4);return_get(EAN8.prototype.__proto__||Object.getPrototypeOf(EAN8.prototype),'leftEncode',this).call(this,data,'LLLL');}},{key:'rightText',value:functionrightText(){return_get(EAN8.prototype.__proto__||Object.getPrototypeOf(EAN8.prototype),'rightText',this).call(this,4,4);}},{key:'rightEncode',value:functionrightEncode(){vardata=this.data.substr(4,4);return_get(EAN8.prototype.__proto__||Object.getPrototypeOf(EAN8.prototype),'rightEncode',this).call(this,data,'RRRR');}}]);returnEAN8;}(_EAN3.default);exports.default=EAN8;/***/}),/* 32 *//***/(function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var_createClass=function(){functiondefineProperties(target,props){for(vari=0;i<props.length;i++){vardescriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"indescriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}returnfunction(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);returnConstructor;};}();var_encoder=__webpack_require__(3);var_encoder2=_interopRequireDefault(_encoder);var_Barcode2=__webpack_require__(0);var_Barcode3=_interopRequireDefault(_Barcode2);var_UPC=__webpack_require__(12);function_interopRequireDefault(obj){returnobj&&obj.__esModule?obj:{default:obj};}function_classCallCheck(instance,Constructor){if(!(instanceinstanceofConstructor)){thrownewTypeError("Cannot call a class as a function");}}function_possibleConstructorReturn(self,call){if(!self){thrownewReferenceError("this hasn't been initialised - super() hasn't been called");}returncall&&(typeofcall==="object"||typeofcall==="function")?call:self;}function_inherits(subClass,superClass){if(typeofsuperClass!=="function"&&superClass!==null){thrownewTypeError("Super expression must either be null or a function, not "+typeofsuperClass);}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}// Encoding documentation:// https://en.wikipedia.org/wiki/Universal_Product_Code#Encoding//// UPC-E documentation:// https://en.wikipedia.org/wiki/Universal_Product_Code#UPC-EvarEXPANSIONS=["XX00000XXX","XX10000XXX","XX20000XXX","XXX00000XX","XXXX00000X","XXXXX00005","XXXXX00006","XXXXX00007","XXXXX00008","XXXXX00009"];varPARITIES=[["EEEOOO","OOOEEE"],["EEOEOO","OOEOEE"],["EEOOEO","OOEEOE"],["EEOOOE","OOEEEO"],["EOEEOO","OEOOEE"],["EOOEEO","OEEOOE"],["EOOOEE","OEEEOO"],["EOEOEO","OEOEOE"],["EOEOOE","OEOEEO"],["EOOEOE","OEEOEO"]];varUPCE=function(_Barcode){_inherits(UPCE,_Barcode);functionUPCE(data,options){_classCallCheck(this,UPCE);var_this=_possibleConstructorReturn(this,(UPCE.__proto__||Object.getPrototypeOf(UPCE)).call(this,data,options));// Code may be 6 or 8 digits;// A 7 digit code is ambiguous as to whether the extra digit// is a UPC-A check or number system digit._this.isValid=false;if(data.search(/^[0-9]{6}$/)!==-1){_this.middleDigits=data;_this.upcA=expandToUPCA(data,"0");_this.text=options.text||''+_this.upcA[0]+data+_this.upcA[_this.upcA.length-1];_this.isValid=true;}elseif(data.search(/^[01][0-9]{7}$/)!==-1){_this.middleDigits=data.substring(1,data.length-1);_this.upcA=expandToUPCA(_this.middleDigits,data[0]);if(_this.upcA[_this.upcA.length-1]===data[data.length-1]){_this.isValid=true;}else{// checksum mismatchreturn_possibleConstructorReturn(_this);}}else{return_possibleConstructorReturn(_this);}_this.displayValue=options.displayValue;// Make sure the font is not bigger than the space between the guard barsif(options.fontSize>options.width*10){_this.fontSize=options.width*10;}else{_this.fontSize=options.fontSize;}// Make the guard bars go down half the way of the text_this.guardHeight=options.height+_this.fontSize/2+options.textMargin;return_this;}_createClass(UPCE,[{key:'valid',value:functionvalid(){returnthis.isValid;}},{key:'encode',value:functionencode(){if(this.options.flat){returnthis.flatEncoding();}else{returnthis.guardedEncoding();}}},{key:'flatEncoding',value:functionflatEncoding(){varresult="";result+="101";result+=this.encodeMiddleDigits();result+="010101";return{data:result,text:this.text};}},{key:'guardedEncoding',value:functionguardedEncoding(){varresult=[];// Add the UPC-A number system digit beneath the quiet zoneif(this.displayValue){result.push({data:"00000000",text:this.text[0],options:{textAlign:"left",fontSize:this.fontSize}});}// Add the guard barsresult.push({data:"101",options:{height:this.guardHeight}});// Add the 6 UPC-E digitsresult.push({data:this.encodeMiddleDigits(),text:this.text.substring(1,7),options:{fontSize:this.fontSize}});// Add the end bitsresult.push({data:"010101",options:{height:this.guardHeight}});// Add the UPC-A check digit beneath the quiet zoneif(this.displayValue){result.push({data:"00000000",text:this.text[7],options:{textAlign:"right",fontSize:this.fontSize}});}returnresult;}},{key:'encodeMiddleDigits',value:functionencodeMiddleDigits(){varnumberSystem=this.upcA[0];varcheckDigit=this.upcA[this.upcA.length-1];varparity=PARITIES[parseInt(checkDigit)][parseInt(numberSystem)];return(0,_encoder2.default)(this.middleDigits,parity);}}]);returnUPCE;}(_Barcode3.default);functionexpandToUPCA(middleDigits,numberSystem){varlastUpcE=parseInt(middleDigits[middleDigits.length-1]);varexpansion=EXPANSIONS[lastUpcE];varresult="";vardigitIndex=0;for(vari=0;i<expansion.length;i++){varc=expansion[i];if(c==='X'){result+=middleDigits[digitIndex++];}else{result+=c;}}result=''+numberSystem+result;return''+result+(0,_UPC.checksum)(result);}exports.default=UPCE;/***/}),/* 33 *//***/(function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.UPCE=exports.UPC=exports.EAN2=exports.EAN5=exports.EAN8=exports.EAN13=undefined;var_EAN=__webpack_require__(28);var_EAN2=_interopRequireDefault(_EAN);var_EAN3=__webpack_require__(31);var_EAN4=_interopRequireDefault(_EAN3);var_EAN5=__webpack_require__(30);var_EAN6=_interopRequireDefault(_EAN5);var_EAN7=__webpack_require__(29);var_EAN8=_interopRequireDefault(_EAN7);var_UPC=__webpack_require__(12);var_UPC2=_interopRequireDefault(_UPC);var_UPCE=__webpack_require__(32);var_UPCE2=_interopRequireDefault(_UPCE);function_interopRequireDefault(obj){returnobj&&obj.__esModule?obj:{default:obj};}exports.EAN13=_EAN2.default;exports.EAN8=_EAN4.default;exports.EAN5=_EAN6.default;exports.EAN2=_EAN8.default;exports.UPC=_UPC2.default;exports.UPCE=_UPCE2.default;/***/}),/* 34 *//***/(function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.GenericBarcode=undefined;var_createClass=function(){functiondefineProperties(target,props){for(vari=0;i<props.length;i++){vardescriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"indescriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}returnfunction(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);returnConstructor;};}();var_Barcode2=__webpack_require__(0);var_Barcode3=_interopRequireDefault(_Barcode2);function_interopRequireDefault(obj){returnobj&&obj.__esModule?obj:{default:obj};}function_classCallCheck(instance,Constructor){if(!(instanceinstanceofConstructor)){thrownewTypeError("Cannot call a class as a function");}}function_possibleConstructorReturn(self,call){if(!self){thrownewReferenceError("this hasn't been initialised - super() hasn't been called");}returncall&&(typeofcall==="object"||typeofcall==="function")?call:self;}function_inherits(subClass,superClass){if(typeofsuperClass!=="function"&&superClass!==null){thrownewTypeError("Super expression must either be null or a function, not "+typeofsuperClass);}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}varGenericBarcode=function(_Barcode){_inherits(GenericBarcode,_Barcode);functionGenericBarcode(data,options){_classCallCheck(this,GenericBarcode);return_possibleConstructorReturn(this,(GenericBarcode.__proto__||Object.getPrototypeOf(GenericBarcode)).call(this,data,options));// Sets this.data and this.text}// Return the corresponding binary numbers for the data provided_createClass(GenericBarcode,[{key:"encode",value:functionencode(){return{data:"10101010101010101010101010101010101010101",text:this.text};}// Resturn true/false if the string provided is valid for this encoder},{key:"valid",value:functionvalid(){returntrue;}}]);returnGenericBarcode;}(_Barcode3.default);exports.GenericBarcode=GenericBarcode;/***/}),/* 35 *//***/(function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var_createClass=function(){functiondefineProperties(target,props){for(vari=0;i<props.length;i++){vardescriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"indescriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}returnfunction(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);returnConstructor;};}();var_ITF2=__webpack_require__(13);var_ITF3=_interopRequireDefault(_ITF2);function_interopRequireDefault(obj){returnobj&&obj.__esModule?obj:{default:obj};}function_classCallCheck(instance,Constructor){if(!(instanceinstanceofConstructor)){thrownewTypeError("Cannot call a class as a function");}}function_possibleConstructorReturn(self,call){if(!self){thrownewReferenceError("this hasn't been initialised - super() hasn't been called");}returncall&&(typeofcall==="object"||typeofcall==="function")?call:self;}function_inherits(subClass,superClass){if(typeofsuperClass!=="function"&&superClass!==null){thrownewTypeError("Super expression must either be null or a function, not "+typeofsuperClass);}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}// Calculate the checksum digitvarchecksum=functionchecksum(data){varres=data.substr(0,13).split('').map(function(num){returnparseInt(num,10);}).reduce(function(sum,n,idx){returnsum+n*(3-idx%2*2);},0);returnMath.ceil(res/10)*10-res;};varITF14=function(_ITF){_inherits(ITF14,_ITF);functionITF14(data,options){_classCallCheck(this,ITF14);// Add checksum if it does not existif(data.search(/^[0-9]{13}$/)!==-1){data+=checksum(data);}return_possibleConstructorReturn(this,(ITF14.__proto__||Object.getPrototypeOf(ITF14)).call(this,data,options));}_createClass(ITF14,[{key:'valid',value:functionvalid(){returnthis.data.search(/^[0-9]{14}$/)!==-1&&+this.data[13]===checksum(this.data);}}]);returnITF14;}(_ITF3.default);exports.default=ITF14;/***/}),/* 36 *//***/(function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});varSTART_BIN=exports.START_BIN='1010';varEND_BIN=exports.END_BIN='11101';varBINARIES=exports.BINARIES=['00110','10001','01001','11000','00101','10100','01100','00011','10010','01010'];/***/}),/* 37 *//***/(function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.ITF14=exports.ITF=undefined;var_ITF=__webpack_require__(13);var_ITF2=_interopRequireDefault(_ITF);var_ITF3=__webpack_require__(35);var_ITF4=_interopRequireDefault(_ITF3);function_interopRequireDefault(obj){returnobj&&obj.__esModule?obj:{default:obj};}exports.ITF=_ITF2.default;exports.ITF14=_ITF4.default;/***/}),/* 38 *//***/(function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var_MSI2=__webpack_require__(4);var_MSI3=_interopRequireDefault(_MSI2);var_checksums=__webpack_require__(7);function_interopRequireDefault(obj){returnobj&&obj.__esModule?obj:{default:obj};}function_classCallCheck(instance,Constructor){if(!(instanceinstanceofConstructor)){thrownewTypeError("Cannot call a class as a function");}}function_possibleConstructorReturn(self,call){if(!self){thrownewReferenceError("this hasn't been initialised - super() hasn't been called");}returncall&&(typeofcall==="object"||typeofcall==="function")?call:self;}function_inherits(subClass,superClass){if(typeofsuperClass!=="function"&&superClass!==null){thrownewTypeError("Super expression must either be null or a function, not "+typeofsuperClass);}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}varMSI10=function(_MSI){_inherits(MSI10,_MSI);functionMSI10(data,options){_classCallCheck(this,MSI10);return_possibleConstructorReturn(this,(MSI10.__proto__||Object.getPrototypeOf(MSI10)).call(this,data+(0,_checksums.mod10)(data),options));}returnMSI10;}(_MSI3.default);exports.default=MSI10;/***/}),/* 39 *//***/(function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var_MSI2=__webpack_require__(4);var_MSI3=_interopRequireDefault(_MSI2);var_checksums=__webpack_require__(7);function_interopRequireDefault(obj){returnobj&&obj.__esModule?obj:{default:obj};}function_classCallCheck(instance,Constructor){if(!(instanceinstanceofConstructor)){thrownewTypeError("Cannot call a class as a function");}}function_possibleConstructorReturn(self,call){if(!self){thrownewReferenceError("this hasn't been initialised - super() hasn't been called");}returncall&&(typeofcall==="object"||typeofcall==="function")?call:self;}function_inherits(subClass,superClass){if(typeofsuperClass!=="function"&&superClass!==null){thrownewTypeError("Super expression must either be null or a function, not "+typeofsuperClass);}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}varMSI1010=function(_MSI){_inherits(MSI1010,_MSI);functionMSI1010(data,options){_classCallCheck(this,MSI1010);data+=(0,_checksums.mod10)(data);data+=(0,_checksums.mod10)(data);return_possibleConstructorReturn(this,(MSI1010.__proto__||Object.getPrototypeOf(MSI1010)).call(this,data,options));}returnMSI1010;}(_MSI3.default);exports.default=MSI1010;/***/}),/* 40 *//***/(function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var_MSI2=__webpack_require__(4);var_MSI3=_interopRequireDefault(_MSI2);var_checksums=__webpack_require__(7);function_interopRequireDefault(obj){returnobj&&obj.__esModule?obj:{default:obj};}function_classCallCheck(instance,Constructor){if(!(instanceinstanceofConstructor)){thrownewTypeError("Cannot call a class as a function");}}function_possibleConstructorReturn(self,call){if(!self){thrownewReferenceError("this hasn't been initialised - super() hasn't been called");}returncall&&(typeofcall==="object"||typeofcall==="function")?call:self;}function_inherits(subClass,superClass){if(typeofsuperClass!=="function"&&superClass!==null){thrownewTypeError("Super expression must either be null or a function, not "+typeofsuperClass);}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}varMSI11=function(_MSI){_inherits(MSI11,_MSI);functionMSI11(data,options){_classCallCheck(this,MSI11);return_possibleConstructorReturn(this,(MSI11.__proto__||Object.getPrototypeOf(MSI11)).call(this,data+(0,_checksums.mod11)(data),options));}returnMSI11;}(_MSI3.default);exports.default=MSI11;/***/}),/* 41 *//***/(function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var_MSI2=__webpack_require__(4);var_MSI3=_interopRequireDefault(_MSI2);var_checksums=__webpack_require__(7);function_interopRequireDefault(obj){returnobj&&obj.__esModule?obj:{default:obj};}function_classCallCheck(instance,Constructor){if(!(instanceinstanceofConstructor)){thrownewTypeError("Cannot call a class as a function");}}function_possibleConstructorReturn(self,call){if(!self){thrownewReferenceError("this hasn't been initialised - super() hasn't been called");}returncall&&(typeofcall==="object"||typeofcall==="function")?call:self;}function_inherits(subClass,superClass){if(typeofsuperClass!=="function"&&superClass!==null){thrownewTypeError("Super expression must either be null or a function, not "+typeofsuperClass);}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}varMSI1110=function(_MSI){_inherits(MSI1110,_MSI);functionMSI1110(data,options){_classCallCheck(this,MSI1110);data+=(0,_checksums.mod11)(data);data+=(0,_checksums.mod10)(data);return_possibleConstructorReturn(this,(MSI1110.__proto__||Object.getPrototypeOf(MSI1110)).call(this,data,options));}returnMSI1110;}(_MSI3.default);exports.default=MSI1110;/***/}),/* 42 *//***/(function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.MSI1110=exports.MSI1010=exports.MSI11=exports.MSI10=exports.MSI=undefined;var_MSI=__webpack_require__(4);var_MSI2=_interopRequireDefault(_MSI);var_MSI3=__webpack_require__(38);var_MSI4=_interopRequireDefault(_MSI3);var_MSI5=__webpack_require__(40);var_MSI6=_interopRequireDefault(_MSI5);var_MSI7=__webpack_require__(39);var_MSI8=_interopRequireDefault(_MSI7);var_MSI9=__webpack_require__(41);var_MSI10=_interopRequireDefault(_MSI9);function_interopRequireDefault(obj){returnobj&&obj.__esModule?obj:{default:obj};}exports.MSI=_MSI2.default;exports.MSI10=_MSI4.default;exports.MSI11=_MSI6.default;exports.MSI1010=_MSI8.default;exports.MSI1110=_MSI10.default;/***/}),/* 43 *//***/(function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.codabar=undefined;var_createClass=function(){functiondefineProperties(target,props){for(vari=0;i<props.length;i++){vardescriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"indescriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}returnfunction(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);returnConstructor;};}();var_Barcode2=__webpack_require__(0);var_Barcode3=_interopRequireDefault(_Barcode2);function_interopRequireDefault(obj){returnobj&&obj.__esModule?obj:{default:obj};}function_classCallCheck(instance,Constructor){if(!(instanceinstanceofConstructor)){thrownewTypeError("Cannot call a class as a function");}}function_possibleConstructorReturn(self,call){if(!self){thrownewReferenceError("this hasn't been initialised - super() hasn't been called");}returncall&&(typeofcall==="object"||typeofcall==="function")?call:self;}function_inherits(subClass,superClass){if(typeofsuperClass!=="function"&&superClass!==null){thrownewTypeError("Super expression must either be null or a function, not "+typeofsuperClass);}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}// Encoding specification:// http://www.barcodeisland.com/codabar.phtmlvarcodabar=function(_Barcode){_inherits(codabar,_Barcode);functioncodabar(data,options){_classCallCheck(this,codabar);if(data.search(/^[0-9\-\$\:\.\+\/]+$/)===0){data="A"+data+"A";}var_this=_possibleConstructorReturn(this,(codabar.__proto__||Object.getPrototypeOf(codabar)).call(this,data.toUpperCase(),options));_this.text=_this.options.text||_this.text.replace(/[A-D]/g,'');return_this;}_createClass(codabar,[{key:"valid",value:functionvalid(){returnthis.data.search(/^[A-D][0-9\-\$\:\.\+\/]+[A-D]$/)!==-1;}},{key:"encode",value:functionencode(){varresult=[];varencodings=this.getEncodings();for(vari=0;i<this.data.length;i++){result.push(encodings[this.data.charAt(i)]);// for all characters except the last, append a narrow-space ("0")if(i!==this.data.length-1){result.push("0");}}return{text:this.text,data:result.join('')};}},{key:"getEncodings",value:functiongetEncodings(){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","+":"101100110011","A":"1011001001","B":"1001001011","C":"1010010011","D":"1010011001"};}}]);returncodabar;}(_Barcode3.default);exports.codabar=codabar;/***/}),/* 44 *//***/(function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.pharmacode=undefined;var_createClass=function(){functiondefineProperties(target,props){for(vari=0;i<props.length;i++){vardescriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"indescriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}returnfunction(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);returnConstructor;};}();var_Barcode2=__webpack_require__(0);var_Barcode3=_interopRequireDefault(_Barcode2);function_interopRequireDefault(obj){returnobj&&obj.__esModule?obj:{default:obj};}function_classCallCheck(instance,Constructor){if(!(instanceinstanceofConstructor)){thrownewTypeError("Cannot call a class as a function");}}function_possibleConstructorReturn(self,call){if(!self){thrownewReferenceError("this hasn't been initialised - super() hasn't been called");}returncall&&(typeofcall==="object"||typeofcall==="function")?call:self;}function_inherits(subClass,superClass){if(typeofsuperClass!=="function"&&superClass!==null){thrownewTypeError("Super expression must either be null or a function, not "+typeofsuperClass);}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}// Encoding documentation// http://www.gomaro.ch/ftproot/Laetus_PHARMA-CODE.pdfvarpharmacode=function(_Barcode){_inherits(pharmacode,_Barcode);functionpharmacode(data,options){_classCallCheck(this,pharmacode);var_this=_possibleConstructorReturn(this,(pharmacode.__proto__||Object.getPrototypeOf(pharmacode)).call(this,data,options));_this.number=parseInt(data,10);return_this;}_createClass(pharmacode,[{key:"encode",value:functionencode(){varz=this.number;varresult="";// http://i.imgur.com/RMm4UDJ.png// (source: http://www.gomaro.ch/ftproot/Laetus_PHARMA-CODE.pdf, page: 34)while(!isNaN(z)&&z!=0){if(z%2===0){// Evenresult="11100"+result;z=(z-2)/2;}else{// Oddresult="100"+result;z=(z-1)/2;}}// Remove the two last zeroesresult=result.slice(0,-2);return{data:result,text:this.text};}},{key:"valid",value:functionvalid(){returnthis.number>=3&&this.number<=131070;}}]);returnpharmacode;}(_Barcode3.default);exports.pharmacode=pharmacode;/***/}),/* 45 *//***/(function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var_optionsFromStrings=__webpack_require__(9);var_optionsFromStrings2=_interopRequireDefault(_optionsFromStrings);var_defaults=__webpack_require__(10);var_defaults2=_interopRequireDefault(_defaults);function_interopRequireDefault(obj){returnobj&&obj.__esModule?obj:{default:obj};}functiongetOptionsFromElement(element){varoptions={};for(varpropertyin_defaults2.default){if(_defaults2.default.hasOwnProperty(property)){// jsbarcode-*if(element.hasAttribute("jsbarcode-"+property.toLowerCase())){options[property]=element.getAttribute("jsbarcode-"+property.toLowerCase());}// data-*if(element.hasAttribute("data-"+property.toLowerCase())){options[property]=element.getAttribute("data-"+property.toLowerCase());}}}options["value"]=element.getAttribute("jsbarcode-value")||element.getAttribute("data-value");// Since all atributes are string they need to be converted to integersoptions=(0,_optionsFromStrings2.default)(options);returnoptions;}exports.default=getOptionsFromElement;/***/}),/* 46 *//***/(function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var_createClass=function(){functiondefineProperties(target,props){for(vari=0;i<props.length;i++){vardescriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"indescriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}returnfunction(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);returnConstructor;};}();var_merge=__webpack_require__(5);var_merge2=_interopRequireDefault(_merge);var_shared=__webpack_require__(14);function_interopRequireDefault(obj){returnobj&&obj.__esModule?obj:{default:obj};}function_classCallCheck(instance,Constructor){if(!(instanceinstanceofConstructor)){thrownewTypeError("Cannot call a class as a function");}}varCanvasRenderer=function(){functionCanvasRenderer(canvas,encodings,options){_classCallCheck(this,CanvasRenderer);this.canvas=canvas;this.encodings=encodings;this.options=options;}_createClass(CanvasRenderer,[{key:"render",value:functionrender(){// Abort if the browser does not support HTML5 canvasif(!this.canvas.getContext){thrownewError('The browser does not support canvas.');}this.prepareCanvas();for(vari=0;i<this.encodings.length;i++){varencodingOptions=(0,_merge2.default)(this.options,this.encodings[i].options);this.drawCanvasBarcode(encodingOptions,this.encodings[i]);this.drawCanvasText(encodingOptions,this.encodings[i]);this.moveCanvasDrawing(this.encodings[i]);}this.restoreCanvas();}},{key:"prepareCanvas",value:functionprepareCanvas(){// Get the canvas contextvarctx=this.canvas.getContext("2d");ctx.save();(0,_shared.calculateEncodingAttributes)(this.encodings,this.options,ctx);vartotalWidth=(0,_shared.getTotalWidthOfEncodings)(this.encodings);varmaxHeight=(0,_shared.getMaximumHeightOfEncodings)(this.encodings);this.canvas.width=totalWidth+this.options.marginLeft+this.options.marginRight;this.canvas.height=maxHeight;// Paint the canvasctx.clearRect(0,0,this.canvas.width,this.canvas.height);if(this.options.background){ctx.fillStyle=this.options.background;ctx.fillRect(0,0,this.canvas.width,this.canvas.height);}ctx.translate(this.options.marginLeft,0);}},{key:"drawCanvasBarcode",value:functiondrawCanvasBarcode(options,encoding){// Get the canvas contextvarctx=this.canvas.getContext("2d");varbinary=encoding.data;// Creates the barcode out of the encoded binaryvaryFrom;if(options.textPosition=="top"){yFrom=options.marginTop+options.fontSize+options.textMargin;}else{yFrom=options.marginTop;}ctx.fillStyle=options.lineColor;for(varb=0;b<binary.length;b++){varx=b*options.width+encoding.barcodePadding;if(binary[b]==="1"){ctx.fillRect(x,yFrom,options.width,options.height);}elseif(binary[b]){ctx.fillRect(x,yFrom,options.width,options.height*binary[b]);}}}},{key:"drawCanvasText",value:functiondrawCanvasText(options,encoding){// Get the canvas contextvarctx=this.canvas.getContext("2d");varfont=options.fontOptions+" "+options.fontSize+"px "+options.font;// Draw the text if displayValue is setif(options.displayValue){varx,y;if(options.textPosition=="top"){y=options.marginTop+options.fontSize-options.textMargin;}else{y=options.height+options.textMargin+options.marginTop+options.fontSize;}ctx.font=font;// Draw the text in the correct X depending on the textAlign optionif(options.textAlign=="left"||encoding.barcodePadding>0){x=0;ctx.textAlign='left';}elseif(options.textAlign=="right"){x=encoding.width-1;ctx.textAlign='right';}// In all other cases, center the textelse{x=encoding.width/2;ctx.textAlign='center';}ctx.fillText(encoding.text,x,y);}}},{key:"moveCanvasDrawing",value:functionmoveCanvasDrawing(encoding){varctx=this.canvas.getContext("2d");ctx.translate(encoding.width,0);}},{key:"restoreCanvas",value:functionrestoreCanvas(){// Get the canvas contextvarctx=this.canvas.getContext("2d");ctx.restore();}}]);returnCanvasRenderer;}();exports.default=CanvasRenderer;/***/}),/* 47 *//***/(function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var_canvas=__webpack_require__(46);var_canvas2=_interopRequireDefault(_canvas);var_svg=__webpack_require__(49);var_svg2=_interopRequireDefault(_svg);var_object=__webpack_require__(48);var_object2=_interopRequireDefault(_object);function_interopRequireDefault(obj){returnobj&&obj.__esModule?obj:{default:obj};}exports.default={CanvasRenderer:_canvas2.default,SVGRenderer:_svg2.default,ObjectRenderer:_object2.default};/***/}),/* 48 *//***/(function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var_createClass=function(){functiondefineProperties(target,props){for(vari=0;i<props.length;i++){vardescriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"indescriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}returnfunction(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);returnConstructor;};}();function_classCallCheck(instance,Constructor){if(!(instanceinstanceofConstructor)){thrownewTypeError("Cannot call a class as a function");}}varObjectRenderer=function(){functionObjectRenderer(object,encodings,options){_classCallCheck(this,ObjectRenderer);this.object=object;this.encodings=encodings;this.options=options;}_createClass(ObjectRenderer,[{key:"render",value:functionrender(){this.object.encodings=this.encodings;}}]);returnObjectRenderer;}();exports.default=ObjectRenderer;/***/}),/* 49 *//***/(function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var_createClass=function(){functiondefineProperties(target,props){for(vari=0;i<props.length;i++){vardescriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"indescriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}returnfunction(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);returnConstructor;};}();var_merge=__webpack_require__(5);var_merge2=_interopRequireDefault(_merge);var_shared=__webpack_require__(14);function_interopRequireDefault(obj){returnobj&&obj.__esModule?obj:{default:obj};}function_classCallCheck(instance,Constructor){if(!(instanceinstanceofConstructor)){thrownewTypeError("Cannot call a class as a function");}}varsvgns="http://www.w3.org/2000/svg";varSVGRenderer=function(){functionSVGRenderer(svg,encodings,options){_classCallCheck(this,SVGRenderer);this.svg=svg;this.encodings=encodings;this.options=options;this.document=options.xmlDocument||document;}_createClass(SVGRenderer,[{key:"render",value:functionrender(){varcurrentX=this.options.marginLeft;this.prepareSVG();for(vari=0;i<this.encodings.length;i++){varencoding=this.encodings[i];varencodingOptions=(0,_merge2.default)(this.options,encoding.options);vargroup=this.createGroup(currentX,encodingOptions.marginTop,this.svg);this.setGroupOptions(group,encodingOptions);this.drawSvgBarcode(group,encodingOptions,encoding);this.drawSVGText(group,encodingOptions,encoding);currentX+=encoding.width;}}},{key:"prepareSVG",value:functionprepareSVG(){// Clear the SVGwhile(this.svg.firstChild){this.svg.removeChild(this.svg.firstChild);}(0,_shared.calculateEncodingAttributes)(this.encodings,this.options);vartotalWidth=(0,_shared.getTotalWidthOfEncodings)(this.encodings);varmaxHeight=(0,_shared.getMaximumHeightOfEncodings)(this.encodings);varwidth=totalWidth+this.options.marginLeft+this.options.marginRight;this.setSvgAttributes(width,maxHeight);if(this.options.background){this.drawRect(0,0,width,maxHeight,this.svg).setAttribute("style","fill:"+this.options.background+";");}}},{key:"drawSvgBarcode",value:functiondrawSvgBarcode(parent,options,encoding){varbinary=encoding.data;// Creates the barcode out of the encoded binaryvaryFrom;if(options.textPosition=="top"){yFrom=options.fontSize+options.textMargin;}else{yFrom=0;}varbarWidth=0;varx=0;for(varb=0;b<binary.length;b++){x=b*options.width+encoding.barcodePadding;if(binary[b]==="1"){barWidth++;}elseif(barWidth>0){this.drawRect(x-options.width*barWidth,yFrom,options.width*barWidth,options.height,parent);barWidth=0;}}// Last draw is needed since the barcode ends with 1if(barWidth>0){this.drawRect(x-options.width*(barWidth-1),yFrom,options.width*barWidth,options.height,parent);}}},{key:"drawSVGText",value:functiondrawSVGText(parent,options,encoding){vartextElem=this.document.createElementNS(svgns,'text');// Draw the text if displayValue is setif(options.displayValue){varx,y;textElem.setAttribute("style","font:"+options.fontOptions+" "+options.fontSize+"px "+options.font);if(options.textPosition=="top"){y=options.fontSize-options.textMargin;}else{y=options.height+options.textMargin+options.fontSize;}// Draw the text in the correct X depending on the textAlign optionif(options.textAlign=="left"||encoding.barcodePadding>0){x=0;textElem.setAttribute("text-anchor","start");}elseif(options.textAlign=="right"){x=encoding.width-1;textElem.setAttribute("text-anchor","end");}// In all other cases, center the textelse{x=encoding.width/2;textElem.setAttribute("text-anchor","middle");}textElem.setAttribute("x",x);textElem.setAttribute("y",y);textElem.appendChild(this.document.createTextNode(encoding.text));parent.appendChild(textElem);}}},{key:"setSvgAttributes",value:functionsetSvgAttributes(width,height){varsvg=this.svg;svg.setAttribute("width",width+"px");svg.setAttribute("height",height+"px");svg.setAttribute("x","0px");svg.setAttribute("y","0px");svg.setAttribute("viewBox","0 0 "+width+" "+height);svg.setAttribute("xmlns",svgns);svg.setAttribute("version","1.1");svg.setAttribute("style","transform: translate(0,0)");}},{key:"createGroup",value:functioncreateGroup(x,y,parent){vargroup=this.document.createElementNS(svgns,'g');group.setAttribute("transform","translate("+x+", "+y+")");parent.appendChild(group);returngroup;}},{key:"setGroupOptions",value:functionsetGroupOptions(group,options){group.setAttribute("style","fill:"+options.lineColor+";");}},{key:"drawRect",value:functiondrawRect(x,y,width,height,parent){varrect=this.document.createElementNS(svgns,'rect');rect.setAttribute("x",x);rect.setAttribute("y",y);rect.setAttribute("width",width);rect.setAttribute("height",height);parent.appendChild(rect);returnrect;}}]);returnSVGRenderer;}();exports.default=SVGRenderer;/***/})/******/]);exports('JsBarcode',JsBarcode);});