mirror of
https://github.com/pezkuwichain/pezkuwi-mobile-app.git
synced 2026-05-30 14:31:02 +00:00
1 line
15 KiB
Plaintext
1 line
15 KiB
Plaintext
{"dependencies":[{"name":"@polkadot/util","data":{"asyncType":null,"isESMImport":false,"locs":[{"start":{"line":6,"column":15,"index":203},"end":{"line":6,"column":40,"index":228}}],"key":"u0mzEw2nilnHoUWtEdZl0JKHutA=","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.decodeU8a = decodeU8a;\n exports.decodeU8aStruct = decodeU8aStruct;\n exports.decodeU8aVec = decodeU8aVec;\n const util_1 = require(_dependencyMap[0], \"@polkadot/util\");\n const MAX_DEPTH = 1024;\n /** @internal */\n function isComplexType(Type) {\n const typeName = Type.name?.toLowerCase() || '';\n return ['enum', 'hashmap', 'linkage', 'null', 'option', 'range', 'rangeinclusive', 'result', 'struct', 'tuple', 'vec', 'vecfixed'].includes(typeName);\n }\n /** @internal */\n function formatFailure(registry, fn, _result, {\n message\n }, u8a, i, count, Type, key) {\n let type = '';\n try {\n type = `: ${new Type(registry).toRawType()}`;\n } catch {\n // ignore\n }\n // This is extra debugging info (we most-probably want this in in some way, shape or form,\n // but at this point not quite sure how to include and format it (it can be quite massive)\n // console.error(JSON.stringify(result, null, 2));\n return `${fn}: failed at ${(0, util_1.u8aToHex)(u8a.subarray(0, 16))}…${key ? ` on ${key}` : ''} (index ${i + 1}/${count})${type}:: ${message}`;\n }\n /**\n * @internal\n *\n * Given an u8a, and an array of Type constructors, decode the u8a against the\n * types, and return an array of decoded values.\n *\n * @param u8a - The u8a to decode.\n * @param result - The result array (will be returned with values pushed)\n * @param types - The array of CodecClass to decode the U8a against.\n */\n function decodeU8a(registry, result, u8a, [Types, keys]) {\n const count = result.length;\n let offset = 0;\n let i = 0;\n try {\n while (i < count) {\n const value = new Types[i](registry, u8a.subarray(offset));\n offset += value.initialU8aLength || value.encodedLength;\n result[i] = value;\n i++;\n }\n } catch (error) {\n throw new Error(formatFailure(registry, 'decodeU8a', result, error, u8a.subarray(offset), i, count, Types[i], keys[i]));\n }\n return [result, offset];\n }\n /**\n * @internal\n *\n * Split from decodeU8a since this is specialized to zip returns ... while we duplicate, this\n * is all on the hot-path, so it is not great, however there is (some) method behind the madness\n */\n function decodeU8aStruct(registry, result, u8a, [Types, keys]) {\n const count = result.length;\n let offset = 0;\n let i = 0;\n if (count > MAX_DEPTH && isComplexType(Types[i])) {\n throw new Error(`decodeU8aStruct: Maximum depth exceeded, received ${count} elements, limit ${MAX_DEPTH}`);\n }\n try {\n while (i < count) {\n const value = new Types[i](registry, u8a.subarray(offset));\n offset += value.initialU8aLength || value.encodedLength;\n result[i] = [keys[i], value];\n i++;\n }\n } catch (error) {\n throw new Error(formatFailure(registry, 'decodeU8aStruct', result, error, u8a.subarray(offset), i, count, Types[i], keys[i]));\n }\n return [result, offset];\n }\n /**\n * @internal\n *\n * Split from decodeU8a since this is specialized to 1 instance ... while we duplicate, this\n * is all on the hot-path, so it is not great, however there is (some) method behind the madness\n */\n function decodeU8aVec(registry, result, u8a, startAt, Type) {\n const count = result.length;\n if (count > MAX_DEPTH && isComplexType(Type)) {\n throw new Error(`decodeU8aVec: Maximum depth exceeded, received ${count} elements, limit ${MAX_DEPTH}`);\n }\n let offset = startAt;\n let i = 0;\n try {\n while (i < count) {\n const value = new Type(registry, u8a.subarray(offset));\n offset += value.initialU8aLength || value.encodedLength;\n result[i] = value;\n i++;\n }\n } catch (error) {\n throw new Error(formatFailure(registry, 'decodeU8aVec', result, error, u8a.subarray(offset), i, count, Type));\n }\n return [offset, offset - startAt];\n }\n});","lineCount":108,"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,"decodeU8a"],[7,19,3,17],[7,22,3,20,"decodeU8a"],[7,31,3,29],[8,2,4,0,"exports"],[8,9,4,7],[8,10,4,8,"decodeU8aStruct"],[8,25,4,23],[8,28,4,26,"decodeU8aStruct"],[8,43,4,41],[9,2,5,0,"exports"],[9,9,5,7],[9,10,5,8,"decodeU8aVec"],[9,22,5,20],[9,25,5,23,"decodeU8aVec"],[9,37,5,35],[10,2,6,0],[10,8,6,6,"util_1"],[10,14,6,12],[10,17,6,15,"require"],[10,24,6,22],[10,25,6,22,"_dependencyMap"],[10,39,6,22],[10,60,6,39],[10,61,6,40],[11,2,7,0],[11,8,7,6,"MAX_DEPTH"],[11,17,7,15],[11,20,7,18],[11,24,7,22],[12,2,8,0],[13,2,9,0],[13,11,9,9,"isComplexType"],[13,24,9,22,"isComplexType"],[13,25,9,23,"Type"],[13,29,9,27],[13,31,9,29],[14,4,10,4],[14,10,10,10,"typeName"],[14,18,10,18],[14,21,10,21,"Type"],[14,25,10,25],[14,26,10,26,"name"],[14,30,10,30],[14,32,10,32,"toLowerCase"],[14,43,10,43],[14,44,10,44],[14,45,10,45],[14,49,10,49],[14,51,10,51],[15,4,11,4],[15,11,11,11],[15,12,11,12],[15,18,11,18],[15,20,11,20],[15,29,11,29],[15,31,11,31],[15,40,11,40],[15,42,11,42],[15,48,11,48],[15,50,11,50],[15,58,11,58],[15,60,11,60],[15,67,11,67],[15,69,11,69],[15,85,11,85],[15,87,11,87],[15,95,11,95],[15,97,11,97],[15,105,11,105],[15,107,11,107],[15,114,11,114],[15,116,11,116],[15,121,11,121],[15,123,11,123],[15,133,11,133],[15,134,11,134],[15,135,11,135,"includes"],[15,143,11,143],[15,144,11,144,"typeName"],[15,152,11,152],[15,153,11,153],[16,2,12,0],[17,2,13,0],[18,2,14,0],[18,11,14,9,"formatFailure"],[18,24,14,22,"formatFailure"],[18,25,14,23,"registry"],[18,33,14,31],[18,35,14,33,"fn"],[18,37,14,35],[18,39,14,37,"_result"],[18,46,14,44],[18,48,14,46],[19,4,14,48,"message"],[20,2,14,56],[20,3,14,57],[20,5,14,59,"u8a"],[20,8,14,62],[20,10,14,64,"i"],[20,11,14,65],[20,13,14,67,"count"],[20,18,14,72],[20,20,14,74,"Type"],[20,24,14,78],[20,26,14,80,"key"],[20,29,14,83],[20,31,14,85],[21,4,15,4],[21,8,15,8,"type"],[21,12,15,12],[21,15,15,15],[21,17,15,17],[22,4,16,4],[22,8,16,8],[23,6,17,8,"type"],[23,10,17,12],[23,13,17,15],[23,18,17,20],[23,22,17,24,"Type"],[23,26,17,28],[23,27,17,29,"registry"],[23,35,17,37],[23,36,17,38],[23,37,17,39,"toRawType"],[23,46,17,48],[23,47,17,49],[23,48,17,50],[23,50,17,52],[24,4,18,4],[24,5,18,5],[24,6,19,4],[24,12,19,10],[25,6,20,8],[26,4,20,8],[27,4,22,4],[28,4,23,4],[29,4,24,4],[30,4,25,4],[30,11,25,11],[30,14,25,14,"fn"],[30,16,25,16],[30,31,25,31],[30,32,25,32],[30,33,25,33],[30,35,25,35,"util_1"],[30,41,25,41],[30,42,25,42,"u8aToHex"],[30,50,25,50],[30,52,25,52,"u8a"],[30,55,25,55],[30,56,25,56,"subarray"],[30,64,25,64],[30,65,25,65],[30,66,25,66],[30,68,25,68],[30,70,25,70],[30,71,25,71],[30,72,25,72],[30,76,25,76,"key"],[30,79,25,79],[30,82,25,82],[30,89,25,89,"key"],[30,92,25,92],[30,94,25,94],[30,97,25,97],[30,99,25,99],[30,110,25,110,"i"],[30,111,25,111],[30,114,25,114],[30,115,25,115],[30,119,25,119,"count"],[30,124,25,124],[30,128,25,128,"type"],[30,132,25,132],[30,138,25,138,"message"],[30,145,25,145],[30,147,25,147],[31,2,26,0],[32,2,27,0],[33,0,28,0],[34,0,29,0],[35,0,30,0],[36,0,31,0],[37,0,32,0],[38,0,33,0],[39,0,34,0],[40,0,35,0],[41,0,36,0],[42,2,37,0],[42,11,37,9,"decodeU8a"],[42,20,37,18,"decodeU8a"],[42,21,37,19,"registry"],[42,29,37,27],[42,31,37,29,"result"],[42,37,37,35],[42,39,37,37,"u8a"],[42,42,37,40],[42,44,37,42],[42,45,37,43,"Types"],[42,50,37,48],[42,52,37,50,"keys"],[42,56,37,54],[42,57,37,55],[42,59,37,57],[43,4,38,4],[43,10,38,10,"count"],[43,15,38,15],[43,18,38,18,"result"],[43,24,38,24],[43,25,38,25,"length"],[43,31,38,31],[44,4,39,4],[44,8,39,8,"offset"],[44,14,39,14],[44,17,39,17],[44,18,39,18],[45,4,40,4],[45,8,40,8,"i"],[45,9,40,9],[45,12,40,12],[45,13,40,13],[46,4,41,4],[46,8,41,8],[47,6,42,8],[47,13,42,15,"i"],[47,14,42,16],[47,17,42,19,"count"],[47,22,42,24],[47,24,42,26],[48,8,43,12],[48,14,43,18,"value"],[48,19,43,23],[48,22,43,26],[48,26,43,30,"Types"],[48,31,43,35],[48,32,43,36,"i"],[48,33,43,37],[48,34,43,38],[48,35,43,39,"registry"],[48,43,43,47],[48,45,43,49,"u8a"],[48,48,43,52],[48,49,43,53,"subarray"],[48,57,43,61],[48,58,43,62,"offset"],[48,64,43,68],[48,65,43,69],[48,66,43,70],[49,8,44,12,"offset"],[49,14,44,18],[49,18,44,22,"value"],[49,23,44,27],[49,24,44,28,"initialU8aLength"],[49,40,44,44],[49,44,44,48,"value"],[49,49,44,53],[49,50,44,54,"encodedLength"],[49,63,44,67],[50,8,45,12,"result"],[50,14,45,18],[50,15,45,19,"i"],[50,16,45,20],[50,17,45,21],[50,20,45,24,"value"],[50,25,45,29],[51,8,46,12,"i"],[51,9,46,13],[51,11,46,15],[52,6,47,8],[53,4,48,4],[53,5,48,5],[53,6,49,4],[53,13,49,11,"error"],[53,18,49,16],[53,20,49,18],[54,6,50,8],[54,12,50,14],[54,16,50,18,"Error"],[54,21,50,23],[54,22,50,24,"formatFailure"],[54,35,50,37],[54,36,50,38,"registry"],[54,44,50,46],[54,46,50,48],[54,57,50,59],[54,59,50,61,"result"],[54,65,50,67],[54,67,50,69,"error"],[54,72,50,74],[54,74,50,76,"u8a"],[54,77,50,79],[54,78,50,80,"subarray"],[54,86,50,88],[54,87,50,89,"offset"],[54,93,50,95],[54,94,50,96],[54,96,50,98,"i"],[54,97,50,99],[54,99,50,101,"count"],[54,104,50,106],[54,106,50,108,"Types"],[54,111,50,113],[54,112,50,114,"i"],[54,113,50,115],[54,114,50,116],[54,116,50,118,"keys"],[54,120,50,122],[54,121,50,123,"i"],[54,122,50,124],[54,123,50,125],[54,124,50,126],[54,125,50,127],[55,4,51,4],[56,4,52,4],[56,11,52,11],[56,12,52,12,"result"],[56,18,52,18],[56,20,52,20,"offset"],[56,26,52,26],[56,27,52,27],[57,2,53,0],[58,2,54,0],[59,0,55,0],[60,0,56,0],[61,0,57,0],[62,0,58,0],[63,0,59,0],[64,2,60,0],[64,11,60,9,"decodeU8aStruct"],[64,26,60,24,"decodeU8aStruct"],[64,27,60,25,"registry"],[64,35,60,33],[64,37,60,35,"result"],[64,43,60,41],[64,45,60,43,"u8a"],[64,48,60,46],[64,50,60,48],[64,51,60,49,"Types"],[64,56,60,54],[64,58,60,56,"keys"],[64,62,60,60],[64,63,60,61],[64,65,60,63],[65,4,61,4],[65,10,61,10,"count"],[65,15,61,15],[65,18,61,18,"result"],[65,24,61,24],[65,25,61,25,"length"],[65,31,61,31],[66,4,62,4],[66,8,62,8,"offset"],[66,14,62,14],[66,17,62,17],[66,18,62,18],[67,4,63,4],[67,8,63,8,"i"],[67,9,63,9],[67,12,63,12],[67,13,63,13],[68,4,64,4],[68,8,64,8,"count"],[68,13,64,13],[68,16,64,16,"MAX_DEPTH"],[68,25,64,25],[68,29,64,29,"isComplexType"],[68,42,64,42],[68,43,64,43,"Types"],[68,48,64,48],[68,49,64,49,"i"],[68,50,64,50],[68,51,64,51],[68,52,64,52],[68,54,64,54],[69,6,65,8],[69,12,65,14],[69,16,65,18,"Error"],[69,21,65,23],[69,22,65,24],[69,75,65,77,"count"],[69,80,65,82],[69,100,65,102,"MAX_DEPTH"],[69,109,65,111],[69,111,65,113],[69,112,65,114],[70,4,66,4],[71,4,67,4],[71,8,67,8],[72,6,68,8],[72,13,68,15,"i"],[72,14,68,16],[72,17,68,19,"count"],[72,22,68,24],[72,24,68,26],[73,8,69,12],[73,14,69,18,"value"],[73,19,69,23],[73,22,69,26],[73,26,69,30,"Types"],[73,31,69,35],[73,32,69,36,"i"],[73,33,69,37],[73,34,69,38],[73,35,69,39,"registry"],[73,43,69,47],[73,45,69,49,"u8a"],[73,48,69,52],[73,49,69,53,"subarray"],[73,57,69,61],[73,58,69,62,"offset"],[73,64,69,68],[73,65,69,69],[73,66,69,70],[74,8,70,12,"offset"],[74,14,70,18],[74,18,70,22,"value"],[74,23,70,27],[74,24,70,28,"initialU8aLength"],[74,40,70,44],[74,44,70,48,"value"],[74,49,70,53],[74,50,70,54,"encodedLength"],[74,63,70,67],[75,8,71,12,"result"],[75,14,71,18],[75,15,71,19,"i"],[75,16,71,20],[75,17,71,21],[75,20,71,24],[75,21,71,25,"keys"],[75,25,71,29],[75,26,71,30,"i"],[75,27,71,31],[75,28,71,32],[75,30,71,34,"value"],[75,35,71,39],[75,36,71,40],[76,8,72,12,"i"],[76,9,72,13],[76,11,72,15],[77,6,73,8],[78,4,74,4],[78,5,74,5],[78,6,75,4],[78,13,75,11,"error"],[78,18,75,16],[78,20,75,18],[79,6,76,8],[79,12,76,14],[79,16,76,18,"Error"],[79,21,76,23],[79,22,76,24,"formatFailure"],[79,35,76,37],[79,36,76,38,"registry"],[79,44,76,46],[79,46,76,48],[79,63,76,65],[79,65,76,67,"result"],[79,71,76,73],[79,73,76,75,"error"],[79,78,76,80],[79,80,76,82,"u8a"],[79,83,76,85],[79,84,76,86,"subarray"],[79,92,76,94],[79,93,76,95,"offset"],[79,99,76,101],[79,100,76,102],[79,102,76,104,"i"],[79,103,76,105],[79,105,76,107,"count"],[79,110,76,112],[79,112,76,114,"Types"],[79,117,76,119],[79,118,76,120,"i"],[79,119,76,121],[79,120,76,122],[79,122,76,124,"keys"],[79,126,76,128],[79,127,76,129,"i"],[79,128,76,130],[79,129,76,131],[79,130,76,132],[79,131,76,133],[80,4,77,4],[81,4,78,4],[81,11,78,11],[81,12,78,12,"result"],[81,18,78,18],[81,20,78,20,"offset"],[81,26,78,26],[81,27,78,27],[82,2,79,0],[83,2,80,0],[84,0,81,0],[85,0,82,0],[86,0,83,0],[87,0,84,0],[88,0,85,0],[89,2,86,0],[89,11,86,9,"decodeU8aVec"],[89,23,86,21,"decodeU8aVec"],[89,24,86,22,"registry"],[89,32,86,30],[89,34,86,32,"result"],[89,40,86,38],[89,42,86,40,"u8a"],[89,45,86,43],[89,47,86,45,"startAt"],[89,54,86,52],[89,56,86,54,"Type"],[89,60,86,58],[89,62,86,60],[90,4,87,4],[90,10,87,10,"count"],[90,15,87,15],[90,18,87,18,"result"],[90,24,87,24],[90,25,87,25,"length"],[90,31,87,31],[91,4,88,4],[91,8,88,8,"count"],[91,13,88,13],[91,16,88,16,"MAX_DEPTH"],[91,25,88,25],[91,29,88,29,"isComplexType"],[91,42,88,42],[91,43,88,43,"Type"],[91,47,88,47],[91,48,88,48],[91,50,88,50],[92,6,89,8],[92,12,89,14],[92,16,89,18,"Error"],[92,21,89,23],[92,22,89,24],[92,72,89,74,"count"],[92,77,89,79],[92,97,89,99,"MAX_DEPTH"],[92,106,89,108],[92,108,89,110],[92,109,89,111],[93,4,90,4],[94,4,91,4],[94,8,91,8,"offset"],[94,14,91,14],[94,17,91,17,"startAt"],[94,24,91,24],[95,4,92,4],[95,8,92,8,"i"],[95,9,92,9],[95,12,92,12],[95,13,92,13],[96,4,93,4],[96,8,93,8],[97,6,94,8],[97,13,94,15,"i"],[97,14,94,16],[97,17,94,19,"count"],[97,22,94,24],[97,24,94,26],[98,8,95,12],[98,14,95,18,"value"],[98,19,95,23],[98,22,95,26],[98,26,95,30,"Type"],[98,30,95,34],[98,31,95,35,"registry"],[98,39,95,43],[98,41,95,45,"u8a"],[98,44,95,48],[98,45,95,49,"subarray"],[98,53,95,57],[98,54,95,58,"offset"],[98,60,95,64],[98,61,95,65],[98,62,95,66],[99,8,96,12,"offset"],[99,14,96,18],[99,18,96,22,"value"],[99,23,96,27],[99,24,96,28,"initialU8aLength"],[99,40,96,44],[99,44,96,48,"value"],[99,49,96,53],[99,50,96,54,"encodedLength"],[99,63,96,67],[100,8,97,12,"result"],[100,14,97,18],[100,15,97,19,"i"],[100,16,97,20],[100,17,97,21],[100,20,97,24,"value"],[100,25,97,29],[101,8,98,12,"i"],[101,9,98,13],[101,11,98,15],[102,6,99,8],[103,4,100,4],[103,5,100,5],[103,6,101,4],[103,13,101,11,"error"],[103,18,101,16],[103,20,101,18],[104,6,102,8],[104,12,102,14],[104,16,102,18,"Error"],[104,21,102,23],[104,22,102,24,"formatFailure"],[104,35,102,37],[104,36,102,38,"registry"],[104,44,102,46],[104,46,102,48],[104,60,102,62],[104,62,102,64,"result"],[104,68,102,70],[104,70,102,72,"error"],[104,75,102,77],[104,77,102,79,"u8a"],[104,80,102,82],[104,81,102,83,"subarray"],[104,89,102,91],[104,90,102,92,"offset"],[104,96,102,98],[104,97,102,99],[104,99,102,101,"i"],[104,100,102,102],[104,102,102,104,"count"],[104,107,102,109],[104,109,102,111,"Type"],[104,113,102,115],[104,114,102,116],[104,115,102,117],[105,4,103,4],[106,4,104,4],[106,11,104,11],[106,12,104,12,"offset"],[106,18,104,18],[106,20,104,20,"offset"],[106,26,104,26],[106,29,104,29,"startAt"],[106,36,104,36],[106,37,104,37],[107,2,105,0],[108,0,105,1],[108,3]],"functionMap":{"names":["<global>","isComplexType","formatFailure","decodeU8a","decodeU8aStruct","decodeU8aVec"],"mappings":"AAA;ACQ;CDG;AEE;CFY;AGW;CHgB;AIO;CJmB;AKO;CLmB"},"hasCjsExports":true},"type":"js/module"}]} |