Files
pezkuwi-mobile-app/frontend/.metro-cache/cache/f9/04708a750f6b30351b2aa45f42284628323b511b96cc36b4183330447e3d78f46e7262
T
2025-10-24 02:46:57 +00:00

1 line
12 KiB
Plaintext

{"dependencies":[{"name":"rxjs","data":{"asyncType":null,"isESMImport":true,"locs":[{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":67,"index":67}}],"key":"PnOMrhZAPWoeW3ygrvUJ7ff768Y=","exportNames":["*"],"imports":1}},{"name":"../util/index.js","data":{"asyncType":null,"isESMImport":true,"locs":[{"start":{"line":2,"column":0,"index":68},"end":{"line":2,"column":59,"index":127}}],"key":"GRJlO1cmIj14nBxcasNpiq30og4=","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.createBlockNumberDerive = createBlockNumberDerive;\n exports.getAuthorDetails = getAuthorDetails;\n var _rxjs = require(_dependencyMap[0], \"rxjs\");\n var _utilIndexJs = require(_dependencyMap[1], \"../util/index.js\");\n function createBlockNumberDerive(fn) {\n return (instanceId, api) => (0, _utilIndexJs.memo)(instanceId, () => fn(api).pipe((0, _rxjs.map)(_utilIndexJs.unwrapBlockNumber)));\n }\n /** @internal */\n function getAuthorDetailsWithAt(header, queryAt) {\n const validators = queryAt.session?.validators ? queryAt.session.validators() : (0, _rxjs.of)(null);\n // nimbus consensus stores the session key of the block author in header logs\n const {\n logs: [log]\n } = header.digest;\n const loggedAuthor = log && (log.isConsensus && log.asConsensus[0].isNimbus && log.asConsensus[1] || log.isPreRuntime && log.asPreRuntime[0].isNimbus && log.asPreRuntime[1]);\n if (loggedAuthor) {\n // use the author mapping pallet, if available (ie: moonbeam, moonriver), to map session (nimbus) key to author (collator/validator) key\n if (queryAt['authorMapping']?.['mappingWithDeposit']) {\n return (0, _rxjs.combineLatest)([(0, _rxjs.of)(header), validators, queryAt['authorMapping']['mappingWithDeposit'](loggedAuthor).pipe((0, _rxjs.map)(o => o.unwrapOr({\n account: null\n }).account))]);\n }\n // fall back to session and parachain staking pallets, if available (ie: manta, calamari), to map session (nimbus) key to author (collator) key\n if (queryAt['parachainStaking']?.['selectedCandidates'] && queryAt.session?.nextKeys) {\n const loggedHex = loggedAuthor.toHex();\n return (0, _rxjs.combineLatest)([(0, _rxjs.of)(header), validators, queryAt['parachainStaking']['selectedCandidates']().pipe((0, _rxjs.mergeMap)(selectedCandidates => (0, _rxjs.combineLatest)([(0, _rxjs.of)(selectedCandidates), queryAt.session.nextKeys.multi(selectedCandidates).pipe((0, _rxjs.map)(nextKeys => nextKeys.findIndex(o => o.unwrapOrDefault().nimbus.toHex() === loggedHex)))])), (0, _rxjs.map)(([selectedCandidates, index]) => index === -1 ? null : selectedCandidates[index]))]);\n }\n }\n // normal operation, non-mapping\n return (0, _rxjs.combineLatest)([(0, _rxjs.of)(header), validators, (0, _rxjs.of)(null)]);\n }\n function getAuthorDetails(api, header, blockHash) {\n // For on-chain state, we need to retrieve it as per the start\n // of the block being constructed, i.e. session validators would\n // be at the point of the block construction, not when all operations\n // has been supplied.\n //\n // However for the first block (no parentHash available), we would\n // just use the as-is\n return api.queryAt(header.parentHash.isEmpty ? blockHash || header.hash : header.parentHash).pipe((0, _rxjs.switchMap)(queryAt => getAuthorDetailsWithAt(header, queryAt)));\n }\n});","lineCount":48,"map":[[7,2,3,0,"exports"],[7,9,3,0],[7,10,3,0,"createBlockNumberDerive"],[7,33,3,0],[7,36,3,0,"createBlockNumberDerive"],[7,59,3,0],[8,2,46,0,"exports"],[8,9,46,0],[8,10,46,0,"getAuthorDetails"],[8,26,46,0],[8,29,46,0,"getAuthorDetails"],[8,45,46,0],[9,2,1,0],[9,6,1,0,"_rxjs"],[9,11,1,0],[9,14,1,0,"require"],[9,21,1,0],[9,22,1,0,"_dependencyMap"],[9,36,1,0],[10,2,2,0],[10,6,2,0,"_utilIndexJs"],[10,18,2,0],[10,21,2,0,"require"],[10,28,2,0],[10,29,2,0,"_dependencyMap"],[10,43,2,0],[11,2,3,7],[11,11,3,16,"createBlockNumberDerive"],[11,34,3,39,"createBlockNumberDerive"],[11,35,3,40,"fn"],[11,37,3,42],[11,39,3,44],[12,4,4,4],[12,11,4,11],[12,12,4,12,"instanceId"],[12,22,4,22],[12,24,4,24,"api"],[12,27,4,27],[12,32,4,32],[12,36,4,32,"memo"],[12,48,4,36],[12,49,4,36,"memo"],[12,53,4,36],[12,55,4,37,"instanceId"],[12,65,4,47],[12,67,4,49],[12,73,4,55,"fn"],[12,75,4,57],[12,76,4,58,"api"],[12,79,4,61],[12,80,4,62],[12,81,4,63,"pipe"],[12,85,4,67],[12,86,4,68],[12,90,4,68,"map"],[12,95,4,71],[12,96,4,71,"map"],[12,99,4,71],[12,101,4,72,"unwrapBlockNumber"],[12,113,4,89],[12,114,4,89,"unwrapBlockNumber"],[12,131,4,89],[12,132,4,90],[12,133,4,91],[12,134,4,92],[13,2,5,0],[14,2,6,0],[15,2,7,0],[15,11,7,9,"getAuthorDetailsWithAt"],[15,33,7,31,"getAuthorDetailsWithAt"],[15,34,7,32,"header"],[15,40,7,38],[15,42,7,40,"queryAt"],[15,49,7,47],[15,51,7,49],[16,4,8,4],[16,10,8,10,"validators"],[16,20,8,20],[16,23,8,23,"queryAt"],[16,30,8,30],[16,31,8,31,"session"],[16,38,8,38],[16,40,8,40,"validators"],[16,50,8,50],[16,53,9,10,"queryAt"],[16,60,9,17],[16,61,9,18,"session"],[16,68,9,25],[16,69,9,26,"validators"],[16,79,9,36],[16,80,9,37],[16,81,9,38],[16,84,10,10],[16,88,10,10,"of"],[16,93,10,12],[16,94,10,12,"of"],[16,96,10,12],[16,98,10,13],[16,102,10,17],[16,103,10,18],[17,4,11,4],[18,4,12,4],[18,10,12,10],[19,6,12,12,"logs"],[19,10,12,16],[19,12,12,18],[19,13,12,19,"log"],[19,16,12,22],[20,4,12,24],[20,5,12,25],[20,8,12,28,"header"],[20,14,12,34],[20,15,12,35,"digest"],[20,21,12,41],[21,4,13,4],[21,10,13,10,"loggedAuthor"],[21,22,13,22],[21,25,13,26,"log"],[21,28,13,29],[21,33,13,35,"log"],[21,36,13,38],[21,37,13,39,"isConsensus"],[21,48,13,50],[21,52,13,54,"log"],[21,55,13,57],[21,56,13,58,"asConsensus"],[21,67,13,69],[21,68,13,70],[21,69,13,71],[21,70,13,72],[21,71,13,73,"isNimbus"],[21,79,13,81],[21,83,13,85,"log"],[21,86,13,88],[21,87,13,89,"asConsensus"],[21,98,13,100],[21,99,13,101],[21,100,13,102],[21,101,13,103],[21,105,14,9,"log"],[21,108,14,12],[21,109,14,13,"isPreRuntime"],[21,121,14,25],[21,125,14,29,"log"],[21,128,14,32],[21,129,14,33,"asPreRuntime"],[21,141,14,45],[21,142,14,46],[21,143,14,47],[21,144,14,48],[21,145,14,49,"isNimbus"],[21,153,14,57],[21,157,14,61,"log"],[21,160,14,64],[21,161,14,65,"asPreRuntime"],[21,173,14,77],[21,174,14,78],[21,175,14,79],[21,176,14,81],[21,177,14,83],[22,4,15,4],[22,8,15,8,"loggedAuthor"],[22,20,15,20],[22,22,15,22],[23,6,16,8],[24,6,17,8],[24,10,17,12,"queryAt"],[24,17,17,19],[24,18,17,20],[24,33,17,35],[24,34,17,36],[24,37,17,39],[24,57,17,59],[24,58,17,60],[24,60,17,62],[25,8,18,12],[25,15,18,19],[25,19,18,19,"combineLatest"],[25,24,18,32],[25,25,18,32,"combineLatest"],[25,38,18,32],[25,40,18,33],[25,41,19,16],[25,45,19,16,"of"],[25,50,19,18],[25,51,19,18,"of"],[25,53,19,18],[25,55,19,19,"header"],[25,61,19,25],[25,62,19,26],[25,64,20,16,"validators"],[25,74,20,26],[25,76,21,16,"queryAt"],[25,83,21,23],[25,84,21,24],[25,99,21,39],[25,100,21,40],[25,101,21,41],[25,121,21,61],[25,122,21,62],[25,123,21,63,"loggedAuthor"],[25,135,21,75],[25,136,21,76],[25,137,21,77,"pipe"],[25,141,21,81],[25,142,21,82],[25,146,21,82,"map"],[25,151,21,85],[25,152,21,85,"map"],[25,155,21,85],[25,157,21,87,"o"],[25,158,21,88],[25,162,21,93,"o"],[25,163,21,94],[25,164,21,95,"unwrapOr"],[25,172,21,103],[25,173,21,104],[26,10,21,106,"account"],[26,17,21,113],[26,19,21,115],[27,8,21,120],[27,9,21,121],[27,10,21,122],[27,11,21,123,"account"],[27,18,21,130],[27,19,21,131],[27,20,21,132],[27,21,22,13],[27,22,22,14],[28,6,23,8],[29,6,24,8],[30,6,25,8],[30,10,25,12,"queryAt"],[30,17,25,19],[30,18,25,20],[30,36,25,38],[30,37,25,39],[30,40,25,42],[30,60,25,62],[30,61,25,63],[30,65,25,67,"queryAt"],[30,72,25,74],[30,73,25,75,"session"],[30,80,25,82],[30,82,25,84,"nextKeys"],[30,90,25,92],[30,92,25,94],[31,8,26,12],[31,14,26,18,"loggedHex"],[31,23,26,27],[31,26,26,30,"loggedAuthor"],[31,38,26,42],[31,39,26,43,"toHex"],[31,44,26,48],[31,45,26,49],[31,46,26,50],[32,8,27,12],[32,15,27,19],[32,19,27,19,"combineLatest"],[32,24,27,32],[32,25,27,32,"combineLatest"],[32,38,27,32],[32,40,27,33],[32,41,28,16],[32,45,28,16,"of"],[32,50,28,18],[32,51,28,18,"of"],[32,53,28,18],[32,55,28,19,"header"],[32,61,28,25],[32,62,28,26],[32,64,29,16,"validators"],[32,74,29,26],[32,76,30,16,"queryAt"],[32,83,30,23],[32,84,30,24],[32,102,30,42],[32,103,30,43],[32,104,30,44],[32,124,30,64],[32,125,30,65],[32,126,30,66],[32,127,30,67],[32,128,30,68,"pipe"],[32,132,30,72],[32,133,30,73],[32,137,30,73,"mergeMap"],[32,142,30,81],[32,143,30,81,"mergeMap"],[32,151,30,81],[32,153,30,83,"selectedCandidates"],[32,171,30,101],[32,175,30,106],[32,179,30,106,"combineLatest"],[32,184,30,119],[32,185,30,119,"combineLatest"],[32,198,30,119],[32,200,30,120],[32,201,31,20],[32,205,31,20,"of"],[32,210,31,22],[32,211,31,22,"of"],[32,213,31,22],[32,215,31,23,"selectedCandidates"],[32,233,31,41],[32,234,31,42],[32,236,32,20,"queryAt"],[32,243,32,27],[32,244,32,28,"session"],[32,251,32,35],[32,252,32,36,"nextKeys"],[32,260,32,44],[32,261,32,45,"multi"],[32,266,32,50],[32,267,32,51,"selectedCandidates"],[32,285,32,69],[32,286,32,70],[32,287,32,71,"pipe"],[32,291,32,75],[32,292,32,76],[32,296,32,76,"map"],[32,301,32,79],[32,302,32,79,"map"],[32,305,32,79],[32,307,32,81,"nextKeys"],[32,315,32,89],[32,319,32,94,"nextKeys"],[32,327,32,102],[32,328,32,103,"findIndex"],[32,337,32,112],[32,338,32,114,"o"],[32,339,32,115],[32,343,32,120,"o"],[32,344,32,121],[32,345,32,122,"unwrapOrDefault"],[32,360,32,137],[32,361,32,138],[32,362,32,139],[32,363,32,140,"nimbus"],[32,369,32,146],[32,370,32,147,"toHex"],[32,375,32,152],[32,376,32,153],[32,377,32,154],[32,382,32,159,"loggedHex"],[32,391,32,168],[32,392,32,169],[32,393,32,170],[32,394,32,171],[32,395,33,17],[32,396,33,18],[32,397,33,19],[32,399,33,21],[32,403,33,21,"map"],[32,408,33,24],[32,409,33,24,"map"],[32,412,33,24],[32,414,33,25],[32,415,33,26],[32,416,33,27,"selectedCandidates"],[32,434,33,45],[32,436,33,47,"index"],[32,441,33,52],[32,442,33,53],[32,447,33,58,"index"],[32,452,33,63],[32,457,33,68],[32,458,33,69],[32,459,33,70],[32,462,34,22],[32,466,34,26],[32,469,35,22,"selectedCandidates"],[32,487,35,40],[32,488,35,41,"index"],[32,493,35,46],[32,494,35,47],[32,495,35,48],[32,496,35,49],[32,497,36,13],[32,498,36,14],[33,6,37,8],[34,4,38,4],[35,4,39,4],[36,4,40,4],[36,11,40,11],[36,15,40,11,"combineLatest"],[36,20,40,24],[36,21,40,24,"combineLatest"],[36,34,40,24],[36,36,40,25],[36,37,41,8],[36,41,41,8,"of"],[36,46,41,10],[36,47,41,10,"of"],[36,49,41,10],[36,51,41,11,"header"],[36,57,41,17],[36,58,41,18],[36,60,42,8,"validators"],[36,70,42,18],[36,72,43,8],[36,76,43,8,"of"],[36,81,43,10],[36,82,43,10,"of"],[36,84,43,10],[36,86,43,11],[36,90,43,15],[36,91,43,16],[36,92,44,5],[36,93,44,6],[37,2,45,0],[38,2,46,7],[38,11,46,16,"getAuthorDetails"],[38,27,46,32,"getAuthorDetails"],[38,28,46,33,"api"],[38,31,46,36],[38,33,46,38,"header"],[38,39,46,44],[38,41,46,46,"blockHash"],[38,50,46,55],[38,52,46,57],[39,4,47,4],[40,4,48,4],[41,4,49,4],[42,4,50,4],[43,4,51,4],[44,4,52,4],[45,4,53,4],[46,4,54,4],[46,11,54,11,"api"],[46,14,54,14],[46,15,54,15,"queryAt"],[46,22,54,22],[46,23,54,23,"header"],[46,29,54,29],[46,30,54,30,"parentHash"],[46,40,54,40],[46,41,54,41,"isEmpty"],[46,48,54,48],[46,51,55,10,"blockHash"],[46,60,55,19],[46,64,55,23,"header"],[46,70,55,29],[46,71,55,30,"hash"],[46,75,55,34],[46,78,56,10,"header"],[46,84,56,16],[46,85,56,17,"parentHash"],[46,95,56,27],[46,96,56,28],[46,97,56,29,"pipe"],[46,101,56,33],[46,102,56,34],[46,106,56,34,"switchMap"],[46,111,56,43],[46,112,56,43,"switchMap"],[46,121,56,43],[46,123,56,45,"queryAt"],[46,130,56,52],[46,134,56,57,"getAuthorDetailsWithAt"],[46,156,56,79],[46,157,56,80,"header"],[46,163,56,86],[46,165,56,88,"queryAt"],[46,172,56,95],[46,173,56,96],[46,174,56,97],[46,175,56,98],[47,2,57,0],[48,0,57,1],[48,3]],"functionMap":{"names":["<global>","createBlockNumberDerive","<anonymous>","memo$argument_1","getAuthorDetailsWithAt","map$argument_0","mergeMap$argument_0","nextKeys.findIndex$argument_0","getAuthorDetails","switchMap$argument_0"],"mappings":"AAA;OCE;WCC,sCC,0CD,CD;CDC;AIE;sFCc,4CD;kFES;gFDE,iCE,uDF,CC;kBFC,OC;+CDE;CJU;OQC;4CCU,oDD;CRC"},"hasCjsExports":false},"type":"js/module"}]}