{"version":3,"sources":["kendo.dataviz.barcode.js"],"names":["f","define","defined","value","UNDEFINED","round","precision","power","pow","math","p","limitValue","min","max","rad","degrees","DEG_TO_RAD","deg","radians","isNumber","val","isNaN","valueOrDefault","defaultValue","sqr","objectKey","object","key","parts","push","sort","join","hashKey","str","i","hash","length","charCodeAt","hashObject","arrayLimits","arr","MAX_NUM","MIN_NUM","arrayMin","arrayMax","sparseArrayMin","sparseArrayLimits","sparseArrayMax","n","isFinite","undefined","last","array","append","first","second","apply","renderTemplate","text","kendo","template","useWithBlock","paramName","renderAttr","name","renderAllAttr","attrs","output","renderStyle","renderSize","size","renderPos","pos","result","toHyphens","split","isTransparent","color","arabicToRoman","literals","1","10","100","2","20","200","3","30","300","4","40","400","5","50","500","6","60","600","7","70","700","8","80","800","9","90","900","1000","values","roman","shift","romanToArabic","r","digits","prev","v","toLowerCase","x","l","c","d","m","charAt","memoize","cache","Object","create","id","arguments","this","ucs2decode","string","extra","counter","ucs2encode","map","String","fromCharCode","mergeSort","a","cmp","merge","b","ai","bi","slice","left","right","Math","floor","window","deepExtend","PI","Number","MAX_VALUE","now","Date","getTime","util","drawing","dataviz","amd","a1","a2","a3","$","zeroSize","width","height","baseline","measureText","style","measureBox","TextMetrics","current","measure","loadFonts","fonts","callback","promises","document","font","load","e","logToConsole","Promise","all","then","doc","Class","LRUCache","extend","init","_size","_length","_map","put","lru","entry","_head","_tail","newer","older","get","defaultMeasureBox","options","_cache","_initOptions","baselineMarkerSize","box","styleKey","cacheKey","cachedResult","baselineMarker","_baselineMarker","cloneNode","appendChild","body","offsetWidth","offsetHeight","offsetTop","parentNode","removeChild","jQuery","encodeBase64","input","chr1","chr2","chr3","enc1","enc2","enc3","enc4","encodeUTF8","KEY_STR","inArray","ObserversMixin","observers","_observers","addObserver","element","removeObserver","index","splice","trigger","methodName","event","observer","idx","_suspended","optionsChange","geometryChange","suspend","resume","_observerField","field","mixins","getNext","count","substring","state128","state128AB","states128","code128Base","msiBase","Barcode","Widget","ui","isPlainObject","draw","geom","geometry","Box2D","TextBox","DEFAULT_WIDTH","DEFAULT_HEIGHT","DEFAULT_QUIETZONE_LENGTH","numberRegex","alphanumericRegex","InvalidCharacterErrorTemplate","Encoding","setOptions","that","quietZoneLength","addQuietZone","encode","initValue","addData","baseUnit","pattern","addCheckSum","invalidCharacterError","character","Error","format","encodings","code39Base","minBaseUnitLength","addStart","addCharacter","pushCheckSum","addStop","prepareValues","charData","characterMap","addBase","code39ExtendedBase","addExtended","code","patterns","j","extendedMappings","call","dataLength","shiftCharacters","dataCharacter","specialAsciiCodes","0","64","96","127","shiftValuesAsciiCodes","39","41","42","+","/","%","code39","checkSumMod","minRatio","maxRatio","gapWidth","splitCharacter","patternString","minWidth","minBaseUnit","ratio","minHeight","getBaseUnit","parseFloat","toFixed","ceil","getBaseWidth","concat","replace","characterLength","addPattern","START","addCharacterGap","patternMappings","w","B","W","A","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","X","Y","Z","-","."," ","code39extended","SHIFT0","SHIFT1","SHIFT2","SHIFT3","code93","cCheckSumTotal","kCheckSumTotal","setBaseUnit","checkSumLength","TERMINATION_BAR","checkValues","_getCheckValues","checksum","_findCharacterByValue","cValue","kValue","wightedSum","weightedValue","total","parseInt","code93extended","encoding","is","move","pushState","FNC4","states","_initMoves","isCode","encodingState","_moves","numberMatch","maxLength","substr","match","indexOf","getValue","_moveFNC","shiftKey","_shiftState","_moveState","fnc","previousState","SHIFT","shifted","MOVE","next4","test","dependentStates","_initSubStates","subState","_getSubState","_initSubState","state","_pushStart","pushData","subStates","_getAll","FNC1","startState","startAI","endAI","nextStart","separatorLength","regexSeparators","RegExp","getBySeparator","getByLength","validate","type","getAI","unsupportedAIError","start","end","ranges","applicationIdentifiers","multiKey","ids","22","402","7004","242","8020","703","8008","253","8003","fn","_initStates","checkSum","totalUnits","position","getNextState","temp","STOP","code128a","code128b","code128c","code128","startStopLength","checkSumFunction","checkSums","checkSumType","Modulo10","evenSum","oddSum","odd","Modulo11","weight","checkValue","weightedSum","mod","Modulo11Modulo10","mod11Value","Modulo10Modulo10","mod10Value","msimod10","msimod11","msimod1110","msimod1010","code11","kCheckSumMinLength","DASH_VALUE","DASH","getWeightedSum","postnet","VALID_CODE_LENGTHS","DIGIT_SEPARATOR","baseHeight","pop","y1","y2","ean13","calculateChecksum","leftKey","leftPart","rightPart","addPieces","addSide","middle","keyTable","Array","prototype","reverse","arrToAdd","limitedHeight","even","ean8","wrapper","addClass","css","surfaceWrap","appendTo","surface","Surface","renderAs","redraw","_getSize","clear","setSize","createVisual","visual","getSize","dimensions","_resize","_render","textToDisplay","textHeight","textOptions","textMargin","getSpacing","margin","border","contentBox","unpad","padding","barHeight","Group","_getBackground","visible","top","bottom","_getText","_bandsGroup","_getBands","exportVisual","Size","step","item","rect","path","x1","group","Rect","fromPoints","Point","Path","fromRect","fill","stroke","toRect","background","dashType","_textbox","align","vAlign","reflow","renderVisual","ExportMixin","plugin"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;CAwBC,SAAUA,EAAGC,QACVA,OAAO,aAAc,cAAeD,IACtC,WA6WE,MA5WC,YAGG,QAASE,GAAQC,GACb,aAAcA,KAAUC,EAE5B,QAASC,GAAMF,EAAOG,GAClB,GAAIC,GAAQC,EAAIF,EAChB,OAAOG,GAAKJ,MAAMF,EAAQI,GAASA,EAEvC,QAASC,GAAIE,GACT,MAAIA,GACOD,EAAKD,IAAI,GAAIE,GAEb,EAGf,QAASC,GAAWR,EAAOS,EAAKC,GAC5B,MAAOJ,GAAKI,IAAIJ,EAAKG,IAAIT,EAAOU,GAAMD,GAE1C,QAASE,GAAIC,GACT,MAAOA,GAAUC,EAErB,QAASC,GAAIC,GACT,MAAOA,GAAUF,EAErB,QAASG,GAASC,GACd,MAAsB,gBAARA,KAAqBC,MAAMD,GAE7C,QAASE,GAAenB,EAAOoB,GAC3B,MAAOrB,GAAQC,GAASA,EAAQoB,EAEpC,QAASC,GAAIrB,GACT,MAAOA,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KnH,OAASmH,EAAK8L,WAAa9L,EAAKC,kBAEzDgE,WAAY,SAAUvC,GAAV,GACuDjT,GACtD+B,EADLwP,EAAOzJ,KAAMgK,EAAUP,GAAAA,EAAKsB,aAAaI,EAC7C,KAASlR,EAAI,EAAGA,EAAI+P,EAAQ7P,OAAQF,IAChC/B,EAAQ8Y,SAAShH,EAAQvK,OAAOxF,GAAI,IACpCwP,EAAKO,QAAQpQ,KAAK1B,GAClBuR,EAAK8L,YAAcrd,CAEvBuR,GAAK6L,UAAYnK,EAAO1B,EAAK+L,YAEjCC,aAAc,SAAU/D,EAAeH,GACnC,IAAK,GAAItX,GAAI,EAAGA,EAAIsX,EAAOpX,OAAQF,IAC/B,GAAI+F,KAAKuR,EAAOtX,IAAIkX,GAAGO,EAAcxZ,MAAOwZ,EAAczK,OACtD,MAAOsK,GAAOtX,EAGtB+F,MAAKkK,sBAAsBwH,EAAcxZ,MAAMuH,OAAOiS,EAAczK,SAExE8D,cACI,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,SAEJ4K,KAAM,MAEVrL,EAAUsL,SAAWtN,EAAYxE,QAC7B/H,KAAM,aACNwV,QAAS,OAEbjH,EAAUuL,SAAWvN,EAAYxE,QAC7B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U,QACV3f,MAAO,SAEXge,SACIK,IAAK,EACLC,OAAQ,EACRja,KAAM,EACNC,MAAO,MAInBa,EAAQ8a,YAAY/Y,OAAO0E,EAAQ4M,IACnCrT,EAAQ2G,GAAGoU,OAAOtU,GAClB9M,EAAM4F,WAAWS,GACbuI,UAAWA,EACXf,SAAUA,KAEhBlI,OAAO3F,MAAMoK,QACRzE,OAAO3F,OACE,kBAAV1D,SAAwBA,OAAOgK,IAAMhK,OAAS,SAAUiK,EAAIC,EAAIC,IACrEA,GAAMD","file":"kendo.dataviz.barcode.min.js","sourcesContent":["/*!\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n*/\n(function (f, define) {\n define('util/main', ['kendo.core'], f);\n}(function () {\n (function () {\n var math = Math, kendo = window.kendo, deepExtend = kendo.deepExtend;\n var DEG_TO_RAD = math.PI / 180, MAX_NUM = Number.MAX_VALUE, MIN_NUM = -Number.MAX_VALUE, UNDEFINED = 'undefined';\n function defined(value) {\n return typeof value !== UNDEFINED;\n }\n function round(value, precision) {\n var power = pow(precision);\n return math.round(value * power) / power;\n }\n function pow(p) {\n if (p) {\n return math.pow(10, p);\n } else {\n return 1;\n }\n }\n function limitValue(value, min, max) {\n return math.max(math.min(value, max), min);\n }\n function rad(degrees) {\n return degrees * DEG_TO_RAD;\n }\n function deg(radians) {\n return radians / DEG_TO_RAD;\n }\n function isNumber(val) {\n return typeof val === 'number' && !isNaN(val);\n }\n function valueOrDefault(value, defaultValue) {\n return defined(value) ? value : defaultValue;\n }\n function sqr(value) {\n return value * value;\n }\n function objectKey(object) {\n var parts = [];\n for (var key in object) {\n parts.push(key + object[key]);\n }\n return parts.sort().join('');\n }\n function hashKey(str) {\n var hash = 2166136261;\n for (var i = 0; i < str.length; ++i) {\n hash += (hash << 1) + (hash << 4) + (hash << 7) + (hash << 8) + (hash << 24);\n hash ^= str.charCodeAt(i);\n }\n return hash >>> 0;\n }\n function hashObject(object) {\n return hashKey(objectKey(object));\n }\n var now = Date.now;\n if (!now) {\n now = function () {\n return new Date().getTime();\n };\n }\n function arrayLimits(arr) {\n var length = arr.length, i, min = MAX_NUM, max = MIN_NUM;\n for (i = 0; i < length; i++) {\n max = math.max(max, arr[i]);\n min = math.min(min, arr[i]);\n }\n return {\n min: min,\n max: max\n };\n }\n function arrayMin(arr) {\n return arrayLimits(arr).min;\n }\n function arrayMax(arr) {\n return arrayLimits(arr).max;\n }\n function sparseArrayMin(arr) {\n return sparseArrayLimits(arr).min;\n }\n function sparseArrayMax(arr) {\n return sparseArrayLimits(arr).max;\n }\n function sparseArrayLimits(arr) {\n var min = MAX_NUM, max = MIN_NUM;\n for (var i = 0, length = arr.length; i < length; i++) {\n var n = arr[i];\n if (n !== null && isFinite(n)) {\n min = math.min(min, n);\n max = math.max(max, n);\n }\n }\n return {\n min: min === MAX_NUM ? undefined : min,\n max: max === MIN_NUM ? undefined : max\n };\n }\n function last(array) {\n if (array) {\n return array[array.length - 1];\n }\n }\n function append(first, second) {\n first.push.apply(first, second);\n return first;\n }\n function renderTemplate(text) {\n return kendo.template(text, {\n useWithBlock: false,\n paramName: 'd'\n });\n }\n function renderAttr(name, value) {\n return defined(value) && value !== null ? ' ' + name + '=\\'' + value + '\\' ' : '';\n }\n function renderAllAttr(attrs) {\n var output = '';\n for (var i = 0; i < attrs.length; i++) {\n output += renderAttr(attrs[i][0], attrs[i][1]);\n }\n return output;\n }\n function renderStyle(attrs) {\n var output = '';\n for (var i = 0; i < attrs.length; i++) {\n var value = attrs[i][1];\n if (defined(value)) {\n output += attrs[i][0] + ':' + value + ';';\n }\n }\n if (output !== '') {\n return output;\n }\n }\n function renderSize(size) {\n if (typeof size !== 'string') {\n size += 'px';\n }\n return size;\n }\n function renderPos(pos) {\n var result = [];\n if (pos) {\n var parts = kendo.toHyphens(pos).split('-');\n for (var i = 0; i < parts.length; i++) {\n result.push('k-pos-' + parts[i]);\n }\n }\n return result.join(' ');\n }\n function isTransparent(color) {\n return color === '' || color === null || color === 'none' || color === 'transparent' || !defined(color);\n }\n function arabicToRoman(n) {\n var literals = {\n 1: 'i',\n 10: 'x',\n 100: 'c',\n 2: 'ii',\n 20: 'xx',\n 200: 'cc',\n 3: 'iii',\n 30: 'xxx',\n 300: 'ccc',\n 4: 'iv',\n 40: 'xl',\n 400: 'cd',\n 5: 'v',\n 50: 'l',\n 500: 'd',\n 6: 'vi',\n 60: 'lx',\n 600: 'dc',\n 7: 'vii',\n 70: 'lxx',\n 700: 'dcc',\n 8: 'viii',\n 80: 'lxxx',\n 800: 'dccc',\n 9: 'ix',\n 90: 'xc',\n 900: 'cm',\n 1000: 'm'\n };\n var values = [\n 1000,\n 900,\n 800,\n 700,\n 600,\n 500,\n 400,\n 300,\n 200,\n 100,\n 90,\n 80,\n 70,\n 60,\n 50,\n 40,\n 30,\n 20,\n 10,\n 9,\n 8,\n 7,\n 6,\n 5,\n 4,\n 3,\n 2,\n 1\n ];\n var roman = '';\n while (n > 0) {\n if (n < values[0]) {\n values.shift();\n } else {\n roman += literals[values[0]];\n n -= values[0];\n }\n }\n return roman;\n }\n function romanToArabic(r) {\n r = r.toLowerCase();\n var digits = {\n i: 1,\n v: 5,\n x: 10,\n l: 50,\n c: 100,\n d: 500,\n m: 1000\n };\n var value = 0, prev = 0;\n for (var i = 0; i < r.length; ++i) {\n var v = digits[r.charAt(i)];\n if (!v) {\n return null;\n }\n value += v;\n if (v > prev) {\n value -= 2 * prev;\n }\n prev = v;\n }\n return value;\n }\n function memoize(f) {\n var cache = Object.create(null);\n return function () {\n var id = '';\n for (var i = arguments.length; --i >= 0;) {\n id += ':' + arguments[i];\n }\n return id in cache ? cache[id] : cache[id] = f.apply(this, arguments);\n };\n }\n function ucs2decode(string) {\n var output = [], counter = 0, length = string.length, value, extra;\n while (counter < length) {\n value = string.charCodeAt(counter++);\n if (value >= 55296 && value <= 56319 && counter < length) {\n extra = string.charCodeAt(counter++);\n if ((extra & 64512) == 56320) {\n output.push(((value & 1023) << 10) + (extra & 1023) + 65536);\n } else {\n output.push(value);\n counter--;\n }\n } else {\n output.push(value);\n }\n }\n return output;\n }\n function ucs2encode(array) {\n return array.map(function (value) {\n var output = '';\n if (value > 65535) {\n value -= 65536;\n output += String.fromCharCode(value >>> 10 & 1023 | 55296);\n value = 56320 | value & 1023;\n }\n output += String.fromCharCode(value);\n return output;\n }).join('');\n }\n function mergeSort(a, cmp) {\n if (a.length < 2) {\n return a.slice();\n }\n function merge(a, b) {\n var r = [], ai = 0, bi = 0, i = 0;\n while (ai < a.length && bi < b.length) {\n if (cmp(a[ai], b[bi]) <= 0) {\n r[i++] = a[ai++];\n } else {\n r[i++] = b[bi++];\n }\n }\n if (ai < a.length) {\n r.push.apply(r, a.slice(ai));\n }\n if (bi < b.length) {\n r.push.apply(r, b.slice(bi));\n }\n return r;\n }\n return function sort(a) {\n if (a.length <= 1) {\n return a;\n }\n var m = Math.floor(a.length / 2);\n var left = a.slice(0, m);\n var right = a.slice(m);\n left = sort(left);\n right = sort(right);\n return merge(left, right);\n }(a);\n }\n deepExtend(kendo, {\n util: {\n MAX_NUM: MAX_NUM,\n MIN_NUM: MIN_NUM,\n append: append,\n arrayLimits: arrayLimits,\n arrayMin: arrayMin,\n arrayMax: arrayMax,\n defined: defined,\n deg: deg,\n hashKey: hashKey,\n hashObject: hashObject,\n isNumber: isNumber,\n isTransparent: isTransparent,\n last: last,\n limitValue: limitValue,\n now: now,\n objectKey: objectKey,\n round: round,\n rad: rad,\n renderAttr: renderAttr,\n renderAllAttr: renderAllAttr,\n renderPos: renderPos,\n renderSize: renderSize,\n renderStyle: renderStyle,\n renderTemplate: renderTemplate,\n sparseArrayLimits: sparseArrayLimits,\n sparseArrayMin: sparseArrayMin,\n sparseArrayMax: sparseArrayMax,\n sqr: sqr,\n valueOrDefault: valueOrDefault,\n romanToArabic: romanToArabic,\n arabicToRoman: arabicToRoman,\n memoize: memoize,\n ucs2encode: ucs2encode,\n ucs2decode: ucs2decode,\n mergeSort: mergeSort\n }\n });\n kendo.drawing.util = kendo.util;\n kendo.dataviz.util = kendo.util;\n }());\n return window.kendo;\n}, typeof define == 'function' && define.amd ? define : function (a1, a2, a3) {\n (a3 || a2)();\n}));\n(function (f, define) {\n define('util/text-metrics', [\n 'kendo.core',\n 'util/main'\n ], f);\n}(function () {\n (function ($) {\n var doc = document, kendo = window.kendo, Class = kendo.Class, util = kendo.util, defined = util.defined;\n var LRUCache = Class.extend({\n init: function (size) {\n this._size = size;\n this._length = 0;\n this._map = {};\n },\n put: function (key, value) {\n var lru = this, map = lru._map, entry = {\n key: key,\n value: value\n };\n map[key] = entry;\n if (!lru._head) {\n lru._head = lru._tail = entry;\n } else {\n lru._tail.newer = entry;\n entry.older = lru._tail;\n lru._tail = entry;\n }\n if (lru._length >= lru._size) {\n map[lru._head.key] = null;\n lru._head = lru._head.newer;\n lru._head.older = null;\n } else {\n lru._length++;\n }\n },\n get: function (key) {\n var lru = this, entry = lru._map[key];\n if (entry) {\n if (entry === lru._head && entry !== lru._tail) {\n lru._head = entry.newer;\n lru._head.older = null;\n }\n if (entry !== lru._tail) {\n if (entry.older) {\n entry.older.newer = entry.newer;\n entry.newer.older = entry.older;\n }\n entry.older = lru._tail;\n entry.newer = null;\n lru._tail.newer = entry;\n lru._tail = entry;\n }\n return entry.value;\n }\n }\n });\n var defaultMeasureBox = $('
')[0];\n function zeroSize() {\n return {\n width: 0,\n height: 0,\n baseline: 0\n };\n }\n var TextMetrics = Class.extend({\n init: function (options) {\n this._cache = new LRUCache(1000);\n this._initOptions(options);\n },\n options: { baselineMarkerSize: 1 },\n measure: function (text, style, box) {\n if (!text) {\n return zeroSize();\n }\n var styleKey = util.objectKey(style), cacheKey = util.hashKey(text + styleKey), cachedResult = this._cache.get(cacheKey);\n if (cachedResult) {\n return cachedResult;\n }\n var size = zeroSize();\n var measureBox = box ? box : defaultMeasureBox;\n var baselineMarker = this._baselineMarker().cloneNode(false);\n for (var key in style) {\n var value = style[key];\n if (defined(value)) {\n measureBox.style[key] = value;\n }\n }\n $(measureBox).text(text);\n measureBox.appendChild(baselineMarker);\n doc.body.appendChild(measureBox);\n if ((text + '').length) {\n size.width = measureBox.offsetWidth - this.options.baselineMarkerSize;\n size.height = measureBox.offsetHeight;\n size.baseline = baselineMarker.offsetTop + this.options.baselineMarkerSize;\n }\n if (size.width > 0 && size.height > 0) {\n this._cache.put(cacheKey, size);\n }\n measureBox.parentNode.removeChild(measureBox);\n return size;\n },\n _baselineMarker: function () {\n return $('')[0];\n }\n });\n TextMetrics.current = new TextMetrics();\n function measureText(text, style, measureBox) {\n return TextMetrics.current.measure(text, style, measureBox);\n }\n function loadFonts(fonts, callback) {\n var promises = [];\n if (fonts.length > 0 && document.fonts) {\n try {\n promises = fonts.map(function (font) {\n return document.fonts.load(font);\n });\n } catch (e) {\n kendo.logToConsole(e);\n }\n Promise.all(promises).then(callback, callback);\n } else {\n callback();\n }\n }\n kendo.util.TextMetrics = TextMetrics;\n kendo.util.LRUCache = LRUCache;\n kendo.util.loadFonts = loadFonts;\n kendo.util.measureText = measureText;\n }(window.kendo.jQuery));\n}, typeof define == 'function' && define.amd ? define : function (a1, a2, a3) {\n (a3 || a2)();\n}));\n(function (f, define) {\n define('util/base64', ['util/main'], f);\n}(function () {\n (function () {\n var kendo = window.kendo, deepExtend = kendo.deepExtend, fromCharCode = String.fromCharCode;\n var KEY_STR = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';\n function encodeBase64(input) {\n var output = '';\n var chr1, chr2, chr3, enc1, enc2, enc3, enc4;\n var i = 0;\n input = encodeUTF8(input);\n while (i < input.length) {\n chr1 = input.charCodeAt(i++);\n chr2 = input.charCodeAt(i++);\n chr3 = input.charCodeAt(i++);\n enc1 = chr1 >> 2;\n enc2 = (chr1 & 3) << 4 | chr2 >> 4;\n enc3 = (chr2 & 15) << 2 | chr3 >> 6;\n enc4 = chr3 & 63;\n if (isNaN(chr2)) {\n enc3 = enc4 = 64;\n } else if (isNaN(chr3)) {\n enc4 = 64;\n }\n output = output + KEY_STR.charAt(enc1) + KEY_STR.charAt(enc2) + KEY_STR.charAt(enc3) + KEY_STR.charAt(enc4);\n }\n return output;\n }\n function encodeUTF8(input) {\n var output = '';\n for (var i = 0; i < input.length; i++) {\n var c = input.charCodeAt(i);\n if (c < 128) {\n output += fromCharCode(c);\n } else if (c < 2048) {\n output += fromCharCode(192 | c >>> 6);\n output += fromCharCode(128 | c & 63);\n } else if (c < 65536) {\n output += fromCharCode(224 | c >>> 12);\n output += fromCharCode(128 | c >>> 6 & 63);\n output += fromCharCode(128 | c & 63);\n }\n }\n return output;\n }\n deepExtend(kendo.util, {\n encodeBase64: encodeBase64,\n encodeUTF8: encodeUTF8\n });\n }());\n return window.kendo;\n}, typeof define == 'function' && define.amd ? define : function (a1, a2, a3) {\n (a3 || a2)();\n}));\n(function (f, define) {\n define('mixins/observers', ['kendo.core'], f);\n}(function () {\n (function ($) {\n var math = Math, kendo = window.kendo, deepExtend = kendo.deepExtend, inArray = $.inArray;\n var ObserversMixin = {\n observers: function () {\n this._observers = this._observers || [];\n return this._observers;\n },\n addObserver: function (element) {\n if (!this._observers) {\n this._observers = [element];\n } else {\n this._observers.push(element);\n }\n return this;\n },\n removeObserver: function (element) {\n var observers = this.observers();\n var index = inArray(element, observers);\n if (index != -1) {\n observers.splice(index, 1);\n }\n return this;\n },\n trigger: function (methodName, event) {\n var observers = this._observers;\n var observer;\n var idx;\n if (observers && !this._suspended) {\n for (idx = 0; idx < observers.length; idx++) {\n observer = observers[idx];\n if (observer[methodName]) {\n observer[methodName](event);\n }\n }\n }\n return this;\n },\n optionsChange: function (e) {\n e = e || {};\n e.element = this;\n this.trigger('optionsChange', e);\n },\n geometryChange: function () {\n this.trigger('geometryChange', { element: this });\n },\n suspend: function () {\n this._suspended = (this._suspended || 0) + 1;\n return this;\n },\n resume: function () {\n this._suspended = math.max((this._suspended || 0) - 1, 0);\n return this;\n },\n _observerField: function (field, value) {\n if (this[field]) {\n this[field].removeObserver(this);\n }\n this[field] = value;\n value.addObserver(this);\n }\n };\n deepExtend(kendo, { mixins: { ObserversMixin: ObserversMixin } });\n }(window.kendo.jQuery));\n return window.kendo;\n}, typeof define == 'function' && define.amd ? define : function (a1, a2, a3) {\n (a3 || a2)();\n}));\n(function (f, define) {\n define('kendo.dataviz.barcode', [\n 'kendo.dataviz.core',\n 'kendo.drawing'\n ], f);\n}(function () {\n var __meta__ = {\n id: 'dataviz.barcode',\n name: 'Barcode',\n category: 'dataviz',\n description: 'Barcode widget',\n depends: ['dataviz.core']\n };\n (function ($, undefined) {\n var kendo = window.kendo, Widget = kendo.ui.Widget, extend = $.extend, deepExtend = kendo.deepExtend, inArray = $.inArray, isPlainObject = $.isPlainObject, draw = kendo.drawing, geom = kendo.geometry, util = kendo.util, defined = util.defined, dataviz = kendo.dataviz, Box2D = dataviz.Box2D, TextBox = dataviz.TextBox, DEFAULT_WIDTH = 300, DEFAULT_HEIGHT = 100, DEFAULT_QUIETZONE_LENGTH = 10, numberRegex = /^\\d+$/, alphanumericRegex = /^[a-z0-9]+$/i, InvalidCharacterErrorTemplate = 'Character \\'{0}\\' is not valid for symbology {1}';\n function getNext(value, index, count) {\n return value.substring(index, index + count);\n }\n var Encoding = kendo.Class.extend({\n init: function (options) {\n this.setOptions(options);\n },\n setOptions: function (options) {\n var that = this;\n that.options = extend({}, that.options, options);\n that.quietZoneLength = that.options.addQuietZone ? 2 * that.options.quietZoneLength : 0;\n },\n encode: function (value, width, height) {\n var that = this;\n if (defined(value)) {\n value += '';\n }\n that.initValue(value, width, height);\n if (that.options.addQuietZone) {\n that.addQuietZone();\n }\n that.addData();\n if (that.options.addQuietZone) {\n that.addQuietZone();\n }\n return {\n baseUnit: that.baseUnit,\n pattern: that.pattern\n };\n },\n options: {\n quietZoneLength: DEFAULT_QUIETZONE_LENGTH,\n addQuietZone: true,\n addCheckSum: true\n },\n initValue: function () {\n },\n addQuietZone: function () {\n this.pattern.push(this.options.quietZoneLength || DEFAULT_QUIETZONE_LENGTH);\n },\n addData: function () {\n },\n invalidCharacterError: function (character) {\n throw new Error(kendo.format(InvalidCharacterErrorTemplate, character, this.name));\n }\n });\n var encodings = {};\n var code39Base = Encoding.extend({\n minBaseUnitLength: 0.7,\n addData: function () {\n var that = this, value = that.value;\n that.addStart();\n for (var idx = 0; idx < value.length; idx++) {\n that.addCharacter(value.charAt(idx));\n }\n if (that.options.addCheckSum) {\n that.pushCheckSum();\n }\n that.addStop();\n that.prepareValues();\n },\n addCharacter: function (character) {\n var that = this, charData = that.characterMap[character];\n if (!charData) {\n that.invalidCharacterError(character);\n }\n that.addBase(charData);\n },\n addBase: function () {\n }\n });\n var code39ExtendedBase = {\n addCharacter: function (character) {\n var that = this;\n if (that.characterMap[character]) {\n that.addBase(that.characterMap[character]);\n } else if (character.charCodeAt(0) > 127) {\n that.invalidCharacterError(character);\n } else {\n that.addExtended(character.charCodeAt(0));\n }\n },\n addExtended: function (code) {\n var that = this, patterns;\n for (var i = 0; i < that.extendedMappings.length; i++) {\n if (patterns = that.extendedMappings[i].call(that, code)) {\n for (var j = 0; j < patterns.length; j++) {\n that.addBase(patterns[j]);\n }\n that.dataLength += patterns.length - 1;\n return;\n }\n }\n },\n extendedMappings: [\n function (code) {\n if (97 <= code && code <= 122) {\n var that = this;\n return [\n that.characterMap[that.shiftCharacters[0]],\n that.characterMap[String.fromCharCode(code - 32)]\n ];\n }\n },\n function (code) {\n if (33 <= code && code <= 58) {\n var that = this;\n return [\n that.characterMap[that.shiftCharacters[1]],\n that.characterMap[String.fromCharCode(code + 32)]\n ];\n }\n },\n function (code) {\n if (1 <= code && code <= 26) {\n var that = this;\n return [\n that.characterMap[that.shiftCharacters[2]],\n that.characterMap[String.fromCharCode(code + 64)]\n ];\n }\n },\n function (code) {\n var that = this, result, dataCharacter;\n if (!that.specialAsciiCodes[code]) {\n dataCharacter = Math.floor(code / 32) * 6 + (code - 27) % 32 + 64;\n result = [\n that.characterMap[that.shiftCharacters[3]],\n that.characterMap[String.fromCharCode(dataCharacter)]\n ];\n } else {\n result = [];\n for (var i = 0; i < that.specialAsciiCodes[code].length; i++) {\n result.push(that.characterMap[that.shiftCharacters[3]]);\n result.push(that.characterMap[that.specialAsciiCodes[code][i]]);\n }\n }\n return result;\n }\n ],\n specialAsciiCodes: {\n '0': ['U'],\n '64': ['V'],\n '96': ['W'],\n '127': [\n 'T',\n 'X',\n 'Y',\n 'Z'\n ]\n },\n shiftValuesAsciiCodes: {\n '39': 36,\n '40': 47,\n '41': 43,\n '42': 37\n },\n characterMap: {\n '+': false,\n '/': false,\n '$': false,\n '%': false\n },\n shiftCharacters: [\n 'SHIFT0',\n 'SHIFT1',\n 'SHIFT2',\n 'SHIFT3'\n ]\n };\n encodings.code39 = code39Base.extend({\n name: 'Code 39',\n checkSumMod: 43,\n minRatio: 2.5,\n maxRatio: 3,\n gapWidth: 1,\n splitCharacter: '|',\n initValue: function (value, width, height) {\n var that = this;\n that.width = width;\n that.height = height;\n that.value = value;\n that.dataLength = value.length;\n that.pattern = [];\n that.patternString = '';\n },\n prepareValues: function () {\n var that = this, baseUnit, minBaseUnit = that.minBaseUnitLength, ratio = that.maxRatio, minRatio = that.minRatio, minHeight = Math.max(0.15 * that.width, 24);\n if (that.height < minHeight) {\n throw new Error('Insufficient Height. The minimum height for value: ' + that.value + ' is: ' + minHeight);\n }\n while ((baseUnit = that.getBaseUnit(ratio)) < minBaseUnit && ratio > minRatio) {\n ratio = parseFloat((ratio - 0.1).toFixed(1));\n }\n if (baseUnit < minBaseUnit) {\n var minWidth = Math.ceil(that.getBaseWidth(minRatio) * minBaseUnit);\n throw new Error('Insufficient width. The minimum width for value: ' + that.value + ' is: ' + minWidth);\n }\n that.ratio = ratio;\n that.baseUnit = baseUnit;\n that.patternString = that.patternString.substring(0, that.patternString.length - 1);\n that.pattern = that.pattern.concat(that.patternString.replace(/ratio/g, ratio).split(that.splitCharacter));\n },\n getBaseUnit: function (ratio) {\n return this.width / this.getBaseWidth(ratio);\n },\n getBaseWidth: function (ratio) {\n var that = this, characterLength = 3 * (ratio + 2);\n return that.quietZoneLength + characterLength * (that.dataLength + 2) + that.gapWidth * (that.dataLength + 1);\n },\n addStart: function () {\n var that = this;\n that.addPattern(that.characterMap.START.pattern);\n that.addCharacterGap();\n },\n addBase: function (character) {\n this.addPattern(character.pattern);\n this.addCharacterGap();\n },\n addStop: function () {\n this.addPattern(this.characterMap.START.pattern);\n },\n addPattern: function (pattern) {\n for (var i = 0; i < pattern.length; i++) {\n this.patternString += this.patternMappings[pattern.charAt(i)];\n }\n },\n addCharacterGap: function () {\n var that = this;\n that.patternString += that.gapWidth + that.splitCharacter;\n },\n patternMappings: {\n 'b': '1|',\n 'w': '1|',\n 'B': 'ratio|',\n 'W': 'ratio|'\n },\n characterMap: {\n '0': {\n 'pattern': 'bwbWBwBwb',\n 'value': 0\n },\n '1': {\n 'pattern': 'BwbWbwbwB',\n 'value': 1\n },\n '2': {\n 'pattern': 'bwBWbwbwB',\n 'value': 2\n },\n '3': {\n 'pattern': 'BwBWbwbwb',\n 'value': 3\n },\n '4': {\n 'pattern': 'bwbWBwbwB',\n 'value': 4\n },\n '5': {\n 'pattern': 'BwbWBwbwb',\n 'value': 5\n },\n '6': {\n 'pattern': 'bwBWBwbwb',\n 'value': 6\n },\n '7': {\n 'pattern': 'bwbWbwBwB',\n 'value': 7\n },\n '8': {\n 'pattern': 'BwbWbwBwb',\n 'value': 8\n },\n '9': {\n 'pattern': 'bwBWbwBwb',\n 'value': 9\n },\n 'A': {\n 'pattern': 'BwbwbWbwB',\n 'value': 10\n },\n 'B': {\n 'pattern': 'bwBwbWbwB',\n 'value': 11\n },\n 'C': {\n 'pattern': 'BwBwbWbwb',\n 'value': 12\n },\n 'D': {\n 'pattern': 'bwbwBWbwB',\n 'value': 13\n },\n 'E': {\n 'pattern': 'BwbwBWbwb',\n 'value': 14\n },\n 'F': {\n 'pattern': 'bwBwBWbwb',\n 'value': 15\n },\n 'G': {\n 'pattern': 'bwbwbWBwB',\n 'value': 16\n },\n 'H': {\n 'pattern': 'BwbwbWBwb',\n 'value': 17\n },\n 'I': {\n 'pattern': 'bwBwbWBwb',\n 'value': 18\n },\n 'J': {\n 'pattern': 'bwbwBWBwb',\n 'value': 19\n },\n 'K': {\n 'pattern': 'BwbwbwbWB',\n 'value': 20\n },\n 'L': {\n 'pattern': 'bwBwbwbWB',\n 'value': 21\n },\n 'M': {\n 'pattern': 'BwBwbwbWb',\n 'value': 22\n },\n 'N': {\n 'pattern': 'bwbwBwbWB',\n 'value': 23\n },\n 'O': {\n 'pattern': 'BwbwBwbWb',\n 'value': 24\n },\n 'P': {\n 'pattern': 'bwBwBwbWb',\n 'value': 25\n },\n 'Q': {\n 'pattern': 'bwbwbwBWB',\n 'value': 26\n },\n 'R': {\n 'pattern': 'BwbwbwBWb',\n 'value': 27\n },\n 'S': {\n 'pattern': 'bwBwbwBWb',\n 'value': 28\n },\n 'T': {\n 'pattern': 'bwbwBwBWb',\n 'value': 29\n },\n 'U': {\n 'pattern': 'BWbwbwbwB',\n 'value': 30\n },\n 'V': {\n 'pattern': 'bWBwbwbwB',\n 'value': 31\n },\n 'W': {\n 'pattern': 'BWBwbwbwb',\n 'value': 32\n },\n 'X': {\n 'pattern': 'bWbwBwbwB',\n 'value': 33\n },\n 'Y': {\n 'pattern': 'BWbwBwbwb',\n 'value': 34\n },\n 'Z': {\n 'pattern': 'bWBwBwbwb',\n 'value': 35\n },\n '-': {\n 'pattern': 'bWbwbwBwB',\n 'value': 36\n },\n '.': {\n 'pattern': 'BWbwbwBwb',\n 'value': 37\n },\n ' ': {\n 'pattern': 'bWBwbwBwb',\n 'value': 38\n },\n '$': {\n 'pattern': 'bWbWbWbwb',\n 'value': 39\n },\n '/': {\n 'pattern': 'bWbWbwbWb',\n 'value': 40\n },\n '+': {\n 'pattern': 'bWbwbWbWb',\n 'value': 41\n },\n '%': {\n 'pattern': 'bwbWbWbWb',\n 'value': 42\n },\n START: { pattern: 'bWbwBwBwb' }\n },\n options: { addCheckSum: false }\n });\n encodings.code39extended = encodings.code39.extend(deepExtend({}, code39ExtendedBase, {\n name: 'Code 39 extended',\n characterMap: {\n SHIFT0: {\n 'pattern': 'bWbwbWbWb',\n 'value': 41\n },\n SHIFT1: {\n 'pattern': 'bWbWbwbWb',\n 'value': 40\n },\n SHIFT2: {\n 'pattern': 'bWbWbWbwb',\n 'value': 39\n },\n SHIFT3: {\n 'pattern': 'bwbWbWbWb',\n 'value': 42\n }\n }\n }));\n encodings.code93 = code39Base.extend({\n name: 'Code 93',\n cCheckSumTotal: 20,\n kCheckSumTotal: 15,\n checkSumMod: 47,\n initValue: function (value, width, height) {\n var that = this;\n that.value = value;\n that.width = width;\n that.height = height;\n that.pattern = [];\n that.values = [];\n that.dataLength = value.length;\n },\n prepareValues: function () {\n var that = this, minHeight = Math.max(0.15 * that.width, 24);\n if (that.height < minHeight) {\n throw new Error('Insufficient Height');\n }\n that.setBaseUnit();\n if (that.baseUnit < that.minBaseUnitLength) {\n throw new Error('Insufficient Width');\n }\n },\n setBaseUnit: function () {\n var that = this, checkSumLength = 2;\n that.baseUnit = that.width / (9 * (that.dataLength + 2 + checkSumLength) + that.quietZoneLength + 1);\n },\n addStart: function () {\n var pattern = this.characterMap.START.pattern;\n this.addPattern(pattern);\n },\n addStop: function () {\n var that = this;\n that.addStart();\n that.pattern.push(that.characterMap.TERMINATION_BAR);\n },\n addBase: function (charData) {\n this.addPattern(charData.pattern);\n this.values.push(charData.value);\n },\n pushCheckSum: function () {\n var that = this, checkValues = that._getCheckValues(), charData;\n that.checksum = checkValues.join('');\n for (var i = 0; i < checkValues.length; i++) {\n charData = that.characterMap[that._findCharacterByValue(checkValues[i])];\n that.addPattern(charData.pattern);\n }\n },\n _getCheckValues: function () {\n var that = this, values = that.values, length = values.length, wightedSum = 0, cValue, kValue, idx;\n for (idx = length - 1; idx >= 0; idx--) {\n wightedSum += that.weightedValue(values[idx], length - idx, that.cCheckSumTotal);\n }\n cValue = wightedSum % that.checkSumMod;\n wightedSum = that.weightedValue(cValue, 1, that.kCheckSumTotal);\n for (idx = length - 1; idx >= 0; idx--) {\n wightedSum += that.weightedValue(values[idx], length - idx + 1, that.kCheckSumTotal);\n }\n kValue = wightedSum % that.checkSumMod;\n return [\n cValue,\n kValue\n ];\n },\n _findCharacterByValue: function (value) {\n for (var character in this.characterMap) {\n if (this.characterMap[character].value === value) {\n return character;\n }\n }\n },\n weightedValue: function (value, index, total) {\n return (index % total || total) * value;\n },\n addPattern: function (pattern) {\n var value;\n for (var i = 0; i < pattern.length; i++) {\n value = parseInt(pattern.charAt(i), 10);\n this.pattern.push(value);\n }\n },\n characterMap: {\n '0': {\n 'pattern': '131112',\n 'value': 0\n },\n '1': {\n 'pattern': '111213',\n 'value': 1\n },\n '2': {\n 'pattern': '111312',\n 'value': 2\n },\n '3': {\n 'pattern': '111411',\n 'value': 3\n },\n '4': {\n 'pattern': '121113',\n 'value': 4\n },\n '5': {\n 'pattern': '121212',\n 'value': 5\n },\n '6': {\n 'pattern': '121311',\n 'value': 6\n },\n '7': {\n 'pattern': '111114',\n 'value': 7\n },\n '8': {\n 'pattern': '131211',\n 'value': 8\n },\n '9': {\n 'pattern': '141111',\n 'value': 9\n },\n 'A': {\n 'pattern': '211113',\n 'value': 10\n },\n 'B': {\n 'pattern': '211212',\n 'value': 11\n },\n 'C': {\n 'pattern': '211311',\n 'value': 12\n },\n 'D': {\n 'pattern': '221112',\n 'value': 13\n },\n 'E': {\n 'pattern': '221211',\n 'value': 14\n },\n 'F': {\n 'pattern': '231111',\n 'value': 15\n },\n 'G': {\n 'pattern': '112113',\n 'value': 16\n },\n 'H': {\n 'pattern': '112212',\n 'value': 17\n },\n 'I': {\n 'pattern': '112311',\n 'value': 18\n },\n 'J': {\n 'pattern': '122112',\n 'value': 19\n },\n 'K': {\n 'pattern': '132111',\n 'value': 20\n },\n 'L': {\n 'pattern': '111123',\n 'value': 21\n },\n 'M': {\n 'pattern': '111222',\n 'value': 22\n },\n 'N': {\n 'pattern': '111321',\n 'value': 23\n },\n 'O': {\n 'pattern': '121122',\n 'value': 24\n },\n 'P': {\n 'pattern': '131121',\n 'value': 25\n },\n 'Q': {\n 'pattern': '212112',\n 'value': 26\n },\n 'R': {\n 'pattern': '212211',\n 'value': 27\n },\n 'S': {\n 'pattern': '211122',\n 'value': 28\n },\n 'T': {\n 'pattern': '211221',\n 'value': 29\n },\n 'U': {\n 'pattern': '221121',\n 'value': 30\n },\n 'V': {\n 'pattern': '222111',\n 'value': 31\n },\n 'W': {\n 'pattern': '112122',\n 'value': 32\n },\n 'X': {\n 'pattern': '112221',\n 'value': 33\n },\n 'Y': {\n 'pattern': '122121',\n 'value': 34\n },\n 'Z': {\n 'pattern': '123111',\n 'value': 35\n },\n '-': {\n 'pattern': '121131',\n 'value': 36\n },\n '.': {\n 'pattern': '311112',\n 'value': 37\n },\n ' ': {\n 'pattern': '311211',\n 'value': 38\n },\n '$': {\n 'pattern': '321111',\n 'value': 39\n },\n '/': {\n 'pattern': '112131',\n 'value': 40\n },\n '+': {\n 'pattern': '113121',\n 'value': 41\n },\n '%': {\n 'pattern': '211131',\n 'value': 42\n },\n SHIFT0: {\n 'pattern': '122211',\n 'value': 46\n },\n SHIFT1: {\n 'pattern': '311121',\n 'value': 45\n },\n SHIFT2: {\n 'pattern': '121221',\n 'value': 43\n },\n SHIFT3: {\n 'pattern': '312111',\n 'value': 44\n },\n START: { 'pattern': '111141' },\n TERMINATION_BAR: '1'\n }\n });\n encodings.code93extended = encodings.code93.extend(deepExtend({}, code39ExtendedBase, {\n name: 'Code 93 extended',\n pushCheckSum: function () {\n var that = this, checkValues = that._getCheckValues(), value;\n that.checksum = checkValues.join('');\n for (var i = 0; i < checkValues.length; i++) {\n value = checkValues[i];\n if (that.shiftValuesAsciiCodes[value]) {\n that.addExtended(that.shiftValuesAsciiCodes[value]);\n } else {\n that.addPattern(that.characterMap[that._findCharacterByValue(value)].pattern);\n }\n }\n }\n }));\n var state128 = kendo.Class.extend({\n init: function (encoding) {\n this.encoding = encoding;\n },\n addStart: function () {\n },\n is: function () {\n },\n move: function () {\n },\n pushState: function () {\n }\n });\n var state128AB = state128.extend({\n FNC4: 'FNC4',\n init: function (encoding, states) {\n var that = this;\n that.encoding = encoding;\n that.states = states;\n that._initMoves(states);\n },\n addStart: function () {\n this.encoding.addPattern(this.START);\n },\n is: function (value, index) {\n var code = value.charCodeAt(index);\n return this.isCode(code);\n },\n move: function (encodingState) {\n var that = this, idx = 0;\n while (!that._moves[idx].call(that, encodingState) && idx < that._moves.length) {\n idx++;\n }\n },\n pushState: function (encodingState) {\n var that = this, states = that.states, value = encodingState.value, maxLength = value.length, code;\n if (inArray('C', states) >= 0) {\n var numberMatch = value.substr(encodingState.index).match(/\\d{4,}/g);\n if (numberMatch) {\n maxLength = value.indexOf(numberMatch[0], encodingState.index);\n }\n }\n while ((code = encodingState.value.charCodeAt(encodingState.index)) >= 0 && that.isCode(code) && encodingState.index < maxLength) {\n that.encoding.addPattern(that.getValue(code));\n encodingState.index++;\n }\n },\n _initMoves: function (states) {\n var that = this;\n that._moves = [];\n if (inArray(that.FNC4, states) >= 0) {\n that._moves.push(that._moveFNC);\n }\n if (inArray(that.shiftKey, states) >= 0) {\n that._moves.push(that._shiftState);\n }\n that._moves.push(that._moveState);\n },\n _moveFNC: function (encodingState) {\n if (encodingState.fnc) {\n encodingState.fnc = false;\n return encodingState.previousState == this.key;\n }\n },\n _shiftState: function (encodingState) {\n var that = this;\n if (encodingState.previousState == that.shiftKey && (encodingState.index + 1 >= encodingState.value.length || that.encoding[that.shiftKey].is(encodingState.value, encodingState.index + 1))) {\n that.encoding.addPattern(that.SHIFT);\n encodingState.shifted = true;\n return true;\n }\n },\n _moveState: function () {\n this.encoding.addPattern(this.MOVE);\n return true;\n },\n SHIFT: 98\n });\n var states128 = {};\n states128.A = state128AB.extend({\n key: 'A',\n shiftKey: 'B',\n isCode: function (code) {\n return 0 <= code && code < 96;\n },\n getValue: function (code) {\n if (code < 32) {\n return code + 64;\n }\n return code - 32;\n },\n MOVE: 101,\n START: 103\n });\n states128.B = state128AB.extend({\n key: 'B',\n shiftKey: 'A',\n isCode: function (code) {\n return 32 <= code && code < 128;\n },\n getValue: function (code) {\n return code - 32;\n },\n MOVE: 100,\n START: 104\n });\n states128.C = state128.extend({\n key: 'C',\n addStart: function () {\n this.encoding.addPattern(this.START);\n },\n is: function (value, index) {\n var next4 = getNext(value, index, 4);\n return (index + 4 <= value.length || value.length == 2) && numberRegex.test(next4);\n },\n move: function () {\n this.encoding.addPattern(this.MOVE);\n },\n pushState: function (encodingState) {\n var code;\n while ((code = getNext(encodingState.value, encodingState.index, 2)) && numberRegex.test(code) && code.length == 2) {\n this.encoding.addPattern(parseInt(code, 10));\n encodingState.index += 2;\n }\n },\n getValue: function (code) {\n return code;\n },\n MOVE: 99,\n START: 105\n });\n states128.FNC4 = state128.extend({\n key: 'FNC4',\n dependentStates: [\n 'A',\n 'B'\n ],\n init: function (encoding, states) {\n this.encoding = encoding;\n this._initSubStates(states);\n },\n addStart: function (encodingState) {\n var code = encodingState.value.charCodeAt(0) - 128, subState = this._getSubState(code);\n this.encoding[subState].addStart();\n },\n is: function (value, index) {\n var code = value.charCodeAt(index);\n return this.isCode(code);\n },\n isCode: function (code) {\n return 128 <= code && code < 256;\n },\n pushState: function (encodingState) {\n var that = this, subState = that._initSubState(encodingState), encoding = that.encoding, length = subState.value.length;\n encodingState.index += length;\n if (length < 3) {\n var code;\n for (; subState.index < length; subState.index++) {\n code = subState.value.charCodeAt(subState.index);\n subState.state = that._getSubState(code);\n if (subState.previousState != subState.state) {\n subState.previousState = subState.state;\n encoding[subState.state].move(subState);\n }\n encoding.addPattern(encoding[subState.state].MOVE);\n encoding.addPattern(encoding[subState.state].getValue(code));\n }\n } else {\n if (subState.state != subState.previousState) {\n encoding[subState.state].move(subState);\n }\n that._pushStart(subState);\n encoding.pushData(subState, that.subStates);\n if (encodingState.index < encodingState.value.length) {\n that._pushStart(subState);\n }\n }\n encodingState.fnc = true;\n encodingState.state = subState.state;\n },\n _pushStart: function (subState) {\n var that = this;\n that.encoding.addPattern(that.encoding[subState.state].MOVE);\n that.encoding.addPattern(that.encoding[subState.state].MOVE);\n },\n _initSubState: function (encodingState) {\n var that = this, subState = {\n value: that._getAll(encodingState.value, encodingState.index),\n index: 0\n };\n subState.state = that._getSubState(subState.value.charCodeAt(0));\n subState.previousState = encodingState.previousState == that.key ? subState.state : encodingState.previousState;\n return subState;\n },\n _initSubStates: function (states) {\n var that = this;\n that.subStates = [];\n for (var i = 0; i < states.length; i++) {\n if (inArray(states[i], that.dependentStates) >= 0) {\n that.subStates.push(states[i]);\n }\n }\n },\n _getSubState: function (code) {\n var that = this;\n for (var i = 0; i < that.subStates.length; i++) {\n if (that.encoding[that.subStates[i]].isCode(code)) {\n return that.subStates[i];\n }\n }\n },\n _getAll: function (value, index) {\n var code, result = '';\n while ((code = value.charCodeAt(index++)) && this.isCode(code)) {\n result += String.fromCharCode(code - 128);\n }\n return result;\n }\n });\n states128.FNC1 = state128.extend({\n key: 'FNC1',\n startState: 'C',\n dependentStates: [\n 'C',\n 'B'\n ],\n startAI: '(',\n endAI: ')',\n init: function (encoding, states) {\n this.encoding = encoding;\n this.states = states;\n },\n addStart: function () {\n this.encoding[this.startState].addStart();\n },\n is: function () {\n return inArray(this.key, this.states) >= 0;\n },\n pushState: function (encodingState) {\n var that = this, encoding = that.encoding, value = encodingState.value.replace(/\\s/g, ''), regexSeparators = new RegExp('[' + that.startAI + that.endAI + ']', 'g'), index = encodingState.index, subState = { state: that.startState }, current, nextStart, separatorLength;\n encoding.addPattern(that.START);\n while (true) {\n subState.index = 0;\n separatorLength = value.charAt(index) === that.startAI ? 2 : 0;\n current = separatorLength > 0 ? that.getBySeparator(value, index) : that.getByLength(value, index);\n if (current.ai.length) {\n nextStart = index + separatorLength + current.id.length + current.ai.length;\n } else {\n nextStart = value.indexOf(that.startAI, index + 1);\n if (nextStart < 0) {\n if (index + current.ai.max + current.id.length + separatorLength < value.length) {\n throw new Error('Separators are required after variable length identifiers');\n }\n nextStart = value.length;\n }\n }\n subState.value = value.substring(index, nextStart).replace(regexSeparators, '');\n that.validate(current, subState.value);\n encoding.pushData(subState, that.dependentStates);\n if (nextStart >= value.length) {\n break;\n }\n index = nextStart;\n if (subState.state != that.startState) {\n encoding[that.startState].move(subState);\n subState.state = that.startState;\n }\n if (!current.ai.length) {\n encoding.addPattern(that.START);\n }\n }\n encodingState.index = encodingState.value.length;\n },\n validate: function (current, value) {\n var code = value.substr(current.id.length), ai = current.ai;\n if (!ai.type && !numberRegex.test(code)) {\n throw new Error('Application identifier ' + current.id + ' is numeric only but contains non numeric character(s).');\n }\n if (ai.type == 'alphanumeric' && !alphanumericRegex.test(code)) {\n throw new Error('Application identifier ' + current.id + ' is alphanumeric only but contains non alphanumeric character(s).');\n }\n if (ai.length && ai.length !== code.length) {\n throw new Error('Application identifier ' + current.id + ' must be ' + ai.length + ' characters long.');\n }\n if (ai.min && ai.min > code.length) {\n throw new Error('Application identifier ' + current.id + ' must be at least ' + ai.min + ' characters long.');\n }\n if (ai.max && ai.max < code.length) {\n throw new Error('Application identifier ' + current.id + ' must be at most ' + ai.max + ' characters long.');\n }\n },\n getByLength: function (value, index) {\n var that = this, id, ai;\n for (var i = 2; i <= 4; i++) {\n id = getNext(value, index, i);\n ai = that.getAI(id) || that.getAI(id.substring(0, id.length - 1));\n if (ai) {\n return {\n id: id,\n ai: ai\n };\n }\n }\n that.unsupportedAIError(id);\n },\n unsupportedAIError: function (id) {\n throw new Error(kendo.format('\\'{0}\\' is not a supported Application Identifier'), id);\n },\n getBySeparator: function (value, index) {\n var that = this, start = value.indexOf(that.startAI, index), end = value.indexOf(that.endAI, start), id = value.substring(start + 1, end), ai = that.getAI(id) || that.getAI(id.substr(id.length - 1));\n if (!ai) {\n that.unsupportedAIError(id);\n }\n return {\n ai: ai,\n id: id\n };\n },\n getAI: function (id) {\n var ai = this.applicationIdentifiers, multiKey = ai.multiKey;\n if (ai[id]) {\n return ai[id];\n }\n for (var i = 0; i < multiKey.length; i++) {\n if (multiKey[i].ids && inArray(id, multiKey[i].ids) >= 0) {\n return multiKey[i].type;\n } else if (multiKey[i].ranges) {\n var ranges = multiKey[i].ranges;\n for (var j = 0; j < ranges.length; j++) {\n if (ranges[j][0] <= id && id <= ranges[j][1]) {\n return multiKey[i].type;\n }\n }\n }\n }\n },\n applicationIdentifiers: {\n '22': {\n max: 29,\n type: 'alphanumeric'\n },\n '402': { length: 17 },\n '7004': {\n max: 4,\n type: 'alphanumeric'\n },\n '242': {\n max: 6,\n type: 'alphanumeric'\n },\n '8020': {\n max: 25,\n type: 'alphanumeric'\n },\n '703': {\n min: 3,\n max: 30,\n type: 'alphanumeric'\n },\n '8008': {\n min: 8,\n max: 12,\n type: 'alphanumeric'\n },\n '253': {\n min: 13,\n max: 17,\n type: 'alphanumeric'\n },\n '8003': {\n min: 14,\n max: 30,\n type: 'alphanumeric'\n },\n multiKey: [\n {\n ids: [\n '15',\n '17',\n '8005',\n '8100'\n ],\n ranges: [\n [\n 11,\n 13\n ],\n [\n 310,\n 316\n ],\n [\n 320,\n 336\n ],\n [\n 340,\n 369\n ]\n ],\n type: { length: 6 }\n },\n {\n ids: [\n '240',\n '241',\n '250',\n '251',\n '400',\n '401',\n '403',\n '7002',\n '8004',\n '8007',\n '8110'\n ],\n ranges: [[90 - 99]],\n type: {\n max: 30,\n type: 'alphanumeric'\n }\n },\n {\n ids: ['7001'],\n ranges: [[\n 410,\n 414\n ]],\n type: { length: 13 }\n },\n {\n ids: [\n '10',\n '21',\n '254',\n '420',\n '8002'\n ],\n type: {\n max: 20,\n type: 'alphanumeric'\n }\n },\n {\n ids: [\n '00',\n '8006',\n '8017',\n '8018'\n ],\n type: { length: 18 }\n },\n {\n ids: [\n '01',\n '02',\n '8001'\n ],\n type: { length: 14 }\n },\n {\n ids: ['422'],\n ranges: [[\n 424,\n 426\n ]],\n type: { length: 3 }\n },\n {\n ids: [\n '20',\n '8102'\n ],\n type: { length: 2 }\n },\n {\n ids: [\n '30',\n '37'\n ],\n type: {\n max: 8,\n type: 'alphanumeric'\n }\n },\n {\n ids: [\n '390',\n '392'\n ],\n type: {\n max: 15,\n type: 'alphanumeric'\n }\n },\n {\n ids: [\n '421',\n '423'\n ],\n type: {\n min: 3,\n max: 15,\n type: 'alphanumeric'\n }\n },\n {\n ids: [\n '391',\n '393'\n ],\n type: {\n min: 3,\n max: 18,\n type: 'alphanumeric'\n }\n },\n {\n ids: [\n '7003',\n '8101'\n ],\n type: { length: 10 }\n }\n ]\n },\n START: 102\n });\n var code128Base = Encoding.extend({\n init: function (options) {\n Encoding.fn.init.call(this, options);\n this._initStates();\n },\n _initStates: function () {\n var that = this;\n for (var i = 0; i < that.states.length; i++) {\n that[that.states[i]] = new states128[that.states[i]](that, that.states);\n }\n },\n initValue: function (value, width, height) {\n var that = this;\n that.pattern = [];\n that.value = value;\n that.width = width;\n that.height = height;\n that.checkSum = 0;\n that.totalUnits = 0;\n that.index = 0;\n that.position = 1;\n },\n addData: function () {\n var that = this, encodingState = {\n value: that.value,\n index: 0,\n state: ''\n };\n if (that.value.length === 0) {\n return;\n }\n encodingState.state = encodingState.previousState = that.getNextState(encodingState, that.states);\n that.addStart(encodingState);\n that.pushData(encodingState, that.states);\n that.addCheckSum();\n that.addStop();\n that.setBaseUnit();\n },\n pushData: function (encodingState, states) {\n var that = this;\n while (true) {\n that[encodingState.state].pushState(encodingState);\n if (encodingState.index >= encodingState.value.length) {\n break;\n }\n if (!encodingState.shifted) {\n encodingState.previousState = encodingState.state;\n encodingState.state = that.getNextState(encodingState, states);\n that[encodingState.state].move(encodingState);\n } else {\n var temp = encodingState.state;\n encodingState.state = encodingState.previousState;\n encodingState.previousState = temp;\n encodingState.shifted = false;\n }\n }\n },\n addStart: function (encodingState) {\n this[encodingState.state].addStart(encodingState);\n this.position = 1;\n },\n addCheckSum: function () {\n var that = this;\n that.checksum = that.checkSum % 103;\n that.addPattern(that.checksum);\n },\n addStop: function () {\n this.addPattern(this.STOP);\n },\n setBaseUnit: function () {\n var that = this;\n that.baseUnit = that.width / (that.totalUnits + that.quietZoneLength);\n },\n addPattern: function (code) {\n var that = this, pattern = that.characterMap[code].toString(), value;\n for (var i = 0; i < pattern.length; i++) {\n value = parseInt(pattern.charAt(i), 10);\n that.pattern.push(value);\n that.totalUnits += value;\n }\n that.checkSum += code * that.position++;\n },\n getNextState: function (encodingState, states) {\n for (var i = 0; i < states.length; i++) {\n if (this[states[i]].is(encodingState.value, encodingState.index)) {\n return states[i];\n }\n }\n this.invalidCharacterError(encodingState.value.charAt(encodingState.index));\n },\n characterMap: [\n 212222,\n 222122,\n 222221,\n 121223,\n 121322,\n 131222,\n 122213,\n 122312,\n 132212,\n 221213,\n 221312,\n 231212,\n 112232,\n 122132,\n 122231,\n 113222,\n 123122,\n 123221,\n 223211,\n 221132,\n 221231,\n 213212,\n 223112,\n 312131,\n 311222,\n 321122,\n 321221,\n 312212,\n 322112,\n 322211,\n 212123,\n 212321,\n 232121,\n 111323,\n 131123,\n 131321,\n 112313,\n 132113,\n 132311,\n 211313,\n 231113,\n 231311,\n 112133,\n 112331,\n 132131,\n 113123,\n 113321,\n 133121,\n 313121,\n 211331,\n 231131,\n 213113,\n 213311,\n 213131,\n 311123,\n 311321,\n 331121,\n 312113,\n 312311,\n 332111,\n 314111,\n 221411,\n 431111,\n 111224,\n 111422,\n 121124,\n 121421,\n 141122,\n 141221,\n 112214,\n 112412,\n 122114,\n 122411,\n 142112,\n 142211,\n 241211,\n 221114,\n 413111,\n 241112,\n 134111,\n 111242,\n 121142,\n 121241,\n 114212,\n 124112,\n 124211,\n 411212,\n 421112,\n 421211,\n 212141,\n 214121,\n 412121,\n 111143,\n 111341,\n 131141,\n 114113,\n 114311,\n 411113,\n 411311,\n 113141,\n 114131,\n 311141,\n 411131,\n 211412,\n 211214,\n 211232,\n 2331112\n ],\n STOP: 106\n });\n encodings.code128a = code128Base.extend({\n name: 'Code 128 A',\n states: ['A']\n });\n encodings.code128b = code128Base.extend({\n name: 'Code 128 B',\n states: ['B']\n });\n encodings.code128c = code128Base.extend({\n name: 'Code 128 C',\n states: ['C']\n });\n encodings.code128 = code128Base.extend({\n name: 'Code 128',\n states: [\n 'C',\n 'B',\n 'A',\n 'FNC4'\n ]\n });\n encodings['gs1-128'] = code128Base.extend({\n name: 'Code GS1-128',\n states: [\n 'FNC1',\n 'C',\n 'B'\n ]\n });\n var msiBase = Encoding.extend({\n initValue: function (value, width) {\n var that = this;\n that.pattern = [];\n that.value = value;\n that.checkSumLength = 0;\n that.width = width;\n },\n setBaseUnit: function () {\n var that = this, startStopLength = 7;\n that.baseUnit = that.width / (12 * (that.value.length + that.checkSumLength) + that.quietZoneLength + startStopLength);\n },\n addData: function () {\n var that = this, value = that.value;\n that.addPattern(that.START);\n for (var i = 0; i < value.length; i++) {\n that.addCharacter(value.charAt(i));\n }\n if (that.options.addCheckSum) {\n that.addCheckSum();\n }\n that.addPattern(that.STOP);\n that.setBaseUnit();\n },\n addCharacter: function (character) {\n var that = this, pattern = that.characterMap[character];\n if (!pattern) {\n that.invalidCharacterError(character);\n }\n that.addPattern(pattern);\n },\n addPattern: function (pattern) {\n for (var i = 0; i < pattern.length; i++) {\n this.pattern.push(parseInt(pattern.charAt(i), 10));\n }\n },\n addCheckSum: function () {\n var that = this, checkSumFunction = that.checkSums[that.checkSumType], checkValues;\n checkValues = checkSumFunction.call(that.checkSums, that.value);\n that.checksum = checkValues.join('');\n for (var i = 0; i < checkValues.length; i++) {\n that.checkSumLength++;\n that.addPattern(that.characterMap[checkValues[i]]);\n }\n },\n checkSums: {\n Modulo10: function (value) {\n var checkValues = [\n 0,\n ''\n ], odd = value.length % 2, idx, evenSum, oddSum;\n for (idx = 0; idx < value.length; idx++) {\n checkValues[(idx + odd) % 2] += parseInt(value.charAt(idx), 10);\n }\n oddSum = checkValues[0];\n evenSum = (checkValues[1] * 2).toString();\n for (idx = 0; idx < evenSum.length; idx++) {\n oddSum += parseInt(evenSum.charAt(idx), 10);\n }\n return [(10 - oddSum % 10) % 10];\n },\n Modulo11: function (value) {\n var weightedSum = 0, mod = 11, length = value.length, weight, checkValue;\n for (var i = 0; i < length; i++) {\n weight = ((length - i) % 6 || 6) + 1;\n weightedSum += weight * value.charAt(i);\n }\n checkValue = (mod - weightedSum % mod) % mod;\n if (checkValue != 10) {\n return [checkValue];\n }\n return [\n 1,\n 0\n ];\n },\n Modulo11Modulo10: function (value) {\n var checkValues = this.Modulo11(value), mod11Value;\n mod11Value = value + checkValues[0];\n return checkValues.concat(this.Modulo10(mod11Value));\n },\n Modulo10Modulo10: function (value) {\n var checkValues = this.Modulo10(value), mod10Value;\n mod10Value = value + checkValues[0];\n return checkValues.concat(this.Modulo10(mod10Value));\n }\n },\n characterMap: [\n '12121212',\n '12121221',\n '12122112',\n '12122121',\n '12211212',\n '12211221',\n '12212112',\n '12212121',\n '21121212',\n '21121221'\n ],\n START: '21',\n STOP: '121',\n checkSumType: ''\n });\n encodings.msimod10 = msiBase.extend({\n name: 'MSI Modulo10',\n checkSumType: 'Modulo10'\n });\n encodings.msimod11 = msiBase.extend({\n name: 'MSI Modulo11',\n checkSumType: 'Modulo11'\n });\n encodings.msimod1110 = msiBase.extend({\n name: 'MSI Modulo11 Modulo10',\n checkSumType: 'Modulo11Modulo10'\n });\n encodings.msimod1010 = msiBase.extend({\n name: 'MSI Modulo10 Modulo10',\n checkSumType: 'Modulo10Modulo10'\n });\n encodings.code11 = Encoding.extend({\n name: 'Code 11',\n cCheckSumTotal: 10,\n kCheckSumTotal: 9,\n kCheckSumMinLength: 10,\n checkSumMod: 11,\n DASH_VALUE: 10,\n DASH: '-',\n START: '112211',\n STOP: '11221',\n initValue: function (value, width) {\n var that = this;\n that.pattern = [];\n that.value = value;\n that.width = width;\n that.totalUnits = 0;\n },\n addData: function () {\n var that = this;\n var value = that.value;\n that.addPattern(that.START);\n for (var i = 0; i < value.length; i++) {\n that.addCharacter(value.charAt(i));\n }\n if (that.options.addCheckSum) {\n that.addCheckSum();\n }\n that.addPattern(that.STOP);\n that.setBaseUnit();\n },\n setBaseUnit: function () {\n var that = this;\n that.baseUnit = that.width / (that.totalUnits + that.quietZoneLength);\n },\n addCheckSum: function () {\n var that = this, value = that.value, length = value.length, cValue;\n cValue = that.getWeightedSum(value, length, that.cCheckSumTotal) % that.checkSumMod;\n that.checksum = cValue + '';\n that.addPattern(that.characterMap[cValue]);\n length++;\n if (length >= that.kCheckSumMinLength) {\n var kValue = (cValue + that.getWeightedSum(value, length, that.kCheckSumTotal)) % that.checkSumMod;\n that.checksum += kValue;\n that.addPattern(that.characterMap[kValue]);\n }\n },\n getWeightedSum: function (value, length, total) {\n var weightedSum = 0;\n for (var i = 0; i < value.length; i++) {\n weightedSum += this.weightedValue(this.getValue(value.charAt(i)), length, i, total);\n }\n return weightedSum;\n },\n weightedValue: function (value, length, index, total) {\n var weight = (length - index) % total || total;\n return weight * value;\n },\n getValue: function (character) {\n var that = this;\n if (!isNaN(character)) {\n return parseInt(character, 10);\n } else if (character !== that.DASH) {\n that.invalidCharacterError(character);\n }\n return that.DASH_VALUE;\n },\n addCharacter: function (character) {\n var that = this, value = that.getValue(character), pattern = that.characterMap[value];\n that.addPattern(pattern);\n },\n addPattern: function (pattern) {\n var value;\n for (var i = 0; i < pattern.length; i++) {\n value = parseInt(pattern.charAt(i), 10);\n this.pattern.push(value);\n this.totalUnits += value;\n }\n },\n characterMap: [\n '111121',\n '211121',\n '121121',\n '221111',\n '112121',\n '212111',\n '122111',\n '111221',\n '211211',\n '211111',\n '112111'\n ],\n options: { addCheckSum: true }\n });\n encodings.postnet = Encoding.extend({\n name: 'Postnet',\n START: '2',\n VALID_CODE_LENGTHS: [\n 5,\n 9,\n 11\n ],\n DIGIT_SEPARATOR: '-',\n initValue: function (value, width, height) {\n var that = this;\n that.height = height;\n that.width = width;\n that.baseHeight = height / 2;\n that.value = value.replace(new RegExp(that.DIGIT_SEPARATOR, 'g'), '');\n that.pattern = [];\n that.validate(that.value);\n that.checkSum = 0;\n that.setBaseUnit();\n },\n addData: function () {\n var that = this, value = that.value;\n that.addPattern(that.START);\n for (var i = 0; i < value.length; i++) {\n that.addCharacter(value.charAt(i));\n }\n if (that.options.addCheckSum) {\n that.addCheckSum();\n }\n that.addPattern(that.START);\n that.pattern.pop();\n },\n addCharacter: function (character) {\n var that = this, pattern = that.characterMap[character];\n that.checkSum += parseInt(character, 10);\n that.addPattern(pattern);\n },\n addCheckSum: function () {\n var that = this;\n that.checksum = (10 - that.checkSum % 10) % 10;\n that.addCharacter(that.checksum);\n },\n setBaseUnit: function () {\n var that = this, startStopLength = 3;\n that.baseUnit = that.width / ((that.value.length + 1) * 10 + startStopLength + that.quietZoneLength);\n },\n validate: function (value) {\n var that = this;\n if (!numberRegex.test(value)) {\n that.invalidCharacterError(value.match(/[^0-9]/)[0]);\n }\n if (inArray(value.length, that.VALID_CODE_LENGTHS) < 0) {\n throw new Error('Invalid value length. Valid lengths for the Postnet symbology are ' + that.VALID_CODE_LENGTHS.join(','));\n }\n },\n addPattern: function (pattern) {\n var that = this, y1;\n for (var i = 0; i < pattern.length; i++) {\n y1 = that.height - that.baseHeight * pattern.charAt(i);\n that.pattern.push({\n width: 1,\n y1: y1,\n y2: that.height\n });\n that.pattern.push(1);\n }\n },\n characterMap: [\n '22111',\n '11122',\n '11212',\n '11221',\n '12112',\n '12121',\n '12211',\n '21112',\n '21121',\n '21211'\n ]\n });\n encodings.ean13 = Encoding.extend({\n initValue: function (value, width, height) {\n value += '';\n if (value.length != 12 || /\\D/.test(value)) {\n throw new Error('The value of the \"EAN13\" encoding should be 12 symbols');\n }\n var that = this;\n that.pattern = [];\n that.options.height = height;\n that.baseUnit = width / (95 + that.quietZoneLength);\n that.value = value;\n that.checksum = that.calculateChecksum();\n that.leftKey = value[0];\n that.leftPart = value.substr(1, 6);\n that.rightPart = value.substr(7) + that.checksum;\n },\n addData: function () {\n var that = this;\n that.addPieces(that.characterMap.start);\n that.addSide(that.leftPart, that.leftKey);\n that.addPieces(that.characterMap.middle);\n that.addSide(that.rightPart);\n that.addPieces(that.characterMap.start);\n },\n addSide: function (leftPart, key) {\n var that = this;\n for (var i = 0; i < leftPart.length; i++) {\n if (key && parseInt(that.keyTable[key].charAt(i), 10)) {\n that.addPieces(Array.prototype.slice.call(that.characterMap.digits[leftPart.charAt(i)]).reverse(), true);\n } else {\n that.addPieces(that.characterMap.digits[leftPart.charAt(i)], true);\n }\n }\n },\n addPieces: function (arrToAdd, limitedHeight) {\n var that = this;\n for (var i = 0; i < arrToAdd.length; i++) {\n if (limitedHeight) {\n that.pattern.push({\n y1: 0,\n y2: that.options.height * 0.95,\n width: arrToAdd[i]\n });\n } else {\n that.pattern.push(arrToAdd[i]);\n }\n }\n },\n calculateChecksum: function () {\n var odd = 0, even = 0, value = this.value.split('').reverse().join('');\n for (var i = 0; i < value.length; i++) {\n if (i % 2) {\n even += parseInt(value.charAt(i), 10);\n } else {\n odd += parseInt(value.charAt(i), 10);\n }\n }\n var checksum = (10 - (3 * odd + even) % 10) % 10;\n return checksum;\n },\n keyTable: [\n '000000',\n '001011',\n '001101',\n '001110',\n '010011',\n '011001',\n '011100',\n '010101',\n '010110',\n '011010'\n ],\n characterMap: {\n digits: [\n [\n 3,\n 2,\n 1,\n 1\n ],\n [\n 2,\n 2,\n 2,\n 1\n ],\n [\n 2,\n 1,\n 2,\n 2\n ],\n [\n 1,\n 4,\n 1,\n 1\n ],\n [\n 1,\n 1,\n 3,\n 2\n ],\n [\n 1,\n 2,\n 3,\n 1\n ],\n [\n 1,\n 1,\n 1,\n 4\n ],\n [\n 1,\n 3,\n 1,\n 2\n ],\n [\n 1,\n 2,\n 1,\n 3\n ],\n [\n 3,\n 1,\n 1,\n 2\n ]\n ],\n start: [\n 1,\n 1,\n 1\n ],\n middle: [\n 1,\n 1,\n 1,\n 1,\n 1\n ]\n }\n });\n encodings.ean8 = encodings.ean13.extend({\n initValue: function (value, width, height) {\n var that = this;\n if (value.length != 7 || /\\D/.test(value)) {\n throw new Error('Invalid value provided');\n }\n that.value = value;\n that.options.height = height;\n that.checksum = that.calculateChecksum(that.value);\n that.leftPart = that.value.substr(0, 4);\n that.rightPart = that.value.substr(4) + that.checksum;\n that.pattern = [];\n that.baseUnit = width / (67 + that.quietZoneLength);\n }\n });\n var Barcode = Widget.extend({\n init: function (element, options) {\n var that = this;\n Widget.fn.init.call(that, element, options);\n that.element = $(element);\n that.wrapper = that.element;\n that.element.addClass('k-barcode').css('display', 'block');\n that.surfaceWrap = $('').css('position', 'relative').appendTo(this.element);\n that.surface = draw.Surface.create(that.surfaceWrap, { type: that.options.renderAs });\n that.setOptions(options);\n },\n setOptions: function (options) {\n var that = this;\n that.type = (options.type || that.options.type).toLowerCase();\n if (that.type == 'upca') {\n that.type = 'ean13';\n options.value = '0' + options.value;\n }\n if (that.type == 'upce') {\n that.type = 'ean8';\n options.value = '0' + options.value;\n }\n if (!encodings[that.type]) {\n throw new Error('Encoding ' + that.type + 'is not supported.');\n }\n that.encoding = new encodings[that.type]();\n that.options = extend(true, that.options, options);\n if (!defined(options.value)) {\n return;\n }\n that.redraw();\n },\n redraw: function () {\n var size = this._getSize();\n this.surface.clear();\n this.surface.setSize({\n width: size.width,\n height: size.height\n });\n this.createVisual();\n this.surface.draw(this.visual);\n },\n getSize: function () {\n return kendo.dimensions(this.element);\n },\n _resize: function () {\n this.redraw();\n },\n createVisual: function () {\n this.visual = this._render();\n },\n _render: function () {\n var that = this, options = that.options, value = options.value, textOptions = options.text, textMargin = dataviz.getSpacing(textOptions.margin), size = that._getSize(), border = options.border || {}, encoding = that.encoding, contentBox = Box2D(0, 0, size.width, size.height).unpad(border.width).unpad(options.padding), barHeight = contentBox.height(), result, textToDisplay, textHeight;\n var visual = new draw.Group();\n that.contentBox = contentBox;\n visual.append(that._getBackground(size));\n if (textOptions.visible) {\n textHeight = draw.util.measureText(value, { font: textOptions.font }).height;\n barHeight -= textHeight + textMargin.top + textMargin.bottom;\n }\n result = encoding.encode(value, contentBox.width(), barHeight);\n if (textOptions.visible) {\n textToDisplay = value;\n if (options.checksum && defined(encoding.checksum)) {\n textToDisplay += ' ' + encoding.checksum;\n }\n visual.append(that._getText(textToDisplay));\n }\n that.barHeight = barHeight;\n this._bandsGroup = this._getBands(result.pattern, result.baseUnit);\n visual.append(this._bandsGroup);\n return visual;\n },\n exportVisual: function () {\n return this._render();\n },\n _getSize: function () {\n var that = this, element = that.element, size = new geom.Size(DEFAULT_WIDTH, DEFAULT_HEIGHT);\n if (element.width() > 0) {\n size.width = element.width();\n }\n if (element.height() > 0) {\n size.height = element.height();\n }\n if (that.options.width) {\n size.width = that.options.width;\n }\n if (that.options.height) {\n size.height = that.options.height;\n }\n return size;\n },\n value: function (value) {\n var that = this;\n if (!defined(value)) {\n return that.options.value;\n }\n that.options.value = value + '';\n that.redraw();\n },\n _getBands: function (pattern, baseUnit) {\n var that = this, contentBox = that.contentBox, position = contentBox.x1, step, item;\n var group = new draw.Group();\n for (var i = 0; i < pattern.length; i++) {\n item = isPlainObject(pattern[i]) ? pattern[i] : {\n width: pattern[i],\n y1: 0,\n y2: that.barHeight\n };\n step = item.width * baseUnit;\n if (i % 2) {\n var rect = geom.Rect.fromPoints(new geom.Point(position, item.y1 + contentBox.y1), new geom.Point(position + step, item.y2 + contentBox.y1));\n var path = draw.Path.fromRect(rect, {\n fill: { color: that.options.color },\n stroke: null\n });\n group.append(path);\n }\n position += step;\n }\n return group;\n },\n _getBackground: function (size) {\n var that = this, options = that.options, border = options.border || {};\n var box = Box2D(0, 0, size.width, size.height).unpad(border.width / 2);\n var path = draw.Path.fromRect(box.toRect(), {\n fill: { color: options.background },\n stroke: {\n color: border.width ? border.color : '',\n width: border.width,\n dashType: border.dashType\n }\n });\n return path;\n },\n _getText: function (value) {\n var that = this, textOptions = that.options.text, text = that._textbox = new TextBox(value, {\n font: textOptions.font,\n color: textOptions.color,\n align: 'center',\n vAlign: 'bottom',\n margin: textOptions.margin\n });\n text.reflow(that.contentBox);\n text.renderVisual();\n return text.visual;\n },\n options: {\n name: 'Barcode',\n renderAs: 'svg',\n value: '',\n type: 'code39',\n checksum: false,\n width: 0,\n height: 0,\n color: 'black',\n background: 'white',\n text: {\n visible: true,\n font: '16px Consolas, Monaco, Sans Mono, monospace, sans-serif',\n color: 'black',\n margin: {\n top: 0,\n bottom: 0,\n left: 0,\n right: 0\n }\n },\n border: {\n width: 0,\n dashType: 'solid',\n color: 'black'\n },\n padding: {\n top: 0,\n bottom: 0,\n left: 0,\n right: 0\n }\n }\n });\n dataviz.ExportMixin.extend(Barcode.fn);\n dataviz.ui.plugin(Barcode);\n kendo.deepExtend(dataviz, {\n encodings: encodings,\n Encoding: Encoding\n });\n }(window.kendo.jQuery));\n return window.kendo;\n}, typeof define == 'function' && define.amd ? define : function (a1, a2, a3) {\n (a3 || a2)();\n}));"],"sourceRoot":"/source/"}