mirror of
https://github.com/pezkuwichain/pezkuwi-mobile-app.git
synced 2026-05-30 11:11:01 +00:00
1 line
12 KiB
Plaintext
1 line
12 KiB
Plaintext
{"dependencies":[{"name":"@babel/runtime/helpers/slicedToArray","data":{"asyncType":null,"isESMImport":false,"locs":[],"key":"5y7e5+zC7teYEEC6niD9f5zII1M=","exportNames":["*"],"imports":1}},{"name":"rxjs","data":{"asyncType":null,"isESMImport":false,"locs":[{"start":{"line":4,"column":15,"index":121},"end":{"line":4,"column":30,"index":136}}],"key":"atDzfUGaJNRNtwyVumomzH/5ygw=","exportNames":["*"],"imports":1}},{"name":"../util/index.js","data":{"asyncType":null,"isESMImport":false,"locs":[{"start":{"line":5,"column":19,"index":157},"end":{"line":5,"column":46,"index":184}}],"key":"H94lp+EitftSFqDHaenrSs5zKB0=","exportNames":["*"],"imports":1}},{"name":"./helpers/filterBountyProposals.js","data":{"asyncType":null,"isESMImport":false,"locs":[{"start":{"line":6,"column":35,"index":221},"end":{"line":6,"column":80,"index":266}}],"key":"QUrJXGYoXQFWpuLz820pceNhN2E=","exportNames":["*"],"imports":1}}],"output":[{"data":{"code":"__d(function (global, require, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {\n \"use strict\";\n\n var _slicedToArray = require(_dependencyMap[0], \"@babel/runtime/helpers/slicedToArray\").default;\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports.bounties = bounties;\n var rxjs_1 = require(_dependencyMap[1], \"rxjs\");\n var index_js_1 = require(_dependencyMap[2], \"../util/index.js\");\n var filterBountyProposals_js_1 = require(_dependencyMap[3], \"./helpers/filterBountyProposals.js\");\n function parseResult(_ref) {\n var _ref2 = _slicedToArray(_ref, 4),\n maybeBounties = _ref2[0],\n maybeDescriptions = _ref2[1],\n ids = _ref2[2],\n bountyProposals = _ref2[3];\n var bounties = [];\n maybeBounties.forEach(function (bounty, index) {\n if (bounty.isSome) {\n bounties.push({\n bounty: bounty.unwrap(),\n description: maybeDescriptions[index].unwrapOrDefault().toUtf8(),\n index: ids[index],\n proposals: bountyProposals.filter(function (bountyProposal) {\n return bountyProposal.proposal && ids[index].eq(bountyProposal.proposal.args[0]);\n })\n });\n }\n });\n return bounties;\n }\n /**\n * @name bounties\n * @descrive Retrieves all active bounties, their descriptions, and associated proposals.\n * @example\n * ```javascript\n * const bounties = await api.derive.bounties();\n * console.log(\"Active bounties:\", bounties);\n * ```\n */\n function bounties(instanceId, api) {\n var bountyBase = api.query.bounties || api.query.treasury;\n return (0, index_js_1.memo)(instanceId, function () {\n return bountyBase.bounties ? (0, rxjs_1.combineLatest)([bountyBase.bountyCount(), api.query.council ? api.query.council.proposalCount() : (0, rxjs_1.of)(0)]).pipe((0, rxjs_1.switchMap)(function () {\n return (0, rxjs_1.combineLatest)([bountyBase.bounties.keys(), api.derive.council ? api.derive.council.proposals() : (0, rxjs_1.of)([])]);\n }), (0, rxjs_1.switchMap)(function (_ref3) {\n var _ref4 = _slicedToArray(_ref3, 2),\n keys = _ref4[0],\n proposals = _ref4[1];\n var ids = keys.map(function (_ref5) {\n var _ref5$args = _slicedToArray(_ref5.args, 1),\n id = _ref5$args[0];\n return id;\n });\n return (0, rxjs_1.combineLatest)([bountyBase.bounties.multi(ids), bountyBase.bountyDescriptions.multi(ids), (0, rxjs_1.of)(ids), (0, rxjs_1.of)((0, filterBountyProposals_js_1.filterBountiesProposals)(api, proposals))]);\n }), (0, rxjs_1.map)(parseResult)) : (0, rxjs_1.of)(parseResult([[], [], [], []]));\n });\n }\n});","lineCount":60,"map":[[2,2,1,0],[2,14,1,12],[4,2,1,13],[4,6,1,13,"_slicedToArray"],[4,20,1,13],[4,23,1,13,"require"],[4,30,1,13],[4,31,1,13,"_dependencyMap"],[4,45,1,13],[4,90,1,13,"default"],[4,97,1,13],[5,2,2,0,"Object"],[5,8,2,6],[5,9,2,7,"defineProperty"],[5,23,2,21],[5,24,2,22,"exports"],[5,31,2,29],[5,33,2,31],[5,45,2,43],[5,47,2,45],[6,4,2,47,"value"],[6,9,2,52],[6,11,2,54],[7,2,2,59],[7,3,2,60],[7,4,2,61],[8,2,3,0,"exports"],[8,9,3,7],[8,10,3,8,"bounties"],[8,18,3,16],[8,21,3,19,"bounties"],[8,29,3,27],[9,2,4,0],[9,6,4,6,"rxjs_1"],[9,12,4,12],[9,15,4,15,"require"],[9,22,4,22],[9,23,4,22,"_dependencyMap"],[9,37,4,22],[9,48,4,29],[9,49,4,30],[10,2,5,0],[10,6,5,6,"index_js_1"],[10,16,5,16],[10,19,5,19,"require"],[10,26,5,26],[10,27,5,26,"_dependencyMap"],[10,41,5,26],[10,64,5,45],[10,65,5,46],[11,2,6,0],[11,6,6,6,"filterBountyProposals_js_1"],[11,32,6,32],[11,35,6,35,"require"],[11,42,6,42],[11,43,6,42,"_dependencyMap"],[11,57,6,42],[11,98,6,79],[11,99,6,80],[12,2,7,0],[12,11,7,9,"parseResult"],[12,22,7,20,"parseResult"],[12,23,7,20,"_ref"],[12,27,7,20],[12,29,7,79],[13,4,7,79],[13,8,7,79,"_ref2"],[13,13,7,79],[13,16,7,79,"_slicedToArray"],[13,30,7,79],[13,31,7,79,"_ref"],[13,35,7,79],[14,6,7,22,"maybeBounties"],[14,19,7,35],[14,22,7,35,"_ref2"],[14,27,7,35],[15,6,7,37,"maybeDescriptions"],[15,23,7,54],[15,26,7,54,"_ref2"],[15,31,7,54],[16,6,7,56,"ids"],[16,9,7,59],[16,12,7,59,"_ref2"],[16,17,7,59],[17,6,7,61,"bountyProposals"],[17,21,7,76],[17,24,7,76,"_ref2"],[17,29,7,76],[18,4,8,4],[18,8,8,10,"bounties"],[18,16,8,18],[18,19,8,21],[18,21,8,23],[19,4,9,4,"maybeBounties"],[19,17,9,17],[19,18,9,18,"forEach"],[19,25,9,25],[19,26,9,26],[19,36,9,27,"bounty"],[19,42,9,33],[19,44,9,35,"index"],[19,49,9,40],[19,51,9,45],[20,6,10,8],[20,10,10,12,"bounty"],[20,16,10,18],[20,17,10,19,"isSome"],[20,23,10,25],[20,25,10,27],[21,8,11,12,"bounties"],[21,16,11,20],[21,17,11,21,"push"],[21,21,11,25],[21,22,11,26],[22,10,12,16,"bounty"],[22,16,12,22],[22,18,12,24,"bounty"],[22,24,12,30],[22,25,12,31,"unwrap"],[22,31,12,37],[22,32,12,38],[22,33,12,39],[23,10,13,16,"description"],[23,21,13,27],[23,23,13,29,"maybeDescriptions"],[23,40,13,46],[23,41,13,47,"index"],[23,46,13,52],[23,47,13,53],[23,48,13,54,"unwrapOrDefault"],[23,63,13,69],[23,64,13,70],[23,65,13,71],[23,66,13,72,"toUtf8"],[23,72,13,78],[23,73,13,79],[23,74,13,80],[24,10,14,16,"index"],[24,15,14,21],[24,17,14,23,"ids"],[24,20,14,26],[24,21,14,27,"index"],[24,26,14,32],[24,27,14,33],[25,10,15,16,"proposals"],[25,19,15,25],[25,21,15,27,"bountyProposals"],[25,36,15,42],[25,37,15,43,"filter"],[25,43,15,49],[25,44,15,50],[25,54,15,51,"bountyProposal"],[25,68,15,65],[26,12,15,65],[26,19,15,70,"bountyProposal"],[26,33,15,84],[26,34,15,85,"proposal"],[26,42,15,93],[26,46,15,97,"ids"],[26,49,15,100],[26,50,15,101,"index"],[26,55,15,106],[26,56,15,107],[26,57,15,108,"eq"],[26,59,15,110],[26,60,15,111,"bountyProposal"],[26,74,15,125],[26,75,15,126,"proposal"],[26,83,15,134],[26,84,15,135,"args"],[26,88,15,139],[26,89,15,140],[26,90,15,141],[26,91,15,142],[26,92,15,143],[27,10,15,143],[28,8,16,12],[28,9,16,13],[28,10,16,14],[29,6,17,8],[30,4,18,4],[30,5,18,5],[30,6,18,6],[31,4,19,4],[31,11,19,11,"bounties"],[31,19,19,19],[32,2,20,0],[33,2,21,0],[34,0,22,0],[35,0,23,0],[36,0,24,0],[37,0,25,0],[38,0,26,0],[39,0,27,0],[40,0,28,0],[41,0,29,0],[42,2,30,0],[42,11,30,9,"bounties"],[42,19,30,17,"bounties"],[42,20,30,18,"instanceId"],[42,30,30,28],[42,32,30,30,"api"],[42,35,30,33],[42,37,30,35],[43,4,31,4],[43,8,31,10,"bountyBase"],[43,18,31,20],[43,21,31,23,"api"],[43,24,31,26],[43,25,31,27,"query"],[43,30,31,32],[43,31,31,33,"bounties"],[43,39,31,41],[43,43,31,45,"api"],[43,46,31,48],[43,47,31,49,"query"],[43,52,31,54],[43,53,31,55,"treasury"],[43,61,31,63],[44,4,32,4],[44,11,32,11],[44,12,32,12],[44,13,32,13],[44,15,32,15,"index_js_1"],[44,25,32,25],[44,26,32,26,"memo"],[44,30,32,30],[44,32,32,32,"instanceId"],[44,42,32,42],[44,44,32,44],[45,6,32,44],[45,13,32,50,"bountyBase"],[45,23,32,60],[45,24,32,61,"bounties"],[45,32,32,69],[45,35,33,10],[45,36,33,11],[45,37,33,12],[45,39,33,14,"rxjs_1"],[45,45,33,20],[45,46,33,21,"combineLatest"],[45,59,33,34],[45,61,33,36],[45,62,34,12,"bountyBase"],[45,72,34,22],[45,73,34,23,"bountyCount"],[45,84,34,34],[45,85,34,35],[45,86,34,36],[45,88,35,12,"api"],[45,91,35,15],[45,92,35,16,"query"],[45,97,35,21],[45,98,35,22,"council"],[45,105,35,29],[45,108,36,18,"api"],[45,111,36,21],[45,112,36,22,"query"],[45,117,36,27],[45,118,36,28,"council"],[45,125,36,35],[45,126,36,36,"proposalCount"],[45,139,36,49],[45,140,36,50],[45,141,36,51],[45,144,37,18],[45,145,37,19],[45,146,37,20],[45,148,37,22,"rxjs_1"],[45,154,37,28],[45,155,37,29,"of"],[45,157,37,31],[45,159,37,33],[45,160,37,34],[45,161,37,35],[45,162,38,9],[45,163,38,10],[45,164,38,11,"pipe"],[45,168,38,15],[45,169,38,16],[45,170,38,17],[45,171,38,18],[45,173,38,20,"rxjs_1"],[45,179,38,26],[45,180,38,27,"switchMap"],[45,189,38,36],[45,191,38,38],[46,8,38,38],[46,15,38,44],[46,16,38,45],[46,17,38,46],[46,19,38,48,"rxjs_1"],[46,25,38,54],[46,26,38,55,"combineLatest"],[46,39,38,68],[46,41,38,70],[46,42,39,12,"bountyBase"],[46,52,39,22],[46,53,39,23,"bounties"],[46,61,39,31],[46,62,39,32,"keys"],[46,66,39,36],[46,67,39,37],[46,68,39,38],[46,70,40,12,"api"],[46,73,40,15],[46,74,40,16,"derive"],[46,80,40,22],[46,81,40,23,"council"],[46,88,40,30],[46,91,41,18,"api"],[46,94,41,21],[46,95,41,22,"derive"],[46,101,41,28],[46,102,41,29,"council"],[46,109,41,36],[46,110,41,37,"proposals"],[46,119,41,46],[46,120,41,47],[46,121,41,48],[46,124,42,18],[46,125,42,19],[46,126,42,20],[46,128,42,22,"rxjs_1"],[46,134,42,28],[46,135,42,29,"of"],[46,137,42,31],[46,139,42,33],[46,141,42,35],[46,142,42,36],[46,143,43,9],[46,144,43,10],[47,6,43,10],[47,8,43,11],[47,10,43,13],[47,11,43,14],[47,12,43,15],[47,14,43,17,"rxjs_1"],[47,20,43,23],[47,21,43,24,"switchMap"],[47,30,43,33],[47,32,43,35],[47,42,43,35,"_ref3"],[47,47,43,35],[47,49,43,58],[48,8,43,58],[48,12,43,58,"_ref4"],[48,17,43,58],[48,20,43,58,"_slicedToArray"],[48,34,43,58],[48,35,43,58,"_ref3"],[48,40,43,58],[49,10,43,37,"keys"],[49,14,43,41],[49,17,43,41,"_ref4"],[49,22,43,41],[50,10,43,43,"proposals"],[50,19,43,52],[50,22,43,52,"_ref4"],[50,27,43,52],[51,8,44,12],[51,12,44,18,"ids"],[51,15,44,21],[51,18,44,24,"keys"],[51,22,44,28],[51,23,44,29,"map"],[51,26,44,32],[51,27,44,33],[51,37,44,33,"_ref5"],[51,42,44,33],[52,10,44,33],[52,14,44,33,"_ref5$args"],[52,24,44,33],[52,27,44,33,"_slicedToArray"],[52,41,44,33],[52,42,44,33,"_ref5"],[52,47,44,33],[52,48,44,36,"args"],[52,52,44,40],[53,12,44,43,"id"],[53,14,44,45],[53,17,44,45,"_ref5$args"],[53,27,44,45],[54,10,44,45],[54,17,44,53,"id"],[54,19,44,55],[55,8,44,55],[55,10,44,56],[56,8,45,12],[56,15,45,19],[56,16,45,20],[56,17,45,21],[56,19,45,23,"rxjs_1"],[56,25,45,29],[56,26,45,30,"combineLatest"],[56,39,45,43],[56,41,45,45],[56,42,46,16,"bountyBase"],[56,52,46,26],[56,53,46,27,"bounties"],[56,61,46,35],[56,62,46,36,"multi"],[56,67,46,41],[56,68,46,42,"ids"],[56,71,46,45],[56,72,46,46],[56,74,47,16,"bountyBase"],[56,84,47,26],[56,85,47,27,"bountyDescriptions"],[56,103,47,45],[56,104,47,46,"multi"],[56,109,47,51],[56,110,47,52,"ids"],[56,113,47,55],[56,114,47,56],[56,116,48,16],[56,117,48,17],[56,118,48,18],[56,120,48,20,"rxjs_1"],[56,126,48,26],[56,127,48,27,"of"],[56,129,48,29],[56,131,48,31,"ids"],[56,134,48,34],[56,135,48,35],[56,137,49,16],[56,138,49,17],[56,139,49,18],[56,141,49,20,"rxjs_1"],[56,147,49,26],[56,148,49,27,"of"],[56,150,49,29],[56,152,49,31],[56,153,49,32],[56,154,49,33],[56,156,49,35,"filterBountyProposals_js_1"],[56,182,49,61],[56,183,49,62,"filterBountiesProposals"],[56,206,49,85],[56,208,49,87,"api"],[56,211,49,90],[56,213,49,92,"proposals"],[56,222,49,101],[56,223,49,102],[56,224,49,103],[56,225,50,13],[56,226,50,14],[57,6,51,8],[57,7,51,9],[57,8,51,10],[57,10,51,12],[57,11,51,13],[57,12,51,14],[57,14,51,16,"rxjs_1"],[57,20,51,22],[57,21,51,23,"map"],[57,24,51,26],[57,26,51,28,"parseResult"],[57,37,51,39],[57,38,51,40],[57,39,51,41],[57,42,52,10],[57,43,52,11],[57,44,52,12],[57,46,52,14,"rxjs_1"],[57,52,52,20],[57,53,52,21,"of"],[57,55,52,23],[57,57,52,25,"parseResult"],[57,68,52,36],[57,69,52,37],[57,70,52,38],[57,72,52,40],[57,74,52,42],[57,76,52,44],[57,78,52,46],[57,80,52,48],[57,82,52,50],[57,84,52,52],[57,85,52,53],[57,86,52,54],[57,87,52,55],[58,4,52,55],[58,6,52,56],[59,2,53,0],[60,0,53,1],[60,3]],"functionMap":{"names":["<global>","parseResult","maybeBounties.forEach$argument_0","bountyProposals.filter$argument_0","bounties","<anonymous>","keys.map$argument_0"],"mappings":"AAA;ACM;0BCE;kDCM,6FD;KDG;CDE;AIU;4CCE;iCCY,sBD;uDDQ;CJC"},"hasCjsExports":true},"type":"js/module"}]} |