mirror of
https://github.com/pezkuwichain/pezkuwi-mobile-app.git
synced 2026-05-30 01:51:03 +00:00
1 line
15 KiB
Plaintext
1 line
15 KiB
Plaintext
{"dependencies":[{"name":"@polkadot/util","data":{"asyncType":null,"isESMImport":true,"locs":[{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":42,"index":42}}],"key":"ISHU1ovvPMrCldqRjtd1JhW9dyo=","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 var _polkadotUtil = 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, _polkadotUtil.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":[[7,2,32,0,"exports"],[7,9,32,0],[7,10,32,0,"decodeU8a"],[7,19,32,0],[7,22,32,0,"decodeU8a"],[7,31,32,0],[8,2,55,0,"exports"],[8,9,55,0],[8,10,55,0,"decodeU8aStruct"],[8,25,55,0],[8,28,55,0,"decodeU8aStruct"],[8,43,55,0],[9,2,81,0,"exports"],[9,9,81,0],[9,10,81,0,"decodeU8aVec"],[9,22,81,0],[9,25,81,0,"decodeU8aVec"],[9,37,81,0],[10,2,1,0],[10,6,1,0,"_polkadotUtil"],[10,19,1,0],[10,22,1,0,"require"],[10,29,1,0],[10,30,1,0,"_dependencyMap"],[10,44,1,0],[11,2,2,0],[11,8,2,6,"MAX_DEPTH"],[11,17,2,15],[11,20,2,18],[11,24,2,22],[12,2,3,0],[13,2,4,0],[13,11,4,9,"isComplexType"],[13,24,4,22,"isComplexType"],[13,25,4,23,"Type"],[13,29,4,27],[13,31,4,29],[14,4,5,4],[14,10,5,10,"typeName"],[14,18,5,18],[14,21,5,21,"Type"],[14,25,5,25],[14,26,5,26,"name"],[14,30,5,30],[14,32,5,32,"toLowerCase"],[14,43,5,43],[14,44,5,44],[14,45,5,45],[14,49,5,49],[14,51,5,51],[15,4,6,4],[15,11,6,11],[15,12,6,12],[15,18,6,18],[15,20,6,20],[15,29,6,29],[15,31,6,31],[15,40,6,40],[15,42,6,42],[15,48,6,48],[15,50,6,50],[15,58,6,58],[15,60,6,60],[15,67,6,67],[15,69,6,69],[15,85,6,85],[15,87,6,87],[15,95,6,95],[15,97,6,97],[15,105,6,105],[15,107,6,107],[15,114,6,114],[15,116,6,116],[15,121,6,121],[15,123,6,123],[15,133,6,133],[15,134,6,134],[15,135,6,135,"includes"],[15,143,6,143],[15,144,6,144,"typeName"],[15,152,6,152],[15,153,6,153],[16,2,7,0],[17,2,8,0],[18,2,9,0],[18,11,9,9,"formatFailure"],[18,24,9,22,"formatFailure"],[18,25,9,23,"registry"],[18,33,9,31],[18,35,9,33,"fn"],[18,37,9,35],[18,39,9,37,"_result"],[18,46,9,44],[18,48,9,46],[19,4,9,48,"message"],[20,2,9,56],[20,3,9,57],[20,5,9,59,"u8a"],[20,8,9,62],[20,10,9,64,"i"],[20,11,9,65],[20,13,9,67,"count"],[20,18,9,72],[20,20,9,74,"Type"],[20,24,9,78],[20,26,9,80,"key"],[20,29,9,83],[20,31,9,85],[21,4,10,4],[21,8,10,8,"type"],[21,12,10,12],[21,15,10,15],[21,17,10,17],[22,4,11,4],[22,8,11,8],[23,6,12,8,"type"],[23,10,12,12],[23,13,12,15],[23,18,12,20],[23,22,12,24,"Type"],[23,26,12,28],[23,27,12,29,"registry"],[23,35,12,37],[23,36,12,38],[23,37,12,39,"toRawType"],[23,46,12,48],[23,47,12,49],[23,48,12,50],[23,50,12,52],[24,4,13,4],[24,5,13,5],[24,6,14,4],[24,12,14,10],[25,6,15,8],[26,4,15,8],[27,4,17,4],[28,4,18,4],[29,4,19,4],[30,4,20,4],[30,11,20,11],[30,14,20,14,"fn"],[30,16,20,16],[30,31,20,31],[30,35,20,31,"u8aToHex"],[30,48,20,39],[30,49,20,39,"u8aToHex"],[30,57,20,39],[30,59,20,40,"u8a"],[30,62,20,43],[30,63,20,44,"subarray"],[30,71,20,52],[30,72,20,53],[30,73,20,54],[30,75,20,56],[30,77,20,58],[30,78,20,59],[30,79,20,60],[30,83,20,64,"key"],[30,86,20,67],[30,89,20,70],[30,96,20,77,"key"],[30,99,20,80],[30,101,20,82],[30,104,20,85],[30,106,20,87],[30,117,20,98,"i"],[30,118,20,99],[30,121,20,102],[30,122,20,103],[30,126,20,107,"count"],[30,131,20,112],[30,135,20,116,"type"],[30,139,20,120],[30,145,20,126,"message"],[30,152,20,133],[30,154,20,135],[31,2,21,0],[32,2,22,0],[33,0,23,0],[34,0,24,0],[35,0,25,0],[36,0,26,0],[37,0,27,0],[38,0,28,0],[39,0,29,0],[40,0,30,0],[41,0,31,0],[42,2,32,7],[42,11,32,16,"decodeU8a"],[42,20,32,25,"decodeU8a"],[42,21,32,26,"registry"],[42,29,32,34],[42,31,32,36,"result"],[42,37,32,42],[42,39,32,44,"u8a"],[42,42,32,47],[42,44,32,49],[42,45,32,50,"Types"],[42,50,32,55],[42,52,32,57,"keys"],[42,56,32,61],[42,57,32,62],[42,59,32,64],[43,4,33,4],[43,10,33,10,"count"],[43,15,33,15],[43,18,33,18,"result"],[43,24,33,24],[43,25,33,25,"length"],[43,31,33,31],[44,4,34,4],[44,8,34,8,"offset"],[44,14,34,14],[44,17,34,17],[44,18,34,18],[45,4,35,4],[45,8,35,8,"i"],[45,9,35,9],[45,12,35,12],[45,13,35,13],[46,4,36,4],[46,8,36,8],[47,6,37,8],[47,13,37,15,"i"],[47,14,37,16],[47,17,37,19,"count"],[47,22,37,24],[47,24,37,26],[48,8,38,12],[48,14,38,18,"value"],[48,19,38,23],[48,22,38,26],[48,26,38,30,"Types"],[48,31,38,35],[48,32,38,36,"i"],[48,33,38,37],[48,34,38,38],[48,35,38,39,"registry"],[48,43,38,47],[48,45,38,49,"u8a"],[48,48,38,52],[48,49,38,53,"subarray"],[48,57,38,61],[48,58,38,62,"offset"],[48,64,38,68],[48,65,38,69],[48,66,38,70],[49,8,39,12,"offset"],[49,14,39,18],[49,18,39,22,"value"],[49,23,39,27],[49,24,39,28,"initialU8aLength"],[49,40,39,44],[49,44,39,48,"value"],[49,49,39,53],[49,50,39,54,"encodedLength"],[49,63,39,67],[50,8,40,12,"result"],[50,14,40,18],[50,15,40,19,"i"],[50,16,40,20],[50,17,40,21],[50,20,40,24,"value"],[50,25,40,29],[51,8,41,12,"i"],[51,9,41,13],[51,11,41,15],[52,6,42,8],[53,4,43,4],[53,5,43,5],[53,6,44,4],[53,13,44,11,"error"],[53,18,44,16],[53,20,44,18],[54,6,45,8],[54,12,45,14],[54,16,45,18,"Error"],[54,21,45,23],[54,22,45,24,"formatFailure"],[54,35,45,37],[54,36,45,38,"registry"],[54,44,45,46],[54,46,45,48],[54,57,45,59],[54,59,45,61,"result"],[54,65,45,67],[54,67,45,69,"error"],[54,72,45,74],[54,74,45,76,"u8a"],[54,77,45,79],[54,78,45,80,"subarray"],[54,86,45,88],[54,87,45,89,"offset"],[54,93,45,95],[54,94,45,96],[54,96,45,98,"i"],[54,97,45,99],[54,99,45,101,"count"],[54,104,45,106],[54,106,45,108,"Types"],[54,111,45,113],[54,112,45,114,"i"],[54,113,45,115],[54,114,45,116],[54,116,45,118,"keys"],[54,120,45,122],[54,121,45,123,"i"],[54,122,45,124],[54,123,45,125],[54,124,45,126],[54,125,45,127],[55,4,46,4],[56,4,47,4],[56,11,47,11],[56,12,47,12,"result"],[56,18,47,18],[56,20,47,20,"offset"],[56,26,47,26],[56,27,47,27],[57,2,48,0],[58,2,49,0],[59,0,50,0],[60,0,51,0],[61,0,52,0],[62,0,53,0],[63,0,54,0],[64,2,55,7],[64,11,55,16,"decodeU8aStruct"],[64,26,55,31,"decodeU8aStruct"],[64,27,55,32,"registry"],[64,35,55,40],[64,37,55,42,"result"],[64,43,55,48],[64,45,55,50,"u8a"],[64,48,55,53],[64,50,55,55],[64,51,55,56,"Types"],[64,56,55,61],[64,58,55,63,"keys"],[64,62,55,67],[64,63,55,68],[64,65,55,70],[65,4,56,4],[65,10,56,10,"count"],[65,15,56,15],[65,18,56,18,"result"],[65,24,56,24],[65,25,56,25,"length"],[65,31,56,31],[66,4,57,4],[66,8,57,8,"offset"],[66,14,57,14],[66,17,57,17],[66,18,57,18],[67,4,58,4],[67,8,58,8,"i"],[67,9,58,9],[67,12,58,12],[67,13,58,13],[68,4,59,4],[68,8,59,8,"count"],[68,13,59,13],[68,16,59,16,"MAX_DEPTH"],[68,25,59,25],[68,29,59,29,"isComplexType"],[68,42,59,42],[68,43,59,43,"Types"],[68,48,59,48],[68,49,59,49,"i"],[68,50,59,50],[68,51,59,51],[68,52,59,52],[68,54,59,54],[69,6,60,8],[69,12,60,14],[69,16,60,18,"Error"],[69,21,60,23],[69,22,60,24],[69,75,60,77,"count"],[69,80,60,82],[69,100,60,102,"MAX_DEPTH"],[69,109,60,111],[69,111,60,113],[69,112,60,114],[70,4,61,4],[71,4,62,4],[71,8,62,8],[72,6,63,8],[72,13,63,15,"i"],[72,14,63,16],[72,17,63,19,"count"],[72,22,63,24],[72,24,63,26],[73,8,64,12],[73,14,64,18,"value"],[73,19,64,23],[73,22,64,26],[73,26,64,30,"Types"],[73,31,64,35],[73,32,64,36,"i"],[73,33,64,37],[73,34,64,38],[73,35,64,39,"registry"],[73,43,64,47],[73,45,64,49,"u8a"],[73,48,64,52],[73,49,64,53,"subarray"],[73,57,64,61],[73,58,64,62,"offset"],[73,64,64,68],[73,65,64,69],[73,66,64,70],[74,8,65,12,"offset"],[74,14,65,18],[74,18,65,22,"value"],[74,23,65,27],[74,24,65,28,"initialU8aLength"],[74,40,65,44],[74,44,65,48,"value"],[74,49,65,53],[74,50,65,54,"encodedLength"],[74,63,65,67],[75,8,66,12,"result"],[75,14,66,18],[75,15,66,19,"i"],[75,16,66,20],[75,17,66,21],[75,20,66,24],[75,21,66,25,"keys"],[75,25,66,29],[75,26,66,30,"i"],[75,27,66,31],[75,28,66,32],[75,30,66,34,"value"],[75,35,66,39],[75,36,66,40],[76,8,67,12,"i"],[76,9,67,13],[76,11,67,15],[77,6,68,8],[78,4,69,4],[78,5,69,5],[78,6,70,4],[78,13,70,11,"error"],[78,18,70,16],[78,20,70,18],[79,6,71,8],[79,12,71,14],[79,16,71,18,"Error"],[79,21,71,23],[79,22,71,24,"formatFailure"],[79,35,71,37],[79,36,71,38,"registry"],[79,44,71,46],[79,46,71,48],[79,63,71,65],[79,65,71,67,"result"],[79,71,71,73],[79,73,71,75,"error"],[79,78,71,80],[79,80,71,82,"u8a"],[79,83,71,85],[79,84,71,86,"subarray"],[79,92,71,94],[79,93,71,95,"offset"],[79,99,71,101],[79,100,71,102],[79,102,71,104,"i"],[79,103,71,105],[79,105,71,107,"count"],[79,110,71,112],[79,112,71,114,"Types"],[79,117,71,119],[79,118,71,120,"i"],[79,119,71,121],[79,120,71,122],[79,122,71,124,"keys"],[79,126,71,128],[79,127,71,129,"i"],[79,128,71,130],[79,129,71,131],[79,130,71,132],[79,131,71,133],[80,4,72,4],[81,4,73,4],[81,11,73,11],[81,12,73,12,"result"],[81,18,73,18],[81,20,73,20,"offset"],[81,26,73,26],[81,27,73,27],[82,2,74,0],[83,2,75,0],[84,0,76,0],[85,0,77,0],[86,0,78,0],[87,0,79,0],[88,0,80,0],[89,2,81,7],[89,11,81,16,"decodeU8aVec"],[89,23,81,28,"decodeU8aVec"],[89,24,81,29,"registry"],[89,32,81,37],[89,34,81,39,"result"],[89,40,81,45],[89,42,81,47,"u8a"],[89,45,81,50],[89,47,81,52,"startAt"],[89,54,81,59],[89,56,81,61,"Type"],[89,60,81,65],[89,62,81,67],[90,4,82,4],[90,10,82,10,"count"],[90,15,82,15],[90,18,82,18,"result"],[90,24,82,24],[90,25,82,25,"length"],[90,31,82,31],[91,4,83,4],[91,8,83,8,"count"],[91,13,83,13],[91,16,83,16,"MAX_DEPTH"],[91,25,83,25],[91,29,83,29,"isComplexType"],[91,42,83,42],[91,43,83,43,"Type"],[91,47,83,47],[91,48,83,48],[91,50,83,50],[92,6,84,8],[92,12,84,14],[92,16,84,18,"Error"],[92,21,84,23],[92,22,84,24],[92,72,84,74,"count"],[92,77,84,79],[92,97,84,99,"MAX_DEPTH"],[92,106,84,108],[92,108,84,110],[92,109,84,111],[93,4,85,4],[94,4,86,4],[94,8,86,8,"offset"],[94,14,86,14],[94,17,86,17,"startAt"],[94,24,86,24],[95,4,87,4],[95,8,87,8,"i"],[95,9,87,9],[95,12,87,12],[95,13,87,13],[96,4,88,4],[96,8,88,8],[97,6,89,8],[97,13,89,15,"i"],[97,14,89,16],[97,17,89,19,"count"],[97,22,89,24],[97,24,89,26],[98,8,90,12],[98,14,90,18,"value"],[98,19,90,23],[98,22,90,26],[98,26,90,30,"Type"],[98,30,90,34],[98,31,90,35,"registry"],[98,39,90,43],[98,41,90,45,"u8a"],[98,44,90,48],[98,45,90,49,"subarray"],[98,53,90,57],[98,54,90,58,"offset"],[98,60,90,64],[98,61,90,65],[98,62,90,66],[99,8,91,12,"offset"],[99,14,91,18],[99,18,91,22,"value"],[99,23,91,27],[99,24,91,28,"initialU8aLength"],[99,40,91,44],[99,44,91,48,"value"],[99,49,91,53],[99,50,91,54,"encodedLength"],[99,63,91,67],[100,8,92,12,"result"],[100,14,92,18],[100,15,92,19,"i"],[100,16,92,20],[100,17,92,21],[100,20,92,24,"value"],[100,25,92,29],[101,8,93,12,"i"],[101,9,93,13],[101,11,93,15],[102,6,94,8],[103,4,95,4],[103,5,95,5],[103,6,96,4],[103,13,96,11,"error"],[103,18,96,16],[103,20,96,18],[104,6,97,8],[104,12,97,14],[104,16,97,18,"Error"],[104,21,97,23],[104,22,97,24,"formatFailure"],[104,35,97,37],[104,36,97,38,"registry"],[104,44,97,46],[104,46,97,48],[104,60,97,62],[104,62,97,64,"result"],[104,68,97,70],[104,70,97,72,"error"],[104,75,97,77],[104,77,97,79,"u8a"],[104,80,97,82],[104,81,97,83,"subarray"],[104,89,97,91],[104,90,97,92,"offset"],[104,96,97,98],[104,97,97,99],[104,99,97,101,"i"],[104,100,97,102],[104,102,97,104,"count"],[104,107,97,109],[104,109,97,111,"Type"],[104,113,97,115],[104,114,97,116],[104,115,97,117],[105,4,98,4],[106,4,99,4],[106,11,99,11],[106,12,99,12,"offset"],[106,18,99,18],[106,20,99,20,"offset"],[106,26,99,26],[106,29,99,29,"startAt"],[106,36,99,36],[106,37,99,37],[107,2,100,0],[108,0,100,1],[108,3]],"functionMap":{"names":["<global>","isComplexType","formatFailure","decodeU8a","decodeU8aStruct","decodeU8aVec"],"mappings":"AAA;ACG;CDG;AEE;CFY;OGW;CHgB;OIO;CJmB;OKO;CLmB"},"hasCjsExports":false},"type":"js/module"}]} |