PageSourceSearch

https://d3xai.ai/assets/index-C8dCMwML.js

js d3xai.ai collected 2026-10-05 12:01:52 UTC 8,550 bytes, 1 lines download raw bytes

1import{cM as e,cN as t,cO as a,c$ as s,dU as l,ex as n,e8 as i,d4 as d,d5 as r,cT as o,cV as c,ey as u,cU as p,cW as v,d9 as x,bN as m,ev as b,ew as f,cR as g,d6 as h,cY as y,dc as w,c_ as _,d7 as k,d3 as C,cg as D,d2 as L,d0 as P,e7 as j}from"./index-Dmu6oiBK.js";import{_ as N}from"./ConnectWalletBtn.vue_vue_type_script_setup_true_lang-DHSvHyOt.js";import{_ as T}from"./Invite.vue_vue_type_script_setup_true_lang-Cem6UGV6.js";import{c as U}from"./useErc20-BMlqZKFq.js";import{u as A}from"./useToken-l4xTdmhR.js";import{f as I}from"./format-H3uh4WQQ.js";import{u as X}from"./usePancakeERC20-Bh3FhvNl.js";import{u as S}from"./useLpStakeHookV2-DusSEGqm.js";import"./getTimePeriods-CbO6JQ5u.js";const R="/assets/USDT-eZhoEPx-.png",B={class:"pb-8"},V={class:"rounded-2xl mx-5 border border-white/20 bg-black/30"},W={class:"flex items-center border-white/10 p-4"},F={class:"relative"},$=["src"],q={class:"ml-5"},E={class:"p-4"},M={class:"text-sm text-[#CCC] mb-3"},z={class:"grid grid-cols-2 gap-3"},H={class:"bg-white/20 rounded flex items-center px-3 py-2"},K={class:"text-xs font-[dinpro]"},O={class:"bg-white/20 rounded flex items-center px-3 py-2"},Y={class:"text-xs font-[dinpro]"},Z={class:"grid grid-cols-3 mt-5 gap-y-3 pb-2"},G={class:"text-[10px] text-white/60"},J={class:"text-xs font-[dinalternate] mt-0.5"},Q={class:"text-center"},ee={class:"flex items-center justify-center opacity-60"},te={class:"text-[10px]"},ae={class:"text-xs font-[dinalternate] mt-0.5"},se={class:"text-right"},le={class:"text-[10px] text-white/60"},ne={class:"text-xs font-[dinalternate] mt-0.5"},ie={class:""},de={class:"text-[10px] text-white/60"},re={class:"text-xs font-[dinalternate] mt-0.5"},oe={class:"text-center"},ce={class:"text-[10px] text-white/60"},ue={class:"text-xs font-[dinalternate] mt-0.5"},pe={class:"text-right"},ve={class:"text-[10px] text-white/60"},xe={class:"text-xs font-[dinalternate] mt-0.5"},me={class:"mt-6 mx-5 rounded-2xl border border-white/20 bg-black/30"},be={class:"flex justify-between items-center p-4"},fe={class:"active-tab"},ge={class:"px-5 py-2"},he={class:"bg-white/30 rounded px-4 py-2"},ye=["placeholder"],we={class:"flex space-x-3 mt-2"},_e={class:"flex items-center text-[10px] mt-4"},ke={class:"mr-5"},Ce={class:"font-[dinpro]"},De={class:"text-[10px] text-white/60 mt-3 leading-5"},Le={class:"grid gap-x-6 grid-cols-2 pb-4 mt-4"},Pe=["disabled"],je={key:0},Ne={key:1},Te=["disabled"],Ue={key:0},Ae={key:1},Ie={class:"px-5"},Xe=j(e({__name:"index",setup(e){const{t:j}=t(),{chainId:Xe,account:Se}=a(),Re=w(),Be=_(),Ve=s(""),We=k(()=>D(Ve.value||"0",18)),{serializedTokens:Fe}=A(),{contractAddress:$e,stakeToken:qe}=S(),Ee=e=>{e.target.validity.valid?Ve.value=e.target.value:e.target.value=Ve.value},{contractAddress:Me,balance:ze,fetchBalance:He,allowance:Ke,fetchAllowance:Oe,approve:Ye}=X($e),Ze=U(k(()=>{var e;return null==(e=Fe.value.D3XAI)?void 0:e.address}),Me),Ge=U(k(()=>{var e;return null==(e=Fe.value.USDT)?void 0:e.address}),Me);s(Number(Re.query.tab)||1);const Je=e=>{Ve.value=m(ze.value*e/100n,18)},Qe=k(()=>!!Se.value),{data:et,refetch:tt}=l({queryKey:k(()=>["get_api_lpDonation_getLpDonationDividend",Se.value]),queryFn:async()=>{var e;return(null==(e=(await L.SwaggerV3Api.get_api_lpDonation_getLpDonationDividend(Se.value)).data)?void 0:e.result)||{}},enabled:Qe}),{isPending:at,mutate:st}=n({mutationFn:async()=>{await Ye(We.value),await Oe()}}),lt=s(),{isPending:nt,mutate:it}=n({mutationFn:async()=>{var e,t;if(!Ve)return P.error(j("请输入")+"LP"+j("数量"));if(We.value>ze.value)return P.error("LP"+j("余额不足"));if(!(null==(e=lt.value)?void 0:e.state.isBind))return P.error(j("请先绑定上级"));if(!(null==(t=lt.value)?void 0:t.state.canBuyNft))return P.error(j("没有购买权限"));const a=P.loading(j("质押中"));try{await qe(We.value),Ve.value="",He(),Oe(),P.update(a,{type:"success",render:j("质押成功"),isLoading:!1,autoClose:2e3})}catch(s){P.update(a,{type:"error",render:s.shortMessage||j("质押失败"),isLoading:!1,autoClose:2e3})}}});return i(Se,()=>{tt()}),(e,t)=>{var a,s,l,n,i,w,_;return C(),d("div",B,[r("",!0),o("div",V,[o("div",W,[o("div",F,[t[10]||(t[10]=o("img",{src:R,alt:"USDT",class:"h-7 w-7"},null,-1)),o("img",{src:null==(a=c(Fe).D3XAI)?void 0:a.logoURL,alt:"D3X",class:"h-7 w-7 absolute -right-3 -bottom-3"},null,8,$)]),o("div",q,[t[11]||(t[11]=o("div",{class:"text-lg font-bold font-[dinpro] text-nowrap"}
1,"USDT / D3XAI LP",-1)),o("div",{class:"text-xs text-[#18C18D] flex items-center",onClick:t[0]||(t[0]=e=>{var t;return c(u)(c(Xe),"address",null==(t=c(Fe).D3XAI_USDT_LP)?void 0:t.address)})},[o("span",null,p(c(j)("查看合约")),1),v(x,{name:"viewContract",class:"w-3 h-3 ml-1"})])]),o("button",{onClick:t[1]||(t[1]=e=>c(Be).push("/earn?subTab=4&tab=0")),class:"ml-auto rounded-md text-sm py-1 px-3 border text-nowrap"},p(c(j)("查看收益")),1)]),o("div",E,[o("h3",M,p(c(j)("流动池")),1),o("div",z,[o("div",H,[t[12]||(t[12]=o("img",{src:"/assets/D3X-BcX-oCUF.png",alt:"D3X",class:"h-4 w-4 mr-2"},null,-1)),o("span",K,p(c(I)(c(m)(c(Ze).balance.value,18))),1)]),o("div",O,[t[13]||(t[13]=o("img",{src:R,alt:"USDT",class:"h-4 w-4 mr-2"},null,-1)),o("span",Y,p(c(I)(c(m)(c(Ge).balance.value,18))),1)])]),o("div",Z,[o("div",null,[o("div",G,p(c(j)("总权重")),1),o("div",J,p(c(I)(Number(null==(s=c(et))?void 0:s.totalWeight)||0)),1)]),o("div",Q,[o("div",ee,[o("span",te,p(c(j)("个人权重")),1)]),o("div",ae,p(c(I)(Number(null==(l=c(et))?void 0:l.accountWeight)||0)),1)]),o("div",se,[o("div",le,p(c(j)("个人质押")),1),o("div",ne,p(c(I)(Number(null==(n=c(et))?void 0:n.accountWeight)||0)),1)]),o("div",ie,[o("div",de,p(c(j)("分红池")),1),o("div",re,p(c(I)(Number(null==(i=c(et))?void 0:i.totalPool)||0)),1)]),o("div",oe,[o("div",ce,p(c(j)("累计分红")),1),o("div",ue,p(c(I)(Number(null==(w=c(et))?void 0:w.totalReward)||0)),1)]),o("div",pe,[o("div",ve,p(c(j)("昨日分红")),1),o("div",xe,p(c(I)(Number(null==(_=c(et))?void 0:_.yesterdayReward)||0)),1)])])])]),o("div",me,[o("div",be,[o("div",fe,"365"+p(c(j)("天"))+"LP",1),o("div",{onClick:t[2]||(t[2]=e=>c(Be).push("/lp/orderRecord")),class:"text-xs text-white/60 underline underline-offset-2"},p(c(j)("订单记录")),1)]),o("div",ge,[o("div",he,[b(o("input",{"onUpdate:modelValue":t[3]||(t[3]=e=>Ve.value=e),pattern:"^[0-9]*[.]?[0-9]{0,18}$",type:"text",class:"bg-transparent w-full outline-none text-white",placeholder:`${c(j)("请输入质押")} LP${c(j)("数量")}`,onInput:Ee},null,40,ye),[[f,Ve.value]])]),o("div",we,[o("button",{onClick:t[4]||(t[4]=e=>Je(25n)),class:"border-[0.3px] py-0.5 px-2 rounded text-[10px] flex-1"},"25%"),o("button",{onClick:t[5]||(t[5]=e=>Je(50n)),class:"border-[0.3px] py-0.5 px-2 rounded text-[10px] flex-1"},"50%"),o("button",{onClick:t[6]||(t[6]=e=>Je(100n)),class:"border-[0.3px] py-0.5 px-2 rounded text-[10px] flex-1"},"MAX")]),o("div",_e,[o("div",ke,[o("span",null,"LP"+p(c(j)("余额"))+": ",1),o("span",Ce,p(c(I)(c(m)(c(ze),18))),1)])]),o("div",De,p(c(j)("注"))+":"+p(c(j)("质押需要满足一个自然日"))+","+p(c(j)("开始结算奖励"))+"。"+p(c(j)("满足一个自然日后可以随时取出")),1),o("div",Le,[o("button",{class:"flex items-center justify-center border px-2 rounded-full",onClick:t[7]||(t[7]=e=>c(Be).push("/lp/add"))},[o("span",null,p(c(j)("添加"))+"LP",1),v(x,{name:"viewContract",class:"w-3 h-3 ml-1"})]),c(Se)?!c(Ke)||c(Ke)<We.value?(C(),d("button",{key:1,class:h(["text-sm bg-white rounded-full text-[#333] font-medium h-9",{"opacity-50":!Ve.value}]),onClick:t[8]||(t[8]=e=>c(st)()),disabled:c(at)||!Ve.value||Number(Ve.value)<=0},[c(at)?(C(),d("span",je,[y(p(c(j)("授权中"))+" ",1),t[14]||(t[14]=o("span",{class:"loading loading-dots loading-md"},null,-1))])):(C(),d("span",Ne,p(c(j)("授权"))+" LP",1))],10,Pe)):(C(),d("button",{key:2,class:h(["min-w-[50%] text-sm bg-white rounded-full text-[#333] font-medium h-9",{"opacity-50":!Ve.value}]),onClick:t[9]||(t[9]=e=>c(it)()),disabled:c(nt)||!Ve.value||Number(Ve.value)<=0},[c(nt)?(C(),d("span",Ue,[y(p(c(j)("添加中"))+" ",1),t[15]||(t[15]=o("span",{class:"loading loading-dots loading-md"},null,-1))])):(C(),d("span",Ae,p(c(j)("立即质押")),1))],10,Te)):(C(),g(N,{key:0,class:"text-sm bg-white rounded-full text-[#333] font-medium h-9"}))])])]),o("div",Ie,[v(T,{ref_key:"inviteRef",ref:lt},null,512),t[16]||(t[16]=o("div",{class:"h-10"},null,-1))])])}}}),[["__scopeId","data-v-0bd2a0f9"]]),Se={class:"pt-4"},Re=j(e({__name:"index",setup:e=>(e,t)=>(C(),d("div",Se,[v(Xe)]))}),[["__scopeId","data-v-b5200f0e"]]);export{Re as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.