mirror of
https://github.com/pezkuwichain/pezkuwi-mobile-app.git
synced 2026-05-30 14:31:02 +00:00
1 line
8.3 KiB
Plaintext
1 line
8.3 KiB
Plaintext
{"dependencies":[{"name":"./utils","data":{"asyncType":null,"isESMImport":false,"locs":[{"start":{"line":11,"column":22,"index":425},"end":{"line":11,"column":40,"index":443}}],"key":"Arg6QRuIuy5D/jfcnxX1qJiHjX8=","exportNames":["*"],"imports":1}}],"output":[{"data":{"code":"__d(function (global, require, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {\n /**\n * Alignment pattern are fixed reference pattern in defined positions\n * in a matrix symbology, which enables the decode software to re-synchronise\n * the coordinate mapping of the image modules in the event of moderate amounts\n * of distortion of the image.\n *\n * Alignment patterns are present only in QR Code symbols of version 2 or larger\n * and their number depends on the symbol version.\n */\n\n var getSymbolSize = require(_dependencyMap[0], \"./utils\").getSymbolSize;\n\n /**\n * Calculate the row/column coordinates of the center module of each alignment pattern\n * for the specified QR Code version.\n *\n * The alignment patterns are positioned symmetrically on either side of the diagonal\n * running from the top left corner of the symbol to the bottom right corner.\n *\n * Since positions are simmetrical only half of the coordinates are returned.\n * Each item of the array will represent in turn the x and y coordinate.\n * @see {@link getPositions}\n *\n * @param {Number} version QR Code version\n * @return {Array} Array of coordinate\n */\n exports.getRowColCoords = function getRowColCoords(version) {\n if (version === 1) return [];\n var posCount = Math.floor(version / 7) + 2;\n var size = getSymbolSize(version);\n var intervals = size === 145 ? 26 : Math.ceil((size - 13) / (2 * posCount - 2)) * 2;\n var positions = [size - 7]; // Last coord is always (size - 7)\n\n for (var i = 1; i < posCount - 1; i++) {\n positions[i] = positions[i - 1] - intervals;\n }\n positions.push(6); // First coord is always 6\n\n return positions.reverse();\n };\n\n /**\n * Returns an array containing the positions of each alignment pattern.\n * Each array's element represent the center point of the pattern as (x, y) coordinates\n *\n * Coordinates are calculated expanding the row/column coordinates returned by {@link getRowColCoords}\n * and filtering out the items that overlaps with finder pattern\n *\n * @example\n * For a Version 7 symbol {@link getRowColCoords} returns values 6, 22 and 38.\n * The alignment patterns, therefore, are to be centered on (row, column)\n * positions (6,22), (22,6), (22,22), (22,38), (38,22), (38,38).\n * Note that the coordinates (6,6), (6,38), (38,6) are occupied by finder patterns\n * and are not therefore used for alignment patterns.\n *\n * let pos = getPositions(7)\n * // [[6,22], [22,6], [22,22], [22,38], [38,22], [38,38]]\n *\n * @param {Number} version QR Code version\n * @return {Array} Array of coordinates\n */\n exports.getPositions = function getPositions(version) {\n var coords = [];\n var pos = exports.getRowColCoords(version);\n var posLength = pos.length;\n for (var i = 0; i < posLength; i++) {\n for (var j = 0; j < posLength; j++) {\n // Skip if position is occupied by finder patterns\n if (i === 0 && j === 0 ||\n // top-left\n i === 0 && j === posLength - 1 ||\n // bottom-left\n i === posLength - 1 && j === 0) {\n // top-right\n continue;\n }\n coords.push([pos[i], pos[j]]);\n }\n }\n return coords;\n };\n});","lineCount":83,"map":[[2,2,1,0],[3,0,2,0],[4,0,3,0],[5,0,4,0],[6,0,5,0],[7,0,6,0],[8,0,7,0],[9,0,8,0],[10,0,9,0],[12,2,11,0],[12,6,11,6,"getSymbolSize"],[12,19,11,19],[12,22,11,22,"require"],[12,29,11,29],[12,30,11,29,"_dependencyMap"],[12,44,11,29],[12,58,11,39],[12,59,11,40],[12,60,11,41,"getSymbolSize"],[12,73,11,54],[14,2,13,0],[15,0,14,0],[16,0,15,0],[17,0,16,0],[18,0,17,0],[19,0,18,0],[20,0,19,0],[21,0,20,0],[22,0,21,0],[23,0,22,0],[24,0,23,0],[25,0,24,0],[26,0,25,0],[27,0,26,0],[28,2,27,0,"exports"],[28,9,27,7],[28,10,27,8,"getRowColCoords"],[28,25,27,23],[28,28,27,26],[28,37,27,35,"getRowColCoords"],[28,52,27,50,"getRowColCoords"],[28,53,27,52,"version"],[28,60,27,59],[28,62,27,61],[29,4,28,2],[29,8,28,6,"version"],[29,15,28,13],[29,20,28,18],[29,21,28,19],[29,23,28,21],[29,30,28,28],[29,32,28,30],[30,4,30,2],[30,8,30,8,"posCount"],[30,16,30,16],[30,19,30,19,"Math"],[30,23,30,23],[30,24,30,24,"floor"],[30,29,30,29],[30,30,30,30,"version"],[30,37,30,37],[30,40,30,40],[30,41,30,41],[30,42,30,42],[30,45,30,45],[30,46,30,46],[31,4,31,2],[31,8,31,8,"size"],[31,12,31,12],[31,15,31,15,"getSymbolSize"],[31,28,31,28],[31,29,31,29,"version"],[31,36,31,36],[31,37,31,37],[32,4,32,2],[32,8,32,8,"intervals"],[32,17,32,17],[32,20,32,20,"size"],[32,24,32,24],[32,29,32,29],[32,32,32,32],[32,35,32,35],[32,37,32,37],[32,40,32,40,"Math"],[32,44,32,44],[32,45,32,45,"ceil"],[32,49,32,49],[32,50,32,50],[32,51,32,51,"size"],[32,55,32,55],[32,58,32,58],[32,60,32,60],[32,65,32,65],[32,66,32,66],[32,69,32,69,"posCount"],[32,77,32,77],[32,80,32,80],[32,81,32,81],[32,82,32,82],[32,83,32,83],[32,86,32,86],[32,87,32,87],[33,4,33,2],[33,8,33,8,"positions"],[33,17,33,17],[33,20,33,20],[33,21,33,21,"size"],[33,25,33,25],[33,28,33,28],[33,29,33,29],[33,30,33,30],[33,32,33,31],[35,4,35,2],[35,9,35,7],[35,13,35,11,"i"],[35,14,35,12],[35,17,35,15],[35,18,35,16],[35,20,35,18,"i"],[35,21,35,19],[35,24,35,22,"posCount"],[35,32,35,30],[35,35,35,33],[35,36,35,34],[35,38,35,36,"i"],[35,39,35,37],[35,41,35,39],[35,43,35,41],[36,6,36,4,"positions"],[36,15,36,13],[36,16,36,14,"i"],[36,17,36,15],[36,18,36,16],[36,21,36,19,"positions"],[36,30,36,28],[36,31,36,29,"i"],[36,32,36,30],[36,35,36,33],[36,36,36,34],[36,37,36,35],[36,40,36,38,"intervals"],[36,49,36,47],[37,4,37,2],[38,4,39,2,"positions"],[38,13,39,11],[38,14,39,12,"push"],[38,18,39,16],[38,19,39,17],[38,20,39,18],[38,21,39,19],[38,23,39,20],[40,4,41,2],[40,11,41,9,"positions"],[40,20,41,18],[40,21,41,19,"reverse"],[40,28,41,26],[40,29,41,27],[40,30,41,28],[41,2,42,0],[41,3,42,1],[43,2,44,0],[44,0,45,0],[45,0,46,0],[46,0,47,0],[47,0,48,0],[48,0,49,0],[49,0,50,0],[50,0,51,0],[51,0,52,0],[52,0,53,0],[53,0,54,0],[54,0,55,0],[55,0,56,0],[56,0,57,0],[57,0,58,0],[58,0,59,0],[59,0,60,0],[60,0,61,0],[61,0,62,0],[62,0,63,0],[63,2,64,0,"exports"],[63,9,64,7],[63,10,64,8,"getPositions"],[63,22,64,20],[63,25,64,23],[63,34,64,32,"getPositions"],[63,46,64,44,"getPositions"],[63,47,64,46,"version"],[63,54,64,53],[63,56,64,55],[64,4,65,2],[64,8,65,8,"coords"],[64,14,65,14],[64,17,65,17],[64,19,65,19],[65,4,66,2],[65,8,66,8,"pos"],[65,11,66,11],[65,14,66,14,"exports"],[65,21,66,21],[65,22,66,22,"getRowColCoords"],[65,37,66,37],[65,38,66,38,"version"],[65,45,66,45],[65,46,66,46],[66,4,67,2],[66,8,67,8,"posLength"],[66,17,67,17],[66,20,67,20,"pos"],[66,23,67,23],[66,24,67,24,"length"],[66,30,67,30],[67,4,69,2],[67,9,69,7],[67,13,69,11,"i"],[67,14,69,12],[67,17,69,15],[67,18,69,16],[67,20,69,18,"i"],[67,21,69,19],[67,24,69,22,"posLength"],[67,33,69,31],[67,35,69,33,"i"],[67,36,69,34],[67,38,69,36],[67,40,69,38],[68,6,70,4],[68,11,70,9],[68,15,70,13,"j"],[68,16,70,14],[68,19,70,17],[68,20,70,18],[68,22,70,20,"j"],[68,23,70,21],[68,26,70,24,"posLength"],[68,35,70,33],[68,37,70,35,"j"],[68,38,70,36],[68,40,70,38],[68,42,70,40],[69,8,71,6],[70,8,72,6],[70,12,72,11,"i"],[70,13,72,12],[70,18,72,17],[70,19,72,18],[70,23,72,22,"j"],[70,24,72,23],[70,29,72,28],[70,30,72,29],[71,8,72,34],[72,8,73,11,"i"],[72,9,73,12],[72,14,73,17],[72,15,73,18],[72,19,73,22,"j"],[72,20,73,23],[72,25,73,28,"posLength"],[72,34,73,37],[72,37,73,40],[72,38,73,42],[73,8,73,46],[74,8,74,11,"i"],[74,9,74,12],[74,14,74,17,"posLength"],[74,23,74,26],[74,26,74,29],[74,27,74,30],[74,31,74,34,"j"],[74,32,74,35],[74,37,74,40],[74,38,74,42],[74,40,74,44],[75,10,74,46],[76,10,75,8],[77,8,76,6],[78,8,78,6,"coords"],[78,14,78,12],[78,15,78,13,"push"],[78,19,78,17],[78,20,78,18],[78,21,78,19,"pos"],[78,24,78,22],[78,25,78,23,"i"],[78,26,78,24],[78,27,78,25],[78,29,78,27,"pos"],[78,32,78,30],[78,33,78,31,"j"],[78,34,78,32],[78,35,78,33],[78,36,78,34],[78,37,78,35],[79,6,79,4],[80,4,80,2],[81,4,82,2],[81,11,82,9,"coords"],[81,17,82,15],[82,2,83,0],[82,3,83,1],[83,0,83,1],[83,3]],"functionMap":{"names":["<global>","getRowColCoords","getPositions"],"mappings":"AAA;0BC0B;CDe;uBEsB;CFmB"},"hasCjsExports":true},"type":"js/module"}]} |