mirror of
https://github.com/pezkuwichain/pezkuwi-mobile-app.git
synced 2026-05-30 03:01:04 +00:00
1 line
16 KiB
Plaintext
1 line
16 KiB
Plaintext
{"dependencies":[{"name":"@polkadot/util","data":{"asyncType":null,"isESMImport":true,"locs":[{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":153,"index":153}}],"key":"ISHU1ovvPMrCldqRjtd1JhW9dyo=","exportNames":["*"],"imports":1}},{"name":"./Raw.js","data":{"asyncType":null,"isESMImport":true,"locs":[{"start":{"line":2,"column":0,"index":154},"end":{"line":2,"column":31,"index":185}}],"key":"jQQNep18HcCFhHDwWCwU3DnhEBg=","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 Object.defineProperty(exports, \"Text\", {\n enumerable: true,\n get: function () {\n return Text;\n }\n });\n var _polkadotUtil = require(_dependencyMap[0], \"@polkadot/util\");\n var _RawJs = require(_dependencyMap[1], \"./Raw.js\");\n const MAX_LENGTH = 128 * 1024;\n /** @internal */\n function decodeText(value) {\n if ((0, _polkadotUtil.isU8a)(value)) {\n if (!value.length) {\n return ['', 0];\n }\n // for Raw, the internal buffer does not have an internal length\n // (the same applies in e.g. Bytes, where length is added at encoding-time)\n if (value instanceof _RawJs.Raw) {\n return [(0, _polkadotUtil.u8aToString)(value), 0];\n }\n const [offset, length] = (0, _polkadotUtil.compactFromU8aLim)(value);\n const total = offset + length;\n if (length > MAX_LENGTH) {\n throw new Error(`Text: length ${length.toString()} exceeds ${MAX_LENGTH}`);\n } else if (total > value.length) {\n throw new Error(`Text: required length less than remainder, expected at least ${total}, found ${value.length}`);\n }\n return [(0, _polkadotUtil.u8aToString)(value.subarray(offset, total)), total];\n } else if ((0, _polkadotUtil.isHex)(value)) {\n return [(0, _polkadotUtil.u8aToString)((0, _polkadotUtil.hexToU8a)(value)), 0];\n }\n return [value ? value.toString() : '', 0];\n }\n /**\n * @name Text\n * @description\n * This is a string wrapper, along with the length. It is used both for strings as well\n * as items such as documentation. It simply extends the standard JS `String` built-in\n * object, inheriting all methods exposed from `String`.\n * @noInheritDoc\n */\n class Text extends String {\n #override = null;\n constructor(registry, value) {\n const [str, decodedLength] = decodeText(value);\n super(str);\n this.registry = registry;\n this.initialU8aLength = decodedLength;\n }\n /**\n * @description The length of the value when encoded as a Uint8Array\n */\n get encodedLength() {\n return this.toU8a().length;\n }\n /**\n * @description returns a hash of the contents\n */\n get hash() {\n return this.registry.hash(this.toU8a());\n }\n /**\n * @description Checks if the value is an empty value\n */\n get isEmpty() {\n return this.length === 0;\n }\n /**\n * @description The length of the value\n */\n get length() {\n // only included here since we ignore inherited docs\n return super.length;\n }\n /**\n * @description Compares the value of the input to see if there is a match\n */\n eq(other) {\n return (0, _polkadotUtil.isString)(other) ? this.toString() === other.toString() : false;\n }\n /**\n * @description Returns a breakdown of the hex encoding for this Codec\n */\n inspect() {\n const value = (0, _polkadotUtil.stringToU8a)(super.toString());\n return {\n outer: value.length ? [(0, _polkadotUtil.compactToU8a)(value.length), value] : [(0, _polkadotUtil.compactToU8a)(value.length)]\n };\n }\n /**\n * @description Set an override value for this\n */\n setOverride(override) {\n this.#override = override;\n }\n /**\n * @description Returns a hex string representation of the value\n */\n toHex() {\n // like with Vec<u8>, when we are encoding to hex, we don't actually add\n // the length prefix (it is already implied by the actual string length)\n return (0, _polkadotUtil.u8aToHex)(this.toU8a(true));\n }\n /**\n * @description Converts the Object to to a human-friendly JSON, with additional fields, expansion and formatting of information\n */\n toHuman() {\n return this.toJSON();\n }\n /**\n * @description Converts the Object to JSON, typically used for RPC transfers\n */\n toJSON() {\n return this.toString();\n }\n /**\n * @description Converts the value in a best-fit primitive form\n */\n toPrimitive() {\n return this.toJSON();\n }\n /**\n * @description Returns the base runtime type name for this instance\n */\n toRawType() {\n return 'Text';\n }\n /**\n * @description Returns the string representation of the value\n */\n toString() {\n return this.#override || super.toString();\n }\n /**\n * @description Encodes the value as a Uint8Array as per the SCALE specifications\n * @param isBare true when the value has none of the type-specific prefixes (internal)\n */\n toU8a(isBare) {\n // NOTE Here we use the super toString (we are not taking overrides into account,\n // rather encoding the original value the string was constructed with)\n const encoded = (0, _polkadotUtil.stringToU8a)(super.toString());\n return isBare ? encoded : (0, _polkadotUtil.compactAddLength)(encoded);\n }\n }\n});","lineCount":151,"map":[[7,2,38,0,"Object"],[7,8,38,0],[7,9,38,0,"defineProperty"],[7,23,38,0],[7,24,38,0,"exports"],[7,31,38,0],[8,4,38,0,"enumerable"],[8,14,38,0],[9,4,38,0,"get"],[9,7,38,0],[9,18,38,0,"get"],[9,19,38,0],[10,6,38,0],[10,13,38,0,"Text"],[10,17,38,0],[11,4,38,0],[12,2,38,0],[13,2,1,0],[13,6,1,0,"_polkadotUtil"],[13,19,1,0],[13,22,1,0,"require"],[13,29,1,0],[13,30,1,0,"_dependencyMap"],[13,44,1,0],[14,2,2,0],[14,6,2,0,"_RawJs"],[14,12,2,0],[14,15,2,0,"require"],[14,22,2,0],[14,23,2,0,"_dependencyMap"],[14,37,2,0],[15,2,3,0],[15,8,3,6,"MAX_LENGTH"],[15,18,3,16],[15,21,3,19],[15,24,3,22],[15,27,3,25],[15,31,3,29],[16,2,4,0],[17,2,5,0],[17,11,5,9,"decodeText"],[17,21,5,19,"decodeText"],[17,22,5,20,"value"],[17,27,5,25],[17,29,5,27],[18,4,6,4],[18,8,6,8],[18,12,6,8,"isU8a"],[18,25,6,13],[18,26,6,13,"isU8a"],[18,31,6,13],[18,33,6,14,"value"],[18,38,6,19],[18,39,6,20],[18,41,6,22],[19,6,7,8],[19,10,7,12],[19,11,7,13,"value"],[19,16,7,18],[19,17,7,19,"length"],[19,23,7,25],[19,25,7,27],[20,8,8,12],[20,15,8,19],[20,16,8,20],[20,18,8,22],[20,20,8,24],[20,21,8,25],[20,22,8,26],[21,6,9,8],[22,6,10,8],[23,6,11,8],[24,6,12,8],[24,10,12,12,"value"],[24,15,12,17],[24,27,12,29,"Raw"],[24,33,12,32],[24,34,12,32,"Raw"],[24,37,12,32],[24,39,12,34],[25,8,13,12],[25,15,13,19],[25,16,13,20],[25,20,13,20,"u8aToString"],[25,33,13,31],[25,34,13,31,"u8aToString"],[25,45,13,31],[25,47,13,32,"value"],[25,52,13,37],[25,53,13,38],[25,55,13,40],[25,56,13,41],[25,57,13,42],[26,6,14,8],[27,6,15,8],[27,12,15,14],[27,13,15,15,"offset"],[27,19,15,21],[27,21,15,23,"length"],[27,27,15,29],[27,28,15,30],[27,31,15,33],[27,35,15,33,"compactFromU8aLim"],[27,48,15,50],[27,49,15,50,"compactFromU8aLim"],[27,66,15,50],[27,68,15,51,"value"],[27,73,15,56],[27,74,15,57],[28,6,16,8],[28,12,16,14,"total"],[28,17,16,19],[28,20,16,22,"offset"],[28,26,16,28],[28,29,16,31,"length"],[28,35,16,37],[29,6,17,8],[29,10,17,12,"length"],[29,16,17,18],[29,19,17,21,"MAX_LENGTH"],[29,29,17,31],[29,31,17,33],[30,8,18,12],[30,14,18,18],[30,18,18,22,"Error"],[30,23,18,27],[30,24,18,28],[30,40,18,44,"length"],[30,46,18,50],[30,47,18,51,"toString"],[30,55,18,59],[30,56,18,60],[30,57,18,61],[30,69,18,73,"MAX_LENGTH"],[30,79,18,83],[30,81,18,85],[30,82,18,86],[31,6,19,8],[31,7,19,9],[31,13,20,13],[31,17,20,17,"total"],[31,22,20,22],[31,25,20,25,"value"],[31,30,20,30],[31,31,20,31,"length"],[31,37,20,37],[31,39,20,39],[32,8,21,12],[32,14,21,18],[32,18,21,22,"Error"],[32,23,21,27],[32,24,21,28],[32,88,21,92,"total"],[32,93,21,97],[32,104,21,108,"value"],[32,109,21,113],[32,110,21,114,"length"],[32,116,21,120],[32,118,21,122],[32,119,21,123],[33,6,22,8],[34,6,23,8],[34,13,23,15],[34,14,23,16],[34,18,23,16,"u8aToString"],[34,31,23,27],[34,32,23,27,"u8aToString"],[34,43,23,27],[34,45,23,28,"value"],[34,50,23,33],[34,51,23,34,"subarray"],[34,59,23,42],[34,60,23,43,"offset"],[34,66,23,49],[34,68,23,51,"total"],[34,73,23,56],[34,74,23,57],[34,75,23,58],[34,77,23,60,"total"],[34,82,23,65],[34,83,23,66],[35,4,24,4],[35,5,24,5],[35,11,25,9],[35,15,25,13],[35,19,25,13,"isHex"],[35,32,25,18],[35,33,25,18,"isHex"],[35,38,25,18],[35,40,25,19,"value"],[35,45,25,24],[35,46,25,25],[35,48,25,27],[36,6,26,8],[36,13,26,15],[36,14,26,16],[36,18,26,16,"u8aToString"],[36,31,26,27],[36,32,26,27,"u8aToString"],[36,43,26,27],[36,45,26,28],[36,49,26,28,"hexToU8a"],[36,62,26,36],[36,63,26,36,"hexToU8a"],[36,71,26,36],[36,73,26,37,"value"],[36,78,26,42],[36,79,26,43],[36,80,26,44],[36,82,26,46],[36,83,26,47],[36,84,26,48],[37,4,27,4],[38,4,28,4],[38,11,28,11],[38,12,28,12,"value"],[38,17,28,17],[38,20,28,20,"value"],[38,25,28,25],[38,26,28,26,"toString"],[38,34,28,34],[38,35,28,35],[38,36,28,36],[38,39,28,39],[38,41,28,41],[38,43,28,43],[38,44,28,44],[38,45,28,45],[39,2,29,0],[40,2,30,0],[41,0,31,0],[42,0,32,0],[43,0,33,0],[44,0,34,0],[45,0,35,0],[46,0,36,0],[47,0,37,0],[48,2,38,7],[48,8,38,13,"Text"],[48,12,38,17],[48,21,38,26,"String"],[48,27,38,32],[48,28,38,33],[49,4,43,4],[49,5,43,5,"override"],[49,13,43,13],[49,16,43,16],[49,20,43,20],[50,4,44,4,"constructor"],[50,15,44,15,"constructor"],[50,16,44,16,"registry"],[50,24,44,24],[50,26,44,26,"value"],[50,31,44,31],[50,33,44,33],[51,6,45,8],[51,12,45,14],[51,13,45,15,"str"],[51,16,45,18],[51,18,45,20,"decodedLength"],[51,31,45,33],[51,32,45,34],[51,35,45,37,"decodeText"],[51,45,45,47],[51,46,45,48,"value"],[51,51,45,53],[51,52,45,54],[52,6,46,8],[52,11,46,13],[52,12,46,14,"str"],[52,15,46,17],[52,16,46,18],[53,6,47,8],[53,10,47,12],[53,11,47,13,"registry"],[53,19,47,21],[53,22,47,24,"registry"],[53,30,47,32],[54,6,48,8],[54,10,48,12],[54,11,48,13,"initialU8aLength"],[54,27,48,29],[54,30,48,32,"decodedLength"],[54,43,48,45],[55,4,49,4],[56,4,50,4],[57,0,51,0],[58,0,52,0],[59,4,53,4],[59,8,53,8,"encodedLength"],[59,21,53,21,"encodedLength"],[59,22,53,21],[59,24,53,24],[60,6,54,8],[60,13,54,15],[60,17,54,19],[60,18,54,20,"toU8a"],[60,23,54,25],[60,24,54,26],[60,25,54,27],[60,26,54,28,"length"],[60,32,54,34],[61,4,55,4],[62,4,56,4],[63,0,57,0],[64,0,58,0],[65,4,59,4],[65,8,59,8,"hash"],[65,12,59,12,"hash"],[65,13,59,12],[65,15,59,15],[66,6,60,8],[66,13,60,15],[66,17,60,19],[66,18,60,20,"registry"],[66,26,60,28],[66,27,60,29,"hash"],[66,31,60,33],[66,32,60,34],[66,36,60,38],[66,37,60,39,"toU8a"],[66,42,60,44],[66,43,60,45],[66,44,60,46],[66,45,60,47],[67,4,61,4],[68,4,62,4],[69,0,63,0],[70,0,64,0],[71,4,65,4],[71,8,65,8,"isEmpty"],[71,15,65,15,"isEmpty"],[71,16,65,15],[71,18,65,18],[72,6,66,8],[72,13,66,15],[72,17,66,19],[72,18,66,20,"length"],[72,24,66,26],[72,29,66,31],[72,30,66,32],[73,4,67,4],[74,4,68,4],[75,0,69,0],[76,0,70,0],[77,4,71,4],[77,8,71,8,"length"],[77,14,71,14,"length"],[77,15,71,14],[77,17,71,17],[78,6,72,8],[79,6,73,8],[79,13,73,15],[79,18,73,20],[79,19,73,21,"length"],[79,25,73,27],[80,4,74,4],[81,4,75,4],[82,0,76,0],[83,0,77,0],[84,4,78,4,"eq"],[84,6,78,6,"eq"],[84,7,78,7,"other"],[84,12,78,12],[84,14,78,14],[85,6,79,8],[85,13,79,15],[85,17,79,15,"isString"],[85,30,79,23],[85,31,79,23,"isString"],[85,39,79,23],[85,41,79,24,"other"],[85,46,79,29],[85,47,79,30],[85,50,80,14],[85,54,80,18],[85,55,80,19,"toString"],[85,63,80,27],[85,64,80,28],[85,65,80,29],[85,70,80,34,"other"],[85,75,80,39],[85,76,80,40,"toString"],[85,84,80,48],[85,85,80,49],[85,86,80,50],[85,89,81,14],[85,94,81,19],[86,4,82,4],[87,4,83,4],[88,0,84,0],[89,0,85,0],[90,4,86,4,"inspect"],[90,11,86,11,"inspect"],[90,12,86,11],[90,14,86,14],[91,6,87,8],[91,12,87,14,"value"],[91,17,87,19],[91,20,87,22],[91,24,87,22,"stringToU8a"],[91,37,87,33],[91,38,87,33,"stringToU8a"],[91,49,87,33],[91,51,87,34],[91,56,87,39],[91,57,87,40,"toString"],[91,65,87,48],[91,66,87,49],[91,67,87,50],[91,68,87,51],[92,6,88,8],[92,13,88,15],[93,8,89,12,"outer"],[93,13,89,17],[93,15,89,19,"value"],[93,20,89,24],[93,21,89,25,"length"],[93,27,89,31],[93,30,90,18],[93,31,90,19],[93,35,90,19,"compactToU8a"],[93,48,90,31],[93,49,90,31,"compactToU8a"],[93,61,90,31],[93,63,90,32,"value"],[93,68,90,37],[93,69,90,38,"length"],[93,75,90,44],[93,76,90,45],[93,78,90,47,"value"],[93,83,90,52],[93,84,90,53],[93,87,91,18],[93,88,91,19],[93,92,91,19,"compactToU8a"],[93,105,91,31],[93,106,91,31,"compactToU8a"],[93,118,91,31],[93,120,91,32,"value"],[93,125,91,37],[93,126,91,38,"length"],[93,132,91,44],[93,133,91,45],[94,6,92,8],[94,7,92,9],[95,4,93,4],[96,4,94,4],[97,0,95,0],[98,0,96,0],[99,4,97,4,"setOverride"],[99,15,97,15,"setOverride"],[99,16,97,16,"override"],[99,24,97,24],[99,26,97,26],[100,6,98,8],[100,10,98,12],[100,11,98,13],[100,12,98,14,"override"],[100,20,98,22],[100,23,98,25,"override"],[100,31,98,33],[101,4,99,4],[102,4,100,4],[103,0,101,0],[104,0,102,0],[105,4,103,4,"toHex"],[105,9,103,9,"toHex"],[105,10,103,9],[105,12,103,12],[106,6,104,8],[107,6,105,8],[108,6,106,8],[108,13,106,15],[108,17,106,15,"u8aToHex"],[108,30,106,23],[108,31,106,23,"u8aToHex"],[108,39,106,23],[108,41,106,24],[108,45,106,28],[108,46,106,29,"toU8a"],[108,51,106,34],[108,52,106,35],[108,56,106,39],[108,57,106,40],[108,58,106,41],[109,4,107,4],[110,4,108,4],[111,0,109,0],[112,0,110,0],[113,4,111,4,"toHuman"],[113,11,111,11,"toHuman"],[113,12,111,11],[113,14,111,14],[114,6,112,8],[114,13,112,15],[114,17,112,19],[114,18,112,20,"toJSON"],[114,24,112,26],[114,25,112,27],[114,26,112,28],[115,4,113,4],[116,4,114,4],[117,0,115,0],[118,0,116,0],[119,4,117,4,"toJSON"],[119,10,117,10,"toJSON"],[119,11,117,10],[119,13,117,13],[120,6,118,8],[120,13,118,15],[120,17,118,19],[120,18,118,20,"toString"],[120,26,118,28],[120,27,118,29],[120,28,118,30],[121,4,119,4],[122,4,120,4],[123,0,121,0],[124,0,122,0],[125,4,123,4,"toPrimitive"],[125,15,123,15,"toPrimitive"],[125,16,123,15],[125,18,123,18],[126,6,124,8],[126,13,124,15],[126,17,124,19],[126,18,124,20,"toJSON"],[126,24,124,26],[126,25,124,27],[126,26,124,28],[127,4,125,4],[128,4,126,4],[129,0,127,0],[130,0,128,0],[131,4,129,4,"toRawType"],[131,13,129,13,"toRawType"],[131,14,129,13],[131,16,129,16],[132,6,130,8],[132,13,130,15],[132,19,130,21],[133,4,131,4],[134,4,132,4],[135,0,133,0],[136,0,134,0],[137,4,135,4,"toString"],[137,12,135,12,"toString"],[137,13,135,12],[137,15,135,15],[138,6,136,8],[138,13,136,15],[138,17,136,19],[138,18,136,20],[138,19,136,21,"override"],[138,27,136,29],[138,31,136,33],[138,36,136,38],[138,37,136,39,"toString"],[138,45,136,47],[138,46,136,48],[138,47,136,49],[139,4,137,4],[140,4,138,4],[141,0,139,0],[142,0,140,0],[143,0,141,0],[144,4,142,4,"toU8a"],[144,9,142,9,"toU8a"],[144,10,142,10,"isBare"],[144,16,142,16],[144,18,142,18],[145,6,143,8],[146,6,144,8],[147,6,145,8],[147,12,145,14,"encoded"],[147,19,145,21],[147,22,145,24],[147,26,145,24,"stringToU8a"],[147,39,145,35],[147,40,145,35,"stringToU8a"],[147,51,145,35],[147,53,145,36],[147,58,145,41],[147,59,145,42,"toString"],[147,67,145,50],[147,68,145,51],[147,69,145,52],[147,70,145,53],[148,6,146,8],[148,13,146,15,"isBare"],[148,19,146,21],[148,22,147,14,"encoded"],[148,29,147,21],[148,32,148,14],[148,36,148,14,"compactAddLength"],[148,49,148,30],[148,50,148,30,"compactAddLength"],[148,66,148,30],[148,68,148,31,"encoded"],[148,75,148,38],[148,76,148,39],[149,4,149,4],[150,2,150,0],[151,0,150,1],[151,3]],"functionMap":{"names":["<global>","decodeText","Text","constructor","get__encodedLength","get__hash","get__isEmpty","get__length","eq","inspect","setOverride","toHex","toHuman","toJSON","toPrimitive","toRawType","toString","toU8a"],"mappings":"AAA;ACI;CDwB;OES;ICM;KDK;IEI;KFE;IGI;KHE;III;KJE;IKI;KLG;IMI;KNI;IOI;KPO;IQI;KRE;ISI;KTI;IUI;KVE;IWI;KXE;IYI;KZE;IaI;KbE;IcI;KdE;IeK;KfO;CFC"},"hasCjsExports":false},"type":"js/module"}]} |