mirror of
https://github.com/pezkuwichain/pezkuwi-mobile-app.git
synced 2026-05-30 05:21:02 +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((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(bountyProposal => bountyProposal.proposal && ids[index].eq(bountyProposal.proposal.args[0]))\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, () => 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)(() => (0, rxjs_1.combineLatest)([bountyBase.bounties.keys(), api.derive.council ? api.derive.council.proposals() : (0, rxjs_1.of)([])])), (0, rxjs_1.switchMap)(_ref3 => {\n var _ref4 = _slicedToArray(_ref3, 2),\n keys = _ref4[0],\n proposals = _ref4[1];\n var ids = keys.map(_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});","lineCount":54,"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,27,9,27,"bounty"],[19,33,9,33],[19,35,9,35,"index"],[19,40,9,40],[19,45,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,51,"bountyProposal"],[25,58,15,65],[25,62,15,70,"bountyProposal"],[25,76,15,84],[25,77,15,85,"proposal"],[25,85,15,93],[25,89,15,97,"ids"],[25,92,15,100],[25,93,15,101,"index"],[25,98,15,106],[25,99,15,107],[25,100,15,108,"eq"],[25,102,15,110],[25,103,15,111,"bountyProposal"],[25,117,15,125],[25,118,15,126,"proposal"],[25,126,15,134],[25,127,15,135,"args"],[25,131,15,139],[25,132,15,140],[25,133,15,141],[25,134,15,142],[25,135,15,143],[26,8,16,12],[26,9,16,13],[26,10,16,14],[27,6,17,8],[28,4,18,4],[28,5,18,5],[28,6,18,6],[29,4,19,4],[29,11,19,11,"bounties"],[29,19,19,19],[30,2,20,0],[31,2,21,0],[32,0,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,2,30,0],[40,11,30,9,"bounties"],[40,19,30,17,"bounties"],[40,20,30,18,"instanceId"],[40,30,30,28],[40,32,30,30,"api"],[40,35,30,33],[40,37,30,35],[41,4,31,4],[41,8,31,10,"bountyBase"],[41,18,31,20],[41,21,31,23,"api"],[41,24,31,26],[41,25,31,27,"query"],[41,30,31,32],[41,31,31,33,"bounties"],[41,39,31,41],[41,43,31,45,"api"],[41,46,31,48],[41,47,31,49,"query"],[41,52,31,54],[41,53,31,55,"treasury"],[41,61,31,63],[42,4,32,4],[42,11,32,11],[42,12,32,12],[42,13,32,13],[42,15,32,15,"index_js_1"],[42,25,32,25],[42,26,32,26,"memo"],[42,30,32,30],[42,32,32,32,"instanceId"],[42,42,32,42],[42,44,32,44],[42,50,32,50,"bountyBase"],[42,60,32,60],[42,61,32,61,"bounties"],[42,69,32,69],[42,72,33,10],[42,73,33,11],[42,74,33,12],[42,76,33,14,"rxjs_1"],[42,82,33,20],[42,83,33,21,"combineLatest"],[42,96,33,34],[42,98,33,36],[42,99,34,12,"bountyBase"],[42,109,34,22],[42,110,34,23,"bountyCount"],[42,121,34,34],[42,122,34,35],[42,123,34,36],[42,125,35,12,"api"],[42,128,35,15],[42,129,35,16,"query"],[42,134,35,21],[42,135,35,22,"council"],[42,142,35,29],[42,145,36,18,"api"],[42,148,36,21],[42,149,36,22,"query"],[42,154,36,27],[42,155,36,28,"council"],[42,162,36,35],[42,163,36,36,"proposalCount"],[42,176,36,49],[42,177,36,50],[42,178,36,51],[42,181,37,18],[42,182,37,19],[42,183,37,20],[42,185,37,22,"rxjs_1"],[42,191,37,28],[42,192,37,29,"of"],[42,194,37,31],[42,196,37,33],[42,197,37,34],[42,198,37,35],[42,199,38,9],[42,200,38,10],[42,201,38,11,"pipe"],[42,205,38,15],[42,206,38,16],[42,207,38,17],[42,208,38,18],[42,210,38,20,"rxjs_1"],[42,216,38,26],[42,217,38,27,"switchMap"],[42,226,38,36],[42,228,38,38],[42,234,38,44],[42,235,38,45],[42,236,38,46],[42,238,38,48,"rxjs_1"],[42,244,38,54],[42,245,38,55,"combineLatest"],[42,258,38,68],[42,260,38,70],[42,261,39,12,"bountyBase"],[42,271,39,22],[42,272,39,23,"bounties"],[42,280,39,31],[42,281,39,32,"keys"],[42,285,39,36],[42,286,39,37],[42,287,39,38],[42,289,40,12,"api"],[42,292,40,15],[42,293,40,16,"derive"],[42,299,40,22],[42,300,40,23,"council"],[42,307,40,30],[42,310,41,18,"api"],[42,313,41,21],[42,314,41,22,"derive"],[42,320,41,28],[42,321,41,29,"council"],[42,328,41,36],[42,329,41,37,"proposals"],[42,338,41,46],[42,339,41,47],[42,340,41,48],[42,343,42,18],[42,344,42,19],[42,345,42,20],[42,347,42,22,"rxjs_1"],[42,353,42,28],[42,354,42,29,"of"],[42,356,42,31],[42,358,42,33],[42,360,42,35],[42,361,42,36],[42,362,43,9],[42,363,43,10],[42,364,43,11],[42,366,43,13],[42,367,43,14],[42,368,43,15],[42,370,43,17,"rxjs_1"],[42,376,43,23],[42,377,43,24,"switchMap"],[42,386,43,33],[42,388,43,35,"_ref3"],[42,393,43,35],[42,397,43,58],[43,6,43,58],[43,10,43,58,"_ref4"],[43,15,43,58],[43,18,43,58,"_slicedToArray"],[43,32,43,58],[43,33,43,58,"_ref3"],[43,38,43,58],[44,8,43,37,"keys"],[44,12,43,41],[44,15,43,41,"_ref4"],[44,20,43,41],[45,8,43,43,"proposals"],[45,17,43,52],[45,20,43,52,"_ref4"],[45,25,43,52],[46,6,44,12],[46,10,44,18,"ids"],[46,13,44,21],[46,16,44,24,"keys"],[46,20,44,28],[46,21,44,29,"map"],[46,24,44,32],[46,25,44,33,"_ref5"],[46,30,44,33],[47,8,44,33],[47,12,44,33,"_ref5$args"],[47,22,44,33],[47,25,44,33,"_slicedToArray"],[47,39,44,33],[47,40,44,33,"_ref5"],[47,45,44,33],[47,46,44,36,"args"],[47,50,44,40],[48,10,44,43,"id"],[48,12,44,45],[48,15,44,45,"_ref5$args"],[48,25,44,45],[49,8,44,45],[49,15,44,53,"id"],[49,17,44,55],[50,6,44,55],[50,8,44,56],[51,6,45,12],[51,13,45,19],[51,14,45,20],[51,15,45,21],[51,17,45,23,"rxjs_1"],[51,23,45,29],[51,24,45,30,"combineLatest"],[51,37,45,43],[51,39,45,45],[51,40,46,16,"bountyBase"],[51,50,46,26],[51,51,46,27,"bounties"],[51,59,46,35],[51,60,46,36,"multi"],[51,65,46,41],[51,66,46,42,"ids"],[51,69,46,45],[51,70,46,46],[51,72,47,16,"bountyBase"],[51,82,47,26],[51,83,47,27,"bountyDescriptions"],[51,101,47,45],[51,102,47,46,"multi"],[51,107,47,51],[51,108,47,52,"ids"],[51,111,47,55],[51,112,47,56],[51,114,48,16],[51,115,48,17],[51,116,48,18],[51,118,48,20,"rxjs_1"],[51,124,48,26],[51,125,48,27,"of"],[51,127,48,29],[51,129,48,31,"ids"],[51,132,48,34],[51,133,48,35],[51,135,49,16],[51,136,49,17],[51,137,49,18],[51,139,49,20,"rxjs_1"],[51,145,49,26],[51,146,49,27,"of"],[51,148,49,29],[51,150,49,31],[51,151,49,32],[51,152,49,33],[51,154,49,35,"filterBountyProposals_js_1"],[51,180,49,61],[51,181,49,62,"filterBountiesProposals"],[51,204,49,85],[51,206,49,87,"api"],[51,209,49,90],[51,211,49,92,"proposals"],[51,220,49,101],[51,221,49,102],[51,222,49,103],[51,223,50,13],[51,224,50,14],[52,4,51,8],[52,5,51,9],[52,6,51,10],[52,8,51,12],[52,9,51,13],[52,10,51,14],[52,12,51,16,"rxjs_1"],[52,18,51,22],[52,19,51,23,"map"],[52,22,51,26],[52,24,51,28,"parseResult"],[52,35,51,39],[52,36,51,40],[52,37,51,41],[52,40,52,10],[52,41,52,11],[52,42,52,12],[52,44,52,14,"rxjs_1"],[52,50,52,20],[52,51,52,21,"of"],[52,53,52,23],[52,55,52,25,"parseResult"],[52,66,52,36],[52,67,52,37],[52,68,52,38],[52,70,52,40],[52,72,52,42],[52,74,52,44],[52,76,52,46],[52,78,52,48],[52,80,52,50],[52,82,52,52],[52,83,52,53],[52,84,52,54],[52,85,52,55],[52,86,52,56],[53,2,53,0],[54,0,53,1],[54,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"}]} |