-
Notifications
You must be signed in to change notification settings - Fork 0
/
src__pages__PPP__AutoBurn.async.js
1 lines (1 loc) · 23.1 KB
/
src__pages__PPP__AutoBurn.async.js
1
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4082],{64317:function(e,t,r){var n=r(1413),s=r(91),a=r(22270),o=r(62435),c=r(66758),l=r(56499),i=r(86074),u=["fieldProps","children","params","proFieldProps","mode","valueEnum","request","showSearch","options"],d=["fieldProps","children","params","proFieldProps","mode","valueEnum","request","options"],p=function(e,t){var r=e.fieldProps,d=e.children,p=e.params,f=e.proFieldProps,m=e.mode,h=e.valueEnum,x=e.request,v=e.showSearch,g=e.options,b=(0,s.Z)(e,u),j=(0,o.useContext)(c.Z);return(0,i.jsx)(l.Z,(0,n.Z)((0,n.Z)({valueEnum:(0,a.h)(h),request:x,params:p,valueType:"select",filedConfig:{customLightMode:!0},fieldProps:(0,n.Z)({options:g,mode:m,showSearch:v,getPopupContainer:j.getPopupContainer},r),ref:t,proFieldProps:f},b),{},{children:d}))},f=o.forwardRef((function(e,t){var r=e.fieldProps,u=e.children,p=e.params,f=e.proFieldProps,m=e.mode,h=e.valueEnum,x=e.request,v=e.options,g=(0,s.Z)(e,d),b=(0,n.Z)({options:v,mode:m||"multiple",labelInValue:!0,showSearch:!0,suffixIcon:null,autoClearSearchValue:!0,optionLabelProp:"label"},r),j=(0,o.useContext)(c.Z);return(0,i.jsx)(l.Z,(0,n.Z)((0,n.Z)({valueEnum:(0,a.h)(h),request:x,params:p,valueType:"select",filedConfig:{customLightMode:!0},fieldProps:(0,n.Z)({getPopupContainer:j.getPopupContainer},b),ref:t,proFieldProps:f},g),{},{children:u}))})),m=o.forwardRef(p);m.SearchSelect=f,m.displayName="ProFormComponent",t.Z=m},52735:function(e,t,r){r.r(t);var n=r(19632),s=r.n(n),a=r(97857),o=r.n(a),c=r(15009),l=r.n(c),i=r(99289),u=r.n(i),d=r(5574),p=r.n(d),f=r(80059),m=r(40956),h=r(64119),x=r(87603),v=r(25035),g=r(98165),b=r(11774),j=r(38345),k=r(97269),w=r(64317),S=r(63434),N=r(31199),Z=r(52688),C=r(5966),y=r(59530),_=r(80507),P=r(45360),A=r(83062),F=r(7134),V=r(66309),T=r(15867),E=r(9669),L=r.n(E),Y=r(27484),M=r.n(Y),O=r(70178),D=r.n(O),q=r(62435),z=r(51409),R=r(86074);M().extend(D());var H=[];t.default=function(){var e=(0,y.useDispatch)(),t=P.ZP.useMessage(),r=p()(t,2),n=r[0],a=r[1],c=(0,y.useSelector)((function(e){return e.global.contractKit})),i=(0,y.useSelector)((function(e){return e.global.account})),d=(0,y.useSelector)((function(e){return e.global.session})),E=(0,y.useSelector)((function(e){return e.global.privateKey})),Y=(0,y.useSelector)((function(e){return e.ppp.valueEnum})),O=(0,y.useSelector)((function(e){return e.ppp.projects})),D=(0,y.useSelector)((function(e){return e.ppp.accessAccounts})),I=(0,q.useState)(0),W=p()(I,2),$=W[0],J=W[1],K=(0,q.useState)(0),U=p()(K,2),G=U[0],Q=U[1],B=(0,q.useState)(0),X=p()(B,2),ee=X[0],te=X[1],re=(0,q.useState)(0),ne=p()(re,2),se=ne[0],ae=ne[1],oe=(0,q.useState)(0),ce=p()(oe,2),le=ce[0],ie=ce[1],ue=(0,q.useState)([]),de=p()(ue,2),pe=de[0],fe=de[1],me=(0,q.useState)(0),he=p()(me,2),xe=he[0],ve=he[1],ge=(0,q.useState)(!1),be=p()(ge,2),je=be[0],ke=be[1],we=(0,q.useState)({}),Se=p()(we,2),Ne=Se[0],Ze=Se[1],Ce=(0,q.useState)({}),ye=p()(Ce,2),_e=ye[0],Pe=ye[1],Ae=(0,q.useState)(!1),Fe=p()(Ae,2),Ve=Fe[0],Te=Fe[1],Ee=(0,q.useState)(!1),Le=p()(Ee,2),Ye=Le[0],Me=Le[1],Oe=(0,q.useState)(!1),De=p()(Oe,2),qe=De[0],ze=De[1],Re=(0,q.useState)(!1),He=p()(Re,2),Ie=He[0],We=He[1],$e=(0,q.useState)([]),Je=p()($e,2),Ke=Je[0],Ue=Je[1],Ge=(0,q.useState)(!1),Qe=p()(Ge,2),Be=Qe[0],Xe=Qe[1],et=(0,y.useIntl)(),tt=et.formatMessage({id:"coffee.inputException"}),rt=et.formatMessage({id:"msig.intlTransactionEmpty"}),nt=et.formatMessage({id:"common.intlPleaseConnectWallet"}),st=et.formatMessage({id:"common.intlPleaseConnectNetwork"}),at=(0,q.useRef)([]),ot=(0,q.useRef)(!1),ct=(0,q.useRef)({}),lt=(0,q.useRef)(),it=(0,q.useRef)(0),ut=(0,q.useRef)(!0),dt=(0,q.useCallback)((function(){var e=0,t=0,r=0,n=0;for(var s in ct.current)"success"===ct.current[s].status?t+=1:"error"===ct.current[s].status?r+=1:"processing"===ct.current[s].status?n+=1:"default"===ct.current[s].status&&(e+=1);J(t),Q(r),te(n),ae(e)}),[]),pt=(0,q.useCallback)((function(e){var t=M()(e).valueOf();ve(t)}),[]),ft=(0,q.useCallback)(function(){var e=u()(l()().mark((function e(t){var r,n;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=[],n=M()().format("YYYY-MM-DDTHH:mm:ss.SSS"),H.push({time:n}),t.forEach((function(e){if("success"!==ct.current[e.cid].status&&"processing"!==ct.current[e.cid].status&&("error"!==ct.current[e.cid].status||!ct.current[e.cid].message.includes("asset not found"))){var t=new Promise((function(t){ct.current[e.cid].status="processing",dt(),d.client.v1.chain.push_transaction(e.signedTransaction).then((function(r){r&&r.processed&&"executed"===r.processed.receipt.status?(ct.current[e.cid].status="success",dt(),t(!0)):("success"!==ct.current[e.cid].status&&(ct.current[e.cid].status="error",H.push({cid:e.cid,error:JSON.stringify(r),pos:"then"}),console.log(r),dt()),t(!1))})).catch((function(r){if("success"!==ct.current[e.cid].status){if(ct.current[e.cid].status="error",dt(),H.push({cid:e.cid,error:JSON.stringify(r),pos:"catch"}),r instanceof Error)if(r.message.includes("eosio_assert_message assertion failure"))r.details[0].message.includes("asset not found")&&(ct.current[e.cid].message="asset not found");console.log(r)}t(!1)}))}));r.push(t)}}));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),[d,dt]),mt=(0,q.useCallback)(function(){var e=u()(l()().mark((function e(t){var r,s,a,o,u,p,f,m,x,v,g,b,j,k,w,S,N,Z,C,y,P,A,F,V,T,E;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,d&&d.broadcast){e.next=6;break}return n.error("".concat(nt)),e.abrupt("return");case 6:if(i){e.next=9;break}return n.error("".concat(st)),e.abrupt("return");case 9:if("owner"===(p=d.permissionLevel.permission.toString())||"active"===p){e.next=13;break}return n.error("permission权限必须是owner或者active"),e.abrupt("return");case 13:if(Me(!0),f=t.pidAuto,0!==(m=t.burnAuto).length){e.next=19;break}return n.error("请选择图片"),Me(!1),e.abrupt("return");case 19:return x=Number(f.split("-")[1]),e.next=22,c.load("dfs3protocol");case 22:return v=e.sent,g=v.table("projects"),e.next=26,g.all({scope:"dfs3protocol",from:x,to:x});case 26:for(b=e.sent,j=b[0],k=j.token_per_nft.value,w=j.token_per_nft.symbol,S=0,N=0;N<m.length;++N)S+=k;return Z=_.xR.from(S,w).toString(),null===(r=lt.current)||void 0===r||r.setFieldValue("amountAuto",Z),C=m[0],y=m[m.length-1],P=Ke.filter((function(e){return e.value===C}))[0].time,A=M()(P).valueOf(),F=Ke.filter((function(e){return e.value===y}))[0].time,V=M()(F).valueOf(),T=Math.ceil((V-A)/1e3),pt(P),null===(s=lt.current)||void 0===s||s.setFieldValue("startTime",P),null===(a=lt.current)||void 0===a||a.setFieldValue("endTime",F),E=T+10+Math.ceil(T/60),null===(o=lt.current)||void 0===o||o.setFieldValue("repeatSend",E),null===(u=lt.current)||void 0===u||u.setFieldValue("intervalSend",1e3),ot.current=!1,We(!0),Me(!1),e.abrupt("return",!0);case 53:e.prev=53,e.t0=e.catch(0),Me(!1),(0,h.Tv)(e.t0,n,"handleFinishAuto");case 57:case"end":return e.stop()}}),e,null,[[0,53]])})));return function(t){return e.apply(this,arguments)}}(),[pt,i,c,d,Ke]),ht=(0,q.useCallback)((function(){var e,t=at.current;if(0===t.length)return n.error(rt),console.log(rt),!1;var r=null===(e=lt.current)||void 0===e?void 0:e.getFieldsValue(),s=r.repeatAuto,a=r.intervalAuto;try{console.log("handleCountDownFinishAuto",M()().format()),H.push({position:"handleCountDownFinishAuto",time:M()().format()}),ft(t);for(var o=1;o<s;o++)(0,z.iK)(ft,a*o,t);return!0}catch(e){(0,h.Tv)(e,n,"handleCountDownFinishAuto")}}),[pe,ft]),xt=(0,q.useCallback)((function(){var e;null===(e=lt.current)||void 0===e||e.resetFields(),Q(0),J(0),te(0),ae(0),fe([]),ve(0),ct.current={},Pe({}),Ze({}),ie(0),dt(),ot.current=!1,ut.current=!0}),[dt]),vt=(0,q.useCallback)(function(){var t=u()(l()().mark((function t(r){var s,a,o,c,i,u,d,p,f,x;return l()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,r.load("dfs3protocol");case 3:return a=t.sent,o=a.table("projects"),c=a.table("stat"),t.next=8,o.all({scope:"dfs3protocol"});case 8:return i=t.sent,t.next=11,c.all({scope:"dfs3protocol"});case 11:return u=t.sent,t.next=14,L().get("https://api.dfs.land/dfschain/pppvolume2");case 14:200!==(d=t.sent).status&&n.error("获取pppvolume2数据失败"),p=d.data,f=[],i.forEach((function(e){p.hasOwnProperty(e.id.toString())&&f.push(e)})),f.sort((function(e,t){var r=e.id.toString(),n=t.id.toString();return p[n].volume_24h-p[r].volume_24h})),x={},f.forEach((function(e){var t=e.nft_img,r=e.id.toString(),n=e.project_name,s=e.creator.toString();x["pid-"+r]="".concat(r,"-").concat(n,"-").concat(s,"-").concat(t)})),null===(s=lt.current)||void 0===s||s.setFieldValue("pidAuto",""),e(m.N.setValueEnum(x)),e(m.N.setProjects(i)),e(m.N.setStats(u)),ze(!1),t.next=33;break;case 29:t.prev=29,t.t0=t.catch(0),ze(!1),(0,h.Tv)(t.t0,n,"handleValueEnum");case 33:case"end":return t.stop()}}),t,null,[[0,29]])})));return function(e){return t.apply(this,arguments)}}(),[]),gt=(0,q.useCallback)((function(){return d&&d.broadcast?i?(ze(!0),void vt(c)):(n.error("".concat(st)),!1):(n.error("".concat(nt)),!1)}),[d,i,vt,c]),bt=(0,q.useCallback)(u()(l()().mark((function e(){var t,r,s,a,o;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(pe.length){e.next=2;break}return e.abrupt("return");case 2:return e.prev=2,Te(!0),t={},r=[],s=Ne.pid,e.next=9,d.client.v1.chain.get_table_rows({code:"dfs3protocol",table:"registry",scope:"dfs3protocol",key_type:"name",index_position:"tertiary",lower_bound:i.accountName,upper_bound:i.accountName,limit:2e3});case 9:a=e.sent,a.rows.filter((function(e){return e.pid===s})).forEach((function(e){r.push(e.cid)})),o=0,pe.forEach((function(e){var n=e.cid;r.includes(n)?t[n]="default":(t[n]="success",o+=1)})),ie(o),Pe(t),Te(!1),e.next=23;break;case 19:e.prev=19,e.t0=e.catch(2),Te(!1),(0,h.Tv)(e.t0,n,"handleCheckOwnCountAuto");case 23:case"end":return e.stop()}}),e,null,[[2,19]])}))),[c,n,Ne,pe,d]),jt=(0,q.useCallback)(function(){var e=u()(l()().mark((function e(t){var r,n,s,a,o,c,u;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.hasOwnProperty("pidAuto")){e.next=15;break}return Xe(!0),n=Number(t.pidAuto.split("-")[1]),e.next=5,d.client.v1.chain.get_table_rows({code:"dfs3protocol",table:"registry",scope:"dfs3protocol",key_type:"name",index_position:"tertiary",lower_bound:i.accountName,upper_bound:i.accountName,limit:2e3});case 5:s=e.sent,(a=s.rows.filter((function(e){return e.pid===n}))).sort((function(e,t){return e.last_trade.localeCompare(t.last_trade)})),o=O.filter((function(e){return e.id.toNumber()===n}))[0],c=o.sec_to_burn_nft.toNumber(),u=[],a.forEach((function(e){var t=e.id.toString(),r=e.cid.toString(),n=M().utc(e.last_trade).add(c,"seconds").local().format("YYYY-MM-DDTHH:mm:ss");u.push({label:(0,R.jsxs)("div",{className:"flex justify-between w-[300px]",children:[(0,R.jsxs)("div",{children:["#",r]}),(0,R.jsxs)("div",{children:["销毁时间:",n]})]}),value:t+"-"+r,time:n})})),Xe(!1),Ue(u),null===(r=lt.current)||void 0===r||r.setFieldValue("burnAuto",[]);case 15:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),[i,d,O]),kt=(0,q.useCallback)(u()(l()().mark((function e(){var t,r,a,u,f,m,x,v,g,b,j,k,w,S,N,Z,C,y,P,A,F,V,T,L,Y,O,D,q,z,R,H,I,W;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,d&&d.broadcast){e.next=7;break}return n.error("".concat(nt)),console.log(nt),e.abrupt("return");case 7:if(i){e.next=11;break}return n.error("".concat(st)),console.log(st),e.abrupt("return");case 11:if("owner"===(a=d.permissionLevel.permission.toString())||"active"===a){e.next=16;break}return n.error("permission权限必须是owner或者active"),console.log("permission权限必须是owner或者active"),e.abrupt("return");case 16:if(Me(!0),u=null===(t=lt.current)||void 0===t?void 0:t.getFieldsValue(),f=u.pidAuto,m=u.burnAuto,x=u.sellAuto,0!==m.length){e.next=21;break}return n.error("请选择图片"),e.abrupt("return");case 21:return v=Number(f.split("-")[1]),g=d.actor.toString(),e.next=25,c.load("dfs3protocol");case 25:return b=e.sent,j=b.table("projects"),e.next=29,j.all({scope:"dfs3protocol",from:v,to:v});case 29:return k=e.sent,w=k[0],S=w.token_per_nft.toString(),N=w.token_per_nft.value,Z=w.token_per_nft.symbol,C=w.mid.toNumber(),y=w.creator.toString(),P=w.project_name,A=w.nft_name,F={account:"dfsfreecpu11",name:"freecpu",authorization:[{actor:"dfs.service",permission:"cpu"},d.permissionLevel],data:h._9.from({user:g})},V=_.aU.from(F),e.next=42,d.client.v1.chain.get_info();case 42:T=e.sent,L=T.getTransactionHeader(),Y=M()(),O=[],D={},q="",z=0,R=l()().mark((function e(t){var r,a,c,i,u,f,v,b,j,k,w,Z,y,P,A,F,T,R,H;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=m[t].split("-"),a=Number(r[0]),c=Number(r[1]),i=Ke.filter((function(e){return e.value===m[t]}))[0].time,q=M()(Y).add(3600-t,"seconds").utc().format("YYYY-MM-DDTHH:mm:ss"),z+=N,u={account:"dfs3protocol",name:"burn",authorization:[d.permissionLevel],data:h.g_.from({assetid:a})},f=_.aU.from(u),v=S,b="swap:".concat(C,":0"),j={account:"dfsppptokens",name:"transfer",authorization:[d.permissionLevel],data:h.FE.from({from:g,to:"swapswapswap",quantity:v,memo:b})},k=_.aU.from(j),y=[],P=[],P=x?[V,f,k]:[V,f],w=_.YW.from(o()(o()({},L),{},{expiration:q,actions:P})),y[0]=E.signDigest(w.signingDigest(d.chain.id.toString())),e.next=19,(0,h.zI)(d.transact({transaction:w},{broadcast:!1,transactPlugins:[]}));case 19:if(A=e.sent,F=p()(A,2),T=F[0],R=F[1],!T){e.next=28;break}return n.error(T),Me(!1),console.log(T),e.abrupt("return",{v:!1});case 28:Z=_.uQ.from(o()(o()({},w),{},{signatures:[].concat(y,s()(R.signatures))})),H=a,D[c]={status:"default",message:""},O.push({signedTransaction:Z,cid:c,nftid:H,amount:N,from:g,burn_time:i});case 32:case"end":return e.stop()}}),e)})),I=0;case 51:if(!(I<m.length)){e.next=59;break}return e.delegateYield(R(I),"t0",53);case 53:if(!(H=e.t0)){e.next=56;break}return e.abrupt("return",H.v);case 56:++I,e.next=51;break;case 59:W=_.xR.from(z,Z).toString(),null===(r=lt.current)||void 0===r||r.setFieldValue("amountAuto",W),ct.current=D,Pe({}),Q(0),J(0),te(0),ae(O.length),fe(O),at.current=O,ie(0),Ze({pid:v,creator:y,nft_name:A,project_name:P}),ie(0),n.success("创建完成"),Me(!1),console.log("创建完成"),e.next=82;break;case 77:e.prev=77,e.t1=e.catch(0),Me(!1),(0,h.Tv)(e.t1,n,"handleCreateTransactions"),console.log(e.t1);case 82:case"end":return e.stop()}}),e,null,[[0,77]])}))),[c,d,i,Ke]),wt=(0,q.useCallback)((function(e){var t;e<18e5&&!ot.current&&(ot.current=!0,kt());var r=null===(t=lt.current)||void 0===t?void 0:t.getFieldValue("leadTimeAuto");r&&e<r&&ut.current&&(ut.current=!1,ft(at.current),console.log(M()().format(),"handleCountdownChangeAuto",e),H.push({position:"handleCountdownChangeAuto",time:M()().format(),value:e}))}),[kt,ft]),St=(0,q.useCallback)((function(){We(!1),ve(0),(0,z.gr)(it.current),ut.current=!0}),[]),Nt=(0,q.useCallback)((function(){if(je){if(i){var e=i.accountName.toString();return!!D.includes(e)||(ke(!1),!1)}return!0}if(i){var t=i.accountName.toString();return!!D.includes(t)&&(ke(!0),!0)}return!1}),[i,je,D]),Zt=(0,q.useCallback)((function(){var e=M()().format("YYYY-MM-DDTHH:mm:ss"),t=JSON.stringify(H,null,2),r="data:,".concat(t),n=document.createElement("a");n.href=r,n.download="log_".concat(e,".json"),n.click()}),[]),Ct=(0,q.useCallback)((function(){var e,t,r;Q(0),J(0),te(0),ae(0),fe([]),ve(0),ct.current={},Pe({}),Ze({}),ie(0),dt(),ot.current=!1,ut.current=!0,null===(e=lt.current)||void 0===e||e.setFieldValue("startTime",""),null===(t=lt.current)||void 0===t||t.setFieldValue("endTime",""),null===(r=lt.current)||void 0===r||r.setFieldValue("amountAuto","")}),[dt]);return(0,q.useEffect)((function(){!c||Object.keys(Y).length||qe||(ze(!0),vt(c))}),[vt,Y,c,qe]),(0,q.useEffect)((function(){return function(){(0,z.gr)(it.current)}}),[]),(0,R.jsx)(b._z,{className:"",ghost:!0,children:Nt()?(0,R.jsxs)("div",{className:"flex flex-wrap justify-center gap-5",children:[(0,R.jsxs)(j.Z,{title:(0,R.jsx)("div",{className:" font-semibold text-lg hardline",children:"使用说明"}),style:{maxWidth:"500px"},children:[(0,R.jsx)("div",{children:"1. 操作步骤如下:"}),(0,R.jsxs)("div",{className:"ml-3",children:['a)进入"工具-简易钱包"页面 ',(0,R.jsx)(x.Z,{})," ","导入私钥 ",(0,R.jsx)(x.Z,{})," 点击右上角钱包图标"," ",(0,R.jsx)(x.Z,{})," 选择账号进行连接;"]}),(0,R.jsxs)("div",{className:"ml-3",children:['b)进入"PPP-自动销毁"页面 ',(0,R.jsx)(x.Z,{})," ",'选择"自动交易"表格 ',(0,R.jsx)(x.Z,{})," 选择项目"," ",(0,R.jsx)(x.Z,{})," 选择图片 ",(0,R.jsx)(x.Z,{})," ","点击启动按钮"]}),(0,R.jsx)("div",{className:"mt-3",children:"2. 注意事项:"}),(0,R.jsx)("div",{className:"ml-3",children:"a)自动交易方式需要用户导入私钥才可以正常执行。私钥只保存在浏览器的数据库中,不会上传到服务器,请评估好风险后再使用;"}),(0,R.jsx)("div",{className:"ml-3",children:"b)每次切换账号前,都需要先断开账号的连接。"}),(0,R.jsx)("div",{className:"mt-3",children:"3. 费用说明:"}),(0,R.jsx)("div",{className:"ml-3",children:"免费使用。"})]}),(0,R.jsxs)(j.Z,{title:(0,R.jsxs)("div",{className:" font-semibold text-lg hardline",children:["自动交易",(0,R.jsx)(A.Z,{placement:"topLeft",title:'需要在"工具-简易钱包"页面中导入私钥,然后点击右上角的钱包图标进行连接后,才能正常使用',children:(0,R.jsx)(v.Z,{className:"ml-[8px] hover:cursor-pointer",style:{color:"#1677ff"}})})]}),style:{maxWidth:"500px"},children:[(0,R.jsxs)(k.A,{formRef:lt,onFinish:mt,onValuesChange:jt,onReset:xt,loading:Ye,disabled:Ie,layout:"vertical",initialValues:{startAuto:1,repeatAuto:10,intervalAuto:1e3,leadTimeAuto:0,sellAuto:!0},submitter:{searchConfig:{submitText:"启动"},render:function(e,t){return[t[1],t[0]]}},children:[(0,R.jsx)(w.Z,{name:"pidAuto",label:(0,R.jsxs)("div",{children:["项目",(0,R.jsx)(g.Z,{spin:qe,className:"ml-[8px] hover:cursor-pointer",style:{color:"#1677ff"},onClick:gt})]}),valueEnum:Y,placeholder:"",rules:[{required:!0,whitespace:!0,message:"".concat(tt),pattern:/^.+$/}],fieldProps:{size:"large",autoFocus:!1,showSearch:!0,onChange:Ct,filterOption:function(e,t){var r=t.label.split("-"),n=p()(r,3),s=n[0],a=n[1],o=n[2];return(s.padStart(3,"0")+a+o).toLowerCase().includes(e.toLowerCase())},optionItemRender:function(e){var t=e.label.split("-"),r=p()(t,4),n=r[0],s=r[1],a=r[2],o=r[3];return(0,R.jsxs)("div",{className:"flex items-center",children:[(0,R.jsx)("div",{className:"mr-2",children:n.padStart(3,"0")}),(0,R.jsx)(F.C,{className:"mr-2",size:"default",src:o}),(0,R.jsxs)("div",{children:[s," @",a]})]})}}}),(0,R.jsx)(S.Z.Group,{name:"burnAuto",label:(0,R.jsxs)("div",{children:[(0,R.jsx)("span",{children:"图片 "}),Ke.length?"(".concat(Ke.length,")"):"",(0,R.jsx)(g.Z,{spin:Be,className:"ml-[5px]",style:{color:"#1677ff"}})]}),options:Ke,rules:[{required:!0,whitespace:!0,message:"".concat(tt),pattern:/.*/}]}),(0,R.jsx)(N.Z,{label:(0,R.jsxs)("div",{children:["整体重复发送次数",(0,R.jsx)(A.Z,{placement:"topLeft",title:"整体全部发送完成算一次,这里指定重复次数。重复发送失败了,不会影响金额",children:(0,R.jsx)(v.Z,{className:"ml-[8px] hover:cursor-pointer",style:{color:"#1677ff"}})})]}),name:"repeatAuto",placeholder:"",min:1,rules:[{required:!0,message:"".concat(tt),whitespace:!0,pattern:/^\d+$/}],fieldProps:{autoFocus:!1,size:"large",defaultValue:10}}),(0,R.jsx)(N.Z,{label:(0,R.jsxs)("div",{children:["整体重复发送间隔(毫秒)",(0,R.jsx)(A.Z,{placement:"topLeft",title:"整体全部发送完成算一次,这里指定重复的间隔时间",children:(0,R.jsx)(v.Z,{className:"ml-[8px] hover:cursor-pointer",style:{color:"#1677ff"}})})]}),name:"intervalAuto",placeholder:"",min:300,rules:[{required:!0,message:"".concat(tt),whitespace:!0,pattern:/^\d+$/}],fieldProps:{autoFocus:!1,size:"large",defaultValue:1e3}}),(0,R.jsx)(N.Z,{label:(0,R.jsxs)("div",{children:["提前发送时间(毫秒)",(0,R.jsx)(A.Z,{placement:"topLeft",title:"在下一轮开始前多少毫秒发送交易",children:(0,R.jsx)(v.Z,{className:"ml-[8px] hover:cursor-pointer",style:{color:"#1677ff"}})})]}),name:"leadTimeAuto",placeholder:"",max:2e3,min:0,rules:[{required:!0,message:"".concat(tt),whitespace:!0,pattern:/^\d+$/}],fieldProps:{autoFocus:!1,size:"large",defaultValue:0}}),(0,R.jsx)(Z.Z,{name:"sellAuto",label:(0,R.jsxs)("div",{children:["销毁并卖出",(0,R.jsx)(A.Z,{placement:"topLeft",title:"销毁获得代币后,是否立即卖出",children:(0,R.jsx)(v.Z,{className:"ml-[8px] hover:cursor-pointer",style:{color:"#1677ff"}})})]}),rules:[{required:!0,message:"".concat(tt),whitespace:!0,pattern:/^true|false$/}],fieldProps:{autoFocus:!1,defaultValue:!0}}),(0,R.jsx)(C.Z,{name:"startTime",label:(0,R.jsxs)("div",{children:["开始时间",(0,R.jsx)(A.Z,{placement:"topLeft",title:"销毁程序开始时间",children:(0,R.jsx)(v.Z,{className:"ml-[8px] hover:cursor-pointer",style:{color:"#1677ff"}})})]}),placeholder:"自动生成,无需输入",fieldProps:{size:"large",autoFocus:!1,defaultValue:"",readOnly:!0}}),(0,R.jsx)(C.Z,{name:"endTime",label:(0,R.jsxs)("div",{children:["结束时间",(0,R.jsx)(A.Z,{placement:"topLeft",title:"销毁程序结束时间",children:(0,R.jsx)(v.Z,{className:"ml-[8px] hover:cursor-pointer",style:{color:"#1677ff"}})})]}),placeholder:"自动生成,无需输入",fieldProps:{size:"large",autoFocus:!1,defaultValue:"",readOnly:!0}}),(0,R.jsx)(C.Z,{name:"amountAuto",label:(0,R.jsx)("div",{children:"销毁所得代币总量"}),placeholder:"自动生成,无需输入",fieldProps:{size:"large",autoFocus:!1,defaultValue:"",readOnly:!0}}),(0,R.jsx)(k.A.Item,{label:(0,R.jsxs)("div",{className:" font-semibold text-lg ",children:[(0,R.jsx)("span",{className:"hardline",children:"倒计时 "}),Ne.pid?"(".concat(Ne.pid,"-").concat(Ne.project_name," @").concat(Ne.creator,")"):""]}),children:(0,R.jsx)("div",{className:"flex items-center gap-x-5",children:(0,R.jsx)(f.Wo,{className:"text-2xl",value:xe,onFinish:ht,onChange:wt})})}),(0,R.jsxs)(k.A.Item,{label:(0,R.jsxs)("div",{className:" font-semibold text-lg hardline",children:[(0,R.jsx)("span",{children:"结果 "}),pe.length?"(".concat(pe.length,")"):""]}),children:[(0,R.jsx)("div",{children:"成功:".concat($,",失败:").concat(G,",处理中:").concat(ee,",待处理:").concat(se)}),!!pe.length&&(0,R.jsx)("div",{className:"flex flex-wrap gap-5 mt-3",children:Object.keys(ct.current).map((function(e,t){return(0,R.jsx)(V.Z,{color:ct.current[e].status,children:"#".concat(e)},t)}))})]}),(0,R.jsxs)(k.A.Item,{label:(0,R.jsx)("div",{className:" font-semibold text-lg hardline",children:(0,R.jsxs)("div",{children:[(0,R.jsx)("span",{children:"校对 "}),pe.length?"(".concat(pe.length,")"):"",(0,R.jsx)(A.Z,{placement:"topLeft",title:"交易结束后,可点击校对按钮,判断交易结果是否跟链上数据匹配",children:(0,R.jsx)(v.Z,{className:"ml-[8px] hover:cursor-pointer",style:{color:"#1677ff"}})})]})}),children:[(0,R.jsx)("div",{children:"拥有:".concat(le)}),!!pe.length&&(0,R.jsx)("div",{className:"flex flex-wrap gap-5 mt-3",children:Object.keys(_e).map((function(e,t){return(0,R.jsx)(V.Z,{color:_e[e],children:"#".concat(e)},t)}))})]})]}),(0,R.jsxs)("div",{className:"mt-2 ",children:[(0,R.jsx)(T.ZP,{type:"primary",className:"mr-2",onClick:St,children:"停止"}),(0,R.jsx)(T.ZP,{className:"mr-2",loading:Ve,onClick:bt,children:"校对"}),(0,R.jsx)(T.ZP,{onClick:Zt,children:"日志"}),","]})]}),a]}):(0,R.jsx)("div",{children:"此工具为收费功能,有需要请联系开发者。"})})}}}]);