mirror of
https://github.com/pezkuwichain/pezkuwi-mobile-app.git
synced 2026-05-30 11:11:01 +00:00
1 line
15 KiB
Plaintext
1 line
15 KiB
Plaintext
{"dependencies":[],"output":[{"data":{"code":"__d(function (global, require, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {\n function hex2rgba(hex) {\n if (typeof hex === 'number') {\n hex = hex.toString();\n }\n if (typeof hex !== 'string') {\n throw new Error('Color should be defined as hex string');\n }\n let hexCode = hex.slice().replace('#', '').split('');\n if (hexCode.length < 3 || hexCode.length === 5 || hexCode.length > 8) {\n throw new Error('Invalid hex color: ' + hex);\n }\n\n // Convert from short to long form (fff -> ffffff)\n if (hexCode.length === 3 || hexCode.length === 4) {\n hexCode = Array.prototype.concat.apply([], hexCode.map(function (c) {\n return [c, c];\n }));\n }\n\n // Add default alpha value\n if (hexCode.length === 6) hexCode.push('F', 'F');\n const hexValue = parseInt(hexCode.join(''), 16);\n return {\n r: hexValue >> 24 & 255,\n g: hexValue >> 16 & 255,\n b: hexValue >> 8 & 255,\n a: hexValue & 255,\n hex: '#' + hexCode.slice(0, 6).join('')\n };\n }\n exports.getOptions = function getOptions(options) {\n if (!options) options = {};\n if (!options.color) options.color = {};\n const margin = typeof options.margin === 'undefined' || options.margin === null || options.margin < 0 ? 4 : options.margin;\n const width = options.width && options.width >= 21 ? options.width : undefined;\n const scale = options.scale || 4;\n return {\n width: width,\n scale: width ? 4 : scale,\n margin: margin,\n color: {\n dark: hex2rgba(options.color.dark || '#000000ff'),\n light: hex2rgba(options.color.light || '#ffffffff')\n },\n type: options.type,\n rendererOpts: options.rendererOpts || {}\n };\n };\n exports.getScale = function getScale(qrSize, opts) {\n return opts.width && opts.width >= qrSize + opts.margin * 2 ? opts.width / (qrSize + opts.margin * 2) : opts.scale;\n };\n exports.getImageWidth = function getImageWidth(qrSize, opts) {\n const scale = exports.getScale(qrSize, opts);\n return Math.floor((qrSize + opts.margin * 2) * scale);\n };\n exports.qrToImageData = function qrToImageData(imgData, qr, opts) {\n const size = qr.modules.size;\n const data = qr.modules.data;\n const scale = exports.getScale(size, opts);\n const symbolSize = Math.floor((size + opts.margin * 2) * scale);\n const scaledMargin = opts.margin * scale;\n const palette = [opts.color.light, opts.color.dark];\n for (let i = 0; i < symbolSize; i++) {\n for (let j = 0; j < symbolSize; j++) {\n let posDst = (i * symbolSize + j) * 4;\n let pxColor = opts.color.light;\n if (i >= scaledMargin && j >= scaledMargin && i < symbolSize - scaledMargin && j < symbolSize - scaledMargin) {\n const iSrc = Math.floor((i - scaledMargin) / scale);\n const jSrc = Math.floor((j - scaledMargin) / scale);\n pxColor = palette[data[iSrc * size + jSrc] ? 1 : 0];\n }\n imgData[posDst++] = pxColor.r;\n imgData[posDst++] = pxColor.g;\n imgData[posDst++] = pxColor.b;\n imgData[posDst] = pxColor.a;\n }\n }\n };\n});","lineCount":80,"map":[[2,2,1,0],[2,11,1,9,"hex2rgba"],[2,19,1,17,"hex2rgba"],[2,20,1,19,"hex"],[2,23,1,22],[2,25,1,24],[3,4,2,2],[3,8,2,6],[3,15,2,13,"hex"],[3,18,2,16],[3,23,2,21],[3,31,2,29],[3,33,2,31],[4,6,3,4,"hex"],[4,9,3,7],[4,12,3,10,"hex"],[4,15,3,13],[4,16,3,14,"toString"],[4,24,3,22],[4,25,3,23],[4,26,3,24],[5,4,4,2],[6,4,6,2],[6,8,6,6],[6,15,6,13,"hex"],[6,18,6,16],[6,23,6,21],[6,31,6,29],[6,33,6,31],[7,6,7,4],[7,12,7,10],[7,16,7,14,"Error"],[7,21,7,19],[7,22,7,20],[7,61,7,59],[7,62,7,60],[8,4,8,2],[9,4,10,2],[9,8,10,6,"hexCode"],[9,15,10,13],[9,18,10,16,"hex"],[9,21,10,19],[9,22,10,20,"slice"],[9,27,10,25],[9,28,10,26],[9,29,10,27],[9,30,10,28,"replace"],[9,37,10,35],[9,38,10,36],[9,41,10,39],[9,43,10,41],[9,45,10,43],[9,46,10,44],[9,47,10,45,"split"],[9,52,10,50],[9,53,10,51],[9,55,10,53],[9,56,10,54],[10,4,11,2],[10,8,11,6,"hexCode"],[10,15,11,13],[10,16,11,14,"length"],[10,22,11,20],[10,25,11,23],[10,26,11,24],[10,30,11,28,"hexCode"],[10,37,11,35],[10,38,11,36,"length"],[10,44,11,42],[10,49,11,47],[10,50,11,48],[10,54,11,52,"hexCode"],[10,61,11,59],[10,62,11,60,"length"],[10,68,11,66],[10,71,11,69],[10,72,11,70],[10,74,11,72],[11,6,12,4],[11,12,12,10],[11,16,12,14,"Error"],[11,21,12,19],[11,22,12,20],[11,43,12,41],[11,46,12,44,"hex"],[11,49,12,47],[11,50,12,48],[12,4,13,2],[14,4,15,2],[15,4,16,2],[15,8,16,6,"hexCode"],[15,15,16,13],[15,16,16,14,"length"],[15,22,16,20],[15,27,16,25],[15,28,16,26],[15,32,16,30,"hexCode"],[15,39,16,37],[15,40,16,38,"length"],[15,46,16,44],[15,51,16,49],[15,52,16,50],[15,54,16,52],[16,6,17,4,"hexCode"],[16,13,17,11],[16,16,17,14,"Array"],[16,21,17,19],[16,22,17,20,"prototype"],[16,31,17,29],[16,32,17,30,"concat"],[16,38,17,36],[16,39,17,37,"apply"],[16,44,17,42],[16,45,17,43],[16,47,17,45],[16,49,17,47,"hexCode"],[16,56,17,54],[16,57,17,55,"map"],[16,60,17,58],[16,61,17,59],[16,71,17,69,"c"],[16,72,17,70],[16,74,17,72],[17,8,18,6],[17,15,18,13],[17,16,18,14,"c"],[17,17,18,15],[17,19,18,17,"c"],[17,20,18,18],[17,21,18,19],[18,6,19,4],[18,7,19,5],[18,8,19,6],[18,9,19,7],[19,4,20,2],[21,4,22,2],[22,4,23,2],[22,8,23,6,"hexCode"],[22,15,23,13],[22,16,23,14,"length"],[22,22,23,20],[22,27,23,25],[22,28,23,26],[22,30,23,28,"hexCode"],[22,37,23,35],[22,38,23,36,"push"],[22,42,23,40],[22,43,23,41],[22,46,23,44],[22,48,23,46],[22,51,23,49],[22,52,23,50],[23,4,25,2],[23,10,25,8,"hexValue"],[23,18,25,16],[23,21,25,19,"parseInt"],[23,29,25,27],[23,30,25,28,"hexCode"],[23,37,25,35],[23,38,25,36,"join"],[23,42,25,40],[23,43,25,41],[23,45,25,43],[23,46,25,44],[23,48,25,46],[23,50,25,48],[23,51,25,49],[24,4,27,2],[24,11,27,9],[25,6,28,4,"r"],[25,7,28,5],[25,9,28,8,"hexValue"],[25,17,28,16],[25,21,28,20],[25,23,28,22],[25,26,28,26],[25,29,28,29],[26,6,29,4,"g"],[26,7,29,5],[26,9,29,8,"hexValue"],[26,17,29,16],[26,21,29,20],[26,23,29,22],[26,26,29,26],[26,29,29,29],[27,6,30,4,"b"],[27,7,30,5],[27,9,30,8,"hexValue"],[27,17,30,16],[27,21,30,20],[27,22,30,21],[27,25,30,25],[27,28,30,28],[28,6,31,4,"a"],[28,7,31,5],[28,9,31,7,"hexValue"],[28,17,31,15],[28,20,31,18],[28,23,31,21],[29,6,32,4,"hex"],[29,9,32,7],[29,11,32,9],[29,14,32,12],[29,17,32,15,"hexCode"],[29,24,32,22],[29,25,32,23,"slice"],[29,30,32,28],[29,31,32,29],[29,32,32,30],[29,34,32,32],[29,35,32,33],[29,36,32,34],[29,37,32,35,"join"],[29,41,32,39],[29,42,32,40],[29,44,32,42],[30,4,33,2],[30,5,33,3],[31,2,34,0],[32,2,36,0,"exports"],[32,9,36,7],[32,10,36,8,"getOptions"],[32,20,36,18],[32,23,36,21],[32,32,36,30,"getOptions"],[32,42,36,40,"getOptions"],[32,43,36,42,"options"],[32,50,36,49],[32,52,36,51],[33,4,37,2],[33,8,37,6],[33,9,37,7,"options"],[33,16,37,14],[33,18,37,16,"options"],[33,25,37,23],[33,28,37,26],[33,29,37,27],[33,30,37,28],[34,4,38,2],[34,8,38,6],[34,9,38,7,"options"],[34,16,38,14],[34,17,38,15,"color"],[34,22,38,20],[34,24,38,22,"options"],[34,31,38,29],[34,32,38,30,"color"],[34,37,38,35],[34,40,38,38],[34,41,38,39],[34,42,38,40],[35,4,40,2],[35,10,40,8,"margin"],[35,16,40,14],[35,19,40,17],[35,26,40,24,"options"],[35,33,40,31],[35,34,40,32,"margin"],[35,40,40,38],[35,45,40,43],[35,56,40,54],[35,60,41,4,"options"],[35,67,41,11],[35,68,41,12,"margin"],[35,74,41,18],[35,79,41,23],[35,83,41,27],[35,87,42,4,"options"],[35,94,42,11],[35,95,42,12,"margin"],[35,101,42,18],[35,104,42,21],[35,105,42,22],[35,108,43,6],[35,109,43,7],[35,112,44,6,"options"],[35,119,44,13],[35,120,44,14,"margin"],[35,126,44,20],[36,4,46,2],[36,10,46,8,"width"],[36,15,46,13],[36,18,46,16,"options"],[36,25,46,23],[36,26,46,24,"width"],[36,31,46,29],[36,35,46,33,"options"],[36,42,46,40],[36,43,46,41,"width"],[36,48,46,46],[36,52,46,50],[36,54,46,52],[36,57,46,55,"options"],[36,64,46,62],[36,65,46,63,"width"],[36,70,46,68],[36,73,46,71,"undefined"],[36,82,46,80],[37,4,47,2],[37,10,47,8,"scale"],[37,15,47,13],[37,18,47,16,"options"],[37,25,47,23],[37,26,47,24,"scale"],[37,31,47,29],[37,35,47,33],[37,36,47,34],[38,4,49,2],[38,11,49,9],[39,6,50,4,"width"],[39,11,50,9],[39,13,50,11,"width"],[39,18,50,16],[40,6,51,4,"scale"],[40,11,51,9],[40,13,51,11,"width"],[40,18,51,16],[40,21,51,19],[40,22,51,20],[40,25,51,23,"scale"],[40,30,51,28],[41,6,52,4,"margin"],[41,12,52,10],[41,14,52,12,"margin"],[41,20,52,18],[42,6,53,4,"color"],[42,11,53,9],[42,13,53,11],[43,8,54,6,"dark"],[43,12,54,10],[43,14,54,12,"hex2rgba"],[43,22,54,20],[43,23,54,21,"options"],[43,30,54,28],[43,31,54,29,"color"],[43,36,54,34],[43,37,54,35,"dark"],[43,41,54,39],[43,45,54,43],[43,56,54,54],[43,57,54,55],[44,8,55,6,"light"],[44,13,55,11],[44,15,55,13,"hex2rgba"],[44,23,55,21],[44,24,55,22,"options"],[44,31,55,29],[44,32,55,30,"color"],[44,37,55,35],[44,38,55,36,"light"],[44,43,55,41],[44,47,55,45],[44,58,55,56],[45,6,56,4],[45,7,56,5],[46,6,57,4,"type"],[46,10,57,8],[46,12,57,10,"options"],[46,19,57,17],[46,20,57,18,"type"],[46,24,57,22],[47,6,58,4,"rendererOpts"],[47,18,58,16],[47,20,58,18,"options"],[47,27,58,25],[47,28,58,26,"rendererOpts"],[47,40,58,38],[47,44,58,42],[47,45,58,43],[48,4,59,2],[48,5,59,3],[49,2,60,0],[49,3,60,1],[50,2,62,0,"exports"],[50,9,62,7],[50,10,62,8,"getScale"],[50,18,62,16],[50,21,62,19],[50,30,62,28,"getScale"],[50,38,62,36,"getScale"],[50,39,62,38,"qrSize"],[50,45,62,44],[50,47,62,46,"opts"],[50,51,62,50],[50,53,62,52],[51,4,63,2],[51,11,63,9,"opts"],[51,15,63,13],[51,16,63,14,"width"],[51,21,63,19],[51,25,63,23,"opts"],[51,29,63,27],[51,30,63,28,"width"],[51,35,63,33],[51,39,63,37,"qrSize"],[51,45,63,43],[51,48,63,46,"opts"],[51,52,63,50],[51,53,63,51,"margin"],[51,59,63,57],[51,62,63,60],[51,63,63,61],[51,66,64,6,"opts"],[51,70,64,10],[51,71,64,11,"width"],[51,76,64,16],[51,80,64,20,"qrSize"],[51,86,64,26],[51,89,64,29,"opts"],[51,93,64,33],[51,94,64,34,"margin"],[51,100,64,40],[51,103,64,43],[51,104,64,44],[51,105,64,45],[51,108,65,6,"opts"],[51,112,65,10],[51,113,65,11,"scale"],[51,118,65,16],[52,2,66,0],[52,3,66,1],[53,2,68,0,"exports"],[53,9,68,7],[53,10,68,8,"getImageWidth"],[53,23,68,21],[53,26,68,24],[53,35,68,33,"getImageWidth"],[53,48,68,46,"getImageWidth"],[53,49,68,48,"qrSize"],[53,55,68,54],[53,57,68,56,"opts"],[53,61,68,60],[53,63,68,62],[54,4,69,2],[54,10,69,8,"scale"],[54,15,69,13],[54,18,69,16,"exports"],[54,25,69,23],[54,26,69,24,"getScale"],[54,34,69,32],[54,35,69,33,"qrSize"],[54,41,69,39],[54,43,69,41,"opts"],[54,47,69,45],[54,48,69,46],[55,4,70,2],[55,11,70,9,"Math"],[55,15,70,13],[55,16,70,14,"floor"],[55,21,70,19],[55,22,70,20],[55,23,70,21,"qrSize"],[55,29,70,27],[55,32,70,30,"opts"],[55,36,70,34],[55,37,70,35,"margin"],[55,43,70,41],[55,46,70,44],[55,47,70,45],[55,51,70,49,"scale"],[55,56,70,54],[55,57,70,55],[56,2,71,0],[56,3,71,1],[57,2,73,0,"exports"],[57,9,73,7],[57,10,73,8,"qrToImageData"],[57,23,73,21],[57,26,73,24],[57,35,73,33,"qrToImageData"],[57,48,73,46,"qrToImageData"],[57,49,73,48,"imgData"],[57,56,73,55],[57,58,73,57,"qr"],[57,60,73,59],[57,62,73,61,"opts"],[57,66,73,65],[57,68,73,67],[58,4,74,2],[58,10,74,8,"size"],[58,14,74,12],[58,17,74,15,"qr"],[58,19,74,17],[58,20,74,18,"modules"],[58,27,74,25],[58,28,74,26,"size"],[58,32,74,30],[59,4,75,2],[59,10,75,8,"data"],[59,14,75,12],[59,17,75,15,"qr"],[59,19,75,17],[59,20,75,18,"modules"],[59,27,75,25],[59,28,75,26,"data"],[59,32,75,30],[60,4,76,2],[60,10,76,8,"scale"],[60,15,76,13],[60,18,76,16,"exports"],[60,25,76,23],[60,26,76,24,"getScale"],[60,34,76,32],[60,35,76,33,"size"],[60,39,76,37],[60,41,76,39,"opts"],[60,45,76,43],[60,46,76,44],[61,4,77,2],[61,10,77,8,"symbolSize"],[61,20,77,18],[61,23,77,21,"Math"],[61,27,77,25],[61,28,77,26,"floor"],[61,33,77,31],[61,34,77,32],[61,35,77,33,"size"],[61,39,77,37],[61,42,77,40,"opts"],[61,46,77,44],[61,47,77,45,"margin"],[61,53,77,51],[61,56,77,54],[61,57,77,55],[61,61,77,59,"scale"],[61,66,77,64],[61,67,77,65],[62,4,78,2],[62,10,78,8,"scaledMargin"],[62,22,78,20],[62,25,78,23,"opts"],[62,29,78,27],[62,30,78,28,"margin"],[62,36,78,34],[62,39,78,37,"scale"],[62,44,78,42],[63,4,79,2],[63,10,79,8,"palette"],[63,17,79,15],[63,20,79,18],[63,21,79,19,"opts"],[63,25,79,23],[63,26,79,24,"color"],[63,31,79,29],[63,32,79,30,"light"],[63,37,79,35],[63,39,79,37,"opts"],[63,43,79,41],[63,44,79,42,"color"],[63,49,79,47],[63,50,79,48,"dark"],[63,54,79,52],[63,55,79,53],[64,4,81,2],[64,9,81,7],[64,13,81,11,"i"],[64,14,81,12],[64,17,81,15],[64,18,81,16],[64,20,81,18,"i"],[64,21,81,19],[64,24,81,22,"symbolSize"],[64,34,81,32],[64,36,81,34,"i"],[64,37,81,35],[64,39,81,37],[64,41,81,39],[65,6,82,4],[65,11,82,9],[65,15,82,13,"j"],[65,16,82,14],[65,19,82,17],[65,20,82,18],[65,22,82,20,"j"],[65,23,82,21],[65,26,82,24,"symbolSize"],[65,36,82,34],[65,38,82,36,"j"],[65,39,82,37],[65,41,82,39],[65,43,82,41],[66,8,83,6],[66,12,83,10,"posDst"],[66,18,83,16],[66,21,83,19],[66,22,83,20,"i"],[66,23,83,21],[66,26,83,24,"symbolSize"],[66,36,83,34],[66,39,83,37,"j"],[66,40,83,38],[66,44,83,42],[66,45,83,43],[67,8,84,6],[67,12,84,10,"pxColor"],[67,19,84,17],[67,22,84,20,"opts"],[67,26,84,24],[67,27,84,25,"color"],[67,32,84,30],[67,33,84,31,"light"],[67,38,84,36],[68,8,86,6],[68,12,86,10,"i"],[68,13,86,11],[68,17,86,15,"scaledMargin"],[68,29,86,27],[68,33,86,31,"j"],[68,34,86,32],[68,38,86,36,"scaledMargin"],[68,50,86,48],[68,54,87,8,"i"],[68,55,87,9],[68,58,87,12,"symbolSize"],[68,68,87,22],[68,71,87,25,"scaledMargin"],[68,83,87,37],[68,87,87,41,"j"],[68,88,87,42],[68,91,87,45,"symbolSize"],[68,101,87,55],[68,104,87,58,"scaledMargin"],[68,116,87,70],[68,118,87,72],[69,10,88,8],[69,16,88,14,"iSrc"],[69,20,88,18],[69,23,88,21,"Math"],[69,27,88,25],[69,28,88,26,"floor"],[69,33,88,31],[69,34,88,32],[69,35,88,33,"i"],[69,36,88,34],[69,39,88,37,"scaledMargin"],[69,51,88,49],[69,55,88,53,"scale"],[69,60,88,58],[69,61,88,59],[70,10,89,8],[70,16,89,14,"jSrc"],[70,20,89,18],[70,23,89,21,"Math"],[70,27,89,25],[70,28,89,26,"floor"],[70,33,89,31],[70,34,89,32],[70,35,89,33,"j"],[70,36,89,34],[70,39,89,37,"scaledMargin"],[70,51,89,49],[70,55,89,53,"scale"],[70,60,89,58],[70,61,89,59],[71,10,90,8,"pxColor"],[71,17,90,15],[71,20,90,18,"palette"],[71,27,90,25],[71,28,90,26,"data"],[71,32,90,30],[71,33,90,31,"iSrc"],[71,37,90,35],[71,40,90,38,"size"],[71,44,90,42],[71,47,90,45,"jSrc"],[71,51,90,49],[71,52,90,50],[71,55,90,53],[71,56,90,54],[71,59,90,57],[71,60,90,58],[71,61,90,59],[72,8,91,6],[73,8,93,6,"imgData"],[73,15,93,13],[73,16,93,14,"posDst"],[73,22,93,20],[73,24,93,22],[73,25,93,23],[73,28,93,26,"pxColor"],[73,35,93,33],[73,36,93,34,"r"],[73,37,93,35],[74,8,94,6,"imgData"],[74,15,94,13],[74,16,94,14,"posDst"],[74,22,94,20],[74,24,94,22],[74,25,94,23],[74,28,94,26,"pxColor"],[74,35,94,33],[74,36,94,34,"g"],[74,37,94,35],[75,8,95,6,"imgData"],[75,15,95,13],[75,16,95,14,"posDst"],[75,22,95,20],[75,24,95,22],[75,25,95,23],[75,28,95,26,"pxColor"],[75,35,95,33],[75,36,95,34,"b"],[75,37,95,35],[76,8,96,6,"imgData"],[76,15,96,13],[76,16,96,14,"posDst"],[76,22,96,20],[76,23,96,21],[76,26,96,24,"pxColor"],[76,33,96,31],[76,34,96,32,"a"],[76,35,96,33],[77,6,97,4],[78,4,98,2],[79,2,99,0],[79,3,99,1],[80,0,99,1],[80,3]],"functionMap":{"names":["hex2rgba","hexCode.map$argument_0","<global>","getOptions","getScale","getImageWidth","qrToImageData"],"mappings":"AAA;2DCgB;KDE;CEe;qBCE;CDwB;mBEE;CFI;wBGE;CHG;wBIE;CJ0B"},"hasCjsExports":true},"type":"js/module"}]} |