-
Notifications
You must be signed in to change notification settings - Fork 0
/
2320.async.js
1 lines (1 loc) · 39.4 KB
/
2320.async.js
1
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2320],{42320:function(e,t,n){n.d(t,{Wo:function(){return p},ox:function(){return P},kh:function(){return _},Wr:function(){return z},tw:function(){return U},SX:function(){return $},Um:function(){return pe},DL:function(){return se}});var r=n(62435),a=n(5574),o=n.n(a),s=[["Y",31536e6],["M",2592e6],["D",864e5],["H",36e5],["m",6e4],["s",1e3],["S",1]];function c(e,t){var n=t.format,r=void 0===n?"":n,a=new Date(e).getTime(),c=Date.now();return function(e,t){var n=e,r=/\[[^\]]*]/g,a=(t.match(r)||[]).map((function(e){return e.slice(1,-1)})),c=t.replace(r,"[]"),i=s.reduce((function(e,t){var r=o()(t,2),a=r[0],s=r[1];if(e.includes(a)){var c=Math.floor(n/s);return n-=c*s,e.replace(new RegExp("".concat(a,"+"),"g"),(function(e){var t=e.length;return c.toString().padStart(t,"0")}))}return e}),c),u=0;return i.replace(r,(function(){var e=a[u];return u+=1,e}))}(Math.max(a-c,0),r)}var i=n(75633),u=n(51409),l=n(86074);var d=function(e){var t=e.value,n=e.format,a=void 0===n?"HH:mm:ss":n,o=e.onChange,s=e.onFinish,d=e.className,p=(0,i.N)(),f=r.useRef(null),x=function(){var e=function(e){return new Date(e).getTime()}(t);e>=Date.now()&&(f.current=(0,u.Zi)((function(){p(),null==o||o(e-Date.now()),e<Date.now()&&(null==s||s(),f.current&&((0,u.cv)(f.current),f.current=null))}),33.333333333333336))};return r.useEffect((function(){return x(),function(){f.current&&((0,u.cv)(f.current),f.current=null)}}),[t]),(0,l.jsx)("div",{className:d,children:c(t,{format:a})})},p=r.memo(d),f=n(15009),x=n.n(f),m=n(99289),h=n.n(m),k=n(64119),v=n(25035),y=n(37476),b=n(31199),j=n(63434),g=n(5966),S=n(90672),w=n(59530),N=n(45360),I=n(83062),R=n(27484),C=n.n(R),F=r.forwardRef((function(e,t){var n=N.ZP.useMessage(),a=o()(n,2),s=a[0],c=a[1],i=(0,w.useSelector)((function(e){return e.global.session})),u=(0,w.useSelector)((function(e){return e.global.account})),d=(0,w.useSelector)((function(e){return e.ppp.projectNft})),p=(0,w.useSelector)((function(e){return e.ppp.projectLastRound})),f=(0,r.useState)([]),m=o()(f,2),R=m[0],F=m[1],P=(0,w.useIntl)(),D=P.formatMessage({id:"coffee.inputException"}),M=P.formatMessage({id:"common.intlPleaseConnectWallet"}),T=P.formatMessage({id:"common.intlPleaseConnectNetwork"}),Z=P.formatMessage({id:"common.intlTransferSuccess"}),_=P.formatMessage({id:"common.intlTransferFail"}),E=(0,r.useRef)(),O=(0,r.useState)(!1),z=o()(O,2),A=z[0],V=z[1],H=(0,r.useCallback)(function(){var e=h()(x()().mark((function e(t){var n,r,a,o,c,u,f,m,h,v,y,b;return x()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,o=0,c=5,u=[],f=[],m=[],h={},v=p.value,d.forEach((function(e){var t=C().utc(e.last_trade).local().valueOf(),n=e.owner;t<v||(h.hasOwnProperty(n)||(h[n]=0),h[n]+=1,o+=1)})),!t){e.next=13;break}c=t,e.next=18;break;case 13:return o<300?c=5:o>=300&&o<600?c=10:o>=600&&o<1200?c=20:o>=1200&&o<2400?c=40:o>=2400&&(c=80),e.next=16,i.client.v1.chain.get_currency_balance("dfsppptokens","dogsbouns123","DOGS");case 16:b=e.sent,null===(y=E.current)||void 0===y||y.setFieldValue("balance",b[0].toString());case 18:Object.keys(h).forEach((function(e){h[e]>=c&&u.push({account:e,count:h[e]})})),u.sort((function(e,t){return t.count-e.count})),u.forEach((function(e){m.push(e.account),f.push({label:(0,l.jsxs)("div",{className:"flex justify-between w-[300px]",children:[(0,l.jsx)("div",{children:e.account}),(0,l.jsx)("div",{children:e.count})]}),value:e.account})})),F(f),null===(n=E.current)||void 0===n||n.setFieldValue("accounts",m),null===(r=E.current)||void 0===r||r.setFieldValue("count",o),null===(a=E.current)||void 0===a||a.setFieldValue("condition",c),e.next=30;break;case 27:e.prev=27,e.t0=e.catch(0),(0,k.Tv)(e.t0,s);case 30:case"end":return e.stop()}}),e,null,[[0,27]])})));return function(t){return e.apply(this,arguments)}}(),[i,d,p]),Y=(0,r.useCallback)((function(){V(!0),H()}),[H]);(0,r.useImperativeHandle)(t,(function(){return{handleOpen:Y}}));var q=(0,r.useCallback)(function(){var e=h()(x()().mark((function e(t){var n,r,a,c,l,d,p,f;return x()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i&&i.broadcast){e.next=5;break}return s.error("".concat(M)),e.abrupt("return");case 5:if(u){e.next=8;break}return s.error("".concat(T)),e.abrupt("return");case 8:return n=t.accounts,r=t.memo,a=r?r.trim():"",c=[],n.forEach((function(e){c.push({account:"dfsppptokens",name:"transfer",authorization:[i.permissionLevel],data:{from:i.actor,to:e,quantity:"1.00000000 DOGS",memo:a}})})),e.next=14,(0,k.zI)(i.transact({actions:c}));case 14:if(l=e.sent,d=o()(l,2),p=d[0],f=d[1],!p){e.next=23;break}return s.error(p),e.abrupt("return");case 23:if(!f||!f.response){e.next=27;break}s.success("".concat(Z)),e.next=29;break;case 27:return s.error("".concat(_)),e.abrupt("return");case 29:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),[u,i]),U=(0,r.useCallback)((function(e){if(e.hasOwnProperty("condition")){var t,n=null===(t=E.current)||void 0===t?void 0:t.getFieldValue("condition");H(n)}}),[H]);return(0,l.jsxs)(y.Y,{formRef:E,title:"DOGS抢图奖励",open:A,onFinish:q,onOpenChange:function(e){V(e)},onValuesChange:U,initialValues:{count:0},layout:"vertical",width:"400px",modalProps:{destroyOnClose:!0,style:{top:25}},submitter:{searchConfig:{submitText:"发送"}},children:[(0,l.jsx)(b.Z,{name:"count",label:"当前NFT总量",placeholder:"自动生成,无需输入",fieldProps:{size:"large",autoFocus:!1,defaultValue:0,readOnly:!0}}),(0,l.jsx)(b.Z,{name:"condition",label:(0,l.jsxs)("div",{children:["奖励条件 (大于等于)",(0,l.jsx)(I.Z,{placement:"topLeft",title:"图片如果到了拆分点没有拆分,当前轮会计算在内,但下一轮则不会计算。图片如果在当前轮没有卖出,下一轮也不会计算在内",children:(0,l.jsx)(v.Z,{className:"ml-[8px] hover:cursor-pointer",style:{color:"#1677ff"}})})]}),placeholder:"持有图片数量",min:5,rules:[{required:!0,message:"".concat(D),whitespace:!0,pattern:/^\d+$/}],fieldProps:{autoFocus:!0,size:"large"}}),(0,l.jsx)(j.Z.Group,{name:"accounts",label:(0,l.jsxs)("div",{children:[(0,l.jsx)("span",{children:"获奖账号 "}),R.length?"(".concat(R.length,")"):""]}),options:R,rules:[{required:!0,whitespace:!0,message:"".concat(D),pattern:/.*/}]}),(0,l.jsx)(g.Z,{name:"balance",label:"奖励账号余额 (dogsbouns123)",placeholder:"自动生成,无需输入",fieldProps:{size:"large",autoFocus:!1,defaultValue:"",readOnly:!0}}),(0,l.jsx)(S.Z,{name:"memo",label:"Memo",placeholder:"留言信息",fieldProps:{size:"large",autoFocus:!1,allowClear:!0,defaultValue:"",autoSize:{minRows:1}}}),c]})})),P=(0,r.memo)(F),D=n(98097),M=n(70178),T=n.n(M);C().extend(T());var Z=(0,r.forwardRef)((function(){var e=(0,w.useSelector)((function(e){return e.ppp.project})),t=(0,w.useSelector)((function(e){return e.ppp.projectNftLoading})),n=(0,r.useMemo)((function(){return[{title:"项目ID",dataIndex:"id",key:"id",render:function(e,t){return(0,l.jsx)("span",{children:t.id})}},{title:"项目名称",dataIndex:"projectName",key:"projectName",render:function(e,t){return(0,l.jsx)("span",{children:t.projectName})}},{title:"项目描述",dataIndex:"desc",key:"desc",render:function(e,t){return(0,l.jsx)("span",{children:t.desc})}},{title:"NFT名称",dataIndex:"nftName",key:"nftName",render:function(e,t){return(0,l.jsx)("span",{children:t.nftName})}},{title:"代币名称",dataIndex:"tokenNameRelease",key:"tokenNameRelease",render:function(e,t){return(0,l.jsx)("span",{children:t.tokenNameRelease})}},{title:"矿池ID",dataIndex:"mid",key:"mid",render:function(e,t){return(0,l.jsx)("span",{children:t.mid})}},{title:"创建者",dataIndex:"creator",key:"creator",render:function(e,t){return(0,l.jsx)("span",{children:t.creator})}},{title:"创建时间",dataIndex:"createTime",key:"createTime",render:function(e,t){return(0,l.jsx)("div",{children:t.createTime})}},{title:"NFT初始发行量",dataIndex:"initNftNumber",key:"initNftNumber",render:function(e,t){return(0,l.jsx)("div",{children:t.initNftNumber})}},{title:"NFT流通量",dataIndex:"nftSupply",key:"nftSupply",render:function(e,t){return(0,l.jsx)("div",{children:t.nftSupply})}},{title:"NFT最大发行量",dataIndex:"nftMaxSupply",key:"nftMaxSupply",render:function(e,t){return(0,l.jsx)("div",{children:t.nftMaxSupply})}},{title:"NFT初始价格",dataIndex:"initNftPrice",key:"initNftPrice",render:function(e,t){return(0,l.jsx)("div",{children:t.initNftPrice})}},{title:"分裂价格",dataIndex:"splitNftPrice",key:"splitNftPrice",render:function(e,t){return(0,l.jsx)("div",{children:t.splitNftPrice})}},{title:"每轮时间",dataIndex:"secPerRound",key:"secPerRound",render:function(e,t){return(0,l.jsx)("div",{children:t.secPerRound})}},{title:"NFT每轮涨幅",dataIndex:"increasePerRound",key:"increasePerRound",render:function(e,t){return(0,l.jsx)("div",{children:t.increasePerRound})}},{title:"NFT销毁时间",dataIndex:"secToBurnNft",key:"secToBurnNft",render:function(e,t){return(0,l.jsx)("div",{children:t.secToBurnNft})}},{title:"销毁兑换",dataIndex:"tokenPerNft",key:"tokenPerNft",render:function(e,t){return(0,l.jsx)("div",{children:t.tokenPerNft})}},{title:"NFT交易手续费(含奖励池)",dataIndex:"tradeFeeRatio",key:"tradeFeeRatio",render:function(e,t){return(0,l.jsx)("div",{children:t.tradeFeeRatio})}},{title:"NFT交易手续费(不含奖励池)",dataIndex:"tradeFeeRatioWithoutRewardPool",key:"tradeFeeRatioWithoutRewardPool",render:function(e,t){return(0,l.jsx)("div",{children:t.tradeFeeRatioWithoutRewardPool})}},{title:"奖励池手续费",dataIndex:"rewordPoolFeeRatio",key:"rewordPoolFeeRatio",render:function(e,t){return(0,l.jsx)("div",{children:t.rewordPoolFeeRatio})}},{title:"利润率",dataIndex:"profitRate",key:"profitRate",render:function(e,t){return(0,l.jsx)("div",{children:t.profitRate})}},{title:"拆分利润率",dataIndex:"profitRateSplit",key:"profitRateSplit",render:function(e,t){return(0,l.jsx)("div",{children:t.profitRateSplit})}},{title:"年化利率",dataIndex:"profitRateApr",key:"profitRateApr",render:function(e,t){return(0,l.jsx)("div",{children:t.profitRateApr})}},{title:"Website",dataIndex:"website",key:"website",render:function(e,t){return(0,l.jsx)("div",{children:t.website})}},{title:"Twitter",dataIndex:"twitter",key:"twitter",render:function(e,t){return(0,l.jsx)("div",{children:t.twitter})}},{title:"Telegram",dataIndex:"telegram",key:"telegram",render:function(e,t){return(0,l.jsx)("div",{children:t.telegram})}}]}),[e]);return(0,l.jsx)("div",{className:"ml-3",children:(0,l.jsx)(D.vY,{loading:t,columns:n,dataSource:e})})})),_=(0,r.memo)(Z),E=n(92340);C().extend(T());var O=(0,r.forwardRef)((function(){var e=(0,w.useSelector)((function(e){return e.ppp.projectNftGrow})),t=(0,w.useSelector)((function(e){return e.ppp.projectSecPerRound})),n=(0,w.useSelector)((function(e){return e.ppp.projectNftLoading})),a=(0,w.useSelector)((function(e){return e.ppp.project})),o=(0,r.useMemo)((function(){return"".concat((a.tradeFeeRatioValue/2*100).toFixed(2),"%")}),[a]),s=(0,r.useMemo)((function(){return"".concat((a.tradeFeeRatioValue/2*100).toFixed(2),"%")}),[a]),c=(0,r.useMemo)((function(){return[{title:"#",dataIndex:"key",key:"key",render:function(e,t,n){return(0,l.jsx)("span",{children:n+1})}},{title:"轮次时间(".concat(t/3600,"小时)"),dataIndex:"time",key:"time",render:function(e,t){return(0,l.jsx)("div",{children:t.time})}},{title:"NFT数量",dataIndex:"count",key:"count",render:function(e,t){return(0,l.jsx)("div",{children:t.count})}},{title:"NFT市值",dataIndex:"asset",key:"asset",render:function(e,t){return(0,l.jsx)("div",{children:t.asset})}},{title:"手续费(".concat(o,")"),dataIndex:"asset",key:"asset",render:function(e,t){return(0,l.jsx)("div",{children:t.tradeFee})}},{title:"奖励池(".concat(s,")"),dataIndex:"asset",key:"asset",render:function(e,t){return(0,l.jsx)("div",{children:t.rewordPool})}},{title:"协议费(0.5%)",dataIndex:"asset",key:"asset",render:function(e,t){return(0,l.jsx)("div",{children:t.protocolFee})}}]}),[t,a,o,s]);return(0,l.jsx)("div",{className:"ppp-tab-grow",children:(0,l.jsx)(E.Z,{loading:{spinning:n,size:"large"},scroll:{x:!0},size:"small",columns:c,dataSource:e,defaultData:[],options:!1,search:!1,tableAlertRender:!1,tableAlertOptionRender:!1,pagination:!1})})})),z=(0,r.memo)(O),A=n(40956),V=n(49591),H=n(15867),Y=n(51165);C().extend(T());var q=function(e){var t=(0,w.useDispatch)(),n=(0,w.useNavigate)(),a=N.ZP.useMessage(),s=o()(a,2),c=s[0],i=s[1],u=(0,w.useSelector)((function(e){return e.ppp.projectNft})),d=(0,w.useSelector)((function(e){return e.ppp.project})),f=(0,w.useSelector)((function(e){return e.ppp.projectNftReset})),m=(0,w.useSelector)((function(e){return e.ppp.projectId})),v=(0,w.useSelector)((function(e){return e.ppp.projectSecToBurnNft})),y=(0,w.useSelector)((function(e){return e.ppp.projectAccountFilter})),b=(0,w.useSelector)((function(e){return e.ppp.projectNftLoading})),j=(0,w.useSelector)((function(e){return e.ppp.projectProfitRate})),g=(0,w.useSelector)((function(e){return e.ppp.projectProfitRateSplit})),S=(0,w.useSelector)((function(e){return e.ppp.projectTotalHolder})),I=(0,w.useSelector)((function(e){return e.global.session})),R=(0,w.useSelector)((function(e){return e.global.account})),F=(0,w.useSelector)((function(e){return e.ppp.projectTotalInvest})),P=(0,w.useSelector)((function(e){return e.ppp.projectTotalValue})),D=(0,w.useSelector)((function(e){return e.ppp.projectEndTime})),M=(0,r.useState)([]),T=o()(M,2),Z=T[0],_=T[1],O=(0,w.useIntl)(),z=O.formatMessage({id:"tokens.intlUpdate"}),q=O.formatMessage({id:"common.intlPleaseConnectWallet"}),U=O.formatMessage({id:"common.intlPleaseConnectNetwork"}),L=O.formatMessage({id:"common.intlTransferSuccess"}),B=O.formatMessage({id:"common.intlTransferFail"}),G=(0,r.useCallback)((function(){var e=D/1e3;return 0===e?"":e<60?"(".concat(e.toFixed(0),"秒)"):e>=60&&e<3600?"(".concat((e/60).toFixed(1),"分)"):"(".concat((e/3600).toFixed(1),"时)")}),[D]),W=(0,r.useCallback)((function(e){var n=e.owner,r=u.filter((function(e){return e.owner===n}));t(A.N.setProjectNft(r))}),[u]),$=(0,r.useCallback)((function(){t(A.N.setProjectNft(f))}),[f]),K=(0,r.useCallback)(h()(x()().mark((function t(){var n,r,a,s,i,l,p,f;return x()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(I&&I.broadcast){t.next=5;break}return c.error("".concat(q)),t.abrupt("return");case 5:if(R){t.next=8;break}return c.error("".concat(U)),t.abrupt("return");case 8:if(Z.length){t.next=11;break}return c.error("复选项不能为空"),t.abrupt("return");case 11:if(n=d.tokenName,r="","DFS"!==n){t.next=17;break}r="eosio.token",t.next=28;break;case 17:if("USDT"!==n){t.next=21;break}r="usdtusdtusdt",t.next=28;break;case 21:if("ORDI"!==n){t.next=25;break}r="ordiordiordi",t.next=28;break;case 25:return c.error("不支持当前项目"),console.log("不支持当前项目"),t.abrupt("return");case 28:return a=u.filter((function(e){return Z.includes(e.id)})),s=[],a.forEach((function(e){s.push({account:r,name:"transfer",authorization:[I.permissionLevel],data:{from:I.actor,to:"dfs3protocol",quantity:e.current_price,memo:"buy:".concat(e.id)}})})),t.next=33,(0,k.zI)(I.transact({actions:s}));case 33:if(i=t.sent,l=o()(i,2),p=l[0],f=l[1],!p){t.next=42;break}return c.error(p),t.abrupt("return");case 42:if(!f||!f.response){t.next=46;break}c.success("".concat(L)),t.next=48;break;case 46:return c.error("".concat(B)),t.abrupt("return");case 48:e.handleGetProjectNft(m);case 49:case"end":return t.stop()}}),t)}))),[I,Z,u,d,e,m]),X=(0,r.useCallback)(h()(x()().mark((function t(){var n,r,a,s,i,l;return x()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(I&&I.broadcast){t.next=5;break}return c.error("".concat(q)),t.abrupt("return");case 5:if(R){t.next=8;break}return c.error("".concat(U)),t.abrupt("return");case 8:if(Z.length){t.next=11;break}return c.error("复选项不能为空"),t.abrupt("return");case 11:return n=u.filter((function(e){return Z.includes(e.id)})),r=[],n.forEach((function(e){r.push({account:"dfs3protocol",name:"split",authorization:[I.permissionLevel],data:{assetid:e.id}})})),t.next=16,(0,k.zI)(I.transact({actions:r}));case 16:if(a=t.sent,s=o()(a,2),i=s[0],l=s[1],!i){t.next=25;break}return c.error(i),t.abrupt("return");case 25:if(!l||!l.response){t.next=29;break}c.success("".concat(L)),t.next=31;break;case 29:return c.error("".concat(B)),t.abrupt("return");case 31:e.handleGetProjectNft(m);case 32:case"end":return t.stop()}}),t)}))),[I,Z,u,d,e,m]),J=(0,r.useCallback)(h()(x()().mark((function t(){var n,r,a,s,i,l;return x()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(I&&I.broadcast){t.next=5;break}return c.error("".concat(q)),t.abrupt("return");case 5:if(R){t.next=8;break}return c.error("".concat(U)),t.abrupt("return");case 8:if(Z.length){t.next=11;break}return c.error("复选项不能为空"),t.abrupt("return");case 11:return n=u.filter((function(e){return Z.includes(e.id)})),r=[],n.forEach((function(e){r.push({account:"dfs3protocol",name:"burn",authorization:[I.permissionLevel],data:{assetid:e.id}})})),t.next=16,(0,k.zI)(I.transact({actions:r}));case 16:if(a=t.sent,s=o()(a,2),i=s[0],l=s[1],!i){t.next=25;break}return c.error(i),t.abrupt("return");case 25:if(!l||!l.response){t.next=29;break}c.success("".concat(L)),t.next=31;break;case 29:return c.error("".concat(B)),t.abrupt("return");case 31:e.handleGetProjectNft(m);case 32:case"end":return t.stop()}}),t)}))),[I,Z,u,d,e,m]),Q=(0,r.useMemo)((function(){return[{title:"#",dataIndex:"key",key:"key",search:!1,render:function(e,t,n){return(0,l.jsx)("span",{children:n+1})}},{title:"ID",dataIndex:"id",key:"id",search:!1,render:function(e,t){return(0,l.jsx)("div",{children:t.id})}},{title:"CID",dataIndex:"cid",key:"cid",search:!1,render:function(e,t){return(0,l.jsxs)("div",{children:["#",t.cid]})}},{title:"状态",dataIndex:"status",key:"status",filters:[{text:"可买",value:"buy"},{text:"已售",value:"sell"},{text:"可拆分",value:"split"},{text:"可销毁",value:"burn"}],onFilter:function(e,t){return"buy"===e?t.status.includes("可买"):"sell"===e?"已售"===t.status:"split"===e?"可拆分"===t.status:"burn"!==e||t.status.includes("可销毁")},sorter:function(e,t){return e.status.localeCompare(t.status)},search:!1,render:function(e,t){return(0,l.jsx)("div",{children:t.status})}},{title:"持有者(".concat(S,")"),dataIndex:"owner",key:"owner",filters:y,onFilter:function(e,t){return e===t.owner},sorter:function(e,t){return e.owner.localeCompare(t.owner)},render:function(e,t){return(0,l.jsx)("a",{onClick:function(){return n("/query/account?search=".concat(t.owner,"&tab=info"))},children:t.owner})}},{title:"投入成本(".concat(F.toFixed(0),")"),dataIndex:"invest",key:"invest",sorter:function(e,t){return e.invest.localeCompare(t.invest)},search:!1,render:function(e,t){return(0,l.jsx)("div",{children:t.invest})}},{title:"当前价格(".concat(P.toFixed(0),")"),dataIndex:"current_price",key:"current_price",sorter:function(e,t){return e.current_price.localeCompare(t.current_price)},search:!1,render:function(e,t){return(0,l.jsx)("div",{children:t.current_price})}},{title:"卖出利润(".concat(j.toFixed(2),"%/").concat(g.toFixed(2),"%)"),dataIndex:"profit",key:"profit",sorter:function(e,t){return e.profit.localeCompare(t.profit)},search:!1,render:function(e,t){return(0,l.jsx)("div",{children:t.profit})}},{title:"购买时间".concat(G()),dataIndex:"last_trade",key:"last_trade",sorter:function(e,t){return C()(t.last_trade).valueOf()-C()(e.last_trade).valueOf()},search:!1,render:function(e,t){var n=C().utc(t.last_trade).local().format("YYYY-MM-DDTHH:mm:ss");return(0,l.jsx)("div",{children:n})}},{title:"销毁时间",dataIndex:"last_trade",key:"last_trade",sorter:function(e,t){return C()(e.last_trade).valueOf()-C()(t.last_trade).valueOf()},search:!1,render:function(e,t){var n=C().utc(t.last_trade).add(v,"seconds").local().format("YYYY-MM-DDTHH:mm:ss");return(0,l.jsx)("div",{children:n})}},{title:"销毁倒计时",dataIndex:"last_trade",key:"last_trade",search:!1,render:function(e,t){var n=C().utc(t.last_trade).add(v,"seconds").local().valueOf();return(0,l.jsx)(p,{value:n})}}]}),[v,y,j,S,P,G]);return(0,l.jsxs)("div",{className:"ppp-tab-nft",children:[(0,l.jsx)(E.Z,{loading:{spinning:b,size:"large"},scroll:{x:!0},size:"small",columns:Q,dataSource:u,defaultData:[],search:{defaultCollapsed:!1,layout:"horizontal",labelWidth:"auto",collapseRender:!1,className:"p-[0px]",optionRender:function(t,n,r){return[r[1],(0,l.jsx)(H.ZP,{type:"primary",onClick:function(){e.handleGetProjectNft(m)},children:z},"update"),r[0]]}},rowSelection:{type:"checkbox",selectedRowKeys:Z,onChange:function(e){_(e)}},onSubmit:W,onReset:$,options:!1,tableAlertRender:!1,tableAlertOptionRender:!1,pagination:!1}),!!Z.length&&(0,l.jsxs)(Y.Z.Group,{trigger:"click",type:"primary",style:{insetInlineEnd:50},icon:(0,l.jsx)(V.Z,{}),children:[(0,l.jsx)(Y.Z,{type:"primary",description:"购买",onClick:K},"1"),(0,l.jsx)(Y.Z,{type:"primary",description:"拆分",onClick:X},"2"),(0,l.jsx)(Y.Z,{type:"primary",description:"销毁",onClick:J},"3")]}),i]})},U=(0,r.memo)(q),L=n(7134),B=n(62120),G=n(12399);C().extend(T());var W=function(e){var t=(0,w.useDispatch)(),n=(0,w.useNavigate)(),a=(0,w.useSelector)((function(e){return e.ppp.projectNftRank})),o=(0,w.useSelector)((function(e){return e.ppp.projectNftRankReset})),s=(0,w.useSelector)((function(e){return e.ppp.projectId})),c=(0,w.useSelector)((function(e){return e.ppp.projectAccountFilter})),i=(0,w.useSelector)((function(e){return e.ppp.projectNftLoading})),u=(0,w.useSelector)((function(e){return e.ppp.projectTotalHolder})),d=(0,w.useSelector)((function(e){return e.ppp.projectTotalInvest})),p=(0,w.useSelector)((function(e){return e.ppp.projectTotalProfit})),f=(0,w.useSelector)((function(e){return e.ppp.projectTotalBalance})),x=(0,w.useSelector)((function(e){return e.ppp.projectRewardPool})),m=(0,w.useSelector)((function(e){return e.ppp.projectNftSupply})),h=(0,r.useRef)(),v=(0,w.useIntl)().formatMessage({id:"tokens.intlUpdate"}),y=(0,r.useCallback)((function(e){var n=e.owner,r=a.filter((function(e){return e.owner===n}));t(A.N.setProjectNftRank(r))}),[a]),b=(0,r.useCallback)((function(){t(A.N.setProjectNftRank(o))}),[o]),j=(0,r.useCallback)((function(t,n,r){return[r[1],(0,l.jsx)(H.ZP,{type:"primary",onClick:function(){e.handleGetProjectNft(s)},children:v},"update"),r[0]]}),[e,s]),g=(0,r.useMemo)((function(){return[{title:"#",dataIndex:"key",key:"key",search:!1,render:function(e,t,n){return(0,l.jsx)("span",{children:n+1})}},{title:"持有者(".concat(u,")"),dataIndex:"owner",key:"owner",filters:c,onFilter:function(e,t){return e===t.owner},sorter:function(e,t){return e.owner.localeCompare(t.owner)},render:function(e,t){return(0,l.jsx)("a",{onClick:function(){return n("/query/account?search=".concat(t.owner,"&tab=info"))},children:t.owner})}},{title:"持有数量(".concat(m,")"),dataIndex:"number",key:"number",sorter:function(e,t){return e.number-t.number},search:!1,render:function(e,t){return(0,l.jsx)("div",{children:t.number})}},{title:"持有占比",dataIndex:"percent",key:"percent",search:!1,render:function(e,t){return(0,l.jsxs)("div",{children:[t.percent.toFixed(2),"%"]})}},{title:"账号余额(".concat(f.toFixed(0),")"),dataIndex:"balance",key:"balance",search:!1,render:function(e,t){return(0,l.jsx)("div",{children:t.balance})}},{title:"投入成本(".concat(d.toFixed(0),")"),dataIndex:"invest",key:"invest",sorter:function(e,t){return e.invest-t.invest},search:!1,render:function(e,t){return(0,l.jsx)("div",{children:t.investAsset})}},{title:"卖出利润(".concat(p.toFixed(0),")"),dataIndex:"profit",key:"profit",sorter:function(e,t){return e.profit-t.profit},search:!1,render:function(e,t){return(0,l.jsx)("div",{children:t.profitAsset})}},{title:"销毁奖励(DFS本位)",dataIndex:"burnRewardDfs",key:"burnRewardDfs",search:!1,render:function(e,t){return(0,l.jsxs)("div",{children:[(0,k.CE)(t.burnRewardDfs)," DFS"]})}},{title:"销毁奖励(USDT本位)",dataIndex:"burnRewardUsdt",key:"burnRewardUsdt",search:!1,render:function(e,t){return(0,l.jsxs)("div",{children:[(0,k.CE)(t.burnRewardUsdt)," USDT"]})}}]}),[c,p,d,u,m]),S=(0,r.useMemo)((function(){return[{title:"#",dataIndex:"key",key:"key",render:function(e,t,n){return(0,l.jsx)("span",{children:n+1})}},{title:"名称",dataIndex:"sym",key:"sym",render:function(e,t){var n=t.logo;return(0,l.jsxs)("div",{children:[(0,l.jsx)(L.C,{className:"mr-2",size:"default",src:n}),(0,l.jsx)("span",{children:t.sym})]})}},{title:"数量",dataIndex:"balance",key:"balance",render:function(e,t){return(0,l.jsx)("div",{children:t.balance})}},{title:"价值(DFS本位)",dataIndex:"dfsValue",key:"dfsValue",render:function(e,t){return(0,l.jsxs)("div",{children:[(0,k.CE)(t.dfsValue)," DFS"]})}},{title:"价值(USDT本位)",dataIndex:"usdtValue",key:"usdtValue",render:function(e,t){return(0,l.jsxs)("div",{children:[(0,k.CE)(t.usdtValue)," USDT"]})}}]}),[]);return(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{className:"ppp-tab-pool mt-2",children:[(0,l.jsx)("div",{className:" font-semibold text-base hardline ml-2 mb-1",children:"奖励池"}),(0,l.jsx)(E.Z,{loading:{spinning:i,size:"large"},scroll:{x:!0},size:"small",columns:S,dataSource:x,defaultData:[],search:!1,options:!1,tableAlertRender:!1,tableAlertOptionRender:!1,pagination:!1,summary:function(e){var t=0,n=0;return e.forEach((function(e){t+=e.usdtValue,n+=e.dfsValue})),(0,l.jsxs)(B.Z.Summary.Row,{children:[(0,l.jsx)(B.Z.Summary.Cell,{index:0}),(0,l.jsx)(B.Z.Summary.Cell,{index:1,children:(0,l.jsx)("span",{className:"font-semibold",children:"汇 总"})}),(0,l.jsx)(B.Z.Summary.Cell,{index:2}),(0,l.jsx)(B.Z.Summary.Cell,{index:3,children:(0,l.jsxs)("span",{className:"font-semibold",children:[(0,k.CE)(n)," DFS"]})}),(0,l.jsx)(B.Z.Summary.Cell,{index:4,children:(0,l.jsxs)("span",{className:"font-semibold",children:[(0,k.CE)(t)," USDT"]})})]})}})]}),(0,l.jsxs)("div",{className:"ppp-tab-rank mt-3",children:[(0,l.jsx)("div",{className:"font-semibold text-base hardline ml-2",children:"持有者排名"}),(0,l.jsx)(E.Z,{loading:{spinning:i,size:"large"},scroll:{x:!0},size:"small",columns:g,dataSource:a,defaultData:[],search:{defaultCollapsed:!1,layout:"horizontal",labelWidth:"auto",collapseRender:!1,className:"p-[0px]",optionRender:j},onSubmit:y,onReset:b,options:!1,tableAlertRender:!1,tableAlertOptionRender:!1,pagination:!1})]}),109===s&&(0,l.jsx)(Y.Z,{icon:(0,l.jsx)(G.Z,{}),type:"primary",style:{insetInlineEnd:50},onClick:function(){return h.current.handleOpen()}}),(0,l.jsx)(P,{ref:h})]})},$=(0,r.memo)(W),K=n(5621),X=n(38345),J=n(6466),Q=n(57953),ee=n(71230),te=n(15746),ne=n(96074),re=n(9669),ae=n.n(re);C().extend(T());var oe=function(e){var t=(0,w.useDispatch)(),n=N.ZP.useMessage(),a=o()(n,2),s=a[0],c=a[1],i=(0,w.useNavigate)(),u=(0,w.useSelector)((function(e){return e.global.host})),d=(0,w.useSelector)((function(e){return e.global.contractKit})),p=(0,r.useState)(!1),f=o()(p,2),m=f[0],v=f[1],y=(0,w.useSelector)((function(e){return e.statistics.holderDataSource})),b=(0,w.useSelector)((function(e){return e.statistics.holderDataSourceReset})),j=(0,w.useSelector)((function(e){return e.ppp.projectToken})),g=(0,w.useSelector)((function(e){return e.ppp.project})),S=(0,r.useState)(0),I=o()(S,2),R=I[0],C=I[1],F=(0,r.useState)(0),P=o()(F,2),D=P[0],M=P[1],T=(0,r.useState)(0),Z=o()(T,2),_=Z[0],O=Z[1],z=(0,r.useState)(0),A=o()(z,2),V=A[0],Y=A[1],q=(0,w.useIntl)(),U=q.formatMessage({id:"tokens.intlHolder"}),L=q.formatMessage({id:"tokens.intlHold"}),B=q.formatMessage({id:"tokens.intlLiq"}),G=q.formatMessage({id:"tokens.intlTotalValue"}),W=q.formatMessage({id:"tokens.intlRatio"}),$=q.formatMessage({id:"tokens.intlSupply"}),re=q.formatMessage({id:"tokens.intlMarketCap"}),oe=q.formatMessage({id:"tokens.intlPrice"}),se=q.formatMessage({id:"tokens.intlRank"}),ce=q.formatMessage({id:"tokens.intlUpdate"}),ie=q.formatMessage({id:"tokens.intlTotalBal"}),ue=(0,r.useCallback)(function(){var e=h()(x()().mark((function e(t){var n,r,a,c,i,l,d,p,f,m;return x()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=[],r=1e3,a="",c="";case 4:return e.next=7,(0,k.zI)(ae().post("".concat(u,"/v2/chain/get_scope_rows"),{code:j.contract,table:"accounts",lower_bound:a,primary_lower_bound:c,limit:r,index_position:"primary",key_type:"name"}));case 7:if(i=e.sent,l=o()(i,2),d=l[0],p=l[1],d||200!==p.status){e.next=22;break}for(f=p.data.rows,m=0;m<f.length;++m)f[m].data.balance.split(" ")[1]===t&&n.push({account:f[m].scope,balance:f[m].data.balance});if(!p.data.more){e.next=19;break}a=p.data.next_key,c=p.data.next_primary_key,e.next=20;break;case 19:return e.abrupt("break",26);case 20:e.next=24;break;case 22:return s.error(d),e.abrupt("break",26);case 24:e.next=4;break;case 26:return e.abrupt("return",n);case 27:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),[s,j]),le=(0,r.useCallback)(h()(x()().mark((function e(){var t,n,r,a,o,s,c;return x()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,d.load("swapswapswap");case 2:return t=e.sent,n=t.table("markets"),e.next=6,n.all();case 6:return r=e.sent,a=r.find((function(e){return e.mid.toNumber()===Number(j.mid)})),"usdtusdtusdt-USDT",s="eosio.token-DFS",c=[],(o={})["usdtusdtusdt-USDT"]=1,o[s]=(0,k.ri)(r[0].reserve0)/(0,k.ri)(r[0].reserve1),r.forEach((function(e){var t=e.contract0.toString()+"-"+e.sym0.toString().split(",")[1],n=e.contract1.toString()+"-"+e.sym1.toString().split(",")[1],r=(0,k.ri)(e.reserve0),a=(0,k.ri)(e.reserve1);"eosio.token"===e.contract0.toString()?o.hasOwnProperty(n)||(o[n]=r/a*o[s]):"eosio.token"===e.contract1.toString()?o.hasOwnProperty(t)||(o[t]=a/r*o[s]):"usdtusdtusdt"===e.contract0.toString()?o.hasOwnProperty(n)||(o[n]=r/a):"usdtusdtusdt"===e.contract1.toString()?o.hasOwnProperty(t)||(o[t]=a/r):c.push({key0:t,key1:n,value0:r,value1:a})})),c.forEach((function(e){o.hasOwnProperty(e.key0)&&!o.hasOwnProperty(e.key1)?o[e.key1]=e.value0/e.value1*o[e.key0]:!o.hasOwnProperty(e.key0)&&o.hasOwnProperty(e.key1)?o[e.key0]=e.value1/e.value0*o[e.key1]:o.hasOwnProperty(e.key0)||o.hasOwnProperty(e.key1)||(o[e.key0]=0,o[e.key1]=0)})),e.abrupt("return",{tokenPriceMap:o,marketData:a});case 17:case"end":return e.stop()}}),e)}))),[d,j]),de=(0,r.useCallback)(h()(x()().mark((function e(){var t,n,r;return x()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,d.load("swapswapswap");case 2:return t=e.sent,n=t.table("liquidity"),e.next=6,n.all({scope:j.mid});case 6:return r=e.sent,e.abrupt("return",r);case 8:case"end":return e.stop()}}),e)}))),[d,j]),pe=(0,r.useCallback)(h()(x()().mark((function e(){var t,n,r;return x()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,d.load(j.contract);case 2:return t=e.sent,n=t.table("stat"),e.next=6,n.all({scope:j.symbol});case 6:return r=e.sent,e.abrupt("return",[parseFloat(r[0].supply.toString()),parseFloat(r[0].max_supply.toString())]);case 8:case"end":return e.stop()}}),e)}))),[d,j]),fe=(0,r.useCallback)(h()(x()().mark((function e(){var n,r,a,c,i,u,l,d,p,f,m,h,y,b;return x()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,v(!0),n={},r={},a=[],e.next=7,le();case 7:return c=e.sent,i=c.tokenPriceMap,u=c.marketData,e.next=12,ue(j.symbol);case 12:return l=e.sent,e.next=15,de();case 15:return d=e.sent,e.next=18,pe();case 18:for(p=e.sent,f=o()(p,1),m=f[0],l.forEach((function(e){n[e.account]=Number(e.balance.split(" ")[0])})),d.forEach((function(e){var t=parseFloat(u.liquidity_token.toString()),n=parseFloat(u.reserve0.value.toString()),a=parseFloat(u.reserve1.value.toString()),o=parseFloat(e.token.toString())/t,s=0;s=u.sym0.toString()===j.symbol?n*o:a*o;var c=e.owner.toString();r[c]=s})),h=j.contract+"-"+j.symbol,Object.keys(n).forEach((function(e,t){var o=n[e],s=r[e]?r[e]:0;o+s>0&&a.push({key:t,rank:t,account:e,hold:o,liq:s,totalBal:o+s,value:(o+s)*i[h],ratio:(o+s)/m})})),y=a.sort((function(e,t){return t.value-e.value})),b=0;b<y.length;b++)y[b].rank=b;t(K.N.setHolderDataSource(y)),t(K.N.setHolderDataSourceReset(y)),C(y.length),M(m*i[h]),O(m),Y(i[h]),v(!1),e.next=40;break;case 36:e.prev=36,e.t0=e.catch(0),v(!1),(0,k.Tv)(e.t0,s);case 40:case"end":return e.stop()}}),e,null,[[0,36]])}))),[ue,le,pe,de,j]),xe=(0,r.useCallback)((function(e){var n=e.account,r=y.filter((function(e){return e.account===n}));t(K.N.setHolderDataSource(r))}),[y]),me=(0,r.useCallback)((function(){t(K.N.setHolderDataSource(b))}),[b]),he=(0,r.useMemo)((function(){return[{title:"".concat(se),dataIndex:"key",key:"key",search:!1,render:function(e,t){return(0,l.jsx)("span",{children:t.rank+1})}},{title:"".concat(U),dataIndex:"account",key:"account",render:function(e,t){return(0,l.jsx)("a",{onClick:function(){return i("/query/account?search=".concat(t.account,"&tab=info"))},children:t.account})}},{title:"".concat(L),dataIndex:"hold",key:"hold",search:!1,sorter:function(e,t){return t.hold-e.hold},render:function(e,t){return(0,l.jsx)("span",{children:(0,k.CE)(t.hold)})}},{title:"".concat(B," (").concat(j.pair,")"),dataIndex:"liq",key:"liq",search:!1,sorter:function(e,t){return t.liq-e.liq},render:function(e,t){return(0,l.jsx)("span",{children:(0,k.CE)(t.liq)})}},{title:"".concat(ie),dataIndex:"totalBal",key:"totalBal",search:!1,sorter:function(e,t){return t.totalBal-e.totalBal},render:function(e,t){return(0,l.jsx)("span",{children:(0,k.CE)(t.totalBal)})}},{title:"".concat(G),dataIndex:"value",key:"value",search:!1,sorter:function(e,t){return t.value-e.value},render:function(e,t){return(0,l.jsx)("span",{children:(0,k.CE)(t.value,"$")})}},{title:"".concat(W),dataIndex:"ratio",key:"ratio",search:!1,sorter:function(e,t){return t.ratio-e.ratio},render:function(e,t){return(0,l.jsxs)("span",{children:[(0,k.CE)(100*t.ratio),"%"]})}}]}),[j]);return(0,r.useEffect)((function(){d&&g.mid&&fe()}),[d,fe,g]),(0,l.jsxs)("div",{className:"ppp-tab-token",children:[(0,l.jsx)(Q.Z,{size:"large",spinning:m,children:(0,l.jsx)(X.Z,{headerBordered:!0,headStyle:{justifyContent:"center"},className:"",children:(0,l.jsxs)(ee.Z,{gutter:10,children:[(0,l.jsx)(te.Z,{lg:{span:"6"},md:{span:"12"},sm:{span:"12"},xs:{span:"12"},children:(0,l.jsx)(J.Z,{layout:"center",statistic:{title:(0,l.jsx)("div",{className:"text-center",children:$}),value:(0,k.CE)(_)}})}),(0,l.jsx)(te.Z,{lg:{span:"6"},md:{span:"12"},sm:{span:"12"},xs:{span:"12"},children:(0,l.jsx)(J.Z,{layout:"center",statistic:{title:(0,l.jsx)("div",{className:"text-center",children:oe}),value:(0,k.CE)(V,"$")}})}),(0,l.jsx)(te.Z,{lg:{span:"6"},md:{span:"12"},sm:{span:"12"},xs:{span:"12"},children:(0,l.jsx)(J.Z,{layout:"center",statistic:{title:(0,l.jsx)("div",{className:"text-center",children:re}),value:(0,k.CE)(D,"$")}})}),(0,l.jsx)(te.Z,{lg:{span:"6"},md:{span:"12"},sm:{span:"12"},xs:{span:"12"},children:(0,l.jsx)(J.Z,{layout:"center",statistic:{title:(0,l.jsx)("div",{className:"text-center",children:U}),value:R}})})]})})}),(0,l.jsx)(ne.Z,{className:"my-2"}),(0,l.jsx)(E.Z,{className:"mb-3",scroll:{x:!0},size:"small",columns:he,dataSource:y,defaultData:[],search:{defaultCollapsed:!1,layout:"horizontal",labelWidth:"auto",collapseRender:!1,className:"p-[0px]",optionRender:function(e,t,n){return[n[1],(0,l.jsx)(H.ZP,{onClick:function(){v(!0),fe()},children:ce},"update"),n[0]]}},onSubmit:xe,onReset:me,options:!1,pagination:{pageSize:100},tableAlertRender:!1,tableAlertOptionRender:!1,loading:{spinning:m,size:"large"}}),c]})},se=(0,r.memo)(oe),ce=n(97857),ie=n.n(ce),ue=n(98165),le=n(80507);C().extend(T());var de=function(){var e=N.ZP.useMessage(),t=o()(e,2),n=t[0],a=t[1],s=(0,w.useNavigate)(),c=(0,w.useDispatch)(),i=(0,w.useSelector)((function(e){return e.global.session})),u=(0,w.useSelector)((function(e){return e.ppp.projectSwapLog})),d=(0,w.useSelector)((function(e){return e.ppp.project})),p=(0,w.useSelector)((function(e){return e.ppp.pppTokenLogos})),f=(0,r.useState)(!1),m=o()(f,2),v=m[0],y=m[1],b=(0,r.useState)(!1),j=o()(b,2),g=j[0],S=j[1],I=(0,r.useState)(""),R=o()(I,2),F=R[0],P=R[1],D=(0,r.useState)([]),M=o()(D,2),T=M[0],Z=M[1],_=(0,r.useState)([]),O=o()(_,2),z=O[0],V=O[1],H=(0,r.useState)([]),Y=o()(H,2),q=Y[0],U=Y[1],B=(0,r.useRef)(0),G=(0,w.useIntl)(),W=G.formatMessage({id:"swaplog.intlUser"}),$=G.formatMessage({id:"swaplog.intlFrom"}),K=G.formatMessage({id:"swaplog.intlTo"}),X=G.formatMessage({id:"swaplog.intlTime"}),J=(0,r.useCallback)(function(){var e=h()(x()().mark((function e(t){var r,a,s,i,u,l,f,m,h,v,b,j,g,S,w,N,I,R,F,D,M;return x()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,r=[],a=[],s=[],i=[],u=d.mid,l=d.tokenName,e.next=9,t.client.v1.chain.get_table_rows({code:"loglogloglog",table:"logs",scope:"loglogloglog",lower_bound:le.zM.from(u),upper_bound:le.zM.from(u),index_position:"secondary",key_type:"i64",limit:100,reverse:!0});case 9:for(f=e.sent,m=0;m<f.rows.length;m++)h=f.rows[m],v=h.in.split(" "),b=o()(v,2),j=b[0],g=b[1],S=h.out.split(" "),w=o()(S,2),N=w[0],I=w[1],R="",F="",D="",M=0,l===g?(R="Buy",F=p[I],D=h.out,M=Number(N)):(R="Sell",F=p[g],D=h.in,M=Number(j)),r.push(ie()(ie()({},h),{},{key:m,create_time:C().utc(h.create_time).local().format("MM-DDTHH:mm:ss"),inSym:g,outSym:I,inAmount:Number(j),outAmount:Number(N),type:R,logo:F,amount:D,amountValue:M}));r.forEach((function(e){a.includes(e.inSym)||a.push(e.inSym),s.includes(e.outSym)||s.push(e.outSym),i.includes(e.user)||i.push(e.user)})),Z(a.sort()),V(s.sort()),U(i.sort()),c(A.N.setProjectSwapLog(r)),P(C()().format("YYYY-MM-DDTHH:mm:ss")),y(!1),e.next=24;break;case 20:e.prev=20,e.t0=e.catch(0),y(!1),(0,k.Tv)(e.t0,n);case 24:case"end":return e.stop()}}),e,null,[[0,20]])})));return function(t){return e.apply(this,arguments)}}(),[n,d,p]),Q=(0,r.useCallback)(h()(x()().mark((function e(){return x()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!d.mid){e.next=6;break}return S(!0),e.next=4,J(i);case 4:S(!1),P(C()().format("YYYY-MM-DDTHH:mm:ss"));case 6:case"end":return e.stop()}}),e)}))),[J,i,d]);(0,r.useEffect)((function(){i&&d.mid&&(u.length?y(!1):y(!0),J(i))}),[i,d]),(0,r.useEffect)((function(){return i&&d.mid&&(B.current=setInterval(Q,5e3)),function(){return clearInterval(B.current)}}),[Q,i,d]);var ee=(0,r.useMemo)((function(){return[{title:"#",dataIndex:"key",key:"key",render:function(e,t){return(0,l.jsx)("span",{children:t.key+1})}},{title:"".concat(W),dataIndex:"user",key:"user",sorter:function(e,t){return e.user.localeCompare(t.user)},filters:q.map((function(e){return{text:e,value:e}})),onFilter:function(e,t){return e===t.user},render:function(e,t){return(0,l.jsx)("a",{onClick:function(){return s("/query/account?search=".concat(t.user,"&tab=info"))},children:t.user})}},{title:"".concat(X),dataIndex:"create_time",key:"create_time",sorter:function(e,t){return C().utc(e.create_time).unix()-C().utc(t.create_time).unix()},render:function(e,t){return(0,l.jsx)("span",{children:t.create_time})}},{title:"操作",dataIndex:"type",key:"type",render:function(e,t){return"Sell"===t.type?(0,l.jsx)("span",{className:" text-red-600",children:t.type}):(0,l.jsx)("span",{className:" text-green-600",children:t.type})}},{title:"数量",dataIndex:"amount",key:"amount",sorter:function(e,t){return t.amountValue-e.amountValue},render:function(e,t){return(0,l.jsxs)("div",{className:"flex items-center",children:[(0,l.jsx)(L.C,{className:"mr-2",src:t.logo}),(0,l.jsx)("div",{children:t.amount})]})}},{title:"".concat($),dataIndex:"in",key:"in",filters:T.map((function(e){return{text:e,value:e}})),onFilter:function(e,t){return e===t.inSym},sorter:function(e,t){return t.inAmount-e.inAmount},render:function(e,t){return(0,l.jsx)("span",{children:t.in})}},{title:"".concat(K),dataIndex:"to",key:"to",filters:z.map((function(e){return{text:e,value:e}})),onFilter:function(e,t){return e===t.outSym},sorter:function(e,t){return t.outAmount-e.outAmount},render:function(e,t){return(0,l.jsx)("span",{children:t.out})}}]}),[T,z,q]);return(0,l.jsxs)("div",{className:"ppp-tab-swaplog",children:[(0,l.jsx)("div",{className:"flex justify-between items-center",children:(0,l.jsxs)("div",{children:[(0,l.jsx)(ue.Z,{spin:g,className:"ml-[8px] hover:cursor-pointer",style:{color:"#1677ff"},onClick:Q}),(0,l.jsx)("span",{className:"ml-[8px]",children:F})]})}),(0,l.jsx)(E.Z,{className:"mb-3",scroll:{x:!0},size:"small",columns:ee,dataSource:u,defaultData:[],search:!1,options:!1,pagination:!1,tableAlertRender:!1,tableAlertOptionRender:!1,loading:{spinning:v,size:"large"}}),a]})},pe=(0,r.memo)(de)}}]);