{"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.floatToU8a = floatToU8a;\n /**\n * @name floatToU8a\n * @description Converts a float into a U8a representation (While we don't use BE in SCALE\n * we still allow for either representation, although, as elsewhere, isLe is default)\n */\n function floatToU8a(value = 0.0, {\n bitLength = 32,\n isLe = true\n } = {}) {\n if (bitLength !== 32 && bitLength !== 64) {\n throw new Error('Invalid bitLength provided, expected 32 or 64');\n }\n const result = new Uint8Array(bitLength / 8);\n const dv = new DataView(result.buffer, result.byteOffset);\n if (bitLength === 32) {\n dv.setFloat32(0, Number(value), isLe);\n } else {\n dv.setFloat64(0, Number(value), isLe);\n }\n return result;\n }\n});","lineCount":29,"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,"floatToU8a"],[7,20,3,18],[7,23,3,21,"floatToU8a"],[7,33,3,31],[8,2,4,0],[9,0,5,0],[10,0,6,0],[11,0,7,0],[12,0,8,0],[13,2,9,0],[13,11,9,9,"floatToU8a"],[13,21,9,19,"floatToU8a"],[13,22,9,20,"value"],[13,27,9,25],[13,30,9,28],[13,33,9,31],[13,35,9,33],[14,4,9,35,"bitLength"],[14,13,9,44],[14,16,9,47],[14,18,9,49],[15,4,9,51,"isLe"],[15,8,9,55],[15,11,9,58],[16,2,9,63],[16,3,9,64],[16,6,9,67],[16,7,9,68],[16,8,9,69],[16,10,9,71],[17,4,10,4],[17,8,10,8,"bitLength"],[17,17,10,17],[17,22,10,22],[17,24,10,24],[17,28,10,28,"bitLength"],[17,37,10,37],[17,42,10,42],[17,44,10,44],[17,46,10,46],[18,6,11,8],[18,12,11,14],[18,16,11,18,"Error"],[18,21,11,23],[18,22,11,24],[18,69,11,71],[18,70,11,72],[19,4,12,4],[20,4,13,4],[20,10,13,10,"result"],[20,16,13,16],[20,19,13,19],[20,23,13,23,"Uint8Array"],[20,33,13,33],[20,34,13,34,"bitLength"],[20,43,13,43],[20,46,13,46],[20,47,13,47],[20,48,13,48],[21,4,14,4],[21,10,14,10,"dv"],[21,12,14,12],[21,15,14,15],[21,19,14,19,"DataView"],[21,27,14,27],[21,28,14,28,"result"],[21,34,14,34],[21,35,14,35,"buffer"],[21,41,14,41],[21,43,14,43,"result"],[21,49,14,49],[21,50,14,50,"byteOffset"],[21,60,14,60],[21,61,14,61],[22,4,15,4],[22,8,15,8,"bitLength"],[22,17,15,17],[22,22,15,22],[22,24,15,24],[22,26,15,26],[23,6,16,8,"dv"],[23,8,16,10],[23,9,16,11,"setFloat32"],[23,19,16,21],[23,20,16,22],[23,21,16,23],[23,23,16,25,"Number"],[23,29,16,31],[23,30,16,32,"value"],[23,35,16,37],[23,36,16,38],[23,38,16,40,"isLe"],[23,42,16,44],[23,43,16,45],[24,4,17,4],[24,5,17,5],[24,11,18,9],[25,6,19,8,"dv"],[25,8,19,10],[25,9,19,11,"setFloat64"],[25,19,19,21],[25,20,19,22],[25,21,19,23],[25,23,19,25,"Number"],[25,29,19,31],[25,30,19,32,"value"],[25,35,19,37],[25,36,19,38],[25,38,19,40,"isLe"],[25,42,19,44],[25,43,19,45],[26,4,20,4],[27,4,21,4],[27,11,21,11,"result"],[27,17,21,17],[28,2,22,0],[29,0,22,1],[29,3]],"functionMap":{"names":["","floatToU8a"],"mappings":"AAA;ACQ;CDa"},"hasCjsExports":true},"type":"js/module"}]}