Files
pezkuwi-mobile-app/frontend/.metro-cache/cache/97/b64dfff4cc92740289e9a864e18a91287d9bf549d3e1e152f9454c7ee25758a11f4641
T
2025-11-08 07:19:17 +00:00

1 line
14 KiB
Plaintext

{"dependencies":[{"name":"../bn/bn.js","data":{"asyncType":null,"isESMImport":false,"locs":[{"start":{"line":4,"column":16,"index":120},"end":{"line":4,"column":38,"index":142}}],"key":"94jLUD3K1mDUvWzcKqzUyJN5xw0=","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 const bn_js_1 = 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 bn_js_1.BN(0);\n case 1:\n return new bn_js_1.BN((value[0] ^ 0x0000_00ff) * -1 - 1);\n case 2:\n return new bn_js_1.BN((value[0] + (value[1] << 8) ^ 0x0000_ffff) * -1 - 1);\n case 3:\n return new bn_js_1.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 bn_js_1.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 bn_js_1.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 bn_js_1.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 bn_js_1.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 bn_js_1.BN(0);\n case 1:\n return new bn_js_1.BN(value[0]);\n case 2:\n return new bn_js_1.BN(value[0] + (value[1] << 8));\n case 3:\n return new bn_js_1.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 bn_js_1.BN(value[0] + (value[1] << 8) + (value[2] << 16) + value[3] * 0x1_00_00_00);\n case 5:\n return new bn_js_1.BN(value[0] + (value[1] << 8) + (value[2] << 16) + (value[3] + (value[4] << 8)) * 0x1_00_00_00);\n case 6:\n return new bn_js_1.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 bn_js_1.BN(value, 'le');\n }\n }\n});","lineCount":89,"map":[[2,2,1,0],[2,14,1,12],[4,2,2,0,"Object"],[4,8,2,6],[4,9,2,7,"defineProperty"],[4,23,2,21],[4,24,2,22,"exports"],[4,31,2,29],[4,33,2,31],[4,45,2,43],[4,47,2,45],[5,4,2,47,"value"],[5,9,2,52],[5,11,2,54],[6,2,2,59],[6,3,2,60],[6,4,2,61],[7,2,3,0,"exports"],[7,9,3,7],[7,10,3,8,"u8aToBn"],[7,17,3,15],[7,20,3,18,"u8aToBn"],[7,27,3,25],[8,2,4,0],[8,8,4,6,"bn_js_1"],[8,15,4,13],[8,18,4,16,"require"],[8,25,4,23],[8,26,4,23,"_dependencyMap"],[8,40,4,23],[8,58,4,37],[8,59,4,38],[9,2,5,0],[10,0,6,0],[11,0,7,0],[12,0,8,0],[13,0,9,0],[14,0,10,0],[15,0,11,0],[16,0,12,0],[17,0,13,0],[18,0,14,0],[19,0,15,0],[20,0,16,0],[21,0,17,0],[22,0,18,0],[23,0,19,0],[24,0,20,0],[25,0,21,0],[26,0,22,0],[27,2,23,0],[27,11,23,9,"u8aToBn"],[27,18,23,16,"u8aToBn"],[27,19,23,17,"value"],[27,24,23,22],[27,26,23,24],[28,4,23,26,"isLe"],[28,8,23,30],[28,11,23,33],[28,15,23,37],[29,4,23,39,"isNegative"],[29,14,23,49],[29,17,23,52],[30,2,23,58],[30,3,23,59],[30,6,23,62],[30,7,23,63],[30,8,23,64],[30,10,23,66],[31,4,24,4],[32,4,25,4],[33,4,26,4],[33,8,26,8],[33,9,26,9,"isLe"],[33,13,26,13],[33,15,26,15],[34,6,27,8,"value"],[34,11,27,13],[34,14,27,16,"value"],[34,19,27,21],[34,20,27,22,"slice"],[34,25,27,27],[34,26,27,28],[34,27,27,29],[34,28,27,30,"reverse"],[34,35,27,37],[34,36,27,38],[34,37,27,39],[35,4,28,4],[36,4,29,4],[36,10,29,10,"count"],[36,15,29,15],[36,18,29,18,"value"],[36,23,29,23],[36,24,29,24,"length"],[36,30,29,30],[37,4,30,4],[38,4,31,4],[39,4,32,4],[39,8,32,8,"isNegative"],[39,18,32,18],[39,22,32,22,"count"],[39,27,32,27],[39,31,32,32,"value"],[39,36,32,37],[39,37,32,38,"count"],[39,42,32,43],[39,45,32,46],[39,46,32,47],[39,47,32,48],[39,50,32,51],[39,54,32,56],[39,56,32,58],[40,6,33,8],[41,6,34,8],[42,6,35,8],[42,14,35,16,"count"],[42,19,35,21],[43,8,36,12],[43,13,36,17],[43,14,36,18],[44,10,37,16],[44,17,37,23],[44,21,37,27,"bn_js_1"],[44,28,37,34],[44,29,37,35,"BN"],[44,31,37,37],[44,32,37,38],[44,33,37,39],[44,34,37,40],[45,8,38,12],[45,13,38,17],[45,14,38,18],[46,10,39,16],[46,17,39,23],[46,21,39,27,"bn_js_1"],[46,28,39,34],[46,29,39,35,"BN"],[46,31,39,37],[46,32,39,39],[46,33,39,40,"value"],[46,38,39,45],[46,39,39,46],[46,40,39,47],[46,41,39,48],[46,44,39,51],[46,55,39,62],[46,59,39,66],[46,60,39,67],[46,61,39,68],[46,64,39,72],[46,65,39,73],[46,66,39,74],[47,8,40,12],[47,13,40,17],[47,14,40,18],[48,10,41,16],[48,17,41,23],[48,21,41,27,"bn_js_1"],[48,28,41,34],[48,29,41,35,"BN"],[48,31,41,37],[48,32,41,39],[48,33,41,41,"value"],[48,38,41,46],[48,39,41,47],[48,40,41,48],[48,41,41,49],[48,45,41,53,"value"],[48,50,41,58],[48,51,41,59],[48,52,41,60],[48,53,41,61],[48,57,41,65],[48,58,41,66],[48,59,41,67],[48,62,41,71],[48,73,41,82],[48,77,41,86],[48,78,41,87],[48,79,41,88],[48,82,41,92],[48,83,41,93],[48,84,41,94],[49,8,42,12],[49,13,42,17],[49,14,42,18],[50,10,43,16],[50,17,43,23],[50,21,43,27,"bn_js_1"],[50,28,43,34],[50,29,43,35,"BN"],[50,31,43,37],[50,32,43,39],[50,33,43,41,"value"],[50,38,43,46],[50,39,43,47],[50,40,43,48],[50,41,43,49],[50,45,43,53,"value"],[50,50,43,58],[50,51,43,59],[50,52,43,60],[50,53,43,61],[50,57,43,65],[50,58,43,66],[50,59,43,67],[50,63,43,71,"value"],[50,68,43,76],[50,69,43,77],[50,70,43,78],[50,71,43,79],[50,75,43,83],[50,77,43,85],[50,78,43,86],[50,81,43,90],[50,92,43,101],[50,96,43,105],[50,97,43,106],[50,98,43,107],[50,101,43,111],[50,102,43,112],[50,103,43,113],[51,8,44,12],[51,13,44,17],[51,14,44,18],[52,10,45,16],[53,10,46,16],[54,10,47,16],[54,17,47,23],[54,21,47,27,"bn_js_1"],[54,28,47,34],[54,29,47,35,"BN"],[54,31,47,37],[54,32,47,39],[54,33,47,41,"value"],[54,38,47,46],[54,39,47,47],[54,40,47,48],[54,41,47,49],[54,45,47,53,"value"],[54,50,47,58],[54,51,47,59],[54,52,47,60],[54,53,47,61],[54,57,47,65],[54,58,47,66],[54,59,47,67],[54,63,47,71,"value"],[54,68,47,76],[54,69,47,77],[54,70,47,78],[54,71,47,79],[54,75,47,83],[54,77,47,85],[54,78,47,86],[54,81,47,90,"value"],[54,86,47,95],[54,87,47,96],[54,88,47,97],[54,89,47,98],[54,92,47,101],[54,104,47,114],[54,107,47,118],[54,118,47,129],[54,122,47,133],[54,123,47,134],[54,124,47,135],[54,127,47,139],[54,128,47,140],[54,129,47,141],[55,8,48,12],[55,13,48,17],[55,14,48,18],[56,10,49,16],[56,17,49,23],[56,21,49,27,"bn_js_1"],[56,28,49,34],[56,29,49,35,"BN"],[56,31,49,37],[56,32,49,39],[56,33,49,40],[56,34,49,42,"value"],[56,39,49,47],[56,40,49,48],[56,41,49,49],[56,42,49,50],[56,46,49,54,"value"],[56,51,49,59],[56,52,49,60],[56,53,49,61],[56,54,49,62],[56,58,49,66],[56,59,49,67],[56,60,49,68],[56,64,49,72,"value"],[56,69,49,77],[56,70,49,78],[56,71,49,79],[56,72,49,80],[56,76,49,84],[56,78,49,86],[56,79,49,87],[56,82,49,91,"value"],[56,87,49,96],[56,88,49,97],[56,89,49,98],[56,90,49,99],[56,93,49,102],[56,105,49,115],[56,108,49,119],[56,119,49,130],[56,123,49,135],[56,124,49,136,"value"],[56,129,49,141],[56,130,49,142],[56,131,49,143],[56,132,49,144],[56,135,49,147],[56,139,49,151],[56,143,49,155],[56,158,49,171],[56,162,49,175],[56,163,49,176],[56,164,49,177],[56,167,49,181],[56,168,49,182],[56,169,49,183],[57,8,50,12],[57,13,50,17],[57,14,50,18],[58,10,51,16],[58,17,51,23],[58,21,51,27,"bn_js_1"],[58,28,51,34],[58,29,51,35,"BN"],[58,31,51,37],[58,32,51,39],[58,33,51,40],[58,34,51,42,"value"],[58,39,51,47],[58,40,51,48],[58,41,51,49],[58,42,51,50],[58,46,51,54,"value"],[58,51,51,59],[58,52,51,60],[58,53,51,61],[58,54,51,62],[58,58,51,66],[58,59,51,67],[58,60,51,68],[58,64,51,72,"value"],[58,69,51,77],[58,70,51,78],[58,71,51,79],[58,72,51,80],[58,76,51,84],[58,78,51,86],[58,79,51,87],[58,82,51,91,"value"],[58,87,51,96],[58,88,51,97],[58,89,51,98],[58,90,51,99],[58,93,51,102],[58,105,51,115],[58,108,51,119],[58,119,51,130],[58,123,51,135],[58,124,51,137,"value"],[58,129,51,142],[58,130,51,143],[58,131,51,144],[58,132,51,145],[58,136,51,149,"value"],[58,141,51,154],[58,142,51,155],[58,143,51,156],[58,144,51,157],[58,148,51,161],[58,149,51,162],[58,150,51,163],[58,153,51,167],[58,164,51,178],[58,168,51,182],[58,183,51,198],[58,187,51,202],[58,188,51,203],[58,189,51,204],[58,192,51,208],[58,193,51,209],[58,194,51,210],[59,8,52,12],[60,10,53,16],[60,17,53,23],[60,21,53,27,"bn_js_1"],[60,28,53,34],[60,29,53,35,"BN"],[60,31,53,37],[60,32,53,38,"value"],[60,37,53,43],[60,39,53,45],[60,43,53,49],[60,44,53,50],[60,45,53,51,"fromTwos"],[60,53,53,59],[60,54,53,60,"count"],[60,59,53,65],[60,62,53,68],[60,63,53,69],[60,64,53,70],[61,6,54,8],[62,4,55,4],[63,4,56,4],[64,4,57,4],[65,4,58,4],[66,4,59,4],[67,4,60,4],[68,4,61,4],[68,12,61,12,"count"],[68,17,61,17],[69,6,62,8],[69,11,62,13],[69,12,62,14],[70,8,63,12],[70,15,63,19],[70,19,63,23,"bn_js_1"],[70,26,63,30],[70,27,63,31,"BN"],[70,29,63,33],[70,30,63,34],[70,31,63,35],[70,32,63,36],[71,6,64,8],[71,11,64,13],[71,12,64,14],[72,8,65,12],[72,15,65,19],[72,19,65,23,"bn_js_1"],[72,26,65,30],[72,27,65,31,"BN"],[72,29,65,33],[72,30,65,34,"value"],[72,35,65,39],[72,36,65,40],[72,37,65,41],[72,38,65,42],[72,39,65,43],[73,6,66,8],[73,11,66,13],[73,12,66,14],[74,8,67,12],[74,15,67,19],[74,19,67,23,"bn_js_1"],[74,26,67,30],[74,27,67,31,"BN"],[74,29,67,33],[74,30,67,34,"value"],[74,35,67,39],[74,36,67,40],[74,37,67,41],[74,38,67,42],[74,42,67,46,"value"],[74,47,67,51],[74,48,67,52],[74,49,67,53],[74,50,67,54],[74,54,67,58],[74,55,67,59],[74,56,67,60],[74,57,67,61],[75,6,68,8],[75,11,68,13],[75,12,68,14],[76,8,69,12],[76,15,69,19],[76,19,69,23,"bn_js_1"],[76,26,69,30],[76,27,69,31,"BN"],[76,29,69,33],[76,30,69,34,"value"],[76,35,69,39],[76,36,69,40],[76,37,69,41],[76,38,69,42],[76,42,69,46,"value"],[76,47,69,51],[76,48,69,52],[76,49,69,53],[76,50,69,54],[76,54,69,58],[76,55,69,59],[76,56,69,60],[76,60,69,64,"value"],[76,65,69,69],[76,66,69,70],[76,67,69,71],[76,68,69,72],[76,72,69,76],[76,74,69,78],[76,75,69,79],[76,76,69,80],[77,6,70,8],[77,11,70,13],[77,12,70,14],[78,8,71,12],[79,8,72,12],[80,8,73,12],[80,15,73,19],[80,19,73,23,"bn_js_1"],[80,26,73,30],[80,27,73,31,"BN"],[80,29,73,33],[80,30,73,34,"value"],[80,35,73,39],[80,36,73,40],[80,37,73,41],[80,38,73,42],[80,42,73,46,"value"],[80,47,73,51],[80,48,73,52],[80,49,73,53],[80,50,73,54],[80,54,73,58],[80,55,73,59],[80,56,73,60],[80,60,73,64,"value"],[80,65,73,69],[80,66,73,70],[80,67,73,71],[80,68,73,72],[80,72,73,76],[80,74,73,78],[80,75,73,79],[80,78,73,83,"value"],[80,83,73,88],[80,84,73,89],[80,85,73,90],[80,86,73,91],[80,89,73,94],[80,101,73,107],[80,102,73,108],[81,6,74,8],[81,11,74,13],[81,12,74,14],[82,8,75,12],[82,15,75,19],[82,19,75,23,"bn_js_1"],[82,26,75,30],[82,27,75,31,"BN"],[82,29,75,33],[82,30,75,34,"value"],[82,35,75,39],[82,36,75,40],[82,37,75,41],[82,38,75,42],[82,42,75,46,"value"],[82,47,75,51],[82,48,75,52],[82,49,75,53],[82,50,75,54],[82,54,75,58],[82,55,75,59],[82,56,75,60],[82,60,75,64,"value"],[82,65,75,69],[82,66,75,70],[82,67,75,71],[82,68,75,72],[82,72,75,76],[82,74,75,78],[82,75,75,79],[82,78,75,83],[82,79,75,84,"value"],[82,84,75,89],[82,85,75,90],[82,86,75,91],[82,87,75,92],[82,91,75,96,"value"],[82,96,75,101],[82,97,75,102],[82,98,75,103],[82,99,75,104],[82,103,75,108],[82,104,75,109],[82,105,75,110],[82,109,75,114],[82,121,75,127],[82,122,75,128],[83,6,76,8],[83,11,76,13],[83,12,76,14],[84,8,77,12],[84,15,77,19],[84,19,77,23,"bn_js_1"],[84,26,77,30],[84,27,77,31,"BN"],[84,29,77,33],[84,30,77,34,"value"],[84,35,77,39],[84,36,77,40],[84,37,77,41],[84,38,77,42],[84,42,77,46,"value"],[84,47,77,51],[84,48,77,52],[84,49,77,53],[84,50,77,54],[84,54,77,58],[84,55,77,59],[84,56,77,60],[84,60,77,64,"value"],[84,65,77,69],[84,66,77,70],[84,67,77,71],[84,68,77,72],[84,72,77,76],[84,74,77,78],[84,75,77,79],[84,78,77,83],[84,79,77,84,"value"],[84,84,77,89],[84,85,77,90],[84,86,77,91],[84,87,77,92],[84,91,77,96,"value"],[84,96,77,101],[84,97,77,102],[84,98,77,103],[84,99,77,104],[84,103,77,108],[84,104,77,109],[84,105,77,110],[84,109,77,114,"value"],[84,114,77,119],[84,115,77,120],[84,116,77,121],[84,117,77,122],[84,121,77,126],[84,123,77,128],[84,124,77,129],[84,128,77,133],[84,140,77,146],[84,141,77,147],[85,6,78,8],[86,8,79,12],[86,15,79,19],[86,19,79,23,"bn_js_1"],[86,26,79,30],[86,27,79,31,"BN"],[86,29,79,33],[86,30,79,34,"value"],[86,35,79,39],[86,37,79,41],[86,41,79,45],[86,42,79,46],[87,4,80,4],[88,2,81,0],[89,0,81,1],[89,3]],"functionMap":{"names":["<global>","u8aToBn"],"mappings":"AAA;ACsB;CD0D"},"hasCjsExports":true},"type":"js/module"}]}