Files
pezkuwi-mobile-app/frontend/.metro-cache/cache/cb/7ee745ee67d7912e0c2f2fa8d4a9594d178ac00cbf72b1b5829bb7b9e48b61718df67a
T
2025-11-07 20:14:32 +00:00

1 line
7.3 KiB
Plaintext

{"dependencies":[],"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.hexToU8a = hexToU8a;\n const CHR = '0123456789abcdef';\n const U8 = new Uint8Array(256);\n const U16 = new Uint8Array(256 * 256);\n for (let i = 0, count = CHR.length; i < count; i++) {\n U8[CHR[i].charCodeAt(0) | 0] = i | 0;\n if (i > 9) {\n U8[CHR[i].toUpperCase().charCodeAt(0) | 0] = i | 0;\n }\n }\n for (let i = 0; i < 256; i++) {\n const s = i << 8;\n for (let j = 0; j < 256; j++) {\n U16[s | j] = U8[i] << 4 | U8[j];\n }\n }\n /**\n * @name hexToU8a\n * @summary Creates a Uint8Array object from a hex string.\n * @description\n * `null` inputs returns an empty `Uint8Array` result. Hex input values return the actual bytes value converted to a Uint8Array. Anything that is not a hex string (including the `0x` prefix) throws an error.\n * @example\n * <BR>\n *\n * ```javascript\n * import { hexToU8a } from '@polkadot/util';\n *\n * hexToU8a('0x80001f'); // Uint8Array([0x80, 0x00, 0x1f])\n * hexToU8a('0x80001f', 32); // Uint8Array([0x00, 0x80, 0x00, 0x1f])\n * ```\n */\n function hexToU8a(value, bitLength = -1) {\n if (!value) {\n return new Uint8Array();\n }\n let s = value.startsWith('0x') ? 2 : 0;\n const decLength = Math.ceil((value.length - s) / 2);\n const endLength = Math.ceil(bitLength === -1 ? decLength : bitLength / 8);\n const result = new Uint8Array(endLength);\n const offset = endLength > decLength ? endLength - decLength : 0;\n for (let i = offset; i < endLength; i++, s += 2) {\n // The big factor here is actually the string lookups. If we do\n // HEX_TO_U16[value.substring()] we get an 10x slowdown. In the\n // same vein using charCodeAt (as opposed to value[s] or value.charAt(s)) is\n // also the faster operation by at least 2x with the character map above\n result[i] = U16[value.charCodeAt(s) << 8 | value.charCodeAt(s + 1)];\n }\n return result;\n }\n});","lineCount":56,"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,"hexToU8a"],[7,18,3,16],[7,21,3,19,"hexToU8a"],[7,29,3,27],[8,2,4,0],[8,8,4,6,"CHR"],[8,11,4,9],[8,14,4,12],[8,32,4,30],[9,2,5,0],[9,8,5,6,"U8"],[9,10,5,8],[9,13,5,11],[9,17,5,15,"Uint8Array"],[9,27,5,25],[9,28,5,26],[9,31,5,29],[9,32,5,30],[10,2,6,0],[10,8,6,6,"U16"],[10,11,6,9],[10,14,6,12],[10,18,6,16,"Uint8Array"],[10,28,6,26],[10,29,6,27],[10,32,6,30],[10,35,6,33],[10,38,6,36],[10,39,6,37],[11,2,7,0],[11,7,7,5],[11,11,7,9,"i"],[11,12,7,10],[11,15,7,13],[11,16,7,14],[11,18,7,16,"count"],[11,23,7,21],[11,26,7,24,"CHR"],[11,29,7,27],[11,30,7,28,"length"],[11,36,7,34],[11,38,7,36,"i"],[11,39,7,37],[11,42,7,40,"count"],[11,47,7,45],[11,49,7,47,"i"],[11,50,7,48],[11,52,7,50],[11,54,7,52],[12,4,8,4,"U8"],[12,6,8,6],[12,7,8,7,"CHR"],[12,10,8,10],[12,11,8,11,"i"],[12,12,8,12],[12,13,8,13],[12,14,8,14,"charCodeAt"],[12,24,8,24],[12,25,8,25],[12,26,8,26],[12,27,8,27],[12,30,8,30],[12,31,8,31],[12,32,8,32],[12,35,8,35,"i"],[12,36,8,36],[12,39,8,39],[12,40,8,40],[13,4,9,4],[13,8,9,8,"i"],[13,9,9,9],[13,12,9,12],[13,13,9,13],[13,15,9,15],[14,6,10,8,"U8"],[14,8,10,10],[14,9,10,11,"CHR"],[14,12,10,14],[14,13,10,15,"i"],[14,14,10,16],[14,15,10,17],[14,16,10,18,"toUpperCase"],[14,27,10,29],[14,28,10,30],[14,29,10,31],[14,30,10,32,"charCodeAt"],[14,40,10,42],[14,41,10,43],[14,42,10,44],[14,43,10,45],[14,46,10,48],[14,47,10,49],[14,48,10,50],[14,51,10,53,"i"],[14,52,10,54],[14,55,10,57],[14,56,10,58],[15,4,11,4],[16,2,12,0],[17,2,13,0],[17,7,13,5],[17,11,13,9,"i"],[17,12,13,10],[17,15,13,13],[17,16,13,14],[17,18,13,16,"i"],[17,19,13,17],[17,22,13,20],[17,25,13,23],[17,27,13,25,"i"],[17,28,13,26],[17,30,13,28],[17,32,13,30],[18,4,14,4],[18,10,14,10,"s"],[18,11,14,11],[18,14,14,14,"i"],[18,15,14,15],[18,19,14,19],[18,20,14,20],[19,4,15,4],[19,9,15,9],[19,13,15,13,"j"],[19,14,15,14],[19,17,15,17],[19,18,15,18],[19,20,15,20,"j"],[19,21,15,21],[19,24,15,24],[19,27,15,27],[19,29,15,29,"j"],[19,30,15,30],[19,32,15,32],[19,34,15,34],[20,6,16,8,"U16"],[20,9,16,11],[20,10,16,12,"s"],[20,11,16,13],[20,14,16,16,"j"],[20,15,16,17],[20,16,16,18],[20,19,16,22,"U8"],[20,21,16,24],[20,22,16,25,"i"],[20,23,16,26],[20,24,16,27],[20,28,16,31],[20,29,16,32],[20,32,16,36,"U8"],[20,34,16,38],[20,35,16,39,"j"],[20,36,16,40],[20,37,16,41],[21,4,17,4],[22,2,18,0],[23,2,19,0],[24,0,20,0],[25,0,21,0],[26,0,22,0],[27,0,23,0],[28,0,24,0],[29,0,25,0],[30,0,26,0],[31,0,27,0],[32,0,28,0],[33,0,29,0],[34,0,30,0],[35,0,31,0],[36,0,32,0],[37,0,33,0],[38,2,34,0],[38,11,34,9,"hexToU8a"],[38,19,34,17,"hexToU8a"],[38,20,34,18,"value"],[38,25,34,23],[38,27,34,25,"bitLength"],[38,36,34,34],[38,39,34,37],[38,40,34,38],[38,41,34,39],[38,43,34,41],[39,4,35,4],[39,8,35,8],[39,9,35,9,"value"],[39,14,35,14],[39,16,35,16],[40,6,36,8],[40,13,36,15],[40,17,36,19,"Uint8Array"],[40,27,36,29],[40,28,36,30],[40,29,36,31],[41,4,37,4],[42,4,38,4],[42,8,38,8,"s"],[42,9,38,9],[42,12,38,12,"value"],[42,17,38,17],[42,18,38,18,"startsWith"],[42,28,38,28],[42,29,38,29],[42,33,38,33],[42,34,38,34],[42,37,39,10],[42,38,39,11],[42,41,40,10],[42,42,40,11],[43,4,41,4],[43,10,41,10,"decLength"],[43,19,41,19],[43,22,41,22,"Math"],[43,26,41,26],[43,27,41,27,"ceil"],[43,31,41,31],[43,32,41,32],[43,33,41,33,"value"],[43,38,41,38],[43,39,41,39,"length"],[43,45,41,45],[43,48,41,48,"s"],[43,49,41,49],[43,53,41,53],[43,54,41,54],[43,55,41,55],[44,4,42,4],[44,10,42,10,"endLength"],[44,19,42,19],[44,22,42,22,"Math"],[44,26,42,26],[44,27,42,27,"ceil"],[44,31,42,31],[44,32,42,32,"bitLength"],[44,41,42,41],[44,46,42,46],[44,47,42,47],[44,48,42,48],[44,51,43,10,"decLength"],[44,60,43,19],[44,63,44,10,"bitLength"],[44,72,44,19],[44,75,44,22],[44,76,44,23],[44,77,44,24],[45,4,45,4],[45,10,45,10,"result"],[45,16,45,16],[45,19,45,19],[45,23,45,23,"Uint8Array"],[45,33,45,33],[45,34,45,34,"endLength"],[45,43,45,43],[45,44,45,44],[46,4,46,4],[46,10,46,10,"offset"],[46,16,46,16],[46,19,46,19,"endLength"],[46,28,46,28],[46,31,46,31,"decLength"],[46,40,46,40],[46,43,47,10,"endLength"],[46,52,47,19],[46,55,47,22,"decLength"],[46,64,47,31],[46,67,48,10],[46,68,48,11],[47,4,49,4],[47,9,49,9],[47,13,49,13,"i"],[47,14,49,14],[47,17,49,17,"offset"],[47,23,49,23],[47,25,49,25,"i"],[47,26,49,26],[47,29,49,29,"endLength"],[47,38,49,38],[47,40,49,40,"i"],[47,41,49,41],[47,43,49,43],[47,45,49,45,"s"],[47,46,49,46],[47,50,49,50],[47,51,49,51],[47,53,49,53],[48,6,50,8],[49,6,51,8],[50,6,52,8],[51,6,53,8],[52,6,54,8,"result"],[52,12,54,14],[52,13,54,15,"i"],[52,14,54,16],[52,15,54,17],[52,18,54,20,"U16"],[52,21,54,23],[52,22,54,25,"value"],[52,27,54,30],[52,28,54,31,"charCodeAt"],[52,38,54,41],[52,39,54,42,"s"],[52,40,54,43],[52,41,54,44],[52,45,54,48],[52,46,54,49],[52,49,54,53,"value"],[52,54,54,58],[52,55,54,59,"charCodeAt"],[52,65,54,69],[52,66,54,70,"s"],[52,67,54,71],[52,70,54,74],[52,71,54,75],[52,72,54,76],[52,73,54,77],[53,4,55,4],[54,4,56,4],[54,11,56,11,"result"],[54,17,56,17],[55,2,57,0],[56,0,57,1],[56,3]],"functionMap":{"names":["<global>","hexToU8a"],"mappings":"AAA;ACiC;CDuB"},"hasCjsExports":true},"type":"js/module"}]}