Files
pezkuwi-mobile-app/frontend/.metro-cache/cache/84/09ee61aeef1c0e2fc0a1897027342a56e1e04266d529567bae7362df21419e6c9115bf
T
2025-10-24 02:46:57 +00:00

1 line
14 KiB
Plaintext

{"dependencies":[{"name":"../bn/bn.js","data":{"asyncType":null,"isESMImport":true,"locs":[{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":33,"index":33}}],"key":"pRz0ltMTvp81oHyR6ilywDAbGkE=","exportNames":["*"],"imports":1}}],"output":[{"data":{"code":"__d(function (global, require, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {\n \"use strict\";\n\n Object.defineProperty(exports, '__esModule', {\n value: true\n });\n exports.u8aToBn = u8aToBn;\n var _bnBnJs = require(_dependencyMap[0], \"../bn/bn.js\");\n /**\n * @name u8aToBn\n * @summary Creates a BN from a Uint8Array object.\n * @description\n * `UInt8Array` input values return the actual BN. `null` or `undefined` values returns an `0x0` value.\n * @param value The value to convert\n * @param options Options to pass while converting\n * @param options.isLe Convert using Little Endian (default)\n * @param options.isNegative Convert using two's complement\n * @example\n * <BR>\n *\n * ```javascript\n * import { u8aToBn } from '@polkadot/util';\n *\n * u8aToHex(new Uint8Array([0x68, 0x65, 0x6c, 0x6c, 0xf])); // 0x68656c0f\n * ```\n */\n function u8aToBn(value, {\n isLe = true,\n isNegative = false\n } = {}) {\n // slice + reverse is expensive, however SCALE is LE by default so this is the path\n // we are most interested in (the BE is added for the sake of being comprehensive)\n if (!isLe) {\n value = value.slice().reverse();\n }\n const count = value.length;\n // shortcut for <= u48 values - in this case the manual conversion\n // here seems to be more efficient than passing the full array\n if (isNegative && count && value[count - 1] & 0x80) {\n // Most common case i{8, 16, 32} default LE SCALE-encoded\n // For <= 32, we also optimize the xor to a single op\n switch (count) {\n case 0:\n return new _bnBnJs.BN(0);\n case 1:\n return new _bnBnJs.BN((value[0] ^ 0x0000_00ff) * -1 - 1);\n case 2:\n return new _bnBnJs.BN((value[0] + (value[1] << 8) ^ 0x0000_ffff) * -1 - 1);\n case 3:\n return new _bnBnJs.BN((value[0] + (value[1] << 8) + (value[2] << 16) ^ 0x00ff_ffff) * -1 - 1);\n case 4:\n // for the 3rd byte, we don't << 24 - since JS converts all bitwise operators to\n // 32-bit, in the case where the top-most bit is set this yields a negative value\n return new _bnBnJs.BN((value[0] + (value[1] << 8) + (value[2] << 16) + value[3] * 0x1_00_00_00 ^ 0xffff_ffff) * -1 - 1);\n case 5:\n return new _bnBnJs.BN(((value[0] + (value[1] << 8) + (value[2] << 16) + value[3] * 0x1_00_00_00 ^ 0xffff_ffff) + (value[4] ^ 0xff) * 0x1_00_00_00_00) * -1 - 1);\n case 6:\n return new _bnBnJs.BN(((value[0] + (value[1] << 8) + (value[2] << 16) + value[3] * 0x1_00_00_00 ^ 0xffff_ffff) + (value[4] + (value[5] << 8) ^ 0x0000_ffff) * 0x1_00_00_00_00) * -1 - 1);\n default:\n return new _bnBnJs.BN(value, 'le').fromTwos(count * 8);\n }\n }\n // Most common case - u{8, 16, 32} default LE SCALE-encoded\n //\n // There are some slight benefits in unrolling this specific loop,\n // however it comes with diminishing returns since here the actual\n // `new BN` does seem to take up the bulk of the time\n switch (count) {\n case 0:\n return new _bnBnJs.BN(0);\n case 1:\n return new _bnBnJs.BN(value[0]);\n case 2:\n return new _bnBnJs.BN(value[0] + (value[1] << 8));\n case 3:\n return new _bnBnJs.BN(value[0] + (value[1] << 8) + (value[2] << 16));\n case 4:\n // for the 3rd byte, we don't << 24 - since JS converts all bitwise operators to\n // 32-bit, in the case where the top-most bit is set this yields a negative value\n return new _bnBnJs.BN(value[0] + (value[1] << 8) + (value[2] << 16) + value[3] * 0x1_00_00_00);\n case 5:\n return new _bnBnJs.BN(value[0] + (value[1] << 8) + (value[2] << 16) + (value[3] + (value[4] << 8)) * 0x1_00_00_00);\n case 6:\n return new _bnBnJs.BN(value[0] + (value[1] << 8) + (value[2] << 16) + (value[3] + (value[4] << 8) + (value[5] << 16)) * 0x1_00_00_00);\n default:\n return new _bnBnJs.BN(value, 'le');\n }\n }\n});","lineCount":89,"map":[[7,2,20,0,"exports"],[7,9,20,0],[7,10,20,0,"u8aToBn"],[7,17,20,0],[7,20,20,0,"u8aToBn"],[7,27,20,0],[8,2,1,0],[8,6,1,0,"_bnBnJs"],[8,13,1,0],[8,16,1,0,"require"],[8,23,1,0],[8,24,1,0,"_dependencyMap"],[8,38,1,0],[9,2,2,0],[10,0,3,0],[11,0,4,0],[12,0,5,0],[13,0,6,0],[14,0,7,0],[15,0,8,0],[16,0,9,0],[17,0,10,0],[18,0,11,0],[19,0,12,0],[20,0,13,0],[21,0,14,0],[22,0,15,0],[23,0,16,0],[24,0,17,0],[25,0,18,0],[26,0,19,0],[27,2,20,7],[27,11,20,16,"u8aToBn"],[27,18,20,23,"u8aToBn"],[27,19,20,24,"value"],[27,24,20,29],[27,26,20,31],[28,4,20,33,"isLe"],[28,8,20,37],[28,11,20,40],[28,15,20,44],[29,4,20,46,"isNegative"],[29,14,20,56],[29,17,20,59],[30,2,20,65],[30,3,20,66],[30,6,20,69],[30,7,20,70],[30,8,20,71],[30,10,20,73],[31,4,21,4],[32,4,22,4],[33,4,23,4],[33,8,23,8],[33,9,23,9,"isLe"],[33,13,23,13],[33,15,23,15],[34,6,24,8,"value"],[34,11,24,13],[34,14,24,16,"value"],[34,19,24,21],[34,20,24,22,"slice"],[34,25,24,27],[34,26,24,28],[34,27,24,29],[34,28,24,30,"reverse"],[34,35,24,37],[34,36,24,38],[34,37,24,39],[35,4,25,4],[36,4,26,4],[36,10,26,10,"count"],[36,15,26,15],[36,18,26,18,"value"],[36,23,26,23],[36,24,26,24,"length"],[36,30,26,30],[37,4,27,4],[38,4,28,4],[39,4,29,4],[39,8,29,8,"isNegative"],[39,18,29,18],[39,22,29,22,"count"],[39,27,29,27],[39,31,29,32,"value"],[39,36,29,37],[39,37,29,38,"count"],[39,42,29,43],[39,45,29,46],[39,46,29,47],[39,47,29,48],[39,50,29,51],[39,54,29,56],[39,56,29,58],[40,6,30,8],[41,6,31,8],[42,6,32,8],[42,14,32,16,"count"],[42,19,32,21],[43,8,33,12],[43,13,33,17],[43,14,33,18],[44,10,34,16],[44,17,34,23],[44,21,34,27,"BN"],[44,28,34,29],[44,29,34,29,"BN"],[44,31,34,29],[44,32,34,30],[44,33,34,31],[44,34,34,32],[45,8,35,12],[45,13,35,17],[45,14,35,18],[46,10,36,16],[46,17,36,23],[46,21,36,27,"BN"],[46,28,36,29],[46,29,36,29,"BN"],[46,31,36,29],[46,32,36,31],[46,33,36,32,"value"],[46,38,36,37],[46,39,36,38],[46,40,36,39],[46,41,36,40],[46,44,36,43],[46,55,36,54],[46,59,36,58],[46,60,36,59],[46,61,36,60],[46,64,36,64],[46,65,36,65],[46,66,36,66],[47,8,37,12],[47,13,37,17],[47,14,37,18],[48,10,38,16],[48,17,38,23],[48,21,38,27,"BN"],[48,28,38,29],[48,29,38,29,"BN"],[48,31,38,29],[48,32,38,31],[48,33,38,33,"value"],[48,38,38,38],[48,39,38,39],[48,40,38,40],[48,41,38,41],[48,45,38,45,"value"],[48,50,38,50],[48,51,38,51],[48,52,38,52],[48,53,38,53],[48,57,38,57],[48,58,38,58],[48,59,38,59],[48,62,38,63],[48,73,38,74],[48,77,38,78],[48,78,38,79],[48,79,38,80],[48,82,38,84],[48,83,38,85],[48,84,38,86],[49,8,39,12],[49,13,39,17],[49,14,39,18],[50,10,40,16],[50,17,40,23],[50,21,40,27,"BN"],[50,28,40,29],[50,29,40,29,"BN"],[50,31,40,29],[50,32,40,31],[50,33,40,33,"value"],[50,38,40,38],[50,39,40,39],[50,40,40,40],[50,41,40,41],[50,45,40,45,"value"],[50,50,40,50],[50,51,40,51],[50,52,40,52],[50,53,40,53],[50,57,40,57],[50,58,40,58],[50,59,40,59],[50,63,40,63,"value"],[50,68,40,68],[50,69,40,69],[50,70,40,70],[50,71,40,71],[50,75,40,75],[50,77,40,77],[50,78,40,78],[50,81,40,82],[50,92,40,93],[50,96,40,97],[50,97,40,98],[50,98,40,99],[50,101,40,103],[50,102,40,104],[50,103,40,105],[51,8,41,12],[51,13,41,17],[51,14,41,18],[52,10,42,16],[53,10,43,16],[54,10,44,16],[54,17,44,23],[54,21,44,27,"BN"],[54,28,44,29],[54,29,44,29,"BN"],[54,31,44,29],[54,32,44,31],[54,33,44,33,"value"],[54,38,44,38],[54,39,44,39],[54,40,44,40],[54,41,44,41],[54,45,44,45,"value"],[54,50,44,50],[54,51,44,51],[54,52,44,52],[54,53,44,53],[54,57,44,57],[54,58,44,58],[54,59,44,59],[54,63,44,63,"value"],[54,68,44,68],[54,69,44,69],[54,70,44,70],[54,71,44,71],[54,75,44,75],[54,77,44,77],[54,78,44,78],[54,81,44,82,"value"],[54,86,44,87],[54,87,44,88],[54,88,44,89],[54,89,44,90],[54,92,44,93],[54,104,44,106],[54,107,44,110],[54,118,44,121],[54,122,44,125],[54,123,44,126],[54,124,44,127],[54,127,44,131],[54,128,44,132],[54,129,44,133],[55,8,45,12],[55,13,45,17],[55,14,45,18],[56,10,46,16],[56,17,46,23],[56,21,46,27,"BN"],[56,28,46,29],[56,29,46,29,"BN"],[56,31,46,29],[56,32,46,31],[56,33,46,32],[56,34,46,34,"value"],[56,39,46,39],[56,40,46,40],[56,41,46,41],[56,42,46,42],[56,46,46,46,"value"],[56,51,46,51],[56,52,46,52],[56,53,46,53],[56,54,46,54],[56,58,46,58],[56,59,46,59],[56,60,46,60],[56,64,46,64,"value"],[56,69,46,69],[56,70,46,70],[56,71,46,71],[56,72,46,72],[56,76,46,76],[56,78,46,78],[56,79,46,79],[56,82,46,83,"value"],[56,87,46,88],[56,88,46,89],[56,89,46,90],[56,90,46,91],[56,93,46,94],[56,105,46,107],[56,108,46,111],[56,119,46,122],[56,123,46,127],[56,124,46,128,"value"],[56,129,46,133],[56,130,46,134],[56,131,46,135],[56,132,46,136],[56,135,46,139],[56,139,46,143],[56,143,46,147],[56,158,46,163],[56,162,46,167],[56,163,46,168],[56,164,46,169],[56,167,46,173],[56,168,46,174],[56,169,46,175],[57,8,47,12],[57,13,47,17],[57,14,47,18],[58,10,48,16],[58,17,48,23],[58,21,48,27,"BN"],[58,28,48,29],[58,29,48,29,"BN"],[58,31,48,29],[58,32,48,31],[58,33,48,32],[58,34,48,34,"value"],[58,39,48,39],[58,40,48,40],[58,41,48,41],[58,42,48,42],[58,46,48,46,"value"],[58,51,48,51],[58,52,48,52],[58,53,48,53],[58,54,48,54],[58,58,48,58],[58,59,48,59],[58,60,48,60],[58,64,48,64,"value"],[58,69,48,69],[58,70,48,70],[58,71,48,71],[58,72,48,72],[58,76,48,76],[58,78,48,78],[58,79,48,79],[58,82,48,83,"value"],[58,87,48,88],[58,88,48,89],[58,89,48,90],[58,90,48,91],[58,93,48,94],[58,105,48,107],[58,108,48,111],[58,119,48,122],[58,123,48,127],[58,124,48,129,"value"],[58,129,48,134],[58,130,48,135],[58,131,48,136],[58,132,48,137],[58,136,48,141,"value"],[58,141,48,146],[58,142,48,147],[58,143,48,148],[58,144,48,149],[58,148,48,153],[58,149,48,154],[58,150,48,155],[58,153,48,159],[58,164,48,170],[58,168,48,174],[58,183,48,190],[58,187,48,194],[58,188,48,195],[58,189,48,196],[58,192,48,200],[58,193,48,201],[58,194,48,202],[59,8,49,12],[60,10,50,16],[60,17,50,23],[60,21,50,27,"BN"],[60,28,50,29],[60,29,50,29,"BN"],[60,31,50,29],[60,32,50,30,"value"],[60,37,50,35],[60,39,50,37],[60,43,50,41],[60,44,50,42],[60,45,50,43,"fromTwos"],[60,53,50,51],[60,54,50,52,"count"],[60,59,50,57],[60,62,50,60],[60,63,50,61],[60,64,50,62],[61,6,51,8],[62,4,52,4],[63,4,53,4],[64,4,54,4],[65,4,55,4],[66,4,56,4],[67,4,57,4],[68,4,58,4],[68,12,58,12,"count"],[68,17,58,17],[69,6,59,8],[69,11,59,13],[69,12,59,14],[70,8,60,12],[70,15,60,19],[70,19,60,23,"BN"],[70,26,60,25],[70,27,60,25,"BN"],[70,29,60,25],[70,30,60,26],[70,31,60,27],[70,32,60,28],[71,6,61,8],[71,11,61,13],[71,12,61,14],[72,8,62,12],[72,15,62,19],[72,19,62,23,"BN"],[72,26,62,25],[72,27,62,25,"BN"],[72,29,62,25],[72,30,62,26,"value"],[72,35,62,31],[72,36,62,32],[72,37,62,33],[72,38,62,34],[72,39,62,35],[73,6,63,8],[73,11,63,13],[73,12,63,14],[74,8,64,12],[74,15,64,19],[74,19,64,23,"BN"],[74,26,64,25],[74,27,64,25,"BN"],[74,29,64,25],[74,30,64,26,"value"],[74,35,64,31],[74,36,64,32],[74,37,64,33],[74,38,64,34],[74,42,64,38,"value"],[74,47,64,43],[74,48,64,44],[74,49,64,45],[74,50,64,46],[74,54,64,50],[74,55,64,51],[74,56,64,52],[74,57,64,53],[75,6,65,8],[75,11,65,13],[75,12,65,14],[76,8,66,12],[76,15,66,19],[76,19,66,23,"BN"],[76,26,66,25],[76,27,66,25,"BN"],[76,29,66,25],[76,30,66,26,"value"],[76,35,66,31],[76,36,66,32],[76,37,66,33],[76,38,66,34],[76,42,66,38,"value"],[76,47,66,43],[76,48,66,44],[76,49,66,45],[76,50,66,46],[76,54,66,50],[76,55,66,51],[76,56,66,52],[76,60,66,56,"value"],[76,65,66,61],[76,66,66,62],[76,67,66,63],[76,68,66,64],[76,72,66,68],[76,74,66,70],[76,75,66,71],[76,76,66,72],[77,6,67,8],[77,11,67,13],[77,12,67,14],[78,8,68,12],[79,8,69,12],[80,8,70,12],[80,15,70,19],[80,19,70,23,"BN"],[80,26,70,25],[80,27,70,25,"BN"],[80,29,70,25],[80,30,70,26,"value"],[80,35,70,31],[80,36,70,32],[80,37,70,33],[80,38,70,34],[80,42,70,38,"value"],[80,47,70,43],[80,48,70,44],[80,49,70,45],[80,50,70,46],[80,54,70,50],[80,55,70,51],[80,56,70,52],[80,60,70,56,"value"],[80,65,70,61],[80,66,70,62],[80,67,70,63],[80,68,70,64],[80,72,70,68],[80,74,70,70],[80,75,70,71],[80,78,70,75,"value"],[80,83,70,80],[80,84,70,81],[80,85,70,82],[80,86,70,83],[80,89,70,86],[80,101,70,99],[80,102,70,100],[81,6,71,8],[81,11,71,13],[81,12,71,14],[82,8,72,12],[82,15,72,19],[82,19,72,23,"BN"],[82,26,72,25],[82,27,72,25,"BN"],[82,29,72,25],[82,30,72,26,"value"],[82,35,72,31],[82,36,72,32],[82,37,72,33],[82,38,72,34],[82,42,72,38,"value"],[82,47,72,43],[82,48,72,44],[82,49,72,45],[82,50,72,46],[82,54,72,50],[82,55,72,51],[82,56,72,52],[82,60,72,56,"value"],[82,65,72,61],[82,66,72,62],[82,67,72,63],[82,68,72,64],[82,72,72,68],[82,74,72,70],[82,75,72,71],[82,78,72,75],[82,79,72,76,"value"],[82,84,72,81],[82,85,72,82],[82,86,72,83],[82,87,72,84],[82,91,72,88,"value"],[82,96,72,93],[82,97,72,94],[82,98,72,95],[82,99,72,96],[82,103,72,100],[82,104,72,101],[82,105,72,102],[82,109,72,106],[82,121,72,119],[82,122,72,120],[83,6,73,8],[83,11,73,13],[83,12,73,14],[84,8,74,12],[84,15,74,19],[84,19,74,23,"BN"],[84,26,74,25],[84,27,74,25,"BN"],[84,29,74,25],[84,30,74,26,"value"],[84,35,74,31],[84,36,74,32],[84,37,74,33],[84,38,74,34],[84,42,74,38,"value"],[84,47,74,43],[84,48,74,44],[84,49,74,45],[84,50,74,46],[84,54,74,50],[84,55,74,51],[84,56,74,52],[84,60,74,56,"value"],[84,65,74,61],[84,66,74,62],[84,67,74,63],[84,68,74,64],[84,72,74,68],[84,74,74,70],[84,75,74,71],[84,78,74,75],[84,79,74,76,"value"],[84,84,74,81],[84,85,74,82],[84,86,74,83],[84,87,74,84],[84,91,74,88,"value"],[84,96,74,93],[84,97,74,94],[84,98,74,95],[84,99,74,96],[84,103,74,100],[84,104,74,101],[84,105,74,102],[84,109,74,106,"value"],[84,114,74,111],[84,115,74,112],[84,116,74,113],[84,117,74,114],[84,121,74,118],[84,123,74,120],[84,124,74,121],[84,128,74,125],[84,140,74,138],[84,141,74,139],[85,6,75,8],[86,8,76,12],[86,15,76,19],[86,19,76,23,"BN"],[86,26,76,25],[86,27,76,25,"BN"],[86,29,76,25],[86,30,76,26,"value"],[86,35,76,31],[86,37,76,33],[86,41,76,37],[86,42,76,38],[87,4,77,4],[88,2,78,0],[89,0,78,1],[89,3]],"functionMap":{"names":["<global>","u8aToBn"],"mappings":"AAA;OCmB;CD0D"},"hasCjsExports":false},"type":"js/module"}]}