supercolony 0.1.5 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- function _0x5516(){const _0x3256cf=['api','\x20\x20-\x20none','hash','--path\x20<path>','publish','IMD','reuse\x20a\x20saved\x20order\x20request\x20key','\x20verdict=','check:\x20\x20\x20\x20\x20','browse\x20and\x20publish\x20IMD\x20tasks','download:\x20','isInteger','timeout','join','reviews:\x20\x20\x20','\x20--refresh','complete','\x20(enough\x20balance\x20found).\x0a','optsWithGlobals','questions','admitted','\x20\x20-\x20','check','--limit\x20<n>','complete\x20continuation\x20body\x20JSON\x20file','project:\x20\x20\x20','--github','order\x20','named\x20input\x20preset\x20(report)','plan:\x20','keyEnv','--answer\x20<text>','message','slice','elapsedMs','source:\x20\x20\x20\x20','--request-key\x20<uuid>','poll','ethereum','--dry-run','parentJobId','show\x20one\x20job','continue\x20<id>\x20[objective]','save','--before\x20<time>','\x20version(s))','createdAt','challenge','--timeout\x20<seconds>','paid\x20by:\x20\x20\x20','source','expiresAt','s)\x0a','--exclude-oracle','--file\x20<path>','blockers','\x20belongs\x20to\x20','--template\x20<name>','delivery','limit','objective:\x20','summary:\x20','home','\x20head=','repo','status','json','validate\x20a\x20job\x20body\x20without\x20creating\x20an\x20order','reason','object','requiredOption','/jobs','/result','order:\x20\x20\x20\x20\x20','s\x20(retry\x20','reason:\x20\x20\x20\x20\x20\x20','blockers:\x20','head','reviews','Network\x20error','completed','base\x20commit\x20for\x20--repo','updatedAt','launch','pendingTransaction','Your\x20request\x20is\x20saved.\x20Continue\x20payment\x20to\x20check\x20the\x20original\x20payment\x20before\x20retrying.','code','short','trim','stdin','toString','url','description','created:\x20\x20\x20','\x20\x20\x20\x20url:\x20\x20','submissionHash','exclude\x20oracle\x20panel\x20jobs','answer','--limit\x20must\x20be\x20an\x20integer\x20from\x201\x20to\x20500','workflow:\x20\x20','paymentStatus','push','\x20--request-key\x20','parent:\x20\x20\x20\x20','HTTP\x20','interrupted','destination\x20directory','/jobs/','--skill\x20<id>','preset','stringify','repository\x20path\x20the\x20job\x20may\x20write\x20(repeatable)','jobId','action','payment_reconciling','bytes','--since\x20<time>','show\x20a\x20job\x20result\x20and\x20artifact\x20URLs','result\x20<id>','length','refusalProblems','dryRun','files:\x20\x20\x20\x20\x20','exclude','nodes:\x20\x20\x20\x20\x20','job:\x20\x20\x20\x20\x20\x20\x20','input','complete\x20job\x20body\x20JSON\x20file','summary','title','quote','\x20blocker(s)','none','jobs\x20that\x20moved\x20after\x20this\x20time','job.continue','transaction_pending','\x0aquestions:\x0a','transactionHash','\x20belongs\x20to\x20parent\x20job\x20','type','detail','oracle','before','state:\x20\x20\x20\x20\x20','nodes','result\x20response\x20is\x20missing\x20jobId','page\x20size\x20(1-500)','check:\x20','jobs','template','data','Payment\x20needs\x20review.','github','deliverables:','\x20was\x20created\x20for\x20action\x20','option','download\x20a\x20completed\x20job\x27s\x20files\x20under\x20--out','string','explorer:\x20\x20\x20\x20','outcome','includes','resultUrl','inspect:\x20colony\x20order\x20show\x20','continue\x20the\x20project\x20of\x20a\x20job\x20you\x20paid\x20for','job\x20response\x20is\x20missing\x20id','template:\x20\x20','paymentChain','set','attempt','\x20tx\x20','verdict','\x20task\x20continue\x20','\x20--home\x20','wait:\x20','creation-time\x20cursor\x20(exclusive)','isTTY','--action\x20<action>','launch:\x20\x20\x20\x20','requestKey','\x20->\x20','\x20bytes,\x20','job\x20body\x20JSON\x20file','\x20versions=','command','action:\x20\x20\x20\x20','publish\x20the\x20result\x20to\x20GitHub','tx:\x20\x20\x20\x20\x20\x20\x20\x20','project','payment:\x20',';\x20rerun\x20with\x20--api\x20','yes','poll\x20interval\x20in\x20seconds','kind','\x20\x20\x20\x20hash:\x20','out','wait:\x20interrupted\x0a','only\x20run\x20the\x20free\x20check\x20and\x20print\x20the\x20input','\x20attempt=','padEnd','state','public\x20GitHub\x20repository\x20URL',',\x20not\x20','project\x20ready','unknown','job.open','transaction:\x20','since','task','explorerUrl','skill','list','create\x20a\x20job\x20from\x20a\x20clear\x20objective\x20or\x20a\x20JSON\x20file','isArray','colony\x20--api\x20','--out\x20<dir>','versions','download\x20<id>','objective','path','payer','request\x20key\x20','toFixed','\x20job(s)','files','--interval\x20<seconds>','retry','payWith','objective\x20or\x20job\x20id\x20prefix','rpc','/jobs?',';\x20retrying\x20in\x20','\x20was\x20admitted,\x20but\x20IMD\x20refused\x20the\x20job.','jobs\x20response\x20is\x20missing\x20jobs','resultUrl:\x20','exitCode','result','commit','deliverables','\x20complete=','file','continue:\x20\x20\x20\x20colony\x20order\x20submit\x20','transaction','blocked','save\x20the\x20input\x20JSON\x20without\x20overwriting','refused','paidBy','excludeOracle','total\x20timeout\x20in\x20seconds','saved\x20input:\x20','answer\x20a\x20business\x20clarification\x20(repeatable)','workflow','parent','orderId','saved','payment_failed','\x20has\x20no\x20saved\x20input','\x20was\x20created\x20for\x20a\x20different\x20objective;\x20omit\x20the\x20new\x20objective\x20to\x20resume\x20it','job\x20template','complete:\x20\x20','--save\x20<path>','\x20on\x20'];_0x5516=function(){return _0x3256cf;};return _0x5516();}import{writeDiagnostic as _0x1ab7b2}from'../lib/terminal-text.mjs';import{paymentProgressReporter as _0x39d34c}from'../lib/payment-progress.mjs';function _0x434f(_0x416e29,_0x55168a){_0x416e29=_0x416e29-0x137;const _0x434fe2=_0x5516();let _0x448297=_0x434fe2[_0x416e29];return _0x448297;}import{request as _0x11f4e2,print as _0x11a1cd}from'../shared.mjs';import{checkJob as _0x281c72,publishJob as _0x17effd,readJobFile as _0x39c26e}from'../lib/publish.mjs';import{loadOrder as _0x35669f}from'../lib/orders.mjs';import{buildContinueInput as _0x14b6ea,buildCreateInput as _0x2616f0,parentSummary as _0x85a4a1,resolveAction as _0x4a2a86,saveInputFile as _0xff79a7}from'../lib/task-input.mjs';import{DEFAULT_INTERVAL_SECONDS as _0x502ffb,DEFAULT_TIMEOUT_SECONDS as _0x4a4dfa,downloadTaskFiles as _0x33c8ee,waitForResult as _0xe1778}from'../lib/task-result.mjs';import{askQuestions as _0x24b365,loadLocalPlanner as _0x4dd879,planTask as _0x776995}from'../planner/flow.mjs';import{registerMyTaskCommands as _0x2bcb6c}from'./my-tasks.mjs';import{orderPayment as _0x3a82a4}from'../lib/payments.mjs';import{checkTaskWallet as _0x68ff51}from'../lib/task-wallet.mjs';async function x(_0x1439c6,_0x1b0bc1){const _0x43fb19=_0x434f,_0x801dff=await _0x68ff51({..._0x1439c6,'action':_0x1b0bc1});return _0x1439c6[_0x43fb19(0x179)]||_0x1ab7b2('Paying\x20with\x20'+_0x801dff['payWith']+_0x43fb19(0x23b)+_0x801dff['chainName']+_0x43fb19(0x148)),_0x801dff;}function Z(_0x2cb167){const _0x5bc479=_0x434f,_0x3a52aa=new URLSearchParams();if(_0x2cb167['q']!==void 0x0&&_0x3a52aa[_0x5bc479(0x1de)]('q',_0x2cb167['q']),_0x2cb167[_0x5bc479(0x1c5)]!==void 0x0&&_0x3a52aa[_0x5bc479(0x1de)](_0x5bc479(0x1c5),_0x2cb167[_0x5bc479(0x1c5)]),_0x2cb167['since']!==void 0x0&&_0x3a52aa[_0x5bc479(0x1de)](_0x5bc479(0x205),_0x2cb167[_0x5bc479(0x205)]),_0x2cb167[_0x5bc479(0x172)]!==void 0x0){const _0x505c31=Number(_0x2cb167[_0x5bc479(0x172)]);if(!Number[_0x5bc479(0x142)](_0x505c31)||_0x505c31<0x1||_0x505c31>0x1f4)throw new Error(_0x5bc479(0x199));_0x3a52aa[_0x5bc479(0x1de)](_0x5bc479(0x172),String(_0x505c31));}_0x2cb167[_0x5bc479(0x22d)]&&_0x3a52aa[_0x5bc479(0x1de)](_0x5bc479(0x1b2),_0x5bc479(0x1c4));const _0x5cb02e=_0x3a52aa[_0x5bc479(0x191)]();return _0x5cb02e?_0x5bc479(0x21c)+_0x5cb02e:_0x5bc479(0x17e);}function b(_0x354aa5,_0xf646d9=0x5a){const _0x568dc=_0x434f,_0x443384=String(_0x354aa5??'')['replace'](/\s+/g,'\x20')[_0x568dc(0x18f)]();return _0x443384[_0x568dc(0x1ae)]>_0xf646d9?_0x443384[_0x568dc(0x158)](0x0,_0xf646d9-0x1)+'…':_0x443384;}function ee(_0xf1d3f4){const _0x244401=_0x434f;if(!Array[_0x244401(0x20b)](_0xf1d3f4?.[_0x244401(0x1cb)]))throw new Error(_0x244401(0x21f));const _0xdd3410=[_0xf1d3f4['count']+_0x244401(0x215)];for(const _0x3f9ff1 of _0xf1d3f4[_0x244401(0x1cb)])_0xdd3410[_0x244401(0x19c)](_0x3f9ff1['id']+'\x20\x20'+_0x3f9ff1[_0x244401(0x1fe)][_0x244401(0x1fd)](0xa)+'\x20\x20'+String(_0x3f9ff1['template']??'')[_0x244401(0x1fd)](0x16)+'\x20\x20'+(_0x3f9ff1[_0x244401(0x189)]??'')+'\x20\x20'+b(_0x3f9ff1['objective']));return _0xdd3410[_0x244401(0x144)]('\x0a');}function te(_0x2b26df){const _0x28650f=_0x434f;if(!_0x2b26df?.['id'])throw new Error(_0x28650f(0x1db));const _0x1138bc=[_0x28650f(0x1b4)+_0x2b26df['id'],_0x28650f(0x1c6)+_0x2b26df[_0x28650f(0x1fe)],_0x28650f(0x1dc)+(_0x2b26df[_0x28650f(0x1cc)]??''),_0x28650f(0x173)+b(_0x2b26df[_0x28650f(0x210)],0x1f4),_0x28650f(0x194)+(_0x2b26df[_0x28650f(0x165)]??''),'updated:\x20\x20\x20'+(_0x2b26df[_0x28650f(0x189)]??''),'paid\x20by:\x20\x20\x20'+(_0x2b26df[_0x28650f(0x22c)]??''),_0x28650f(0x150)+(_0x2b26df['project']?_0x2b26df[_0x28650f(0x1f2)]['id']+'\x20('+(_0x2b26df['project'][_0x28650f(0x20e)]?.['length']??0x0)+_0x28650f(0x164):_0x28650f(0x1bb)),'delivery:\x20\x20'+(_0x2b26df[_0x28650f(0x171)]?JSON[_0x28650f(0x1a5)](_0x2b26df[_0x28650f(0x171)]):_0x28650f(0x1bb)),_0x28650f(0x1e8)+(_0x2b26df[_0x28650f(0x18a)]?JSON[_0x28650f(0x1a5)](_0x2b26df[_0x28650f(0x18a)]):_0x28650f(0x1bb))];if(Array['isArray'](_0x2b26df[_0x28650f(0x1c7)])){_0x1138bc[_0x28650f(0x19c)](_0x28650f(0x1b3)+_0x2b26df[_0x28650f(0x1c7)]['length']);for(const _0x435fc1 of _0x2b26df['nodes'])_0x1138bc['push']('\x20\x20-\x20'+_0x435fc1['key']+':\x20'+_0x435fc1[_0x28650f(0x1fe)]+_0x28650f(0x1fc)+_0x435fc1['attempt']+_0x28650f(0x13e)+(_0x435fc1[_0x28650f(0x1e1)]?.[_0x28650f(0x178)]??_0x28650f(0x1bb)));}return Array[_0x28650f(0x20b)](_0x2b26df['reviews'])&&_0x1138bc[_0x28650f(0x19c)](_0x28650f(0x145)+_0x2b26df[_0x28650f(0x185)][_0x28650f(0x1ae)]),_0x2b26df[_0x28650f(0x231)]?.['id']&&_0x1138bc[_0x28650f(0x19c)]((_0x28650f(0x19a)+_0x2b26df[_0x28650f(0x231)]['id']+'\x20'+(_0x2b26df['workflow'][_0x28650f(0x178)]??''))[_0x28650f(0x18f)]()),_0x1138bc['join']('\x0a');}function A(_0x558103){const _0x3188c7=_0x434f;if(!_0x558103?.[_0x3188c7(0x1a7)])throw new Error(_0x3188c7(0x1c8));const _0x10c501=[_0x3188c7(0x1b4)+_0x558103[_0x3188c7(0x1a7)],_0x3188c7(0x1c6)+_0x558103['state'],_0x3188c7(0x239)+_0x558103[_0x3188c7(0x147)]],_0x4cc315=Array[_0x3188c7(0x20b)](_0x558103['files'])?_0x558103['files']:[];_0x10c501[_0x3188c7(0x19c)](_0x3188c7(0x1b1)+_0x4cc315[_0x3188c7(0x1ae)]);for(const _0x468d77 of _0x4cc315)_0x10c501[_0x3188c7(0x19c)](_0x3188c7(0x14c)+_0x468d77[_0x3188c7(0x211)]+'\x20('+_0x468d77[_0x3188c7(0x1aa)]+_0x3188c7(0x1eb)+_0x468d77['mediaType']+')'),_0x10c501[_0x3188c7(0x19c)]('\x20\x20\x20\x20hash:\x20'+_0x468d77[_0x3188c7(0x139)]),_0x10c501['push'](_0x3188c7(0x195)+_0x468d77[_0x3188c7(0x192)]);const _0x199b05=Array[_0x3188c7(0x20b)](_0x558103[_0x3188c7(0x169)])?_0x558103[_0x3188c7(0x169)]:[];_0x10c501['push'](_0x3188c7(0x15a)+_0x199b05['length']);for(const _0x41e809 of _0x199b05)_0x10c501[_0x3188c7(0x19c)]('\x20\x20-\x20'+(_0x41e809['node']??_0x41e809[_0x3188c7(0x196)])+':\x20'+_0x41e809[_0x3188c7(0x192)]);return _0x558103[_0x3188c7(0x171)]&&_0x10c501[_0x3188c7(0x19c)]('delivery:\x20\x20'+JSON[_0x3188c7(0x1a5)](_0x558103[_0x3188c7(0x171)])),_0x558103[_0x3188c7(0x18a)]&&_0x10c501[_0x3188c7(0x19c)](_0x3188c7(0x1e8)+JSON[_0x3188c7(0x1a5)](_0x558103[_0x3188c7(0x18a)])),_0x10c501[_0x3188c7(0x144)]('\x0a');}function ne(_0xf0e46b){const _0x58c780=_0x434f,_0x3187e1=[_0x58c780(0x1b4)+_0xf0e46b['jobId'],_0x58c780(0x1c6)+_0xf0e46b[_0x58c780(0x1fe)],_0x58c780(0x1b1)+_0xf0e46b[_0x58c780(0x216)]['length']];for(const _0x2c2d6d of _0xf0e46b['files'])_0x3187e1[_0x58c780(0x19c)]('\x20\x20-\x20'+_0x2c2d6d[_0x58c780(0x211)]+'\x20->\x20'+_0x2c2d6d['file']+'\x20('+_0x2c2d6d['bytes']+'\x20bytes)'),_0x3187e1['push'](_0x58c780(0x1f8)+_0x2c2d6d[_0x58c780(0x139)]);return _0x3187e1['join']('\x0a');}function C(_0x2fc04d){const _0x46447a=_0x434f,_0x413706=[_0x46447a(0x183)+_0x2fc04d[_0x46447a(0x16e)][_0x46447a(0x1ae)]];for(const _0x597100 of _0x2fc04d[_0x46447a(0x16e)])_0x413706[_0x46447a(0x19c)]('\x20\x20-\x20'+_0x597100[_0x46447a(0x18d)]+':\x20'+_0x597100[_0x46447a(0x1c3)]);const _0x33fa5a=Array[_0x46447a(0x20b)](_0x2fc04d['plan'])?_0x2fc04d['plan']:[];_0x413706[_0x46447a(0x19c)](_0x46447a(0x154)+_0x33fa5a['length']);for(const _0x506e5e of _0x33fa5a)_0x413706[_0x46447a(0x19c)](_0x46447a(0x14c)+(_0x506e5e[_0x46447a(0x1b8)]??_0x506e5e[_0x46447a(0x18e)]??_0x506e5e[_0x46447a(0x208)])+(_0x506e5e['skill']?'\x20('+_0x506e5e[_0x46447a(0x208)]+')':''));return _0x413706[_0x46447a(0x144)]('\x0a');}function I(_0x22a565){const _0x49feb3=_0x434f,_0x4b89a7=_0x22a565[_0x49feb3(0x1b9)]?_0x3a82a4(_0x22a565):null;return{'status':_0x22a565['status'],'action':_0x22a565[_0x49feb3(0x1a8)],'requestKey':_0x22a565[_0x49feb3(0x1e9)],'orderId':_0x22a565['orderId'],'jobId':_0x22a565[_0x49feb3(0x1a7)]??null,'statusUrl':_0x22a565['statusUrl']??null,'resultUrl':_0x22a565[_0x49feb3(0x1d8)]??null,'transactionHash':_0x22a565['transactionHash']??null,'problems':_0x22a565[_0x49feb3(0x1af)]??null,'parentJobId':_0x22a565[_0x49feb3(0x1b5)]?.[_0x49feb3(0x15f)]??null,'parent':_0x22a565[_0x49feb3(0x232)]??null,'project':_0x22a565[_0x49feb3(0x14d)]?.[_0x49feb3(0x1f2)]??null,'payer':_0x22a565[_0x49feb3(0x212)]??null,'paymentChain':_0x22a565[_0x49feb3(0x1dd)]??_0x49feb3(0x15d),'payWith':_0x22a565['payWith']??_0x49feb3(0x13c),'prepared':_0x22a565[_0x49feb3(0x166)]?.[_0x49feb3(0x1b5)]??null,'quote':_0x22a565['quote']?{'amount':_0x4b89a7['amount'],'asset':_0x4b89a7['asset'],'payTo':_0x4b89a7['payTo'],'expiresAt':_0x22a565[_0x49feb3(0x1b9)][_0x49feb3(0x16a)]}:null};}function oe(_0x1ce538){const _0x1608e6=_0x434f,_0x8284ef=['status:\x20\x20\x20\x20'+_0x1ce538[_0x1608e6(0x178)],'action:\x20\x20\x20\x20'+_0x1ce538['action'],_0x1608e6(0x180)+_0x1ce538[_0x1608e6(0x233)],_0x1608e6(0x1b4)+(_0x1ce538['jobId']??'')];if(_0x1ce538['statusUrl']&&_0x8284ef[_0x1608e6(0x19c)]('statusUrl:\x20'+_0x1ce538['statusUrl']),_0x1ce538[_0x1608e6(0x1d8)]&&_0x8284ef['push'](_0x1608e6(0x220)+_0x1ce538['resultUrl']),_0x1ce538[_0x1608e6(0x1c0)]&&_0x8284ef['push'](_0x1608e6(0x1f1)+_0x1ce538[_0x1608e6(0x1c0)]),_0x1ce538[_0x1608e6(0x232)]&&(_0x8284ef[_0x1608e6(0x19c)](_0x1608e6(0x19e)+_0x1ce538[_0x1608e6(0x232)]['id']+'\x20('+(_0x1ce538[_0x1608e6(0x232)][_0x1608e6(0x1fe)]??'unknown')+')'),_0x1ce538[_0x1608e6(0x232)][_0x1608e6(0x1f2)]&&_0x8284ef[_0x1608e6(0x19c)](_0x1608e6(0x150)+_0x1ce538[_0x1608e6(0x232)][_0x1608e6(0x1f2)]['id']+_0x1608e6(0x176)+(_0x1ce538[_0x1608e6(0x232)][_0x1608e6(0x1f2)][_0x1608e6(0x184)]??''))),_0x1ce538[_0x1608e6(0x14d)]?.[_0x1608e6(0x1f2)]){const _0x44d000=_0x1ce538[_0x1608e6(0x14d)][_0x1608e6(0x1f2)];_0x8284ef['push'](_0x1608e6(0x13f)+(_0x44d000[_0x1608e6(0x1b7)]??_0x44d000['id']??_0x1608e6(0x201)));}return!_0x1ce538['plan']&&_0x1ce538[_0x1608e6(0x1a8)]===_0x1608e6(0x1bd)&&_0x1ce538[_0x1608e6(0x166)]?.[_0x1608e6(0x1b5)]&&(_0x8284ef[_0x1608e6(0x19c)]('prepared\x20input:'),_0x8284ef[_0x1608e6(0x19c)](JSON[_0x1608e6(0x1a5)](_0x1ce538[_0x1608e6(0x166)][_0x1608e6(0x1b5)],null,0x2))),_0x8284ef[_0x1608e6(0x144)]('\x0a');}function T(_0x17ffe5,_0x1393f5){const _0x28d4a3=_0x434f;if(_0x17ffe5[_0x28d4a3(0x178)]===_0x28d4a3(0x229)){_0x1393f5[_0x28d4a3(0x179)]?_0x11a1cd({'status':_0x28d4a3(0x229),'action':_0x17ffe5['state'][_0x28d4a3(0x1a8)],'requestKey':_0x17ffe5[_0x28d4a3(0x1fe)][_0x28d4a3(0x1e9)],'parent':_0x17ffe5['state'][_0x28d4a3(0x232)]??null,'check':_0x17ffe5['check']},_0x1393f5):(_0x17ffe5[_0x28d4a3(0x1fe)][_0x28d4a3(0x232)]&&_0x1ab7b2(K(_0x17ffe5[_0x28d4a3(0x1fe)][_0x28d4a3(0x232)])+'\x0a'),_0x1ab7b2(C(_0x17ffe5[_0x28d4a3(0x14d)])+'\x0anot\x20paid:\x20blockers\x20must\x20be\x20resolved\x20first\x0a')),process[_0x28d4a3(0x221)]=0x1;return;}if(_0x17ffe5[_0x28d4a3(0x178)]===_0x28d4a3(0x22b)){const _0x46783f=I(_0x17ffe5[_0x28d4a3(0x1fe)]);if(_0x1393f5[_0x28d4a3(0x179)])_0x11a1cd({..._0x46783f,'status':_0x28d4a3(0x22b)},_0x1393f5);else{const _0x77144e=[_0x28d4a3(0x152)+_0x17ffe5[_0x28d4a3(0x1fe)][_0x28d4a3(0x233)]+_0x28d4a3(0x21e),_0x28d4a3(0x1f3)+(_0x17ffe5['state'][_0x28d4a3(0x19b)]??_0x28d4a3(0x202))+(_0x17ffe5['state'][_0x28d4a3(0x1c0)]?_0x28d4a3(0x1e0)+_0x17ffe5[_0x28d4a3(0x1fe)]['transactionHash']:'')];for(const _0x4eb9f5 of _0x17ffe5[_0x28d4a3(0x1fe)][_0x28d4a3(0x1af)]??[])_0x77144e[_0x28d4a3(0x19c)](_0x28d4a3(0x14c)+(_0x4eb9f5['code']??_0x28d4a3(0x22b))+':\x20'+(_0x4eb9f5[_0x28d4a3(0x1c3)]??JSON['stringify'](_0x4eb9f5)));_0x77144e[_0x28d4a3(0x19c)](_0x28d4a3(0x1d9)+_0x17ffe5['state'][_0x28d4a3(0x233)]+_0x28d4a3(0x146)),_0x1ab7b2(_0x77144e['join']('\x0a')+'\x0a');}process[_0x28d4a3(0x221)]=0x1;return;}if(['expired',_0x28d4a3(0x235),_0x28d4a3(0x1be),_0x28d4a3(0x1a9)][_0x28d4a3(0x1d7)](_0x17ffe5[_0x28d4a3(0x178)])){const _0x58adee=_0x17ffe5[_0x28d4a3(0x1fe)];if(_0x1393f5['json'])_0x11a1cd({...I(_0x58adee),'status':_0x17ffe5[_0x28d4a3(0x178)]},_0x1393f5);else{const _0x780b9a=_0x58adee[_0x28d4a3(0x18b)]??_0x58adee[_0x28d4a3(0x228)],_0x32e6a8=[_0x28d4a3(0x1ce),_0x28d4a3(0x18c)];_0x780b9a?.[_0x28d4a3(0x139)]&&_0x32e6a8['push'](_0x28d4a3(0x204)+_0x780b9a['hash']+(_0x780b9a[_0x28d4a3(0x1f7)]?'\x20('+_0x780b9a[_0x28d4a3(0x1f7)]+')':'')),_0x780b9a?.['reason']&&_0x32e6a8[_0x28d4a3(0x19c)](_0x28d4a3(0x182)+_0x780b9a[_0x28d4a3(0x17b)]),_0x780b9a?.['explorerUrl']&&_0x32e6a8['push'](_0x28d4a3(0x1d5)+_0x780b9a[_0x28d4a3(0x207)]),_0x58adee['transactionHash']&&_0x58adee[_0x28d4a3(0x1c0)]!==_0x780b9a?.[_0x28d4a3(0x139)]&&_0x32e6a8['push']('transaction:\x20'+_0x58adee[_0x28d4a3(0x1c0)]),_0x58adee[_0x28d4a3(0x233)]&&_0x32e6a8[_0x28d4a3(0x19c)](_0x28d4a3(0x227)+_0x58adee['orderId']),_0x1ab7b2(_0x32e6a8['join']('\x0a')+'\x0a');}process[_0x28d4a3(0x221)]=0x1;return;}if(_0x17ffe5[_0x28d4a3(0x178)]!==_0x28d4a3(0x14b))throw new Error('order\x20ended\x20with\x20status:\x20'+_0x17ffe5['status']+';\x20inspect\x20it\x20with\x20colony\x20order\x20show\x20'+_0x17ffe5[_0x28d4a3(0x1fe)][_0x28d4a3(0x233)]+_0x28d4a3(0x146));_0x11a1cd(_0x1393f5[_0x28d4a3(0x179)]?I(_0x17ffe5[_0x28d4a3(0x1fe)]):oe(_0x17ffe5['state']),_0x1393f5);}function K(_0xca3e3e){const _0x504b59=_0x434f,_0x16fc7f=_0x85a4a1(_0xca3e3e),_0x5637d5=['parent:\x20\x20\x20\x20'+_0x16fc7f['id'],'state:\x20\x20\x20\x20\x20'+(_0x16fc7f[_0x504b59(0x1fe)]??''),'template:\x20\x20'+(_0x16fc7f[_0x504b59(0x1cc)]??''),_0x504b59(0x173)+b(_0x16fc7f[_0x504b59(0x210)],0x1f4),_0x504b59(0x168)+(_0x16fc7f[_0x504b59(0x22c)]??'')];return _0x16fc7f[_0x504b59(0x1f2)]&&_0x5637d5[_0x504b59(0x19c)](_0x504b59(0x150)+_0x16fc7f[_0x504b59(0x1f2)]['id']+_0x504b59(0x176)+(_0x16fc7f[_0x504b59(0x1f2)][_0x504b59(0x184)]??'')+_0x504b59(0x1ed)+_0x16fc7f[_0x504b59(0x1f2)][_0x504b59(0x20e)]['length']),_0x5637d5[_0x504b59(0x144)]('\x0a');}function ie(_0x1a90ee){const _0x31e505=_0x434f;return _0x1a90ee?_0x1a90ee[_0x31e505(0x1b7)]?'project:\x20\x20\x20'+b(_0x1a90ee['summary'],0x1f4):_0x1a90ee['id']?_0x31e505(0x150)+_0x1a90ee['id']:null:null;}function J(_0xa685b4,_0x29055e,_0x29495a,_0x529ca8){const _0x4f3833=_0x434f,_0x12e04a=[];_0x529ca8&&_0x12e04a[_0x4f3833(0x19c)](K(_0x529ca8)),_0x12e04a[_0x4f3833(0x19c)](_0x4f3833(0x1ef)+_0xa685b4),_0x12e04a[_0x4f3833(0x19c)]('input:'),_0x12e04a[_0x4f3833(0x19c)](JSON[_0x4f3833(0x1a5)](_0x29055e,null,0x2)),_0x12e04a['push'](C(_0x29495a));const _0x2296ce=ie(_0x29495a[_0x4f3833(0x1f2)]);return _0x2296ce&&_0x12e04a[_0x4f3833(0x19c)](_0x2296ce),_0x12e04a[_0x4f3833(0x144)]('\x0a');}function O(_0x2a80bc){const _0xda3409=_0x434f;return _0x2a80bc['file']!==void 0x0||_0x2a80bc[_0xda3409(0x1a4)]!==void 0x0||_0x2a80bc['skill']!==void 0x0||_0x2a80bc['template']!==void 0x0||Array[_0xda3409(0x20b)](_0x2a80bc[_0xda3409(0x211)])&&_0x2a80bc[_0xda3409(0x211)][_0xda3409(0x1ae)]>0x0;}function N(_0x36cfdb){const _0x390b0c=_0x434f;return _0x36cfdb[_0x390b0c(0x226)]!==void 0x0||_0x36cfdb[_0x390b0c(0x208)]!==void 0x0||_0x36cfdb[_0x390b0c(0x1cc)]!==void 0x0||Array[_0x390b0c(0x20b)](_0x36cfdb[_0x390b0c(0x211)])&&_0x36cfdb[_0x390b0c(0x211)][_0x390b0c(0x1ae)]>0x0;}function re(_0x19b5ad,_0x272539){const _0x52e6d5=_0x434f;return typeof _0x19b5ad==_0x52e6d5(0x1d4)&&_0x19b5ad[_0x52e6d5(0x18f)]()!==''&&!O(_0x272539);}function se(_0x4325ae,_0x4f99c9){const _0x4f5139=_0x434f;return typeof _0x4325ae==_0x4f5139(0x1d4)&&_0x4325ae['trim']()!==''&&!N(_0x4f99c9);}function $(_0x5ca62c){const _0x3dfd9b=_0x434f,_0x5b2dd3=[_0x3dfd9b(0x174)+_0x5ca62c[_0x3dfd9b(0x1b7)],_0x3dfd9b(0x1d0)];_0x5ca62c[_0x3dfd9b(0x224)][_0x3dfd9b(0x1ae)]===0x0&&_0x5b2dd3[_0x3dfd9b(0x19c)](_0x3dfd9b(0x138));for(const _0x39536d of _0x5ca62c[_0x3dfd9b(0x224)])_0x5b2dd3[_0x3dfd9b(0x19c)]('\x20\x20-\x20'+_0x39536d);return _0x5b2dd3['join']('\x0a');}function U(_0x198a8a,_0x31a6d1){const _0xca620f=_0x434f,_0x58d911=[$(_0x198a8a),_0xca620f(0x1ca)+_0x31a6d1[_0xca620f(0x16e)][_0xca620f(0x1ae)]+_0xca620f(0x1ba)];for(const _0x43104f of _0x31a6d1[_0xca620f(0x16e)])_0x58d911['push'](_0xca620f(0x14c)+_0x43104f[_0xca620f(0x18d)]+':\x20'+_0x43104f[_0xca620f(0x1c3)]);return _0x58d911[_0xca620f(0x144)]('\x0a');}function W(_0x4189c7,_0x3b1015,_0x1492c0){const _0x57c8d7=_0x434f;if(_0x1492c0[_0x57c8d7(0x179)])_0x11a1cd({'action':_0x3b1015,'summary':_0x4189c7[_0x57c8d7(0x1b7)],'deliverables':_0x4189c7['deliverables'],'questions':_0x4189c7['questions'],'input':null},_0x1492c0);else{const _0x458402=_0x4189c7[_0x57c8d7(0x14a)]['map'](_0x32cef3=>_0x57c8d7(0x14c)+_0x32cef3)[_0x57c8d7(0x144)]('\x0a');_0x11a1cd($(_0x4189c7)+_0x57c8d7(0x1bf)+_0x458402,_0x1492c0);}process['exitCode']=0x1;}function ae(_0x1e452d){const _0x26b3c9=_0x434f;return _0x1e452d[_0x26b3c9(0x177)]===void 0x0&&_0x1e452d['commit']===void 0x0?null:{'repoUrl':_0x1e452d[_0x26b3c9(0x177)],'baseCommit':_0x1e452d['commit']};}async function P({api:_0x5c34ea,home:_0x3dca9c,objective:_0x14384e,answers:_0x12503e,parent:_0x954370=null,source:_0xf0485a=null,github:_0x2a03e7=!0x1,opts:_0xa6bf23,loadPlanner:_0x4805a9}){const _0x32f992=_0x434f;return _0x776995({'api':_0x5c34ea,'home':_0x3dca9c,'loadPlanner':_0x4805a9,'objective':_0x14384e,'answers':_0x12503e,'parent':_0x954370,'source':_0xf0485a,'github':_0x2a03e7,'ask':!_0xa6bf23[_0x32f992(0x179)]&&process[_0x32f992(0x190)][_0x32f992(0x1e6)]?_0x24b365:null});}function R(_0x2a8835,_0x2ce51c,{api:_0x579718,action:_0x9d70cc}){const _0x124c2f=_0x434f;if(!_0x2a8835)throw new Error('unknown\x20request\x20key:\x20'+_0x2ce51c);if(_0x2a8835[_0x124c2f(0x137)]!==_0x579718)throw new Error('order\x20'+_0x2a8835[_0x124c2f(0x1e9)]+_0x124c2f(0x16f)+_0x2a8835['api']+_0x124c2f(0x1f4)+_0x2a8835['api']);if(_0x2a8835[_0x124c2f(0x1a8)]!==_0x9d70cc)throw new Error('request\x20key\x20'+_0x2a8835[_0x124c2f(0x1e9)]+_0x124c2f(0x1d1)+_0x2a8835[_0x124c2f(0x1a8)]+_0x124c2f(0x200)+_0x9d70cc);if(!_0x2a8835['input']||typeof _0x2a8835[_0x124c2f(0x1b5)]!=_0x124c2f(0x17c)||Array[_0x124c2f(0x20b)](_0x2a8835['input']))throw new Error('request\x20key\x20'+_0x2a8835[_0x124c2f(0x1e9)]+_0x124c2f(0x236));return _0x2a8835[_0x124c2f(0x1b5)];}function pe(_0x5b368c,_0x12d4f4){const _0x3e6ed9=_0x434f;return _0x3e6ed9(0x20c)+_0x5b368c[_0x3e6ed9(0x137)]+_0x3e6ed9(0x1e3)+_0x12d4f4['home']+'\x20task\x20create\x20--request-key\x20'+_0x5b368c['requestKey'];}function ue(_0x2b67a8,_0x8024c0){const _0x49ec69=_0x434f;return _0x49ec69(0x20c)+_0x2b67a8[_0x49ec69(0x137)]+_0x49ec69(0x1e3)+_0x8024c0[_0x49ec69(0x175)]+_0x49ec69(0x1e2)+_0x2b67a8[_0x49ec69(0x1b5)][_0x49ec69(0x15f)]+_0x49ec69(0x19d)+_0x2b67a8[_0x49ec69(0x1e9)];}function ke(_0xbebcb8,{loadPlanner:_0x2a7079=_0x4dd879}={}){const _0x4a90f4=_0x434f,_0x855834=_0xbebcb8[_0x4a90f4(0x1ee)](_0x4a90f4(0x206))['description'](_0x4a90f4(0x140));_0x2bcb6c(_0x855834),_0x855834[_0x4a90f4(0x1ee)](_0x4a90f4(0x209))[_0x4a90f4(0x193)]('list\x20jobs')[_0x4a90f4(0x1d2)]('--q\x20<text>',_0x4a90f4(0x21a))[_0x4a90f4(0x1d2)](_0x4a90f4(0x163),_0x4a90f4(0x1e5))[_0x4a90f4(0x1d2)](_0x4a90f4(0x1ab),_0x4a90f4(0x1bc))[_0x4a90f4(0x1d2)](_0x4a90f4(0x14e),_0x4a90f4(0x1c9))[_0x4a90f4(0x1d2)](_0x4a90f4(0x16c),_0x4a90f4(0x197))[_0x4a90f4(0x1a8)](async(_0x24ff45,_0x28bd58)=>{const _0x535151=_0x4a90f4,_0x103e5=_0x28bd58[_0x535151(0x149)](),_0x6314d7=await _0x11f4e2(_0x103e5[_0x535151(0x137)],Z(_0x103e5));_0x11a1cd(_0x103e5['json']?_0x6314d7[_0x535151(0x1cd)]:ee(_0x6314d7[_0x535151(0x1cd)]),_0x103e5);}),_0x855834[_0x4a90f4(0x1ee)]('show\x20<id>')[_0x4a90f4(0x193)](_0x4a90f4(0x160))[_0x4a90f4(0x1a8)](async(_0x44cedc,_0xc74e67,_0x3260fa)=>{const _0x543eef=_0x4a90f4,_0xaf3cd4=_0x3260fa[_0x543eef(0x149)](),_0x501457=await _0x11f4e2(_0xaf3cd4['api'],'/jobs/'+encodeURIComponent(_0x44cedc));_0x11a1cd(_0xaf3cd4[_0x543eef(0x179)]?_0x501457[_0x543eef(0x1cd)]:te(_0x501457[_0x543eef(0x1cd)]),_0xaf3cd4);}),_0x855834[_0x4a90f4(0x1ee)](_0x4a90f4(0x1ad))[_0x4a90f4(0x193)](_0x4a90f4(0x1ac))[_0x4a90f4(0x1a8)](async(_0x39a9b5,_0x2a2ddd,_0x1f72be)=>{const _0x479221=_0x4a90f4,_0x540ab6=_0x1f72be[_0x479221(0x149)](),_0x49c881=await _0x11f4e2(_0x540ab6[_0x479221(0x137)],_0x479221(0x1a2)+encodeURIComponent(_0x39a9b5)+_0x479221(0x17f));_0x11a1cd(_0x540ab6[_0x479221(0x179)]?_0x49c881['data']:A(_0x49c881[_0x479221(0x1cd)]),_0x540ab6);}),_0x855834[_0x4a90f4(0x1ee)]('wait\x20<id>')['description']('poll\x20a\x20job\x20result\x20until\x20it\x20completes,\x20fails\x20or\x20times\x20out')[_0x4a90f4(0x1d2)](_0x4a90f4(0x217),_0x4a90f4(0x1f6),String(_0x502ffb))[_0x4a90f4(0x1d2)](_0x4a90f4(0x167),_0x4a90f4(0x22e),String(_0x4a4dfa))[_0x4a90f4(0x1a8)](async(_0x3426e3,_0x4b652f,_0x19f783)=>{const _0x58fa4b=_0x4a90f4,_0x1639dc=_0x19f783['optsWithGlobals'](),_0x4724b7=await _0xe1778({'api':_0x1639dc[_0x58fa4b(0x137)],'id':_0x3426e3,'interval':_0x1639dc['interval'],'timeout':_0x1639dc[_0x58fa4b(0x143)],'onProgress':_0x3629c0=>{const _0x4838f8=_0x58fa4b;_0x3629c0[_0x4838f8(0x1c2)]===_0x4838f8(0x15c)?_0x1ab7b2(_0x4838f8(0x1e4)+_0x3629c0[_0x4838f8(0x1fe)]+_0x4838f8(0x225)+_0x3629c0['complete']+'\x20(poll\x20'+_0x3629c0[_0x4838f8(0x1df)]+',\x20'+(_0x3629c0[_0x4838f8(0x159)]/0x3e8)[_0x4838f8(0x214)](0x1)+_0x4838f8(0x16b)):_0x3629c0[_0x4838f8(0x1c2)]===_0x4838f8(0x218)&&_0x1ab7b2(_0x4838f8(0x1e4)+(_0x3629c0[_0x4838f8(0x178)]?_0x4838f8(0x19f)+_0x3629c0[_0x4838f8(0x178)]:_0x4838f8(0x186))+_0x4838f8(0x21d)+(_0x3629c0['delayMs']/0x3e8)['toFixed'](0x1)+_0x4838f8(0x181)+_0x3629c0['retries']+')\x0a');}});if(_0x4724b7[_0x58fa4b(0x1d6)]===_0x58fa4b(0x1a0)){_0x1ab7b2(_0x58fa4b(0x1fa)),process[_0x58fa4b(0x221)]=0x82;return;}_0x4724b7[_0x58fa4b(0x222)]&&_0x11a1cd(_0x1639dc['json']?_0x4724b7[_0x58fa4b(0x222)]:A(_0x4724b7[_0x58fa4b(0x222)]),_0x1639dc),_0x4724b7[_0x58fa4b(0x1d6)]!==_0x58fa4b(0x187)&&(_0x1ab7b2(_0x58fa4b(0x1e4)+_0x4724b7[_0x58fa4b(0x157)]+'\x0a'),process['exitCode']=0x1);}),_0x855834[_0x4a90f4(0x1ee)](_0x4a90f4(0x20f))[_0x4a90f4(0x193)](_0x4a90f4(0x1d3))['requiredOption'](_0x4a90f4(0x20d),_0x4a90f4(0x1a1))['action'](async(_0x4cdd0d,_0x4e79cd,_0x369910)=>{const _0x37295d=_0x4a90f4,_0x786d80=_0x369910[_0x37295d(0x149)](),_0xae27e0=await _0x33c8ee({'api':_0x786d80['api'],'id':_0x4cdd0d,'out':_0x786d80[_0x37295d(0x1f9)],'onProgress':_0xc48bbc=>{const _0x3c1424=_0x37295d;_0xc48bbc['type']===_0x3c1424(0x234)&&_0x1ab7b2(_0x3c1424(0x141)+_0xc48bbc[_0x3c1424(0x211)]+_0x3c1424(0x1ea)+_0xc48bbc[_0x3c1424(0x226)]+'\x0a');}});_0x11a1cd(_0x786d80[_0x37295d(0x179)]?_0xae27e0:ne(_0xae27e0),_0x786d80);}),_0x855834['command'](_0x4a90f4(0x14d))['description'](_0x4a90f4(0x17a))[_0x4a90f4(0x17d)](_0x4a90f4(0x16d),_0x4a90f4(0x1ec))[_0x4a90f4(0x1d2)](_0x4a90f4(0x1e7),'action\x20to\x20check\x20(defaults\x20from\x20parentJobId)')['action'](async(_0x143b99,_0x597373)=>{const _0x3e26f3=_0x4a90f4,_0x2fc997=_0x597373[_0x3e26f3(0x149)](),_0x509d20=await _0x39c26e(_0x2fc997[_0x3e26f3(0x226)]),_0x3354f5=_0x2fc997[_0x3e26f3(0x1a8)]??_0x4a2a86(_0x509d20),_0x22eb50=await _0x281c72(_0x2fc997[_0x3e26f3(0x137)],_0x509d20,_0x3354f5);_0x11a1cd(_0x2fc997[_0x3e26f3(0x179)]?_0x22eb50:C(_0x22eb50),_0x2fc997);}),_0x855834['command'](_0x4a90f4(0x13b))[_0x4a90f4(0x193)]('check,\x20quote,\x20sign\x20and\x20submit\x20a\x20job\x20file')[_0x4a90f4(0x17d)](_0x4a90f4(0x16d),_0x4a90f4(0x1ec))[_0x4a90f4(0x1d2)]('--request-key\x20<uuid>',_0x4a90f4(0x13d))[_0x4a90f4(0x1a8)](async(_0x4574bb,_0x2ec930)=>{const _0x10ed47=_0x4a90f4,_0x2b42d1=_0x2ec930[_0x10ed47(0x149)](),_0x4fa3da=_0x2b42d1[_0x10ed47(0x1e9)]?null:await x(_0x2b42d1,_0x10ed47(0x203)),_0x253a11=await _0x17effd({'api':_0x2b42d1['api'],'home':_0x2b42d1['home'],'file':_0x2b42d1[_0x10ed47(0x226)],'action':'job.open','requestKey':_0x2b42d1[_0x10ed47(0x1e9)],'yes':_0x2b42d1[_0x10ed47(0x1f5)],'keyEnv':_0x2b42d1['keyEnv'],'rpc':_0x2b42d1[_0x10ed47(0x21b)],'paymentChain':_0x2b42d1[_0x10ed47(0x1dd)]??_0x4fa3da?.[_0x10ed47(0x1dd)],'payWith':_0x2b42d1[_0x10ed47(0x219)]??_0x4fa3da?.[_0x10ed47(0x219)],'onProgress':_0x39d34c(_0x2b42d1)});T(_0x253a11,_0x2b42d1);}),_0x855834[_0x4a90f4(0x1ee)]('create\x20[objective]')[_0x4a90f4(0x193)](_0x4a90f4(0x20a))[_0x4a90f4(0x1d2)](_0x4a90f4(0x16d),_0x4a90f4(0x1b6))[_0x4a90f4(0x1d2)]('--preset\x20<name>',_0x4a90f4(0x153))[_0x4a90f4(0x1d2)]('--skill\x20<id>','runnable\x20skill\x20id')[_0x4a90f4(0x1d2)]('--template\x20<name>',_0x4a90f4(0x238))['option'](_0x4a90f4(0x13a),_0x4a90f4(0x1a6),(_0xae00d,_0x26f4d6)=>[..._0x26f4d6,_0xae00d],[])[_0x4a90f4(0x1d2)]('--repo\x20<url>',_0x4a90f4(0x1ff))[_0x4a90f4(0x1d2)]('--commit\x20<sha>',_0x4a90f4(0x188))[_0x4a90f4(0x1d2)](_0x4a90f4(0x151),_0x4a90f4(0x1f0))[_0x4a90f4(0x1d2)](_0x4a90f4(0x156),_0x4a90f4(0x230),(_0xc434b0,_0x4a5aaa)=>[..._0x4a5aaa,_0xc434b0],[])['option'](_0x4a90f4(0x15e),_0x4a90f4(0x1fb))[_0x4a90f4(0x1d2)](_0x4a90f4(0x23a),_0x4a90f4(0x22a))[_0x4a90f4(0x1d2)](_0x4a90f4(0x15b),_0x4a90f4(0x13d))[_0x4a90f4(0x1a8)](async(_0x20dcc3,_0x549e57,_0x142b6c)=>{const _0x369a37=_0x4a90f4,_0x2285da=_0x142b6c[_0x369a37(0x149)](),_0xcc65ad=_0x2285da[_0x369a37(0x1b0)]||_0x2285da[_0x369a37(0x1e9)]?null:await x(_0x2285da,_0x369a37(0x203)),_0x4fbffa=re(_0x20dcc3,_0x2285da);let _0x3d7f5c,_0x39468c=null;if(_0x2285da[_0x369a37(0x1e9)]&&!O(_0x2285da)&&(_0x20dcc3===void 0x0||_0x4fbffa)){const _0x45109e=await _0x35669f(_0x2285da[_0x369a37(0x175)],_0x2285da[_0x369a37(0x1e9)]);if(_0x3d7f5c=R(_0x45109e,_0x2285da[_0x369a37(0x1e9)],{'api':_0x2285da['api'],'action':_0x369a37(0x203)}),_0x20dcc3!==void 0x0&&_0x20dcc3!==_0x3d7f5c[_0x369a37(0x210)])throw new Error('request\x20key\x20'+_0x2285da[_0x369a37(0x1e9)]+_0x369a37(0x237));}else{if(_0x4fbffa){if(_0x39468c=await P({'api':_0x2285da[_0x369a37(0x137)],'home':_0x2285da[_0x369a37(0x175)],'objective':_0x20dcc3,'answers':_0x2285da[_0x369a37(0x198)],'source':ae(_0x2285da),'github':_0x2285da[_0x369a37(0x1cf)]===!0x0,'opts':_0x2285da,'loadPlanner':_0x2a7079}),_0x39468c['input']===null){W(_0x39468c,_0x369a37(0x203),_0x2285da);return;}_0x3d7f5c=_0x39468c[_0x369a37(0x1b5)];}else{const _0x223e38=_0x2285da['file']?await _0x39c26e(_0x2285da[_0x369a37(0x226)]):void 0x0;_0x3d7f5c=await _0x2616f0({'fileInput':_0x223e38,'objective':_0x20dcc3,'preset':_0x2285da[_0x369a37(0x1a4)],'skill':_0x2285da['skill'],'template':_0x2285da[_0x369a37(0x1cc)],'paths':_0x2285da[_0x369a37(0x211)],'repo':_0x2285da[_0x369a37(0x177)],'commit':_0x2285da[_0x369a37(0x223)],'github':_0x2285da[_0x369a37(0x1cf)]});}}if(_0x2285da[_0x369a37(0x162)]&&(await _0xff79a7(_0x2285da[_0x369a37(0x162)],_0x3d7f5c),_0x2285da[_0x369a37(0x179)]||_0x1ab7b2(_0x369a37(0x22f)+_0x2285da[_0x369a37(0x162)]+'\x0a')),_0x2285da['dryRun']){const _0x50581f=await _0x281c72(_0x2285da['api'],_0x3d7f5c,_0x369a37(0x203));_0x2285da[_0x369a37(0x179)]?_0x11a1cd({'action':'job.open',..._0x39468c?{'summary':_0x39468c[_0x369a37(0x1b7)],'deliverables':_0x39468c[_0x369a37(0x224)]}:{},'input':_0x3d7f5c,'check':_0x50581f},_0x2285da):_0x11a1cd(_0x39468c?U(_0x39468c,_0x50581f):J(_0x369a37(0x203),_0x3d7f5c,_0x50581f),_0x2285da),_0x50581f[_0x369a37(0x16e)][_0x369a37(0x1ae)]>0x0&&(process[_0x369a37(0x221)]=0x1);return;}_0x39468c&&!_0x2285da['json']&&_0x1ab7b2($(_0x39468c)+'\x0a');const _0x2f9111=await _0x17effd({'api':_0x2285da['api'],'home':_0x2285da[_0x369a37(0x175)],'input':_0x3d7f5c,'action':_0x369a37(0x203),'requestKey':_0x2285da[_0x369a37(0x1e9)],'plan':_0x39468c?{'summary':_0x39468c[_0x369a37(0x1b7)],'deliverables':_0x39468c['deliverables']}:void 0x0,'yes':_0x2285da['yes'],'keyEnv':_0x2285da['keyEnv'],'rpc':_0x2285da[_0x369a37(0x21b)],'paymentChain':_0x2285da['paymentChain']??_0xcc65ad?.[_0x369a37(0x1dd)],'payWith':_0x2285da[_0x369a37(0x219)]??_0xcc65ad?.[_0x369a37(0x219)],'onProgress':_0x39d34c(_0x2285da),'retryCommand':_0x40d933=>pe(_0x40d933,_0x2285da)});T(_0x2f9111,_0x2285da);}),_0x855834[_0x4a90f4(0x1ee)](_0x4a90f4(0x161))[_0x4a90f4(0x193)](_0x4a90f4(0x1da))['option'](_0x4a90f4(0x16d),_0x4a90f4(0x14f))[_0x4a90f4(0x1d2)](_0x4a90f4(0x1a3),'runnable\x20skill\x20id')['option'](_0x4a90f4(0x170),'job\x20template')['option'](_0x4a90f4(0x13a),_0x4a90f4(0x1a6),(_0x473e16,_0x3fdf50)=>[..._0x3fdf50,_0x473e16],[])[_0x4a90f4(0x1d2)](_0x4a90f4(0x156),_0x4a90f4(0x230),(_0xb21fad,_0x1cc5fb)=>[..._0x1cc5fb,_0xb21fad],[])[_0x4a90f4(0x1d2)](_0x4a90f4(0x15e),_0x4a90f4(0x1fb))[_0x4a90f4(0x1d2)]('--save\x20<path>','save\x20the\x20input\x20JSON\x20without\x20overwriting')[_0x4a90f4(0x1d2)]('--request-key\x20<uuid>',_0x4a90f4(0x13d))[_0x4a90f4(0x1a8)](async(_0x367ae3,_0x3e5e59,_0x244be6,_0x5d9e82)=>{const _0x3c7acc=_0x4a90f4,_0x26e595=_0x5d9e82[_0x3c7acc(0x149)](),_0x236cbe=_0x26e595[_0x3c7acc(0x1b0)]||_0x26e595['requestKey']?null:await x(_0x26e595,_0x3c7acc(0x1bd)),_0x22b1c3=se(_0x3e5e59,_0x26e595);let _0x3f9c25,_0x39d9d1,_0x3df553=null;if(_0x26e595[_0x3c7acc(0x1e9)]&&!N(_0x26e595)&&(_0x3e5e59===void 0x0||_0x22b1c3)){const _0x21e4d2=await _0x35669f(_0x26e595[_0x3c7acc(0x175)],_0x26e595[_0x3c7acc(0x1e9)]);if(_0x3f9c25=R(_0x21e4d2,_0x26e595[_0x3c7acc(0x1e9)],{'api':_0x26e595[_0x3c7acc(0x137)],'action':_0x3c7acc(0x1bd)}),_0x3f9c25[_0x3c7acc(0x15f)]!==_0x367ae3)throw new Error(_0x3c7acc(0x213)+_0x26e595[_0x3c7acc(0x1e9)]+_0x3c7acc(0x1c1)+(_0x3f9c25[_0x3c7acc(0x15f)]??'<none>')+',\x20not\x20'+_0x367ae3);if(_0x3e5e59!==void 0x0&&_0x3e5e59!==_0x3f9c25[_0x3c7acc(0x210)])throw new Error(_0x3c7acc(0x213)+_0x26e595['requestKey']+'\x20was\x20created\x20for\x20a\x20different\x20objective;\x20omit\x20the\x20new\x20objective\x20to\x20resume\x20it');_0x39d9d1=(await _0x11f4e2(_0x26e595[_0x3c7acc(0x137)],_0x3c7acc(0x1a2)+encodeURIComponent(_0x367ae3)))[_0x3c7acc(0x1cd)];}else{if(_0x22b1c3){if(_0x39d9d1=(await _0x11f4e2(_0x26e595[_0x3c7acc(0x137)],'/jobs/'+encodeURIComponent(_0x367ae3)))[_0x3c7acc(0x1cd)],_0x3df553=await P({'api':_0x26e595[_0x3c7acc(0x137)],'home':_0x26e595['home'],'objective':_0x3e5e59,'answers':_0x26e595['answer'],'parent':_0x39d9d1,'opts':_0x26e595,'loadPlanner':_0x2a7079}),_0x3df553[_0x3c7acc(0x1b5)]===null){W(_0x3df553,'job.continue',_0x26e595);return;}_0x3f9c25=_0x3df553['input'],_0x3f9c25[_0x3c7acc(0x15f)]!==_0x367ae3&&(_0x3f9c25={..._0x3f9c25,'parentJobId':_0x367ae3});}else{const _0x12f01d=_0x26e595[_0x3c7acc(0x226)]?await _0x39c26e(_0x26e595[_0x3c7acc(0x226)]):void 0x0;_0x3f9c25=await _0x14b6ea({'id':_0x367ae3,'fileInput':_0x12f01d,'objective':_0x3e5e59,'skill':_0x26e595[_0x3c7acc(0x208)],'template':_0x26e595[_0x3c7acc(0x1cc)],'paths':_0x26e595[_0x3c7acc(0x211)]}),_0x39d9d1=(await _0x11f4e2(_0x26e595[_0x3c7acc(0x137)],_0x3c7acc(0x1a2)+encodeURIComponent(_0x367ae3)))[_0x3c7acc(0x1cd)];}}if(_0x26e595[_0x3c7acc(0x162)]&&(await _0xff79a7(_0x26e595[_0x3c7acc(0x162)],_0x3f9c25),_0x26e595[_0x3c7acc(0x179)]||_0x1ab7b2('saved\x20input:\x20'+_0x26e595[_0x3c7acc(0x162)]+'\x0a')),_0x26e595['dryRun']){const _0x49aab5=await _0x281c72(_0x26e595['api'],_0x3f9c25,_0x3c7acc(0x1bd));_0x26e595['json']?_0x11a1cd({'action':_0x3c7acc(0x1bd),..._0x3df553?{'summary':_0x3df553[_0x3c7acc(0x1b7)],'deliverables':_0x3df553[_0x3c7acc(0x224)]}:{},'parent':_0x85a4a1(_0x39d9d1),'input':_0x3f9c25,'check':_0x49aab5},_0x26e595):_0x11a1cd(_0x3df553?U(_0x3df553,_0x49aab5):J(_0x3c7acc(0x1bd),_0x3f9c25,_0x49aab5,_0x39d9d1),_0x26e595),_0x49aab5[_0x3c7acc(0x16e)][_0x3c7acc(0x1ae)]>0x0&&(process[_0x3c7acc(0x221)]=0x1);return;}_0x3df553&&!_0x26e595[_0x3c7acc(0x179)]&&_0x1ab7b2($(_0x3df553)+'\x0a');const _0x4b9409=await _0x17effd({'api':_0x26e595[_0x3c7acc(0x137)],'home':_0x26e595[_0x3c7acc(0x175)],'input':_0x3f9c25,'action':_0x3c7acc(0x1bd),'requestKey':_0x26e595[_0x3c7acc(0x1e9)],'plan':_0x3df553?{'summary':_0x3df553['summary'],'deliverables':_0x3df553['deliverables']}:void 0x0,'yes':_0x26e595[_0x3c7acc(0x1f5)],'keyEnv':_0x26e595[_0x3c7acc(0x155)],'rpc':_0x26e595[_0x3c7acc(0x21b)],'paymentChain':_0x26e595[_0x3c7acc(0x1dd)]??_0x236cbe?.[_0x3c7acc(0x1dd)],'payWith':_0x26e595[_0x3c7acc(0x219)]??_0x236cbe?.['payWith'],'onProgress':_0x39d34c(_0x26e595),'retryCommand':_0x54ca91=>ue(_0x54ca91,_0x26e595)});_0x4b9409[_0x3c7acc(0x1fe)]&&(_0x4b9409['state'][_0x3c7acc(0x232)]=_0x85a4a1(_0x39d9d1)),T(_0x4b9409,_0x26e595);});}export{ke as registerTaskCommands};
1
+ import{writeDiagnostic as _0x253e14}from'../lib/terminal-text.mjs';import{paymentProgressReporter as _0x2aaf95}from'../lib/payment-progress.mjs';import{request as _0x6e1b30,print as _0x40216c}from'../shared.mjs';import{checkJob as _0x347c7b,publishJob as _0x3706aa,readJobFile as _0x41f5a5}from'../lib/publish.mjs';import{loadOrder as _0x96fca9,orderActions as _0x58da2f}from'../lib/orders.mjs';import{buildContinueInput as _0x274855,buildCreateInput as _0x5d1a0d,parentSummary as _0x3bbc3b,resolveAction as _0x53f80f,saveInputFile as _0x2e7447}from'../lib/task-input.mjs';import{DEFAULT_INTERVAL_SECONDS as _0x4e7f2d,DEFAULT_TIMEOUT_SECONDS as _0x2f6fa0,downloadTaskFiles as _0x59c773,waitForResult as _0x36a815}from'../lib/task-result.mjs';import{askQuestions as _0x5da7a4,loadLocalPlanner as _0x43d523,planTask as _0x1ddb5f}from'../planner/flow.mjs';import{registerMyTaskCommands as _0x287884}from'./my-tasks.mjs';import{orderPayment as _0x4e5577}from'../lib/payments.mjs';import{checkTaskWallet as _0x1a2fa6}from'../lib/task-wallet.mjs';async function x(_0x21fc22,_0x4b8caf){const _0x26d468=_0x5aee;let _0x22e01d;if(_0x21fc22[_0x26d468(0x1fe)]){const _0x4980bb=await _0x96fca9(_0x21fc22[_0x26d468(0x189)],_0x21fc22[_0x26d468(0x1fe)]);if(_0x4980bb&&!_0x58da2f(_0x4980bb)[_0x26d468(0x1f7)])return null;_0x4980bb&&(_0x22e01d={'paymentChain':_0x4980bb['paymentChain']??_0x26d468(0x247),'payWith':_0x4980bb[_0x26d468(0x262)]??_0x26d468(0x20f)});}const _0x38a4cf=await _0x1a2fa6({..._0x21fc22,'action':_0x4b8caf,'prefer':_0x22e01d});return _0x21fc22[_0x26d468(0x1f4)]||_0x253e14(_0x26d468(0x1bd)+_0x38a4cf[_0x26d468(0x262)]+'\x20on\x20'+_0x38a4cf[_0x26d468(0x179)]+_0x26d468(0x232)),_0x38a4cf;}function _0x5aee(_0x579e19,_0x4864f7){_0x579e19=_0x579e19-0x171;const _0x5aeef3=_0x4864();let _0x548a82=_0x5aeef3[_0x579e19];return _0x548a82;}function _0x4864(){const _0x4ec2e7=['paymentChain','/jobs?','none','detail',',\x20not\x20','continue\x20<id>\x20[objective]','blocked','publish','chainName','exclude\x20oracle\x20panel\x20jobs','padEnd','payment_failed','delivery','\x20\x20\x20\x20hash:\x20','--action\x20<action>','updated:\x20\x20\x20','\x20head=','github','replace','attempt','save','type','\x20verdict=','job\x20template','home','quote','<none>','task','complete\x20continuation\x20body\x20JSON\x20file','transactionHash','before','interval','input','base\x20commit\x20for\x20--repo','submissionHash','\x20belongs\x20to\x20parent\x20job\x20','code','expiresAt','job:\x20\x20\x20\x20\x20\x20\x20','\x20job(s)','trim','\x20version(s))','Network\x20error','state','orderId','--before\x20<time>','order\x20','optsWithGlobals','delayMs','source','check:\x20\x20\x20\x20\x20','reuse\x20a\x20saved\x20order\x20request\x20key','/jobs/','check,\x20quote,\x20sign\x20and\x20submit\x20a\x20job\x20file','rpc','statusUrl','explorerUrl','plan','url','retry','--answer\x20<text>','yes','saved','reviews','\x20blocker(s)','elapsedMs','complete:\x20\x20','--file\x20<path>','includes','push','blockers','wait:\x20','file','template:\x20\x20','Payment\x20needs\x20review.','exitCode','Paying\x20with\x20','nodes','poll\x20interval\x20in\x20seconds','poll\x20a\x20job\x20result\x20until\x20it\x20completes,\x20fails\x20or\x20times\x20out','repository\x20path\x20the\x20job\x20may\x20write\x20(repeatable)','delivery:\x20\x20','pendingTransaction','--request-key\x20<uuid>','job\x20response\x20is\x20missing\x20id','tx:\x20\x20\x20\x20\x20\x20\x20\x20','retries','set','kind','data','string','poll','\x0aquestions:\x0a','refusalProblems','result\x20<id>','\x0anot\x20paid:\x20blockers\x20must\x20be\x20resolved\x20first\x0a','answer\x20a\x20business\x20clarification\x20(repeatable)','--dry-run','verdict','--interval\x20<seconds>','--limit\x20must\x20be\x20an\x20integer\x20from\x201\x20to\x20500','short','admitted','statusUrl:\x20','map','files:\x20\x20\x20\x20\x20','state:\x20\x20\x20\x20\x20','stdin','--skill\x20<id>','refused','createdAt','launch','workflow','path','isArray','page\x20size\x20(1-500)','job.open','colony\x20--api\x20','action','\x20(poll\x20','objective','requiredOption','\x20has\x20no\x20saved\x20input','key','browse\x20and\x20publish\x20IMD\x20tasks','--out\x20<dir>','paymentStatus','length','challenge','source:\x20\x20\x20\x20','download\x20<id>','json','completed','named\x20input\x20preset\x20(report)','canCancel','\x20was\x20admitted,\x20but\x20IMD\x20refused\x20the\x20job.','check','message','\x20complete=','transaction:\x20','mediaType','requestKey','/result','parentJobId','show\x20one\x20job','\x20versions=','--template\x20<name>','publish\x20the\x20result\x20to\x20GitHub','interrupted','versions','\x20\x20-\x20','/jobs','resultUrl','request\x20key\x20','s\x20(retry\x20','wait:\x20interrupted\x0a','--limit\x20<n>','join','IMD','\x20bytes)','list','runnable\x20skill\x20id','launch:\x20\x20\x20\x20','project\x20ready','result','isTTY','oracle','--save\x20<path>','deliverables','\x20belongs\x20to\x20','\x20->\x20','\x20tx\x20','prepared\x20input:','parent:\x20\x20\x20\x20','dryRun','commit','stringify','limit','job.continue','create\x20[objective]','exclude','asset','result\x20response\x20is\x20missing\x20jobId','summary','continue\x20the\x20project\x20of\x20a\x20job\x20you\x20paid\x20for','HTTP\x20','complete\x20job\x20body\x20JSON\x20file','slice','toFixed','paidBy','payment:\x20','list\x20jobs','saved\x20input:\x20','\x20(enough\x20balance\x20found).\x0a','command','\x20--home\x20','show\x20<id>','objective:\x20','jobs\x20response\x20is\x20missing\x20jobs','--repo\x20<url>','outcome','files','repo','template','complete','action\x20to\x20check\x20(defaults\x20from\x20parentJobId)','reason','since','bytes','order:\x20\x20\x20\x20\x20',';\x20inspect\x20it\x20with\x20colony\x20order\x20show\x20','option','keyEnv','title','ethereum','plan:\x20','status','project','timeout','unknown','answer','api','unknown\x20request\x20key:\x20',';\x20rerun\x20with\x20--api\x20','--timeout\x20<seconds>','\x20--refresh','job\x20body\x20JSON\x20file','description','--preset\x20<name>','input:','order\x20ended\x20with\x20status:\x20','action:\x20\x20\x20\x20','preset','hash','public\x20GitHub\x20repository\x20URL','excludeOracle','skill','project:\x20\x20\x20','nodes:\x20\x20\x20\x20\x20','--path\x20<path>','jobs','payWith','only\x20run\x20the\x20free\x20check\x20and\x20print\x20the\x20input','payTo','download\x20a\x20completed\x20job\x27s\x20files\x20under\x20--out','questions','\x20attempt=','created:\x20\x20\x20','updatedAt','--github','payment_reconciling','transaction','save\x20the\x20input\x20JSON\x20without\x20overwriting','out','toString','jobId','--commit\x20<sha>','parent','head'];_0x4864=function(){return _0x4ec2e7;};return _0x4864();}function ee(_0x4439e9){const _0x54318b=_0x5aee,_0x42b841=new URLSearchParams();if(_0x4439e9['q']!==void 0x0&&_0x42b841['set']('q',_0x4439e9['q']),_0x4439e9['before']!==void 0x0&&_0x42b841[_0x54318b(0x1c8)](_0x54318b(0x18f),_0x4439e9[_0x54318b(0x18f)]),_0x4439e9[_0x54318b(0x240)]!==void 0x0&&_0x42b841[_0x54318b(0x1c8)](_0x54318b(0x240),_0x4439e9['since']),_0x4439e9[_0x54318b(0x222)]!==void 0x0){const _0x1d2df3=Number(_0x4439e9['limit']);if(!Number['isInteger'](_0x1d2df3)||_0x1d2df3<0x1||_0x1d2df3>0x1f4)throw new Error(_0x54318b(0x1d5));_0x42b841[_0x54318b(0x1c8)](_0x54318b(0x222),String(_0x1d2df3));}_0x4439e9[_0x54318b(0x25c)]&&_0x42b841[_0x54318b(0x1c8)](_0x54318b(0x225),_0x54318b(0x217));const _0x164e13=_0x42b841[_0x54318b(0x26f)]();return _0x164e13?_0x54318b(0x172)+_0x164e13:_0x54318b(0x208);}function b(_0x76b1ba,_0x28df34=0x5a){const _0x5737c2=_0x5aee,_0x818f2a=String(_0x76b1ba??'')[_0x5737c2(0x183)](/\s+/g,'\x20')[_0x5737c2(0x199)]();return _0x818f2a[_0x5737c2(0x1f0)]>_0x28df34?_0x818f2a[_0x5737c2(0x22c)](0x0,_0x28df34-0x1)+'…':_0x818f2a;}function te(_0x3a13c4){const _0x3af718=_0x5aee;if(!Array[_0x3af718(0x1e3)](_0x3a13c4?.[_0x3af718(0x261)]))throw new Error(_0x3af718(0x237));const _0x2b9585=[_0x3a13c4['count']+_0x3af718(0x198)];for(const _0x6cf962 of _0x3a13c4[_0x3af718(0x261)])_0x2b9585[_0x3af718(0x1b6)](_0x6cf962['id']+'\x20\x20'+_0x6cf962[_0x3af718(0x19c)][_0x3af718(0x17b)](0xa)+'\x20\x20'+String(_0x6cf962['template']??'')[_0x3af718(0x17b)](0x16)+'\x20\x20'+(_0x6cf962[_0x3af718(0x269)]??'')+'\x20\x20'+b(_0x6cf962[_0x3af718(0x1e9)]));return _0x2b9585[_0x3af718(0x20e)]('\x0a');}function ne(_0x4f13ff){const _0x1d42b5=_0x5aee;if(!_0x4f13ff?.['id'])throw new Error(_0x1d42b5(0x1c5));const _0x3d8391=[_0x1d42b5(0x197)+_0x4f13ff['id'],'state:\x20\x20\x20\x20\x20'+_0x4f13ff['state'],_0x1d42b5(0x1ba)+(_0x4f13ff[_0x1d42b5(0x23c)]??''),_0x1d42b5(0x236)+b(_0x4f13ff[_0x1d42b5(0x1e9)],0x1f4),_0x1d42b5(0x268)+(_0x4f13ff[_0x1d42b5(0x1df)]??''),_0x1d42b5(0x180)+(_0x4f13ff['updatedAt']??''),'paid\x20by:\x20\x20\x20'+(_0x4f13ff[_0x1d42b5(0x22e)]??''),'project:\x20\x20\x20'+(_0x4f13ff[_0x1d42b5(0x24a)]?_0x4f13ff[_0x1d42b5(0x24a)]['id']+'\x20('+(_0x4f13ff[_0x1d42b5(0x24a)][_0x1d42b5(0x206)]?.['length']??0x0)+_0x1d42b5(0x19a):_0x1d42b5(0x173)),_0x1d42b5(0x1c2)+(_0x4f13ff['delivery']?JSON[_0x1d42b5(0x221)](_0x4f13ff[_0x1d42b5(0x17d)]):_0x1d42b5(0x173)),_0x1d42b5(0x213)+(_0x4f13ff[_0x1d42b5(0x1e0)]?JSON['stringify'](_0x4f13ff[_0x1d42b5(0x1e0)]):_0x1d42b5(0x173))];if(Array[_0x1d42b5(0x1e3)](_0x4f13ff[_0x1d42b5(0x1be)])){_0x3d8391[_0x1d42b5(0x1b6)](_0x1d42b5(0x25f)+_0x4f13ff[_0x1d42b5(0x1be)]['length']);for(const _0x105038 of _0x4f13ff[_0x1d42b5(0x1be)])_0x3d8391[_0x1d42b5(0x1b6)]('\x20\x20-\x20'+_0x105038[_0x1d42b5(0x1ec)]+':\x20'+_0x105038[_0x1d42b5(0x19c)]+_0x1d42b5(0x267)+_0x105038[_0x1d42b5(0x184)]+_0x1d42b5(0x187)+(_0x105038[_0x1d42b5(0x1d3)]?.[_0x1d42b5(0x249)]??_0x1d42b5(0x173)));}return Array[_0x1d42b5(0x1e3)](_0x4f13ff[_0x1d42b5(0x1b0)])&&_0x3d8391[_0x1d42b5(0x1b6)]('reviews:\x20\x20\x20'+_0x4f13ff[_0x1d42b5(0x1b0)][_0x1d42b5(0x1f0)]),_0x4f13ff[_0x1d42b5(0x1e1)]?.['id']&&_0x3d8391[_0x1d42b5(0x1b6)](('workflow:\x20\x20'+_0x4f13ff[_0x1d42b5(0x1e1)]['id']+'\x20'+(_0x4f13ff[_0x1d42b5(0x1e1)]['status']??''))[_0x1d42b5(0x199)]()),_0x3d8391['join']('\x0a');}function S(_0x6a9b30){const _0x37af4a=_0x5aee;if(!_0x6a9b30?.[_0x37af4a(0x270)])throw new Error(_0x37af4a(0x227));const _0x169312=['job:\x20\x20\x20\x20\x20\x20\x20'+_0x6a9b30[_0x37af4a(0x270)],_0x37af4a(0x1db)+_0x6a9b30['state'],_0x37af4a(0x1b3)+_0x6a9b30['complete']],_0x8bd074=Array['isArray'](_0x6a9b30[_0x37af4a(0x23a)])?_0x6a9b30[_0x37af4a(0x23a)]:[];_0x169312[_0x37af4a(0x1b6)](_0x37af4a(0x1da)+_0x8bd074[_0x37af4a(0x1f0)]);for(const _0x5e5521 of _0x8bd074)_0x169312[_0x37af4a(0x1b6)]('\x20\x20-\x20'+_0x5e5521['path']+'\x20('+_0x5e5521[_0x37af4a(0x241)]+'\x20bytes,\x20'+_0x5e5521[_0x37af4a(0x1fd)]+')'),_0x169312[_0x37af4a(0x1b6)](_0x37af4a(0x17e)+_0x5e5521['hash']),_0x169312[_0x37af4a(0x1b6)]('\x20\x20\x20\x20url:\x20\x20'+_0x5e5521[_0x37af4a(0x1ab)]);const _0xf01a86=Array[_0x37af4a(0x1e3)](_0x6a9b30['source'])?_0x6a9b30[_0x37af4a(0x1a2)]:[];_0x169312[_0x37af4a(0x1b6)](_0x37af4a(0x1f2)+_0xf01a86['length']);for(const _0x53b436 of _0xf01a86)_0x169312[_0x37af4a(0x1b6)](_0x37af4a(0x207)+(_0x53b436['node']??_0x53b436[_0x37af4a(0x193)])+':\x20'+_0x53b436[_0x37af4a(0x1ab)]);return _0x6a9b30[_0x37af4a(0x17d)]&&_0x169312[_0x37af4a(0x1b6)](_0x37af4a(0x1c2)+JSON[_0x37af4a(0x221)](_0x6a9b30[_0x37af4a(0x17d)])),_0x6a9b30['launch']&&_0x169312[_0x37af4a(0x1b6)](_0x37af4a(0x213)+JSON[_0x37af4a(0x221)](_0x6a9b30[_0x37af4a(0x1e0)])),_0x169312[_0x37af4a(0x20e)]('\x0a');}function oe(_0xcf6f58){const _0x3495fb=_0x5aee,_0x174584=[_0x3495fb(0x197)+_0xcf6f58[_0x3495fb(0x270)],'state:\x20\x20\x20\x20\x20'+_0xcf6f58[_0x3495fb(0x19c)],_0x3495fb(0x1da)+_0xcf6f58[_0x3495fb(0x23a)][_0x3495fb(0x1f0)]];for(const _0x806c4b of _0xcf6f58[_0x3495fb(0x23a)])_0x174584[_0x3495fb(0x1b6)](_0x3495fb(0x207)+_0x806c4b[_0x3495fb(0x1e2)]+_0x3495fb(0x21b)+_0x806c4b[_0x3495fb(0x1b9)]+'\x20('+_0x806c4b[_0x3495fb(0x241)]+_0x3495fb(0x210)),_0x174584[_0x3495fb(0x1b6)](_0x3495fb(0x17e)+_0x806c4b[_0x3495fb(0x25a)]);return _0x174584['join']('\x0a');}function I(_0x4a292a){const _0x3f4cd6=_0x5aee,_0x1c00c5=['blockers:\x20'+_0x4a292a[_0x3f4cd6(0x1b7)]['length']];for(const _0x9eab4d of _0x4a292a[_0x3f4cd6(0x1b7)])_0x1c00c5[_0x3f4cd6(0x1b6)]('\x20\x20-\x20'+_0x9eab4d[_0x3f4cd6(0x195)]+':\x20'+_0x9eab4d['detail']);const _0x4cc5c5=Array['isArray'](_0x4a292a[_0x3f4cd6(0x1aa)])?_0x4a292a[_0x3f4cd6(0x1aa)]:[];_0x1c00c5['push'](_0x3f4cd6(0x248)+_0x4cc5c5[_0x3f4cd6(0x1f0)]);for(const _0x2b93ba of _0x4cc5c5)_0x1c00c5['push']('\x20\x20-\x20'+(_0x2b93ba[_0x3f4cd6(0x246)]??_0x2b93ba[_0x3f4cd6(0x1d6)]??_0x2b93ba[_0x3f4cd6(0x25d)])+(_0x2b93ba[_0x3f4cd6(0x25d)]?'\x20('+_0x2b93ba[_0x3f4cd6(0x25d)]+')':''));return _0x1c00c5[_0x3f4cd6(0x20e)]('\x0a');}function T(_0x3c9d23){const _0x51d6eb=_0x5aee,_0x3de66a=_0x3c9d23[_0x51d6eb(0x18a)]?_0x4e5577(_0x3c9d23):null;return{'status':_0x3c9d23[_0x51d6eb(0x249)],'action':_0x3c9d23[_0x51d6eb(0x1e7)],'requestKey':_0x3c9d23['requestKey'],'orderId':_0x3c9d23['orderId'],'jobId':_0x3c9d23['jobId']??null,'statusUrl':_0x3c9d23[_0x51d6eb(0x1a8)]??null,'resultUrl':_0x3c9d23[_0x51d6eb(0x209)]??null,'transactionHash':_0x3c9d23['transactionHash']??null,'problems':_0x3c9d23[_0x51d6eb(0x1ce)]??null,'parentJobId':_0x3c9d23[_0x51d6eb(0x191)]?.['parentJobId']??null,'parent':_0x3c9d23['parent']??null,'project':_0x3c9d23[_0x51d6eb(0x1f9)]?.['project']??null,'payer':_0x3c9d23['payer']??null,'paymentChain':_0x3c9d23[_0x51d6eb(0x171)]??'ethereum','payWith':_0x3c9d23[_0x51d6eb(0x262)]??_0x51d6eb(0x20f),'prepared':_0x3c9d23[_0x51d6eb(0x1f1)]?.['input']??null,'quote':_0x3c9d23[_0x51d6eb(0x18a)]?{'amount':_0x3de66a['amount'],'asset':_0x3de66a[_0x51d6eb(0x226)],'payTo':_0x3de66a[_0x51d6eb(0x264)],'expiresAt':_0x3c9d23['quote'][_0x51d6eb(0x196)]}:null};}function ie(_0x3e6c3a){const _0x35ff0a=_0x5aee,_0x2e4549=['status:\x20\x20\x20\x20'+_0x3e6c3a[_0x35ff0a(0x249)],_0x35ff0a(0x258)+_0x3e6c3a['action'],_0x35ff0a(0x242)+_0x3e6c3a[_0x35ff0a(0x19d)],_0x35ff0a(0x197)+(_0x3e6c3a['jobId']??'')];if(_0x3e6c3a[_0x35ff0a(0x1a8)]&&_0x2e4549['push'](_0x35ff0a(0x1d8)+_0x3e6c3a[_0x35ff0a(0x1a8)]),_0x3e6c3a[_0x35ff0a(0x209)]&&_0x2e4549[_0x35ff0a(0x1b6)]('resultUrl:\x20'+_0x3e6c3a['resultUrl']),_0x3e6c3a[_0x35ff0a(0x18e)]&&_0x2e4549['push'](_0x35ff0a(0x1c6)+_0x3e6c3a['transactionHash']),_0x3e6c3a[_0x35ff0a(0x272)]&&(_0x2e4549[_0x35ff0a(0x1b6)](_0x35ff0a(0x21e)+_0x3e6c3a[_0x35ff0a(0x272)]['id']+'\x20('+(_0x3e6c3a[_0x35ff0a(0x272)][_0x35ff0a(0x19c)]??'unknown')+')'),_0x3e6c3a[_0x35ff0a(0x272)][_0x35ff0a(0x24a)]&&_0x2e4549['push'](_0x35ff0a(0x25e)+_0x3e6c3a[_0x35ff0a(0x272)]['project']['id']+_0x35ff0a(0x181)+(_0x3e6c3a[_0x35ff0a(0x272)][_0x35ff0a(0x24a)]['head']??''))),_0x3e6c3a[_0x35ff0a(0x1f9)]?.[_0x35ff0a(0x24a)]){const _0xe19e7=_0x3e6c3a[_0x35ff0a(0x1f9)][_0x35ff0a(0x24a)];_0x2e4549[_0x35ff0a(0x1b6)](_0x35ff0a(0x1a3)+(_0xe19e7['summary']??_0xe19e7['id']??_0x35ff0a(0x214)));}return!_0x3e6c3a[_0x35ff0a(0x1aa)]&&_0x3e6c3a[_0x35ff0a(0x1e7)]===_0x35ff0a(0x223)&&_0x3e6c3a[_0x35ff0a(0x1f1)]?.[_0x35ff0a(0x191)]&&(_0x2e4549[_0x35ff0a(0x1b6)](_0x35ff0a(0x21d)),_0x2e4549[_0x35ff0a(0x1b6)](JSON[_0x35ff0a(0x221)](_0x3e6c3a[_0x35ff0a(0x1f1)]['input'],null,0x2))),_0x2e4549['join']('\x0a');}function A(_0xffe040,_0xdd1a7b){const _0x1fd6ea=_0x5aee;if(_0xffe040[_0x1fd6ea(0x249)]===_0x1fd6ea(0x177)){_0xdd1a7b['json']?_0x40216c({'status':'blocked','action':_0xffe040[_0x1fd6ea(0x19c)][_0x1fd6ea(0x1e7)],'requestKey':_0xffe040[_0x1fd6ea(0x19c)]['requestKey'],'parent':_0xffe040[_0x1fd6ea(0x19c)][_0x1fd6ea(0x272)]??null,'check':_0xffe040[_0x1fd6ea(0x1f9)]},_0xdd1a7b):(_0xffe040[_0x1fd6ea(0x19c)][_0x1fd6ea(0x272)]&&_0x253e14(K(_0xffe040[_0x1fd6ea(0x19c)]['parent'])+'\x0a'),_0x253e14(I(_0xffe040['check'])+_0x1fd6ea(0x1d0))),process[_0x1fd6ea(0x1bc)]=0x1;return;}if(_0xffe040[_0x1fd6ea(0x249)]==='refused'){const _0xec4e79=T(_0xffe040['state']);if(_0xdd1a7b[_0x1fd6ea(0x1f4)])_0x40216c({..._0xec4e79,'status':_0x1fd6ea(0x1de)},_0xdd1a7b);else{const _0x2cbd1e=[_0x1fd6ea(0x19f)+_0xffe040[_0x1fd6ea(0x19c)][_0x1fd6ea(0x19d)]+_0x1fd6ea(0x1f8),_0x1fd6ea(0x22f)+(_0xffe040['state'][_0x1fd6ea(0x1ef)]??_0x1fd6ea(0x24c))+(_0xffe040[_0x1fd6ea(0x19c)][_0x1fd6ea(0x18e)]?_0x1fd6ea(0x21c)+_0xffe040[_0x1fd6ea(0x19c)][_0x1fd6ea(0x18e)]:'')];for(const _0x5f5b9d of _0xffe040[_0x1fd6ea(0x19c)]['refusalProblems']??[])_0x2cbd1e[_0x1fd6ea(0x1b6)]('\x20\x20-\x20'+(_0x5f5b9d[_0x1fd6ea(0x195)]??_0x1fd6ea(0x1de))+':\x20'+(_0x5f5b9d[_0x1fd6ea(0x174)]??JSON[_0x1fd6ea(0x221)](_0x5f5b9d)));_0x2cbd1e[_0x1fd6ea(0x1b6)]('inspect:\x20colony\x20order\x20show\x20'+_0xffe040[_0x1fd6ea(0x19c)]['orderId']+_0x1fd6ea(0x252)),_0x253e14(_0x2cbd1e['join']('\x0a')+'\x0a');}process['exitCode']=0x1;return;}if(['expired',_0x1fd6ea(0x17c),'transaction_pending',_0x1fd6ea(0x26b)][_0x1fd6ea(0x1b5)](_0xffe040[_0x1fd6ea(0x249)])){const _0x654ff8=_0xffe040[_0x1fd6ea(0x19c)];if(_0xdd1a7b[_0x1fd6ea(0x1f4)])_0x40216c({...T(_0x654ff8),'status':_0xffe040[_0x1fd6ea(0x249)]},_0xdd1a7b);else{const _0x3a749e=_0x654ff8[_0x1fd6ea(0x1c3)]??_0x654ff8[_0x1fd6ea(0x26c)],_0x24cc26=[_0x1fd6ea(0x1bb),'Your\x20request\x20is\x20saved.\x20Continue\x20payment\x20to\x20check\x20the\x20original\x20payment\x20before\x20retrying.'];_0x3a749e?.[_0x1fd6ea(0x25a)]&&_0x24cc26[_0x1fd6ea(0x1b6)](_0x1fd6ea(0x1fc)+_0x3a749e['hash']+(_0x3a749e['kind']?'\x20('+_0x3a749e[_0x1fd6ea(0x1c9)]+')':'')),_0x3a749e?.[_0x1fd6ea(0x23f)]&&_0x24cc26[_0x1fd6ea(0x1b6)]('reason:\x20\x20\x20\x20\x20\x20'+_0x3a749e[_0x1fd6ea(0x23f)]),_0x3a749e?.[_0x1fd6ea(0x1a9)]&&_0x24cc26[_0x1fd6ea(0x1b6)]('explorer:\x20\x20\x20\x20'+_0x3a749e[_0x1fd6ea(0x1a9)]),_0x654ff8[_0x1fd6ea(0x18e)]&&_0x654ff8[_0x1fd6ea(0x18e)]!==_0x3a749e?.[_0x1fd6ea(0x25a)]&&_0x24cc26['push'](_0x1fd6ea(0x1fc)+_0x654ff8['transactionHash']),_0x654ff8[_0x1fd6ea(0x19d)]&&_0x24cc26[_0x1fd6ea(0x1b6)]('continue:\x20\x20\x20\x20colony\x20order\x20submit\x20'+_0x654ff8['orderId']),_0x253e14(_0x24cc26['join']('\x0a')+'\x0a');}process['exitCode']=0x1;return;}if(_0xffe040['status']!==_0x1fd6ea(0x1d7))throw new Error(_0x1fd6ea(0x257)+_0xffe040[_0x1fd6ea(0x249)]+_0x1fd6ea(0x243)+_0xffe040[_0x1fd6ea(0x19c)]['orderId']+_0x1fd6ea(0x252));_0x40216c(_0xdd1a7b[_0x1fd6ea(0x1f4)]?T(_0xffe040[_0x1fd6ea(0x19c)]):ie(_0xffe040[_0x1fd6ea(0x19c)]),_0xdd1a7b);}function K(_0x349076){const _0x2147b8=_0x5aee,_0x3bf134=_0x3bbc3b(_0x349076),_0x2e1db8=[_0x2147b8(0x21e)+_0x3bf134['id'],_0x2147b8(0x1db)+(_0x3bf134[_0x2147b8(0x19c)]??''),_0x2147b8(0x1ba)+(_0x3bf134[_0x2147b8(0x23c)]??''),_0x2147b8(0x236)+b(_0x3bf134[_0x2147b8(0x1e9)],0x1f4),'paid\x20by:\x20\x20\x20'+(_0x3bf134[_0x2147b8(0x22e)]??'')];return _0x3bf134[_0x2147b8(0x24a)]&&_0x2e1db8[_0x2147b8(0x1b6)](_0x2147b8(0x25e)+_0x3bf134['project']['id']+_0x2147b8(0x181)+(_0x3bf134[_0x2147b8(0x24a)][_0x2147b8(0x273)]??'')+_0x2147b8(0x202)+_0x3bf134['project'][_0x2147b8(0x206)]['length']),_0x2e1db8[_0x2147b8(0x20e)]('\x0a');}function re(_0x4f633d){const _0x55ca7c=_0x5aee;return _0x4f633d?_0x4f633d['summary']?_0x55ca7c(0x25e)+b(_0x4f633d['summary'],0x1f4):_0x4f633d['id']?_0x55ca7c(0x25e)+_0x4f633d['id']:null:null;}function J(_0x344026,_0x4077fb,_0x4c7138,_0x51cb0e){const _0x1a9130=_0x5aee,_0x3c548a=[];_0x51cb0e&&_0x3c548a[_0x1a9130(0x1b6)](K(_0x51cb0e)),_0x3c548a[_0x1a9130(0x1b6)](_0x1a9130(0x258)+_0x344026),_0x3c548a[_0x1a9130(0x1b6)](_0x1a9130(0x256)),_0x3c548a['push'](JSON[_0x1a9130(0x221)](_0x4077fb,null,0x2)),_0x3c548a[_0x1a9130(0x1b6)](I(_0x4c7138));const _0x4647e1=re(_0x4c7138[_0x1a9130(0x24a)]);return _0x4647e1&&_0x3c548a[_0x1a9130(0x1b6)](_0x4647e1),_0x3c548a[_0x1a9130(0x20e)]('\x0a');}function O(_0x1aaa4e){const _0x5187b9=_0x5aee;return _0x1aaa4e[_0x5187b9(0x1b9)]!==void 0x0||_0x1aaa4e[_0x5187b9(0x259)]!==void 0x0||_0x1aaa4e[_0x5187b9(0x25d)]!==void 0x0||_0x1aaa4e[_0x5187b9(0x23c)]!==void 0x0||Array[_0x5187b9(0x1e3)](_0x1aaa4e[_0x5187b9(0x1e2)])&&_0x1aaa4e[_0x5187b9(0x1e2)][_0x5187b9(0x1f0)]>0x0;}function N(_0xc6c2dc){const _0xc78133=_0x5aee;return _0xc6c2dc[_0xc78133(0x1b9)]!==void 0x0||_0xc6c2dc[_0xc78133(0x25d)]!==void 0x0||_0xc6c2dc['template']!==void 0x0||Array[_0xc78133(0x1e3)](_0xc6c2dc['path'])&&_0xc6c2dc[_0xc78133(0x1e2)]['length']>0x0;}function se(_0x23b9fd,_0x219a69){const _0x2c0014=_0x5aee;return typeof _0x23b9fd==_0x2c0014(0x1cb)&&_0x23b9fd[_0x2c0014(0x199)]()!==''&&!O(_0x219a69);}function ae(_0x57dfb8,_0xdcbd9e){const _0x2baf0b=_0x5aee;return typeof _0x57dfb8==_0x2baf0b(0x1cb)&&_0x57dfb8[_0x2baf0b(0x199)]()!==''&&!N(_0xdcbd9e);}function $(_0x232002){const _0x55fbb9=_0x5aee,_0x526b42=['summary:\x20'+_0x232002[_0x55fbb9(0x228)],'deliverables:'];_0x232002[_0x55fbb9(0x219)]['length']===0x0&&_0x526b42[_0x55fbb9(0x1b6)]('\x20\x20-\x20none');for(const _0x157825 of _0x232002[_0x55fbb9(0x219)])_0x526b42[_0x55fbb9(0x1b6)]('\x20\x20-\x20'+_0x157825);return _0x526b42[_0x55fbb9(0x20e)]('\x0a');}function U(_0x393614,_0x125a77){const _0x2fbbb6=_0x5aee,_0x15eac2=[$(_0x393614),'check:\x20'+_0x125a77[_0x2fbbb6(0x1b7)][_0x2fbbb6(0x1f0)]+_0x2fbbb6(0x1b1)];for(const _0x38fd39 of _0x125a77[_0x2fbbb6(0x1b7)])_0x15eac2[_0x2fbbb6(0x1b6)](_0x2fbbb6(0x207)+_0x38fd39['code']+':\x20'+_0x38fd39[_0x2fbbb6(0x174)]);return _0x15eac2['join']('\x0a');}function W(_0x27597f,_0x511e90,_0x5180f8){const _0xcf4b45=_0x5aee;if(_0x5180f8[_0xcf4b45(0x1f4)])_0x40216c({'action':_0x511e90,'summary':_0x27597f[_0xcf4b45(0x228)],'deliverables':_0x27597f[_0xcf4b45(0x219)],'questions':_0x27597f[_0xcf4b45(0x266)],'input':null},_0x5180f8);else{const _0x343e50=_0x27597f[_0xcf4b45(0x266)][_0xcf4b45(0x1d9)](_0x153de5=>_0xcf4b45(0x207)+_0x153de5)['join']('\x0a');_0x40216c($(_0x27597f)+_0xcf4b45(0x1cd)+_0x343e50,_0x5180f8);}process[_0xcf4b45(0x1bc)]=0x1;}function pe(_0x1b4bad){const _0x16ab31=_0x5aee;return _0x1b4bad[_0x16ab31(0x23b)]===void 0x0&&_0x1b4bad[_0x16ab31(0x220)]===void 0x0?null:{'repoUrl':_0x1b4bad[_0x16ab31(0x23b)],'baseCommit':_0x1b4bad[_0x16ab31(0x220)]};}async function P({api:_0x396cfc,home:_0x6ab66b,objective:_0x23e6d9,answers:_0xc02b90,parent:_0x3cd4e0=null,source:_0x3c9993=null,github:_0x33d3bb=!0x1,opts:_0x28c93f,loadPlanner:_0x25b3ad}){const _0x1f0521=_0x5aee;return _0x1ddb5f({'api':_0x396cfc,'home':_0x6ab66b,'loadPlanner':_0x25b3ad,'objective':_0x23e6d9,'answers':_0xc02b90,'parent':_0x3cd4e0,'source':_0x3c9993,'github':_0x33d3bb,'ask':!_0x28c93f[_0x1f0521(0x1f4)]&&process[_0x1f0521(0x1dc)][_0x1f0521(0x216)]?_0x5da7a4:null});}function R(_0x28d2d7,_0x50cb13,{api:_0x3c7f0d,action:_0x28c8c4}){const _0x1149d2=_0x5aee;if(!_0x28d2d7)throw new Error(_0x1149d2(0x24f)+_0x50cb13);if(_0x28d2d7[_0x1149d2(0x24e)]!==_0x3c7f0d)throw new Error(_0x1149d2(0x19f)+_0x28d2d7[_0x1149d2(0x1fe)]+_0x1149d2(0x21a)+_0x28d2d7['api']+_0x1149d2(0x250)+_0x28d2d7[_0x1149d2(0x24e)]);if(_0x28d2d7['action']!==_0x28c8c4)throw new Error(_0x1149d2(0x20a)+_0x28d2d7[_0x1149d2(0x1fe)]+'\x20was\x20created\x20for\x20action\x20'+_0x28d2d7[_0x1149d2(0x1e7)]+_0x1149d2(0x175)+_0x28c8c4);if(!_0x28d2d7[_0x1149d2(0x191)]||typeof _0x28d2d7[_0x1149d2(0x191)]!='object'||Array[_0x1149d2(0x1e3)](_0x28d2d7[_0x1149d2(0x191)]))throw new Error(_0x1149d2(0x20a)+_0x28d2d7[_0x1149d2(0x1fe)]+_0x1149d2(0x1eb));return _0x28d2d7['input'];}function ue(_0x25a842,_0x561660){const _0x465abe=_0x5aee;return _0x465abe(0x1e6)+_0x25a842[_0x465abe(0x24e)]+_0x465abe(0x234)+_0x561660[_0x465abe(0x189)]+'\x20task\x20create\x20--request-key\x20'+_0x25a842[_0x465abe(0x1fe)];}function le(_0xf583fd,_0x2271aa){const _0x2e12d0=_0x5aee;return _0x2e12d0(0x1e6)+_0xf583fd[_0x2e12d0(0x24e)]+_0x2e12d0(0x234)+_0x2271aa[_0x2e12d0(0x189)]+'\x20task\x20continue\x20'+_0xf583fd['input']['parentJobId']+'\x20--request-key\x20'+_0xf583fd[_0x2e12d0(0x1fe)];}function ge(_0x511387,{loadPlanner:_0x154f0a=_0x43d523}={}){const _0x561359=_0x5aee,_0x3c66da=_0x511387['command'](_0x561359(0x18c))[_0x561359(0x254)](_0x561359(0x1ed));_0x287884(_0x3c66da),_0x3c66da[_0x561359(0x233)](_0x561359(0x211))[_0x561359(0x254)](_0x561359(0x230))[_0x561359(0x244)]('--q\x20<text>','objective\x20or\x20job\x20id\x20prefix')[_0x561359(0x244)](_0x561359(0x19e),'creation-time\x20cursor\x20(exclusive)')['option']('--since\x20<time>','jobs\x20that\x20moved\x20after\x20this\x20time')[_0x561359(0x244)](_0x561359(0x20d),_0x561359(0x1e4))['option']('--exclude-oracle',_0x561359(0x17a))['action'](async(_0x585187,_0x4732d1)=>{const _0x12c648=_0x561359,_0x42c827=_0x4732d1[_0x12c648(0x1a0)](),_0x1817d2=await _0x6e1b30(_0x42c827['api'],ee(_0x42c827));_0x40216c(_0x42c827[_0x12c648(0x1f4)]?_0x1817d2['data']:te(_0x1817d2[_0x12c648(0x1ca)]),_0x42c827);}),_0x3c66da[_0x561359(0x233)](_0x561359(0x235))['description'](_0x561359(0x201))[_0x561359(0x1e7)](async(_0x2e606f,_0x2d9166,_0x4890c7)=>{const _0x2a1fd2=_0x561359,_0x410f0b=_0x4890c7[_0x2a1fd2(0x1a0)](),_0x4248eb=await _0x6e1b30(_0x410f0b[_0x2a1fd2(0x24e)],_0x2a1fd2(0x1a5)+encodeURIComponent(_0x2e606f));_0x40216c(_0x410f0b[_0x2a1fd2(0x1f4)]?_0x4248eb[_0x2a1fd2(0x1ca)]:ne(_0x4248eb[_0x2a1fd2(0x1ca)]),_0x410f0b);}),_0x3c66da[_0x561359(0x233)](_0x561359(0x1cf))[_0x561359(0x254)]('show\x20a\x20job\x20result\x20and\x20artifact\x20URLs')[_0x561359(0x1e7)](async(_0x3aa943,_0x243e4e,_0x2afdac)=>{const _0x8b8efc=_0x561359,_0x1452af=_0x2afdac[_0x8b8efc(0x1a0)](),_0x576925=await _0x6e1b30(_0x1452af[_0x8b8efc(0x24e)],_0x8b8efc(0x1a5)+encodeURIComponent(_0x3aa943)+_0x8b8efc(0x1ff));_0x40216c(_0x1452af[_0x8b8efc(0x1f4)]?_0x576925[_0x8b8efc(0x1ca)]:S(_0x576925[_0x8b8efc(0x1ca)]),_0x1452af);}),_0x3c66da[_0x561359(0x233)]('wait\x20<id>')[_0x561359(0x254)](_0x561359(0x1c0))[_0x561359(0x244)](_0x561359(0x1d4),_0x561359(0x1bf),String(_0x4e7f2d))[_0x561359(0x244)](_0x561359(0x251),'total\x20timeout\x20in\x20seconds',String(_0x2f6fa0))[_0x561359(0x1e7)](async(_0x123623,_0x50036b,_0x24f059)=>{const _0x44546d=_0x561359,_0x38b69d=_0x24f059['optsWithGlobals'](),_0x156b64=await _0x36a815({'api':_0x38b69d['api'],'id':_0x123623,'interval':_0x38b69d[_0x44546d(0x190)],'timeout':_0x38b69d[_0x44546d(0x24b)],'onProgress':_0x4aea78=>{const _0x309747=_0x44546d;_0x4aea78[_0x309747(0x186)]===_0x309747(0x1cc)?_0x253e14('wait:\x20'+_0x4aea78[_0x309747(0x19c)]+_0x309747(0x1fb)+_0x4aea78[_0x309747(0x23d)]+_0x309747(0x1e8)+_0x4aea78[_0x309747(0x184)]+',\x20'+(_0x4aea78[_0x309747(0x1b2)]/0x3e8)[_0x309747(0x22d)](0x1)+'s)\x0a'):_0x4aea78[_0x309747(0x186)]===_0x309747(0x1ac)&&_0x253e14('wait:\x20'+(_0x4aea78[_0x309747(0x249)]?_0x309747(0x22a)+_0x4aea78[_0x309747(0x249)]:_0x309747(0x19b))+';\x20retrying\x20in\x20'+(_0x4aea78[_0x309747(0x1a1)]/0x3e8)[_0x309747(0x22d)](0x1)+_0x309747(0x20b)+_0x4aea78[_0x309747(0x1c7)]+')\x0a');}});if(_0x156b64[_0x44546d(0x239)]===_0x44546d(0x205)){_0x253e14(_0x44546d(0x20c)),process['exitCode']=0x82;return;}_0x156b64[_0x44546d(0x215)]&&_0x40216c(_0x38b69d[_0x44546d(0x1f4)]?_0x156b64[_0x44546d(0x215)]:S(_0x156b64[_0x44546d(0x215)]),_0x38b69d),_0x156b64['outcome']!==_0x44546d(0x1f5)&&(_0x253e14(_0x44546d(0x1b8)+_0x156b64[_0x44546d(0x1fa)]+'\x0a'),process['exitCode']=0x1);}),_0x3c66da[_0x561359(0x233)](_0x561359(0x1f3))['description'](_0x561359(0x265))[_0x561359(0x1ea)](_0x561359(0x1ee),'destination\x20directory')[_0x561359(0x1e7)](async(_0x3e45b4,_0x134ada,_0x8b85a0)=>{const _0x376b7d=_0x561359,_0x39680e=_0x8b85a0['optsWithGlobals'](),_0x100458=await _0x59c773({'api':_0x39680e[_0x376b7d(0x24e)],'id':_0x3e45b4,'out':_0x39680e[_0x376b7d(0x26e)],'onProgress':_0x1bd4cb=>{const _0x31ba0a=_0x376b7d;_0x1bd4cb[_0x31ba0a(0x186)]===_0x31ba0a(0x1af)&&_0x253e14('download:\x20'+_0x1bd4cb[_0x31ba0a(0x1e2)]+_0x31ba0a(0x21b)+_0x1bd4cb[_0x31ba0a(0x1b9)]+'\x0a');}});_0x40216c(_0x39680e[_0x376b7d(0x1f4)]?_0x100458:oe(_0x100458),_0x39680e);}),_0x3c66da[_0x561359(0x233)](_0x561359(0x1f9))['description']('validate\x20a\x20job\x20body\x20without\x20creating\x20an\x20order')['requiredOption'](_0x561359(0x1b4),'job\x20body\x20JSON\x20file')['option'](_0x561359(0x17f),_0x561359(0x23e))['action'](async(_0x5a98ac,_0x35f706)=>{const _0xd24d48=_0x561359,_0x4455a2=_0x35f706[_0xd24d48(0x1a0)](),_0x309f15=await _0x41f5a5(_0x4455a2[_0xd24d48(0x1b9)]),_0x1292cd=_0x4455a2[_0xd24d48(0x1e7)]??_0x53f80f(_0x309f15),_0x1a601a=await _0x347c7b(_0x4455a2[_0xd24d48(0x24e)],_0x309f15,_0x1292cd);_0x40216c(_0x4455a2[_0xd24d48(0x1f4)]?_0x1a601a:I(_0x1a601a),_0x4455a2);}),_0x3c66da['command'](_0x561359(0x178))[_0x561359(0x254)](_0x561359(0x1a6))[_0x561359(0x1ea)](_0x561359(0x1b4),_0x561359(0x253))['option'](_0x561359(0x1c4),_0x561359(0x1a4))[_0x561359(0x1e7)](async(_0x486ab6,_0x278182)=>{const _0x57f371=_0x561359,_0x2f8741=_0x278182[_0x57f371(0x1a0)](),_0x42815b=await x(_0x2f8741,'job.open'),_0x5b699f=await _0x3706aa({'api':_0x2f8741[_0x57f371(0x24e)],'home':_0x2f8741[_0x57f371(0x189)],'file':_0x2f8741[_0x57f371(0x1b9)],'action':_0x57f371(0x1e5),'requestKey':_0x2f8741['requestKey'],'yes':_0x2f8741[_0x57f371(0x1ae)],'keyEnv':_0x2f8741[_0x57f371(0x245)],'rpc':_0x2f8741[_0x57f371(0x1a7)],'paymentChain':_0x2f8741[_0x57f371(0x171)]??_0x42815b?.[_0x57f371(0x171)],'payWith':_0x2f8741['payWith']??_0x42815b?.[_0x57f371(0x262)],'onProgress':_0x2aaf95(_0x2f8741)});A(_0x5b699f,_0x2f8741);}),_0x3c66da[_0x561359(0x233)](_0x561359(0x224))['description']('create\x20a\x20job\x20from\x20a\x20clear\x20objective\x20or\x20a\x20JSON\x20file')[_0x561359(0x244)]('--file\x20<path>',_0x561359(0x22b))['option'](_0x561359(0x255),_0x561359(0x1f6))[_0x561359(0x244)](_0x561359(0x1dd),_0x561359(0x212))[_0x561359(0x244)]('--template\x20<name>','job\x20template')[_0x561359(0x244)](_0x561359(0x260),_0x561359(0x1c1),(_0x1f1c1a,_0x58f51f)=>[..._0x58f51f,_0x1f1c1a],[])[_0x561359(0x244)](_0x561359(0x238),_0x561359(0x25b))[_0x561359(0x244)](_0x561359(0x271),_0x561359(0x192))[_0x561359(0x244)](_0x561359(0x26a),_0x561359(0x204))[_0x561359(0x244)](_0x561359(0x1ad),_0x561359(0x1d1),(_0x2e439a,_0x18f6a5)=>[..._0x18f6a5,_0x2e439a],[])['option'](_0x561359(0x1d2),_0x561359(0x263))[_0x561359(0x244)](_0x561359(0x218),_0x561359(0x26d))[_0x561359(0x244)](_0x561359(0x1c4),_0x561359(0x1a4))[_0x561359(0x1e7)](async(_0x205a24,_0x2028f7,_0x3ac265)=>{const _0x48146a=_0x561359,_0x279a24=_0x3ac265[_0x48146a(0x1a0)](),_0x47fced=_0x279a24['dryRun']?null:await x(_0x279a24,_0x48146a(0x1e5)),_0x5fae7a=se(_0x205a24,_0x279a24);let _0x96574f,_0x32ddaf=null;if(_0x279a24[_0x48146a(0x1fe)]&&!O(_0x279a24)&&(_0x205a24===void 0x0||_0x5fae7a)){const _0x2bdf89=await _0x96fca9(_0x279a24['home'],_0x279a24[_0x48146a(0x1fe)]);if(_0x96574f=R(_0x2bdf89,_0x279a24[_0x48146a(0x1fe)],{'api':_0x279a24[_0x48146a(0x24e)],'action':_0x48146a(0x1e5)}),_0x205a24!==void 0x0&&_0x205a24!==_0x96574f[_0x48146a(0x1e9)])throw new Error(_0x48146a(0x20a)+_0x279a24['requestKey']+'\x20was\x20created\x20for\x20a\x20different\x20objective;\x20omit\x20the\x20new\x20objective\x20to\x20resume\x20it');}else{if(_0x5fae7a){if(_0x32ddaf=await P({'api':_0x279a24[_0x48146a(0x24e)],'home':_0x279a24['home'],'objective':_0x205a24,'answers':_0x279a24[_0x48146a(0x24d)],'source':pe(_0x279a24),'github':_0x279a24[_0x48146a(0x182)]===!0x0,'opts':_0x279a24,'loadPlanner':_0x154f0a}),_0x32ddaf[_0x48146a(0x191)]===null){W(_0x32ddaf,_0x48146a(0x1e5),_0x279a24);return;}_0x96574f=_0x32ddaf[_0x48146a(0x191)];}else{const _0x1120b3=_0x279a24[_0x48146a(0x1b9)]?await _0x41f5a5(_0x279a24[_0x48146a(0x1b9)]):void 0x0;_0x96574f=await _0x5d1a0d({'fileInput':_0x1120b3,'objective':_0x205a24,'preset':_0x279a24[_0x48146a(0x259)],'skill':_0x279a24[_0x48146a(0x25d)],'template':_0x279a24['template'],'paths':_0x279a24[_0x48146a(0x1e2)],'repo':_0x279a24[_0x48146a(0x23b)],'commit':_0x279a24[_0x48146a(0x220)],'github':_0x279a24[_0x48146a(0x182)]});}}if(_0x279a24[_0x48146a(0x185)]&&(await _0x2e7447(_0x279a24[_0x48146a(0x185)],_0x96574f),_0x279a24[_0x48146a(0x1f4)]||_0x253e14('saved\x20input:\x20'+_0x279a24['save']+'\x0a')),_0x279a24[_0x48146a(0x21f)]){const _0x372af5=await _0x347c7b(_0x279a24['api'],_0x96574f,_0x48146a(0x1e5));_0x279a24[_0x48146a(0x1f4)]?_0x40216c({'action':_0x48146a(0x1e5),..._0x32ddaf?{'summary':_0x32ddaf[_0x48146a(0x228)],'deliverables':_0x32ddaf['deliverables']}:{},'input':_0x96574f,'check':_0x372af5},_0x279a24):_0x40216c(_0x32ddaf?U(_0x32ddaf,_0x372af5):J(_0x48146a(0x1e5),_0x96574f,_0x372af5),_0x279a24),_0x372af5[_0x48146a(0x1b7)]['length']>0x0&&(process[_0x48146a(0x1bc)]=0x1);return;}_0x32ddaf&&!_0x279a24[_0x48146a(0x1f4)]&&_0x253e14($(_0x32ddaf)+'\x0a');const _0x10489b=await _0x3706aa({'api':_0x279a24[_0x48146a(0x24e)],'home':_0x279a24[_0x48146a(0x189)],'input':_0x96574f,'action':_0x48146a(0x1e5),'requestKey':_0x279a24[_0x48146a(0x1fe)],'plan':_0x32ddaf?{'summary':_0x32ddaf['summary'],'deliverables':_0x32ddaf['deliverables']}:void 0x0,'yes':_0x279a24['yes'],'keyEnv':_0x279a24[_0x48146a(0x245)],'rpc':_0x279a24[_0x48146a(0x1a7)],'paymentChain':_0x279a24[_0x48146a(0x171)]??_0x47fced?.[_0x48146a(0x171)],'payWith':_0x279a24['payWith']??_0x47fced?.[_0x48146a(0x262)],'onProgress':_0x2aaf95(_0x279a24),'retryCommand':_0x40a75c=>ue(_0x40a75c,_0x279a24)});A(_0x10489b,_0x279a24);}),_0x3c66da[_0x561359(0x233)](_0x561359(0x176))['description'](_0x561359(0x229))[_0x561359(0x244)]('--file\x20<path>',_0x561359(0x18d))[_0x561359(0x244)]('--skill\x20<id>','runnable\x20skill\x20id')[_0x561359(0x244)](_0x561359(0x203),_0x561359(0x188))[_0x561359(0x244)](_0x561359(0x260),_0x561359(0x1c1),(_0x17d858,_0x2ef27d)=>[..._0x2ef27d,_0x17d858],[])[_0x561359(0x244)](_0x561359(0x1ad),_0x561359(0x1d1),(_0x3517f2,_0x58f436)=>[..._0x58f436,_0x3517f2],[])[_0x561359(0x244)](_0x561359(0x1d2),'only\x20run\x20the\x20free\x20check\x20and\x20print\x20the\x20input')[_0x561359(0x244)](_0x561359(0x218),_0x561359(0x26d))[_0x561359(0x244)]('--request-key\x20<uuid>',_0x561359(0x1a4))['action'](async(_0x308516,_0x4da877,_0x3cd0f5,_0x5dc8eb)=>{const _0x215cdd=_0x561359,_0x120030=_0x5dc8eb[_0x215cdd(0x1a0)](),_0x1a34e1=_0x120030['dryRun']?null:await x(_0x120030,_0x215cdd(0x223)),_0x526d11=ae(_0x4da877,_0x120030);let _0x33c19a,_0x364b12,_0x4eb4df=null;if(_0x120030[_0x215cdd(0x1fe)]&&!N(_0x120030)&&(_0x4da877===void 0x0||_0x526d11)){const _0x51fd92=await _0x96fca9(_0x120030[_0x215cdd(0x189)],_0x120030[_0x215cdd(0x1fe)]);if(_0x33c19a=R(_0x51fd92,_0x120030[_0x215cdd(0x1fe)],{'api':_0x120030[_0x215cdd(0x24e)],'action':'job.continue'}),_0x33c19a[_0x215cdd(0x200)]!==_0x308516)throw new Error(_0x215cdd(0x20a)+_0x120030[_0x215cdd(0x1fe)]+_0x215cdd(0x194)+(_0x33c19a[_0x215cdd(0x200)]??_0x215cdd(0x18b))+_0x215cdd(0x175)+_0x308516);if(_0x4da877!==void 0x0&&_0x4da877!==_0x33c19a[_0x215cdd(0x1e9)])throw new Error(_0x215cdd(0x20a)+_0x120030[_0x215cdd(0x1fe)]+'\x20was\x20created\x20for\x20a\x20different\x20objective;\x20omit\x20the\x20new\x20objective\x20to\x20resume\x20it');_0x364b12=(await _0x6e1b30(_0x120030[_0x215cdd(0x24e)],_0x215cdd(0x1a5)+encodeURIComponent(_0x308516)))[_0x215cdd(0x1ca)];}else{if(_0x526d11){if(_0x364b12=(await _0x6e1b30(_0x120030[_0x215cdd(0x24e)],_0x215cdd(0x1a5)+encodeURIComponent(_0x308516)))[_0x215cdd(0x1ca)],_0x4eb4df=await P({'api':_0x120030[_0x215cdd(0x24e)],'home':_0x120030[_0x215cdd(0x189)],'objective':_0x4da877,'answers':_0x120030[_0x215cdd(0x24d)],'parent':_0x364b12,'opts':_0x120030,'loadPlanner':_0x154f0a}),_0x4eb4df[_0x215cdd(0x191)]===null){W(_0x4eb4df,'job.continue',_0x120030);return;}_0x33c19a=_0x4eb4df[_0x215cdd(0x191)],_0x33c19a['parentJobId']!==_0x308516&&(_0x33c19a={..._0x33c19a,'parentJobId':_0x308516});}else{const _0x4a9f6b=_0x120030[_0x215cdd(0x1b9)]?await _0x41f5a5(_0x120030['file']):void 0x0;_0x33c19a=await _0x274855({'id':_0x308516,'fileInput':_0x4a9f6b,'objective':_0x4da877,'skill':_0x120030[_0x215cdd(0x25d)],'template':_0x120030[_0x215cdd(0x23c)],'paths':_0x120030['path']}),_0x364b12=(await _0x6e1b30(_0x120030['api'],_0x215cdd(0x1a5)+encodeURIComponent(_0x308516)))['data'];}}if(_0x120030[_0x215cdd(0x185)]&&(await _0x2e7447(_0x120030[_0x215cdd(0x185)],_0x33c19a),_0x120030[_0x215cdd(0x1f4)]||_0x253e14(_0x215cdd(0x231)+_0x120030[_0x215cdd(0x185)]+'\x0a')),_0x120030[_0x215cdd(0x21f)]){const _0xd1bcde=await _0x347c7b(_0x120030[_0x215cdd(0x24e)],_0x33c19a,_0x215cdd(0x223));_0x120030[_0x215cdd(0x1f4)]?_0x40216c({'action':'job.continue',..._0x4eb4df?{'summary':_0x4eb4df[_0x215cdd(0x228)],'deliverables':_0x4eb4df[_0x215cdd(0x219)]}:{},'parent':_0x3bbc3b(_0x364b12),'input':_0x33c19a,'check':_0xd1bcde},_0x120030):_0x40216c(_0x4eb4df?U(_0x4eb4df,_0xd1bcde):J(_0x215cdd(0x223),_0x33c19a,_0xd1bcde,_0x364b12),_0x120030),_0xd1bcde[_0x215cdd(0x1b7)]['length']>0x0&&(process['exitCode']=0x1);return;}_0x4eb4df&&!_0x120030[_0x215cdd(0x1f4)]&&_0x253e14($(_0x4eb4df)+'\x0a');const _0x2ff870=await _0x3706aa({'api':_0x120030[_0x215cdd(0x24e)],'home':_0x120030[_0x215cdd(0x189)],'input':_0x33c19a,'action':_0x215cdd(0x223),'requestKey':_0x120030[_0x215cdd(0x1fe)],'plan':_0x4eb4df?{'summary':_0x4eb4df['summary'],'deliverables':_0x4eb4df[_0x215cdd(0x219)]}:void 0x0,'yes':_0x120030[_0x215cdd(0x1ae)],'keyEnv':_0x120030[_0x215cdd(0x245)],'rpc':_0x120030['rpc'],'paymentChain':_0x120030[_0x215cdd(0x171)]??_0x1a34e1?.[_0x215cdd(0x171)],'payWith':_0x120030[_0x215cdd(0x262)]??_0x1a34e1?.[_0x215cdd(0x262)],'onProgress':_0x2aaf95(_0x120030),'retryCommand':_0x8b24e2=>le(_0x8b24e2,_0x120030)});_0x2ff870[_0x215cdd(0x19c)]&&(_0x2ff870[_0x215cdd(0x19c)]['parent']=_0x3bbc3b(_0x364b12)),A(_0x2ff870,_0x120030);});}export{ge as registerTaskCommands};
@@ -1 +1 @@
1
- const _0x2e2b80=_0x36ab;import{coinAmount as _0x2a0efc,friendlyAmount as _0x328495}from'./payment-coins.mjs';import{PAYMENT_NETWORKS as _0x105c4d,paymentNetwork as _0x4d136d}from'./payment-networks.mjs';const l=_0xb372a=>Object[_0x2e2b80(0x139)](new Error(v(_0xb372a)[_0x2e2b80(0x15a)]('\x0a')),{'code':'funding_required','funding':_0xb372a});function I(_0x52e08c,_0x57217d,_0x16d887,_0x3d6e51){const _0x22751a=_0x2e2b80,_0x49ed5e=_0x4d136d(_0x57217d)['chain'][_0x22751a(0x132)],_0x4edce7={'key':_0x57217d,'chainName':_0x49ed5e,'price':_0x3d6e51?.[_0x22751a(0x14b)],'nativeBalance':_0x3d6e51?.[_0x22751a(0x153)],'options':_0x3d6e51?[{..._0x3d6e51,'funded':!0x1,'shortages':_0x16d887}]:[],'shortages':_0x16d887};return l({'address':_0x52e08c,'network':_0x57217d,'chainName':_0x49ed5e,'shortages':_0x16d887,'networks':[_0x4edce7]});}function w(_0x34173e,_0xa34be5){return l({'address':_0x34173e,'networks':_0xa34be5});}function E(_0x4d30e8){const _0x2f9055=_0x2e2b80;return _0x4d30e8[_0x2f9055(0x142)]??[{'key':_0x4d30e8[_0x2f9055(0x131)],'chainName':_0x4d30e8[_0x2f9055(0x136)],'options':[],'shortages':_0x4d30e8[_0x2f9055(0x13c)]??[]}];}const c=_0x3e683f=>BigInt(_0x3e683f[_0x2e2b80(0x156)])-BigInt(_0x3e683f[_0x2e2b80(0x15b)]),f=_0x5cf106=>(_0x5cf106*0xbn+0x9n)/0xan,u=_0x525854=>(_0x525854[_0x2e2b80(0x152)]??[])['filter'](_0x353b4e=>!_0x353b4e[_0x2e2b80(0x168)]&&_0x353b4e[_0x2e2b80(0x15c)]!==void 0x0);function d(_0x380cc8){const _0x5a6d2b=_0x2e2b80,_0x2b35cf=u(_0x380cc8)[_0x5a6d2b(0x147)](_0x28cfa6=>BigInt(_0x28cfa6[_0x5a6d2b(0x16b)]));if(!_0x2b35cf[_0x5a6d2b(0x138)])return null;const _0x3490cc=_0x2b35cf['reduce']((_0x374987,_0xff59b1)=>_0x374987<_0xff59b1?_0x374987:_0xff59b1),_0x17865b=_0x2b35cf[_0x5a6d2b(0x162)]((_0x2b1b04,_0x32554d)=>_0x2b1b04>_0x32554d?_0x2b1b04:_0x32554d),_0x2c4031=_0x328495(_0x3490cc,_0x5a6d2b(0x12f),{'up':!0x0});return{'low':_0x3490cc,'high':_0x17865b,'text':_0x3490cc===_0x17865b?_0x2c4031:_0x2c4031['replace'](/ ETH$/,'')+_0x5a6d2b(0x14a)+_0x328495(_0x17865b,_0x5a6d2b(0x12f),{'up':!0x0})};}function g(_0xff8099){const _0x97c15e=_0x2e2b80;return(_0xff8099[_0x97c15e(0x133)]===_0x97c15e(0x151)?'':'\u2248\x20')+_0x328495(_0xff8099['payment'],_0xff8099[_0x97c15e(0x133)],{'up':!0x0});}function H(_0x1dad71){const _0xc111d0=_0x2e2b80;if(_0x1dad71['error'])return'\x20\x20'+_0x1dad71[_0xc111d0(0x133)]+_0xc111d0(0x167);const _0x3c9313=_0x1dad71[_0xc111d0(0x13c)]?.[_0xc111d0(0x13f)](_0x1945eb=>_0x1945eb[_0xc111d0(0x133)]===_0x1dad71[_0xc111d0(0x133)]);let _0x44babb='';_0x1dad71[_0xc111d0(0x169)]?_0x44babb=_0xc111d0(0x149):_0x3c9313&&BigInt(_0x3c9313[_0xc111d0(0x15b)])>0x0n?_0x44babb=_0xc111d0(0x161)+_0x328495(c(_0x3c9313),_0x1dad71['coin'],{'up':!0x0})+_0xc111d0(0x159)+(_0x1dad71[_0xc111d0(0x133)]===_0xc111d0(0x12f)?_0xc111d0(0x154):''):_0x1dad71[_0xc111d0(0x133)]!==_0xc111d0(0x12f)&&_0x1dad71['balance']!==null&&_0x1dad71['balance']!==void 0x0&&(_0x44babb='\x20\xB7\x20enough');const _0x2f4d82=_0x1dad71[_0xc111d0(0x15b)]===null||_0x1dad71['balance']===void 0x0?'':'\x20\xB7\x20you\x20have\x20'+_0x328495(_0x1dad71['balance'],_0x1dad71[_0xc111d0(0x133)]);return'\x20\x20'+g(_0x1dad71)+(_0x1dad71[_0xc111d0(0x133)]===_0xc111d0(0x12f)?_0xc111d0(0x144):'')+_0x2f4d82+_0x44babb;}function _0x36ab(_0x3af9a7,_0x47d6e5){_0x3af9a7=_0x3af9a7-0x12f;const _0x36ab51=_0x47d6();let _0xd4d39e=_0x36ab51[_0x3af9a7];return _0xd4d39e;}function m(_0x2c8c52){const _0x3bb3fe=_0x2e2b80,_0x51adbf=u(_0x2c8c52)[_0x3bb3fe(0x14f)](_0x19b038=>_0x19b038[_0x3bb3fe(0x13c)]?.['length']),_0x365347=_0x51adbf[_0x3bb3fe(0x14f)](_0x1f37b2=>_0x1f37b2[_0x3bb3fe(0x133)]!==_0x3bb3fe(0x12f)&&_0x1f37b2[_0x3bb3fe(0x13c)]['every'](_0x4ff268=>_0x4ff268['coin']===_0x3bb3fe(0x12f)))['map'](_0x43f4b4=>({'option':_0x43f4b4,'amount':c(_0x43f4b4[_0x3bb3fe(0x13c)][0x0])}))[_0x3bb3fe(0x13a)]((_0x2b0b1f,_0x43d421)=>_0x2b0b1f[_0x3bb3fe(0x155)]<_0x43d421[_0x3bb3fe(0x155)]?-0x1:_0x2b0b1f[_0x3bb3fe(0x155)]>_0x43d421[_0x3bb3fe(0x155)]?0x1:0x0);if(_0x365347[_0x3bb3fe(0x138)])return _0x3bb3fe(0x14e)+_0x328495(f(_0x365347[0x0][_0x3bb3fe(0x155)]),'ETH',{'up':!0x0})+'\x20for\x20gas,\x20then\x20pay\x20with\x20your\x20'+_0x365347[0x0]['option'][_0x3bb3fe(0x133)]+'.';const _0x8f73fd=_0x51adbf[_0x3bb3fe(0x13f)](_0x3dc7de=>_0x3dc7de[_0x3bb3fe(0x133)]===_0x3bb3fe(0x12f))?.[_0x3bb3fe(0x13c)][_0x3bb3fe(0x13f)](_0x5d34ca=>_0x5d34ca['coin']===_0x3bb3fe(0x12f));return _0x8f73fd?_0x3bb3fe(0x134)+_0x328495(f(c(_0x8f73fd)),_0x3bb3fe(0x12f),{'up':!0x0})+'.\x20ETH\x20covers\x20both\x20the\x20payment\x20and\x20gas.':null;}function _0x47d6(){const _0x9dca93=['ETH','toUpperCase','network','name','coin','Simplest:\x20send\x20about\x20','\x20or\x20','chainName','\x20·\x20not\x20available\x20right\x20now','length','assign','sort','Not\x20enough\x20funds\x20on\x20','shortages','some','\x20\x20Not\x20available\x20right\x20now:\x20','find','\x20and\x20','ETH\x20for\x20gas','networks','unavailable','\x20(+\x20gas\x20from\x20the\x20same\x20ETH)','flatMap','slice','map',':\x20you\x20have\x20','\x20·\x20ready\x20to\x20pay','\x20to\x20','imd','\x20yet.\x20Add\x20funds,\x20then\x20check\x20again.','\x20·\x20gas\x20≈\x20','Quickest:\x20add\x20about\x20','filter','Not\x20enough\x20funds\x20yet.\x20Add\x20funds\x20on\x20either\x20network,\x20then\x20check\x20again.','IMD','options','nativeBalance','\x20incl.\x20gas','amount','required','Payment:','address','\x20more','join','balance','payment','text','Gas,\x20always\x20ETH:\x20≈\x20','chain','Gas\x20·\x20network\x20fee,\x20always\x20paid\x20in\x20ETH:','\x20·\x20need\x20','reduce','Send\x20to\x20your\x20wallet:','The\x20same\x20address\x20works\x20on\x20','\x20·\x20you\x20have\x20','Payment,\x20any\x20one\x20of:\x20','\x20·\x20no\x20exchange\x20route\x20right\x20now','error','funded','\x20·\x20pay\x20with\x20','gas','price'];_0x47d6=function(){return _0x9dca93;};return _0x47d6();}function x(_0x3bcc97){const _0x14e9c1=_0x2e2b80,_0x38c17c=_0x3bcc97[_0x14e9c1(0x13c)][_0x14e9c1(0x13d)](_0x318a30=>_0x318a30['coin']!==_0x14e9c1(0x12f));return _0x3bcc97[_0x14e9c1(0x13c)][_0x14e9c1(0x147)](_0x47d8ae=>'\x20\x20'+(_0x47d8ae[_0x14e9c1(0x133)]==='ETH'&&_0x38c17c?_0x14e9c1(0x141):_0x47d8ae[_0x14e9c1(0x133)])+_0x14e9c1(0x148)+_0x2a0efc(_0x47d8ae['balance'],_0x47d8ae[_0x14e9c1(0x133)])+_0x14e9c1(0x161)+_0x2a0efc(_0x47d8ae[_0x14e9c1(0x156)],_0x47d8ae['coin']));}function b(_0x1f39b5){const _0x47f636=_0x2e2b80,_0x1d2176=_0x1f39b5[_0x47f636(0x136)][_0x47f636(0x130)]()+(_0x1f39b5['price']?'\x20\xB7\x20task\x20price\x20'+_0x328495(_0x1f39b5[_0x47f636(0x16c)],'IMD',{'up':!0x0}):'');if(_0x1f39b5[_0x47f636(0x168)])return[_0x1d2176,_0x47f636(0x13e)+_0x1f39b5['error']];const _0x5244d6=_0x1f39b5['options']??[];if(!_0x5244d6[_0x47f636(0x138)])return[_0x1d2176,...x(_0x1f39b5)];const _0x2e716f=d(_0x1f39b5),_0x15a35f=_0x1f39b5[_0x47f636(0x153)]??_0x5244d6[_0x47f636(0x13f)](_0x16af5c=>_0x16af5c['nativeBalance']!==void 0x0)?.[_0x47f636(0x153)],_0x137802=_0x15a35f===void 0x0?'':_0x47f636(0x165)+_0x328495(_0x15a35f,_0x47f636(0x12f))+(_0x2e716f&&BigInt(_0x15a35f)>=_0x2e716f['high']?'\x20\xB7\x20enough':''),_0x4e8942=m(_0x1f39b5);return[_0x1d2176,_0x5244d6[_0x47f636(0x138)]>0x1?'Payment\x20\xB7\x20pick\x20any\x20one\x20coin:':_0x47f636(0x157),..._0x5244d6['map'](H),_0x47f636(0x160),'\x20\x20'+(_0x2e716f?'\u2248\x20'+_0x2e716f[_0x47f636(0x15d)]:_0x47f636(0x143))+_0x137802,..._0x4e8942?[_0x4e8942]:[]];}function j(_0xc38c4e){const _0x35dbaf=_0x2e2b80,_0x361bd3=u(_0xc38c4e);if(!_0x361bd3[_0x35dbaf(0x138)])return[];const _0x39b2ac=d(_0xc38c4e),_0x37e34d=m(_0xc38c4e);return[_0x35dbaf(0x166)+_0x361bd3[_0x35dbaf(0x147)](g)[_0x35dbaf(0x15a)](_0x35dbaf(0x135)),_0x35dbaf(0x15e)+_0x39b2ac['text'],..._0x37e34d?[_0x37e34d]:[]];}function A(_0x4b6fa9){const _0x20103d=_0x2e2b80;if(_0x4b6fa9[_0x20103d(0x168)])return _0x4b6fa9['chainName']+_0x20103d(0x137);const _0x2f1ff7=(_0x4b6fa9[_0x20103d(0x152)]??[])[_0x20103d(0x14f)](_0x4c584e=>!_0x4c584e['error'])[_0x20103d(0x147)](_0x29bbb3=>_0x29bbb3[_0x20103d(0x133)]),_0x568238=d(_0x4b6fa9),_0x17a18d=_0x2f1ff7[_0x20103d(0x138)]>0x1?_0x2f1ff7[_0x20103d(0x146)](0x0,-0x1)[_0x20103d(0x15a)](',\x20')+_0x20103d(0x135)+_0x2f1ff7['at'](-0x1):_0x2f1ff7[0x0];return _0x4b6fa9['chainName']+(_0x17a18d?_0x20103d(0x16a)+_0x17a18d:'')+(_0x568238?_0x20103d(0x14d)+_0x568238[_0x20103d(0x15d)]:'');}function v(_0x29b9c6){const _0x129fc7=_0x2e2b80,_0x1f86c7=E(_0x29b9c6),_0x3a2fc5=_0x105c4d[_0x129fc7(0x147)](_0x336bb3=>_0x336bb3[_0x129fc7(0x15f)][_0x129fc7(0x132)])[_0x129fc7(0x15a)](_0x129fc7(0x140));return[_0x1f86c7[_0x129fc7(0x138)]>0x1?_0x129fc7(0x150):_0x129fc7(0x13b)+_0x1f86c7[0x0]['chainName']+_0x129fc7(0x14c),'',_0x129fc7(0x163),_0x29b9c6[_0x129fc7(0x158)],_0x129fc7(0x164)+_0x3a2fc5+'.\x20Funds\x20stay\x20on\x20the\x20network\x20they\x20are\x20sent\x20on.','',..._0x1f86c7[_0x129fc7(0x145)](_0x4b3158=>[...b(_0x4b3158),'']),'Prices\x20and\x20fees\x20are\x20estimates.\x20They\x20are\x20checked\x20again\x20before\x20you\x20pay.'];}export{v as fundingInstructions,E as fundingNetworks,I as fundingRequired,w as fundingRequiredOptions,A as networkChoiceLabel,b as networkLines,j as networkTargets,m as quickestFix};
1
+ const _0x32fc2b=_0x4a81;function _0xb990(){const _0x44c03f=['Your\x20wallet:\x20',':\x20you\x20have\x20','balance','join','no\x20coin\x20available\x20right\x20now','\x20(enough)','error','required','map','\x20yet.\x20Add\x20funds,\x20then\x20check\x20again.','slice','Same\x20address\x20on\x20','\x20\x20You\x20have:\x20','Not\x20enough\x20funds\x20on\x20','IMD','Not\x20enough\x20funds\x20yet.\x20Add\x20funds\x20on\x20either\x20network,\x20then\x20check\x20again.','\x20·\x20','\x20(enough\x20for\x20gas)','\x20optional\x20support','replace','\x20and\x20','some','\x20\x20Plus\x20gas\x20(network\x20fee,\x20always\x20ETH):\x20','ETH\x20for\x20gas','\x20Amounts\x20are\x20estimates.','\x20or\x20','imd','support','\x20·\x20pay\x20with\x20','\x20·\x20task\x20price\x20','network','length','assign','\x20\x20Not\x20available\x20right\x20now:\x20','flatMap','\x20·\x20not\x20available\x20right\x20now','find','options','networks','nativeBalance','text','chain','funding_required','name','Pay\x20with\x20any\x20one:\x20','coin','shortages',':\x20no\x20exchange\x20route\x20now)','Payment,\x20any\x20one\x20of:\x20','ETH','reduce','chainName','filter','\x20for\x20gas,\x20then\x20pay\x20with\x20your\x20','sort','payment','option','gas','\x20·\x20gas\x20≈\x20','unavailable','.\x20Funds\x20stay\x20on\x20the\x20network\x20you\x20send\x20them\x20on.','amount','\x20·\x20need\x20','Quickest:\x20add\x20about\x20','\x20to\x20','high','price'];_0xb990=function(){return _0x44c03f;};return _0xb990();}import{coinAmount as _0x43312a,friendlyAmount as _0x17addf}from'./payment-coins.mjs';function _0x4a81(_0x313e8b,_0xb990bf){_0x313e8b=_0x313e8b-0x14b;const _0x4a81aa=_0xb990();let _0x2c418d=_0x4a81aa[_0x313e8b];return _0x2c418d;}import{PAYMENT_NETWORKS as _0x13d4d8,paymentNetwork as _0x53843f}from'./payment-networks.mjs';const d=_0x334ee6=>Object[_0x32fc2b(0x16b)](new Error(A(_0x334ee6)[_0x32fc2b(0x14e)]('\x0a')),{'code':_0x32fc2b(0x175),'funding':_0x334ee6});function O(_0x1ba345,_0x2f4292,_0x1b343a,_0x3f7f2a){const _0x4b1f83=_0x32fc2b,_0x58fc74=_0x53843f(_0x2f4292)[_0x4b1f83(0x174)][_0x4b1f83(0x176)],_0xcecfc7={'key':_0x2f4292,'chainName':_0x58fc74,'price':_0x3f7f2a?.[_0x4b1f83(0x18d)]??_0x3f7f2a?.[_0x4b1f83(0x165)],'support':_0x3f7f2a?.['support'],'nativeBalance':_0x3f7f2a?.['nativeBalance'],'options':_0x3f7f2a?[{..._0x3f7f2a,'funded':!0x1,'shortages':_0x1b343a}]:[],'shortages':_0x1b343a};return d({'address':_0x1ba345,'network':_0x2f4292,'chainName':_0x58fc74,'shortages':_0x1b343a,'networks':[_0xcecfc7]});}function w(_0x44cf50,_0xfe2f69){return d({'address':_0x44cf50,'networks':_0xfe2f69});}function b(_0x511b8f){const _0x5ba1ff=_0x32fc2b;return _0x511b8f[_0x5ba1ff(0x171)]??[{'key':_0x511b8f[_0x5ba1ff(0x169)],'chainName':_0x511b8f['chainName'],'options':[],'shortages':_0x511b8f[_0x5ba1ff(0x179)]??[]}];}const m=_0x407fc4=>BigInt(_0x407fc4[_0x32fc2b(0x152)])-BigInt(_0x407fc4['balance']),y=_0x4f6904=>(_0x4f6904*0xbn+0x9n)/0xan,u=_0x286ae1=>(_0x286ae1['options']??[])['filter'](_0x25853e=>!_0x25853e[_0x32fc2b(0x151)]&&_0x25853e[_0x32fc2b(0x182)]!==void 0x0);function p(_0x6dc605){const _0x228307=_0x32fc2b,_0x21add0=u(_0x6dc605)['map'](_0x29580f=>BigInt(_0x29580f[_0x228307(0x184)]));if(!_0x21add0['length'])return null;const _0x267d8e=_0x21add0['reduce']((_0x5eab13,_0x234796)=>_0x5eab13<_0x234796?_0x5eab13:_0x234796),_0x5c8531=_0x21add0[_0x228307(0x17d)]((_0x3946a3,_0x32182a)=>_0x3946a3>_0x32182a?_0x3946a3:_0x32182a),_0xd49d68=_0x17addf(_0x267d8e,'ETH',{'up':!0x0});return{'low':_0x267d8e,'high':_0x5c8531,'text':_0x267d8e===_0x5c8531?_0xd49d68:_0xd49d68[_0x228307(0x15e)](/ ETH$/,'')+_0x228307(0x18b)+_0x17addf(_0x5c8531,'ETH',{'up':!0x0})};}function E(_0x52d82d){const _0x1941f8=_0x32fc2b;return(_0x52d82d['coin']==='IMD'?'':'\u2248\x20')+_0x17addf(_0x52d82d[_0x1941f8(0x182)],_0x52d82d[_0x1941f8(0x178)],{'up':!0x0});}const l=_0x35e701=>_0x35e701!=null,T=_0x5975f2=>_0x5975f2['funded']||!_0x5975f2[_0x32fc2b(0x179)]?.[_0x32fc2b(0x160)](_0x1ca2ca=>_0x1ca2ca[_0x32fc2b(0x178)]===_0x5975f2['coin']);function B(_0x170346,_0x1dc314){const _0x4bc296=_0x32fc2b,_0x5063c2=u(_0x170346),_0x1323ea=_0x5063c2[_0x4bc296(0x17f)](_0x15fe5b=>_0x15fe5b[_0x4bc296(0x178)]!==_0x4bc296(0x17c)&&l(_0x15fe5b[_0x4bc296(0x14d)]))['map'](_0x208cc2=>_0x17addf(_0x208cc2[_0x4bc296(0x14d)],_0x208cc2[_0x4bc296(0x178)])+(T(_0x208cc2)?_0x4bc296(0x150):'')),_0x5d0e34=_0x5063c2[_0x4bc296(0x16f)](_0x50be9f=>_0x50be9f[_0x4bc296(0x178)]===_0x4bc296(0x17c)),_0x2fda6c=_0x170346[_0x4bc296(0x172)]??_0x5063c2[_0x4bc296(0x16f)](_0x229951=>l(_0x229951[_0x4bc296(0x172)]))?.[_0x4bc296(0x172)];if(l(_0x2fda6c)){let _0x2931ab='';_0x5d0e34&&T(_0x5d0e34)?_0x2931ab=_0x4bc296(0x150):_0x1dc314&&BigInt(_0x2fda6c)>=_0x1dc314[_0x4bc296(0x18c)]&&(_0x2931ab=_0x4bc296(0x15c)),_0x1323ea['push'](_0x17addf(_0x2fda6c,_0x4bc296(0x17c))+_0x2931ab);}return _0x1323ea[_0x4bc296(0x16a)]?_0x4bc296(0x157)+_0x1323ea[_0x4bc296(0x14e)](_0x4bc296(0x15b)):null;}function H(_0x4c7eb9){const _0x5b1d2c=_0x32fc2b,_0x3ce8fe=u(_0x4c7eb9)[_0x5b1d2c(0x17f)](_0x50dda5=>_0x50dda5[_0x5b1d2c(0x179)]?.[_0x5b1d2c(0x16a)]),_0x42b14f=_0x3ce8fe[_0x5b1d2c(0x17f)](_0x5626ef=>_0x5626ef[_0x5b1d2c(0x178)]!==_0x5b1d2c(0x17c)&&_0x5626ef[_0x5b1d2c(0x179)]['every'](_0x5f1fc2=>_0x5f1fc2[_0x5b1d2c(0x178)]===_0x5b1d2c(0x17c)))[_0x5b1d2c(0x153)](_0x5b88c4=>({'option':_0x5b88c4,'amount':m(_0x5b88c4['shortages'][0x0])}))[_0x5b1d2c(0x181)]((_0x22158e,_0x553c7c)=>_0x22158e[_0x5b1d2c(0x188)]<_0x553c7c[_0x5b1d2c(0x188)]?-0x1:_0x22158e[_0x5b1d2c(0x188)]>_0x553c7c['amount']?0x1:0x0);if(_0x42b14f[_0x5b1d2c(0x16a)])return _0x5b1d2c(0x18a)+_0x17addf(y(_0x42b14f[0x0]['amount']),_0x5b1d2c(0x17c),{'up':!0x0})+_0x5b1d2c(0x180)+_0x42b14f[0x0][_0x5b1d2c(0x183)][_0x5b1d2c(0x178)]+'.';const _0x5bb63e=_0x3ce8fe['find'](_0x492a9b=>_0x492a9b[_0x5b1d2c(0x178)]===_0x5b1d2c(0x17c))?.[_0x5b1d2c(0x179)][_0x5b1d2c(0x16f)](_0x204547=>_0x204547[_0x5b1d2c(0x178)]==='ETH');return _0x5bb63e?'Simplest:\x20send\x20about\x20'+_0x17addf(y(m(_0x5bb63e)),_0x5b1d2c(0x17c),{'up':!0x0})+',\x20which\x20covers\x20both\x20the\x20payment\x20and\x20gas.':null;}function I(_0x5a196f){const _0x16042f=_0x32fc2b,_0x779d=_0x5a196f['shortages'][_0x16042f(0x160)](_0x1aeee4=>_0x1aeee4[_0x16042f(0x178)]!=='ETH');return _0x5a196f[_0x16042f(0x179)][_0x16042f(0x153)](_0x2df836=>'\x20\x20'+(_0x2df836[_0x16042f(0x178)]==='ETH'&&_0x779d?_0x16042f(0x162):_0x2df836[_0x16042f(0x178)])+_0x16042f(0x14c)+_0x43312a(_0x2df836[_0x16042f(0x14d)],_0x2df836[_0x16042f(0x178)])+_0x16042f(0x189)+_0x43312a(_0x2df836[_0x16042f(0x152)],_0x2df836[_0x16042f(0x178)]));}function j(_0x4b3652){const _0x3821c7=_0x32fc2b,_0x367fa9=_0x4b3652[_0x3821c7(0x166)]&&BigInt(_0x4b3652['support'])>0x0n?'\x20+\x20'+_0x17addf(_0x4b3652[_0x3821c7(0x166)],_0x3821c7(0x159),{'up':!0x0})+_0x3821c7(0x15d):'',_0x2e0e25=_0x4b3652['chainName']['toUpperCase']()+(_0x4b3652[_0x3821c7(0x18d)]?_0x3821c7(0x168)+_0x17addf(_0x4b3652[_0x3821c7(0x18d)],_0x3821c7(0x159),{'up':!0x0})+_0x367fa9:'');if(_0x4b3652[_0x3821c7(0x151)])return[_0x2e0e25,_0x3821c7(0x16c)+_0x4b3652[_0x3821c7(0x151)]];const _0x1370b2=_0x4b3652[_0x3821c7(0x170)]??[];if(!_0x1370b2[_0x3821c7(0x16a)])return[_0x2e0e25,...I(_0x4b3652)];const _0x243724=u(_0x4b3652)[_0x3821c7(0x181)]((_0x4f27cc,_0xc22302)=>(_0x4f27cc['coin']===_0x3821c7(0x17c))-(_0xc22302[_0x3821c7(0x178)]===_0x3821c7(0x17c))),_0x4b5666=p(_0x4b3652),_0x5b645a=_0x1370b2[_0x3821c7(0x17f)](_0xce4bda=>_0xce4bda[_0x3821c7(0x151)])['map'](_0x54c86b=>_0x54c86b[_0x3821c7(0x178)]),_0x45b016=H(_0x4b3652),_0x1d61ec=B(_0x4b3652,_0x4b5666);return[_0x2e0e25,'\x20\x20'+(_0x243724[_0x3821c7(0x16a)]>0x1?_0x3821c7(0x177):'Pay:\x20')+(_0x243724[_0x3821c7(0x153)](E)[_0x3821c7(0x14e)](_0x3821c7(0x164))||_0x3821c7(0x14f))+(_0x5b645a[_0x3821c7(0x16a)]?'\x20('+_0x5b645a[_0x3821c7(0x14e)](',\x20')+_0x3821c7(0x17a):''),_0x3821c7(0x161)+(_0x4b5666?'\u2248\x20'+_0x4b5666[_0x3821c7(0x173)]:_0x3821c7(0x186)),..._0x1d61ec?[_0x1d61ec]:[],..._0x45b016?['\x20\x20'+_0x45b016]:[]];}function L(_0x5e8bb3){const _0x264e33=_0x32fc2b,_0x35c18f=u(_0x5e8bb3)['sort']((_0x553b97,_0x432f4f)=>(_0x553b97[_0x264e33(0x178)]==='ETH')-(_0x432f4f[_0x264e33(0x178)]==='ETH'));if(!_0x35c18f[_0x264e33(0x16a)])return[];const _0x776477=p(_0x5e8bb3),_0x11bd30=H(_0x5e8bb3);return[_0x264e33(0x17b)+_0x35c18f[_0x264e33(0x153)](E)[_0x264e33(0x14e)]('\x20or\x20'),'Gas,\x20always\x20ETH:\x20\u2248\x20'+_0x776477[_0x264e33(0x173)],..._0x11bd30?[_0x11bd30]:[]];}function R(_0x5b4138){const _0x4a9133=_0x32fc2b;if(_0x5b4138['error'])return _0x5b4138['chainName']+_0x4a9133(0x16e);const _0x16b0aa=(_0x5b4138[_0x4a9133(0x170)]??[])[_0x4a9133(0x17f)](_0x589cd3=>!_0x589cd3[_0x4a9133(0x151)])[_0x4a9133(0x153)](_0x4906cf=>_0x4906cf['coin']),_0x44a975=p(_0x5b4138),_0x51d090=_0x16b0aa['length']>0x1?_0x16b0aa[_0x4a9133(0x155)](0x0,-0x1)['join'](',\x20')+_0x4a9133(0x164)+_0x16b0aa['at'](-0x1):_0x16b0aa[0x0];return _0x5b4138[_0x4a9133(0x17e)]+(_0x51d090?_0x4a9133(0x167)+_0x51d090:'')+(_0x44a975?_0x4a9133(0x185)+_0x44a975[_0x4a9133(0x173)]:'');}function A(_0xf5429f){const _0x1f65ff=_0x32fc2b,_0x4a89a0=b(_0xf5429f),_0x4fc5d8=_0x13d4d8[_0x1f65ff(0x153)](_0xb0cd20=>_0xb0cd20[_0x1f65ff(0x174)][_0x1f65ff(0x176)])[_0x1f65ff(0x14e)](_0x1f65ff(0x15f));return[(_0x4a89a0[_0x1f65ff(0x16a)]>0x1?_0x1f65ff(0x15a):_0x1f65ff(0x158)+_0x4a89a0[0x0]['chainName']+_0x1f65ff(0x154))+_0x1f65ff(0x163),_0x1f65ff(0x14b)+_0xf5429f['address'],_0x1f65ff(0x156)+_0x4fc5d8+_0x1f65ff(0x187),..._0x4a89a0[_0x1f65ff(0x16d)](_0x430f80=>['',...j(_0x430f80)]),..._0x4a89a0[_0x1f65ff(0x160)](_0x38b9de=>_0x38b9de[_0x1f65ff(0x166)]&&BigInt(_0x38b9de[_0x1f65ff(0x166)])>0x0n)?['','Includes\x20the\x20optional\x2010%\x20support.\x20Choose\x20Original\x20price\x20when\x20asked\x20to\x20pay\x20only\x20the\x20task\x20price.']:[]];}export{A as fundingInstructions,b as fundingNetworks,O as fundingRequired,w as fundingRequiredOptions,R as networkChoiceLabel,j as networkLines,L as networkTargets,H as quickestFix};
@@ -1 +1 @@
1
- const _0x4b176e=_0x48a1;import{decodeFunctionData as _0x3c1a99,encodeFunctionData as _0x313d52,erc20Abi as _0x390069,EstimateGasExecutionError as _0x4aee4f,formatEther as _0x416856,keccak256 as _0x17dfd9}from'viem';import{getPublicRpcClient as _0x545f70,getRpcClients as _0x1e6a7d,getSigner as _0x222eba}from'../shared.mjs';import{paymentCoin as _0xa4fe3}from'./payment-coins.mjs';function _0x4035(){const _0x556cf1=['chain','min','quotedInput','payment','\x20cannot\x20currently\x20execute.\x20No\x20new\x20transaction\x20was\x20signed.\x20Any\x20completed\x20steps\x20remain\x20saved\x20in\x20this\x20order.','home','approve_source','spender','transactionHash','push','ETH','requestKey','swap','now','maxPriorityFeePerGas','optional\x20support\x20transfer','expectedWallet','throwIfAborted','Refreshing\x20the\x20payment\x20review.\x20No\x20new\x20transaction\x20was\x20signed.','amountIn','maxFeePerGas','configured','token\x20authorization','length','paymentChain','status','toLowerCase','...','asset','ethereum','.\x20No\x20replacement\x20swap\x20will\x20be\x20made\x20for\x20this\x20order.','The\x20support\x20transfer','checking_funds','floor','replacementNonce','amount','pendingTransaction','payment_review_expired','confirmedHash','symbol','robinhood','transfer','address','data','assign','allowance','reverted','gas','args','account','kind','expiresAt','Checking\x20balances,\x20current\x20exchange\x20rate\x20and\x20network\x20fees...','approve','support','value','The\x20','rawTransaction','estimateGas','steps','reduce','IMD','all','feeCap','filter','signTransaction','readContract','Create\x20or\x20import\x20a\x20wallet\x20in\x20Wallets\x20before\x20paying.','\x20transaction\x20reverted:\x20','reset_source_allowance','The\x20saved\x20swap\x20has\x20finished,\x20but\x20this\x20wallet\x20no\x20longer\x20has\x20enough\x20IMD.\x20No\x20additional\x20swap\x20was\x20made.','The\x20swap\x20quote','funding','IMD\x20payment\x20asset\x20differs\x20from\x20the\x20selected\x20network.','success','quote','.\x20Your\x20order\x20was\x20not\x20paid.','USDT','confirmed','signal','action','Preparing\x20','hash','payWith','Resume\x20funding\x20with\x20the\x20same\x20wallet\x20that\x20started\x20this\x20order.','Required\x20network\x20fees\x20exceed\x20the\x20reviewed\x20cap.\x20No\x20new\x20transaction\x20was\x20signed.'];_0x4035=function(){return _0x556cf1;};return _0x4035();}import{paymentNetwork as _0x4afc43}from'./payment-networks.mjs';import{assertQuotePayment as _0x28eebc,orderPayment as _0x797c50,loadPaymentConfig as _0x8d0dd3}from'./payments.mjs';import{assertOrderNotCancelled as _0x5c1a13,findOrder as _0x284bd5,saveOrder as _0x54e44e}from'./orders.mjs';import{quoteSwap as _0x288317,buildSwap as _0x3dc24b,UNISWAP as _0x241032,APPROVAL_GAS as _0x3f9dd6,SWAP_ABI as _0x4e1a3c}from'./swaps.mjs';function _0x48a1(_0x10fa52,_0x4035e1){_0x10fa52=_0x10fa52-0xeb;const _0x48a185=_0x4035();let _0x321b80=_0x48a185[_0x10fa52];return _0x321b80;}import{submitTransaction as _0x37456e}from'./transactions.mjs';import{fundingRequired as _0x32f6bf}from'./funding-error.mjs';import{walletInfo as _0x16f475}from'./local-wallet.mjs';import{transactionFees as _0x1312f8,reviewedFees as _0x33b47f}from'./transaction-fees.mjs';import{resumeTransaction as _0x320913,recoveryNonce as _0x56f787,retireExpiredSwap as _0x33c04b}from'./transaction-recovery.mjs';const be=0x7a120n,N=(_0x408d1a,_0x6e0522,_0x518096)=>_0x408d1a[_0x4b176e(0x12d)]({'address':_0x6e0522,'abi':_0x390069,'functionName':'balanceOf','args':[_0x518096]}),Q=(_0x1edb38,_0x4f08d6,_0x682ab1,_0x48a4ce)=>_0x1edb38[_0x4b176e(0x12d)]({'address':_0x4f08d6,'abi':_0x390069,'functionName':_0x4b176e(0x118),'args':[_0x682ab1,_0x48a4ce]}),H=(_0x30b1b5,_0x30cfa1,_0x430c72,_0x272e2b)=>({'kind':_0x30b1b5,'to':_0x30cfa1,'value':'0','gas':String(_0x3f9dd6),'data':_0x313d52({'abi':_0x390069,'functionName':_0x4b176e(0x120),'args':[_0x430c72,_0x272e2b]})});async function ye(_0x291e17,_0x4455f7,_0x29d79c,_0x4939f7,_0x550a4a){const _0x1af096=_0x4b176e,{funding:_0x2a1514,shortages:_0x2231f5,requirement:_0x139b79}=await ve(_0x291e17,_0x4455f7,_0x29d79c,_0x4939f7,_0x550a4a);if(_0x2231f5[_0x1af096(0x102)])throw _0x32f6bf(_0x4939f7[_0x1af096(0x115)],_0x291e17[_0x1af096(0x103)]??_0x1af096(0x108),_0x2231f5,_0x139b79);return _0x2a1514;}async function ve(_0x299972,_0x22320a,_0x164d9f,_0x350421,_0x75593){const _0x4d614b=_0x4b176e,_0x3786f7=_0x299972['paymentChain']??_0x4d614b(0x108),_0x38d735=_0xa4fe3(_0x3786f7,_0x299972[_0x4d614b(0x13e)]),_0x4e7aae=_0x75593??await _0x8d0dd3(_0x22320a['api'],_0x299972[_0x4d614b(0x13b)],_0x3786f7,_0x22320a),_0x524dae=_0x75593?_0x75593[_0x4d614b(0xee)]:_0x797c50(_0x299972);if(_0x28eebc(_0x524dae),_0x524dae['asset'][_0x4d614b(0x105)]()!==_0x4e7aae[_0x4d614b(0xee)][_0x4d614b(0x107)][_0x4d614b(0x105)]())throw new Error(_0x4d614b(0x134));const _0xc37538=BigInt(_0x524dae[_0x4d614b(0x10e)]),[_0xbffac3,_0x2c8f39,_0x48a4e9]=await Promise[_0x4d614b(0x129)]([Q(_0x164d9f,_0x524dae['asset'],_0x350421['address'],_0x4e7aae[_0x4d614b(0xf2)]),_0x164d9f['getBalance']({'address':_0x350421[_0x4d614b(0x115)]}),_0x1312f8(_0x164d9f,_0x4afc43(_0x3786f7)[_0x4d614b(0xeb)]['id'])]),_0x578627=(_0x299972[_0x4d614b(0x133)]?.[_0x4d614b(0x126)]??[])[_0x4d614b(0x12b)](_0x309921=>_0x309921[_0x4d614b(0x104)]==='confirmed');let _0x5f00e2=0x0n,_0x5654f2=0x0n;for(const _0x4295a2 of _0x578627)if(_0x4295a2[_0x4d614b(0x11d)]===_0x4d614b(0xf7)){const _0x50b503=_0x3c1a99({'abi':_0x4e1a3c,'data':_0x4295a2[_0x4d614b(0x116)]});_0x5f00e2+=_0x3c1a99({'abi':_0x4e1a3c,'data':_0x50b503[_0x4d614b(0x11b)][0x1][0x0]})[_0x4d614b(0x11b)][0x0]['amountOut'];}else _0x4295a2['kind']===_0x4d614b(0x121)&&(_0x5654f2+=_0x3c1a99({'abi':_0x390069,'data':_0x4295a2[_0x4d614b(0x116)]})[_0x4d614b(0x11b)][0x1]);const _0x4c18fc=BigInt(_0x299972['support']?.[_0x4d614b(0x10e)]??0x0)-_0x5654f2,_0x334810=_0xc37538+_0x4c18fc,_0xea92db=_0x241032[_0x3786f7]['router'],_0x1f1316=_0x3786f7===_0x4d614b(0x113)?be:0x0n,_0x5793a9=_0x4c18fc>0x0n?0x186a0n:0x0n,_0x3bca4a=_0x1f1316+_0x5793a9+(_0xbffac3<_0xc37538?_0x3f9dd6:0x0n),_0x433d65=[],_0x29477c=[];let _0x2af11b;const _0x38f18c=Math[_0x4d614b(0xec)](Number(_0x299972[_0x4d614b(0x136)][_0x4d614b(0x11e)]),Math[_0x4d614b(0x10c)](Date[_0x4d614b(0xf8)]()/0x3e8)+0x12c);let _0x4fc833=_0x38d735[_0x4d614b(0x112)]===_0x4d614b(0xf5)?_0x2c8f39:null;if(_0x38d735['symbol']===_0x4d614b(0x128)){const _0x1f2d08=await N(_0x164d9f,_0x524dae[_0x4d614b(0x107)],_0x350421[_0x4d614b(0x115)]);_0x4fc833=_0x1f2d08,_0x1f2d08<_0x334810&&_0x29477c[_0x4d614b(0xf4)]({'coin':_0x4d614b(0x128),'balance':String(_0x1f2d08),'required':String(_0x334810)});}const _0x57e00a=_0x5f00e2>_0x5654f2?_0x5f00e2-_0x5654f2:0x0n,_0x18737b=_0x334810>_0x57e00a?_0x334810-_0x57e00a:0x0n;if(_0x57e00a>0x0n){const _0x2b7ee5=await N(_0x164d9f,_0x524dae[_0x4d614b(0x107)],_0x350421[_0x4d614b(0x115)]),_0x5ceb8b=_0x334810<_0x57e00a?_0x334810:_0x57e00a;_0x2b7ee5<_0x5ceb8b&&_0x29477c[_0x4d614b(0xf4)]({'coin':'IMD','balance':String(_0x2b7ee5),'required':String(_0x5ceb8b)});}if(_0x38d735[_0x4d614b(0x112)]!==_0x4d614b(0x128)&&_0x18737b>0x0n){const _0x39c1ec=_0x38d735['symbol']===_0x4d614b(0xf5)?0x0n:await Q(_0x164d9f,_0x38d735[_0x4d614b(0x115)],_0x350421[_0x4d614b(0x115)],_0xea92db);_0x2af11b=await _0x288317(_0x3786f7,_0x38d735,_0x18737b,{'client':_0x164d9f,'maxFeePerGas':_0x48a4e9['maxFeePerGas'],'sourceAllowance':_0x39c1ec,'fixedGas':_0x3bca4a,'signal':_0x22320a[_0x4d614b(0x13a)]});const _0x208cb9=BigInt(_0x2af11b[_0x4d614b(0xfe)]);if(_0x38d735[_0x4d614b(0x112)]!==_0x4d614b(0xf5)){const _0x272b98=await N(_0x164d9f,_0x38d735[_0x4d614b(0x115)],_0x350421[_0x4d614b(0x115)]);_0x4fc833=_0x272b98;const _0x5dd064=_0x39c1ec;_0x272b98<_0x208cb9&&_0x29477c[_0x4d614b(0xf4)]({'coin':_0x38d735[_0x4d614b(0x112)],'balance':String(_0x272b98),'required':String(_0x208cb9)}),_0x5dd064<_0x208cb9&&(_0x38d735['symbol']===_0x4d614b(0x138)&&_0x5dd064>0x0n&&_0x433d65['push'](H(_0x4d614b(0x130),_0x38d735[_0x4d614b(0x115)],_0xea92db,0x0n)),_0x433d65[_0x4d614b(0xf4)](H(_0x4d614b(0xf1),_0x38d735['address'],_0xea92db,_0x208cb9)));}const _0x24f6a1=_0x3dc24b(_0x3786f7,_0x38d735,_0x2af11b,_0x18737b,_0x350421[_0x4d614b(0x115)],_0x38f18c);_0x433d65['push']({'kind':_0x4d614b(0xf7),..._0x24f6a1,'gas':String(_0x2af11b[_0x4d614b(0x11a)]),'expiresAt':_0x38f18c});}_0xbffac3<_0xc37538&&_0x433d65[_0x4d614b(0xf4)](H('approve_imd',_0x524dae['asset'],_0x4e7aae[_0x4d614b(0xf2)],_0xc37538)),_0x4c18fc>0x0n&&_0x433d65['push']({'kind':'support','to':_0x524dae[_0x4d614b(0x107)],'value':'0','gas':String(_0x5793a9),'data':_0x313d52({'abi':_0x390069,'functionName':_0x4d614b(0x114),'args':[_0x299972[_0x4d614b(0x121)]['recipient'],_0x4c18fc]})});const _0x253f1a=_0x433d65[_0x4d614b(0x127)]((_0x144f0c,_0x5cbea6)=>_0x144f0c+BigInt(_0x5cbea6[_0x4d614b(0x11a)]),_0x1f1316)*_0x48a4e9['maxFeePerGas'],_0x127ced=_0x38d735[_0x4d614b(0x112)]===_0x4d614b(0x128)?_0x334810:BigInt(_0x2af11b?.['amountIn']??0x0),_0x116863=_0x127ced+(_0x38d735['symbol']===_0x4d614b(0xf5)?_0x253f1a:0x0n),_0x36b322=_0x253f1a+(_0x38d735[_0x4d614b(0x112)]===_0x4d614b(0xf5)?_0x127ced:0x0n);_0x2c8f39<_0x36b322&&_0x29477c['push']({'coin':_0x4d614b(0xf5),'balance':String(_0x2c8f39),'required':String(_0x36b322)});const _0x136796={'coin':_0x38d735[_0x4d614b(0x112)],'imd':String(_0x334810),'payment':String(_0x127ced),'estimate':String(_0x38d735[_0x4d614b(0x112)]==='IMD'?_0x334810:_0x2af11b?.[_0x4d614b(0xed)]??0x0),'gas':String(_0x253f1a),'balance':_0x4fc833===null?null:String(_0x4fc833),'nativeBalance':String(_0x2c8f39)};return{'shortages':_0x29477c,'requirement':_0x136796,'funding':{'chainId':_0x4afc43(_0x3786f7)[_0x4d614b(0xeb)]['id'],'account':_0x350421['address'],'coin':_0x38d735[_0x4d614b(0x112)],'amountIn':String(_0x127ced),'minimumOut':String(_0x334810),'maximumDebit':String(_0x116863),'quotedInput':String(_0x38d735[_0x4d614b(0x112)]===_0x4d614b(0x128)?_0x334810:_0x2af11b?.[_0x4d614b(0xed)]??0x0),..._0x2af11b?{'slippageBps':_0x2af11b['slippageBps']}:{},'feeCap':String(_0x253f1a),'maxFeePerGas':String(_0x48a4e9[_0x4d614b(0xff)]),'maxPriorityFeePerGas':String(_0x48a4e9[_0x4d614b(0xf9)]),'paymentGas':String(_0x1f1316),'expiresAt':_0x38f18c,'steps':[..._0x578627,..._0x433d65]}};}async function Be(_0x43fc06,_0x4d18e1,_0x5161e1){const _0x2729bf=_0x4b176e,_0x4f10c6=_0x4afc43(_0x43fc06['paymentChain']??'ethereum')['chain']['id'],_0x3f3d17=_0x16f475(_0x4d18e1);if(!_0x3f3d17[_0x2729bf(0x100)])throw new Error(_0x2729bf(0x12e));if(_0x4d18e1[_0x2729bf(0xfb)]&&_0x4d18e1[_0x2729bf(0xfb)]['toLowerCase']()!==_0x3f3d17['address'][_0x2729bf(0x105)]())throw new Error('Payment\x20wallet\x20changed.\x20Review\x20this\x20task\x20with\x20the\x20selected\x20wallet\x20before\x20paying.');const _0x567664=await _0x545f70(_0x4d18e1,_0x4f10c6);if(_0x43fc06['funding']&&_0x43fc06[_0x2729bf(0x133)][_0x2729bf(0x11c)][_0x2729bf(0x105)]()!==_0x3f3d17[_0x2729bf(0x115)][_0x2729bf(0x105)]())throw new Error(_0x2729bf(0x13f));for(const _0x2b209a of _0x43fc06[_0x2729bf(0x133)]?.[_0x2729bf(0x126)]??[]){if(_0x2b209a[_0x2729bf(0x124)]&&_0x2b209a[_0x2729bf(0x104)]!==_0x2729bf(0x139)&&await _0x33c04b(_0x43fc06,_0x2b209a,_0x567664,_0x4d18e1))continue;if(_0x2b209a[_0x2729bf(0x104)]==='reverted')throw new Error(_0x2729bf(0x123)+_0x2b209a[_0x2729bf(0x11d)]+'\x20transaction\x20reverted:\x20'+_0x2b209a[_0x2729bf(0x13d)]+_0x2729bf(0x109));if(!_0x2b209a[_0x2729bf(0x124)]||_0x2b209a[_0x2729bf(0x104)]===_0x2729bf(0x139))continue;const _0x4fce07=await _0x320913(_0x43fc06,_0x2b209a,_0x567664,_0x4d18e1);if(_0x2b209a[_0x2729bf(0x104)]=_0x4fce07[_0x2729bf(0x104)]===_0x2729bf(0x135)?_0x2729bf(0x139):_0x2729bf(0x119),_0x2b209a[_0x2729bf(0x111)]=_0x4fce07['transactionHash'],delete _0x43fc06[_0x2729bf(0x10f)],await _0x54e44e(_0x4d18e1[_0x2729bf(0xf0)],_0x43fc06),_0x2b209a[_0x2729bf(0x104)]===_0x2729bf(0x119))throw new Error(_0x2729bf(0x123)+_0x2b209a[_0x2729bf(0x11d)]+'\x20transaction\x20reverted:\x20'+_0x2b209a['hash']+_0x2729bf(0x109));}_0x4d18e1['onProgress']?.({'phase':_0x2729bf(0x10b),'message':_0x2729bf(0x11f)}),_0x43fc06[_0x2729bf(0x133)]=await ye(_0x43fc06,_0x4d18e1,_0x567664,_0x3f3d17);const _0x5c3d8a=_0x43fc06[_0x2729bf(0x133)];_0x43fc06['paymentReview']={'networkFeeCap':_0x416856(BigInt(_0x5c3d8a[_0x2729bf(0x12a)]))},await _0x5161e1(_0x43fc06),_0x4d18e1[_0x2729bf(0x13a)]?.[_0x2729bf(0xfc)](),_0x5c1a13(await _0x284bd5(_0x4d18e1[_0x2729bf(0xf0)],_0x43fc06[_0x2729bf(0xf6)])),await _0x54e44e(_0x4d18e1[_0x2729bf(0xf0)],_0x43fc06);const {walletClient:_0x4b8cd3,account:_0x8ebd3f}=await _0x1e6a7d({..._0x4d18e1,'expectedWallet':_0x3f3d17[_0x2729bf(0x115)]},_0x4f10c6);if(_0x4d18e1[_0x2729bf(0x13a)]?.[_0x2729bf(0xfc)](),_0x5c1a13(await _0x284bd5(_0x4d18e1[_0x2729bf(0xf0)],_0x43fc06[_0x2729bf(0xf6)])),_0x5c3d8a[_0x2729bf(0x11e)]*0x3e8<=Date[_0x2729bf(0xf8)]())throw Object[_0x2729bf(0x117)](new Error(_0x2729bf(0xfd)),{'code':'payment_review_expired'});for(const _0x2c3375 of _0x5c3d8a[_0x2729bf(0x126)]){if(_0x2c3375['status']===_0x2729bf(0x139))continue;if(_0x2c3375[_0x2729bf(0x104)]==='reverted')throw new Error(_0x2729bf(0x123)+_0x2c3375['kind']+_0x2729bf(0x12f)+_0x2c3375[_0x2729bf(0x13d)]+_0x2729bf(0x109));if(!_0x2c3375[_0x2729bf(0x124)]){if(_0x5c3d8a['expiresAt']*0x3e8<=Date[_0x2729bf(0xf8)]())throw Object[_0x2729bf(0x117)](new Error(_0x2729bf(0xfd)),{'code':_0x2729bf(0x110)});const _0x4d2668=_0x33b47f(await _0x1312f8(_0x567664,_0x4f10c6),_0x5c3d8a);_0x4d18e1['onProgress']?.({'phase':'signing','message':_0x2729bf(0x13c)+(_0x2c3375[_0x2729bf(0x11d)]==='swap'?'coin\x20conversion':_0x2c3375[_0x2729bf(0x11d)]===_0x2729bf(0x121)?_0x2729bf(0xfa):_0x2729bf(0x101))+_0x2729bf(0x106)});const _0x1846a7={'account':_0x8ebd3f,'to':_0x2c3375['to'],'data':_0x2c3375[_0x2729bf(0x116)],'value':BigInt(_0x2c3375[_0x2729bf(0x122)]),..._0x4d2668};let _0x1ccbaf;try{_0x1ccbaf=await _0x567664[_0x2729bf(0x125)](_0x1846a7);}catch(_0x4cf859){throw _0x4cf859 instanceof _0x4aee4f?new Error((_0x2c3375[_0x2729bf(0x11d)]===_0x2729bf(0xf7)?_0x2729bf(0x132):_0x2c3375[_0x2729bf(0x11d)]===_0x2729bf(0x121)?_0x2729bf(0x10a):'The\x20token\x20authorization')+_0x2729bf(0xef),{'cause':_0x4cf859}):_0x4cf859;}if(_0x1ccbaf>BigInt(_0x2c3375[_0x2729bf(0x11a)]))throw new Error(_0x2729bf(0x140));const _0x3ba486=await _0x4b8cd3['prepareTransactionRequest']({..._0x1846a7,'gas':BigInt(_0x2c3375['gas']),'nonce':await _0x56f787(_0x43fc06,_0x567664,_0x8ebd3f[_0x2729bf(0x115)])});if(await _0x222eba({..._0x4d18e1,'expectedWallet':_0x8ebd3f[_0x2729bf(0x115)]}),_0x4d18e1[_0x2729bf(0x13a)]?.[_0x2729bf(0xfc)](),_0x5c1a13(await _0x284bd5(_0x4d18e1[_0x2729bf(0xf0)],_0x43fc06[_0x2729bf(0xf6)])),_0x5c3d8a[_0x2729bf(0x11e)]*0x3e8<=Date[_0x2729bf(0xf8)]())throw Object[_0x2729bf(0x117)](new Error(_0x2729bf(0xfd)),{'code':_0x2729bf(0x110)});Object['assign'](_0x3ba486,_0x33b47f(await _0x1312f8(_0x567664,_0x4f10c6),_0x5c3d8a)),_0x2c3375[_0x2729bf(0x124)]=await _0x4b8cd3[_0x2729bf(0x12c)](_0x3ba486),_0x2c3375[_0x2729bf(0x13d)]=_0x17dfd9(_0x2c3375['rawTransaction']),_0x2c3375[_0x2729bf(0x104)]='signed',delete _0x43fc06[_0x2729bf(0x10d)],_0x43fc06[_0x2729bf(0x104)]=_0x2729bf(0x133),await _0x54e44e(_0x4d18e1[_0x2729bf(0xf0)],_0x43fc06);}const _0x738eff=await _0x37456e(_0x567664,_0x2c3375,_0x4d18e1);if(_0x2c3375[_0x2729bf(0x104)]=_0x738eff[_0x2729bf(0x104)]===_0x2729bf(0x135)?_0x2729bf(0x139):_0x2729bf(0x119),_0x2c3375['confirmedHash']=_0x738eff[_0x2729bf(0xf3)],delete _0x43fc06[_0x2729bf(0x10f)],await _0x54e44e(_0x4d18e1[_0x2729bf(0xf0)],_0x43fc06),_0x2c3375[_0x2729bf(0x104)]===_0x2729bf(0x119))throw new Error(_0x2729bf(0x123)+_0x2c3375[_0x2729bf(0x11d)]+_0x2729bf(0x12f)+_0x2c3375['hash']+_0x2729bf(0x137));}const _0x57c0b0=_0x797c50(_0x43fc06);if(await N(_0x567664,_0x57c0b0[_0x2729bf(0x107)],_0x8ebd3f[_0x2729bf(0x115)])<BigInt(_0x57c0b0['amount']))throw new Error(_0x2729bf(0x131));_0x5c1a13(await _0x284bd5(_0x4d18e1[_0x2729bf(0xf0)],_0x43fc06[_0x2729bf(0xf6)])),_0x5c3d8a[_0x2729bf(0x104)]='ready',await _0x54e44e(_0x4d18e1[_0x2729bf(0xf0)],_0x43fc06);}export{Be as fundOrder,ve as planFunding,ye as prepareFunding};
1
+ const _0x35fbd5=_0x4783;function _0x14da(){const _0x4d5746=['pendingTransaction','payment_review_expired','hash','onProgress','feeCap','chain','robinhood','spender','prepareTransactionRequest','.\x20Your\x20order\x20was\x20not\x20paid.','ready','The\x20support\x20transfer','status','gas','coin\x20conversion','min','...','paymentChain','signTransaction','maxPriorityFeePerGas','value','transfer','assign','payment','amountOut','slippageBps','quotedInput','signed','Required\x20network\x20fees\x20exceed\x20the\x20reviewed\x20cap.\x20No\x20new\x20transaction\x20was\x20signed.','The\x20','\x20transaction\x20reverted:\x20','confirmedHash','args','The\x20token\x20authorization','IMD\x20payment\x20asset\x20differs\x20from\x20the\x20selected\x20network.','Refreshing\x20the\x20payment\x20review.\x20No\x20new\x20transaction\x20was\x20signed.','length','throwIfAborted','optional\x20support\x20transfer','Preparing\x20','approve_imd','home','ETH','signal','approve','action','all','Payment\x20wallet\x20changed.\x20Review\x20this\x20task\x20with\x20the\x20selected\x20wallet\x20before\x20paying.','quote','expiresAt','success','push','configured','maxFeePerGas','expectedWallet','now','symbol','ethereum','Checking\x20balances,\x20current\x20exchange\x20rate\x20and\x20network\x20fees...','IMD','The\x20saved\x20swap\x20has\x20finished,\x20but\x20this\x20wallet\x20no\x20longer\x20has\x20enough\x20IMD.\x20No\x20additional\x20swap\x20was\x20made.','reverted','getBalance','.\x20No\x20replacement\x20swap\x20will\x20be\x20made\x20for\x20this\x20order.','USDT','rawTransaction','requestKey','swap','approve_source','transactionHash','funding','confirmed','asset','toLowerCase','floor','router','filter','amount','support','kind','reset_source_allowance','amountIn','The\x20swap\x20quote','replacementNonce','signing','address','data','api','steps','\x20cannot\x20currently\x20execute.\x20No\x20new\x20transaction\x20was\x20signed.\x20Any\x20completed\x20steps\x20remain\x20saved\x20in\x20this\x20order.'];_0x14da=function(){return _0x4d5746;};return _0x14da();}import{decodeFunctionData as _0xea4bc7,encodeFunctionData as _0x147fc7,erc20Abi as _0x1c44ef,EstimateGasExecutionError as _0x1ae311,formatEther as _0x6f11b2,keccak256 as _0x2007a7}from'viem';import{getPublicRpcClient as _0x581e7d,getRpcClients as _0x24e488,getSigner as _0xa34bba}from'../shared.mjs';import{paymentCoin as _0x1b1ff1}from'./payment-coins.mjs';import{paymentNetwork as _0x2de524}from'./payment-networks.mjs';import{assertQuotePayment as _0x1a9fc8,orderPayment as _0x11416a,loadPaymentConfig as _0x2dfc5d}from'./payments.mjs';import{assertOrderNotCancelled as _0x212344,findOrder as _0x2cfba5,saveOrder as _0x25ac23}from'./orders.mjs';import{quoteSwap as _0x1c9820,buildSwap as _0x9ab358,UNISWAP as _0x1bd057,APPROVAL_GAS as _0x8abe36,SWAP_ABI as _0x16cc0b}from'./swaps.mjs';import{submitTransaction as _0x5adafa}from'./transactions.mjs';import{fundingRequired as _0x5004bb}from'./funding-error.mjs';import{walletInfo as _0x36db5d}from'./local-wallet.mjs';function _0x4783(_0x29a36d,_0x14da17){_0x29a36d=_0x29a36d-0x1dd;const _0x4783bd=_0x14da();let _0x31bdac=_0x4783bd[_0x29a36d];return _0x31bdac;}import{transactionFees as _0x40b947,reviewedFees as _0x1f5a96}from'./transaction-fees.mjs';import{resumeTransaction as _0x44ee7a,recoveryNonce as _0x49601d,retireExpiredSwap as _0x93fbd1}from'./transaction-recovery.mjs';const be=0x7a120n,N=(_0x58b6e5,_0x223f0b,_0x554232)=>_0x58b6e5['readContract']({'address':_0x223f0b,'abi':_0x1c44ef,'functionName':'balanceOf','args':[_0x554232]}),Q=(_0x2ff612,_0x51a8f6,_0xa84523,_0x506ef5)=>_0x2ff612['readContract']({'address':_0x51a8f6,'abi':_0x1c44ef,'functionName':'allowance','args':[_0xa84523,_0x506ef5]}),H=(_0x453eaf,_0x4571e0,_0x234baa,_0x236c88)=>({'kind':_0x453eaf,'to':_0x4571e0,'value':'0','gas':String(_0x8abe36),'data':_0x147fc7({'abi':_0x1c44ef,'functionName':_0x35fbd5(0x209),'args':[_0x234baa,_0x236c88]})});async function ye(_0x46c55d,_0xd29db5,_0x1b96ab,_0x354c5d,_0x271c65){const _0x3ab721=_0x35fbd5,{funding:_0x3c1f7a,shortages:_0x147e53,requirement:_0x185f01}=await ve(_0x46c55d,_0xd29db5,_0x1b96ab,_0x354c5d,_0x271c65);if(_0x147e53[_0x3ab721(0x201)])throw _0x5004bb(_0x354c5d[_0x3ab721(0x232)],_0x46c55d[_0x3ab721(0x1ee)]??_0x3ab721(0x216),_0x147e53,_0x185f01);return _0x3c1f7a;}async function ve(_0x1935ba,_0x100148,_0x2b4c13,_0x1ed18d,_0x334b96){const _0x597332=_0x35fbd5,_0x12d299=_0x1935ba[_0x597332(0x1ee)]??'ethereum',_0x15a54f=_0x1b1ff1(_0x12d299,_0x1935ba['payWith']),_0x4e9ca7=_0x334b96??await _0x2dfc5d(_0x100148[_0x597332(0x234)],_0x1935ba[_0x597332(0x20a)],_0x12d299,_0x100148),_0x242874=_0x334b96?_0x334b96[_0x597332(0x1f4)]:_0x11416a(_0x1935ba);if(_0x1a9fc8(_0x242874),_0x242874['asset'][_0x597332(0x226)]()!==_0x4e9ca7['payment'][_0x597332(0x225)][_0x597332(0x226)]())throw new Error(_0x597332(0x1ff));const _0x2ee3cf=BigInt(_0x242874['amount']),[_0x22aa99,_0xd84fda,_0x250c70]=await Promise[_0x597332(0x20b)]([Q(_0x2b4c13,_0x242874[_0x597332(0x225)],_0x1ed18d[_0x597332(0x232)],_0x4e9ca7[_0x597332(0x1e4)]),_0x2b4c13[_0x597332(0x21b)]({'address':_0x1ed18d[_0x597332(0x232)]}),_0x40b947(_0x2b4c13,_0x2de524(_0x12d299)['chain']['id'])]),_0x2c1394=(_0x1935ba['funding']?.[_0x597332(0x235)]??[])[_0x597332(0x229)](_0x48b253=>_0x48b253[_0x597332(0x1e9)]==='confirmed');let _0x9cabe6=0x0n,_0x2219d1=0x0n;for(const _0x5d50bf of _0x2c1394)if(_0x5d50bf['kind']==='swap'){const _0x2caed9=_0xea4bc7({'abi':_0x16cc0b,'data':_0x5d50bf['data']});_0x9cabe6+=_0xea4bc7({'abi':_0x16cc0b,'data':_0x2caed9[_0x597332(0x1fd)][0x1][0x0]})['args'][0x0][_0x597332(0x1f5)];}else _0x5d50bf['kind']==='support'&&(_0x2219d1+=_0xea4bc7({'abi':_0x1c44ef,'data':_0x5d50bf[_0x597332(0x233)]})[_0x597332(0x1fd)][0x1]);const _0x468eee=BigInt(_0x1935ba['support']?.[_0x597332(0x22a)]??0x0)-_0x2219d1,_0x19537c=_0x2ee3cf+_0x468eee,_0x36456a=_0x1bd057[_0x12d299][_0x597332(0x228)],_0x8588e8=_0x12d299===_0x597332(0x1e3)?be:0x0n,_0x28de61=_0x468eee>0x0n?0x186a0n:0x0n,_0x281e66=_0x8588e8+_0x28de61+(_0x22aa99<_0x2ee3cf?_0x8abe36:0x0n),_0x4c9ffb=[],_0x17430d=[];let _0x9930ee;const _0x589fc1=Math[_0x597332(0x1ec)](Number(_0x1935ba[_0x597332(0x20d)]['expiresAt']),Math[_0x597332(0x227)](Date[_0x597332(0x214)]()/0x3e8)+0x12c);let _0x181c8b=_0x15a54f[_0x597332(0x215)]===_0x597332(0x207)?_0xd84fda:null;if(_0x15a54f['symbol']===_0x597332(0x218)){const _0x1d59c0=await N(_0x2b4c13,_0x242874[_0x597332(0x225)],_0x1ed18d['address']);_0x181c8b=_0x1d59c0,_0x1d59c0<_0x19537c&&_0x17430d[_0x597332(0x210)]({'coin':_0x597332(0x218),'balance':String(_0x1d59c0),'required':String(_0x19537c)});}const _0x4dcbc2=_0x9cabe6>_0x2219d1?_0x9cabe6-_0x2219d1:0x0n,_0x4dfce4=_0x19537c>_0x4dcbc2?_0x19537c-_0x4dcbc2:0x0n;if(_0x4dcbc2>0x0n){const _0x57d1ac=await N(_0x2b4c13,_0x242874[_0x597332(0x225)],_0x1ed18d[_0x597332(0x232)]),_0x2d1438=_0x19537c<_0x4dcbc2?_0x19537c:_0x4dcbc2;_0x57d1ac<_0x2d1438&&_0x17430d[_0x597332(0x210)]({'coin':'IMD','balance':String(_0x57d1ac),'required':String(_0x2d1438)});}if(_0x15a54f['symbol']!==_0x597332(0x218)&&_0x4dfce4>0x0n){const _0x358634=_0x15a54f['symbol']===_0x597332(0x207)?0x0n:await Q(_0x2b4c13,_0x15a54f[_0x597332(0x232)],_0x1ed18d[_0x597332(0x232)],_0x36456a);_0x9930ee=await _0x1c9820(_0x12d299,_0x15a54f,_0x4dfce4,{'client':_0x2b4c13,'maxFeePerGas':_0x250c70[_0x597332(0x212)],'sourceAllowance':_0x358634,'fixedGas':_0x281e66,'signal':_0x100148[_0x597332(0x208)]});const _0x430dea=BigInt(_0x9930ee[_0x597332(0x22e)]);if(_0x15a54f['symbol']!==_0x597332(0x207)){const _0x531a43=await N(_0x2b4c13,_0x15a54f['address'],_0x1ed18d[_0x597332(0x232)]);_0x181c8b=_0x531a43;const _0x4b00df=_0x358634;_0x531a43<_0x430dea&&_0x17430d[_0x597332(0x210)]({'coin':_0x15a54f[_0x597332(0x215)],'balance':String(_0x531a43),'required':String(_0x430dea)}),_0x4b00df<_0x430dea&&(_0x15a54f[_0x597332(0x215)]===_0x597332(0x21d)&&_0x4b00df>0x0n&&_0x4c9ffb[_0x597332(0x210)](H(_0x597332(0x22d),_0x15a54f[_0x597332(0x232)],_0x36456a,0x0n)),_0x4c9ffb[_0x597332(0x210)](H(_0x597332(0x221),_0x15a54f[_0x597332(0x232)],_0x36456a,_0x430dea)));}const _0x59f784=_0x9ab358(_0x12d299,_0x15a54f,_0x9930ee,_0x4dfce4,_0x1ed18d[_0x597332(0x232)],_0x589fc1);_0x4c9ffb[_0x597332(0x210)]({'kind':_0x597332(0x220),..._0x59f784,'gas':String(_0x9930ee['gas']),'expiresAt':_0x589fc1});}_0x22aa99<_0x2ee3cf&&_0x4c9ffb['push'](H(_0x597332(0x205),_0x242874['asset'],_0x4e9ca7[_0x597332(0x1e4)],_0x2ee3cf)),_0x468eee>0x0n&&_0x4c9ffb['push']({'kind':_0x597332(0x22b),'to':_0x242874['asset'],'value':'0','gas':String(_0x28de61),'data':_0x147fc7({'abi':_0x1c44ef,'functionName':_0x597332(0x1f2),'args':[_0x1935ba[_0x597332(0x22b)]['recipient'],_0x468eee]})});const _0x56cb0d=_0x4c9ffb['reduce']((_0x56e19d,_0x3a4c03)=>_0x56e19d+BigInt(_0x3a4c03[_0x597332(0x1ea)]),_0x8588e8)*_0x250c70[_0x597332(0x212)],_0x5221d1=_0x15a54f[_0x597332(0x215)]===_0x597332(0x218)?_0x19537c:BigInt(_0x9930ee?.[_0x597332(0x22e)]??0x0),_0x3c666c=_0x5221d1+(_0x15a54f[_0x597332(0x215)]===_0x597332(0x207)?_0x56cb0d:0x0n),_0x24877a=_0x56cb0d+(_0x15a54f[_0x597332(0x215)]===_0x597332(0x207)?_0x5221d1:0x0n);_0xd84fda<_0x24877a&&_0x17430d[_0x597332(0x210)]({'coin':'ETH','balance':String(_0xd84fda),'required':String(_0x24877a)});const _0x522c02={'coin':_0x15a54f[_0x597332(0x215)],'imd':String(_0x19537c),'price':String(_0x2ee3cf),'support':String(_0x468eee>0x0n?_0x468eee:0x0n),'payment':String(_0x5221d1),'estimate':String(_0x15a54f[_0x597332(0x215)]==='IMD'?_0x19537c:_0x9930ee?.[_0x597332(0x1f7)]??0x0),'gas':String(_0x56cb0d),'balance':_0x181c8b===null?null:String(_0x181c8b),'nativeBalance':String(_0xd84fda)};return{'shortages':_0x17430d,'requirement':_0x522c02,'funding':{'chainId':_0x2de524(_0x12d299)[_0x597332(0x1e2)]['id'],'account':_0x1ed18d[_0x597332(0x232)],'coin':_0x15a54f[_0x597332(0x215)],'amountIn':String(_0x5221d1),'minimumOut':String(_0x19537c),'maximumDebit':String(_0x3c666c),'quotedInput':String(_0x15a54f['symbol']===_0x597332(0x218)?_0x19537c:_0x9930ee?.[_0x597332(0x1f7)]??0x0),..._0x9930ee?{'slippageBps':_0x9930ee[_0x597332(0x1f6)]}:{},'feeCap':String(_0x56cb0d),'maxFeePerGas':String(_0x250c70[_0x597332(0x212)]),'maxPriorityFeePerGas':String(_0x250c70[_0x597332(0x1f0)]),'paymentGas':String(_0x8588e8),'expiresAt':_0x589fc1,'steps':[..._0x2c1394,..._0x4c9ffb]}};}async function Be(_0x4af445,_0x327e69,_0x34baa0){const _0x1bbfc4=_0x35fbd5,_0x3a0b85=_0x2de524(_0x4af445[_0x1bbfc4(0x1ee)]??_0x1bbfc4(0x216))['chain']['id'],_0x1c088d=_0x36db5d(_0x327e69);if(!_0x1c088d[_0x1bbfc4(0x211)])throw new Error('Create\x20or\x20import\x20a\x20wallet\x20in\x20Wallets\x20before\x20paying.');if(_0x327e69[_0x1bbfc4(0x213)]&&_0x327e69[_0x1bbfc4(0x213)][_0x1bbfc4(0x226)]()!==_0x1c088d['address'][_0x1bbfc4(0x226)]())throw new Error(_0x1bbfc4(0x20c));const _0x16b6e6=await _0x581e7d(_0x327e69,_0x3a0b85);if(_0x4af445[_0x1bbfc4(0x223)]&&_0x4af445['funding']['account'][_0x1bbfc4(0x226)]()!==_0x1c088d['address'][_0x1bbfc4(0x226)]())throw new Error('Resume\x20funding\x20with\x20the\x20same\x20wallet\x20that\x20started\x20this\x20order.');for(const _0xeefee8 of _0x4af445['funding']?.[_0x1bbfc4(0x235)]??[]){if(_0xeefee8[_0x1bbfc4(0x21e)]&&_0xeefee8['status']!==_0x1bbfc4(0x224)&&await _0x93fbd1(_0x4af445,_0xeefee8,_0x16b6e6,_0x327e69))continue;if(_0xeefee8[_0x1bbfc4(0x1e9)]===_0x1bbfc4(0x21a))throw new Error(_0x1bbfc4(0x1fa)+_0xeefee8[_0x1bbfc4(0x22c)]+_0x1bbfc4(0x1fb)+_0xeefee8[_0x1bbfc4(0x1df)]+'.\x20No\x20replacement\x20swap\x20will\x20be\x20made\x20for\x20this\x20order.');if(!_0xeefee8[_0x1bbfc4(0x21e)]||_0xeefee8[_0x1bbfc4(0x1e9)]===_0x1bbfc4(0x224))continue;const _0x5be3ef=await _0x44ee7a(_0x4af445,_0xeefee8,_0x16b6e6,_0x327e69);if(_0xeefee8[_0x1bbfc4(0x1e9)]=_0x5be3ef[_0x1bbfc4(0x1e9)]==='success'?_0x1bbfc4(0x224):_0x1bbfc4(0x21a),_0xeefee8[_0x1bbfc4(0x1fc)]=_0x5be3ef['transactionHash'],delete _0x4af445[_0x1bbfc4(0x1dd)],await _0x25ac23(_0x327e69[_0x1bbfc4(0x206)],_0x4af445),_0xeefee8[_0x1bbfc4(0x1e9)]===_0x1bbfc4(0x21a))throw new Error(_0x1bbfc4(0x1fa)+_0xeefee8[_0x1bbfc4(0x22c)]+_0x1bbfc4(0x1fb)+_0xeefee8[_0x1bbfc4(0x1df)]+'.\x20No\x20replacement\x20swap\x20will\x20be\x20made\x20for\x20this\x20order.');}_0x327e69[_0x1bbfc4(0x1e0)]?.({'phase':'checking_funds','message':_0x1bbfc4(0x217)}),_0x4af445['funding']=await ye(_0x4af445,_0x327e69,_0x16b6e6,_0x1c088d);const _0x371056=_0x4af445[_0x1bbfc4(0x223)];_0x4af445['paymentReview']={'networkFeeCap':_0x6f11b2(BigInt(_0x371056[_0x1bbfc4(0x1e1)]))},await _0x34baa0(_0x4af445),_0x327e69[_0x1bbfc4(0x208)]?.[_0x1bbfc4(0x202)](),_0x212344(await _0x2cfba5(_0x327e69[_0x1bbfc4(0x206)],_0x4af445[_0x1bbfc4(0x21f)])),await _0x25ac23(_0x327e69[_0x1bbfc4(0x206)],_0x4af445);const {walletClient:_0x7bcdb9,account:_0x3d42af}=await _0x24e488({..._0x327e69,'expectedWallet':_0x1c088d[_0x1bbfc4(0x232)]},_0x3a0b85);if(_0x327e69[_0x1bbfc4(0x208)]?.[_0x1bbfc4(0x202)](),_0x212344(await _0x2cfba5(_0x327e69['home'],_0x4af445['requestKey'])),_0x371056[_0x1bbfc4(0x20e)]*0x3e8<=Date[_0x1bbfc4(0x214)]())throw Object['assign'](new Error(_0x1bbfc4(0x200)),{'code':_0x1bbfc4(0x1de)});for(const _0x1ed7f1 of _0x371056[_0x1bbfc4(0x235)]){if(_0x1ed7f1[_0x1bbfc4(0x1e9)]===_0x1bbfc4(0x224))continue;if(_0x1ed7f1[_0x1bbfc4(0x1e9)]===_0x1bbfc4(0x21a))throw new Error('The\x20'+_0x1ed7f1['kind']+_0x1bbfc4(0x1fb)+_0x1ed7f1[_0x1bbfc4(0x1df)]+_0x1bbfc4(0x21c));if(!_0x1ed7f1[_0x1bbfc4(0x21e)]){if(_0x371056[_0x1bbfc4(0x20e)]*0x3e8<=Date[_0x1bbfc4(0x214)]())throw Object[_0x1bbfc4(0x1f3)](new Error(_0x1bbfc4(0x200)),{'code':'payment_review_expired'});const _0x1da29e=_0x1f5a96(await _0x40b947(_0x16b6e6,_0x3a0b85),_0x371056);_0x327e69[_0x1bbfc4(0x1e0)]?.({'phase':_0x1bbfc4(0x231),'message':_0x1bbfc4(0x204)+(_0x1ed7f1[_0x1bbfc4(0x22c)]===_0x1bbfc4(0x220)?_0x1bbfc4(0x1eb):_0x1ed7f1[_0x1bbfc4(0x22c)]==='support'?_0x1bbfc4(0x203):'token\x20authorization')+_0x1bbfc4(0x1ed)});const _0x5131e4={'account':_0x3d42af,'to':_0x1ed7f1['to'],'data':_0x1ed7f1['data'],'value':BigInt(_0x1ed7f1[_0x1bbfc4(0x1f1)]),..._0x1da29e};let _0x53e348;try{_0x53e348=await _0x16b6e6['estimateGas'](_0x5131e4);}catch(_0x103d24){throw _0x103d24 instanceof _0x1ae311?new Error((_0x1ed7f1[_0x1bbfc4(0x22c)]===_0x1bbfc4(0x220)?_0x1bbfc4(0x22f):_0x1ed7f1[_0x1bbfc4(0x22c)]===_0x1bbfc4(0x22b)?_0x1bbfc4(0x1e8):_0x1bbfc4(0x1fe))+_0x1bbfc4(0x236),{'cause':_0x103d24}):_0x103d24;}if(_0x53e348>BigInt(_0x1ed7f1[_0x1bbfc4(0x1ea)]))throw new Error(_0x1bbfc4(0x1f9));const _0x3aa57a=await _0x7bcdb9[_0x1bbfc4(0x1e5)]({..._0x5131e4,'gas':BigInt(_0x1ed7f1['gas']),'nonce':await _0x49601d(_0x4af445,_0x16b6e6,_0x3d42af['address'])});if(await _0xa34bba({..._0x327e69,'expectedWallet':_0x3d42af[_0x1bbfc4(0x232)]}),_0x327e69[_0x1bbfc4(0x208)]?.[_0x1bbfc4(0x202)](),_0x212344(await _0x2cfba5(_0x327e69[_0x1bbfc4(0x206)],_0x4af445['requestKey'])),_0x371056[_0x1bbfc4(0x20e)]*0x3e8<=Date['now']())throw Object[_0x1bbfc4(0x1f3)](new Error('Refreshing\x20the\x20payment\x20review.\x20No\x20new\x20transaction\x20was\x20signed.'),{'code':'payment_review_expired'});Object[_0x1bbfc4(0x1f3)](_0x3aa57a,_0x1f5a96(await _0x40b947(_0x16b6e6,_0x3a0b85),_0x371056)),_0x1ed7f1['rawTransaction']=await _0x7bcdb9[_0x1bbfc4(0x1ef)](_0x3aa57a),_0x1ed7f1[_0x1bbfc4(0x1df)]=_0x2007a7(_0x1ed7f1['rawTransaction']),_0x1ed7f1[_0x1bbfc4(0x1e9)]=_0x1bbfc4(0x1f8),delete _0x4af445[_0x1bbfc4(0x230)],_0x4af445[_0x1bbfc4(0x1e9)]=_0x1bbfc4(0x223),await _0x25ac23(_0x327e69[_0x1bbfc4(0x206)],_0x4af445);}const _0x14755a=await _0x5adafa(_0x16b6e6,_0x1ed7f1,_0x327e69);if(_0x1ed7f1[_0x1bbfc4(0x1e9)]=_0x14755a['status']===_0x1bbfc4(0x20f)?_0x1bbfc4(0x224):_0x1bbfc4(0x21a),_0x1ed7f1['confirmedHash']=_0x14755a[_0x1bbfc4(0x222)],delete _0x4af445[_0x1bbfc4(0x1dd)],await _0x25ac23(_0x327e69[_0x1bbfc4(0x206)],_0x4af445),_0x1ed7f1[_0x1bbfc4(0x1e9)]===_0x1bbfc4(0x21a))throw new Error(_0x1bbfc4(0x1fa)+_0x1ed7f1[_0x1bbfc4(0x22c)]+'\x20transaction\x20reverted:\x20'+_0x1ed7f1['hash']+_0x1bbfc4(0x1e6));}const _0x15cff1=_0x11416a(_0x4af445);if(await N(_0x16b6e6,_0x15cff1[_0x1bbfc4(0x225)],_0x3d42af['address'])<BigInt(_0x15cff1[_0x1bbfc4(0x22a)]))throw new Error(_0x1bbfc4(0x219));_0x212344(await _0x2cfba5(_0x327e69[_0x1bbfc4(0x206)],_0x4af445[_0x1bbfc4(0x21f)])),_0x371056[_0x1bbfc4(0x1e9)]=_0x1bbfc4(0x1e7),await _0x25ac23(_0x327e69['home'],_0x4af445);}export{Be as fundOrder,ve as planFunding,ye as prepareFunding};
@@ -1 +1 @@
1
- const _0x159d74=_0x37b5;import{createHash as _0x1cc679,randomBytes as _0x1ac927,randomUUID as _0xa1fb4d}from'node:crypto';import{readFile as _0x2b685a}from'node:fs/promises';import{setTimeout as _0x535622}from'node:timers/promises';import{x402Client as _0x1cbd29}from'@x402/core/client';import{encodePaymentSignatureHeader as _0x3429a8}from'@x402/core/http';import{ExactEvmScheme as _0x21bb47}from'@x402/evm/exact/client';import{formatUnits as _0x35e0db,sha256 as _0x5a4a0d,stringToBytes as _0x387a4e}from'viem';import{confirmAction as _0x1717a4,getPublicRpcClient as _0x1f93f7,getSigner as _0x43d4f3,request as _0x141421}from'../shared.mjs';import{assertOrderNotCancelled as _0x339375,findOrder as _0xb25b43,loadOrder as _0x347102,orderActions as _0x188fc7,saveOrder as _0x32b846}from'./orders.mjs';import{assertQuotePayment as _0x2e1fc7,orderPayment as _0x4ccfa2}from'./payments.mjs';import{networkName as _0x12ccb4,selectedPaymentNetwork as _0x741e48}from'./payment-networks.mjs';import{signOnchainPayment as _0x3a46fa,submitOnchainPayment as _0x1947ba}from'./onchain-payment.mjs';import{coinSymbol as _0x205f91,paymentCoin as _0x17a353}from'./payment-coins.mjs';import{fundingSummary as _0x20f601}from'./funding-state.mjs';import{fundOrder as _0x3dc9d5}from'./funding.mjs';import{walletInfo as _0x13d967}from'./local-wallet.mjs';import{selectSupport as _0x3ce937,supportView as _0x3e189c}from'./support.mjs';import{authorizationUnpaid as _0x43d1bc}from'./payment-recovery.mjs';import{retainExpiredNonce as _0xed989b}from'./transaction-recovery.mjs';import{transactionReceipt as _0xc67fcf}from'./transactions.mjs';import{withSubmissionAttribution as _0xee41f4}from'./submission-attribution.mjs';function S(_0x2c918d){const _0x3e6098=_0x37b5;return _0x2c918d===null?_0x3e6098(0x269):Array[_0x3e6098(0x242)](_0x2c918d)?'['+_0x2c918d['map'](S)[_0x3e6098(0x275)](',')+']':typeof _0x2c918d==_0x3e6098(0x239)?'{'+Object[_0x3e6098(0x229)](_0x2c918d)['sort']()['map'](_0x5e630c=>JSON[_0x3e6098(0x249)](_0x5e630c)+':'+S(_0x2c918d[_0x5e630c]))[_0x3e6098(0x275)](',')+'}':JSON['stringify'](_0x2c918d);}function ce(_0x59fe24){const _0x54f8cf=_0x37b5;return _0x1cc679(_0x54f8cf(0x25e))[_0x54f8cf(0x274)](S(_0x59fe24))[_0x54f8cf(0x25d)](_0x54f8cf(0x298));}async function de(_0x3f8d03){const _0x510630=_0x37b5;let _0x3dc0a2;try{_0x3dc0a2=JSON['parse'](await _0x2b685a(_0x3f8d03,_0x510630(0x1ef)));}catch(_0x1f320a){throw _0x1f320a instanceof SyntaxError?new Error('invalid\x20JSON\x20in\x20'+_0x3f8d03+':\x20'+_0x1f320a[_0x510630(0x210)]):_0x1f320a;}if(!_0x3dc0a2||typeof _0x3dc0a2!=_0x510630(0x239)||Array[_0x510630(0x242)](_0x3dc0a2))throw new Error(_0x3f8d03+'\x20must\x20contain\x20a\x20JSON\x20object');return _0x3dc0a2;}async function me(_0x2a340c,_0x22bfd8,_0x243e9e=_0x159d74(0x27d),_0x53055a){const _0x166ad8=_0x159d74,_0x715430=await _0x141421(_0x2a340c,'/requests/check',{'method':_0x166ad8(0x1f9),'query':!0x0,'body':{'action':_0x243e9e,'input':_0x22bfd8},'signal':_0x53055a});if(!Array[_0x166ad8(0x242)](_0x715430[_0x166ad8(0x291)]?.['blockers']))throw new Error(_0x166ad8(0x1c3));return _0x715430['data'];}async function T(_0x140a99,_0x35fe9f,_0x47b2e5,_0x86a93c,_0x2c54af=_0x159d74(0x27d),_0x5da656){const _0x26a94b=_0x159d74,_0x2c2f31=await _0x141421(_0x140a99,_0x26a94b(0x261),{'method':'POST','token':_0x35fe9f,'body':{'requestKey':_0x47b2e5,'action':_0x2c54af,'input':_0x86a93c},'signal':_0x5da656}),_0x1db2c9=_0x2c2f31[_0x26a94b(0x291)]?.[_0x26a94b(0x29a)];if(!_0x1db2c9?.['id']||!_0x1db2c9[_0x26a94b(0x1e3)]?.[_0x26a94b(0x203)])throw new Error(_0x26a94b(0x1b4));return{..._0x1db2c9,'onchain':_0x2c2f31[_0x26a94b(0x291)]['onchain']};}async function pe(_0x4a8b0e,_0x27d519,_0x2f9864){const _0x326d7e=_0x159d74;if(_0x2f9864?.[_0x326d7e(0x26d)])return _0x2f9864['owner'];const _0x1ef2eb=_0x27d519?.[_0x326d7e(0x294)];if(!_0x1ef2eb)throw new Error('job.continue\x20input\x20is\x20missing\x20parentJobId');const _0x432574=(await _0x141421(_0x4a8b0e,_0x326d7e(0x1e6)+encodeURIComponent(_0x1ef2eb)))[_0x326d7e(0x291)]?.[_0x326d7e(0x26a)];if(!_0x432574)throw new Error('cannot\x20verify\x20the\x20project\x20owner\x20for\x20'+_0x1ef2eb+':\x20the\x20parent\x20job\x20has\x20no\x20paidBy');return _0x432574;}function ye(_0x46a596,_0x5f5588){const _0x4001ef=_0x159d74,_0x36f7b1=new Error(_0x4001ef(0x243)+_0x46a596+'\x20is\x20not\x20the\x20project\x20owner\x20'+_0x5f5588+';\x20no\x20payment\x20was\x20signed\x20in\x20this\x20attempt');return _0x36f7b1['code']='owner_mismatch',_0x36f7b1;}async function P({api:_0x44dfb3,input:_0xdbb184,check:_0x33def0,account:_0x141741,owner:_0x232e67}){const _0x7356c7=_0x159d74,_0x317832=_0x232e67??await pe(_0x44dfb3,_0xdbb184,_0x33def0);if(!_0x141741?.['address'])throw new Error('missing\x20signer\x20address');if(!v(_0x317832,_0x141741['address']))throw ye(_0x141741[_0x7356c7(0x280)],_0x317832);return _0x317832;}async function le(_0x27a4b0,_0x1b336f,_0x53c3fe,_0x57ccd6){const _0x53353a=_0x159d74,_0x3165ae=await _0x141421(_0x27a4b0,_0x53353a(0x20f)+_0x53c3fe+_0x53353a(0x28b),{'method':_0x53353a(0x1f9),'token':_0x1b336f,'allowStatuses':[0x192],'signal':_0x57ccd6});if(_0x3165ae[_0x53353a(0x230)]!==0x192)throw new Error(_0x53353a(0x29b)+_0x3165ae[_0x53353a(0x230)]);const _0x37a705=_0x3165ae[_0x53353a(0x291)];if(!Array[_0x53353a(0x242)](_0x37a705?.['accepts'])||_0x37a705[_0x53353a(0x272)][_0x53353a(0x1d0)]===0x0)throw new Error(_0x53353a(0x28d));if(!_0x37a705[_0x53353a(0x211)]||!_0x37a705[_0x53353a(0x25c)])throw new Error(_0x53353a(0x267));return _0x37a705;}function _0x9868(){const _0x178619=['quote\x20response\x20is\x20missing\x20order\x20or\x20quote','Price:\x20','deadline','\x20atomic\x20units)','min','signed','\x20(at\x20most\x20','function','The\x20previous\x20payment\x20is\x20still\x20being\x20reconciled.\x20Your\x20task\x20is\x20saved.\x20Continue\x20this\x20task\x20again\x20after\x20chain\x20confirmation;\x20no\x20new\x20payment\x20was\x20signed.','transaction','unsupported\x20action:\x20','robinhood','expired','payTo','Sign\x20and\x20pay\x20this\x20order?\x0a','check\x20response\x20is\x20missing\x20blockers','rawTransaction','\x20--refresh','fromConfig','permit2','order\x20','lastStatus','expiresAt','max','Maximum\x20debit:\x20','\x20belongs\x20to\x20','transaction_pending','invalid\x20quote\x20network:\x20','length','order_changed','Total\x20ETH\x20at\x20most:\x20','\x20task\x20continue\x20','confirmedHash','\x20was\x20created\x20for\x20a\x20different\x20input','serverRequestKey','toLowerCase','admission','transactionHash','\x20order\x20show\x20','floor','Prepared\x20input\x20(this\x20is\x20what\x20will\x20be\x20paid\x20for):','),\x20converted\x20to\x20IMD','\x20task\x20create\x20--file\x20<saved-input.json>\x20--request-key\x20','ethereum','now','network','slice','quote','job.continue','payment_review_expired','/jobs/','challenge','payment\x20requirement\x20is\x20missing\x20maxTimeoutSeconds','<missing>','signTypedData','funding','\x20IMD\x20+\x20network\x20fees\x0aSupport\x20recipient:\x20','\x20IMD\x20·\x20Help\x20us\x20make\x20Colony\x20better.\x0aTotal:\x20','\x20has\x20not\x20been\x20quoted;\x20there\x20is\x20no\x20server\x20order\x20to\x20refresh','utf8','maxTimeoutSeconds','change_payment','retryCommand','Network:\x20','Task:\x20','action','refusalProblems','payment\x20challenge\x20belongs\x20to\x20a\x20different\x20order','orderId','POST','Amount:\x20','payment\x20challenge\x20action\x20','amount','input','\x20at\x20','resource','quoteHash','Payment:\x20≈\x20','jobId','payment','challenged','invalid\x20','payload','headers','payment_failed','converted','decimals','<parent-job-id>',';\x20rerun\x20with\x20--api\x20','lastError','paymentStatus','/requests/','message','resourceUrl','assign','timeoutMs','toISOString','Payment:\x20conversion\x20already\x20confirmed\x20(','display','\x20--home\x20',';\x20last\x20status:\x20','job\x20input\x20must\x20be\x20a\x20JSON\x20object','\x20does\x20not\x20match\x20','orderStatus','signal','signing','\x0aOptional\x20support:\x20',';\x20continue\x20this\x20task\x20with:\x20colony\x20--api\x20','request\x20key\x20','.\x20Saved\x20transactions\x20will\x20be\x20checked\x20before\x20refreshing\x20prices.','Conversion\x20and\x20task\x20payment\x20are\x20separate\x20transactions.','asset','code','some','quoteSignature','\x20from\x20the\x20same\x20ETH\x20balance','paymentHistory','keys','payment\x20deadline\x20','\x20\x20-\x20','\x0aSupport\x20is\x20sent\x20before\x20task\x20payment\x20and\x20is\x20not\x20refunded\x20if\x20admission\x20fails.','plan','Signing\x20task\x20payment\x20authorization...','\x20IMD','status','refused','checking_payment','colony\x20--api\x20','deliverables','error','Pay\x20with:\x20','\x20on\x20','\x20at\x20most)','object','kind','blockers','string','\x20(api\x20','saved\x20quote\x20action\x20','paymentChain','Action:\x20','paymentHeader','isArray','wallet\x20','networkFeeCap','submittedAt','created','owner_mismatch','quoted','stringify','\x20was\x20created\x20for\x20action\x20','order\x20status\x20response\x20is\x20missing\x20status','payWith','\x20order\x20submit\x20','admitted','IMD','toString','onchainQuotes','quote\x20has\x20expired;\x20no\x20payment\x20was\x20signed','onchainPayment','includes','onSaved','state','QuoteApproval','objective','\x0aorder\x20status\x20refresh\x20failed:\x20','coin','onchain','requesterScopeHash','digest','sha256',',\x20not\x20','payer','/requests/quote','recoveryStatus','support','resultUrl','submissionInput','gas','payment\x20challenge\x20is\x20missing\x20resourceUrl\x20or\x20requesterScopeHash','requestToken','null','paidBy','blocked','quote_expired','owner','isInteger','createPaymentPayload','statusUrl','replace','accepts','pendingTransaction','update','join','payment_reconciling','paymentHash','Submitting\x20task\x20payment\x20to\x20IMD...','payment\x20challenge\x20does\x20not\x20use\x20Permit2','reason','expectedWallet','Checking\x20your\x20task\x20and\x20requesting\x20a\x20current\x20price...','job.open','This\x20order\x20already\x20uses\x20a\x20different\x20payment\x20network.\x20Resume\x20it\x20on\x20its\x20original\x20network.','onProgress','address','test','throwIfAborted','problems','IdentityMD\x20Paid\x20Action','onCheck','\x20is\x20not\x20before\x20quote\x20expiry\x20','\x20--request-key\x20','Quote\x20expires:\x20','uint256','confirm','/submit','quote\x20approval','payment\x20challenge\x20is\x20missing\x20accepts','ETH','api','quoteHistory','data','Payment\x20covers\x20task\x20admission;\x20a\x20completed\x20result\x20is\x20not\x20guaranteed.','paymentReview','parentJobId','\x20ETH','requestKey','maximumDebit','hex','Asset:\x20','order','expected\x20HTTP\x20402\x20payment\x20challenge,\x20got\x20HTTP\x20','submitted','parse','Included\x20network\x20fee\x20cap:\x20','\x20task\x20publish\x20--file\x20','bytes32','Checking\x20the\x20previous\x20payment\x20and\x20refreshing\x20prices...','extra','Requested\x20objective:\x20','intervalMs','inputHash','permit2Authorization'];_0x9868=function(){return _0x178619;};return _0x9868();}function v(_0x194b2c,_0x1c6878){const _0x9bb8d3=_0x159d74;return String(_0x194b2c)[_0x9bb8d3(0x1d7)]()===String(_0x1c6878)['toLowerCase']();}function C(_0x31d023,_0x3c3b95){const _0x33550c=_0x159d74,_0x13c04b=_0x31d023['accepts'][0x0],_0x1af04a=_0x3c3b95[_0x33550c(0x1e3)][_0x33550c(0x203)];if(_0x3c3b95[_0x33550c(0x1e3)]?.[_0x33550c(0x1f5)]!==_0x3c3b95[_0x33550c(0x1f5)])throw new Error(_0x33550c(0x23e)+(_0x3c3b95[_0x33550c(0x1e3)]?.[_0x33550c(0x1f5)]??_0x33550c(0x1e9))+_0x33550c(0x21a)+_0x3c3b95['action']);if(_0x31d023['quote']?.[_0x33550c(0x1f5)]!==_0x3c3b95[_0x33550c(0x1f5)])throw new Error(_0x33550c(0x1fb)+(_0x31d023['quote']?.[_0x33550c(0x1f5)]??_0x33550c(0x1e9))+_0x33550c(0x21a)+_0x3c3b95[_0x33550c(0x1f5)]);if(_0x31d023['quote']?.['id']!==_0x3c3b95[_0x33550c(0x1f8)])throw new Error(_0x33550c(0x1f7));if(_0x31d023[_0x33550c(0x1e3)]?.[_0x33550c(0x200)]!==_0x3c3b95['quote'][_0x33550c(0x200)])throw new Error('payment\x20challenge\x20quoteHash\x20does\x20not\x20match\x20the\x20saved\x20quote');if(_0x31d023[_0x33550c(0x1e3)]?.[_0x33550c(0x1ca)]!==_0x3c3b95[_0x33550c(0x1e3)]['expiresAt'])throw new Error('payment\x20challenge\x20expiry\x20does\x20not\x20match\x20the\x20saved\x20quote');for(const [_0x32686b,_0x1bd451]of[['payment\x20challenge',_0x13c04b],[_0x33550c(0x28c),_0x31d023[_0x33550c(0x1e3)]['payment']]])for(const _0x18b6b8 of[_0x33550c(0x1e1),_0x33550c(0x223),'amount',_0x33550c(0x1c1)])if(!(_0x18b6b8===_0x33550c(0x223)||_0x18b6b8==='payTo'?v(_0x1bd451?.[_0x18b6b8],_0x1af04a[_0x18b6b8]):String(_0x1bd451?.[_0x18b6b8])===String(_0x1af04a[_0x18b6b8])))throw new Error(_0x32686b+'\x20'+_0x18b6b8+'\x20does\x20not\x20match\x20the\x20saved\x20quote');if(_0x13c04b[_0x33550c(0x2a2)]?.['assetTransferMethod']!==_0x33550c(0x1c7))throw new Error(_0x33550c(0x279));if(!_0x31d023[_0x33550c(0x1fd)]||typeof _0x31d023[_0x33550c(0x1fd)]!=_0x33550c(0x239)||Array['isArray'](_0x31d023[_0x33550c(0x1fd)]))throw new Error('payment\x20challenge\x20is\x20missing\x20the\x20prepared\x20input');if(Number(_0x31d023[_0x33550c(0x1e3)][_0x33550c(0x1ca)])*0x3e8<=Date[_0x33550c(0x1e0)]()){const _0x21eb0a=new Error(_0x33550c(0x252));throw _0x21eb0a[_0x33550c(0x224)]='quote_expired',_0x21eb0a;}}async function he(_0x3c08f7,_0x579816){const _0x184874=_0x159d74,_0x4640a4=_0x579816['accepts'][0x0],_0x54d9ab=Number(_0x579816[_0x184874(0x1e3)][_0x184874(0x1ca)]),_0x445b5d=_0x54d9ab-Math[_0x184874(0x1db)](Date[_0x184874(0x1e0)]()/0x3e8);if(!Number[_0x184874(0x26e)](_0x445b5d)||_0x445b5d<=0x1){const _0x2aa549=new Error('quote\x20expires\x20too\x20soon\x20to\x20sign\x20a\x20payment;\x20no\x20payment\x20was\x20signed');throw _0x2aa549[_0x184874(0x224)]=_0x184874(0x26c),_0x2aa549;}if(!Number[_0x184874(0x26e)](Number(_0x4640a4[_0x184874(0x1f0)])))throw new Error(_0x184874(0x1e8));const _0x249fd9=Math[_0x184874(0x1cb)](0x1,Math[_0x184874(0x1b8)](Number(_0x4640a4[_0x184874(0x1f0)]),_0x445b5d-0x1)),_0x508600={..._0x4640a4,'maxTimeoutSeconds':_0x249fd9},_0x47ac60=await _0x1cbd29[_0x184874(0x1c6)]({'schemes':[{'network':_0x508600['network'],'client':new _0x21bb47(_0x3c08f7)}],'spendControls':{'allowedAssets':[{'network':_0x508600[_0x184874(0x1e1)],'asset':_0x508600[_0x184874(0x223)],'maxAmountPerPayment':_0x508600['amount']}]}})[_0x184874(0x26f)]({'x402Version':0x2,'resource':_0x579816[_0x184874(0x1ff)],'accepts':[_0x508600]}),{extensions:_0x56f066,..._0x5a9f72}=_0x47ac60,_0x1ab398=JSON[_0x184874(0x29d)](JSON[_0x184874(0x249)]({..._0x5a9f72,'accepted':_0x4640a4})),_0x37577d=_0x1ab398[_0x184874(0x206)]?.[_0x184874(0x2a6)]?.[_0x184874(0x1b6)];if(_0x37577d===void 0x0||BigInt(_0x37577d)>=BigInt(_0x54d9ab))throw new Error(_0x184874(0x22a)+_0x37577d+_0x184874(0x286)+_0x54d9ab);return{'payment':_0x1ab398,'paymentHeader':_0x3429a8(_0x1ab398),'paymentHash':_0x5a4a0d(_0x387a4e(S(_0x1ab398)))};}function E(_0x2ddede,_0x225204){const _0x1ad4cf=_0x159d74,_0x16b52f=String(_0x2ddede??'')[_0x1ad4cf(0x271)](/^0x/,'');if(!/^[0-9a-f]{64}$/i[_0x1ad4cf(0x281)](_0x16b52f))throw new Error(_0x1ad4cf(0x205)+_0x225204+':\x20'+_0x2ddede);return'0x'+_0x16b52f;}function fe(_0x4d07fe,_0x2c021f){const _0x1418b7=_0x159d74,_0x49d26c=_0x4d07fe['quote'],_0x17b592=Number(String(_0x49d26c['payment'][_0x1418b7(0x1e1)])[_0x1418b7(0x1e2)](0x7));if(!Number[_0x1418b7(0x26e)](_0x17b592)||_0x17b592<=0x0)throw new Error(_0x1418b7(0x1cf)+_0x49d26c[_0x1418b7(0x203)][_0x1418b7(0x1e1)]);return{'domain':{'name':_0x1418b7(0x284),'version':'1','chainId':_0x17b592},'types':{'QuoteApproval':[{'name':_0x1418b7(0x1ff),'type':_0x1418b7(0x23c)},{'name':_0x1418b7(0x25c),'type':'bytes32'},{'name':'quoteId','type':'string'},{'name':_0x1418b7(0x200),'type':_0x1418b7(0x2a0)},{'name':_0x1418b7(0x277),'type':_0x1418b7(0x2a0)},{'name':_0x1418b7(0x1f5),'type':'string'},{'name':_0x1418b7(0x223),'type':'address'},{'name':_0x1418b7(0x1fc),'type':_0x1418b7(0x289)},{'name':'payTo','type':_0x1418b7(0x280)},{'name':_0x1418b7(0x1ca),'type':'uint256'}]},'primaryType':_0x1418b7(0x257),'message':{'resource':_0x4d07fe[_0x1418b7(0x211)],'requesterScopeHash':E(_0x4d07fe[_0x1418b7(0x25c)],_0x1418b7(0x25c)),'quoteId':_0x49d26c['id'],'quoteHash':E(_0x49d26c[_0x1418b7(0x200)],_0x1418b7(0x200)),'paymentHash':E(_0x2c021f,_0x1418b7(0x277)),'action':_0x49d26c[_0x1418b7(0x1f5)],'asset':_0x49d26c[_0x1418b7(0x203)][_0x1418b7(0x223)],'amount':BigInt(_0x49d26c['payment'][_0x1418b7(0x1fc)]),'payTo':_0x49d26c[_0x1418b7(0x203)][_0x1418b7(0x1c1)],'expiresAt':BigInt(_0x49d26c[_0x1418b7(0x1ca)])}};}async function we(_0x36490c,_0x47accd,_0x3f5e9d){const _0x22f653=_0x159d74,_0x5609d7=fe(_0x47accd,_0x3f5e9d);return _0x36490c[_0x22f653(0x1ea)](_0x5609d7);}function _0x37b5(_0x6f19c1,_0x986837){_0x6f19c1=_0x6f19c1-0x1b4;const _0x37b526=_0x9868();let _0x130e64=_0x37b526[_0x6f19c1];return _0x130e64;}function ge(_0x2f43a4){const _0x33c667=_0x159d74,_0x5efcd1=_0x4ccfa2(_0x2f43a4),_0x3bbd8f=_0x35e0db(BigInt(_0x5efcd1[_0x33c667(0x1fc)]),_0x5efcd1[_0x33c667(0x20a)]),_0x55f3a0=_0x2f43a4[_0x33c667(0x1eb)]?_0x20f601(_0x2f43a4[_0x33c667(0x1eb)]):null,_0x4c02a1=_0x2f43a4['paymentReview']?[(_0x2f43a4[_0x33c667(0x24c)]===_0x33c667(0x28e)?_0x33c667(0x29e):'Additional\x20network\x20fee\x20cap:\x20')+_0x2f43a4[_0x33c667(0x293)][_0x33c667(0x244)]+_0x33c667(0x295)]:[];if(!_0x2f43a4[_0x33c667(0x1e7)]?.[_0x33c667(0x1fd)]||typeof _0x2f43a4[_0x33c667(0x1e7)][_0x33c667(0x1fd)]!='object')throw new Error('payment\x20challenge\x20is\x20missing\x20the\x20prepared\x20input');if(_0x2f43a4['plan']){const _0x15aeb8=_0x2f43a4[_0x33c667(0x24c)]??_0x33c667(0x24f);return[_0x33c667(0x1f4)+_0x2f43a4[_0x33c667(0x1fd)][_0x33c667(0x258)],..._0x2f43a4[_0x33c667(0x22d)][_0x33c667(0x234)]['map'](_0x26fa13=>_0x33c667(0x22b)+_0x26fa13),_0x33c667(0x1b5)+_0x3bbd8f+_0x33c667(0x22f),_0x33c667(0x236)+_0x15aeb8+_0x33c667(0x237)+_0x12ccb4(_0x2f43a4[_0x33c667(0x23f)]),..._0x55f3a0?[_0x15aeb8===_0x33c667(0x24f)?'Payment:\x20'+_0x55f3a0[_0x33c667(0x216)][_0x33c667(0x203)]:_0x55f3a0[_0x33c667(0x209)]?_0x33c667(0x215)+_0x55f3a0[_0x33c667(0x216)][_0x33c667(0x203)]+_0x33c667(0x238):_0x33c667(0x201)+(_0x55f3a0['display']['estimate']??_0x55f3a0[_0x33c667(0x216)][_0x33c667(0x203)])+_0x33c667(0x1ba)+_0x55f3a0['display'][_0x33c667(0x203)]+_0x33c667(0x1dd),'Gas\x20(network\x20fee,\x20paid\x20in\x20ETH):\x20at\x20most\x20'+_0x55f3a0['display'][_0x33c667(0x266)]+(_0x15aeb8===_0x33c667(0x28e)?_0x33c667(0x227):''),..._0x15aeb8==='ETH'?[_0x33c667(0x1d2)+_0x55f3a0[_0x33c667(0x216)][_0x33c667(0x297)]]:[],..._0x55f3a0['coin']!==_0x33c667(0x24f)?['Conversion\x20and\x20task\x20payment\x20are\x20separate\x20transactions.']:[]]:_0x4c02a1,_0x33c667(0x292)]['join']('\x0a');}return['Order:\x20'+_0x2f43a4[_0x33c667(0x1f8)],_0x33c667(0x240)+(_0x2f43a4[_0x33c667(0x1f5)]??_0x33c667(0x27d)),_0x33c667(0x1f3)+_0x5efcd1['network'],_0x33c667(0x1fa)+_0x3bbd8f+'\x20('+_0x5efcd1[_0x33c667(0x1fc)]+_0x33c667(0x1b7),_0x33c667(0x299)+_0x5efcd1[_0x33c667(0x223)],'Pay\x20to:\x20'+_0x5efcd1[_0x33c667(0x1c1)],_0x33c667(0x288)+new Date(Number(_0x2f43a4[_0x33c667(0x1e3)]['expiresAt'])*0x3e8)[_0x33c667(0x214)](),..._0x55f3a0?[_0x33c667(0x1cc)+_0x55f3a0[_0x33c667(0x297)],..._0x55f3a0[_0x33c667(0x25a)]!==_0x33c667(0x24f)?[_0x33c667(0x222)]:[]]:[],..._0x4c02a1,_0x33c667(0x2a3)+String(_0x2f43a4['input']['objective']??''),_0x33c667(0x1dc),JSON['stringify'](_0x2f43a4[_0x33c667(0x1e7)][_0x33c667(0x1fd)],null,0x2)]['join']('\x0a');}async function qe(_0x3af36f,_0x75e218){const _0x257567=_0x159d74;if(_0x75e218[_0x257567(0x28a)])return _0x75e218[_0x257567(0x28a)](_0x3af36f);const _0x58a38b=_0x3e189c(_0x3af36f),_0x57cb84=_0x58a38b?_0x257567(0x21e)+_0x58a38b[_0x257567(0x1fc)]+_0x257567(0x1ed)+_0x58a38b['total']+_0x257567(0x1ec)+_0x58a38b['recipient']+_0x257567(0x22c):'';await _0x1717a4(_0x257567(0x1c2)+ge(_0x3af36f)+_0x57cb84,_0x75e218);}function be(_0x2d8d13,_0x412e5b){const _0x57cbd5=_0x159d74;if(typeof _0x412e5b[_0x57cbd5(0x1f2)]==_0x57cbd5(0x1bb))return _0x412e5b[_0x57cbd5(0x1f2)](_0x2d8d13);if(_0x412e5b[_0x57cbd5(0x1f2)])return _0x412e5b[_0x57cbd5(0x1f2)];const {file:_0x41e8cd,home:_0x1f6a1d,api:_0x43b3b3}=_0x412e5b,_0x1d8f45=_0x57cbd5(0x233)+_0x43b3b3+_0x57cbd5(0x217)+_0x1f6a1d,_0x2040b0=_0x2d8d13[_0x57cbd5(0x296)];if(_0x2d8d13['action']===_0x57cbd5(0x1e4)){const _0x477f13=_0x2d8d13[_0x57cbd5(0x1fd)]?.[_0x57cbd5(0x294)]??_0x57cbd5(0x20b);return _0x41e8cd?_0x1d8f45+'\x20task\x20continue\x20'+_0x477f13+'\x20--file\x20'+_0x41e8cd+_0x57cbd5(0x287)+_0x2040b0:_0x1d8f45+_0x57cbd5(0x1d3)+_0x477f13+_0x57cbd5(0x287)+_0x2040b0;}return _0x41e8cd?_0x1d8f45+_0x57cbd5(0x29f)+_0x41e8cd+_0x57cbd5(0x287)+_0x2040b0:_0x1d8f45+_0x57cbd5(0x1de)+_0x2040b0;}function $e(_0x52607d,_0x391faf,_0x2e0cf5){const _0x5054b4=_0x159d74,{home:_0x25c641,api:_0x255151}=_0x2e0cf5,_0x448e1b='saved\x20request\x20key\x20'+_0x391faf[_0x5054b4(0x296)]+_0x5054b4(0x1fe)+_0x25c641+_0x5054b4(0x23d)+_0x255151+')',_0x4621b9=!!(_0x391faf[_0x5054b4(0x241)]||_0x391faf['quoteSignature']||_0x391faf['onchainPayment']),_0x25a035=!!_0x391faf['funding']?.['steps'][_0x5054b4(0x225)](_0xe162e0=>_0xe162e0[_0x5054b4(0x1c4)]),_0x5e8033=_0x4621b9||_0x25a035;let _0x371bd9;return(_0x52607d['code']===_0x5054b4(0x26c)||_0x52607d[_0x5054b4(0x230)]===0x19a)&&_0x25a035&&!_0x4621b9?_0x371bd9=_0x448e1b+_0x5054b4(0x21f)+_0x255151+_0x5054b4(0x217)+_0x25c641+_0x5054b4(0x24d)+_0x391faf['requestKey']+_0x5054b4(0x221):(_0x52607d[_0x5054b4(0x224)]===_0x5054b4(0x26c)||_0x52607d[_0x5054b4(0x230)]===0x19a)&&!_0x5e8033?_0x371bd9=_0x448e1b+';\x20no\x20payment\x20was\x20signed.\x20Continue\x20this\x20task\x20with\x20a\x20fresh\x20quote:\x20colony\x20--api\x20'+_0x255151+_0x5054b4(0x217)+_0x25c641+_0x5054b4(0x24d)+_0x391faf['requestKey']:(_0x52607d['code']===_0x5054b4(0x26c)||_0x52607d[_0x5054b4(0x230)]===0x19a)&&_0x5e8033?_0x371bd9=_0x448e1b+';\x20a\x20payment\x20is\x20already\x20signed\x20for\x20order\x20'+_0x391faf[_0x5054b4(0x1f8)]+'.\x20Do\x20not\x20start\x20a\x20new\x20order.\x20Check\x20it\x20with:\x20colony\x20--api\x20'+_0x255151+_0x5054b4(0x217)+_0x25c641+_0x5054b4(0x1da)+_0x391faf[_0x5054b4(0x1f8)]+_0x5054b4(0x1c5):_0x5e8033&&_0x391faf[_0x5054b4(0x1f8)]?_0x371bd9=_0x448e1b+';\x20resume\x20with:\x20colony\x20--api\x20'+_0x255151+'\x20--home\x20'+_0x25c641+_0x5054b4(0x24d)+_0x391faf[_0x5054b4(0x1f8)]:_0x371bd9=_0x448e1b+';\x20retry\x20the\x20same\x20order\x20with:\x20'+be(_0x391faf,_0x2e0cf5),Object['assign'](new Error(_0x52607d[_0x5054b4(0x210)]+'\x0a'+_0x371bd9,{'cause':_0x52607d}),{'code':_0x52607d['code']??(_0x52607d['status']===0x19a&&!_0x4621b9?'quote_expired':void 0x0),'status':_0x52607d[_0x5054b4(0x230)],'data':_0x52607d[_0x5054b4(0x291)],'headers':_0x52607d[_0x5054b4(0x207)],'funding':_0x52607d[_0x5054b4(0x1eb)],'transaction':_0x52607d[_0x5054b4(0x1bd)]});}function k(_0x5e6fcb,_0x2200fc){const _0x29d172=_0x159d74;_0x5e6fcb[_0x29d172(0x1c9)]=_0x2200fc[_0x29d172(0x230)],_0x5e6fcb[_0x29d172(0x1d8)]=_0x2200fc[_0x29d172(0x1d8)]??null;const _0xfd8feb=_0x2200fc[_0x29d172(0x1d8)]?.['result'];_0xfd8feb&&(_0x5e6fcb['jobId']=_0xfd8feb[_0x29d172(0x202)]??null,_0x5e6fcb[_0x29d172(0x270)]=_0xfd8feb[_0x29d172(0x270)]??null,_0x5e6fcb[_0x29d172(0x264)]=_0xfd8feb[_0x29d172(0x264)]??null),_0x2200fc[_0x29d172(0x203)]&&(_0x5e6fcb[_0x29d172(0x20e)]=_0x2200fc[_0x29d172(0x203)][_0x29d172(0x230)],_0x5e6fcb['transactionHash']=_0x2200fc[_0x29d172(0x203)][_0x29d172(0x1d9)]??_0x5e6fcb[_0x29d172(0x253)]?.[_0x29d172(0x1d4)]??_0x5e6fcb[_0x29d172(0x253)]?.['hash']??null),_0x2200fc[_0x29d172(0x230)]===_0x29d172(0x24e)?(delete _0x5e6fcb[_0x29d172(0x273)],delete _0x5e6fcb['recoveryStatus'],_0x5e6fcb['lastError']=null,_0xfd8feb?.[_0x29d172(0x23a)]===_0x29d172(0x231)?(_0x5e6fcb['status']='refused',_0x5e6fcb[_0x29d172(0x1f6)]=_0xfd8feb[_0x29d172(0x283)]??[]):(_0x5e6fcb[_0x29d172(0x230)]=_0x29d172(0x24e),_0x5e6fcb[_0x29d172(0x1f6)]=null)):_0x2200fc[_0x29d172(0x230)]===_0x29d172(0x208)?_0x5e6fcb[_0x29d172(0x230)]=_0x29d172(0x208):_0x2200fc[_0x29d172(0x230)]===_0x29d172(0x1c0)&&(_0x5e6fcb[_0x29d172(0x230)]=_0x29d172(0x1c0));}async function H(_0x147214,_0x4c135f,_0x53990e){const _0x5738b2=_0x159d74,_0x36b0eb=await _0x141421(_0x147214,'/requests/'+_0x53990e,{'token':_0x4c135f});if(!_0x36b0eb['data']?.[_0x5738b2(0x230)])throw new Error(_0x5738b2(0x24b));return _0x36b0eb[_0x5738b2(0x291)];}async function Ge(_0x3dc2a9){const _0x36056c=_0x159d74,{home:_0x32e35e,id:_0x9f8505}=_0x3dc2a9,_0x2da584=await _0xb25b43(_0x32e35e,_0x9f8505);if(!_0x2da584[_0x36056c(0x1f8)])throw new Error(_0x36056c(0x1c8)+_0x2da584['requestKey']+_0x36056c(0x1ee));const _0x49d01f=await H(_0x2da584[_0x36056c(0x28f)],_0x2da584[_0x36056c(0x268)],_0x2da584['orderId']);return k(_0x2da584,_0x49d01f),_0x2da584['lastError']=null,await _0x32b846(_0x32e35e,_0x2da584),_0x2da584;}async function Se(_0x1ba1bb,_0x3533e2,_0x50dc60,_0x2f1c42={}){const _0x3d1a53=_0x159d74,_0x5c69be=_0x2f1c42[_0x3d1a53(0x213)]??0x2bf20,_0x40ff9e=_0x2f1c42[_0x3d1a53(0x2a4)]??0x7d0,_0x33a3cc=Date['now']()+_0x5c69be;for(;;){const _0x24dea7=(await _0x141421(_0x1ba1bb,_0x3d1a53(0x20f)+_0x50dc60,{'token':_0x3533e2,'signal':_0x2f1c42['signal']}))[_0x3d1a53(0x291)];if(!_0x24dea7?.['status'])throw new Error(_0x3d1a53(0x24b));if(_0x24dea7[_0x3d1a53(0x230)]===_0x3d1a53(0x24e)||_0x24dea7['status']==='payment_failed'||_0x24dea7[_0x3d1a53(0x230)]==='expired')return _0x24dea7;if(Date[_0x3d1a53(0x1e0)]()>=_0x33a3cc)throw new Error('timed\x20out\x20waiting\x20for\x20order\x20'+_0x50dc60+_0x3d1a53(0x218)+_0x24dea7[_0x3d1a53(0x230)]);await _0x535622(_0x40ff9e,void 0x0,{'signal':_0x2f1c42[_0x3d1a53(0x21c)]});}}async function ke(_0x195c85,_0x88f778,_0x192edd,_0x4bd9d8,_0x1cf42f){const _0x66fc66=_0x159d74;_0x192edd[_0x66fc66(0x245)]=new Date()[_0x66fc66(0x214)](),_0x192edd[_0x66fc66(0x230)]=_0x66fc66(0x29c),await _0x32b846(_0x4bd9d8,_0x192edd);const _0x259d9b=await _0x141421(_0x195c85,'/requests/'+_0x192edd[_0x66fc66(0x1f8)]+_0x66fc66(0x28b),{'method':'POST','token':_0x88f778,'headers':{'PAYMENT-SIGNATURE':_0x192edd[_0x66fc66(0x241)]},'body':{'quoteSignature':_0x192edd[_0x66fc66(0x226)]},'allowStatuses':[0x192],'signal':_0x1cf42f});if(_0x259d9b[_0x66fc66(0x230)]===0x192){const _0x2b16bb=_0x259d9b[_0x66fc66(0x291)]?.[_0x66fc66(0x27a)]??_0x259d9b[_0x66fc66(0x291)]?.[_0x66fc66(0x235)]??'payment\x20rejected',_0x59d493=new Error('payment\x20rejected:\x20'+_0x2b16bb);throw _0x59d493[_0x66fc66(0x230)]=0x192,_0x59d493[_0x66fc66(0x291)]=_0x259d9b['data'],_0x59d493;}return _0x259d9b[_0x66fc66(0x291)];}async function xe(_0x327ca0,_0x2d258c,_0x5108ac,_0x10786c){const _0x5d3d7e=_0x159d74;if(_0x327ca0[_0x5d3d7e(0x230)]!==0x19a&&_0x327ca0[_0x5d3d7e(0x224)]!==_0x5d3d7e(0x26c)||!_0x5108ac[_0x5d3d7e(0x241)]||!_0x5108ac['quoteSignature']||!_0x5108ac[_0x5d3d7e(0x1f8)])return null;try{const _0x259953=await H(_0x2d258c,_0x5108ac[_0x5d3d7e(0x268)],_0x5108ac[_0x5d3d7e(0x1f8)]);if(k(_0x5108ac,_0x259953),_0x5108ac[_0x5d3d7e(0x20d)]=null,await _0x32b846(_0x10786c,_0x5108ac),_0x5108ac[_0x5d3d7e(0x230)]===_0x5d3d7e(0x24e)||_0x5108ac[_0x5d3d7e(0x230)]===_0x5d3d7e(0x231)||_0x5108ac[_0x5d3d7e(0x230)]==='payment_failed'||_0x5108ac[_0x5d3d7e(0x230)]===_0x5d3d7e(0x1c0))return!0x0;}catch(_0x14c3c8){_0x327ca0[_0x5d3d7e(0x210)]+=_0x5d3d7e(0x259)+_0x14c3c8[_0x5d3d7e(0x210)];}return null;}async function Ie(_0xabad5b){const _0x44e918=_0x159d74;let _0xab4215=_0xabad5b[_0x44e918(0x296)];const _0x139e64=async _0xaf2ca2=>{const _0x17341c=_0x44e918;_0xab4215=_0xaf2ca2[_0x17341c(0x296)],await _0xabad5b[_0x17341c(0x255)]?.(_0xaf2ca2);};for(let _0x5d901e=0x0;;_0x5d901e++){try{const _0x5465fb=await Ee({..._0xabad5b,'requestKey':_0xab4215,'onSaved':_0x139e64});if(![_0x44e918(0x1c0),_0x44e918(0x208)][_0x44e918(0x254)](_0x5465fb[_0x44e918(0x230)])||_0x5d901e>=0x2)return _0x5465fb;}catch(_0x260335){if(_0x5d901e>=0x2||![_0x44e918(0x26c),_0x44e918(0x1e5)][_0x44e918(0x254)](_0x260335[_0x44e918(0x224)]))throw _0x260335;}_0xabad5b[_0x44e918(0x27f)]?.({'phase':_0x44e918(0x232),'message':_0x44e918(0x2a1)});}}async function Ee(_0xbb8d1e){const _0x2a5bf9=_0x159d74;_0xbb8d1e={..._0xbb8d1e,'expectedWallet':_0xbb8d1e[_0x2a5bf9(0x27b)]??_0x13d967(_0xbb8d1e)[_0x2a5bf9(0x280)]};const {api:_0x4f4c53,home:_0x48b951,file:_0x91fae4,requestKey:_0x4224c7}=_0xbb8d1e,_0x188ac4=_0x4224c7?await _0x347102(_0x48b951,_0x4224c7):null,_0x141020=_0x205f91(_0xbb8d1e[_0x2a5bf9(0x24c)]??_0x188ac4?.[_0x2a5bf9(0x24c)]),_0x112ca7=_0xbb8d1e[_0x2a5bf9(0x23f)]??_0x188ac4?.[_0x2a5bf9(0x23f)]??_0x741e48(_0xbb8d1e)['key'];_0x17a353(_0x112ca7,_0x141020);const _0x6ec779=_0xbb8d1e[_0x2a5bf9(0x1f5)]??_0x2a5bf9(0x27d);if(_0x6ec779!==_0x2a5bf9(0x27d)&&_0x6ec779!==_0x2a5bf9(0x1e4))throw new Error(_0x2a5bf9(0x1be)+_0x6ec779);const _0x3ffdc1=_0xbb8d1e[_0x2a5bf9(0x1fd)]??await de(_0x91fae4);if(!_0x3ffdc1||typeof _0x3ffdc1!=_0x2a5bf9(0x239)||Array[_0x2a5bf9(0x242)](_0x3ffdc1))throw new Error(_0x2a5bf9(0x219));const _0xcd9792=ce(_0x3ffdc1);let _0x3578db=_0x188ac4;if(_0x3578db){if(_0x339375(_0x3578db),_0x3578db[_0x2a5bf9(0x28f)]!==_0x4f4c53)throw new Error('order\x20'+_0x3578db[_0x2a5bf9(0x296)]+'\x20belongs\x20to\x20'+_0x3578db[_0x2a5bf9(0x28f)]+_0x2a5bf9(0x20c)+_0x3578db[_0x2a5bf9(0x28f)]);if(_0x3578db[_0x2a5bf9(0x1f5)]!==_0x6ec779)throw new Error(_0x2a5bf9(0x220)+_0x3578db[_0x2a5bf9(0x296)]+_0x2a5bf9(0x24a)+_0x3578db[_0x2a5bf9(0x1f5)]+_0x2a5bf9(0x25f)+_0x6ec779);if(_0x3578db[_0x2a5bf9(0x2a5)]!==_0xcd9792)throw new Error('request\x20key\x20'+_0x3578db[_0x2a5bf9(0x296)]+_0x2a5bf9(0x1d5));const _0x2fc9ed=_0x112ca7!==(_0x3578db[_0x2a5bf9(0x23f)]??_0x2a5bf9(0x1df));if(_0x2fc9ed||_0x141020!==(_0x3578db['payWith']??'IMD')){if(!_0x188fc7(_0x3578db)['canCancel'])throw new Error(_0x2fc9ed?_0x2a5bf9(0x27e):'Resume\x20this\x20order\x20with\x20its\x20original\x20payment\x20coin.');_0x3578db[_0x2a5bf9(0x23f)]=_0x112ca7,_0x3578db[_0x2a5bf9(0x24c)]=_0x141020;for(const _0x4785ff of['funding',_0x2a5bf9(0x293),_0x2a5bf9(0x263)])delete _0x3578db[_0x4785ff];await _0x32b846(_0x48b951,_0x3578db);}}else _0x3578db={'version':0x1,'requestKey':_0x4224c7??_0xa1fb4d(),'requestToken':_0x1ac927(0x20)[_0x2a5bf9(0x250)](_0x2a5bf9(0x298)),'api':_0x4f4c53,'action':_0x6ec779,'input':_0x3ffdc1,'inputHash':_0xcd9792,'submissionInput':_0xee41f4(_0x3ffdc1),..._0xbb8d1e[_0x2a5bf9(0x22d)]?{'plan':_0xbb8d1e[_0x2a5bf9(0x22d)]}:{},'createdAt':new Date()[_0x2a5bf9(0x214)](),'updatedAt':new Date()[_0x2a5bf9(0x214)](),'status':'created','paymentChain':_0x112ca7,'payWith':_0x141020},await _0x32b846(_0x48b951,_0x3578db);if(await _0xbb8d1e[_0x2a5bf9(0x255)]?.(_0x3578db),_0x3578db[_0x2a5bf9(0x230)]===_0x2a5bf9(0x24e))return{'state':_0x3578db,'status':'admitted'};if(_0x3578db['status']==='refused')return{'state':_0x3578db,'status':_0x3578db['status']};try{let _0x1414f4=_0x3578db[_0x2a5bf9(0x253)]||_0x3578db[_0x2a5bf9(0x241)]||_0x3578db[_0x2a5bf9(0x226)];if(_0x1414f4&&(Number(_0x3578db[_0x2a5bf9(0x1e3)][_0x2a5bf9(0x1ca)])*0x3e8<=Date[_0x2a5bf9(0x1e0)]()||['expired','payment_failed']['includes'](_0x3578db[_0x2a5bf9(0x230)]))){if(_0xbb8d1e[_0x2a5bf9(0x27f)]?.({'phase':_0x2a5bf9(0x232),'message':'Checking\x20the\x20original\x20payment\x20before\x20continuing...'}),k(_0x3578db,await H(_0x4f4c53,_0x3578db['requestToken'],_0x3578db[_0x2a5bf9(0x1f8)])),await _0x32b846(_0x48b951,_0x3578db),_0x3578db[_0x2a5bf9(0x230)]===_0x2a5bf9(0x24e)||_0x3578db[_0x2a5bf9(0x230)]===_0x2a5bf9(0x231))return{'state':_0x3578db,'status':_0x3578db[_0x2a5bf9(0x230)]};if(await _0x43d1bc(_0x3578db,_0xbb8d1e)){if(_0x3578db[_0x2a5bf9(0x253)]){const _0x31e057=await _0x1f93f7(_0xbb8d1e,_0x3578db[_0x2a5bf9(0x253)]['chainId']);await _0xc67fcf(_0x31e057,_0x3578db[_0x2a5bf9(0x253)])||_0xed989b(_0x3578db,_0x3578db[_0x2a5bf9(0x253)]);}_0x3578db[_0x2a5bf9(0x228)]=[..._0x3578db[_0x2a5bf9(0x228)]??[],{'orderId':_0x3578db[_0x2a5bf9(0x1f8)],'quote':_0x3578db[_0x2a5bf9(0x1e3)],'onchainQuotes':_0x3578db['onchainQuotes'],'payment':_0x3578db[_0x2a5bf9(0x203)],'paymentHeader':_0x3578db[_0x2a5bf9(0x241)],'quoteSignature':_0x3578db[_0x2a5bf9(0x226)],'onchainPayment':_0x3578db['onchainPayment'],'transactionHash':_0x3578db[_0x2a5bf9(0x1d9)],'submittedAt':_0x3578db[_0x2a5bf9(0x245)],'unpaid':!0x0}];for(const _0x395db5 of[_0x2a5bf9(0x203),_0x2a5bf9(0x241),'paymentHash',_0x2a5bf9(0x226),'onchainPayment',_0x2a5bf9(0x1d9),'submittedAt',_0x2a5bf9(0x20e)])delete _0x3578db[_0x395db5];_0x1414f4=!0x1,delete _0x3578db[_0x2a5bf9(0x273)],await _0x32b846(_0x48b951,_0x3578db);}else throw Object[_0x2a5bf9(0x212)](new Error(_0x2a5bf9(0x1bc)),{'code':_0x2a5bf9(0x276)});}if(!_0x1414f4&&_0x3578db['orderId']&&([_0x2a5bf9(0x1c0),'payment_failed'][_0x2a5bf9(0x254)](_0x3578db[_0x2a5bf9(0x230)])||Number(_0x3578db[_0x2a5bf9(0x1e3)][_0x2a5bf9(0x1ca)])*0x3e8<=Date[_0x2a5bf9(0x1e0)]()+0x7530)){_0x3578db[_0x2a5bf9(0x290)]=[..._0x3578db[_0x2a5bf9(0x290)]??[],{'orderId':_0x3578db[_0x2a5bf9(0x1f8)],'requestKey':_0x3578db[_0x2a5bf9(0x1d6)]??_0x3578db[_0x2a5bf9(0x296)],'quote':_0x3578db[_0x2a5bf9(0x1e3)],'onchainQuotes':_0x3578db[_0x2a5bf9(0x251)],'status':_0x3578db[_0x2a5bf9(0x230)]}],_0x3578db[_0x2a5bf9(0x1d6)]=_0xa1fb4d();for(const _0x45cccc of[_0x2a5bf9(0x1f8),_0x2a5bf9(0x21b),_0x2a5bf9(0x1e3),_0x2a5bf9(0x251),_0x2a5bf9(0x1e7),_0x2a5bf9(0x1c9),_0x2a5bf9(0x20e),_0x2a5bf9(0x293)])delete _0x3578db[_0x45cccc];_0x3578db[_0x2a5bf9(0x230)]=_0x2a5bf9(0x246),_0x3578db[_0x2a5bf9(0x20d)]=null,await _0x32b846(_0x48b951,_0x3578db);}if(!_0x3578db[_0x2a5bf9(0x1f8)]){_0xbb8d1e[_0x2a5bf9(0x27f)]?.({'phase':_0x2a5bf9(0x1e3),'message':_0x2a5bf9(0x27c)});const _0xc46838=_0x3578db[_0x2a5bf9(0x265)]??_0x3578db[_0x2a5bf9(0x1fd)],_0x2512d4=await me(_0x4f4c53,_0xc46838,_0x6ec779,_0xbb8d1e[_0x2a5bf9(0x21c)]);if(_0x3578db['check']=_0x2512d4,_0xbb8d1e['onCheck']&&await _0xbb8d1e[_0x2a5bf9(0x285)](_0x2512d4),_0x2512d4[_0x2a5bf9(0x23b)][_0x2a5bf9(0x1d0)]>0x0)return _0x3578db[_0x2a5bf9(0x230)]=_0x2a5bf9(0x26b),_0x3578db[_0x2a5bf9(0x20d)]=null,await _0x32b846(_0x48b951,_0x3578db),{'state':_0x3578db,'status':_0x2a5bf9(0x26b),'check':_0x2512d4};if(_0x6ec779==='job.continue'){const _0x47a66a=await _0x43d4f3(_0xbb8d1e);_0x3578db[_0x2a5bf9(0x26d)]=await P({'api':_0x4f4c53,'input':_0x3ffdc1,'check':_0x2512d4,'account':_0x47a66a,'owner':_0x3578db[_0x2a5bf9(0x26d)]});}let _0x169887;try{_0x169887=await T(_0x4f4c53,_0x3578db['requestToken'],_0x3578db[_0x2a5bf9(0x1d6)]??_0x3578db[_0x2a5bf9(0x296)],_0xc46838,_0x6ec779,_0xbb8d1e[_0x2a5bf9(0x21c)]);}catch(_0x103811){if(_0x103811['status']!==0x19a)throw _0x103811;_0x3578db[_0x2a5bf9(0x1d6)]=_0xa1fb4d(),await _0x32b846(_0x48b951,_0x3578db),_0x169887=await T(_0x4f4c53,_0x3578db[_0x2a5bf9(0x268)],_0x3578db[_0x2a5bf9(0x1d6)],_0xc46838,_0x6ec779,_0xbb8d1e[_0x2a5bf9(0x21c)]);}_0x3578db['orderId']=_0x169887['id'],_0x3578db[_0x2a5bf9(0x21b)]=_0x169887[_0x2a5bf9(0x230)],_0x3578db[_0x2a5bf9(0x1e3)]=_0x169887['quote'],_0x3578db[_0x2a5bf9(0x251)]=_0x169887[_0x2a5bf9(0x25b)],_0x3578db[_0x2a5bf9(0x230)]=_0x2a5bf9(0x248),_0x3578db[_0x2a5bf9(0x20d)]=null,await _0x32b846(_0x48b951,_0x3578db);}if(_0x2e1fc7(_0x4ccfa2(_0x3578db)),!_0x3578db[_0x2a5bf9(0x253)]&&(!_0x3578db[_0x2a5bf9(0x241)]||!_0x3578db[_0x2a5bf9(0x226)])){if(_0x3578db[_0x2a5bf9(0x1e7)])C(_0x3578db['challenge'],_0x3578db);else{const _0x28ad6d=await le(_0x4f4c53,_0x3578db[_0x2a5bf9(0x268)],_0x3578db['orderId'],_0xbb8d1e[_0x2a5bf9(0x21c)]);C(_0x28ad6d,_0x3578db),_0x3578db[_0x2a5bf9(0x1e7)]=_0x28ad6d,_0x3578db[_0x2a5bf9(0x230)]=_0x2a5bf9(0x204),await _0x32b846(_0x48b951,_0x3578db);}let _0x16cbc0;if(_0x6ec779===_0x2a5bf9(0x1e4)&&(_0x16cbc0=await _0x43d4f3(_0xbb8d1e),_0x3578db[_0x2a5bf9(0x26d)]=await P({'api':_0x4f4c53,'input':_0x3ffdc1,'check':_0x3578db['check'],'account':_0x16cbc0,'owner':_0x3578db['owner']}),await _0x32b846(_0x48b951,_0x3578db)),await _0x3ce937(_0x3578db,_0xbb8d1e),_0xbb8d1e['signal']?.[_0x2a5bf9(0x282)](),_0x339375(await _0xb25b43(_0x48b951,_0x3578db[_0x2a5bf9(0x296)])),await _0x32b846(_0x48b951,_0x3578db),await _0x3dc9d5(_0x3578db,_0xbb8d1e,_0x629c1a=>qe(_0x629c1a,_0xbb8d1e)),_0x3578db[_0x2a5bf9(0x23f)]===_0x2a5bf9(0x1bf))await _0x3a46fa(_0x3578db,_0xbb8d1e);else{_0xbb8d1e[_0x2a5bf9(0x27f)]?.({'phase':_0x2a5bf9(0x21d),'message':_0x2a5bf9(0x22e)}),_0xbb8d1e['signal']?.[_0x2a5bf9(0x282)](),_0x339375(await _0xb25b43(_0x48b951,_0x3578db[_0x2a5bf9(0x296)])),_0x16cbc0=await _0x43d4f3(_0xbb8d1e),_0xbb8d1e['signal']?.['throwIfAborted'](),_0x339375(await _0xb25b43(_0x48b951,_0x3578db['requestKey'])),_0x3578db[_0x2a5bf9(0x260)]=_0x16cbc0['address'],await _0x32b846(_0x48b951,_0x3578db);const _0x16f1fb=await he(_0x16cbc0,_0x3578db[_0x2a5bf9(0x1e7)]),_0x1de306=await we(_0x16cbc0,_0x3578db['challenge'],_0x16f1fb[_0x2a5bf9(0x277)]);_0x3578db[_0x2a5bf9(0x203)]=_0x16f1fb[_0x2a5bf9(0x203)],_0x3578db[_0x2a5bf9(0x241)]=_0x16f1fb[_0x2a5bf9(0x241)],_0x3578db['paymentHash']=_0x16f1fb[_0x2a5bf9(0x277)],_0x3578db['quoteSignature']=_0x1de306,_0x3578db[_0x2a5bf9(0x230)]=_0x2a5bf9(0x1b9),_0x3578db[_0x2a5bf9(0x20d)]=null,await _0x32b846(_0x48b951,_0x3578db);}}_0x3578db[_0x2a5bf9(0x253)]?await _0x1947ba(_0x3578db,_0xbb8d1e):(_0xbb8d1e[_0x2a5bf9(0x27f)]?.({'phase':'broadcasting','message':_0x2a5bf9(0x278)}),await ke(_0x4f4c53,_0x3578db[_0x2a5bf9(0x268)],_0x3578db,_0x48b951,_0xbb8d1e[_0x2a5bf9(0x21c)])),_0xbb8d1e[_0x2a5bf9(0x27f)]?.({'phase':'admission','message':'Payment\x20submitted.\x20Waiting\x20for\x20IMD\x20to\x20accept\x20the\x20task...'});const _0x2a21ce=await Se(_0x4f4c53,_0x3578db[_0x2a5bf9(0x268)],_0x3578db[_0x2a5bf9(0x1f8)],_0xbb8d1e);return k(_0x3578db,_0x2a21ce),delete _0x3578db[_0x2a5bf9(0x262)],await _0x32b846(_0x48b951,_0x3578db),{'state':_0x3578db,'status':_0x3578db[_0x2a5bf9(0x230)]};}catch(_0x9865db){if(['order_cancelled',_0x2a5bf9(0x1d1),_0x2a5bf9(0x1f1)]['includes'](_0x9865db[_0x2a5bf9(0x224)]))throw _0x9865db;if(_0x339375(await _0xb25b43(_0x48b951,_0x3578db[_0x2a5bf9(0x296)])),await xe(_0x9865db,_0x4f4c53,_0x3578db,_0x48b951))return{'state':_0x3578db,'status':_0x3578db['status']};throw _0x3578db['lastError']=_0x9865db[_0x2a5bf9(0x210)],[_0x2a5bf9(0x1ce),_0x2a5bf9(0x276)][_0x2a5bf9(0x254)](_0x9865db[_0x2a5bf9(0x224)])&&(_0x3578db[_0x2a5bf9(0x262)]=_0x9865db[_0x2a5bf9(0x224)]),_0x9865db[_0x2a5bf9(0x1bd)]&&(_0x3578db['pendingTransaction']=_0x9865db[_0x2a5bf9(0x1bd)]),_0x9865db['status']===0x192&&(_0x3578db[_0x2a5bf9(0x230)]=_0x2a5bf9(0x1b9)),await _0x32b846(_0x48b951,_0x3578db),_0x9865db[_0x2a5bf9(0x224)]===_0x2a5bf9(0x247)?_0x9865db:$e(_0x9865db,_0x3578db,{'file':_0x91fae4,'home':_0x48b951,'api':_0x4f4c53,'retryCommand':_0xbb8d1e[_0x2a5bf9(0x1f2)]});}}async function Le(_0x1813fe){const _0x3014ab=_0x159d74,{home:_0x523ea4,id:_0x2b2ac7}=_0x1813fe,_0xc6da8a=await _0xb25b43(_0x523ea4,_0x2b2ac7);if(_0x339375(_0xc6da8a),_0xc6da8a[_0x3014ab(0x230)]===_0x3014ab(0x24e)||_0xc6da8a[_0x3014ab(0x230)]==='refused')return _0xc6da8a;if(_0xc6da8a[_0x3014ab(0x28f)]!==_0x1813fe[_0x3014ab(0x28f)])throw new Error(_0x3014ab(0x1c8)+_0xc6da8a[_0x3014ab(0x296)]+_0x3014ab(0x1cd)+_0xc6da8a[_0x3014ab(0x28f)]+_0x3014ab(0x20c)+_0xc6da8a['api']);return(await Ie({..._0x1813fe,'requestKey':_0xc6da8a['requestKey'],'input':_0xc6da8a[_0x3014ab(0x1fd)],'action':_0xc6da8a[_0x3014ab(0x1f5)],'paymentChain':_0xc6da8a[_0x3014ab(0x23f)]??'ethereum','payWith':_0xc6da8a[_0x3014ab(0x24c)]}))[_0x3014ab(0x256)];}export{k as applyOrderStatus,P as assertContinueOwner,he as buildPayment,S as canonicalJson,me as checkJob,H as fetchOrderStatus,ce as hashJson,ge as paymentSummary,Se as pollOrder,Ie as publishJob,fe as quoteApprovalTypedData,T as quoteJob,de as readJobFile,Ge as refreshOrder,we as signQuoteApproval,Le as submitOrder};
1
+ function _0x2e93(_0x27a3ac,_0x5c9049){_0x27a3ac=_0x27a3ac-0x14a;const _0x2e9383=_0x5c90();let _0x1d7c03=_0x2e9383[_0x27a3ac];return _0x1d7c03;}const _0x36fb7c=_0x2e93;import{createHash as _0x58ae59,randomBytes as _0x38940a,randomUUID as _0x4bc948}from'node:crypto';import{readFile as _0x5448e9}from'node:fs/promises';import{setTimeout as _0x57e693}from'node:timers/promises';import{x402Client as _0x42a9df}from'@x402/core/client';import{encodePaymentSignatureHeader as _0xf68287}from'@x402/core/http';import{ExactEvmScheme as _0x2d4b5f}from'@x402/evm/exact/client';import{formatUnits as _0x149f77,sha256 as _0x21f67d,stringToBytes as _0x4b7885}from'viem';import{confirmAction as _0x1ed7da,getPublicRpcClient as _0x1bca65,getSigner as _0x378bb3,request as _0x471d3d}from'../shared.mjs';import{assertOrderNotCancelled as _0x5ee9e9,findOrder as _0x3c808d,loadOrder as _0x4892b4,orderActions as _0x433aec,saveOrder as _0x455842}from'./orders.mjs';import{assertQuotePayment as _0x56002e,orderPayment as _0x15384f}from'./payments.mjs';import{networkName as _0x1f6747,selectedPaymentNetwork as _0x299ff1}from'./payment-networks.mjs';import{signOnchainPayment as _0x2d4acb,submitOnchainPayment as _0x569a55}from'./onchain-payment.mjs';import{coinSymbol as _0x2a51eb,paymentCoin as _0x4d1749}from'./payment-coins.mjs';import{fundingSummary as _0x373770}from'./funding-state.mjs';import{fundOrder as _0x2a2380}from'./funding.mjs';import{walletInfo as _0x2ebe21}from'./local-wallet.mjs';import{selectSupport as _0x39d96d,supportView as _0x4107a0}from'./support.mjs';import{authorizationUnpaid as _0x562e75}from'./payment-recovery.mjs';import{retainExpiredNonce as _0x3b797b}from'./transaction-recovery.mjs';import{transactionReceipt as _0x56b47e}from'./transactions.mjs';import{withSubmissionAttribution as _0x4785d2}from'./submission-attribution.mjs';function S(_0x5ba54f){const _0x20b7e8=_0x2e93;return _0x5ba54f===null?_0x20b7e8(0x161):Array[_0x20b7e8(0x238)](_0x5ba54f)?'['+_0x5ba54f[_0x20b7e8(0x18c)](S)[_0x20b7e8(0x1ad)](',')+']':typeof _0x5ba54f==_0x20b7e8(0x177)?'{'+Object['keys'](_0x5ba54f)[_0x20b7e8(0x172)]()[_0x20b7e8(0x18c)](_0x472ca3=>JSON[_0x20b7e8(0x16a)](_0x472ca3)+':'+S(_0x5ba54f[_0x472ca3]))['join'](',')+'}':JSON[_0x20b7e8(0x16a)](_0x5ba54f);}function ce(_0x3965af){const _0x23c1c0=_0x2e93;return _0x58ae59(_0x23c1c0(0x1b8))[_0x23c1c0(0x22c)](S(_0x3965af))['digest']('hex');}async function de(_0x31f45d){const _0x5b6408=_0x2e93;let _0x4817a6;try{_0x4817a6=JSON[_0x5b6408(0x215)](await _0x5448e9(_0x31f45d,_0x5b6408(0x171)));}catch(_0x1de5d9){throw _0x1de5d9 instanceof SyntaxError?new Error('invalid\x20JSON\x20in\x20'+_0x31f45d+':\x20'+_0x1de5d9[_0x5b6408(0x235)]):_0x1de5d9;}if(!_0x4817a6||typeof _0x4817a6!='object'||Array[_0x5b6408(0x238)](_0x4817a6))throw new Error(_0x31f45d+_0x5b6408(0x220));return _0x4817a6;}async function me(_0x27be4c,_0xee708b,_0x120e18=_0x36fb7c(0x153),_0x589712){const _0x46f080=_0x36fb7c,_0x958dd6=await _0x471d3d(_0x27be4c,_0x46f080(0x17a),{'method':_0x46f080(0x214),'query':!0x0,'body':{'action':_0x120e18,'input':_0xee708b},'signal':_0x589712});if(!Array[_0x46f080(0x238)](_0x958dd6[_0x46f080(0x1cc)]?.[_0x46f080(0x194)]))throw new Error(_0x46f080(0x1b2));return _0x958dd6[_0x46f080(0x1cc)];}async function T(_0x5b6b94,_0x2974d3,_0x5d2cb6,_0x4e2310,_0x1a0464='job.open',_0x50f528){const _0x44a342=_0x36fb7c,_0x706343=await _0x471d3d(_0x5b6b94,_0x44a342(0x162),{'method':_0x44a342(0x214),'token':_0x2974d3,'body':{'requestKey':_0x5d2cb6,'action':_0x1a0464,'input':_0x4e2310},'signal':_0x50f528}),_0x1b9049=_0x706343[_0x44a342(0x1cc)]?.[_0x44a342(0x183)];if(!_0x1b9049?.['id']||!_0x1b9049['quote']?.[_0x44a342(0x199)])throw new Error(_0x44a342(0x219));return{..._0x1b9049,'onchain':_0x706343[_0x44a342(0x1cc)][_0x44a342(0x224)]};}async function pe(_0x15ad16,_0x4916dc,_0x23a376){const _0x54ada4=_0x36fb7c;if(_0x23a376?.[_0x54ada4(0x16c)])return _0x23a376[_0x54ada4(0x16c)];const _0x5e134b=_0x4916dc?.['parentJobId'];if(!_0x5e134b)throw new Error('job.continue\x20input\x20is\x20missing\x20parentJobId');const _0x3fa42c=(await _0x471d3d(_0x15ad16,_0x54ada4(0x182)+encodeURIComponent(_0x5e134b)))[_0x54ada4(0x1cc)]?.[_0x54ada4(0x1a5)];if(!_0x3fa42c)throw new Error('cannot\x20verify\x20the\x20project\x20owner\x20for\x20'+_0x5e134b+':\x20the\x20parent\x20job\x20has\x20no\x20paidBy');return _0x3fa42c;}function ye(_0x5c9407,_0x2478b7){const _0x1a8c51=_0x36fb7c,_0x325f8d=new Error(_0x1a8c51(0x1e6)+_0x5c9407+'\x20is\x20not\x20the\x20project\x20owner\x20'+_0x2478b7+_0x1a8c51(0x216));return _0x325f8d[_0x1a8c51(0x1de)]=_0x1a8c51(0x205),_0x325f8d;}async function v({api:_0x3003a9,input:_0xbe284f,check:_0x33a46d,account:_0x1b1c52,owner:_0x161d4b}){const _0x47290a=_0x36fb7c,_0x46accf=_0x161d4b??await pe(_0x3003a9,_0xbe284f,_0x33a46d);if(!_0x1b1c52?.[_0x47290a(0x1d7)])throw new Error(_0x47290a(0x173));if(!C(_0x46accf,_0x1b1c52['address']))throw ye(_0x1b1c52['address'],_0x46accf);return _0x46accf;}async function le(_0x4d21d4,_0x5246b6,_0x536b85,_0x42ebfb){const _0x578533=_0x36fb7c,_0x5013c3=await _0x471d3d(_0x4d21d4,_0x578533(0x1bf)+_0x536b85+_0x578533(0x1a3),{'method':_0x578533(0x214),'token':_0x5246b6,'allowStatuses':[0x192],'signal':_0x42ebfb});if(_0x5013c3[_0x578533(0x1d8)]!==0x192)throw new Error(_0x578533(0x213)+_0x5013c3['status']);const _0x51a8f4=_0x5013c3[_0x578533(0x1cc)];if(!Array[_0x578533(0x238)](_0x51a8f4?.[_0x578533(0x1f2)])||_0x51a8f4[_0x578533(0x1f2)][_0x578533(0x187)]===0x0)throw new Error(_0x578533(0x1b3));if(!_0x51a8f4[_0x578533(0x1e7)]||!_0x51a8f4[_0x578533(0x176)])throw new Error(_0x578533(0x1bb));return _0x51a8f4;}function C(_0x5e8226,_0x10ed0f){const _0x55f408=_0x36fb7c;return String(_0x5e8226)['toLowerCase']()===String(_0x10ed0f)[_0x55f408(0x1f4)]();}function j(_0x3b6008,_0x3da823){const _0x597552=_0x36fb7c,_0x28eedb=_0x3b6008[_0x597552(0x1f2)][0x0],_0x550300=_0x3da823['quote'][_0x597552(0x199)];if(_0x3da823[_0x597552(0x1c6)]?.['action']!==_0x3da823[_0x597552(0x211)])throw new Error(_0x597552(0x1fe)+(_0x3da823[_0x597552(0x1c6)]?.[_0x597552(0x211)]??'<missing>')+_0x597552(0x154)+_0x3da823[_0x597552(0x211)]);if(_0x3b6008[_0x597552(0x1c6)]?.[_0x597552(0x211)]!==_0x3da823[_0x597552(0x211)])throw new Error(_0x597552(0x166)+(_0x3b6008[_0x597552(0x1c6)]?.[_0x597552(0x211)]??'<missing>')+_0x597552(0x154)+_0x3da823[_0x597552(0x211)]);if(_0x3b6008[_0x597552(0x1c6)]?.['id']!==_0x3da823[_0x597552(0x23b)])throw new Error(_0x597552(0x16d));if(_0x3b6008[_0x597552(0x1c6)]?.['quoteHash']!==_0x3da823[_0x597552(0x1c6)][_0x597552(0x1da)])throw new Error('payment\x20challenge\x20quoteHash\x20does\x20not\x20match\x20the\x20saved\x20quote');if(_0x3b6008[_0x597552(0x1c6)]?.[_0x597552(0x14d)]!==_0x3da823[_0x597552(0x1c6)][_0x597552(0x14d)])throw new Error(_0x597552(0x168));for(const [_0x40ae32,_0x113697]of[[_0x597552(0x212),_0x28eedb],[_0x597552(0x185),_0x3b6008[_0x597552(0x1c6)][_0x597552(0x199)]]])for(const _0x287d87 of[_0x597552(0x1f8),_0x597552(0x1ec),_0x597552(0x1be),_0x597552(0x22d)])if(!(_0x287d87==='asset'||_0x287d87===_0x597552(0x22d)?C(_0x113697?.[_0x287d87],_0x550300[_0x287d87]):String(_0x113697?.[_0x287d87])===String(_0x550300[_0x287d87])))throw new Error(_0x40ae32+'\x20'+_0x287d87+_0x597552(0x1e2));if(_0x28eedb[_0x597552(0x232)]?.[_0x597552(0x203)]!==_0x597552(0x1ef))throw new Error(_0x597552(0x201));if(!_0x3b6008[_0x597552(0x16f)]||typeof _0x3b6008[_0x597552(0x16f)]!=_0x597552(0x177)||Array[_0x597552(0x238)](_0x3b6008[_0x597552(0x16f)]))throw new Error(_0x597552(0x192));if(Number(_0x3b6008['quote']['expiresAt'])*0x3e8<=Date[_0x597552(0x15d)]()){const _0x2ea512=new Error(_0x597552(0x1a1));throw _0x2ea512[_0x597552(0x1de)]='quote_expired',_0x2ea512;}}async function he(_0x4ec3de,_0x17ebbc){const _0x3498ed=_0x36fb7c,_0x3fe860=_0x17ebbc[_0x3498ed(0x1f2)][0x0],_0xa67073=Number(_0x17ebbc[_0x3498ed(0x1c6)][_0x3498ed(0x14d)]),_0x49de28=_0xa67073-Math[_0x3498ed(0x1a7)](Date[_0x3498ed(0x15d)]()/0x3e8);if(!Number[_0x3498ed(0x14e)](_0x49de28)||_0x49de28<=0x1){const _0xd3215f=new Error(_0x3498ed(0x1ae));throw _0xd3215f[_0x3498ed(0x1de)]=_0x3498ed(0x1bd),_0xd3215f;}if(!Number[_0x3498ed(0x14e)](Number(_0x3fe860[_0x3498ed(0x1a2)])))throw new Error(_0x3498ed(0x179));const _0x401027=Math[_0x3498ed(0x1f0)](0x1,Math[_0x3498ed(0x236)](Number(_0x3fe860[_0x3498ed(0x1a2)]),_0x49de28-0x1)),_0x297343={..._0x3fe860,'maxTimeoutSeconds':_0x401027},_0x3f2c4a=await _0x42a9df['fromConfig']({'schemes':[{'network':_0x297343[_0x3498ed(0x1f8)],'client':new _0x2d4b5f(_0x4ec3de)}],'spendControls':{'allowedAssets':[{'network':_0x297343[_0x3498ed(0x1f8)],'asset':_0x297343[_0x3498ed(0x1ec)],'maxAmountPerPayment':_0x297343['amount']}]}})[_0x3498ed(0x20c)]({'x402Version':0x2,'resource':_0x17ebbc['resource'],'accepts':[_0x297343]}),{extensions:_0x4bb5a7,..._0x29816d}=_0x3f2c4a,_0x1c554c=JSON[_0x3498ed(0x215)](JSON[_0x3498ed(0x16a)]({..._0x29816d,'accepted':_0x3fe860})),_0x116d66=_0x1c554c[_0x3498ed(0x21d)]?.['permit2Authorization']?.['deadline'];if(_0x116d66===void 0x0||BigInt(_0x116d66)>=BigInt(_0xa67073))throw new Error('payment\x20deadline\x20'+_0x116d66+_0x3498ed(0x180)+_0xa67073);return{'payment':_0x1c554c,'paymentHeader':_0xf68287(_0x1c554c),'paymentHash':_0x21f67d(_0x4b7885(S(_0x1c554c)))};}function E(_0x47af0,_0x1b70a1){const _0x1cc076=_0x36fb7c,_0x1f7aa3=String(_0x47af0??'')[_0x1cc076(0x1f6)](/^0x/,'');if(!/^[0-9a-f]{64}$/i['test'](_0x1f7aa3))throw new Error('invalid\x20'+_0x1b70a1+':\x20'+_0x47af0);return'0x'+_0x1f7aa3;}function fe(_0x50cec7,_0x3d57d0){const _0xf172b0=_0x36fb7c,_0x24b63e=_0x50cec7[_0xf172b0(0x1c6)],_0x22ed39=Number(String(_0x24b63e[_0xf172b0(0x199)][_0xf172b0(0x1f8)])['slice'](0x7));if(!Number[_0xf172b0(0x14e)](_0x22ed39)||_0x22ed39<=0x0)throw new Error(_0xf172b0(0x188)+_0x24b63e[_0xf172b0(0x199)]['network']);return{'domain':{'name':'IdentityMD\x20Paid\x20Action','version':'1','chainId':_0x22ed39},'types':{'QuoteApproval':[{'name':_0xf172b0(0x20f),'type':_0xf172b0(0x1f5)},{'name':_0xf172b0(0x176),'type':_0xf172b0(0x234)},{'name':'quoteId','type':_0xf172b0(0x1f5)},{'name':_0xf172b0(0x1da),'type':'bytes32'},{'name':_0xf172b0(0x209),'type':'bytes32'},{'name':_0xf172b0(0x211),'type':_0xf172b0(0x1f5)},{'name':_0xf172b0(0x1ec),'type':_0xf172b0(0x1d7)},{'name':_0xf172b0(0x1be),'type':_0xf172b0(0x197)},{'name':'payTo','type':_0xf172b0(0x1d7)},{'name':_0xf172b0(0x14d),'type':_0xf172b0(0x197)}]},'primaryType':_0xf172b0(0x222),'message':{'resource':_0x50cec7[_0xf172b0(0x1e7)],'requesterScopeHash':E(_0x50cec7[_0xf172b0(0x176)],_0xf172b0(0x176)),'quoteId':_0x24b63e['id'],'quoteHash':E(_0x24b63e[_0xf172b0(0x1da)],_0xf172b0(0x1da)),'paymentHash':E(_0x3d57d0,_0xf172b0(0x209)),'action':_0x24b63e[_0xf172b0(0x211)],'asset':_0x24b63e[_0xf172b0(0x199)][_0xf172b0(0x1ec)],'amount':BigInt(_0x24b63e[_0xf172b0(0x199)][_0xf172b0(0x1be)]),'payTo':_0x24b63e['payment'][_0xf172b0(0x22d)],'expiresAt':BigInt(_0x24b63e['expiresAt'])}};}async function we(_0x388ac6,_0x3921b3,_0x229e15){const _0x2e2e3b=_0x36fb7c,_0x26f8ab=fe(_0x3921b3,_0x229e15);return _0x388ac6[_0x2e2e3b(0x221)](_0x26f8ab);}function ge(_0x2a927c){const _0x1ea63a=_0x36fb7c,_0x36d878=_0x15384f(_0x2a927c),_0x13c8a6=_0x149f77(BigInt(_0x36d878[_0x1ea63a(0x1be)]),_0x36d878[_0x1ea63a(0x15b)]),_0x4263d6=_0x2a927c['funding']?_0x373770(_0x2a927c[_0x1ea63a(0x191)]):null,_0xfc12af=_0x2a927c[_0x1ea63a(0x1d9)]?[(_0x2a927c['payWith']==='ETH'?_0x1ea63a(0x1ee):_0x1ea63a(0x1e5))+_0x2a927c[_0x1ea63a(0x1d9)][_0x1ea63a(0x15f)]+_0x1ea63a(0x167)]:[];if(!_0x2a927c['challenge']?.['input']||typeof _0x2a927c[_0x1ea63a(0x21b)][_0x1ea63a(0x16f)]!='object')throw new Error('payment\x20challenge\x20is\x20missing\x20the\x20prepared\x20input');if(_0x2a927c[_0x1ea63a(0x233)]){const _0x31eac5=_0x2a927c[_0x1ea63a(0x1ea)]??_0x1ea63a(0x22b);return[_0x1ea63a(0x175)+_0x2a927c[_0x1ea63a(0x16f)][_0x1ea63a(0x155)],..._0x2a927c[_0x1ea63a(0x233)]['deliverables'][_0x1ea63a(0x18c)](_0x5729d0=>_0x1ea63a(0x18b)+_0x5729d0),'Price:\x20'+_0x13c8a6+_0x1ea63a(0x1b9),'Pay\x20with:\x20'+_0x31eac5+_0x1ea63a(0x16e)+_0x1f6747(_0x2a927c['paymentChain']),..._0x4263d6?[_0x31eac5===_0x1ea63a(0x22b)?_0x1ea63a(0x231)+_0x4263d6['display'][_0x1ea63a(0x199)]:_0x4263d6[_0x1ea63a(0x17e)]?'Payment:\x20conversion\x20already\x20confirmed\x20('+_0x4263d6[_0x1ea63a(0x14b)][_0x1ea63a(0x199)]+_0x1ea63a(0x20d):_0x1ea63a(0x193)+(_0x4263d6[_0x1ea63a(0x14b)][_0x1ea63a(0x208)]??_0x4263d6[_0x1ea63a(0x14b)][_0x1ea63a(0x199)])+_0x1ea63a(0x1dd)+_0x4263d6[_0x1ea63a(0x14b)][_0x1ea63a(0x199)]+_0x1ea63a(0x223),'Gas\x20(network\x20fee,\x20paid\x20in\x20ETH):\x20at\x20most\x20'+_0x4263d6[_0x1ea63a(0x14b)][_0x1ea63a(0x1c8)]+(_0x31eac5==='ETH'?_0x1ea63a(0x16b):''),..._0x31eac5===_0x1ea63a(0x239)?[_0x1ea63a(0x19e)+_0x4263d6[_0x1ea63a(0x14b)][_0x1ea63a(0x1ba)]]:[],..._0x4263d6[_0x1ea63a(0x1d1)]!==_0x1ea63a(0x22b)?['Conversion\x20and\x20task\x20payment\x20are\x20separate\x20transactions.']:[]]:_0xfc12af,_0x1ea63a(0x1e4)]['join']('\x0a');}return['Order:\x20'+_0x2a927c[_0x1ea63a(0x23b)],_0x1ea63a(0x18a)+(_0x2a927c[_0x1ea63a(0x211)]??'job.open'),_0x1ea63a(0x181)+_0x36d878[_0x1ea63a(0x1f8)],_0x1ea63a(0x23a)+_0x13c8a6+'\x20('+_0x36d878['amount']+_0x1ea63a(0x1ca),'Asset:\x20'+_0x36d878['asset'],_0x1ea63a(0x1fa)+_0x36d878[_0x1ea63a(0x22d)],_0x1ea63a(0x21c)+new Date(Number(_0x2a927c[_0x1ea63a(0x1c6)][_0x1ea63a(0x14d)])*0x3e8)[_0x1ea63a(0x202)](),..._0x4263d6?[_0x1ea63a(0x1a6)+_0x4263d6[_0x1ea63a(0x1ba)],..._0x4263d6[_0x1ea63a(0x1d1)]!==_0x1ea63a(0x22b)?['Conversion\x20and\x20task\x20payment\x20are\x20separate\x20transactions.']:[]]:[],..._0xfc12af,'Requested\x20objective:\x20'+String(_0x2a927c[_0x1ea63a(0x16f)][_0x1ea63a(0x155)]??''),_0x1ea63a(0x1ce),JSON['stringify'](_0x2a927c['challenge'][_0x1ea63a(0x16f)],null,0x2)][_0x1ea63a(0x1ad)]('\x0a');}async function qe(_0x44585b,_0x42d2da){const _0x413939=_0x36fb7c;if(_0x42d2da[_0x413939(0x229)])return _0x42d2da[_0x413939(0x229)](_0x44585b);const _0x5451d8=_0x4107a0(_0x44585b),_0x2a47f7=_0x5451d8?'\x0aOptional\x20support:\x20'+_0x5451d8['amount']+'\x20IMD\x20·\x20Help\x20us\x20make\x20Colony\x20better.\x0aTotal:\x20'+_0x5451d8[_0x413939(0x22e)]+'\x20IMD\x20+\x20network\x20fees\x0aSupport\x20recipient:\x20'+_0x5451d8[_0x413939(0x163)]+_0x413939(0x156):'';await _0x1ed7da(_0x413939(0x23c)+ge(_0x44585b)+_0x2a47f7,_0x42d2da);}function be(_0x275001,_0x12eaca){const _0x2bb277=_0x36fb7c;if(typeof _0x12eaca[_0x2bb277(0x217)]==_0x2bb277(0x227))return _0x12eaca[_0x2bb277(0x217)](_0x275001);if(_0x12eaca[_0x2bb277(0x217)])return _0x12eaca[_0x2bb277(0x217)];const {file:_0x5114c7,home:_0x3aeea0,api:_0x321ab1}=_0x12eaca,_0x2fb8c2='colony\x20--api\x20'+_0x321ab1+_0x2bb277(0x20e)+_0x3aeea0,_0x19f240=_0x275001['requestKey'];if(_0x275001[_0x2bb277(0x211)]==='job.continue'){const _0x294873=_0x275001[_0x2bb277(0x16f)]?.[_0x2bb277(0x1c7)]??_0x2bb277(0x157);return _0x5114c7?_0x2fb8c2+_0x2bb277(0x1b7)+_0x294873+_0x2bb277(0x1f7)+_0x5114c7+'\x20--request-key\x20'+_0x19f240:_0x2fb8c2+'\x20task\x20continue\x20'+_0x294873+_0x2bb277(0x1aa)+_0x19f240;}return _0x5114c7?_0x2fb8c2+_0x2bb277(0x22f)+_0x5114c7+_0x2bb277(0x1aa)+_0x19f240:_0x2fb8c2+_0x2bb277(0x1d6)+_0x19f240;}function $e(_0x16eb6c,_0x36cae4,_0x3dc724){const _0xada154=_0x36fb7c,{home:_0x5e72a9,api:_0x4533da}=_0x3dc724,_0x4e529e=_0xada154(0x1f1)+_0x36cae4[_0xada154(0x159)]+_0xada154(0x1fb)+_0x5e72a9+_0xada154(0x1eb)+_0x4533da+')',_0x5d06f0=!!(_0x36cae4[_0xada154(0x19c)]||_0x36cae4['quoteSignature']||_0x36cae4[_0xada154(0x186)]),_0x4b2a7c=!!_0x36cae4[_0xada154(0x191)]?.[_0xada154(0x1a4)][_0xada154(0x19f)](_0x26dc9b=>_0x26dc9b[_0xada154(0x228)]),_0x5cfbbe=_0x5d06f0||_0x4b2a7c;let _0x388fe5;return(_0x16eb6c['code']==='quote_expired'||_0x16eb6c[_0xada154(0x1d8)]===0x19a)&&_0x4b2a7c&&!_0x5d06f0?_0x388fe5=_0x4e529e+_0xada154(0x152)+_0x4533da+_0xada154(0x20e)+_0x5e72a9+'\x20order\x20submit\x20'+_0x36cae4[_0xada154(0x159)]+_0xada154(0x150):(_0x16eb6c['code']===_0xada154(0x1bd)||_0x16eb6c[_0xada154(0x1d8)]===0x19a)&&!_0x5cfbbe?_0x388fe5=_0x4e529e+';\x20no\x20payment\x20was\x20signed.\x20Continue\x20this\x20task\x20with\x20a\x20fresh\x20quote:\x20colony\x20--api\x20'+_0x4533da+'\x20--home\x20'+_0x5e72a9+_0xada154(0x1af)+_0x36cae4['requestKey']:(_0x16eb6c['code']===_0xada154(0x1bd)||_0x16eb6c[_0xada154(0x1d8)]===0x19a)&&_0x5cfbbe?_0x388fe5=_0x4e529e+_0xada154(0x1ff)+_0x36cae4['orderId']+'.\x20Do\x20not\x20start\x20a\x20new\x20order.\x20Check\x20it\x20with:\x20colony\x20--api\x20'+_0x4533da+'\x20--home\x20'+_0x5e72a9+_0xada154(0x18d)+_0x36cae4[_0xada154(0x23b)]+_0xada154(0x165):_0x5cfbbe&&_0x36cae4[_0xada154(0x23b)]?_0x388fe5=_0x4e529e+_0xada154(0x1db)+_0x4533da+_0xada154(0x20e)+_0x5e72a9+'\x20order\x20submit\x20'+_0x36cae4[_0xada154(0x23b)]:_0x388fe5=_0x4e529e+';\x20retry\x20the\x20same\x20order\x20with:\x20'+be(_0x36cae4,_0x3dc724),Object[_0xada154(0x174)](new Error(_0x16eb6c[_0xada154(0x235)]+'\x0a'+_0x388fe5,{'cause':_0x16eb6c}),{'code':_0x16eb6c[_0xada154(0x1de)]??(_0x16eb6c['status']===0x19a&&!_0x5d06f0?_0xada154(0x1bd):void 0x0),'status':_0x16eb6c[_0xada154(0x1d8)],'data':_0x16eb6c[_0xada154(0x1cc)],'headers':_0x16eb6c['headers'],'funding':_0x16eb6c['funding'],'transaction':_0x16eb6c[_0xada154(0x1dc)]});}function k(_0x5e3e5d,_0x512cd3){const _0x83dda7=_0x36fb7c;_0x5e3e5d[_0x83dda7(0x218)]=_0x512cd3[_0x83dda7(0x1d8)],_0x5e3e5d[_0x83dda7(0x17c)]=_0x512cd3[_0x83dda7(0x17c)]??null;const _0xb30398=_0x512cd3[_0x83dda7(0x17c)]?.[_0x83dda7(0x190)];_0xb30398&&(_0x5e3e5d[_0x83dda7(0x1a8)]=_0xb30398[_0x83dda7(0x1a8)]??null,_0x5e3e5d[_0x83dda7(0x1e0)]=_0xb30398[_0x83dda7(0x1e0)]??null,_0x5e3e5d[_0x83dda7(0x1b4)]=_0xb30398[_0x83dda7(0x1b4)]??null),_0x512cd3[_0x83dda7(0x199)]&&(_0x5e3e5d[_0x83dda7(0x1cd)]=_0x512cd3[_0x83dda7(0x199)][_0x83dda7(0x1d8)],_0x5e3e5d[_0x83dda7(0x1cf)]=_0x512cd3[_0x83dda7(0x199)]['transactionHash']??_0x5e3e5d['onchainPayment']?.[_0x83dda7(0x1fc)]??_0x5e3e5d['onchainPayment']?.['hash']??null),_0x512cd3['status']===_0x83dda7(0x1c3)?(delete _0x5e3e5d['pendingTransaction'],delete _0x5e3e5d['recoveryStatus'],_0x5e3e5d[_0x83dda7(0x170)]=null,_0xb30398?.[_0x83dda7(0x21a)]===_0x83dda7(0x1c5)?(_0x5e3e5d[_0x83dda7(0x1d8)]=_0x83dda7(0x1c5),_0x5e3e5d[_0x83dda7(0x158)]=_0xb30398['problems']??[]):(_0x5e3e5d[_0x83dda7(0x1d8)]=_0x83dda7(0x1c3),_0x5e3e5d[_0x83dda7(0x158)]=null)):_0x512cd3[_0x83dda7(0x1d8)]===_0x83dda7(0x1ac)?_0x5e3e5d[_0x83dda7(0x1d8)]='payment_failed':_0x512cd3[_0x83dda7(0x1d8)]===_0x83dda7(0x17b)&&(_0x5e3e5d[_0x83dda7(0x1d8)]=_0x83dda7(0x17b));}async function H(_0x4992e3,_0xee2c2a,_0x429065){const _0x1aaf08=_0x36fb7c,_0x12ca7c=await _0x471d3d(_0x4992e3,_0x1aaf08(0x1bf)+_0x429065,{'token':_0xee2c2a});if(!_0x12ca7c[_0x1aaf08(0x1cc)]?.[_0x1aaf08(0x1d8)])throw new Error(_0x1aaf08(0x195));return _0x12ca7c[_0x1aaf08(0x1cc)];}async function Ge(_0x5ada98){const _0x8257a0=_0x36fb7c,{home:_0x21d22e,id:_0x1d0c99}=_0x5ada98,_0x13806b=await _0x3c808d(_0x21d22e,_0x1d0c99);if(!_0x13806b[_0x8257a0(0x23b)])throw new Error('order\x20'+_0x13806b[_0x8257a0(0x159)]+'\x20has\x20not\x20been\x20quoted;\x20there\x20is\x20no\x20server\x20order\x20to\x20refresh');const _0x318baf=await H(_0x13806b[_0x8257a0(0x14f)],_0x13806b['requestToken'],_0x13806b[_0x8257a0(0x23b)]);return k(_0x13806b,_0x318baf),_0x13806b[_0x8257a0(0x170)]=null,await _0x455842(_0x21d22e,_0x13806b),_0x13806b;}async function Se(_0x1d5124,_0x12852f,_0x6287a2,_0x5c42ba={}){const _0x20ae94=_0x36fb7c,_0x1a11b7=_0x5c42ba[_0x20ae94(0x1c2)]??0x2bf20,_0x2ef7b3=_0x5c42ba['intervalMs']??0x7d0,_0x47fb2f=Date[_0x20ae94(0x15d)]()+_0x1a11b7;for(;;){const _0x42c88c=(await _0x471d3d(_0x1d5124,_0x20ae94(0x1bf)+_0x6287a2,{'token':_0x12852f,'signal':_0x5c42ba[_0x20ae94(0x1c9)]}))[_0x20ae94(0x1cc)];if(!_0x42c88c?.['status'])throw new Error('order\x20status\x20response\x20is\x20missing\x20status');if(_0x42c88c['status']==='admitted'||_0x42c88c['status']===_0x20ae94(0x1ac)||_0x42c88c[_0x20ae94(0x1d8)]==='expired')return _0x42c88c;if(Date['now']()>=_0x47fb2f)throw new Error(_0x20ae94(0x17d)+_0x6287a2+_0x20ae94(0x1b1)+_0x42c88c[_0x20ae94(0x1d8)]);await _0x57e693(_0x2ef7b3,void 0x0,{'signal':_0x5c42ba[_0x20ae94(0x1c9)]});}}async function ke(_0x5dadb2,_0x374e3e,_0x59042c,_0x20b080,_0x5e7e08){const _0x5cefad=_0x36fb7c;_0x59042c['submittedAt']=new Date()['toISOString'](),_0x59042c[_0x5cefad(0x1d8)]=_0x5cefad(0x1cb),await _0x455842(_0x20b080,_0x59042c);const _0x2436ea=await _0x471d3d(_0x5dadb2,_0x5cefad(0x1bf)+_0x59042c[_0x5cefad(0x23b)]+_0x5cefad(0x1a3),{'method':_0x5cefad(0x214),'token':_0x374e3e,'headers':{'PAYMENT-SIGNATURE':_0x59042c[_0x5cefad(0x19c)]},'body':{'quoteSignature':_0x59042c[_0x5cefad(0x22a)]},'allowStatuses':[0x192],'signal':_0x5e7e08});if(_0x2436ea[_0x5cefad(0x1d8)]===0x192){const _0x4179d6=_0x2436ea[_0x5cefad(0x1cc)]?.[_0x5cefad(0x20a)]??_0x2436ea[_0x5cefad(0x1cc)]?.[_0x5cefad(0x1b0)]??'payment\x20rejected',_0x571890=new Error('payment\x20rejected:\x20'+_0x4179d6);throw _0x571890[_0x5cefad(0x1d8)]=0x192,_0x571890[_0x5cefad(0x1cc)]=_0x2436ea[_0x5cefad(0x1cc)],_0x571890;}return _0x2436ea[_0x5cefad(0x1cc)];}async function xe(_0x231579,_0x7e48d1,_0xe55aa8,_0xe3978f){const _0xdf5a6e=_0x36fb7c;if(_0x231579[_0xdf5a6e(0x1d8)]!==0x19a&&_0x231579['code']!==_0xdf5a6e(0x1bd)||!_0xe55aa8['paymentHeader']||!_0xe55aa8[_0xdf5a6e(0x22a)]||!_0xe55aa8['orderId'])return null;try{const _0x1fa6ab=await H(_0x7e48d1,_0xe55aa8['requestToken'],_0xe55aa8[_0xdf5a6e(0x23b)]);if(k(_0xe55aa8,_0x1fa6ab),_0xe55aa8['lastError']=null,await _0x455842(_0xe3978f,_0xe55aa8),_0xe55aa8[_0xdf5a6e(0x1d8)]==='admitted'||_0xe55aa8['status']===_0xdf5a6e(0x1c5)||_0xe55aa8[_0xdf5a6e(0x1d8)]==='payment_failed'||_0xe55aa8[_0xdf5a6e(0x1d8)]==='expired')return!0x0;}catch(_0x17be17){_0x231579[_0xdf5a6e(0x235)]+=_0xdf5a6e(0x19d)+_0x17be17[_0xdf5a6e(0x235)];}return null;}async function Ie(_0x509505){const _0x1fefa6=_0x36fb7c;let _0x14587c=_0x509505[_0x1fefa6(0x159)];const _0x45b751=async _0x2f2f5b=>{const _0x1d3657=_0x1fefa6;_0x14587c=_0x2f2f5b['requestKey'],await _0x509505[_0x1d3657(0x17f)]?.(_0x2f2f5b);};for(let _0x486abb=0x0;;_0x486abb++){try{const _0x379d39=await Ee({..._0x509505,'requestKey':_0x14587c,'onSaved':_0x45b751});if(![_0x1fefa6(0x17b),_0x1fefa6(0x1ac)]['includes'](_0x379d39[_0x1fefa6(0x1d8)])||_0x486abb>=0x2)return _0x379d39;}catch(_0x346f07){if(_0x486abb>=0x2||![_0x1fefa6(0x1bd),_0x1fefa6(0x14c)][_0x1fefa6(0x1d0)](_0x346f07[_0x1fefa6(0x1de)]))throw _0x346f07;}_0x509505['onProgress']?.({'phase':'checking_payment','message':_0x1fefa6(0x19a)});}}async function Ee(_0x282e92){const _0x132118=_0x36fb7c;_0x282e92={..._0x282e92,'expectedWallet':_0x282e92[_0x132118(0x1b5)]??_0x2ebe21(_0x282e92)[_0x132118(0x1d7)]};const {api:_0x45caae,home:_0x2c9d15,file:_0xc5bda0,requestKey:_0x4098bf}=_0x282e92,_0x5a62c=_0x4098bf?await _0x4892b4(_0x2c9d15,_0x4098bf):null,_0x442a8d=_0x2a51eb(_0x282e92[_0x132118(0x1ea)]??_0x5a62c?.[_0x132118(0x1ea)]),_0x3f625e=_0x282e92[_0x132118(0x1ab)]??_0x5a62c?.[_0x132118(0x1ab)]??_0x299ff1(_0x282e92)[_0x132118(0x178)];_0x4d1749(_0x3f625e,_0x442a8d);const _0x4d0464=_0x282e92['action']??_0x132118(0x153);if(_0x4d0464!==_0x132118(0x153)&&_0x4d0464!==_0x132118(0x1d3))throw new Error(_0x132118(0x1c1)+_0x4d0464);const _0x1a2eb6=_0x282e92[_0x132118(0x16f)]??await de(_0xc5bda0);if(!_0x1a2eb6||typeof _0x1a2eb6!=_0x132118(0x177)||Array[_0x132118(0x238)](_0x1a2eb6))throw new Error(_0x132118(0x1df));const _0x51c6e9=ce(_0x1a2eb6);let _0x757891=_0x5a62c;if(_0x757891){if(_0x5ee9e9(_0x757891),_0x757891[_0x132118(0x14f)]!==_0x45caae)throw new Error(_0x132118(0x225)+_0x757891[_0x132118(0x159)]+_0x132118(0x1c0)+_0x757891[_0x132118(0x14f)]+';\x20rerun\x20with\x20--api\x20'+_0x757891[_0x132118(0x14f)]);if(_0x757891[_0x132118(0x211)]!==_0x4d0464)throw new Error('request\x20key\x20'+_0x757891['requestKey']+_0x132118(0x169)+_0x757891[_0x132118(0x211)]+',\x20not\x20'+_0x4d0464);if(_0x757891[_0x132118(0x1a0)]!==_0x51c6e9)throw new Error(_0x132118(0x18e)+_0x757891[_0x132118(0x159)]+_0x132118(0x23d));const _0xf694c0=_0x3f625e!==(_0x757891[_0x132118(0x1ab)]??_0x132118(0x160));if(_0xf694c0||_0x442a8d!==(_0x757891[_0x132118(0x1ea)]??'IMD')){if(!_0x433aec(_0x757891)[_0x132118(0x1b6)])throw new Error(_0xf694c0?_0x132118(0x206):_0x132118(0x1f9));_0x757891[_0x132118(0x1ab)]=_0x3f625e,_0x757891[_0x132118(0x1ea)]=_0x442a8d;for(const _0x361a1e of[_0x132118(0x191),_0x132118(0x1d9),'support'])delete _0x757891[_0x361a1e];await _0x455842(_0x2c9d15,_0x757891);}}else _0x757891={'version':0x1,'requestKey':_0x4098bf??_0x4bc948(),'requestToken':_0x38940a(0x20)[_0x132118(0x15a)]('hex'),'api':_0x45caae,'action':_0x4d0464,'input':_0x1a2eb6,'inputHash':_0x51c6e9,'submissionInput':_0x4785d2(_0x1a2eb6),..._0x282e92['plan']?{'plan':_0x282e92[_0x132118(0x233)]}:{},'createdAt':new Date()[_0x132118(0x202)](),'updatedAt':new Date()[_0x132118(0x202)](),'status':'created','paymentChain':_0x3f625e,'payWith':_0x442a8d},await _0x455842(_0x2c9d15,_0x757891);if(await _0x282e92[_0x132118(0x17f)]?.(_0x757891),_0x757891[_0x132118(0x1d8)]===_0x132118(0x1c3))return{'state':_0x757891,'status':_0x132118(0x1c3)};if(_0x757891[_0x132118(0x1d8)]==='refused')return{'state':_0x757891,'status':_0x757891[_0x132118(0x1d8)]};try{let _0x504f05=_0x757891['onchainPayment']||_0x757891['paymentHeader']||_0x757891[_0x132118(0x22a)];if(_0x504f05&&(Number(_0x757891[_0x132118(0x1c6)][_0x132118(0x14d)])*0x3e8<=Date[_0x132118(0x15d)]()||['expired',_0x132118(0x1ac)][_0x132118(0x1d0)](_0x757891[_0x132118(0x1d8)]))){if(_0x282e92[_0x132118(0x237)]?.({'phase':_0x132118(0x15e),'message':_0x132118(0x21e)}),k(_0x757891,await H(_0x45caae,_0x757891['requestToken'],_0x757891[_0x132118(0x23b)])),await _0x455842(_0x2c9d15,_0x757891),_0x757891[_0x132118(0x1d8)]==='admitted'||_0x757891[_0x132118(0x1d8)]===_0x132118(0x1c5))return{'state':_0x757891,'status':_0x757891[_0x132118(0x1d8)]};if(await _0x562e75(_0x757891,_0x282e92)){if(_0x757891[_0x132118(0x186)]){const _0x3c8731=await _0x1bca65(_0x282e92,_0x757891[_0x132118(0x186)][_0x132118(0x1fd)]);await _0x56b47e(_0x3c8731,_0x757891[_0x132118(0x186)])||_0x3b797b(_0x757891,_0x757891[_0x132118(0x186)]);}_0x757891['paymentHistory']=[..._0x757891[_0x132118(0x15c)]??[],{'orderId':_0x757891[_0x132118(0x23b)],'quote':_0x757891[_0x132118(0x1c6)],'onchainQuotes':_0x757891['onchainQuotes'],'payment':_0x757891[_0x132118(0x199)],'paymentHeader':_0x757891[_0x132118(0x19c)],'quoteSignature':_0x757891[_0x132118(0x22a)],'onchainPayment':_0x757891[_0x132118(0x186)],'transactionHash':_0x757891[_0x132118(0x1cf)],'submittedAt':_0x757891['submittedAt'],'unpaid':!0x0}];for(const _0x903ef1 of[_0x132118(0x199),'paymentHeader',_0x132118(0x209),'quoteSignature',_0x132118(0x186),_0x132118(0x1cf),_0x132118(0x1f3),'paymentStatus'])delete _0x757891[_0x903ef1];_0x504f05=!0x1,delete _0x757891[_0x132118(0x1bc)],await _0x455842(_0x2c9d15,_0x757891);}else throw Object[_0x132118(0x174)](new Error(_0x132118(0x1e8)),{'code':_0x132118(0x184)});}if(!_0x504f05&&_0x757891[_0x132118(0x23b)]&&([_0x132118(0x17b),_0x132118(0x1ac)][_0x132118(0x1d0)](_0x757891[_0x132118(0x1d8)])||Number(_0x757891['quote'][_0x132118(0x14d)])*0x3e8<=Date[_0x132118(0x15d)]()+0x7530)){_0x757891[_0x132118(0x189)]=[..._0x757891[_0x132118(0x189)]??[],{'orderId':_0x757891['orderId'],'requestKey':_0x757891[_0x132118(0x200)]??_0x757891['requestKey'],'quote':_0x757891[_0x132118(0x1c6)],'onchainQuotes':_0x757891['onchainQuotes'],'status':_0x757891[_0x132118(0x1d8)]}],_0x757891[_0x132118(0x200)]=_0x4bc948();for(const _0x38f855 of['orderId','orderStatus',_0x132118(0x1c6),_0x132118(0x1d2),_0x132118(0x21b),'lastStatus','paymentStatus',_0x132118(0x1d9)])delete _0x757891[_0x38f855];_0x757891[_0x132118(0x1d8)]='created',_0x757891[_0x132118(0x170)]=null,await _0x455842(_0x2c9d15,_0x757891);}if(!_0x757891[_0x132118(0x23b)]){_0x282e92[_0x132118(0x237)]?.({'phase':_0x132118(0x1c6),'message':_0x132118(0x151)});const _0x1c8d0a=_0x757891[_0x132118(0x226)]??_0x757891[_0x132118(0x16f)],_0x529fd1=await me(_0x45caae,_0x1c8d0a,_0x4d0464,_0x282e92[_0x132118(0x1c9)]);if(_0x757891[_0x132118(0x1a9)]=_0x529fd1,_0x282e92['onCheck']&&await _0x282e92[_0x132118(0x19b)](_0x529fd1),_0x529fd1['blockers'][_0x132118(0x187)]>0x0)return _0x757891[_0x132118(0x1d8)]=_0x132118(0x21f),_0x757891['lastError']=null,await _0x455842(_0x2c9d15,_0x757891),{'state':_0x757891,'status':_0x132118(0x21f),'check':_0x529fd1};if(_0x4d0464===_0x132118(0x1d3)){const _0x2ac2f9=await _0x378bb3(_0x282e92);_0x757891[_0x132118(0x16c)]=await v({'api':_0x45caae,'input':_0x1a2eb6,'check':_0x529fd1,'account':_0x2ac2f9,'owner':_0x757891[_0x132118(0x16c)]});}let _0x5539d0;try{_0x5539d0=await T(_0x45caae,_0x757891[_0x132118(0x204)],_0x757891[_0x132118(0x200)]??_0x757891[_0x132118(0x159)],_0x1c8d0a,_0x4d0464,_0x282e92[_0x132118(0x1c9)]);}catch(_0x458adc){if(_0x458adc[_0x132118(0x1d8)]!==0x19a)throw _0x458adc;_0x757891[_0x132118(0x200)]=_0x4bc948(),await _0x455842(_0x2c9d15,_0x757891),_0x5539d0=await T(_0x45caae,_0x757891['requestToken'],_0x757891[_0x132118(0x200)],_0x1c8d0a,_0x4d0464,_0x282e92['signal']);}_0x757891[_0x132118(0x23b)]=_0x5539d0['id'],_0x757891[_0x132118(0x196)]=_0x5539d0[_0x132118(0x1d8)],_0x757891[_0x132118(0x1c6)]=_0x5539d0[_0x132118(0x1c6)],_0x757891[_0x132118(0x1d2)]=_0x5539d0[_0x132118(0x224)],_0x757891[_0x132118(0x1d8)]=_0x132118(0x207),_0x757891[_0x132118(0x170)]=null,await _0x455842(_0x2c9d15,_0x757891);}if(_0x56002e(_0x15384f(_0x757891)),!_0x757891[_0x132118(0x186)]&&(!_0x757891[_0x132118(0x19c)]||!_0x757891['quoteSignature'])){if(_0x757891['challenge'])j(_0x757891['challenge'],_0x757891);else{const _0x55264f=await le(_0x45caae,_0x757891[_0x132118(0x204)],_0x757891['orderId'],_0x282e92[_0x132118(0x1c9)]);j(_0x55264f,_0x757891),_0x757891[_0x132118(0x21b)]=_0x55264f,_0x757891[_0x132118(0x1d8)]=_0x132118(0x198),await _0x455842(_0x2c9d15,_0x757891);}let _0x4c4092;if(_0x4d0464===_0x132118(0x1d3)&&(_0x4c4092=await _0x378bb3(_0x282e92),_0x757891[_0x132118(0x16c)]=await v({'api':_0x45caae,'input':_0x1a2eb6,'check':_0x757891['check'],'account':_0x4c4092,'owner':_0x757891['owner']}),await _0x455842(_0x2c9d15,_0x757891)),await _0x39d96d(_0x757891,_0x282e92),_0x282e92[_0x132118(0x1c9)]?.['throwIfAborted'](),_0x5ee9e9(await _0x3c808d(_0x2c9d15,_0x757891['requestKey'])),await _0x455842(_0x2c9d15,_0x757891),await _0x2a2380(_0x757891,_0x282e92,_0x332a01=>qe(_0x332a01,_0x282e92)),_0x757891[_0x132118(0x1ab)]==='robinhood')await _0x2d4acb(_0x757891,_0x282e92);else{_0x282e92[_0x132118(0x237)]?.({'phase':'signing','message':'Signing\x20task\x20payment\x20authorization...'}),_0x282e92[_0x132118(0x1c9)]?.[_0x132118(0x1ed)](),_0x5ee9e9(await _0x3c808d(_0x2c9d15,_0x757891[_0x132118(0x159)])),_0x4c4092=await _0x378bb3(_0x282e92),_0x282e92[_0x132118(0x1c9)]?.[_0x132118(0x1ed)](),_0x5ee9e9(await _0x3c808d(_0x2c9d15,_0x757891[_0x132118(0x159)])),_0x757891[_0x132118(0x14a)]=_0x4c4092[_0x132118(0x1d7)],await _0x455842(_0x2c9d15,_0x757891);const _0x354736=await he(_0x4c4092,_0x757891[_0x132118(0x21b)]),_0x4ac1e3=await we(_0x4c4092,_0x757891[_0x132118(0x21b)],_0x354736[_0x132118(0x209)]);_0x757891[_0x132118(0x199)]=_0x354736[_0x132118(0x199)],_0x757891[_0x132118(0x19c)]=_0x354736[_0x132118(0x19c)],_0x757891[_0x132118(0x209)]=_0x354736[_0x132118(0x209)],_0x757891[_0x132118(0x22a)]=_0x4ac1e3,_0x757891['status']=_0x132118(0x1e9),_0x757891[_0x132118(0x170)]=null,await _0x455842(_0x2c9d15,_0x757891);}}_0x757891[_0x132118(0x186)]?await _0x569a55(_0x757891,_0x282e92):(_0x282e92[_0x132118(0x237)]?.({'phase':'broadcasting','message':_0x132118(0x1c4)}),await ke(_0x45caae,_0x757891[_0x132118(0x204)],_0x757891,_0x2c9d15,_0x282e92[_0x132118(0x1c9)])),_0x282e92[_0x132118(0x237)]?.({'phase':_0x132118(0x17c),'message':_0x132118(0x18f)});const _0x2b211f=await Se(_0x45caae,_0x757891[_0x132118(0x204)],_0x757891[_0x132118(0x23b)],_0x282e92);return k(_0x757891,_0x2b211f),delete _0x757891[_0x132118(0x1d4)],await _0x455842(_0x2c9d15,_0x757891),{'state':_0x757891,'status':_0x757891[_0x132118(0x1d8)]};}catch(_0x24d5c1){if([_0x132118(0x1d5),'order_changed',_0x132118(0x210)][_0x132118(0x1d0)](_0x24d5c1[_0x132118(0x1de)]))throw _0x24d5c1;if(_0x5ee9e9(await _0x3c808d(_0x2c9d15,_0x757891['requestKey'])),await xe(_0x24d5c1,_0x45caae,_0x757891,_0x2c9d15))return{'state':_0x757891,'status':_0x757891[_0x132118(0x1d8)]};throw _0x757891[_0x132118(0x170)]=_0x24d5c1[_0x132118(0x235)],[_0x132118(0x20b),'payment_reconciling']['includes'](_0x24d5c1[_0x132118(0x1de)])&&(_0x757891[_0x132118(0x1d4)]=_0x24d5c1[_0x132118(0x1de)]),_0x24d5c1[_0x132118(0x1dc)]&&(_0x757891[_0x132118(0x1bc)]=_0x24d5c1['transaction']),_0x24d5c1['status']===0x192&&(_0x757891[_0x132118(0x1d8)]=_0x132118(0x1e9)),await _0x455842(_0x2c9d15,_0x757891),_0x24d5c1[_0x132118(0x1de)]===_0x132118(0x164)&&_0x24d5c1[_0x132118(0x191)]&&(_0x24d5c1['funding'][_0x132118(0x1e3)]=_0x433aec(_0x757891)['canCancel']),_0x24d5c1['code']===_0x132118(0x205)?_0x24d5c1:$e(_0x24d5c1,_0x757891,{'file':_0xc5bda0,'home':_0x2c9d15,'api':_0x45caae,'retryCommand':_0x282e92[_0x132118(0x217)]});}}async function Le(_0xf9657f){const _0x44fb03=_0x36fb7c,{home:_0x25be33,id:_0x3c2888}=_0xf9657f,_0x174bd2=await _0x3c808d(_0x25be33,_0x3c2888);if(_0x5ee9e9(_0x174bd2),_0x174bd2[_0x44fb03(0x1d8)]===_0x44fb03(0x1c3)||_0x174bd2[_0x44fb03(0x1d8)]===_0x44fb03(0x1c5))return _0x174bd2;if(_0x174bd2['api']!==_0xf9657f['api'])throw new Error(_0x44fb03(0x225)+_0x174bd2[_0x44fb03(0x159)]+_0x44fb03(0x1c0)+_0x174bd2[_0x44fb03(0x14f)]+_0x44fb03(0x230)+_0x174bd2[_0x44fb03(0x14f)]);return(await Ie({..._0xf9657f,'requestKey':_0x174bd2[_0x44fb03(0x159)],'input':_0x174bd2[_0x44fb03(0x16f)],'action':_0x174bd2[_0x44fb03(0x211)],'paymentChain':_0x174bd2[_0x44fb03(0x1ab)]??'ethereum','payWith':_0x174bd2[_0x44fb03(0x1ea)]}))[_0x44fb03(0x1e1)];}export{k as applyOrderStatus,v as assertContinueOwner,he as buildPayment,S as canonicalJson,me as checkJob,H as fetchOrderStatus,ce as hashJson,ge as paymentSummary,Se as pollOrder,Ie as publishJob,fe as quoteApprovalTypedData,T as quoteJob,de as readJobFile,Ge as refreshOrder,we as signQuoteApproval,Le as submitOrder};function _0x5c90(){const _0x194357=['payer','display','payment_review_expired','expiresAt','isInteger','api','.\x20Saved\x20transactions\x20will\x20be\x20checked\x20before\x20refreshing\x20prices.','Checking\x20your\x20task\x20and\x20requesting\x20a\x20current\x20price...',';\x20continue\x20this\x20task\x20with:\x20colony\x20--api\x20','job.open','\x20does\x20not\x20match\x20','objective','\x0aSupport\x20is\x20sent\x20before\x20task\x20payment\x20and\x20is\x20not\x20refunded\x20if\x20admission\x20fails.','<parent-job-id>','refusalProblems','requestKey','toString','decimals','paymentHistory','now','checking_payment','networkFeeCap','ethereum','null','/requests/quote','recipient','funding_required','\x20--refresh','payment\x20challenge\x20action\x20','\x20ETH','payment\x20challenge\x20expiry\x20does\x20not\x20match\x20the\x20saved\x20quote','\x20was\x20created\x20for\x20action\x20','stringify','\x20from\x20the\x20same\x20ETH\x20balance','owner','payment\x20challenge\x20belongs\x20to\x20a\x20different\x20order','\x20on\x20','input','lastError','utf8','sort','missing\x20signer\x20address','assign','Task:\x20','requesterScopeHash','object','key','payment\x20requirement\x20is\x20missing\x20maxTimeoutSeconds','/requests/check','expired','admission','timed\x20out\x20waiting\x20for\x20order\x20','converted','onSaved','\x20is\x20not\x20before\x20quote\x20expiry\x20','Network:\x20','/jobs/','order','payment_reconciling','quote\x20approval','onchainPayment','length','invalid\x20quote\x20network:\x20','quoteHistory','Action:\x20','\x20\x20-\x20','map','\x20order\x20show\x20','request\x20key\x20','Payment\x20submitted.\x20Waiting\x20for\x20IMD\x20to\x20accept\x20the\x20task...','result','funding','payment\x20challenge\x20is\x20missing\x20the\x20prepared\x20input','Payment:\x20≈\x20','blockers','order\x20status\x20response\x20is\x20missing\x20status','orderStatus','uint256','challenged','payment','Checking\x20the\x20previous\x20payment\x20and\x20refreshing\x20prices...','onCheck','paymentHeader','\x0aorder\x20status\x20refresh\x20failed:\x20','Total\x20ETH\x20at\x20most:\x20','some','inputHash','quote\x20has\x20expired;\x20no\x20payment\x20was\x20signed','maxTimeoutSeconds','/submit','steps','paidBy','Maximum\x20debit:\x20','floor','jobId','check','\x20--request-key\x20','paymentChain','payment_failed','join','quote\x20expires\x20too\x20soon\x20to\x20sign\x20a\x20payment;\x20no\x20payment\x20was\x20signed','\x20order\x20submit\x20','error',';\x20last\x20status:\x20','check\x20response\x20is\x20missing\x20blockers','payment\x20challenge\x20is\x20missing\x20accepts','resultUrl','expectedWallet','canCancel','\x20task\x20continue\x20','sha256','\x20IMD','maximumDebit','payment\x20challenge\x20is\x20missing\x20resourceUrl\x20or\x20requesterScopeHash','pendingTransaction','quote_expired','amount','/requests/','\x20belongs\x20to\x20','unsupported\x20action:\x20','timeoutMs','admitted','Submitting\x20task\x20payment\x20to\x20IMD...','refused','quote','parentJobId','gas','signal','\x20atomic\x20units)','submitted','data','paymentStatus','Prepared\x20input\x20(this\x20is\x20what\x20will\x20be\x20paid\x20for):','transactionHash','includes','coin','onchainQuotes','job.continue','recoveryStatus','order_cancelled','\x20task\x20create\x20--file\x20<saved-input.json>\x20--request-key\x20','address','status','paymentReview','quoteHash',';\x20resume\x20with:\x20colony\x20--api\x20','transaction','\x20(at\x20most\x20','code','job\x20input\x20must\x20be\x20a\x20JSON\x20object','statusUrl','state','\x20does\x20not\x20match\x20the\x20saved\x20quote','canChangePayment','Payment\x20covers\x20task\x20admission;\x20a\x20completed\x20result\x20is\x20not\x20guaranteed.','Additional\x20network\x20fee\x20cap:\x20','wallet\x20','resourceUrl','The\x20previous\x20payment\x20is\x20still\x20being\x20reconciled.\x20Your\x20task\x20is\x20saved.\x20Continue\x20this\x20task\x20again\x20after\x20chain\x20confirmation;\x20no\x20new\x20payment\x20was\x20signed.','signed','payWith','\x20(api\x20','asset','throwIfAborted','Included\x20network\x20fee\x20cap:\x20','permit2','max','saved\x20request\x20key\x20','accepts','submittedAt','toLowerCase','string','replace','\x20--file\x20','network','Resume\x20this\x20order\x20with\x20its\x20original\x20payment\x20coin.','Pay\x20to:\x20','\x20at\x20','confirmedHash','chainId','saved\x20quote\x20action\x20',';\x20a\x20payment\x20is\x20already\x20signed\x20for\x20order\x20','serverRequestKey','payment\x20challenge\x20does\x20not\x20use\x20Permit2','toISOString','assetTransferMethod','requestToken','owner_mismatch','This\x20order\x20already\x20uses\x20a\x20different\x20payment\x20network.\x20Resume\x20it\x20on\x20its\x20original\x20network.','quoted','estimate','paymentHash','reason','transaction_pending','createPaymentPayload','\x20at\x20most)','\x20--home\x20','resource','change_payment','action','payment\x20challenge','expected\x20HTTP\x20402\x20payment\x20challenge,\x20got\x20HTTP\x20','POST','parse',';\x20no\x20payment\x20was\x20signed\x20in\x20this\x20attempt','retryCommand','lastStatus','quote\x20response\x20is\x20missing\x20order\x20or\x20quote','kind','challenge','Quote\x20expires:\x20','payload','Checking\x20the\x20original\x20payment\x20before\x20continuing...','blocked','\x20must\x20contain\x20a\x20JSON\x20object','signTypedData','QuoteApproval','),\x20converted\x20to\x20IMD','onchain','order\x20','submissionInput','function','rawTransaction','confirm','quoteSignature','IMD','update','payTo','total','\x20task\x20publish\x20--file\x20',';\x20rerun\x20with\x20--api\x20','Payment:\x20','extra','plan','bytes32','message','min','onProgress','isArray','ETH','Amount:\x20','orderId','Sign\x20and\x20pay\x20this\x20order?\x0a','\x20was\x20created\x20for\x20a\x20different\x20input'];_0x5c90=function(){return _0x194357;};return _0x5c90();}
@@ -1 +1 @@
1
- const _0x54dc1e=_0x2901;import{friendlyAmount as _0x57f2ab}from'../lib/payment-coins.mjs';import{createWorkerTarget as _0x2f1c7d,paymentView as _0x4fdf79}from'./services.mjs';import{lockWallet as _0x55845d}from'../lib/local-wallet.mjs';function _0x2f37(){const _0x5d8ecb=['createdAt','Concurrent\x20tasks\x20(1–4)','questions','mine','local','Delete\x20draft','SSH\x20user@host\x20(empty\x20=\x20this\x20computer)','push','Auto-refresh\x20failed:\x20','Download\x20task\x20files','extraTargets','serviceInstall','Restore\x20encrypted\x20wallet','Delete\x20wallet\x20·\x201\x20of\x202','What\x20would\x20you\x20like\x20to\x20change?','Add\x20a\x20worker\x20target','draft','askResolve','parent','draftId','register','targets','lastExploreRefresh','ask','transaction','fundingReceive','path','admitted','reason','paymentChain','codex','payment_failed','ETH','Choose\x20how\x20to\x20pay\x20·\x20gas\x20is\x20always\x20paid\x20in\x20ETH','showMenu','result','View\x20private\x20key','colony-receive.svg','getSnapshot','receive','Register\x20on\x20chain','stage','SSH\x20identity\x20file\x20(optional)','Payment\x20cancelled.\x20No\x20new\x20payment\x20was\x20signed.','Understanding\x20your\x20request...','Choose\x20an\x20output\x20directory.','Cancelled','From\x20encrypted\x20backup','Save\x20QR','refresh','message','tools','publishDraft','\x0aOrder:\x20','walletRestore','cancelled','job.open','admitting','command','Remove\x20RPC','more','note','transaction_pending','deleteDraft','.\x20Inspect\x20it\x20in\x20My\x20tasks\x20before\x20trying\x20another\x20payment.','Files','exploreUpdates','Delete\x20draft?','since','colony\x20worker\x20','Confirm\x20password','signed','saveReceiveQr','\x20·\x20current','throwIfAborted','Active','repeat','hash','Wallet\x20ready.\x20Press\x20b\x20to\x20back\x20up\x20before\x20depositing\x20funds.','max','test','Tools\x20&\x20credentials','whoami','formCancel','Request\x20changes','accepted','selectWallet','Run\x20diagnostics','Skill\x20ID','passwordReject','Worker\x20tools','editDraft','pickPayment','name','Only\x20this\x20option\x20has\x20enough\x20funds\x20right\x20now','Restoring\x20wallet...','Forget\x20credential','menuCancel','host','forget','Add\x20RPC','error','Search\x20workers','boot','wallet','Delete\x20wallet','executing','lines','Skills','fromEntries','services','Linux\x20start\x20at\x20boot\x20(yes/no)','confirmResolve','Review\x20&\x20pay','Identity','You\x20can\x20create\x20a\x20new\x20task\x20whenever\x20you\x20want.','Paid,\x20but\x20the\x20task\x20was\x20refused.\x0a','create','help','Saved\x20wallet','updatedAt','claude','running','Change\x20payment','showPaymentProgress','add','set','join','navigate','files','receiveWallet','backupWallet','Choose\x20claude\x20or\x20codex.','closeReceive','explorerUrl','Loading\x20','restoreSelectedId','canDelete','cancelAutoRefresh','Wallet\x20unlock\x20cancelled.\x20No\x20payment\x20was\x20signed.','Continue\x20payment\x20there\x20to\x20check\x20the\x20original\x20payment\x20before\x20retrying.','Create\x20or\x20import\x20a\x20wallet\x20to\x20continue.','walletPrivateKey','managed-worker','coin','string','move','Worker\x20RPC\x20endpoints','toUpperCase','Delete\x20wallet\x20·\x202\x20of\x202','scroll','clear','Order\x20status:\x20','autoPayment','.\x20Keep\x20your\x20password\x20separately.','Payment\x20needs\x20review.','worker','Open\x20Wallets','Add\x20target','includes','Checking\x20balances\x20and\x20refreshing\x20prices...','concat','Checking\x20balances\x20on\x20all\x20networks...','addTarget','--concurrency','Remove\x20this\x20wallet\x20from\x20Colony?','Continue','length','refreshRequest','install','detailVersion','Concurrency\x20must\x20be\x201–4.','Loading\x20files...','canCancel','Receive\x20funds\x20/\x20QR\x20code','list','deliverables','useSelectedWallet','operation','Colony\x20picks\x20how\x20to\x20pay\x20from\x20your\x20balances.\x20You\x20review\x20the\x20price\x20first.','queued','QR\x20saved:\x20','Explorer:\x20','field','workerMenu','chain','file','Save\x20recharge\x20QR\x20code','detail','closed','password','job.continue','indexOf','Cancelling\x20request...','walletReceive','checkTaskWallet','Install\x20background\x20service','Command\x20finished.\x20Press\x20r\x20to\x20refresh\x20worker\x20status.','start','Completed','title','--boot','Draft\x20saved','change_payment','submitForm','Create\x20wallet','dismissForm','Remove\x20RPC\x20endpoint','Checking\x20the\x20task\x20and\x20requesting\x20an\x20IMD\x20quote...','change','Review\x20task','Pair\x20with\x20wallet','chooseMenu','Unlink\x20worker','findIndex','min','state','remove','Private\x20key\x20(hidden)','\x20is\x20required.','cancel','payment_reconciling','identity','blockers','Deleting\x20draft...','active','createWallet','key','runtime','source','listeners','code','items','challenged','deleteWallet','Download\x20files','detailTimer','Loading\x20network\x20workers...','concurrency','now','flatMap','Request\x20changes\x20(new\x20paid\x20task)','revealPrivateKey','plan','toLowerCase','deleteRequest','orderId','Saved\x20','configured','has','Request\x20cancelled.\x20No\x20payment\x20was\x20signed\x20or\x20submitted.','taskMenu','Credential\x20name','ethereum','showOutcome','Check\x20balance\x20&\x20continue','canResume','submitConfirmation','Remove\x20skill','Choose\x20another\x20way\x20to\x20pay.\x20No\x20payment\x20was\x20signed.','All','Preparing\x20receive\x20address...','quoted','options','Saving\x20encrypted\x20backup...','Add\x20RPC\x20endpoint\x20(hidden\x20input)','walletBackup','rpc','signal','IMD','map','addFunds','No\x20payment\x20has\x20been\x20signed\x20or\x20submitted.','saveDraft','menu','slice','loadDetail','chainName','form','Cancel\x20this\x20request?','changeTab','assign','paymentOptions','dialog','address','Task\x20actions','moveConfirmation','Add\x20funds','input','Transaction:\x20','wallet_required','Search','\x20+\x20gas\x20≈\x20','A\x20little\x20more\x20information','Create\x20a\x20task','walletImport','Chain\x20ID','Keep\x20wallet','walletMenu','choice','fields','respond','loadDraft','deploy','stop','view','doctor','explore','abort','jobId','One\x20local\x20password\x20·\x20u\x20use\x20selected\x20wallet','Restore\x20wallet','Update\x20network\x20fee','kind','publish','pair','skills','reviewPayment','objective','payment','terminal','Search\x20tasks','funding_required','RPC\x20endpoints','selected','walletSetup','Backup\x20password','refreshError','pendingTransaction','total','tasks','Cancel\x20request','Review\x20saved\x20payment','workerCommand','wallets','query','Overview','\x20network\x20workers\x20·\x20availability,\x20free\x20slots,\x20ID\x20·\x20r\x20refresh','cancelRequest','Deleting\x20local\x20wallet...','The\x20local\x20encrypted\x20private\x20key\x20will\x20be\x20deleted.','Not\x20paid.\x20','service','unlink','port','funding','refreshWalletSelection','Download','Backup\x20file\x20path','Build\x20a\x20website\x20for\x20my\x20coffee\x20shop','chooseSupport','On-chain\x20funds\x20stay\x20at\x20this\x20address.','status','View\x20result\x20files','networkWorkers','confirmReplacement','\x20·\x20','detailRequest','\x20on\x20','Switching\x20wallet...','pending','Use\x20at\x20least\x208\x20characters.','refusalProblems','Tool\x20ID','Continue\x20draft','New\x20SVG\x20file\x20path','--runtime','Back\x20·\x20no\x20coin\x20has\x20enough\x20funds\x20right\x20now','...','This\x20request\x20will\x20no\x20longer\x20be\x20payable\x20from\x20Colony.','Attention','extraAction','autoRefresh','Passwords\x20do\x20not\x20match.','restoreWallet','Preparing\x20local\x20LLM...','setField','filter','Preparing\x20the\x20payment\x20review...','confirm','Import\x20wallet','Add\x20funds\x20to\x20continue','SSH\x20port','payWith','restart','currentAddress','Set\x20tool\x20credential\x20(hidden\x20input)','cursor','Add\x20tool','network-worker','gas','Deleting\x20local\x20record...','showForm','Remove\x20tool','Runtime\x20(claude\x20or\x20codex)','fundingDialog','Draft\x20saved.\x20Continue\x20it\x20from\x20My\x20tasks\x20after\x20setting\x20up\x20a\x20wallet.','dismissMenu','walletDelete','logs','walletManagement','privateKeyView','detailLoading','Save\x20encrypted\x20backup\x20to\x20(new\x20file)','some','Task\x20published:\x20','requestKey','Save\x20under\x20this\x20directory','delete','deleteTaskDraft','workers','Review\x20task\x20&\x20payment','Your\x20request\x20is\x20saved\x20in\x20My\x20tasks.','busy','refreshExplore','Confirm\x20wallet\x20password','trim','out','created','resumeOrder','setupWallet','withFundingRetry','update','formSubmit','funded','label','run','download','localeCompare','.\x20Press\x20r\x20to\x20refresh\x20My\x20tasks.','Worker\x20·\x20'];_0x2f37=function(){return _0x5d8ecb;};return _0x2f37();}import{fundingInstructions as _0x9fa9bc,fundingNetworks as _0x23da29,networkChoiceLabel as _0x1691b3,networkTargets as _0x1c5b2e}from'../lib/funding-error.mjs';import{DEFAULT_SUPPORT_CHOICE as _0x1d9d31}from'../lib/support.mjs';import{randomUUID as _0x33845d}from'node:crypto';function _0x2901(_0x50e93e,_0x2f37d0){_0x50e93e=_0x50e93e-0x1c1;const _0x290192=_0x2f37();let _0x586c9b=_0x290192[_0x50e93e];return _0x586c9b;}const K=[_0x54dc1e(0x30b),_0x54dc1e(0x2f4),'workers',_0x54dc1e(0x229)],p=[_0x54dc1e(0x2c5),'Active',_0x54dc1e(0x288),_0x54dc1e(0x333),_0x54dc1e(0x1ef)],h=['Overview','Activity',_0x54dc1e(0x202)],b=new Set(['draft',_0x54dc1e(0x363),_0x54dc1e(0x2c7),_0x54dc1e(0x2aa),_0x54dc1e(0x31a),_0x54dc1e(0x208),'submitted',_0x54dc1e(0x275),_0x54dc1e(0x23b),_0x54dc1e(0x22b),_0x54dc1e(0x329),_0x54dc1e(0x1fa)]),S=new Set(['expired',_0x54dc1e(0x1e0),_0x54dc1e(0x1ff),'payment_reconciling']),q=new Set(['transaction_pending',_0x54dc1e(0x29e)]),x=0x7530;function u(_0x47db62){const _0x4d9c94=_0x54dc1e;return _0x47db62[_0x4d9c94(0x2a9)]['filter'](_0xcc2975=>![_0x4d9c94(0x30b),'workers']['includes'](_0x47db62[_0x4d9c94(0x2f2)])||[_0xcc2975[_0x4d9c94(0x289)],_0xcc2975['id'],_0xcc2975['searchText']??''][_0x4d9c94(0x355)](_0x55af7c=>_0x55af7c[_0x4d9c94(0x2b5)]()[_0x4d9c94(0x260)](_0x47db62['query'][_0x4d9c94(0x2b5)]()))?_0x47db62['filter']===_0x4d9c94(0x2c5)||_0x47db62[_0x4d9c94(0x2f2)]!==_0x4d9c94(0x30b)?!0x0:_0x47db62[_0x4d9c94(0x33a)]==='Completed'?_0xcc2975[_0x4d9c94(0x299)]==='completed':_0x47db62[_0x4d9c94(0x33a)]===_0x4d9c94(0x1ef)?_0xcc2975[_0x4d9c94(0x299)]===_0x4d9c94(0x1f8):_0x47db62[_0x4d9c94(0x33a)]===_0x4d9c94(0x20c)?b['has'](_0xcc2975[_0x4d9c94(0x299)]):!['completed','cancelled'][_0x4d9c94(0x260)](_0xcc2975[_0x4d9c94(0x299)])&&!b[_0x4d9c94(0x2ba)](_0xcc2975['state']):!0x1);}function f(){const _0x4f14bf=_0x54dc1e;return Object[_0x4f14bf(0x2da)](new Error(_0x4f14bf(0x1ec)),{'code':_0x4f14bf(0x1f8)});}function P(){const _0x591441=_0x54dc1e;return Object[_0x591441(0x2da)](new Error(_0x591441(0x2c4)),{'code':_0x591441(0x28c)});}function A(_0x32ed84,_0x336564){const _0x5cfda9=_0x54dc1e,{option:_0x1aa32d}=_0x32ed84,_0x415682=(_0x32ed84[_0x5cfda9(0x340)]==='IMD'?'':'\u2248\x20')+_0x57f2ab(_0x1aa32d[_0x5cfda9(0x300)],_0x32ed84['payWith'],{'up':!0x0}),_0x548527=_0x336564&&_0x336564[_0x5cfda9(0x1de)]===_0x32ed84[_0x5cfda9(0x1de)]&&_0x336564[_0x5cfda9(0x340)]===_0x32ed84[_0x5cfda9(0x340)];return _0x32ed84[_0x5cfda9(0x340)]+_0x5cfda9(0x327)+_0x32ed84['chainName']+_0x5cfda9(0x325)+_0x415682+_0x5cfda9(0x2e5)+_0x57f2ab(_0x1aa32d[_0x5cfda9(0x347)],_0x5cfda9(0x1e1),{'up':!0x0})+(_0x548527?_0x5cfda9(0x20a):'');}function T(_0x284354){const _0x56c3f2=_0x54dc1e;if(!_0x284354)return[];const _0x15e863=[];return _0x284354[_0x56c3f2(0x20e)]&&_0x15e863['push'](_0x56c3f2(0x2e2)+_0x284354[_0x56c3f2(0x20e)]+(_0x284354[_0x56c3f2(0x2fa)]?'\x20('+_0x284354['kind']+')':'')),_0x284354[_0x56c3f2(0x1dd)]&&_0x15e863[_0x56c3f2(0x1c8)]('Reason:\x20'+_0x284354[_0x56c3f2(0x1dd)]),_0x284354[_0x56c3f2(0x247)]&&_0x15e863[_0x56c3f2(0x1c8)](_0x56c3f2(0x277)+_0x284354[_0x56c3f2(0x247)]),_0x15e863;}function W(_0x5817a2){const _0x18993a=_0x54dc1e,_0x51b8b7=[_0x5817a2[_0x18993a(0x1f3)]||'The\x20payment\x20result\x20is\x20not\x20final\x20yet.'];return _0x51b8b7['push'](...T(_0x5817a2[_0x18993a(0x1d9)])),_0x51b8b7[_0x18993a(0x1c8)]('Your\x20request\x20is\x20saved\x20in\x20My\x20tasks.\x20Continue\x20payment\x20there\x20to\x20check\x20the\x20original\x20payment\x20before\x20sending\x20another\x20payment.'),_0x51b8b7[_0x18993a(0x240)]('\x0a');}class V{constructor(_0x2dba96){const _0x259990=_0x54dc1e;this[_0x259990(0x22f)]=_0x2dba96,this[_0x259990(0x2a7)]=new Set(),this['state']={'view':_0x259990(0x30b),'items':[],'selected':0x0,'detail':null,'result':null,'tab':_0x259990(0x311),'filter':_0x259990(0x2c5),'query':'','note':'','focus':_0x259990(0x270),'scroll':0x0,'busy':null,'error':null,'notice':null,'form':null,'menu':null,'confirm':null,'modelProgress':null,'help':!0x1,'detailLoading':!0x1,'address':null,'cursor':null,'total':null,'since':null,'refreshing':!0x1,'refreshError':null,'receive':null,'privateKeyView':null},this[_0x259990(0x26b)]=0x0,this[_0x259990(0x1cb)]=[],this['closed']=!0x1,this[_0x259990(0x1d7)]=0x0;}['subscribe']=_0x37331e=>(this[_0x54dc1e(0x2a7)][_0x54dc1e(0x23e)](_0x37331e),()=>this[_0x54dc1e(0x2a7)][_0x54dc1e(0x359)](_0x37331e));[_0x54dc1e(0x1e7)]=()=>this['state'];['update'](_0x1ca58a){const _0x1c1aa2=_0x54dc1e;if(!this[_0x1c1aa2(0x27e)]){this[_0x1c1aa2(0x299)]={...this[_0x1c1aa2(0x299)],..._0x1ca58a};for(const _0x5e32e1 of this[_0x1c1aa2(0x2a7)])_0x5e32e1();}}[_0x54dc1e(0x305)](){const _0x3c97ca=_0x54dc1e;return u(this[_0x3c97ca(0x299)])[this['state'][_0x3c97ca(0x305)]];}['showError'](){const _0x52c274=_0x54dc1e;++this[_0x52c274(0x26b)],this[_0x52c274(0x367)]({'detail':{'output':this[_0x52c274(0x299)][_0x52c274(0x226)]??this['state'][_0x52c274(0x308)]},'detailLoading':!0x1,'focus':_0x52c274(0x27d),'scroll':0x0,'tab':'Overview'});}[_0x54dc1e(0x24b)](){const _0x2867c5=_0x54dc1e;this[_0x2867c5(0x269)]?.['abort'](),this[_0x2867c5(0x269)]=null,this[_0x2867c5(0x367)]({'refreshing':!0x1});}async['run'](_0x45f460,_0x472b8e){const _0x1c2da9=_0x54dc1e;if(!this[_0x1c2da9(0x299)][_0x1c2da9(0x35e)]){this['cancelAutoRefresh'](),this[_0x1c2da9(0x273)]=new AbortController(),this[_0x1c2da9(0x367)]({'busy':_0x45f460,'error':null,'refreshError':null,'notice':null});try{return await _0x472b8e(this['operation'][_0x1c2da9(0x2cd)]);}catch(_0x3cba14){_0x3cba14[_0x1c2da9(0x2a8)]===_0x1c2da9(0x1f8)?(this['update']({'notice':_0x3cba14[_0x1c2da9(0x1f3)]}),this[_0x1c2da9(0x21c)]()):q['has'](_0x3cba14['code'])?this[_0x1c2da9(0x367)]({'error':W(_0x3cba14)}):this[_0x1c2da9(0x367)]({'error':_0x3cba14[_0x1c2da9(0x1f3)]});}finally{this['update']({'busy':null,'modelProgress':null});}}}async[_0x54dc1e(0x241)](_0x3e4f3e){const _0x17e103=_0x54dc1e;this['state'][_0x17e103(0x35e)]||(clearTimeout(this[_0x17e103(0x2ad)]),this[_0x17e103(0x326)]?.[_0x17e103(0x2f5)](),++this[_0x17e103(0x26b)],this[_0x17e103(0x367)]({'view':_0x3e4f3e,'items':[],'detail':null,'result':null,'selected':0x0,'query':'','filter':_0x17e103(0x2c5),'tab':'Overview','scroll':0x0,'focus':_0x17e103(0x270),'form':null,'menu':null,'cursor':null,'total':null,'since':null}),await this[_0x17e103(0x1f2)]());}async['refresh'](){const _0x1e0495=_0x54dc1e,_0x215848=this[_0x1e0495(0x305)]()?.['id']??this[_0x1e0495(0x249)];this['restoreSelectedId']=void 0x0,await this[_0x1e0495(0x36b)](_0x1e0495(0x248)+this[_0x1e0495(0x299)][_0x1e0495(0x2f2)]+_0x1e0495(0x331),async _0x1149df=>{const _0x2a1081=_0x1e0495;let _0x25a12b;if(this[_0x2a1081(0x299)]['view']===_0x2a1081(0x30b))_0x25a12b=await this[_0x2a1081(0x22f)][_0x2a1081(0x1c4)](_0x1149df);else{if(this[_0x2a1081(0x299)][_0x2a1081(0x2f2)]===_0x2a1081(0x2f4))_0x25a12b=await this[_0x2a1081(0x22f)][_0x2a1081(0x2f4)](this[_0x2a1081(0x299)][_0x2a1081(0x310)],void 0x0,_0x1149df);else{if(this[_0x2a1081(0x299)][_0x2a1081(0x2f2)]===_0x2a1081(0x35b)){const _0x550886=this[_0x2a1081(0x22f)][_0x2a1081(0x1d6)](),_0x4e8f99=new Set(_0x550886[_0x2a1081(0x2cf)](_0x4dbdf8=>_0x4dbdf8['id'])),_0x4fc199=_0x550886[_0x2a1081(0x262)](this[_0x2a1081(0x1cb)]['filter'](_0x30da58=>!_0x4e8f99[_0x2a1081(0x2ba)](_0x30da58['id'])))['map'](_0x4971b5=>({..._0x4971b5,'kind':_0x2a1081(0x250)}));this[_0x2a1081(0x367)]({'items':_0x4fc199,'selected':0x0,'note':_0x2a1081(0x2ae)});let _0xbb9cf4;try{_0xbb9cf4=await this[_0x2a1081(0x22f)][_0x2a1081(0x323)](_0x1149df);}catch(_0x4d94c8){throw this[_0x2a1081(0x367)]({'note':_0x4fc199[_0x2a1081(0x268)]+'\x20managed\x20targets\x20\xB7\x20Network\x20unavailable\x20\xB7\x20r\x20retry'}),_0x4d94c8;}_0x25a12b={'items':_0x4fc199[_0x2a1081(0x262)](_0xbb9cf4),'note':_0x4fc199['length']+'\x20managed\x20targets\x20\xB7\x20'+_0xbb9cf4[_0x2a1081(0x268)]+_0x2a1081(0x312)};}else{const _0xf203ca=await this['services']['wallet'](_0x1149df,_0x215848,{'balances':!0x1}),_0x3af89f=this[_0x2a1081(0x22f)][_0x2a1081(0x30f)]();!_0x3af89f['length']&&_0xf203ca['configured']&&_0x3af89f[_0x2a1081(0x1c8)]({'address':_0xf203ca[_0x2a1081(0x2dd)],'active':!0x0,'locked':_0xf203ca['locked']}),_0x25a12b={'items':_0x3af89f['map'](_0x1278ff=>({..._0x1278ff,'id':_0x1278ff[_0x2a1081(0x2dd)],'title':_0x1278ff[_0x2a1081(0x2dd)][_0x2a1081(0x2d4)](0x0,0xa)+_0x2a1081(0x331)+_0x1278ff['address'][_0x2a1081(0x2d4)](-0x8),'subtitle':_0x1278ff[_0x2a1081(0x2a2)]?'Current':_0x2a1081(0x238)})),'note':_0x2a1081(0x2f7),'address':_0xf203ca[_0x2a1081(0x342)]??_0xf203ca[_0x2a1081(0x2dd)]??null},this[_0x2a1081(0x367)]({'detail':_0xf203ca,'scroll':0x0});}}}const _0x2f70b8=_0x215848??(this['state'][_0x2a1081(0x2f2)]===_0x2a1081(0x229)?_0x25a12b['address']:void 0x0),_0x4d40f1=Math[_0x2a1081(0x210)](0x0,u({...this['state'],'items':_0x25a12b['items']})[_0x2a1081(0x297)](_0x41f93c=>_0x41f93c['id']===_0x2f70b8));this['update']({'items':_0x25a12b[_0x2a1081(0x2a9)],'note':_0x25a12b[_0x2a1081(0x1fe)],'cursor':_0x25a12b[_0x2a1081(0x344)],'total':_0x25a12b[_0x2a1081(0x30a)]??(_0x25a12b[_0x2a1081(0x344)]?null:_0x25a12b[_0x2a1081(0x2a9)][_0x2a1081(0x268)]),'since':_0x25a12b['since']??null,'selected':_0x4d40f1,'address':Object['hasOwn'](_0x25a12b,_0x2a1081(0x2dd))?_0x25a12b[_0x2a1081(0x2dd)]:this[_0x2a1081(0x299)][_0x2a1081(0x2dd)]}),this[_0x2a1081(0x299)]['view']===_0x2a1081(0x2f4)&&(this[_0x2a1081(0x1d7)]=Date[_0x2a1081(0x2b0)]());}),this[_0x1e0495(0x27e)]||await this[_0x1e0495(0x2d5)](this[_0x1e0495(0x299)]['view']===_0x1e0495(0x229));}async[_0x54dc1e(0x335)](){const _0x365c9e=_0x54dc1e,_0x237d7c=this['state'];this[_0x365c9e(0x27e)]||_0x237d7c[_0x365c9e(0x35e)]||_0x237d7c['refreshing']||_0x237d7c[_0x365c9e(0x353)]||_0x237d7c[_0x365c9e(0x2d7)]||_0x237d7c[_0x365c9e(0x33c)]||_0x237d7c[_0x365c9e(0x2d3)]||_0x237d7c[_0x365c9e(0x237)]||_0x237d7c[_0x365c9e(0x352)]||(_0x237d7c['view']==='explore'&&_0x237d7c[_0x365c9e(0x205)]!==null&&Date[_0x365c9e(0x2b0)]()-this['lastExploreRefresh']>=x?await this[_0x365c9e(0x35f)]():_0x237d7c[_0x365c9e(0x2f2)]===_0x365c9e(0x30b)&&!_0x237d7c[_0x365c9e(0x226)]&&['running',_0x365c9e(0x22b),_0x365c9e(0x275),_0x365c9e(0x329)][_0x365c9e(0x260)](this['selected']()?.[_0x365c9e(0x299)])&&await this['loadDetail'](!0x0));}async[_0x54dc1e(0x35f)](){const _0x4b152f=_0x54dc1e,_0x3b805b=new AbortController();this['refreshRequest']=_0x3b805b,this['lastExploreRefresh']=Date[_0x4b152f(0x2b0)](),this[_0x4b152f(0x367)]({'refreshing':!0x0});try{const _0xf2448f=await this[_0x4b152f(0x22f)][_0x4b152f(0x203)](this[_0x4b152f(0x299)][_0x4b152f(0x310)],this[_0x4b152f(0x299)]['since'],_0x3b805b[_0x4b152f(0x2cd)]);if(this['refreshRequest']!==_0x3b805b||this['closed'])return;const _0x32f91d=this[_0x4b152f(0x305)]()?.['id'],_0x5631c0=this['state'][_0x4b152f(0x2a9)]['at'](-0x1)?.['createdAt'],_0x1d1dc5=new Map(this['state'][_0x4b152f(0x2a9)]['map'](_0x48633=>[_0x48633['id'],_0x48633]));for(const _0x11b590 of _0xf2448f[_0x4b152f(0x2a9)]){const _0x39a45c=_0x1d1dc5['get'](_0x11b590['id']);_0x39a45c&&_0x11b590['updatedAt']<_0x39a45c[_0x4b152f(0x239)]||(_0x1d1dc5[_0x4b152f(0x2ba)](_0x11b590['id'])||!_0x5631c0||_0x11b590[_0x4b152f(0x1c1)]>=_0x5631c0)&&_0x1d1dc5[_0x4b152f(0x23f)](_0x11b590['id'],_0x11b590);}const _0x1727de=[..._0x1d1dc5['values']()]['sort']((_0x1d5724,_0x4c532c)=>_0x4c532c['createdAt'][_0x4b152f(0x36d)](_0x1d5724['createdAt'])),_0x347772=Math[_0x4b152f(0x210)](0x0,_0x1727de[_0x4b152f(0x297)](_0x415634=>_0x415634['id']===_0x32f91d));this['update']({'items':_0x1727de,'selected':_0x347772,'since':_0xf2448f[_0x4b152f(0x205)],'total':_0xf2448f[_0x4b152f(0x30a)]??(this[_0x4b152f(0x299)][_0x4b152f(0x344)]?null:_0x1727de[_0x4b152f(0x268)]),'refreshError':null}),await this[_0x4b152f(0x2d5)](!0x0);}catch(_0x5a6fc7){this[_0x4b152f(0x269)]===_0x3b805b&&!this[_0x4b152f(0x27e)]&&this[_0x4b152f(0x367)]({'refreshError':_0x4b152f(0x1c9)+_0x5a6fc7[_0x4b152f(0x1f3)]});}finally{this[_0x4b152f(0x269)]===_0x3b805b&&(this['refreshRequest']=null,this['update']({'refreshing':!0x1}));}}async[_0x54dc1e(0x1fd)](){const _0x41db0e=_0x54dc1e;this[_0x41db0e(0x299)][_0x41db0e(0x2f2)]!==_0x41db0e(0x2f4)||!this['state'][_0x41db0e(0x344)]||await this[_0x41db0e(0x36b)]('Loading\x20older\x20tasks...',async _0x3db5c6=>{const _0x17bffc=_0x41db0e,_0x282ed1=await this[_0x17bffc(0x22f)][_0x17bffc(0x2f4)](this[_0x17bffc(0x299)][_0x17bffc(0x310)],this[_0x17bffc(0x299)][_0x17bffc(0x344)],_0x3db5c6),_0x2e3830=new Set(this['state']['items']['map'](_0x4cc1d8=>_0x4cc1d8['id'])),_0x2d22f0=this[_0x17bffc(0x299)][_0x17bffc(0x2a9)][_0x17bffc(0x262)](_0x282ed1[_0x17bffc(0x2a9)][_0x17bffc(0x33a)](_0x5c13b6=>!_0x2e3830['has'](_0x5c13b6['id'])));this['update']({'items':_0x2d22f0,'cursor':_0x282ed1[_0x17bffc(0x344)],'total':this[_0x17bffc(0x299)][_0x17bffc(0x30a)]??(_0x282ed1[_0x17bffc(0x344)]?null:_0x2d22f0[_0x17bffc(0x268)])});});}async[_0x54dc1e(0x2d5)](_0x374c27=!0x1){const _0x3189ab=_0x54dc1e;clearTimeout(this[_0x3189ab(0x2ad)]),this[_0x3189ab(0x2ad)]=null;const _0x16cfaa=this[_0x3189ab(0x305)]();if(this[_0x3189ab(0x299)][_0x3189ab(0x2f2)]===_0x3189ab(0x229)&&!_0x16cfaa)return;const _0x153e55=++this[_0x3189ab(0x26b)];if(this[_0x3189ab(0x326)]?.[_0x3189ab(0x2f5)](),this[_0x3189ab(0x326)]=new AbortController(),this[_0x3189ab(0x367)]({'detail':_0x374c27?this[_0x3189ab(0x299)]['detail']:null,'result':_0x374c27?this[_0x3189ab(0x299)]['result']:null,'detailLoading':!!_0x16cfaa,'scroll':_0x374c27?this[_0x3189ab(0x299)]['scroll']:0x0}),!!_0x16cfaa)try{const _0xb4f117=this[_0x3189ab(0x299)]['view']===_0x3189ab(0x229)?await this[_0x3189ab(0x22f)][_0x3189ab(0x229)](this['detailRequest'][_0x3189ab(0x2cd)],_0x16cfaa[_0x3189ab(0x2dd)]):this[_0x3189ab(0x299)][_0x3189ab(0x2f2)]==='workers'?_0x16cfaa[_0x3189ab(0x2fa)]===_0x3189ab(0x346)?_0x16cfaa:_0x16cfaa['installed']?await this[_0x3189ab(0x22f)]['command']([_0x3189ab(0x25d),_0x3189ab(0x321)],_0x16cfaa,this[_0x3189ab(0x326)][_0x3189ab(0x2cd)]):{'notInstalled':!0x0}:await this[_0x3189ab(0x22f)][_0x3189ab(0x27d)](_0x16cfaa,this['detailRequest']['signal']);if(_0x153e55===this[_0x3189ab(0x26b)]){const _0x1abc1a=_0xb4f117[_0x3189ab(0x299)]??(_0x16cfaa[_0x3189ab(0x2f6)]?void 0x0:_0xb4f117[_0x3189ab(0x321)]),_0x2784e6=this[_0x3189ab(0x299)][_0x3189ab(0x2a9)][_0x3189ab(0x2cf)](_0x1b1cdb=>_0x1b1cdb['id']===_0x16cfaa['id']&&_0x1abc1a?{..._0x1b1cdb,'state':_0x1abc1a,..._0xb4f117[_0x3189ab(0x239)]?{'updatedAt':_0xb4f117[_0x3189ab(0x239)]}:{},...'canCancel'in _0xb4f117?{'canCancel':_0xb4f117[_0x3189ab(0x26e)],'canDelete':_0xb4f117[_0x3189ab(0x24a)],'canResume':_0xb4f117[_0x3189ab(0x2c1)]}:{}}:_0x1b1cdb),_0x5b18f8=u({...this['state'],'items':_0x2784e6})['findIndex'](_0xb3d73f=>_0xb3d73f['id']===_0x16cfaa['id']);this[_0x3189ab(0x367)]({'detail':_0x5b18f8<0x0?null:_0xb4f117,'detailLoading':!0x1,'items':_0x2784e6,'selected':Math[_0x3189ab(0x210)](0x0,_0x5b18f8)}),_0x5b18f8<0x0&&this[_0x3189ab(0x2d5)]();}}catch(_0x176cdd){_0x153e55===this[_0x3189ab(0x26b)]&&this['update']({'detailLoading':!0x1,'error':_0x176cdd['message']});}}[_0x54dc1e(0x253)](_0x533912){const _0x5bc5ce=_0x54dc1e,_0x119de6=u(this[_0x5bc5ce(0x299)])[_0x5bc5ce(0x268)],_0x49c976=Math[_0x5bc5ce(0x210)](0x0,Math[_0x5bc5ce(0x298)](_0x119de6-0x1,this[_0x5bc5ce(0x299)][_0x5bc5ce(0x305)]+_0x533912));_0x49c976!==this[_0x5bc5ce(0x299)][_0x5bc5ce(0x305)]&&(clearTimeout(this[_0x5bc5ce(0x2ad)]),++this['detailVersion'],this[_0x5bc5ce(0x326)]?.['abort'](),this[_0x5bc5ce(0x367)]({'selected':_0x49c976,'error':null,'notice':null,'detail':null,'result':null,'detailLoading':!0x0,'scroll':0x0}),this['state'][_0x5bc5ce(0x2f2)]===_0x5bc5ce(0x35b)?this[_0x5bc5ce(0x2d5)]():this[_0x5bc5ce(0x2ad)]=setTimeout(()=>{const _0x20db69=_0x5bc5ce;this[_0x20db69(0x2d5)]();},0x78)),_0x533912>0x0&&_0x49c976===_0x119de6-0x1&&this['more']();}['cycleFilter'](){const _0x1ef1ed=_0x54dc1e;this[_0x1ef1ed(0x367)]({'filter':p[(p[_0x1ef1ed(0x281)](this['state']['filter'])+0x1)%p['length']],'selected':0x0}),this[_0x1ef1ed(0x2d5)]();}async[_0x54dc1e(0x2d9)](_0x52afbb){const _0x38f96d=_0x54dc1e,_0x5de2f2=h[(h[_0x38f96d(0x281)](this['state']['tab'])+_0x52afbb+h[_0x38f96d(0x268)])%h[_0x38f96d(0x268)]];this['update']({'tab':_0x5de2f2,'scroll':0x0}),_0x5de2f2===_0x38f96d(0x202)&&await this['files']();}async['files'](){const _0x277871=_0x54dc1e,_0x20bce2=this[_0x277871(0x305)]();_0x20bce2?.[_0x277871(0x2f6)]&&(this['detailTimer']&&this['loadDetail'](!0x0),this[_0x277871(0x367)]({'tab':'Files','focus':_0x277871(0x27d),'scroll':0x0}),await this[_0x277871(0x36b)](_0x277871(0x26d),async _0x4056a4=>{const _0x9a44d9=_0x277871;this[_0x9a44d9(0x367)]({'result':await this[_0x9a44d9(0x22f)][_0x9a44d9(0x1e4)](_0x20bce2[_0x9a44d9(0x2f6)],_0x4056a4)});}));}['showForm'](_0x47fe3e,_0x18c614,_0x3751ed,{onCancel:_0x4adba7,submit:_0x3c9726='Continue'}={}){const _0x496e89=_0x54dc1e;this['cancelAutoRefresh'](),this['formSubmit']=_0x3751ed,this['formCancel']=_0x4adba7,this[_0x496e89(0x367)]({'form':{'title':_0x47fe3e,'fields':_0x18c614,'values':Object[_0x496e89(0x22e)](_0x18c614['map'](_0x2f3cfc=>[_0x2f3cfc[_0x496e89(0x21e)],_0x2f3cfc['value']??''])),'field':0x0,'submit':_0x3c9726,'error':null},'menu':null});}[_0x54dc1e(0x339)](_0x1cd6a9){const _0xb3586f=_0x54dc1e,_0x22f651=this['state']['form'],_0x3bca11=_0x22f651[_0xb3586f(0x2ed)][_0x22f651[_0xb3586f(0x278)]][_0xb3586f(0x21e)];this['update']({'form':{..._0x22f651,'values':{..._0x22f651['values'],[_0x3bca11]:_0x1cd6a9},'error':null}});}['nextField'](_0x1a72b6=!0x1){const _0x420af2=_0x54dc1e,_0x412e6a=this[_0x420af2(0x299)][_0x420af2(0x2d7)];this[_0x420af2(0x367)]({'form':{..._0x412e6a,'field':(_0x412e6a[_0x420af2(0x278)]+(_0x1a72b6?-0x1:0x1)+_0x412e6a['fields'][_0x420af2(0x268)])%_0x412e6a[_0x420af2(0x2ed)][_0x420af2(0x268)]}});}async[_0x54dc1e(0x28d)](){const _0x581afe=_0x54dc1e,{values:_0x7efc3}=this['state']['form'];try{await this[_0x581afe(0x368)](_0x7efc3);}catch(_0x3d266e){this[_0x581afe(0x367)]({'form':{...this[_0x581afe(0x299)]['form'],'error':_0x3d266e[_0x581afe(0x1f3)]}});}}[_0x54dc1e(0x28f)](){const _0x3dbd38=_0x54dc1e,_0x526d39=this[_0x3dbd38(0x214)];this[_0x3dbd38(0x367)]({'form':null}),_0x526d39&&_0x526d39();}['search'](){const _0x58b990=_0x54dc1e,_0x478d58=this[_0x58b990(0x299)][_0x58b990(0x2f2)]==='workers';this['showForm'](_0x478d58?_0x58b990(0x227):_0x58b990(0x302),[{'name':'query','label':_0x478d58?'Worker\x20ID,\x20runtime\x20or\x20skill':'Keyword\x20or\x20task\x20ID','value':this[_0x58b990(0x299)][_0x58b990(0x310)]}],async({query:_0x4ba779})=>{const _0x3917db=_0x58b990;this['update']({'query':_0x4ba779,'selected':0x0,'form':null}),this[_0x3917db(0x299)][_0x3917db(0x2f2)]==='explore'?await this[_0x3917db(0x1f2)]():await this['loadDetail']();},{'submit':_0x58b990(0x2e4)});}[_0x54dc1e(0x236)](_0x2222f0=null){const _0x1df867=_0x54dc1e;this[_0x1df867(0x1d1)]={'id':_0x33845d(),'objective':'','parent':_0x2222f0},this[_0x1df867(0x21c)]();}['continueTask'](){const _0x3b077c=_0x54dc1e,_0x3e43f8=this[_0x3b077c(0x305)]();this[_0x3b077c(0x299)][_0x3b077c(0x2f2)]!==_0x3b077c(0x30b)||!_0x3e43f8?.['jobId']||this['create'](_0x3e43f8[_0x3b077c(0x2f6)]);}['editDraft'](){const _0x2facdd=_0x54dc1e;this[_0x2facdd(0x1d1)]&&(this[_0x2facdd(0x349)](this[_0x2facdd(0x1d1)][_0x2facdd(0x1d3)]?_0x2facdd(0x215):_0x2facdd(0x2e7),[{'name':_0x2facdd(0x2ff),'label':this[_0x2facdd(0x1d1)][_0x2facdd(0x1d3)]?_0x2facdd(0x1cf):'What\x20would\x20you\x20like\x20to\x20get\x20done?','value':this[_0x2facdd(0x1d1)][_0x2facdd(0x2ff)],'placeholder':_0x2facdd(0x31e)}],async({objective:_0xd1f9cd})=>{const _0x493fb2=_0x2facdd;if(!_0xd1f9cd[_0x493fb2(0x361)]())throw new Error('Describe\x20what\x20you\x20would\x20like\x20to\x20get\x20done.');const _0x5685ff=_0xd1f9cd['trim']()!==this[_0x493fb2(0x1d1)][_0x493fb2(0x2ff)];this['draft']={...this[_0x493fb2(0x1d1)],'objective':_0xd1f9cd['trim'](),..._0x5685ff&&this[_0x493fb2(0x1d1)][_0x493fb2(0x357)]?{'id':_0x33845d(),'createdAt':void 0x0}:{},..._0x5685ff?{'requestKey':void 0x0,'plan':void 0x0}:{}},this[_0x493fb2(0x367)]({'form':null}),await this[_0x493fb2(0x1f5)]();},{'submit':_0x2facdd(0x293)}),this[_0x2facdd(0x367)]({'form':{...this['state'][_0x2facdd(0x2d7)],'hint':_0x2facdd(0x274)}}));}[_0x54dc1e(0x1d8)](_0x49e492){return new Promise(_0x15bc59=>{const _0x471966=_0x2901;this[_0x471966(0x1d2)]=_0x15bc59,this[_0x471966(0x349)](_0x471966(0x2e6),_0x49e492[_0x471966(0x2cf)]((_0x1e69f8,_0x36c032)=>({'name':String(_0x36c032),'label':_0x1e69f8})),_0x308d20=>{const _0x59f1d6=_0x471966;this['update']({'form':null}),this[_0x59f1d6(0x1d2)]=null,_0x15bc59(Object['values'](_0x308d20));},{'onCancel':()=>{const _0x52d2cb=_0x471966;this[_0x52d2cb(0x1d2)]=null,_0x15bc59([]);}});});}[_0x54dc1e(0x33c)](_0x250405){return new Promise(_0x16c616=>{const _0x2fbfe2=_0x2901;this[_0x2fbfe2(0x231)]=_0x16c616;const _0x4ce054=_0x250405[_0x2fbfe2(0x22c)]??(_0x250405[_0x2fbfe2(0x1f3)]!==void 0x0?[String(_0x250405['message'])]:[]);this['update']({'confirm':{..._0x250405,'lines':_0x4ce054,'selection':0x0,'accepted':!0x1,'expanded':!0x1},'scroll':0x0});});}[_0x54dc1e(0x2df)](_0x5c2594){const _0x108995=_0x54dc1e,_0x556b2a=this['state'][_0x108995(0x33c)],_0x19d297=_0x556b2a[_0x108995(0x334)]?0x3:0x2,_0x1403df=(_0x556b2a['selection']+_0x5c2594+_0x19d297)%_0x19d297;this['update']({'confirm':{..._0x556b2a,'selection':_0x1403df,'accepted':_0x1403df===_0x19d297-0x1}});}[_0x54dc1e(0x2c2)](){const _0x1310ca=_0x54dc1e,_0x4a6adb=this[_0x1310ca(0x299)][_0x1310ca(0x33c)];_0x4a6adb['extraAction']&&_0x4a6adb['selection']===0x1?_0x4a6adb[_0x1310ca(0x334)][_0x1310ca(0x36b)]():this[_0x1310ca(0x2ee)](_0x4a6adb[_0x1310ca(0x216)]);}async[_0x54dc1e(0x324)](_0x227ef6){const _0x31032d=_0x54dc1e;if(!await this[_0x31032d(0x33c)]({'title':_0x31032d(0x2f9),'message':_0x227ef6?.[_0x31032d(0x1f3)]??''}))throw f();}[_0x54dc1e(0x2ee)](_0x1a59e4){const _0x4b24a6=_0x54dc1e,_0x1af92f=this[_0x4b24a6(0x231)];this[_0x4b24a6(0x231)]=null,this[_0x4b24a6(0x367)]({'confirm':null}),_0x1af92f(_0x1a59e4);}[_0x54dc1e(0x2fe)](_0x2654af={}){return async _0x30ceb0=>{const _0x3a287e=_0x2901,_0x4db637=await this['confirm']({'title':_0x3a287e(0x35c),'payment':_0x4fdf79(_0x30ceb0),'extraAction':{'label':_0x3a287e(0x23c),'run':()=>this[_0x3a287e(0x2ee)]('change')},..._0x2654af});if(_0x4db637===_0x3a287e(0x292))throw P();if(!_0x4db637)throw f();};}async[_0x54dc1e(0x25a)]({action:_0x500e73,signal:_0x3c9789,prefer:_0x4131ae}){const _0x2ca232=_0x54dc1e,_0x478cb9=await this['withFundingRetry'](()=>this[_0x2ca232(0x22f)][_0x2ca232(0x284)]({'action':_0x500e73,'signal':_0x3c9789,'prefer':_0x4131ae}));return{'choice':_0x478cb9,'payment':{'paymentChain':_0x478cb9[_0x2ca232(0x1de)],'payWith':_0x478cb9[_0x2ca232(0x340)]}};}async['pickPayment']({action:_0x31aaff,signal:_0x31f93d,current:_0x84438}){const _0x271663=_0x54dc1e;this[_0x271663(0x367)]({'busy':_0x271663(0x263)});const {networks:_0x22194a}=await this[_0x271663(0x22f)][_0x271663(0x2db)]({'action':_0x31aaff,'signal':_0x31f93d}),_0x53d427=_0x22194a[_0x271663(0x2b1)](_0x40cd0f=>(_0x40cd0f[_0x271663(0x2c8)]??[])['filter'](_0xd7935f=>_0xd7935f[_0x271663(0x369)])[_0x271663(0x2cf)](_0x12414e=>({'paymentChain':_0x40cd0f[_0x271663(0x2a4)],'payWith':_0x12414e[_0x271663(0x251)],'chainName':_0x40cd0f[_0x271663(0x2d6)],'option':_0x12414e})));return new Promise(_0xf26014=>{const _0x22da15=_0x271663,_0x5f2603=_0x53d427[_0x22da15(0x2cf)](_0x34de5f=>({'label':A(_0x34de5f,_0x84438),'run':()=>_0xf26014({'paymentChain':_0x34de5f[_0x22da15(0x1de)],'payWith':_0x34de5f[_0x22da15(0x340)]})}));_0x5f2603[_0x22da15(0x268)]||_0x5f2603['push']({'label':_0x22da15(0x330),'run':()=>_0xf26014(_0x84438)}),this[_0x22da15(0x1e3)](_0x53d427[_0x22da15(0x268)]>0x1?_0x22da15(0x1e2):_0x22da15(0x21f),_0x5f2603,{'onCancel':()=>_0xf26014(_0x84438)});});}async['publishDraft'](){const _0x1c8c90=_0x54dc1e,_0x14953d=await this[_0x1c8c90(0x36b)](_0x1c8c90(0x263),async _0xccd41e=>{const _0x976d39=_0x1c8c90,_0xfed86=this[_0x976d39(0x1d1)];_0xfed86[_0x976d39(0x357)]||Object[_0x976d39(0x2da)](_0xfed86,await this['services'][_0x976d39(0x2d2)](_0xfed86));const _0x2fe8d6=_0xfed86[_0x976d39(0x1d3)]?_0x976d39(0x280):_0x976d39(0x1f9);let _0x48b1bf;try{if(!_0xfed86['requestKey']){const _0x3c65ae=await this[_0x976d39(0x25a)]({'action':_0x2fe8d6,'signal':_0xccd41e,'prefer':_0xfed86['payment']});_0x48b1bf=_0x3c65ae[_0x976d39(0x2ec)],_0xfed86[_0x976d39(0x300)]=_0x3c65ae['payment'];}}catch(_0xaecbea){if(_0xaecbea[_0x976d39(0x2a8)]!==_0x976d39(0x2e3))throw _0xaecbea;return{'status':_0x976d39(0x1d1),'setupWallet':await this['confirm']({'title':_0x976d39(0x28b),'lines':[_0x976d39(0x35d),_0x976d39(0x24e)],'acceptLabel':_0x976d39(0x25e),'cancelLabel':'Back\x20to\x20My\x20tasks'}),'draftId':_0xfed86['id']};}this[_0x976d39(0x367)]({'busy':'Understanding\x20your\x20request...'});const _0x3ca868=_0xfed86['parent']?await this['services'][_0x976d39(0x27d)]({'jobId':_0xfed86[_0x976d39(0x1d3)]},_0xccd41e):null,_0x3e7beb=_0xfed86[_0x976d39(0x2b4)]??await this[_0x976d39(0x22f)]['plan']({'objective':_0xfed86['objective'],'parent':_0x3ca868,'signal':_0xccd41e,'ask':_0x1cdb54=>this[_0x976d39(0x1d8)](_0x1cdb54),'onProgress':_0x5424cc=>{const _0x4fad8f=_0x976d39;this[_0x4fad8f(0x367)](_0x5424cc[_0x4fad8f(0x1ea)]==='loaded'?{'busy':_0x4fad8f(0x1ed),'modelProgress':null}:{'busy':_0x4fad8f(0x338),'modelProgress':_0x5424cc});}});if(_0xccd41e[_0x976d39(0x20b)](),!_0x3e7beb[_0x976d39(0x2e1)])throw new Error(_0x3e7beb[_0x976d39(0x1c3)][_0x976d39(0x240)]('\x0a')||'This\x20request\x20is\x20not\x20supported.');for(_0xfed86[_0x976d39(0x2b4)]=_0x3e7beb,_0xfed86[_0x976d39(0x357)]||Object[_0x976d39(0x2da)](_0xfed86,await this['services'][_0x976d39(0x2d2)](_0xfed86)),this[_0x976d39(0x367)]({'busy':_0x976d39(0x291)});;)try{const _0x2ed460=await this['withFundingRetry'](()=>this[_0x976d39(0x22f)][_0x976d39(0x2fb)]({'input':_0x3e7beb['input'],'action':_0x2fe8d6,'paymentChain':_0xfed86[_0x976d39(0x300)]?.[_0x976d39(0x1de)],'payWith':_0xfed86['payment']?.[_0x976d39(0x340)],'expectedWallet':_0x48b1bf?.['address'],'requestKey':_0xfed86[_0x976d39(0x357)]??_0xfed86['id'],'onSaved':async _0x52ac58=>{const _0x5b7334=_0x976d39;_0xfed86[_0x5b7334(0x357)]=_0x52ac58[_0x5b7334(0x357)],await this[_0x5b7334(0x22f)][_0x5b7334(0x200)](_0xfed86['id']);},'plan':{'summary':_0x3e7beb['summary'],'deliverables':_0x3e7beb[_0x976d39(0x271)]},'signal':_0xccd41e,'chooseSupport':_0x38cf5a=>this[_0x976d39(0x31f)](_0x38cf5a),'onProgress':_0x3cdb01=>this[_0x976d39(0x23d)](_0x3cdb01),'confirmReplacement':_0x335a05=>this[_0x976d39(0x324)](_0x335a05),'confirm':this[_0x976d39(0x2fe)]()}));return this[_0x976d39(0x2bf)](_0x2ed460),_0x2ed460;}catch(_0xf411ce){if(_0xf411ce[_0x976d39(0x2a8)]!==_0x976d39(0x28c))throw _0xf411ce;_0xfed86[_0x976d39(0x300)]=await this[_0x976d39(0x21d)]({'action':_0x2fe8d6,'signal':_0xccd41e,'current':_0xfed86[_0x976d39(0x300)]}),this['update']({'busy':_0x976d39(0x33b)});}});if(!this[_0x1c8c90(0x27e)]&&_0x14953d?.[_0x1c8c90(0x321)]==='draft')await this[_0x1c8c90(0x241)](_0x14953d[_0x1c8c90(0x365)]?_0x1c8c90(0x229):_0x1c8c90(0x30b)),this[_0x1c8c90(0x367)]({'notice':_0x1c8c90(0x34d)}),_0x14953d[_0x1c8c90(0x365)]&&this[_0x1c8c90(0x351)]();else{if(!this['closed']&&_0x14953d?.[_0x1c8c90(0x321)]===_0x1c8c90(0x1dc)&&_0x14953d['state'][_0x1c8c90(0x2f6)]){await this[_0x1c8c90(0x241)](_0x1c8c90(0x30b));const _0xa4a5b1=this['state']['items'][_0x1c8c90(0x297)](_0x197d3e=>_0x197d3e[_0x1c8c90(0x2f6)]===_0x14953d[_0x1c8c90(0x299)][_0x1c8c90(0x2f6)]);_0xa4a5b1>=0x0&&(this[_0x1c8c90(0x367)]({'selected':_0xa4a5b1}),await this[_0x1c8c90(0x2d5)]()),this[_0x1c8c90(0x367)]({'notice':_0x1c8c90(0x356)+_0x14953d[_0x1c8c90(0x299)][_0x1c8c90(0x2f6)]});}}}[_0x54dc1e(0x23d)](_0x32187a){const _0x3f8d20=_0x54dc1e,_0x276545=typeof _0x32187a?.[_0x3f8d20(0x1f3)]==_0x3f8d20(0x252)?_0x32187a[_0x3f8d20(0x1f3)][_0x3f8d20(0x361)]():'';_0x276545&&this[_0x3f8d20(0x367)]({'busy':_0x276545});}async[_0x54dc1e(0x366)](_0x53eac6){const _0x5384af=_0x54dc1e;for(;;)try{return await _0x53eac6();}catch(_0x52c61c){if(_0x52c61c[_0x5384af(0x2a8)]!==_0x5384af(0x303))throw _0x52c61c;if(!await this['confirm']({'title':_0x5384af(0x33e),'lines':_0x9fa9bc(_0x52c61c[_0x5384af(0x31a)]),'acceptLabel':_0x5384af(0x2c0),'cancelLabel':'Back','extraAction':{'label':_0x5384af(0x2e0),'run':()=>this[_0x5384af(0x2d0)](_0x52c61c[_0x5384af(0x31a)])}}))throw f();this[_0x5384af(0x367)]({'busy':_0x5384af(0x261)});}}[_0x54dc1e(0x2bf)]({state:_0x22e113,status:_0x2accca,check:_0x4c6899}){const _0x1e1f5f=_0x54dc1e;if(_0x2accca==='admitted'&&_0x22e113[_0x1e1f5f(0x2f6)])this[_0x1e1f5f(0x1d1)]=null,this[_0x1e1f5f(0x367)]({'notice':_0x1e1f5f(0x356)+_0x22e113[_0x1e1f5f(0x2f6)]+_0x1e1f5f(0x36e)});else{if(_0x2accca==='blocked')this[_0x1e1f5f(0x367)]({'error':_0x1e1f5f(0x316)+_0x4c6899[_0x1e1f5f(0x2a0)][_0x1e1f5f(0x2cf)](_0x22e8dd=>_0x22e8dd['detail']??_0x22e8dd['code'])['join']('\x0a')});else{if(_0x2accca==='refused')this['update']({'error':_0x1e1f5f(0x235)+(_0x22e113[_0x1e1f5f(0x32b)]??[])[_0x1e1f5f(0x2cf)](_0x4b63e9=>_0x4b63e9['detail']??_0x4b63e9[_0x1e1f5f(0x2a8)])['join']('\x0a')+_0x1e1f5f(0x1f6)+_0x22e113[_0x1e1f5f(0x2b7)]});else{if(S[_0x1e1f5f(0x2ba)](_0x2accca)){const _0x947cc=[_0x1e1f5f(0x25c),_0x1e1f5f(0x35d),_0x1e1f5f(0x24d)],_0x3dd039=_0x22e113?.[_0x1e1f5f(0x309)]??_0x22e113?.['transaction'];_0x3dd039?.[_0x1e1f5f(0x20e)]&&_0x947cc[_0x1e1f5f(0x1c8)]('Transaction:\x20'+_0x3dd039[_0x1e1f5f(0x20e)]),_0x3dd039?.[_0x1e1f5f(0x247)]&&_0x947cc[_0x1e1f5f(0x1c8)](_0x1e1f5f(0x277)+_0x3dd039['explorerUrl']),this[_0x1e1f5f(0x367)]({'error':_0x947cc[_0x1e1f5f(0x240)]('\x0a')});}else this[_0x1e1f5f(0x367)]({'error':_0x1e1f5f(0x259)+_0x2accca+_0x1e1f5f(0x201)});}}}}async[_0x54dc1e(0x364)](){const _0x2af62b=_0x54dc1e,_0x40cd23=this['selected']();if(this[_0x2af62b(0x299)][_0x2af62b(0x2f2)]==='tasks'&&_0x40cd23?.[_0x2af62b(0x1d4)]){const _0x22876d=await this[_0x2af62b(0x36b)]('Opening\x20draft...',()=>this[_0x2af62b(0x22f)][_0x2af62b(0x2ef)](_0x40cd23['draftId']));_0x22876d&&(this[_0x2af62b(0x1d1)]=_0x22876d,this[_0x2af62b(0x21c)]());return;}this[_0x2af62b(0x299)]['view']!==_0x2af62b(0x30b)||!_0x40cd23?.[_0x2af62b(0x357)]||_0x40cd23[_0x2af62b(0x2f6)]||!_0x40cd23['canResume']||(this[_0x2af62b(0x1d1)]=null,await this[_0x2af62b(0x36b)]('Checking\x20the\x20saved\x20order...',async _0x1e9870=>{const _0x5d131e=_0x2af62b;let _0x3f6d94,_0x337f5a,_0x2a8125;if(_0x40cd23[_0x5d131e(0x26e)]){const _0x49a152=await this['services'][_0x5d131e(0x27d)](_0x40cd23,_0x1e9870);_0x2a8125=_0x49a152['action']??'job.open',this[_0x5d131e(0x367)]({'busy':_0x5d131e(0x263)}),_0x3f6d94=(await this['autoPayment']({'action':_0x2a8125,'signal':_0x1e9870,'prefer':{'paymentChain':_0x49a152[_0x5d131e(0x1de)]??_0x5d131e(0x2be),'payWith':_0x49a152[_0x5d131e(0x340)]??_0x5d131e(0x2ce)}}))[_0x5d131e(0x300)],_0x337f5a=this[_0x5d131e(0x2fe)]({'title':_0x5d131e(0x30d)});}for(;;)try{this[_0x5d131e(0x2bf)](await this[_0x5d131e(0x366)](()=>this[_0x5d131e(0x22f)]['resume'](_0x40cd23,_0x61fc84=>this['confirm'](_0x61fc84),_0x1e9870,_0x24fc2b=>this[_0x5d131e(0x31f)](_0x24fc2b),_0x50248c=>this[_0x5d131e(0x23d)](_0x50248c),_0x40d271=>this[_0x5d131e(0x324)](_0x40d271),{'payment':_0x3f6d94,'review':_0x337f5a})));return;}catch(_0x3a8323){if(_0x3a8323[_0x5d131e(0x2a8)]!=='change_payment')throw _0x3a8323;_0x3f6d94=await this[_0x5d131e(0x21d)]({'action':_0x2a8125,'signal':_0x1e9870,'current':_0x3f6d94}),this['update']({'busy':'Preparing\x20the\x20payment\x20review...'});}}));}[_0x54dc1e(0x2bc)](){const _0x33c3b6=_0x54dc1e,_0x594cde=this['selected']();if(this[_0x33c3b6(0x299)][_0x33c3b6(0x2f2)]!==_0x33c3b6(0x30b)||!_0x594cde)return;const _0x329a33=[{'label':'View\x20details','run':()=>this[_0x33c3b6(0x367)]({'focus':_0x33c3b6(0x27d),'tab':'Overview','scroll':0x0})}];_0x594cde[_0x33c3b6(0x1d4)]?_0x329a33[_0x33c3b6(0x1c8)]({'label':_0x33c3b6(0x32d),'run':()=>this[_0x33c3b6(0x364)]()},{'label':_0x33c3b6(0x1c6),'run':()=>this['deleteTaskDraft']()}):_0x594cde[_0x33c3b6(0x2f6)]?(_0x329a33[_0x33c3b6(0x1c8)]({'label':_0x33c3b6(0x322),'run':()=>this[_0x33c3b6(0x242)]()},{'label':_0x33c3b6(0x2ac),'run':()=>this['download']()}),_0x594cde[_0x33c3b6(0x299)]==='completed'&&_0x329a33[_0x33c3b6(0x1c8)]({'label':_0x33c3b6(0x2b2),'run':()=>this['continueTask']()})):_0x594cde[_0x33c3b6(0x357)]&&(_0x594cde[_0x33c3b6(0x2c1)]&&_0x329a33[_0x33c3b6(0x1c8)]({'label':_0x594cde['canCancel']?_0x33c3b6(0x232):'Inspect\x20/\x20resume\x20saved\x20order','run':()=>this[_0x33c3b6(0x364)]()}),_0x594cde[_0x33c3b6(0x26e)]&&_0x329a33['push']({'label':'Cancel\x20request','run':()=>this[_0x33c3b6(0x313)]()}),_0x594cde[_0x33c3b6(0x24a)]&&_0x329a33[_0x33c3b6(0x1c8)]({'label':'Delete\x20local\x20record','run':()=>this['deleteRequest']()})),this[_0x33c3b6(0x1e3)](_0x33c3b6(0x2de),_0x329a33);}async[_0x54dc1e(0x35a)](){const _0xc7f544=_0x54dc1e,_0x13f38f=this[_0xc7f544(0x305)]();if(!_0x13f38f?.[_0xc7f544(0x1d4)]||!await this['confirm']({'title':_0xc7f544(0x204),'lines':[_0x13f38f[_0xc7f544(0x289)]],'acceptLabel':_0xc7f544(0x1c6),'cancelLabel':'Keep\x20draft'}))return;await this[_0xc7f544(0x36b)](_0xc7f544(0x2a1),()=>this[_0xc7f544(0x22f)]['deleteDraft'](_0x13f38f['draftId']))&&(this[_0xc7f544(0x1d1)]?.['id']===_0x13f38f[_0xc7f544(0x1d4)]&&(this[_0xc7f544(0x1d1)]=null),await this[_0xc7f544(0x1f2)]());}async[_0x54dc1e(0x313)](){const _0x38a684=_0x54dc1e,_0x10b527=this[_0x38a684(0x305)]();if(this[_0x38a684(0x299)][_0x38a684(0x2f2)]!=='tasks'||!_0x10b527?.[_0x38a684(0x26e)])return;let _0x164205=!0x1;await this[_0x38a684(0x36b)](_0x38a684(0x282),async()=>{const _0x3acb9c=_0x38a684;await this['confirm']({'title':_0x3acb9c(0x2d8),'lines':[_0x10b527[_0x3acb9c(0x289)],'',_0x3acb9c(0x2d1),_0x3acb9c(0x332),_0x3acb9c(0x234)],'acceptLabel':_0x3acb9c(0x30c),'cancelLabel':'Keep\x20request'})&&(await this[_0x3acb9c(0x22f)][_0x3acb9c(0x29d)](_0x10b527),_0x164205=!0x0);}),_0x164205&&!this[_0x38a684(0x27e)]&&(await this[_0x38a684(0x1f2)](),this[_0x38a684(0x367)]({'notice':_0x38a684(0x2bb)}));}async[_0x54dc1e(0x2b6)](){const _0x253bdd=_0x54dc1e,_0x21151f=this[_0x253bdd(0x305)]();if(this[_0x253bdd(0x299)][_0x253bdd(0x2f2)]!==_0x253bdd(0x30b)||!_0x21151f?.['canDelete'])return;let _0x12e9df=!0x1;await this[_0x253bdd(0x36b)](_0x253bdd(0x348),async()=>{const _0xe1882=_0x253bdd;await this[_0xe1882(0x22f)][_0xe1882(0x359)](_0x21151f),_0x12e9df=!0x0;}),_0x12e9df&&!this[_0x253bdd(0x27e)]&&(await this[_0x253bdd(0x1f2)](),this[_0x253bdd(0x367)]({'notice':'Local\x20record\x20deleted.'}));}[_0x54dc1e(0x36c)](){const _0xe35f68=_0x54dc1e,_0x6ad555=this[_0xe35f68(0x305)]();_0x6ad555?.['jobId']&&this['showForm'](_0xe35f68(0x1ca),[{'name':_0xe35f68(0x362),'label':_0xe35f68(0x358),'value':'./output/'+_0x6ad555['jobId']}],async({out:_0x4bb99e})=>{const _0x50e2dc=_0xe35f68;if(!_0x4bb99e[_0x50e2dc(0x361)]())throw new Error(_0x50e2dc(0x1ee));this[_0x50e2dc(0x367)]({'form':null}),await this[_0x50e2dc(0x36b)]('Downloading\x20verified\x20files...',async _0x1361f2=>{const _0x138ae4=_0x50e2dc,_0x2bb136=await this[_0x138ae4(0x22f)][_0x138ae4(0x36c)]({'id':_0x6ad555['jobId'],'out':_0x4bb99e,'signal':_0x1361f2,'onProgress':_0x4af2eb=>this[_0x138ae4(0x367)]({'busy':_0x138ae4(0x2b8)+_0x4af2eb[_0x138ae4(0x1db)]})});this[_0x138ae4(0x367)]({'notice':_0x138ae4(0x2b8)+_0x2bb136['files'][_0x138ae4(0x268)]+'\x20verified\x20files\x20to\x20'+_0x4bb99e});});},{'submit':_0xe35f68(0x31c)});}[_0x54dc1e(0x264)](){const _0x5bfa47=_0x54dc1e;this[_0x5bfa47(0x349)](_0x5bfa47(0x1d0),[{'name':_0x5bfa47(0x223),'label':_0x5bfa47(0x1c7)},{'name':_0x5bfa47(0x319),'label':_0x5bfa47(0x33f),'value':'22'},{'name':_0x5bfa47(0x29f),'label':_0x5bfa47(0x1eb)}],async _0x1fc17c=>{const _0x144598=_0x5bfa47,_0xe53855=_0x2f1c7d(_0x1fc17c);this['extraTargets'][_0x144598(0x355)](_0x3de57a=>_0x3de57a['id']===_0xe53855['id'])||this[_0x144598(0x1cb)][_0x144598(0x1c8)](_0xe53855),this['update']({'form':null}),await this[_0x144598(0x1f2)](),this['update']({'selected':this[_0x144598(0x299)][_0x144598(0x2a9)][_0x144598(0x297)](_0x506b63=>_0x506b63['id']===_0xe53855['id'])}),await this[_0x144598(0x2d5)]();},{'submit':_0x5bfa47(0x25f)});}[_0x54dc1e(0x1e3)](_0x187899,_0x4d25ac,{onCancel:_0x5c113c,selected:_0x887266=0x0}={}){const _0xeadbb4=_0x54dc1e;this['cancelAutoRefresh'](),this['menuCancel']=_0x5c113c??null,this[_0xeadbb4(0x367)]({'menu':{'title':_0x187899,'items':_0x4d25ac,'selected':_0x887266},'form':null});}[_0x54dc1e(0x31f)](_0x15c1f1){return new Promise((_0x90d3d5,_0x23a899)=>{const _0x1e6069=_0x2901;this[_0x1e6069(0x1e3)]('Choose\x20payment\x20\xB7\x20support\x20is\x20optional',_0x15c1f1[_0x1e6069(0x2cf)]((_0x870201,_0x42485a)=>({'label':_0x870201[_0x1e6069(0x36a)],'run':()=>_0x90d3d5(_0x42485a)})),{'onCancel':()=>_0x23a899(f()),'selected':_0x1d9d31});});}[_0x54dc1e(0x34e)](){const _0xa1a4a=_0x54dc1e,_0x34f8ff=this[_0xa1a4a(0x222)];this['menuCancel']=null,this[_0xa1a4a(0x367)]({'menu':null}),_0x34f8ff?.();}[_0x54dc1e(0x295)](){const _0x192e44=_0x54dc1e,_0x3f936a=this[_0x192e44(0x299)][_0x192e44(0x2d3)][_0x192e44(0x2a9)][this['state'][_0x192e44(0x2d3)]['selected']];this[_0x192e44(0x222)]=null,this['update']({'menu':null}),_0x3f936a['run']();}[_0x54dc1e(0x279)](){const _0x491731=_0x54dc1e,_0x2ed517=this['selected']();if(!_0x2ed517||_0x2ed517[_0x491731(0x2fa)]===_0x491731(0x346))return;const _0x402082=(_0x41a63c,_0x554e53=!0x1)=>()=>this[_0x491731(0x30e)](_0x41a63c,_0x554e53),_0x164e8b=(_0x23ec51,_0x4d5654,_0x394190,_0x266057,_0x2f9d98=!0x1)=>()=>this[_0x491731(0x349)](_0x23ec51,[{'name':_0x394190,'label':_0x266057}],_0x11b410=>{const _0x78ad31=_0x491731;if(!_0x11b410[_0x394190][_0x78ad31(0x361)]())throw new Error(_0x266057+_0x78ad31(0x29c));return this[_0x78ad31(0x367)]({'form':null}),this[_0x78ad31(0x30e)](_0x4d5654[_0x78ad31(0x262)](_0x11b410[_0x394190][_0x78ad31(0x361)]()),_0x2f9d98);});this[_0x491731(0x1e3)](_0x491731(0x36f)+_0x2ed517['title'],[{'label':'Status','run':_0x402082([_0x491731(0x321)])},{'label':'View\x20logs','run':_0x402082([_0x491731(0x350)])},{'label':_0x491731(0x218),'run':_0x402082([_0x491731(0x2f3)])},{'label':_0x491731(0x233),'run':_0x402082([_0x491731(0x213)])},{'label':'Deploy\x20official\x20worker','run':_0x402082([_0x491731(0x2f0)],!0x0)},{'label':_0x491731(0x294),'run':_0x402082([_0x491731(0x2fc)],!0x0)},{'label':_0x491731(0x1e9),'run':_0x402082([_0x491731(0x1d5)],!0x0)},{'label':_0x491731(0x285),'run':()=>this[_0x491731(0x1cc)]()},...[_0x491731(0x287),_0x491731(0x2f1),_0x491731(0x341),_0x491731(0x367)][_0x491731(0x2cf)](_0x1ab9fe=>({'label':_0x1ab9fe[0x0][_0x491731(0x255)]()+_0x1ab9fe[_0x491731(0x2d4)](0x1),'run':_0x402082([_0x1ab9fe],!0x0)})),{'label':_0x491731(0x22d),'run':()=>this[_0x491731(0x1e3)]('Worker\x20skills',[{'label':'List\x20skills','run':_0x402082([_0x491731(0x2fd),_0x491731(0x270)])},{'label':'Add\x20skill','run':_0x164e8b('Add\x20skill',['skills',_0x491731(0x23e)],'id',_0x491731(0x219))},{'label':_0x491731(0x2c3),'run':_0x164e8b(_0x491731(0x2c3),[_0x491731(0x2fd),_0x491731(0x29a)],'id',_0x491731(0x219))}])},{'label':_0x491731(0x212),'run':()=>this[_0x491731(0x1e3)](_0x491731(0x21b),[{'label':'List\x20tools','run':_0x402082([_0x491731(0x1f4),'list'])},{'label':_0x491731(0x345),'run':_0x402082([_0x491731(0x1f4),_0x491731(0x23e)],!0x0)},{'label':_0x491731(0x343),'run':_0x164e8b('Tool\x20credential',[_0x491731(0x1f4),_0x491731(0x2a4)],_0x491731(0x21e),_0x491731(0x2bd),!0x0)},{'label':_0x491731(0x221),'run':_0x164e8b(_0x491731(0x221),[_0x491731(0x1f4),_0x491731(0x224)],'name',_0x491731(0x2bd),!0x0)},{'label':'Remove\x20tool','run':_0x164e8b(_0x491731(0x34a),['tools',_0x491731(0x29a)],'id',_0x491731(0x32c))}])},{'label':_0x491731(0x304),'run':()=>this[_0x491731(0x1e3)](_0x491731(0x254),[{'label':'List\x20RPC\x20endpoints','run':_0x402082([_0x491731(0x2cc),_0x491731(0x270)])},{'label':_0x491731(0x2ca),'run':_0x164e8b(_0x491731(0x225),[_0x491731(0x2cc),_0x491731(0x23e)],'chain',_0x491731(0x2e9),!0x0)},{'label':_0x491731(0x290),'run':_0x164e8b(_0x491731(0x1fc),['rpc','remove'],_0x491731(0x27a),_0x491731(0x2e9))}])},{'label':_0x491731(0x296),'run':_0x402082([_0x491731(0x318)],!0x0)}]);}[_0x54dc1e(0x1cc)](){const _0x2d7506=_0x54dc1e;this[_0x2d7506(0x349)](_0x2d7506(0x285),[{'name':_0x2d7506(0x2a5),'label':_0x2d7506(0x34b),'value':_0x2d7506(0x23a)},{'name':_0x2d7506(0x2af),'label':_0x2d7506(0x1c2),'value':'1'},{'name':_0x2d7506(0x228),'label':_0x2d7506(0x230),'value':'no'}],async({runtime:_0x48993f,concurrency:_0x3a330d,boot:_0x2d0864})=>{const _0x2f9d69=_0x2d7506;if(![_0x2f9d69(0x23a),_0x2f9d69(0x1df)][_0x2f9d69(0x260)](_0x48993f))throw new Error(_0x2f9d69(0x245));if(!/^[1-4]$/[_0x2f9d69(0x211)](_0x3a330d))throw new Error(_0x2f9d69(0x26c));if(!['yes','no'][_0x2f9d69(0x260)](_0x2d0864))throw new Error('Enter\x20yes\x20or\x20no.');const _0x31850d=[_0x2f9d69(0x317),_0x2f9d69(0x26a),_0x2f9d69(0x32f),_0x48993f,_0x2f9d69(0x265),_0x3a330d];_0x2d0864==='yes'&&_0x31850d[_0x2f9d69(0x1c8)](_0x2f9d69(0x28a)),this['update']({'form':null}),await this['workerCommand'](_0x31850d,!0x0);});}async[_0x54dc1e(0x30e)](_0x32381d,_0xe43c74=!0x1){const _0x3e9c2f=_0x54dc1e,_0x3fe15f=this[_0x3e9c2f(0x305)]();!_0x3fe15f||_0x3fe15f[_0x3e9c2f(0x2fa)]===_0x3e9c2f(0x346)||await this['run']('Worker:\x20'+_0x32381d['join']('\x20')+'...',async _0x59e549=>{const _0x170d9e=_0x3e9c2f;if(_0xe43c74){if(!await this[_0x170d9e(0x33c)]({'title':'Run\x20on\x20'+_0x3fe15f[_0x170d9e(0x289)]+'?','lines':[_0x170d9e(0x206)+_0x32381d['join']('\x20'),'The\x20command\x20will\x20open\x20in\x20your\x20terminal,\x20then\x20return\x20here.']}))return;await this[_0x170d9e(0x301)]([_0x170d9e(0x25d),..._0x32381d],_0x3fe15f),this['update']({'notice':_0x170d9e(0x286)});}else{const _0x2b1d93=await this[_0x170d9e(0x22f)][_0x170d9e(0x1fb)](['worker',..._0x32381d],_0x3fe15f,_0x59e549);this[_0x170d9e(0x367)]({'detail':{'output':_0x2b1d93},'focus':_0x170d9e(0x27d),'scroll':0x0});}});}['requestPassword'](_0x318522){return new Promise((_0xd05cf0,_0x5625b6)=>{const _0x27d724=_0x2901;this[_0x27d724(0x21a)]=_0x5625b6,this[_0x27d724(0x349)](_0x27d724(0x360),[{'name':_0x27d724(0x27f),'label':_0x318522,'secret':!0x0}],({password:_0x12166c})=>{const _0x3ce82f=_0x27d724;this[_0x3ce82f(0x367)]({'form':null}),this['passwordReject']=null,_0xd05cf0(_0x12166c);},{'submit':_0x27d724(0x267),'onCancel':()=>{const _0x1787f5=_0x27d724;this[_0x1787f5(0x21a)]=null,_0x5625b6(new Error(_0x1787f5(0x24c)));}});});}[_0x54dc1e(0x2eb)](){const _0x189f06=_0x54dc1e,_0x2946af=this[_0x189f06(0x299)][_0x189f06(0x27d)]?.[_0x189f06(0x2a6)]==='local';this[_0x189f06(0x299)][_0x189f06(0x27d)]?.['configured']&&this['showMenu']('Selected\x20wallet\x20actions',[...!this['walletIsCurrent']()&&this[_0x189f06(0x305)]()?[{'label':'Use\x20this\x20wallet','run':()=>this[_0x189f06(0x272)]()}]:[],..._0x2946af?[{'label':'View\x20private\x20key','run':()=>this[_0x189f06(0x24f)]()},{'label':'Back\x20up\x20encrypted\x20wallet','run':()=>this[_0x189f06(0x2cb)]()},{'label':_0x189f06(0x22a),'run':()=>this[_0x189f06(0x34f)]()}]:[],...this['state'][_0x189f06(0x27d)]?.[_0x189f06(0x2b9)]?[{'label':_0x189f06(0x26f),'run':()=>this['walletReceive']()}]:[]]);}[_0x54dc1e(0x351)](){const _0x11f59d=_0x54dc1e;this[_0x11f59d(0x1e3)]('Wallet\x20management\x20\xB7\x20all\x20wallets',[{'label':'Create\x20a\x20new\x20local\x20wallet','run':()=>this[_0x11f59d(0x306)](!0x1)},{'label':'Import\x20wallet','run':()=>this[_0x11f59d(0x2e8)]()}]);}[_0x54dc1e(0x2e8)](){const _0x4aa227=_0x54dc1e;this[_0x4aa227(0x1e3)](_0x4aa227(0x33d),[{'label':'From\x20private\x20key','run':()=>this[_0x4aa227(0x306)](!0x0)},{'label':_0x4aa227(0x1f0),'run':()=>this[_0x4aa227(0x1f7)]()}]);}['walletIsCurrent'](){const _0x348182=_0x54dc1e;return!this['selected']()||this['selected']()[_0x348182(0x2dd)]===this[_0x348182(0x299)][_0x348182(0x2dd)];}async[_0x54dc1e(0x34f)](){const _0x4e7ca4=_0x54dc1e,_0xf34cea=this[_0x4e7ca4(0x305)]()?.[_0x4e7ca4(0x2dd)]??this[_0x4e7ca4(0x299)]['detail']?.['address'];if(this[_0x4e7ca4(0x299)][_0x4e7ca4(0x27d)]?.[_0x4e7ca4(0x2a6)]!==_0x4e7ca4(0x1c5)||!_0xf34cea||!await this[_0x4e7ca4(0x33c)]({'title':_0x4e7ca4(0x1ce),'lines':[_0xf34cea,_0x4e7ca4(0x266),_0x4e7ca4(0x320)],'acceptLabel':'Continue','cancelLabel':_0x4e7ca4(0x2ea)})||!await this['confirm']({'title':_0x4e7ca4(0x256),'lines':[_0xf34cea,_0x4e7ca4(0x315),'Keep\x20a\x20private\x20key\x20or\x20encrypted\x20backup\x20to\x20access\x20this\x20wallet\x20again.'],'acceptLabel':_0x4e7ca4(0x22a),'cancelLabel':_0x4e7ca4(0x2ea)}))return;const _0x8fc177=await this[_0x4e7ca4(0x36b)](_0x4e7ca4(0x314),()=>this[_0x4e7ca4(0x22f)][_0x4e7ca4(0x2ab)](_0xf34cea));_0x8fc177&&(await this[_0x4e7ca4(0x31b)](_0x8fc177['currentAddress']),this['update']({'notice':'Wallet\x20deleted:\x20'+_0xf34cea}));}[_0x54dc1e(0x24f)](){const _0x4932c4=_0x54dc1e,_0x2c9f8e=this['selected']()?.['address']??this['state']['detail']?.[_0x4932c4(0x2dd)];this[_0x4932c4(0x299)]['detail']?.[_0x4932c4(0x2a6)]!==_0x4932c4(0x1c5)||!_0x2c9f8e||this[_0x4932c4(0x349)]('View\x20private\x20key\x20\xB7\x20confirm\x20password',[{'name':_0x4932c4(0x27f),'label':'Local\x20wallet\x20password','secret':!0x0}],async({password:_0x52c353})=>{const _0x19bb5f=_0x4932c4;this[_0x19bb5f(0x367)]({'form':null});const _0x5b8dbf=await this[_0x19bb5f(0x36b)]('Checking\x20wallet\x20password...',_0x2282d1=>this[_0x19bb5f(0x22f)][_0x19bb5f(0x2b3)](_0x2c9f8e,_0x52c353,_0x2282d1));_0x5b8dbf&&this['update']({'privateKeyView':_0x5b8dbf});},{'submit':_0x4932c4(0x1e5)});}async[_0x54dc1e(0x31b)](_0x8e5f80){const _0x390033=_0x54dc1e;this[_0x390033(0x367)]({'selected':-0x1}),this[_0x390033(0x249)]=_0x8e5f80,await this[_0x390033(0x1f2)]();}async[_0x54dc1e(0x272)](){const _0x10807a=_0x54dc1e,_0x119e48=this[_0x10807a(0x305)]();if(!_0x119e48||this['walletIsCurrent']())return;const _0x7fb938=await this[_0x10807a(0x36b)](_0x10807a(0x328),()=>this[_0x10807a(0x22f)][_0x10807a(0x217)](_0x119e48[_0x10807a(0x2dd)]));_0x7fb938&&(await this[_0x10807a(0x1f2)](),this[_0x10807a(0x367)]({'notice':'Current\x20wallet:\x20'+_0x7fb938[_0x10807a(0x2dd)]}));}[_0x54dc1e(0x306)](_0x5bd572){const _0x1a59cc=_0x54dc1e,_0x6aaf36=this[_0x1a59cc(0x22f)][_0x1a59cc(0x30f)]()[_0x1a59cc(0x268)]>0x0||this[_0x1a59cc(0x299)][_0x1a59cc(0x27d)]?.[_0x1a59cc(0x2a6)]===_0x1a59cc(0x1c5),_0x509a17=async({key:_0x379c27,password:_0x434de3,repeat:_0x7f760b})=>{const _0x387e11=_0x1a59cc;if(!_0x6aaf36){if(_0x434de3!==_0x7f760b)throw new Error(_0x387e11(0x336));if(_0x434de3[_0x387e11(0x268)]<0x8)throw new Error(_0x387e11(0x32a));}this[_0x387e11(0x367)]({'form':null});const _0x2aadc0=await this['run']('Encrypting\x20wallet\x20locally...',_0x13edcc=>this[_0x387e11(0x22f)][_0x387e11(0x2a3)](_0x434de3,_0x379c27,_0x13edcc));_0x2aadc0&&(await this['refreshWalletSelection'](_0x2aadc0['address']),this[_0x387e11(0x367)]({'notice':_0x387e11(0x20f)}));};if(_0x6aaf36&&!_0x5bd572)return _0x509a17({});this['showForm'](_0x5bd572?'Import\x20private\x20key\x20\xB7\x20encrypted\x20locally':'Set\x20local\x20wallet\x20password',[..._0x5bd572?[{'name':_0x1a59cc(0x2a4),'label':_0x1a59cc(0x29b),'secret':!0x0}]:[],..._0x6aaf36?[]:[{'name':_0x1a59cc(0x27f),'label':'Local\x20wallet\x20password\x20(at\x20least\x208\x20characters)','secret':!0x0},{'name':_0x1a59cc(0x20d),'label':_0x1a59cc(0x207),'secret':!0x0}]],_0x509a17,{'submit':_0x5bd572?_0x1a59cc(0x33d):_0x1a59cc(0x28e)});}[_0x54dc1e(0x1f7)](){const _0x365673=_0x54dc1e;this[_0x365673(0x349)](_0x365673(0x1cd),[{'name':_0x365673(0x27b),'label':_0x365673(0x31d)},{'name':_0x365673(0x27f),'label':_0x365673(0x307),'secret':!0x0}],async({file:_0x3def5b,password:_0x3c1d76})=>{const _0x212a58=_0x365673;this[_0x212a58(0x367)]({'form':null});const _0x3f9290=await this['run'](_0x212a58(0x220),_0x530d6c=>this[_0x212a58(0x22f)][_0x212a58(0x337)](_0x3def5b,_0x3c1d76,_0x530d6c));_0x3f9290&&await this['refreshWalletSelection'](_0x3f9290[_0x212a58(0x2dd)]);},{'submit':_0x365673(0x2f8)});}['walletBackup'](){const _0x260504=_0x54dc1e,_0x34ac52=this[_0x260504(0x305)]()?.['address']??this[_0x260504(0x299)][_0x260504(0x27d)]?.[_0x260504(0x2dd)];_0x34ac52&&this['showForm']('Back\x20up\x20encrypted\x20wallet',[{'name':'out','label':_0x260504(0x354)}],async({out:_0x1aab7a})=>{const _0x8dd7d=_0x260504;this[_0x8dd7d(0x367)]({'form':null});const _0x365eaf=await this[_0x8dd7d(0x36b)](_0x8dd7d(0x2c9),()=>this[_0x8dd7d(0x22f)][_0x8dd7d(0x244)](_0x1aab7a,_0x34ac52));_0x365eaf&&this[_0x8dd7d(0x367)]({'notice':'Backup\x20saved:\x20'+_0x365eaf[_0x8dd7d(0x1db)]+_0x8dd7d(0x25b)});},{'submit':'Save\x20backup'});}async[_0x54dc1e(0x283)](){const _0x4c26f8=_0x54dc1e,_0x73e00e=this[_0x4c26f8(0x305)]()?.[_0x4c26f8(0x2dd)]??this[_0x4c26f8(0x299)][_0x4c26f8(0x27d)]?.['address'];_0x73e00e&&await this[_0x4c26f8(0x36b)](_0x4c26f8(0x2c6),async()=>{const _0xba7899=_0x4c26f8;this[_0xba7899(0x367)]({'receive':await this['services'][_0xba7899(0x243)](_0x73e00e)});});}[_0x54dc1e(0x2d0)](_0x4bb70c){const _0x366c35=_0x54dc1e,_0x461d61=_0x23da29(_0x4bb70c)[_0x366c35(0x33a)](_0x130f90=>!_0x130f90[_0x366c35(0x226)]);if(_0x461d61[_0x366c35(0x268)]<=0x1)return this[_0x366c35(0x1da)](_0x4bb70c,_0x461d61[0x0]??_0x23da29(_0x4bb70c)[0x0]);const _0x272976={'dialog':this[_0x366c35(0x299)]['confirm'],'scroll':this[_0x366c35(0x299)][_0x366c35(0x257)]};this[_0x366c35(0x367)]({'confirm':null}),this[_0x366c35(0x1e3)]('Add\x20funds\x20\xB7\x20which\x20network\x20will\x20you\x20send\x20on?',_0x461d61[_0x366c35(0x2cf)](_0x40b24f=>({'label':_0x1691b3(_0x40b24f),'run':()=>this[_0x366c35(0x1da)](_0x4bb70c,_0x40b24f,_0x272976)})),{'onCancel':()=>this[_0x366c35(0x367)]({'confirm':_0x272976['dialog'],'scroll':_0x272976[_0x366c35(0x257)]})});}async[_0x54dc1e(0x1da)](_0x2707f7,_0x4e8540,_0xce2f0d){const _0x2ccc5b=_0x54dc1e,_0x14532c=_0xce2f0d?.[_0x2ccc5b(0x2dc)]??this[_0x2ccc5b(0x299)][_0x2ccc5b(0x33c)],_0x45ce80=_0xce2f0d?.[_0x2ccc5b(0x257)]??this['state'][_0x2ccc5b(0x257)];try{const _0xce48cb=await this[_0x2ccc5b(0x22f)][_0x2ccc5b(0x243)](_0x2707f7['address'],_0x4e8540[_0x2ccc5b(0x2a4)]);this[_0x2ccc5b(0x34c)]={'dialog':_0x14532c,'scroll':_0x45ce80},this['update']({'confirm':null,'receive':{..._0xce48cb,'targets':_0x1c5b2e(_0x4e8540)},'scroll':0x0,'error':null,'notice':null});}catch(_0x3559c3){this[_0x2ccc5b(0x367)]({'error':_0x3559c3[_0x2ccc5b(0x1f3)],..._0xce2f0d?{'confirm':_0x14532c,'scroll':_0x45ce80}:{}});}}[_0x54dc1e(0x246)](){const _0x602b7f=_0x54dc1e,_0x49c479=this[_0x602b7f(0x34c)];this[_0x602b7f(0x34c)]=null,this[_0x602b7f(0x367)]({'receive':null,..._0x49c479?{'confirm':_0x49c479['dialog'],'scroll':_0x49c479[_0x602b7f(0x257)]}:{}});}[_0x54dc1e(0x209)](){const _0x569e96=_0x54dc1e,_0x2bfa7d=this[_0x569e96(0x299)][_0x569e96(0x1e8)][_0x569e96(0x2dd)];this[_0x569e96(0x349)](_0x569e96(0x27c),[{'name':_0x569e96(0x362),'label':_0x569e96(0x32e),'placeholder':_0x569e96(0x1e6)}],async({out:_0x2f1970})=>{const _0x7964e9=_0x569e96,_0x204834=await this[_0x7964e9(0x22f)]['saveQr'](_0x2bfa7d,_0x2f1970);this['update']({'form':null,'notice':_0x7964e9(0x276)+_0x204834['path']});},{'submit':_0x569e96(0x1f1)});}['close'](){const _0x52fce2=_0x54dc1e;clearTimeout(this[_0x52fce2(0x2ad)]),this[_0x52fce2(0x222)]?.(),this['menuCancel']=null,this[_0x52fce2(0x21a)]?.(new Error('Wallet\x20unlock\x20cancelled.')),this[_0x52fce2(0x21a)]=null,_0x55845d(),this[_0x52fce2(0x367)]({'form':null,'privateKeyView':null}),this[_0x52fce2(0x27e)]=!0x0,this[_0x52fce2(0x273)]?.['abort'](),this[_0x52fce2(0x269)]?.[_0x52fce2(0x2f5)](),this[_0x52fce2(0x326)]?.[_0x52fce2(0x2f5)](),this['confirmResolve']?.(!0x1),this[_0x52fce2(0x34c)]=null,this[_0x52fce2(0x1d2)]?.([]),++this[_0x52fce2(0x26b)],this[_0x52fce2(0x2a7)][_0x52fce2(0x258)]();}}export{V as DashboardController,p as FILTERS,h as TABS,K as VIEWS,u as visibleItems};
1
+ const _0x4b3ed8=_0x4052;import{friendlyAmount as _0x77175d}from'../lib/payment-coins.mjs';import{createWorkerTarget as _0x5b065c,paymentView as _0x547ef0}from'./services.mjs';import{lockWallet as _0x3ec757}from'../lib/local-wallet.mjs';function _0x50e9(){const _0x506209=['View\x20private\x20key','Command\x20finished.\x20Press\x20r\x20to\x20refresh\x20worker\x20status.','Choose\x20an\x20output\x20directory.','\x20network\x20workers\x20·\x20availability,\x20free\x20slots,\x20ID\x20·\x20r\x20refresh','Wallet\x20deleted:\x20','The\x20command\x20will\x20open\x20in\x20your\x20terminal,\x20then\x20return\x20here.','Checking\x20the\x20saved\x20order...','Deleting\x20draft...','fundingReceive','RPC\x20endpoints','workers','max','abort','resume','Search','addTarget','sort','continueTask','field','.\x20Keep\x20your\x20password\x20separately.','respond','remove','changeTab','saveDraft','Remove\x20skill','completed','deploy','Update\x20network\x20fee','Keyword\x20or\x20task\x20ID','refreshWalletSelection','Worker:\x20','SSH\x20user@host\x20(empty\x20=\x20this\x20computer)','Encrypting\x20wallet\x20locally...','Explorer:\x20','\x20managed\x20targets\x20·\x20','No\x20payment\x20has\x20been\x20signed\x20or\x20submitted.','canChangePayment','ask','queued','walletRestore','get','walletDelete','deleteWallet','Cancelling\x20request...','Opening\x20draft...','Run\x20diagnostics','Tool\x20credential','job.open','Draft\x20saved.\x20Continue\x20it\x20from\x20My\x20tasks\x20after\x20setting\x20up\x20a\x20wallet.','\x20·\x20','Identity','Current\x20wallet:\x20','list','From\x20encrypted\x20backup','view','Wallet\x20unlock\x20cancelled.','deleteDraft','Cancel\x20this\x20request?','accepted','exploreUpdates','Review\x20task\x20&\x20payment','cursor','Request\x20changes\x20(new\x20paid\x20task)','Checking\x20the\x20task\x20and\x20requesting\x20an\x20IMD\x20quote...','Checking\x20balances\x20and\x20refreshing\x20prices...','concurrency','Remove\x20RPC','toUpperCase','out','Worker\x20ID,\x20runtime\x20or\x20skill','whoami','explorerUrl','serviceInstall','file','Use\x20at\x20least\x208\x20characters.','Choose\x20another\x20way\x20to\x20pay.\x20No\x20payment\x20was\x20signed.','fromEntries','note','localeCompare','rpc','showOutcome','refused','requestKey','List\x20skills','explore','getSnapshot','form','payment_failed','action','throwIfAborted','network-worker','Forget\x20credential','extraTargets','services','total','Understanding\x20your\x20request...','trim','paymentChain','chain','View\x20details','refreshing','created','...','help','Files','blockers','Completed','Tools\x20&\x20credentials','Review\x20saved\x20payment','View\x20logs','Choose\x20claude\x20or\x20codex.','Worker\x20·\x20','autoRefresh','Cancelled','parent','Deleting\x20local\x20record...','plan','kind','draft','paymentOptions','wallets','name','assign','confirmReplacement','files','Add\x20RPC\x20endpoint\x20(hidden\x20input)','change_payment','submitForm','repeat','download','Task\x20published:\x20','What\x20would\x20you\x20like\x20to\x20change?','forget','indexOf','Add\x20RPC','join','Continue','has','Status','Add\x20target','menu','Skill\x20ID','Confirm\x20wallet\x20password','wallet','configured','Backup\x20saved:\x20','refreshError','walletSetup','searchText','QR\x20saved:\x20','Choose\x20payment\x20·\x20support\x20is\x20optional','expired','restart','walletManagement','Draft\x20saved','tasks','command','managed-worker','Concurrent\x20tasks\x20(1–4)','requestPassword','detailVersion','showMenu','Choose\x20how\x20to\x20pay\x20·\x20gas\x20is\x20always\x20paid\x20in\x20ETH','View\x20result\x20files','query','Back\x20·\x20no\x20coin\x20has\x20enough\x20funds\x20right\x20now','\x20on\x20','result','Download\x20files','path','toLowerCase','Transaction:\x20','Auto-refresh\x20failed:\x20','values','walletImport','running','funding','Preparing\x20the\x20payment\x20review...','\x20is\x20required.','.\x20Inspect\x20it\x20in\x20My\x20tasks\x20before\x20trying\x20another\x20payment.','label','Remove\x20tool','pickPayment','boot','hash','addFunds','useSelectedWallet','Build\x20a\x20website\x20for\x20my\x20coffee\x20shop','showPaymentProgress','Save\x20under\x20this\x20directory','Loading\x20older\x20tasks...','dialog','code','Download','createdAt','On-chain\x20funds\x20stay\x20at\x20this\x20address.','Import\x20wallet','Your\x20request\x20is\x20saved\x20in\x20My\x20tasks.','Attention','Saved\x20wallet','items','Keep\x20a\x20private\x20key\x20or\x20encrypted\x20backup\x20to\x20access\x20this\x20wallet\x20again.','canDelete','set','Runtime\x20(claude\x20or\x20codex)','funded','Register\x20on\x20chain','This\x20request\x20is\x20not\x20supported.','delete','Keep\x20draft','selection','Chain\x20ID','error','setField','editDraft','Local\x20record\x20deleted.','Checking\x20balances\x20on\x20all\x20networks...','.\x20Press\x20r\x20to\x20refresh\x20My\x20tasks.','\x20verified\x20files\x20to\x20','createWallet','local','findIndex','flatMap','Saving\x20encrypted\x20backup...','key','Set\x20local\x20wallet\x20password','Continue\x20draft','create','Delete\x20draft','state','reason','formSubmit','Run\x20on\x20','update','autoPayment','What\x20would\x20you\x20like\x20to\x20get\x20done?','executing','Save\x20QR','funding_required','Preparing\x20receive\x20address...','input','transaction_pending','run','This\x20request\x20will\x20no\x20longer\x20be\x20payable\x20from\x20Colony.','Review\x20&\x20pay','pendingTransaction','locked','closeReceive','payment','loaded','job.continue','Loading\x20network\x20workers...','value','saveReceiveQr','cancelAutoRefresh','menuCancel','change','walletBackup','Add\x20funds\x20·\x20which\x20network\x20will\x20you\x20send\x20on?','walletIsCurrent','Deleting\x20local\x20wallet...','updatedAt','slice','concat','Concurrency\x20must\x20be\x201–4.','cancelled','passwordReject','codex','Payment\x20needs\x20review.','selected','Preparing\x20local\x20LLM...','draftId','fundingDialog','View\x20private\x20key\x20·\x20confirm\x20password','Pair\x20with\x20wallet','currentAddress','receive','reviewPayment','now','service','chooseMenu','listeners','All','title','networkWorkers','workerCommand','Delete\x20wallet\x20·\x201\x20of\x202','saveQr','./output/','refresh','Current','--runtime','checkTaskWallet','extraAction','cancelRequest','showForm','length','selectWallet','payment_reconciling','Saved\x20','Delete\x20wallet','Request\x20cancelled.\x20No\x20payment\x20was\x20signed\x20or\x20submitted.','deleteTaskDraft','register','pending','List\x20tools','gas','One\x20local\x20password\x20·\x20u\x20use\x20selected\x20wallet','Restore\x20wallet','port','admitted','Linux\x20start\x20at\x20boot\x20(yes/no)','busy','chooseSupport','summary','Save\x20encrypted\x20backup\x20to\x20(new\x20file)','dismissForm','push','detailRequest','Cancel\x20request','Unlink\x20worker','claude','stage','Add\x20skill','identity','resumeOrder','IMD','Selected\x20wallet\x20actions','detailTimer','cancel','install','yes','withFundingRetry','detail','Loading\x20files...','Download\x20task\x20files','--boot','confirm','Remove\x20this\x20wallet\x20from\x20Colony?','Passwords\x20do\x20not\x20match.','canCancel','quoted','refreshRequest','submitConfirmation','colony-receive.svg','From\x20private\x20key','lastExploreRefresh','runtime','questions','chainName','refreshExplore','Keep\x20request','map','status','choice','SSH\x20port','Check\x20balance\x20&\x20continue','Restoring\x20wallet...','since','includes','lines','coin','jobId','filter','more','closed','pair','Tool\x20ID','targets','Local\x20wallet\x20password\x20(at\x20least\x208\x20characters)','formCancel','Add\x20funds\x20to\x20continue','Change\x20payment','objective','Set\x20tool\x20credential\x20(hidden\x20input)','\x0aOrder:\x20','clear','message','Use\x20this\x20wallet','Request\x20changes','Credential\x20name','signal','fields','logs','deleteRequest','wallet_required','some','terminal','navigate','unlink','skills','receiveWallet','operation','Continue\x20payment\x20there\x20to\x20check\x20the\x20original\x20payment\x20before\x20retrying.','restoreWallet','Enter\x20yes\x20or\x20no.','stop','Deploy\x20official\x20worker','deliverables','setupWallet','loadDetail','payWith','Describe\x20what\x20you\x20would\x20like\x20to\x20get\x20done.','restoreSelectedId','askResolve','Task\x20actions','transaction','canResume','ethereum','Overview','Worker\x20tools','Back\x20up\x20encrypted\x20wallet','Install\x20background\x20service','walletMenu','scroll','cycleFilter','Wallet\x20unlock\x20cancelled.\x20No\x20payment\x20was\x20signed.','\x20·\x20current','worker','walletReceive','tools','address','password','source'];_0x50e9=function(){return _0x506209;};return _0x50e9();}import{fundingInstructions as _0x2a90a8,fundingNetworks as _0x11d6f7,networkChoiceLabel as _0x28df1c,networkTargets as _0x3746eb}from'../lib/funding-error.mjs';import{DEFAULT_SUPPORT_CHOICE as _0x714d5c}from'../lib/support.mjs';import{randomUUID as _0x1b9955}from'node:crypto';const V=[_0x4b3ed8(0x157),_0x4b3ed8(0x110),_0x4b3ed8(0xc6),_0x4b3ed8(0x14b)],m=[_0x4b3ed8(0x1d6),'Active',_0x4b3ed8(0x126),_0x4b3ed8(0x182),_0x4b3ed8(0x12d)],u=[_0x4b3ed8(0x255),'Activity',_0x4b3ed8(0x124)],v=new Set([_0x4b3ed8(0x132),_0x4b3ed8(0x121),_0x4b3ed8(0x211),'challenged',_0x4b3ed8(0x16c),'signed','submitted',_0x4b3ed8(0xe2),_0x4b3ed8(0x16b),_0x4b3ed8(0x1a8),'pending','admitting']),S=new Set([_0x4b3ed8(0x153),_0x4b3ed8(0x113),_0x4b3ed8(0x1ad),'payment_reconciling']),P=new Set([_0x4b3ed8(0x1ad),_0x4b3ed8(0x1e6)]),x=0x7530;function _0x4052(_0x1cb790,_0x50e915){_0x1cb790=_0x1cb790-0xbc;const _0x405283=_0x50e9();let _0x808b46=_0x405283[_0x1cb790];return _0x808b46;}function f(_0x215607){const _0x5b7712=_0x4b3ed8;return _0x215607[_0x5b7712(0x184)]['filter'](_0x545370=>!['tasks','workers'][_0x5b7712(0x223)](_0x215607[_0x5b7712(0xf2)])||[_0x545370[_0x5b7712(0x1d7)],_0x545370['id'],_0x545370[_0x5b7712(0x150)]??'']['some'](_0x3b5d10=>_0x3b5d10['toLowerCase']()[_0x5b7712(0x223)](_0x215607['query'][_0x5b7712(0x166)]()))?_0x215607['filter']===_0x5b7712(0x1d6)||_0x215607[_0x5b7712(0xf2)]!==_0x5b7712(0x157)?!0x0:_0x215607['filter']===_0x5b7712(0x126)?_0x545370[_0x5b7712(0x1a1)]==='completed':_0x215607[_0x5b7712(0x227)]===_0x5b7712(0x12d)?_0x545370[_0x5b7712(0x1a1)]===_0x5b7712(0x1c5):_0x215607[_0x5b7712(0x227)]==='Active'?v[_0x5b7712(0x145)](_0x545370[_0x5b7712(0x1a1)]):![_0x5b7712(0xd5),_0x5b7712(0x1c5)][_0x5b7712(0x223)](_0x545370[_0x5b7712(0x1a1)])&&!v[_0x5b7712(0x145)](_0x545370[_0x5b7712(0x1a1)]):!0x1);}function p(){const _0x258c51=_0x4b3ed8;return Object['assign'](new Error('Payment\x20cancelled.\x20No\x20new\x20payment\x20was\x20signed.'),{'code':_0x258c51(0x1c5)});}function W(){const _0x5b2bab=_0x4b3ed8;return Object[_0x5b2bab(0x136)](new Error(_0x5b2bab(0x107)),{'code':_0x5b2bab(0x13a)});}function A(_0xed4242,_0x268eaa){const _0x1ea3c6=_0x4b3ed8,{option:_0x3f44cf}=_0xed4242,_0x32aa3e=(_0xed4242[_0x1ea3c6(0x24d)]===_0x1ea3c6(0x202)?'':'\u2248\x20')+_0x77175d(_0x3f44cf[_0x1ea3c6(0x1b4)],_0xed4242[_0x1ea3c6(0x24d)],{'up':!0x0}),_0x296326=_0x268eaa&&_0x268eaa[_0x1ea3c6(0x11d)]===_0xed4242[_0x1ea3c6(0x11d)]&&_0x268eaa['payWith']===_0xed4242[_0x1ea3c6(0x24d)];return _0xed4242[_0x1ea3c6(0x24d)]+_0x1ea3c6(0x162)+_0xed4242['chainName']+_0x1ea3c6(0xed)+_0x32aa3e+'\x20+\x20gas\x20\u2248\x20'+_0x77175d(_0x3f44cf[_0x1ea3c6(0x1ee)],'ETH',{'up':!0x0})+(_0x296326?_0x1ea3c6(0x25d):'');}function T(_0x33e387){const _0x51f2f2=_0x4b3ed8;if(!_0x33e387)return[];const _0x1a9b25=[];return _0x33e387[_0x51f2f2(0x174)]&&_0x1a9b25[_0x51f2f2(0x1f9)](_0x51f2f2(0x167)+_0x33e387[_0x51f2f2(0x174)]+(_0x33e387['kind']?'\x20('+_0x33e387['kind']+')':'')),_0x33e387[_0x51f2f2(0x1a2)]&&_0x1a9b25['push']('Reason:\x20'+_0x33e387[_0x51f2f2(0x1a2)]),_0x33e387['explorerUrl']&&_0x1a9b25[_0x51f2f2(0x1f9)](_0x51f2f2(0xdd)+_0x33e387[_0x51f2f2(0x103)]),_0x1a9b25;}function E(_0x1544c3){const _0x4423b4=_0x4b3ed8,_0x5fa5ae=[_0x1544c3['message']||'The\x20payment\x20result\x20is\x20not\x20final\x20yet.'];return _0x5fa5ae[_0x4423b4(0x1f9)](...T(_0x1544c3[_0x4423b4(0x252)])),_0x5fa5ae[_0x4423b4(0x1f9)]('Your\x20request\x20is\x20saved\x20in\x20My\x20tasks.\x20Continue\x20payment\x20there\x20to\x20check\x20the\x20original\x20payment\x20before\x20sending\x20another\x20payment.'),_0x5fa5ae['join']('\x0a');}class _{constructor(_0xc45412){const _0x329039=_0x4b3ed8;this[_0x329039(0x119)]=_0xc45412,this['listeners']=new Set(),this[_0x329039(0x1a1)]={'view':_0x329039(0x157),'items':[],'selected':0x0,'detail':null,'result':null,'tab':_0x329039(0x255),'filter':_0x329039(0x1d6),'query':'','note':'','focus':'list','scroll':0x0,'busy':null,'error':null,'notice':null,'form':null,'menu':null,'confirm':null,'modelProgress':null,'help':!0x1,'detailLoading':!0x1,'address':null,'cursor':null,'total':null,'since':null,'refreshing':!0x1,'refreshError':null,'receive':null,'privateKeyView':null},this['detailVersion']=0x0,this['extraTargets']=[],this['closed']=!0x1,this[_0x329039(0x216)]=0x0;}['subscribe']=_0x20d277=>(this[_0x4b3ed8(0x1d5)]['add'](_0x20d277),()=>this[_0x4b3ed8(0x1d5)][_0x4b3ed8(0x18c)](_0x20d277));[_0x4b3ed8(0x111)]=()=>this[_0x4b3ed8(0x1a1)];[_0x4b3ed8(0x1a5)](_0x496dfc){const _0x3e24d3=_0x4b3ed8;if(!this['closed']){this['state']={...this[_0x3e24d3(0x1a1)],..._0x496dfc};for(const _0xe42a0f of this[_0x3e24d3(0x1d5)])_0xe42a0f();}}[_0x4b3ed8(0x1c9)](){const _0x78aab2=_0x4b3ed8;return f(this[_0x78aab2(0x1a1)])[this['state']['selected']];}['showError'](){const _0x945eb1=_0x4b3ed8;++this[_0x945eb1(0x15c)],this[_0x945eb1(0x1a5)]({'detail':{'output':this['state']['error']??this['state'][_0x945eb1(0x14e)]},'detailLoading':!0x1,'focus':_0x945eb1(0x209),'scroll':0x0,'tab':_0x945eb1(0x255)});}[_0x4b3ed8(0x1ba)](){const _0x17663f=_0x4b3ed8;this[_0x17663f(0x212)]?.[_0x17663f(0xc8)](),this[_0x17663f(0x212)]=null,this[_0x17663f(0x1a5)]({'refreshing':!0x1});}async[_0x4b3ed8(0x1ae)](_0x57120f,_0x49d76e){const _0x5baeba=_0x4b3ed8;if(!this[_0x5baeba(0x1a1)][_0x5baeba(0x1f4)]){this[_0x5baeba(0x1ba)](),this['operation']=new AbortController(),this[_0x5baeba(0x1a5)]({'busy':_0x57120f,'error':null,'refreshError':null,'notice':null});try{return await _0x49d76e(this[_0x5baeba(0x244)][_0x5baeba(0x239)]);}catch(_0x8fbc60){_0x8fbc60[_0x5baeba(0x17c)]===_0x5baeba(0x1c5)?(this['update']({'notice':_0x8fbc60[_0x5baeba(0x235)]}),this[_0x5baeba(0x192)]()):P[_0x5baeba(0x145)](_0x8fbc60['code'])?this[_0x5baeba(0x1a5)]({'error':E(_0x8fbc60)}):this[_0x5baeba(0x1a5)]({'error':_0x8fbc60[_0x5baeba(0x235)]});}finally{this[_0x5baeba(0x1a5)]({'busy':null,'modelProgress':null});}}}async[_0x4b3ed8(0x240)](_0x2049be){const _0x3ab5a9=_0x4b3ed8;this['state'][_0x3ab5a9(0x1f4)]||(clearTimeout(this[_0x3ab5a9(0x204)]),this[_0x3ab5a9(0x1fa)]?.[_0x3ab5a9(0xc8)](),++this[_0x3ab5a9(0x15c)],this['update']({'view':_0x2049be,'items':[],'detail':null,'result':null,'selected':0x0,'query':'','filter':_0x3ab5a9(0x1d6),'tab':_0x3ab5a9(0x255),'scroll':0x0,'focus':_0x3ab5a9(0xf0),'form':null,'menu':null,'cursor':null,'total':null,'since':null}),await this[_0x3ab5a9(0x1dd)]());}async[_0x4b3ed8(0x1dd)](){const _0x8a5511=_0x4b3ed8,_0x558e84=this[_0x8a5511(0x1c9)]()?.['id']??this['restoreSelectedId'];this[_0x8a5511(0x24f)]=void 0x0,await this['run']('Loading\x20'+this[_0x8a5511(0x1a1)][_0x8a5511(0xf2)]+_0x8a5511(0x122),async _0x719f7d=>{const _0x518b2e=_0x8a5511;let _0x4d168b;if(this[_0x518b2e(0x1a1)][_0x518b2e(0xf2)]===_0x518b2e(0x157))_0x4d168b=await this[_0x518b2e(0x119)]['mine'](_0x719f7d);else{if(this[_0x518b2e(0x1a1)][_0x518b2e(0xf2)]==='explore')_0x4d168b=await this[_0x518b2e(0x119)][_0x518b2e(0x110)](this[_0x518b2e(0x1a1)][_0x518b2e(0x160)],void 0x0,_0x719f7d);else{if(this[_0x518b2e(0x1a1)][_0x518b2e(0xf2)]===_0x518b2e(0xc6)){const _0x387ff1=this['services'][_0x518b2e(0x22c)](),_0x3993f2=new Set(_0x387ff1['map'](_0x3e601e=>_0x3e601e['id'])),_0x58d957=_0x387ff1[_0x518b2e(0x1c3)](this[_0x518b2e(0x118)][_0x518b2e(0x227)](_0xea739c=>!_0x3993f2[_0x518b2e(0x145)](_0xea739c['id'])))[_0x518b2e(0x21c)](_0x238dd3=>({..._0x238dd3,'kind':_0x518b2e(0x159)}));this[_0x518b2e(0x1a5)]({'items':_0x58d957,'selected':0x0,'note':_0x518b2e(0x1b7)});let _0x54a3f5;try{_0x54a3f5=await this[_0x518b2e(0x119)][_0x518b2e(0x1d8)](_0x719f7d);}catch(_0x5ee570){throw this[_0x518b2e(0x1a5)]({'note':_0x58d957[_0x518b2e(0x1e4)]+'\x20managed\x20targets\x20\xB7\x20Network\x20unavailable\x20\xB7\x20r\x20retry'}),_0x5ee570;}_0x4d168b={'items':_0x58d957[_0x518b2e(0x1c3)](_0x54a3f5),'note':_0x58d957[_0x518b2e(0x1e4)]+_0x518b2e(0xde)+_0x54a3f5[_0x518b2e(0x1e4)]+_0x518b2e(0xbf)};}else{const _0x1bd3f3=await this[_0x518b2e(0x119)]['wallet'](_0x719f7d,_0x558e84,{'balances':!0x1}),_0x3eb1e0=this['services']['wallets']();!_0x3eb1e0[_0x518b2e(0x1e4)]&&_0x1bd3f3[_0x518b2e(0x14c)]&&_0x3eb1e0['push']({'address':_0x1bd3f3[_0x518b2e(0x261)],'active':!0x0,'locked':_0x1bd3f3[_0x518b2e(0x1b2)]}),_0x4d168b={'items':_0x3eb1e0[_0x518b2e(0x21c)](_0x105440=>({..._0x105440,'id':_0x105440[_0x518b2e(0x261)],'title':_0x105440[_0x518b2e(0x261)][_0x518b2e(0x1c2)](0x0,0xa)+_0x518b2e(0x122)+_0x105440['address'][_0x518b2e(0x1c2)](-0x8),'subtitle':_0x105440['active']?_0x518b2e(0x1de):_0x518b2e(0x183)})),'note':_0x518b2e(0x1ef),'address':_0x1bd3f3[_0x518b2e(0x1cf)]??_0x1bd3f3[_0x518b2e(0x261)]??null},this['update']({'detail':_0x1bd3f3,'scroll':0x0});}}}const _0x2778ab=_0x558e84??(this[_0x518b2e(0x1a1)][_0x518b2e(0xf2)]===_0x518b2e(0x14b)?_0x4d168b['address']:void 0x0),_0x52e860=Math[_0x518b2e(0xc7)](0x0,f({...this[_0x518b2e(0x1a1)],'items':_0x4d168b['items']})[_0x518b2e(0x199)](_0x318f53=>_0x318f53['id']===_0x2778ab));this[_0x518b2e(0x1a5)]({'items':_0x4d168b['items'],'note':_0x4d168b[_0x518b2e(0x109)],'cursor':_0x4d168b[_0x518b2e(0xf9)],'total':_0x4d168b[_0x518b2e(0x11a)]??(_0x4d168b[_0x518b2e(0xf9)]?null:_0x4d168b[_0x518b2e(0x184)][_0x518b2e(0x1e4)]),'since':_0x4d168b[_0x518b2e(0x222)]??null,'selected':_0x52e860,'address':Object['hasOwn'](_0x4d168b,_0x518b2e(0x261))?_0x4d168b[_0x518b2e(0x261)]:this['state']['address']}),this[_0x518b2e(0x1a1)][_0x518b2e(0xf2)]===_0x518b2e(0x110)&&(this[_0x518b2e(0x216)]=Date[_0x518b2e(0x1d2)]());}),this[_0x8a5511(0x229)]||await this[_0x8a5511(0x24c)](this[_0x8a5511(0x1a1)][_0x8a5511(0xf2)]===_0x8a5511(0x14b));}async[_0x4b3ed8(0x12c)](){const _0x34caec=_0x4b3ed8,_0x52c307=this[_0x34caec(0x1a1)];this['closed']||_0x52c307['busy']||_0x52c307[_0x34caec(0x120)]||_0x52c307['detailLoading']||_0x52c307[_0x34caec(0x112)]||_0x52c307['confirm']||_0x52c307['menu']||_0x52c307[_0x34caec(0x123)]||_0x52c307['privateKeyView']||(_0x52c307[_0x34caec(0xf2)]===_0x34caec(0x110)&&_0x52c307[_0x34caec(0x222)]!==null&&Date[_0x34caec(0x1d2)]()-this[_0x34caec(0x216)]>=x?await this[_0x34caec(0x21a)]():_0x52c307[_0x34caec(0xf2)]===_0x34caec(0x157)&&!_0x52c307[_0x34caec(0x190)]&&[_0x34caec(0x16b),_0x34caec(0x1a8),_0x34caec(0xe2),_0x34caec(0x1ec)][_0x34caec(0x223)](this['selected']()?.[_0x34caec(0x1a1)])&&await this[_0x34caec(0x24c)](!0x0));}async[_0x4b3ed8(0x21a)](){const _0x2f32f3=_0x4b3ed8,_0x153a25=new AbortController();this['refreshRequest']=_0x153a25,this[_0x2f32f3(0x216)]=Date[_0x2f32f3(0x1d2)](),this[_0x2f32f3(0x1a5)]({'refreshing':!0x0});try{const _0x5b0ac3=await this['services'][_0x2f32f3(0xf7)](this[_0x2f32f3(0x1a1)][_0x2f32f3(0x160)],this[_0x2f32f3(0x1a1)][_0x2f32f3(0x222)],_0x153a25['signal']);if(this['refreshRequest']!==_0x153a25||this[_0x2f32f3(0x229)])return;const _0x47daa7=this['selected']()?.['id'],_0xad99a5=this[_0x2f32f3(0x1a1)]['items']['at'](-0x1)?.[_0x2f32f3(0x17e)],_0x12c742=new Map(this[_0x2f32f3(0x1a1)][_0x2f32f3(0x184)][_0x2f32f3(0x21c)](_0x3840cd=>[_0x3840cd['id'],_0x3840cd]));for(const _0x19ea6b of _0x5b0ac3[_0x2f32f3(0x184)]){const _0x5e428f=_0x12c742[_0x2f32f3(0xe4)](_0x19ea6b['id']);_0x5e428f&&_0x19ea6b[_0x2f32f3(0x1c1)]<_0x5e428f['updatedAt']||(_0x12c742['has'](_0x19ea6b['id'])||!_0xad99a5||_0x19ea6b[_0x2f32f3(0x17e)]>=_0xad99a5)&&_0x12c742[_0x2f32f3(0x187)](_0x19ea6b['id'],_0x19ea6b);}const _0x2a4b5a=[..._0x12c742[_0x2f32f3(0x169)]()][_0x2f32f3(0xcc)]((_0x59d9f1,_0x7f2c37)=>_0x7f2c37[_0x2f32f3(0x17e)][_0x2f32f3(0x10a)](_0x59d9f1[_0x2f32f3(0x17e)])),_0x57c760=Math[_0x2f32f3(0xc7)](0x0,_0x2a4b5a[_0x2f32f3(0x199)](_0x332481=>_0x332481['id']===_0x47daa7));this['update']({'items':_0x2a4b5a,'selected':_0x57c760,'since':_0x5b0ac3[_0x2f32f3(0x222)],'total':_0x5b0ac3[_0x2f32f3(0x11a)]??(this['state'][_0x2f32f3(0xf9)]?null:_0x2a4b5a[_0x2f32f3(0x1e4)]),'refreshError':null}),await this[_0x2f32f3(0x24c)](!0x0);}catch(_0x3cc59f){this[_0x2f32f3(0x212)]===_0x153a25&&!this[_0x2f32f3(0x229)]&&this[_0x2f32f3(0x1a5)]({'refreshError':_0x2f32f3(0x168)+_0x3cc59f['message']});}finally{this['refreshRequest']===_0x153a25&&(this[_0x2f32f3(0x212)]=null,this[_0x2f32f3(0x1a5)]({'refreshing':!0x1}));}}async[_0x4b3ed8(0x228)](){const _0x3e197d=_0x4b3ed8;this[_0x3e197d(0x1a1)][_0x3e197d(0xf2)]!==_0x3e197d(0x110)||!this[_0x3e197d(0x1a1)][_0x3e197d(0xf9)]||await this[_0x3e197d(0x1ae)](_0x3e197d(0x17a),async _0x3ea926=>{const _0x40d81b=_0x3e197d,_0x4cc9fb=await this['services'][_0x40d81b(0x110)](this[_0x40d81b(0x1a1)]['query'],this[_0x40d81b(0x1a1)][_0x40d81b(0xf9)],_0x3ea926),_0x9a8947=new Set(this[_0x40d81b(0x1a1)][_0x40d81b(0x184)]['map'](_0x1d775f=>_0x1d775f['id'])),_0x464265=this['state'][_0x40d81b(0x184)][_0x40d81b(0x1c3)](_0x4cc9fb[_0x40d81b(0x184)][_0x40d81b(0x227)](_0x52d7bf=>!_0x9a8947[_0x40d81b(0x145)](_0x52d7bf['id'])));this['update']({'items':_0x464265,'cursor':_0x4cc9fb[_0x40d81b(0xf9)],'total':this['state'][_0x40d81b(0x11a)]??(_0x4cc9fb[_0x40d81b(0xf9)]?null:_0x464265[_0x40d81b(0x1e4)])});});}async['loadDetail'](_0x423c04=!0x1){const _0x1347a6=_0x4b3ed8;clearTimeout(this['detailTimer']),this[_0x1347a6(0x204)]=null;const _0x24a167=this[_0x1347a6(0x1c9)]();if(this[_0x1347a6(0x1a1)]['view']===_0x1347a6(0x14b)&&!_0x24a167)return;const _0x3979a7=++this[_0x1347a6(0x15c)];if(this[_0x1347a6(0x1fa)]?.['abort'](),this[_0x1347a6(0x1fa)]=new AbortController(),this[_0x1347a6(0x1a5)]({'detail':_0x423c04?this[_0x1347a6(0x1a1)][_0x1347a6(0x209)]:null,'result':_0x423c04?this['state']['result']:null,'detailLoading':!!_0x24a167,'scroll':_0x423c04?this[_0x1347a6(0x1a1)]['scroll']:0x0}),!!_0x24a167)try{const _0x477ebc=this[_0x1347a6(0x1a1)][_0x1347a6(0xf2)]==='wallet'?await this[_0x1347a6(0x119)]['wallet'](this[_0x1347a6(0x1fa)][_0x1347a6(0x239)],_0x24a167['address']):this[_0x1347a6(0x1a1)]['view']===_0x1347a6(0xc6)?_0x24a167[_0x1347a6(0x131)]===_0x1347a6(0x116)?_0x24a167:_0x24a167['installed']?await this[_0x1347a6(0x119)]['command']([_0x1347a6(0x25e),_0x1347a6(0x21d)],_0x24a167,this['detailRequest'][_0x1347a6(0x239)]):{'notInstalled':!0x0}:await this[_0x1347a6(0x119)][_0x1347a6(0x209)](_0x24a167,this[_0x1347a6(0x1fa)][_0x1347a6(0x239)]);if(_0x3979a7===this[_0x1347a6(0x15c)]){const _0x5141ca=_0x477ebc['state']??(_0x24a167[_0x1347a6(0x226)]?void 0x0:_0x477ebc[_0x1347a6(0x21d)]),_0x4010c0=this[_0x1347a6(0x1a1)][_0x1347a6(0x184)][_0x1347a6(0x21c)](_0x1ce49a=>_0x1ce49a['id']===_0x24a167['id']&&_0x5141ca?{..._0x1ce49a,'state':_0x5141ca,..._0x477ebc['updatedAt']?{'updatedAt':_0x477ebc[_0x1347a6(0x1c1)]}:{},..._0x1347a6(0x210)in _0x477ebc?{'canCancel':_0x477ebc[_0x1347a6(0x210)],'canDelete':_0x477ebc['canDelete'],'canResume':_0x477ebc[_0x1347a6(0x253)]}:{}}:_0x1ce49a),_0xb1996e=f({...this['state'],'items':_0x4010c0})[_0x1347a6(0x199)](_0x8b9f1=>_0x8b9f1['id']===_0x24a167['id']);this[_0x1347a6(0x1a5)]({'detail':_0xb1996e<0x0?null:_0x477ebc,'detailLoading':!0x1,'items':_0x4010c0,'selected':Math['max'](0x0,_0xb1996e)}),_0xb1996e<0x0&&this[_0x1347a6(0x24c)]();}}catch(_0x5bb54d){_0x3979a7===this[_0x1347a6(0x15c)]&&this[_0x1347a6(0x1a5)]({'detailLoading':!0x1,'error':_0x5bb54d[_0x1347a6(0x235)]});}}['move'](_0x143d9b){const _0x36eab6=_0x4b3ed8,_0x1dfe3a=f(this['state'])[_0x36eab6(0x1e4)],_0x56d239=Math['max'](0x0,Math['min'](_0x1dfe3a-0x1,this[_0x36eab6(0x1a1)][_0x36eab6(0x1c9)]+_0x143d9b));_0x56d239!==this['state'][_0x36eab6(0x1c9)]&&(clearTimeout(this['detailTimer']),++this[_0x36eab6(0x15c)],this[_0x36eab6(0x1fa)]?.[_0x36eab6(0xc8)](),this[_0x36eab6(0x1a5)]({'selected':_0x56d239,'error':null,'notice':null,'detail':null,'result':null,'detailLoading':!0x0,'scroll':0x0}),this[_0x36eab6(0x1a1)][_0x36eab6(0xf2)]===_0x36eab6(0xc6)?this[_0x36eab6(0x24c)]():this[_0x36eab6(0x204)]=setTimeout(()=>{const _0x217ed=_0x36eab6;this[_0x217ed(0x24c)]();},0x78)),_0x143d9b>0x0&&_0x56d239===_0x1dfe3a-0x1&&this[_0x36eab6(0x228)]();}[_0x4b3ed8(0x25b)](){const _0x15398a=_0x4b3ed8;this[_0x15398a(0x1a5)]({'filter':m[(m[_0x15398a(0x141)](this[_0x15398a(0x1a1)]['filter'])+0x1)%m[_0x15398a(0x1e4)]],'selected':0x0}),this[_0x15398a(0x24c)]();}async[_0x4b3ed8(0xd2)](_0x170ce2){const _0x16208f=_0x4b3ed8,_0x5c2671=u[(u[_0x16208f(0x141)](this[_0x16208f(0x1a1)]['tab'])+_0x170ce2+u['length'])%u[_0x16208f(0x1e4)]];this[_0x16208f(0x1a5)]({'tab':_0x5c2671,'scroll':0x0}),_0x5c2671===_0x16208f(0x124)&&await this['files']();}async[_0x4b3ed8(0x138)](){const _0x22f693=_0x4b3ed8,_0x224740=this['selected']();_0x224740?.[_0x22f693(0x226)]&&(this['detailTimer']&&this[_0x22f693(0x24c)](!0x0),this[_0x22f693(0x1a5)]({'tab':_0x22f693(0x124),'focus':_0x22f693(0x209),'scroll':0x0}),await this['run'](_0x22f693(0x20a),async _0x2237e8=>{const _0x5a19fb=_0x22f693;this['update']({'result':await this['services'][_0x5a19fb(0x163)](_0x224740['jobId'],_0x2237e8)});}));}['showForm'](_0x51acf7,_0x53ccb2,_0xf2ab41,{onCancel:_0x5a3f40,submit:_0x2c5b95=_0x4b3ed8(0x144)}={}){const _0x4e59be=_0x4b3ed8;this[_0x4e59be(0x1ba)](),this[_0x4e59be(0x1a3)]=_0xf2ab41,this[_0x4e59be(0x22e)]=_0x5a3f40,this[_0x4e59be(0x1a5)]({'form':{'title':_0x51acf7,'fields':_0x53ccb2,'values':Object[_0x4e59be(0x108)](_0x53ccb2[_0x4e59be(0x21c)](_0x3692e4=>[_0x3692e4['name'],_0x3692e4[_0x4e59be(0x1b8)]??''])),'field':0x0,'submit':_0x2c5b95,'error':null},'menu':null});}[_0x4b3ed8(0x191)](_0x3558b3){const _0x2ef19a=_0x4b3ed8,_0x35b2f8=this[_0x2ef19a(0x1a1)][_0x2ef19a(0x112)],_0x51d6d1=_0x35b2f8[_0x2ef19a(0x23a)][_0x35b2f8[_0x2ef19a(0xce)]][_0x2ef19a(0x135)];this[_0x2ef19a(0x1a5)]({'form':{..._0x35b2f8,'values':{..._0x35b2f8[_0x2ef19a(0x169)],[_0x51d6d1]:_0x3558b3},'error':null}});}['nextField'](_0x4db844=!0x1){const _0x20e86a=_0x4b3ed8,_0x585d6e=this[_0x20e86a(0x1a1)][_0x20e86a(0x112)];this['update']({'form':{..._0x585d6e,'field':(_0x585d6e[_0x20e86a(0xce)]+(_0x4db844?-0x1:0x1)+_0x585d6e[_0x20e86a(0x23a)]['length'])%_0x585d6e['fields'][_0x20e86a(0x1e4)]}});}async[_0x4b3ed8(0x13b)](){const _0x500e2e=_0x4b3ed8,{values:_0x4034c7}=this[_0x500e2e(0x1a1)]['form'];try{await this[_0x500e2e(0x1a3)](_0x4034c7);}catch(_0x57b6bb){this[_0x500e2e(0x1a5)]({'form':{...this[_0x500e2e(0x1a1)][_0x500e2e(0x112)],'error':_0x57b6bb[_0x500e2e(0x235)]}});}}[_0x4b3ed8(0x1f8)](){const _0x2f363c=_0x4b3ed8,_0x24ddd3=this[_0x2f363c(0x22e)];this[_0x2f363c(0x1a5)]({'form':null}),_0x24ddd3&&_0x24ddd3();}['search'](){const _0x1f89ad=_0x4b3ed8,_0x28c74a=this[_0x1f89ad(0x1a1)][_0x1f89ad(0xf2)]===_0x1f89ad(0xc6);this[_0x1f89ad(0x1e3)](_0x28c74a?'Search\x20workers':'Search\x20tasks',[{'name':_0x1f89ad(0x160),'label':_0x28c74a?_0x1f89ad(0x101):_0x1f89ad(0xd8),'value':this[_0x1f89ad(0x1a1)][_0x1f89ad(0x160)]}],async({query:_0x54d3c7})=>{const _0x3d88fb=_0x1f89ad;this[_0x3d88fb(0x1a5)]({'query':_0x54d3c7,'selected':0x0,'form':null}),this[_0x3d88fb(0x1a1)][_0x3d88fb(0xf2)]===_0x3d88fb(0x110)?await this[_0x3d88fb(0x1dd)]():await this[_0x3d88fb(0x24c)]();},{'submit':_0x1f89ad(0xca)});}[_0x4b3ed8(0x19f)](_0x534a7f=null){const _0x2ac5f7=_0x4b3ed8;this[_0x2ac5f7(0x132)]={'id':_0x1b9955(),'objective':'','parent':_0x534a7f},this[_0x2ac5f7(0x192)]();}[_0x4b3ed8(0xcd)](){const _0x48459a=_0x4b3ed8,_0x113fec=this['selected']();this[_0x48459a(0x1a1)][_0x48459a(0xf2)]!==_0x48459a(0x157)||!_0x113fec?.[_0x48459a(0x226)]||this['create'](_0x113fec[_0x48459a(0x226)]);}[_0x4b3ed8(0x192)](){const _0x504a23=_0x4b3ed8;this[_0x504a23(0x132)]&&(this[_0x504a23(0x1e3)](this[_0x504a23(0x132)][_0x504a23(0x12e)]?_0x504a23(0x237):'Create\x20a\x20task',[{'name':_0x504a23(0x231),'label':this[_0x504a23(0x132)][_0x504a23(0x12e)]?_0x504a23(0x13f):_0x504a23(0x1a7),'value':this[_0x504a23(0x132)][_0x504a23(0x231)],'placeholder':_0x504a23(0x177)}],async({objective:_0x44ca54})=>{const _0x54cecf=_0x504a23;if(!_0x44ca54[_0x54cecf(0x11c)]())throw new Error(_0x54cecf(0x24e));const _0xe278bb=_0x44ca54[_0x54cecf(0x11c)]()!==this['draft']['objective'];this[_0x54cecf(0x132)]={...this[_0x54cecf(0x132)],'objective':_0x44ca54['trim'](),..._0xe278bb&&this[_0x54cecf(0x132)][_0x54cecf(0x10e)]?{'id':_0x1b9955(),'createdAt':void 0x0}:{},..._0xe278bb?{'requestKey':void 0x0,'plan':void 0x0}:{}},this[_0x54cecf(0x1a5)]({'form':null}),await this['publishDraft']();},{'submit':'Review\x20task'}),this['update']({'form':{...this['state'][_0x504a23(0x112)],'hint':'Colony\x20picks\x20how\x20to\x20pay\x20from\x20your\x20balances.\x20You\x20review\x20the\x20price\x20first.'}}));}[_0x4b3ed8(0xe1)](_0x2a35c3){return new Promise(_0x119423=>{this['askResolve']=_0x119423,this['showForm']('A\x20little\x20more\x20information',_0x2a35c3['map']((_0x3f07e2,_0x2e4019)=>({'name':String(_0x2e4019),'label':_0x3f07e2})),_0x326220=>{const _0x31ba3e=_0x4052;this[_0x31ba3e(0x1a5)]({'form':null}),this['askResolve']=null,_0x119423(Object[_0x31ba3e(0x169)](_0x326220));},{'onCancel':()=>{const _0x21d0f9=_0x4052;this[_0x21d0f9(0x250)]=null,_0x119423([]);}});});}[_0x4b3ed8(0x20d)](_0x308e20){return new Promise(_0x3437cb=>{const _0x37b166=_0x4052;this['confirmResolve']=_0x3437cb;const _0xa13b97=_0x308e20[_0x37b166(0x224)]??(_0x308e20[_0x37b166(0x235)]!==void 0x0?[String(_0x308e20['message'])]:[]);this[_0x37b166(0x1a5)]({'confirm':{..._0x308e20,'lines':_0xa13b97,'selection':0x0,'accepted':!0x1,'expanded':!0x1},'scroll':0x0});});}['moveConfirmation'](_0x116960){const _0x27f6a6=_0x4b3ed8,_0x107b56=this['state']['confirm'],_0x2a2973=_0x107b56['extraAction']?0x3:0x2,_0x4c628f=(_0x107b56[_0x27f6a6(0x18e)]+_0x116960+_0x2a2973)%_0x2a2973;this[_0x27f6a6(0x1a5)]({'confirm':{..._0x107b56,'selection':_0x4c628f,'accepted':_0x4c628f===_0x2a2973-0x1}});}[_0x4b3ed8(0x213)](){const _0x59785a=_0x4b3ed8,_0x362317=this['state'][_0x59785a(0x20d)];_0x362317[_0x59785a(0x1e1)]&&_0x362317[_0x59785a(0x18e)]===0x1?_0x362317['extraAction'][_0x59785a(0x1ae)]():this[_0x59785a(0xd0)](_0x362317[_0x59785a(0xf6)]);}async[_0x4b3ed8(0x137)](_0x4a8757){const _0x3f5f13=_0x4b3ed8;if(!await this[_0x3f5f13(0x20d)]({'title':_0x3f5f13(0xd7),'message':_0x4a8757?.[_0x3f5f13(0x235)]??''}))throw p();}[_0x4b3ed8(0xd0)](_0x36ef18){const _0x20ffb5=this['confirmResolve'];this['confirmResolve']=null,this['update']({'confirm':null}),_0x20ffb5(_0x36ef18);}['reviewPayment'](_0x32b710={}){return async _0x1d592a=>{const _0x4d1c7d=_0x4052,_0x5d7666=await this['confirm']({'title':_0x4d1c7d(0xf8),'payment':_0x547ef0(_0x1d592a),'extraAction':{'label':_0x4d1c7d(0x230),'run':()=>this[_0x4d1c7d(0xd0)](_0x4d1c7d(0x1bc))},..._0x32b710});if(_0x5d7666===_0x4d1c7d(0x1bc))throw W();if(!_0x5d7666)throw p();};}async[_0x4b3ed8(0x1a6)]({action:_0x26fd59,signal:_0x35670f,prefer:_0x3c41d0}){const _0x21652c=_0x4b3ed8,_0x572bcc=await this[_0x21652c(0x208)](()=>this['services'][_0x21652c(0x1e0)]({'action':_0x26fd59,'signal':_0x35670f,'prefer':_0x3c41d0}));return{'choice':_0x572bcc,'payment':{'paymentChain':_0x572bcc[_0x21652c(0x11d)],'payWith':_0x572bcc[_0x21652c(0x24d)]}};}async[_0x4b3ed8(0x172)]({action:_0x26e410,signal:_0x53554c,current:_0xecee46}){const _0x2cf5fd=_0x4b3ed8;this[_0x2cf5fd(0x1a5)]({'busy':_0x2cf5fd(0x194)});const {networks:_0x5e4532}=await this[_0x2cf5fd(0x119)][_0x2cf5fd(0x133)]({'action':_0x26e410,'signal':_0x53554c}),_0xdca48e=_0x5e4532[_0x2cf5fd(0x19a)](_0x3c49e7=>(_0x3c49e7['options']??[])[_0x2cf5fd(0x227)](_0x2a254e=>_0x2a254e[_0x2cf5fd(0x189)])[_0x2cf5fd(0x21c)](_0x1ea94f=>({'paymentChain':_0x3c49e7[_0x2cf5fd(0x19c)],'payWith':_0x1ea94f[_0x2cf5fd(0x225)],'chainName':_0x3c49e7[_0x2cf5fd(0x219)],'option':_0x1ea94f})));return new Promise(_0xfb95f0=>{const _0x437f40=_0x2cf5fd,_0x4aec6d=_0xdca48e[_0x437f40(0x21c)](_0x35fef6=>({'label':A(_0x35fef6,_0xecee46),'run':()=>_0xfb95f0({'paymentChain':_0x35fef6[_0x437f40(0x11d)],'payWith':_0x35fef6[_0x437f40(0x24d)]})}));_0x4aec6d[_0x437f40(0x1e4)]||_0x4aec6d[_0x437f40(0x1f9)]({'label':_0x437f40(0x161),'run':()=>_0xfb95f0(_0xecee46)}),this['showMenu'](_0xdca48e['length']>0x1?_0x437f40(0x15e):'Only\x20this\x20option\x20has\x20enough\x20funds\x20right\x20now',_0x4aec6d,{'onCancel':()=>_0xfb95f0(_0xecee46)});});}async['publishDraft'](){const _0x524c9a=_0x4b3ed8,_0x365942=await this[_0x524c9a(0x1ae)](_0x524c9a(0x194),async _0x40740c=>{const _0x215961=_0x524c9a,_0x5e4639=this[_0x215961(0x132)];_0x5e4639['requestKey']||Object[_0x215961(0x136)](_0x5e4639,await this[_0x215961(0x119)][_0x215961(0xd3)](_0x5e4639));const _0x2e8e61=_0x5e4639[_0x215961(0x12e)]?_0x215961(0x1b6):'job.open';let _0x2215a4;try{if(!_0x5e4639[_0x215961(0x10e)]){const _0x2ca4c0=await this[_0x215961(0x1a6)]({'action':_0x2e8e61,'signal':_0x40740c,'prefer':_0x5e4639[_0x215961(0x1b4)]});_0x2215a4=_0x2ca4c0[_0x215961(0x21e)],_0x5e4639[_0x215961(0x1b4)]=_0x2ca4c0[_0x215961(0x1b4)];}}catch(_0x4e7d17){if(_0x4e7d17[_0x215961(0x17c)]!==_0x215961(0x23d))throw _0x4e7d17;return{'status':_0x215961(0x132),'setupWallet':await this[_0x215961(0x20d)]({'title':_0x215961(0x156),'lines':[_0x215961(0x181),'Create\x20or\x20import\x20a\x20wallet\x20to\x20continue.'],'acceptLabel':'Open\x20Wallets','cancelLabel':'Back\x20to\x20My\x20tasks'}),'draftId':_0x5e4639['id']};}this[_0x215961(0x1a5)]({'busy':_0x215961(0x11b)});const _0x38884b=_0x5e4639[_0x215961(0x12e)]?await this[_0x215961(0x119)][_0x215961(0x209)]({'jobId':_0x5e4639[_0x215961(0x12e)]},_0x40740c):null,_0x35dc19=_0x5e4639['plan']??await this[_0x215961(0x119)][_0x215961(0x130)]({'objective':_0x5e4639[_0x215961(0x231)],'parent':_0x38884b,'signal':_0x40740c,'ask':_0xcd32c6=>this['ask'](_0xcd32c6),'onProgress':_0x4b76fd=>{const _0x4ef1bf=_0x215961;this['update'](_0x4b76fd[_0x4ef1bf(0x1fe)]===_0x4ef1bf(0x1b5)?{'busy':_0x4ef1bf(0x11b),'modelProgress':null}:{'busy':_0x4ef1bf(0x1ca),'modelProgress':_0x4b76fd});}});if(_0x40740c[_0x215961(0x115)](),!_0x35dc19[_0x215961(0x1ac)])throw new Error(_0x35dc19[_0x215961(0x218)][_0x215961(0x143)]('\x0a')||_0x215961(0x18b));_0x5e4639[_0x215961(0x130)]=_0x35dc19,_0x5e4639['requestKey']||Object['assign'](_0x5e4639,await this[_0x215961(0x119)]['saveDraft'](_0x5e4639)),this[_0x215961(0x1a5)]({'busy':_0x215961(0xfb)});let _0x3fbc14=!0x1;const _0x490c0a=async _0x1a3e18=>{const _0x2e58db=_0x215961;if(_0x3fbc14){const _0x555632=await this[_0x2e58db(0x1a6)]({'action':_0x2e8e61,'signal':_0x40740c,'prefer':_0x5e4639[_0x2e58db(0x1b4)]});_0x2215a4=_0x555632[_0x2e58db(0x21e)],_0x5e4639[_0x2e58db(0x1b4)]=_0x555632['payment'],_0x1a3e18={..._0x1a3e18,'paymentChain':_0x5e4639[_0x2e58db(0x1b4)][_0x2e58db(0x11d)],'payWith':_0x5e4639['payment'][_0x2e58db(0x24d)],'expectedWallet':_0x2215a4[_0x2e58db(0x261)]},_0x3fbc14=!0x1;}try{return await this[_0x2e58db(0x119)]['publish'](_0x1a3e18);}catch(_0x537a33){throw _0x537a33[_0x2e58db(0x17c)]==='funding_required'&&_0x537a33[_0x2e58db(0x16c)]?.['canChangePayment']&&(_0x3fbc14=!0x0),_0x537a33;}};for(;;)try{const _0x5e1c63=await this['withFundingRetry'](()=>_0x490c0a({'input':_0x35dc19['input'],'action':_0x2e8e61,'paymentChain':_0x5e4639[_0x215961(0x1b4)]?.['paymentChain'],'payWith':_0x5e4639['payment']?.[_0x215961(0x24d)],'expectedWallet':_0x2215a4?.[_0x215961(0x261)],'requestKey':_0x5e4639[_0x215961(0x10e)]??_0x5e4639['id'],'onSaved':async _0x303180=>{const _0x47605e=_0x215961;_0x5e4639[_0x47605e(0x10e)]=_0x303180[_0x47605e(0x10e)],await this[_0x47605e(0x119)][_0x47605e(0xf4)](_0x5e4639['id']);},'plan':{'summary':_0x35dc19[_0x215961(0x1f6)],'deliverables':_0x35dc19[_0x215961(0x24a)]},'signal':_0x40740c,'chooseSupport':_0x4a6765=>this[_0x215961(0x1f5)](_0x4a6765),'onProgress':_0x4eac90=>this[_0x215961(0x178)](_0x4eac90),'confirmReplacement':_0x1d3806=>this[_0x215961(0x137)](_0x1d3806),'confirm':this[_0x215961(0x1d1)]()}));return this[_0x215961(0x10c)](_0x5e1c63),_0x5e1c63;}catch(_0x4a5346){if(_0x4a5346[_0x215961(0x17c)]!==_0x215961(0x13a))throw _0x4a5346;_0x5e4639[_0x215961(0x1b4)]=await this['pickPayment']({'action':_0x2e8e61,'signal':_0x40740c,'current':_0x5e4639['payment']}),this['update']({'busy':_0x215961(0x16d)});}});if(!this[_0x524c9a(0x229)]&&_0x365942?.[_0x524c9a(0x21d)]==='draft')await this['navigate'](_0x365942[_0x524c9a(0x24b)]?_0x524c9a(0x14b):_0x524c9a(0x157)),this[_0x524c9a(0x1a5)]({'notice':_0x524c9a(0xec)}),_0x365942[_0x524c9a(0x24b)]&&this[_0x524c9a(0x155)]();else{if(!this[_0x524c9a(0x229)]&&_0x365942?.['status']==='admitted'&&_0x365942['state'][_0x524c9a(0x226)]){await this['navigate'](_0x524c9a(0x157));const _0x190335=this[_0x524c9a(0x1a1)][_0x524c9a(0x184)][_0x524c9a(0x199)](_0x5a72ce=>_0x5a72ce['jobId']===_0x365942[_0x524c9a(0x1a1)][_0x524c9a(0x226)]);_0x190335>=0x0&&(this[_0x524c9a(0x1a5)]({'selected':_0x190335}),await this[_0x524c9a(0x24c)]()),this['update']({'notice':'Task\x20published:\x20'+_0x365942[_0x524c9a(0x1a1)][_0x524c9a(0x226)]});}}}[_0x4b3ed8(0x178)](_0xa98149){const _0x1e4e49=_0x4b3ed8,_0x3c252b=typeof _0xa98149?.[_0x1e4e49(0x235)]=='string'?_0xa98149['message'][_0x1e4e49(0x11c)]():'';_0x3c252b&&this[_0x1e4e49(0x1a5)]({'busy':_0x3c252b});}async[_0x4b3ed8(0x208)](_0xcf1e28){const _0x2e8b5e=_0x4b3ed8;for(;;)try{return await _0xcf1e28();}catch(_0x42c1ee){if(_0x42c1ee[_0x2e8b5e(0x17c)]!==_0x2e8b5e(0x1aa))throw _0x42c1ee;if(!await this[_0x2e8b5e(0x20d)]({'title':_0x2e8b5e(0x22f),'lines':_0x2a90a8(_0x42c1ee[_0x2e8b5e(0x16c)]),'acceptLabel':_0x2e8b5e(0x220),'cancelLabel':'Back','extraAction':{'label':'Add\x20funds','run':()=>this[_0x2e8b5e(0x175)](_0x42c1ee[_0x2e8b5e(0x16c)])}}))throw p();this['update']({'busy':_0x2e8b5e(0xfc)});}}[_0x4b3ed8(0x10c)]({state:_0x2dfb5f,status:_0x5becfd,check:_0x4f3cc3}){const _0x1bd5b1=_0x4b3ed8;if(_0x5becfd===_0x1bd5b1(0x1f2)&&_0x2dfb5f['jobId'])this['draft']=null,this[_0x1bd5b1(0x1a5)]({'notice':_0x1bd5b1(0x13e)+_0x2dfb5f[_0x1bd5b1(0x226)]+_0x1bd5b1(0x195)});else{if(_0x5becfd==='blocked')this[_0x1bd5b1(0x1a5)]({'error':'Not\x20paid.\x20'+_0x4f3cc3[_0x1bd5b1(0x125)][_0x1bd5b1(0x21c)](_0x5985be=>_0x5985be[_0x1bd5b1(0x209)]??_0x5985be['code'])[_0x1bd5b1(0x143)]('\x0a')});else{if(_0x5becfd===_0x1bd5b1(0x10d))this[_0x1bd5b1(0x1a5)]({'error':'Paid,\x20but\x20the\x20task\x20was\x20refused.\x0a'+(_0x2dfb5f['refusalProblems']??[])[_0x1bd5b1(0x21c)](_0x12d759=>_0x12d759['detail']??_0x12d759['code'])[_0x1bd5b1(0x143)]('\x0a')+_0x1bd5b1(0x233)+_0x2dfb5f['orderId']});else{if(S[_0x1bd5b1(0x145)](_0x5becfd)){const _0x4e16c3=[_0x1bd5b1(0x1c8),_0x1bd5b1(0x181),_0x1bd5b1(0x245)],_0x22112a=_0x2dfb5f?.[_0x1bd5b1(0x1b1)]??_0x2dfb5f?.[_0x1bd5b1(0x252)];_0x22112a?.[_0x1bd5b1(0x174)]&&_0x4e16c3['push'](_0x1bd5b1(0x167)+_0x22112a['hash']),_0x22112a?.['explorerUrl']&&_0x4e16c3[_0x1bd5b1(0x1f9)](_0x1bd5b1(0xdd)+_0x22112a[_0x1bd5b1(0x103)]),this['update']({'error':_0x4e16c3[_0x1bd5b1(0x143)]('\x0a')});}else this[_0x1bd5b1(0x1a5)]({'error':'Order\x20status:\x20'+_0x5becfd+_0x1bd5b1(0x16f)});}}}}async[_0x4b3ed8(0x201)](){const _0x24fcf5=_0x4b3ed8,_0x4afe08=this[_0x24fcf5(0x1c9)]();if(this[_0x24fcf5(0x1a1)]['view']===_0x24fcf5(0x157)&&_0x4afe08?.[_0x24fcf5(0x1cb)]){const _0x503b5b=await this[_0x24fcf5(0x1ae)](_0x24fcf5(0xe8),()=>this['services']['loadDraft'](_0x4afe08[_0x24fcf5(0x1cb)]));_0x503b5b&&(this['draft']=_0x503b5b,this[_0x24fcf5(0x192)]());return;}this['state']['view']!==_0x24fcf5(0x157)||!_0x4afe08?.[_0x24fcf5(0x10e)]||_0x4afe08[_0x24fcf5(0x226)]||!_0x4afe08[_0x24fcf5(0x253)]||(this[_0x24fcf5(0x132)]=null,await this['run'](_0x24fcf5(0xc2),async _0xec72c1=>{const _0x406207=_0x24fcf5;let _0x506a17,_0x250e9a,_0xba8368;if(_0x4afe08[_0x406207(0x210)]){const _0x11abea=await this[_0x406207(0x119)]['detail'](_0x4afe08,_0xec72c1);_0xba8368=_0x11abea[_0x406207(0x114)]??_0x406207(0xeb),this[_0x406207(0x1a5)]({'busy':_0x406207(0x194)}),_0x506a17=(await this['autoPayment']({'action':_0xba8368,'signal':_0xec72c1,'prefer':{'paymentChain':_0x11abea[_0x406207(0x11d)]??_0x406207(0x254),'payWith':_0x11abea[_0x406207(0x24d)]??'IMD'}}))[_0x406207(0x1b4)],_0x250e9a=this[_0x406207(0x1d1)]({'title':_0x406207(0x128)});}let _0x3db92a=!0x1;const _0x4fb7f2=async()=>{const _0x3cc211=_0x406207;_0x3db92a&&(_0x506a17=(await this[_0x3cc211(0x1a6)]({'action':_0xba8368,'signal':_0xec72c1,'prefer':_0x506a17}))['payment'],_0x3db92a=!0x1);try{return await this['services'][_0x3cc211(0xc9)](_0x4afe08,_0x2012dc=>this[_0x3cc211(0x20d)](_0x2012dc),_0xec72c1,_0x7c3242=>this[_0x3cc211(0x1f5)](_0x7c3242),_0x45f808=>this['showPaymentProgress'](_0x45f808),_0x740914=>this[_0x3cc211(0x137)](_0x740914),{'payment':_0x506a17,'review':_0x250e9a});}catch(_0x4d25a7){throw _0x4afe08[_0x3cc211(0x210)]&&_0x4d25a7[_0x3cc211(0x17c)]===_0x3cc211(0x1aa)&&_0x4d25a7['funding']?.[_0x3cc211(0xe0)]&&(_0x3db92a=!0x0),_0x4d25a7;}};for(;;)try{this[_0x406207(0x10c)](await this['withFundingRetry'](_0x4fb7f2));return;}catch(_0x3eb2e3){if(_0x3eb2e3['code']!=='change_payment')throw _0x3eb2e3;_0x506a17=await this[_0x406207(0x172)]({'action':_0xba8368,'signal':_0xec72c1,'current':_0x506a17}),this[_0x406207(0x1a5)]({'busy':'Preparing\x20the\x20payment\x20review...'});}}));}['taskMenu'](){const _0x9ab71d=_0x4b3ed8,_0x1303bf=this[_0x9ab71d(0x1c9)]();if(this[_0x9ab71d(0x1a1)][_0x9ab71d(0xf2)]!==_0x9ab71d(0x157)||!_0x1303bf)return;const _0xd5203a=[{'label':_0x9ab71d(0x11f),'run':()=>this[_0x9ab71d(0x1a5)]({'focus':'detail','tab':_0x9ab71d(0x255),'scroll':0x0})}];_0x1303bf[_0x9ab71d(0x1cb)]?_0xd5203a[_0x9ab71d(0x1f9)]({'label':_0x9ab71d(0x19e),'run':()=>this[_0x9ab71d(0x201)]()},{'label':'Delete\x20draft','run':()=>this[_0x9ab71d(0x1ea)]()}):_0x1303bf[_0x9ab71d(0x226)]?(_0xd5203a[_0x9ab71d(0x1f9)]({'label':_0x9ab71d(0x15f),'run':()=>this[_0x9ab71d(0x138)]()},{'label':_0x9ab71d(0x164),'run':()=>this[_0x9ab71d(0x13d)]()}),_0x1303bf[_0x9ab71d(0x1a1)]===_0x9ab71d(0xd5)&&_0xd5203a[_0x9ab71d(0x1f9)]({'label':_0x9ab71d(0xfa),'run':()=>this[_0x9ab71d(0xcd)]()})):_0x1303bf[_0x9ab71d(0x10e)]&&(_0x1303bf['canResume']&&_0xd5203a[_0x9ab71d(0x1f9)]({'label':_0x1303bf['canCancel']?_0x9ab71d(0x1b0):'Inspect\x20/\x20resume\x20saved\x20order','run':()=>this[_0x9ab71d(0x201)]()}),_0x1303bf[_0x9ab71d(0x210)]&&_0xd5203a[_0x9ab71d(0x1f9)]({'label':_0x9ab71d(0x1fb),'run':()=>this[_0x9ab71d(0x1e2)]()}),_0x1303bf['canDelete']&&_0xd5203a['push']({'label':'Delete\x20local\x20record','run':()=>this[_0x9ab71d(0x23c)]()})),this[_0x9ab71d(0x15d)](_0x9ab71d(0x251),_0xd5203a);}async[_0x4b3ed8(0x1ea)](){const _0x74f1a1=_0x4b3ed8,_0x3b0330=this[_0x74f1a1(0x1c9)]();if(!_0x3b0330?.[_0x74f1a1(0x1cb)]||!await this['confirm']({'title':'Delete\x20draft?','lines':[_0x3b0330[_0x74f1a1(0x1d7)]],'acceptLabel':_0x74f1a1(0x1a0),'cancelLabel':_0x74f1a1(0x18d)}))return;await this[_0x74f1a1(0x1ae)](_0x74f1a1(0xc3),()=>this[_0x74f1a1(0x119)][_0x74f1a1(0xf4)](_0x3b0330[_0x74f1a1(0x1cb)]))&&(this[_0x74f1a1(0x132)]?.['id']===_0x3b0330[_0x74f1a1(0x1cb)]&&(this['draft']=null),await this[_0x74f1a1(0x1dd)]());}async[_0x4b3ed8(0x1e2)](){const _0x4176d5=_0x4b3ed8,_0x5c5f6c=this[_0x4176d5(0x1c9)]();if(this['state'][_0x4176d5(0xf2)]!==_0x4176d5(0x157)||!_0x5c5f6c?.['canCancel'])return;let _0xd4a703=!0x1;await this[_0x4176d5(0x1ae)](_0x4176d5(0xe7),async()=>{const _0xf63fdb=_0x4176d5;await this[_0xf63fdb(0x20d)]({'title':_0xf63fdb(0xf5),'lines':[_0x5c5f6c[_0xf63fdb(0x1d7)],'',_0xf63fdb(0xdf),_0xf63fdb(0x1af),'You\x20can\x20create\x20a\x20new\x20task\x20whenever\x20you\x20want.'],'acceptLabel':_0xf63fdb(0x1fb),'cancelLabel':_0xf63fdb(0x21b)})&&(await this[_0xf63fdb(0x119)][_0xf63fdb(0x205)](_0x5c5f6c),_0xd4a703=!0x0);}),_0xd4a703&&!this[_0x4176d5(0x229)]&&(await this[_0x4176d5(0x1dd)](),this['update']({'notice':_0x4176d5(0x1e9)}));}async[_0x4b3ed8(0x23c)](){const _0x4b2d29=_0x4b3ed8,_0x502e9b=this['selected']();if(this[_0x4b2d29(0x1a1)]['view']!=='tasks'||!_0x502e9b?.[_0x4b2d29(0x186)])return;let _0x3dfd3a=!0x1;await this['run'](_0x4b2d29(0x12f),async()=>{const _0x384a0e=_0x4b2d29;await this[_0x384a0e(0x119)]['delete'](_0x502e9b),_0x3dfd3a=!0x0;}),_0x3dfd3a&&!this[_0x4b2d29(0x229)]&&(await this['refresh'](),this[_0x4b2d29(0x1a5)]({'notice':_0x4b2d29(0x193)}));}[_0x4b3ed8(0x13d)](){const _0x251ca=_0x4b3ed8,_0x344d9b=this[_0x251ca(0x1c9)]();_0x344d9b?.['jobId']&&this[_0x251ca(0x1e3)](_0x251ca(0x20b),[{'name':_0x251ca(0x100),'label':_0x251ca(0x179),'value':_0x251ca(0x1dc)+_0x344d9b[_0x251ca(0x226)]}],async({out:_0x36e3b6})=>{const _0x46166b=_0x251ca;if(!_0x36e3b6[_0x46166b(0x11c)]())throw new Error(_0x46166b(0xbe));this[_0x46166b(0x1a5)]({'form':null}),await this[_0x46166b(0x1ae)]('Downloading\x20verified\x20files...',async _0x4270c3=>{const _0x5916f3=_0x46166b,_0x3ea1ed=await this[_0x5916f3(0x119)][_0x5916f3(0x13d)]({'id':_0x344d9b[_0x5916f3(0x226)],'out':_0x36e3b6,'signal':_0x4270c3,'onProgress':_0x23a3da=>this[_0x5916f3(0x1a5)]({'busy':_0x5916f3(0x1e7)+_0x23a3da['path']})});this[_0x5916f3(0x1a5)]({'notice':_0x5916f3(0x1e7)+_0x3ea1ed[_0x5916f3(0x138)]['length']+_0x5916f3(0x196)+_0x36e3b6});});},{'submit':_0x251ca(0x17d)});}[_0x4b3ed8(0xcb)](){const _0x460802=_0x4b3ed8;this[_0x460802(0x1e3)]('Add\x20a\x20worker\x20target',[{'name':'host','label':_0x460802(0xdb)},{'name':_0x460802(0x1f1),'label':_0x460802(0x21f),'value':'22'},{'name':_0x460802(0x200),'label':'SSH\x20identity\x20file\x20(optional)'}],async _0x113579=>{const _0x572b4b=_0x460802,_0x29f02c=_0x5b065c(_0x113579);this['extraTargets'][_0x572b4b(0x23e)](_0x551f53=>_0x551f53['id']===_0x29f02c['id'])||this[_0x572b4b(0x118)][_0x572b4b(0x1f9)](_0x29f02c),this[_0x572b4b(0x1a5)]({'form':null}),await this[_0x572b4b(0x1dd)](),this['update']({'selected':this[_0x572b4b(0x1a1)][_0x572b4b(0x184)][_0x572b4b(0x199)](_0x439e44=>_0x439e44['id']===_0x29f02c['id'])}),await this['loadDetail']();},{'submit':_0x460802(0x147)});}[_0x4b3ed8(0x15d)](_0x3224bf,_0x3e129b,{onCancel:_0x26c1db,selected:_0x181dc4=0x0}={}){const _0x3f1ca5=_0x4b3ed8;this[_0x3f1ca5(0x1ba)](),this['menuCancel']=_0x26c1db??null,this[_0x3f1ca5(0x1a5)]({'menu':{'title':_0x3224bf,'items':_0x3e129b,'selected':_0x181dc4},'form':null});}[_0x4b3ed8(0x1f5)](_0x36286f){return new Promise((_0x3efa36,_0x3c49b5)=>{const _0x19febc=_0x4052;this[_0x19febc(0x15d)](_0x19febc(0x152),_0x36286f[_0x19febc(0x21c)]((_0x250fa3,_0x3b69bf)=>({'label':_0x250fa3[_0x19febc(0x170)],'run':()=>_0x3efa36(_0x3b69bf)})),{'onCancel':()=>_0x3c49b5(p()),'selected':_0x714d5c});});}['dismissMenu'](){const _0xe910bd=_0x4b3ed8,_0x15999a=this['menuCancel'];this['menuCancel']=null,this[_0xe910bd(0x1a5)]({'menu':null}),_0x15999a?.();}[_0x4b3ed8(0x1d4)](){const _0x25e621=_0x4b3ed8,_0x9020fc=this[_0x25e621(0x1a1)][_0x25e621(0x148)][_0x25e621(0x184)][this[_0x25e621(0x1a1)][_0x25e621(0x148)][_0x25e621(0x1c9)]];this[_0x25e621(0x1bb)]=null,this['update']({'menu':null}),_0x9020fc[_0x25e621(0x1ae)]();}['workerMenu'](){const _0x125dab=_0x4b3ed8,_0x58c5a0=this[_0x125dab(0x1c9)]();if(!_0x58c5a0||_0x58c5a0[_0x125dab(0x131)]===_0x125dab(0x116))return;const _0x2355e0=(_0x11e63a,_0x3e3344=!0x1)=>()=>this[_0x125dab(0x1d9)](_0x11e63a,_0x3e3344),_0x1d2655=(_0x2723ee,_0x324e21,_0x24d28d,_0x526a0d,_0x40233b=!0x1)=>()=>this[_0x125dab(0x1e3)](_0x2723ee,[{'name':_0x24d28d,'label':_0x526a0d}],_0x379fbe=>{const _0x1f7f5e=_0x125dab;if(!_0x379fbe[_0x24d28d][_0x1f7f5e(0x11c)]())throw new Error(_0x526a0d+_0x1f7f5e(0x16e));return this[_0x1f7f5e(0x1a5)]({'form':null}),this[_0x1f7f5e(0x1d9)](_0x324e21[_0x1f7f5e(0x1c3)](_0x379fbe[_0x24d28d]['trim']()),_0x40233b);});this[_0x125dab(0x15d)](_0x125dab(0x12b)+_0x58c5a0[_0x125dab(0x1d7)],[{'label':_0x125dab(0x146),'run':_0x2355e0([_0x125dab(0x21d)])},{'label':_0x125dab(0x129),'run':_0x2355e0([_0x125dab(0x23b)])},{'label':_0x125dab(0xe9),'run':_0x2355e0(['doctor'])},{'label':_0x125dab(0xee),'run':_0x2355e0([_0x125dab(0x102)])},{'label':_0x125dab(0x249),'run':_0x2355e0([_0x125dab(0xd6)],!0x0)},{'label':_0x125dab(0x1ce),'run':_0x2355e0([_0x125dab(0x22a)],!0x0)},{'label':_0x125dab(0x18a),'run':_0x2355e0([_0x125dab(0x1eb)],!0x0)},{'label':'Install\x20background\x20service','run':()=>this[_0x125dab(0x104)]()},...['start',_0x125dab(0x248),_0x125dab(0x154),_0x125dab(0x1a5)][_0x125dab(0x21c)](_0x3efb5f=>({'label':_0x3efb5f[0x0][_0x125dab(0xff)]()+_0x3efb5f['slice'](0x1),'run':_0x2355e0([_0x3efb5f],!0x0)})),{'label':'Skills','run':()=>this[_0x125dab(0x15d)]('Worker\x20skills',[{'label':_0x125dab(0x10f),'run':_0x2355e0([_0x125dab(0x242),_0x125dab(0xf0)])},{'label':_0x125dab(0x1ff),'run':_0x1d2655(_0x125dab(0x1ff),[_0x125dab(0x242),'add'],'id',_0x125dab(0x149))},{'label':'Remove\x20skill','run':_0x1d2655(_0x125dab(0xd4),[_0x125dab(0x242),'remove'],'id',_0x125dab(0x149))}])},{'label':_0x125dab(0x127),'run':()=>this['showMenu'](_0x125dab(0x256),[{'label':_0x125dab(0x1ed),'run':_0x2355e0([_0x125dab(0x260),_0x125dab(0xf0)])},{'label':'Add\x20tool','run':_0x2355e0([_0x125dab(0x260),'add'],!0x0)},{'label':_0x125dab(0x232),'run':_0x1d2655(_0x125dab(0xea),[_0x125dab(0x260),_0x125dab(0x19c)],_0x125dab(0x135),_0x125dab(0x238),!0x0)},{'label':_0x125dab(0x117),'run':_0x1d2655(_0x125dab(0x117),['tools',_0x125dab(0x140)],_0x125dab(0x135),_0x125dab(0x238),!0x0)},{'label':_0x125dab(0x171),'run':_0x1d2655('Remove\x20tool',[_0x125dab(0x260),'remove'],'id',_0x125dab(0x22b))}])},{'label':_0x125dab(0xc5),'run':()=>this[_0x125dab(0x15d)]('Worker\x20RPC\x20endpoints',[{'label':'List\x20RPC\x20endpoints','run':_0x2355e0([_0x125dab(0x10b),_0x125dab(0xf0)])},{'label':_0x125dab(0x139),'run':_0x1d2655(_0x125dab(0x142),[_0x125dab(0x10b),'add'],_0x125dab(0x11e),_0x125dab(0x18f),!0x0)},{'label':'Remove\x20RPC\x20endpoint','run':_0x1d2655(_0x125dab(0xfe),['rpc',_0x125dab(0xd1)],_0x125dab(0x11e),_0x125dab(0x18f))}])},{'label':_0x125dab(0x1fc),'run':_0x2355e0([_0x125dab(0x241)],!0x0)}]);}[_0x4b3ed8(0x104)](){const _0x28abe7=_0x4b3ed8;this[_0x28abe7(0x1e3)](_0x28abe7(0x258),[{'name':_0x28abe7(0x217),'label':_0x28abe7(0x188),'value':_0x28abe7(0x1fd)},{'name':_0x28abe7(0xfd),'label':_0x28abe7(0x15a),'value':'1'},{'name':_0x28abe7(0x173),'label':_0x28abe7(0x1f3),'value':'no'}],async({runtime:_0x13675c,concurrency:_0x31beeb,boot:_0x37ecd6})=>{const _0x50e7b6=_0x28abe7;if(![_0x50e7b6(0x1fd),_0x50e7b6(0x1c7)][_0x50e7b6(0x223)](_0x13675c))throw new Error(_0x50e7b6(0x12a));if(!/^[1-4]$/['test'](_0x31beeb))throw new Error(_0x50e7b6(0x1c4));if(![_0x50e7b6(0x207),'no']['includes'](_0x37ecd6))throw new Error(_0x50e7b6(0x247));const _0x4e8cc5=[_0x50e7b6(0x1d3),_0x50e7b6(0x206),_0x50e7b6(0x1df),_0x13675c,'--concurrency',_0x31beeb];_0x37ecd6===_0x50e7b6(0x207)&&_0x4e8cc5[_0x50e7b6(0x1f9)](_0x50e7b6(0x20c)),this[_0x50e7b6(0x1a5)]({'form':null}),await this[_0x50e7b6(0x1d9)](_0x4e8cc5,!0x0);});}async[_0x4b3ed8(0x1d9)](_0x5cf115,_0x5e8208=!0x1){const _0x21394e=_0x4b3ed8,_0x22f2b4=this[_0x21394e(0x1c9)]();!_0x22f2b4||_0x22f2b4[_0x21394e(0x131)]===_0x21394e(0x116)||await this[_0x21394e(0x1ae)](_0x21394e(0xda)+_0x5cf115[_0x21394e(0x143)]('\x20')+_0x21394e(0x122),async _0x4b3a57=>{const _0x420522=_0x21394e;if(_0x5e8208){if(!await this['confirm']({'title':_0x420522(0x1a4)+_0x22f2b4[_0x420522(0x1d7)]+'?','lines':['colony\x20worker\x20'+_0x5cf115[_0x420522(0x143)]('\x20'),_0x420522(0xc1)]}))return;await this[_0x420522(0x23f)]([_0x420522(0x25e),..._0x5cf115],_0x22f2b4),this[_0x420522(0x1a5)]({'notice':_0x420522(0xbd)});}else{const _0x4c04bf=await this[_0x420522(0x119)][_0x420522(0x158)]([_0x420522(0x25e),..._0x5cf115],_0x22f2b4,_0x4b3a57);this['update']({'detail':{'output':_0x4c04bf},'focus':_0x420522(0x209),'scroll':0x0});}});}[_0x4b3ed8(0x15b)](_0x579da7){return new Promise((_0x5e7e61,_0x5f70f0)=>{const _0x35826b=_0x4052;this[_0x35826b(0x1c6)]=_0x5f70f0,this['showForm'](_0x35826b(0x14a),[{'name':_0x35826b(0x262),'label':_0x579da7,'secret':!0x0}],({password:_0x4facae})=>{const _0x3124f9=_0x35826b;this[_0x3124f9(0x1a5)]({'form':null}),this['passwordReject']=null,_0x5e7e61(_0x4facae);},{'submit':_0x35826b(0x144),'onCancel':()=>{const _0x389c9b=_0x35826b;this[_0x389c9b(0x1c6)]=null,_0x5f70f0(new Error(_0x389c9b(0x25c)));}});});}[_0x4b3ed8(0x259)](){const _0x30fba1=_0x4b3ed8,_0x4d7338=this[_0x30fba1(0x1a1)][_0x30fba1(0x209)]?.['source']===_0x30fba1(0x198);this[_0x30fba1(0x1a1)][_0x30fba1(0x209)]?.[_0x30fba1(0x14c)]&&this['showMenu'](_0x30fba1(0x203),[...!this[_0x30fba1(0x1bf)]()&&this[_0x30fba1(0x1c9)]()?[{'label':_0x30fba1(0x236),'run':()=>this[_0x30fba1(0x176)]()}]:[],..._0x4d7338?[{'label':_0x30fba1(0xbc),'run':()=>this['walletPrivateKey']()},{'label':_0x30fba1(0x257),'run':()=>this[_0x30fba1(0x1bd)]()},{'label':'Delete\x20wallet','run':()=>this[_0x30fba1(0xe5)]()}]:[],...this[_0x30fba1(0x1a1)][_0x30fba1(0x209)]?.[_0x30fba1(0x14c)]?[{'label':'Receive\x20funds\x20/\x20QR\x20code','run':()=>this[_0x30fba1(0x25f)]()}]:[]]);}[_0x4b3ed8(0x155)](){const _0x301f19=_0x4b3ed8;this[_0x301f19(0x15d)]('Wallet\x20management\x20\xB7\x20all\x20wallets',[{'label':'Create\x20a\x20new\x20local\x20wallet','run':()=>this[_0x301f19(0x14f)](!0x1)},{'label':_0x301f19(0x180),'run':()=>this['walletImport']()}]);}[_0x4b3ed8(0x16a)](){const _0x4cf061=_0x4b3ed8;this[_0x4cf061(0x15d)](_0x4cf061(0x180),[{'label':_0x4cf061(0x215),'run':()=>this[_0x4cf061(0x14f)](!0x0)},{'label':_0x4cf061(0xf1),'run':()=>this['walletRestore']()}]);}['walletIsCurrent'](){const _0x538b6d=_0x4b3ed8;return!this['selected']()||this[_0x538b6d(0x1c9)]()['address']===this[_0x538b6d(0x1a1)][_0x538b6d(0x261)];}async[_0x4b3ed8(0xe5)](){const _0x45df3d=_0x4b3ed8,_0x154d8c=this[_0x45df3d(0x1c9)]()?.['address']??this['state'][_0x45df3d(0x209)]?.[_0x45df3d(0x261)];if(this['state'][_0x45df3d(0x209)]?.[_0x45df3d(0x263)]!=='local'||!_0x154d8c||!await this[_0x45df3d(0x20d)]({'title':_0x45df3d(0x1da),'lines':[_0x154d8c,_0x45df3d(0x20e),_0x45df3d(0x17f)],'acceptLabel':_0x45df3d(0x144),'cancelLabel':'Keep\x20wallet'})||!await this[_0x45df3d(0x20d)]({'title':'Delete\x20wallet\x20\xB7\x202\x20of\x202','lines':[_0x154d8c,'The\x20local\x20encrypted\x20private\x20key\x20will\x20be\x20deleted.',_0x45df3d(0x185)],'acceptLabel':_0x45df3d(0x1e8),'cancelLabel':'Keep\x20wallet'}))return;const _0x5eaa8c=await this[_0x45df3d(0x1ae)](_0x45df3d(0x1c0),()=>this[_0x45df3d(0x119)][_0x45df3d(0xe6)](_0x154d8c));_0x5eaa8c&&(await this[_0x45df3d(0xd9)](_0x5eaa8c[_0x45df3d(0x1cf)]),this[_0x45df3d(0x1a5)]({'notice':_0x45df3d(0xc0)+_0x154d8c}));}['walletPrivateKey'](){const _0x239576=_0x4b3ed8,_0x4f6bd0=this[_0x239576(0x1c9)]()?.['address']??this[_0x239576(0x1a1)][_0x239576(0x209)]?.[_0x239576(0x261)];this[_0x239576(0x1a1)][_0x239576(0x209)]?.[_0x239576(0x263)]!==_0x239576(0x198)||!_0x4f6bd0||this['showForm'](_0x239576(0x1cd),[{'name':_0x239576(0x262),'label':'Local\x20wallet\x20password','secret':!0x0}],async({password:_0x275f5c})=>{const _0x198861=_0x239576;this[_0x198861(0x1a5)]({'form':null});const _0x3ada62=await this[_0x198861(0x1ae)]('Checking\x20wallet\x20password...',_0xe9a86e=>this[_0x198861(0x119)]['revealPrivateKey'](_0x4f6bd0,_0x275f5c,_0xe9a86e));_0x3ada62&&this[_0x198861(0x1a5)]({'privateKeyView':_0x3ada62});},{'submit':_0x239576(0xbc)});}async[_0x4b3ed8(0xd9)](_0x5883d5){const _0xb89e89=_0x4b3ed8;this['update']({'selected':-0x1}),this[_0xb89e89(0x24f)]=_0x5883d5,await this[_0xb89e89(0x1dd)]();}async[_0x4b3ed8(0x176)](){const _0x43695e=_0x4b3ed8,_0x54ad26=this[_0x43695e(0x1c9)]();if(!_0x54ad26||this[_0x43695e(0x1bf)]())return;const _0x4925c9=await this[_0x43695e(0x1ae)]('Switching\x20wallet...',()=>this[_0x43695e(0x119)][_0x43695e(0x1e5)](_0x54ad26[_0x43695e(0x261)]));_0x4925c9&&(await this[_0x43695e(0x1dd)](),this['update']({'notice':_0x43695e(0xef)+_0x4925c9['address']}));}[_0x4b3ed8(0x14f)](_0xb930ca){const _0x4e69cd=_0x4b3ed8,_0x379092=this['services'][_0x4e69cd(0x134)]()[_0x4e69cd(0x1e4)]>0x0||this[_0x4e69cd(0x1a1)][_0x4e69cd(0x209)]?.[_0x4e69cd(0x263)]===_0x4e69cd(0x198),_0x1d3636=async({key:_0x4dc0cb,password:_0x5bad9b,repeat:_0x311b4a})=>{const _0x17dfd1=_0x4e69cd;if(!_0x379092){if(_0x5bad9b!==_0x311b4a)throw new Error(_0x17dfd1(0x20f));if(_0x5bad9b['length']<0x8)throw new Error(_0x17dfd1(0x106));}this['update']({'form':null});const _0x56403d=await this[_0x17dfd1(0x1ae)](_0x17dfd1(0xdc),_0x613524=>this[_0x17dfd1(0x119)][_0x17dfd1(0x197)](_0x5bad9b,_0x4dc0cb,_0x613524));_0x56403d&&(await this[_0x17dfd1(0xd9)](_0x56403d[_0x17dfd1(0x261)]),this['update']({'notice':'Wallet\x20ready.\x20Press\x20b\x20to\x20back\x20up\x20before\x20depositing\x20funds.'}));};if(_0x379092&&!_0xb930ca)return _0x1d3636({});this[_0x4e69cd(0x1e3)](_0xb930ca?'Import\x20private\x20key\x20\xB7\x20encrypted\x20locally':_0x4e69cd(0x19d),[..._0xb930ca?[{'name':_0x4e69cd(0x19c),'label':'Private\x20key\x20(hidden)','secret':!0x0}]:[],..._0x379092?[]:[{'name':_0x4e69cd(0x262),'label':_0x4e69cd(0x22d),'secret':!0x0},{'name':_0x4e69cd(0x13c),'label':'Confirm\x20password','secret':!0x0}]],_0x1d3636,{'submit':_0xb930ca?_0x4e69cd(0x180):'Create\x20wallet'});}[_0x4b3ed8(0xe3)](){const _0xceac38=_0x4b3ed8;this[_0xceac38(0x1e3)]('Restore\x20encrypted\x20wallet',[{'name':_0xceac38(0x105),'label':'Backup\x20file\x20path'},{'name':_0xceac38(0x262),'label':'Backup\x20password','secret':!0x0}],async({file:_0x423bd4,password:_0x491a8c})=>{const _0x3306a9=_0xceac38;this[_0x3306a9(0x1a5)]({'form':null});const _0xfa940=await this[_0x3306a9(0x1ae)](_0x3306a9(0x221),_0x31b653=>this[_0x3306a9(0x119)][_0x3306a9(0x246)](_0x423bd4,_0x491a8c,_0x31b653));_0xfa940&&await this[_0x3306a9(0xd9)](_0xfa940[_0x3306a9(0x261)]);},{'submit':_0xceac38(0x1f0)});}['walletBackup'](){const _0x3190e2=_0x4b3ed8,_0x1ec435=this[_0x3190e2(0x1c9)]()?.[_0x3190e2(0x261)]??this['state']['detail']?.[_0x3190e2(0x261)];_0x1ec435&&this[_0x3190e2(0x1e3)](_0x3190e2(0x257),[{'name':'out','label':_0x3190e2(0x1f7)}],async({out:_0x159a55})=>{const _0x350125=_0x3190e2;this['update']({'form':null});const _0x487909=await this[_0x350125(0x1ae)](_0x350125(0x19b),()=>this[_0x350125(0x119)]['backupWallet'](_0x159a55,_0x1ec435));_0x487909&&this['update']({'notice':_0x350125(0x14d)+_0x487909[_0x350125(0x165)]+_0x350125(0xcf)});},{'submit':'Save\x20backup'});}async['walletReceive'](){const _0x3b48ad=_0x4b3ed8,_0x22b34e=this[_0x3b48ad(0x1c9)]()?.[_0x3b48ad(0x261)]??this[_0x3b48ad(0x1a1)][_0x3b48ad(0x209)]?.['address'];_0x22b34e&&await this[_0x3b48ad(0x1ae)](_0x3b48ad(0x1ab),async()=>{const _0x16f1eb=_0x3b48ad;this[_0x16f1eb(0x1a5)]({'receive':await this[_0x16f1eb(0x119)]['receiveWallet'](_0x22b34e)});});}[_0x4b3ed8(0x175)](_0x51f8b5){const _0x2ea244=_0x4b3ed8,_0x52c1e2=_0x11d6f7(_0x51f8b5)['filter'](_0x3695b1=>!_0x3695b1[_0x2ea244(0x190)]);if(_0x52c1e2['length']<=0x1)return this['fundingReceive'](_0x51f8b5,_0x52c1e2[0x0]??_0x11d6f7(_0x51f8b5)[0x0]);const _0x809383={'dialog':this[_0x2ea244(0x1a1)]['confirm'],'scroll':this[_0x2ea244(0x1a1)][_0x2ea244(0x25a)]};this[_0x2ea244(0x1a5)]({'confirm':null}),this['showMenu'](_0x2ea244(0x1be),_0x52c1e2[_0x2ea244(0x21c)](_0xf7b805=>({'label':_0x28df1c(_0xf7b805),'run':()=>this[_0x2ea244(0xc4)](_0x51f8b5,_0xf7b805,_0x809383)})),{'onCancel':()=>this['update']({'confirm':_0x809383['dialog'],'scroll':_0x809383[_0x2ea244(0x25a)]})});}async[_0x4b3ed8(0xc4)](_0x12c7ef,_0x199e0e,_0x541cb6){const _0x514158=_0x4b3ed8,_0x555183=_0x541cb6?.['dialog']??this[_0x514158(0x1a1)][_0x514158(0x20d)],_0x4ec28e=_0x541cb6?.[_0x514158(0x25a)]??this[_0x514158(0x1a1)][_0x514158(0x25a)];try{const _0x5ac9d4=await this['services'][_0x514158(0x243)](_0x12c7ef[_0x514158(0x261)],_0x199e0e[_0x514158(0x19c)]);this['fundingDialog']={'dialog':_0x555183,'scroll':_0x4ec28e},this[_0x514158(0x1a5)]({'confirm':null,'receive':{..._0x5ac9d4,'targets':_0x3746eb(_0x199e0e)},'scroll':0x0,'error':null,'notice':null});}catch(_0x1d4242){this[_0x514158(0x1a5)]({'error':_0x1d4242['message'],..._0x541cb6?{'confirm':_0x555183,'scroll':_0x4ec28e}:{}});}}[_0x4b3ed8(0x1b3)](){const _0x359aff=_0x4b3ed8,_0x4a2c77=this['fundingDialog'];this[_0x359aff(0x1cc)]=null,this['update']({'receive':null,..._0x4a2c77?{'confirm':_0x4a2c77[_0x359aff(0x17b)],'scroll':_0x4a2c77[_0x359aff(0x25a)]}:{}});}[_0x4b3ed8(0x1b9)](){const _0x3ac86d=_0x4b3ed8,_0x53603c=this[_0x3ac86d(0x1a1)][_0x3ac86d(0x1d0)][_0x3ac86d(0x261)];this['showForm']('Save\x20recharge\x20QR\x20code',[{'name':_0x3ac86d(0x100),'label':'New\x20SVG\x20file\x20path','placeholder':_0x3ac86d(0x214)}],async({out:_0x1228e0})=>{const _0x2abcf7=_0x3ac86d,_0x371b5c=await this[_0x2abcf7(0x119)][_0x2abcf7(0x1db)](_0x53603c,_0x1228e0);this[_0x2abcf7(0x1a5)]({'form':null,'notice':_0x2abcf7(0x151)+_0x371b5c[_0x2abcf7(0x165)]});},{'submit':_0x3ac86d(0x1a9)});}['close'](){const _0x425672=_0x4b3ed8;clearTimeout(this[_0x425672(0x204)]),this['menuCancel']?.(),this[_0x425672(0x1bb)]=null,this[_0x425672(0x1c6)]?.(new Error(_0x425672(0xf3))),this['passwordReject']=null,_0x3ec757(),this[_0x425672(0x1a5)]({'form':null,'privateKeyView':null}),this['closed']=!0x0,this['operation']?.[_0x425672(0xc8)](),this[_0x425672(0x212)]?.[_0x425672(0xc8)](),this[_0x425672(0x1fa)]?.[_0x425672(0xc8)](),this['confirmResolve']?.(!0x1),this[_0x425672(0x1cc)]=null,this[_0x425672(0x250)]?.([]),++this[_0x425672(0x15c)],this[_0x425672(0x1d5)][_0x425672(0x234)]();}}export{_ as DashboardController,m as FILTERS,u as TABS,V as VIEWS,f as visibleItems};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "supercolony",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "description": "CLI for publishing and browsing IMD tasks and operating IMD workers",
5
5
  "type": "module",
6
6
  "bin": {