text: (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-0a354926"],{1018:function(e,t,a){e.exports=a.p+"img/penGreen.4b455868.svg"},"17be":function(e,t,a){e.exports=a.p+"img/penBuild.5aa660d2.svg"},"794f":function(e,t,a){},"81da":function(e,t,a){e.exports=a.p+"img/greybox.4a622727.svg"},bb51:function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"home"},[r("div",{staticClass:"h_height tc font30 fW600 capitalize"},[e._v("\n    "+e._s(e.$t("home.home0"))+":\n    "),0===e.height?r("i",{staticClass:"el-icon-loading font18"}):r("span",[e._v(e._s(e.height))])]),r("div",{staticClass:"search"},[r("el-input",{attrs:{placeholder:e.$t("public.searchTip")},nativeOn:{keyup:function(t){return"button"in t||!e._k(t.keyCode,"enter",13,t.key,"Enter")?e.clickSearch(t):null}},model:{value:e.homeSearch,callback:function(t){e.homeSearch=t},expression:"homeSearch"}},[r("i",{staticClass:"el-icon-search el-input__icon click",attrs:{slot:"suffix"},on:{click:e.clickSearch},slot:"suffix"})])],1),r("div",{directives:[{name:"loading",rawName:"v-loading",value:e.countLoading,expression:"countLoading"}],staticClass:"h_count"},[r("ul",{staticClass:"w1200"},[r("li",[r("p",{staticClass:"font18 capitalize"},[e._v(e._s(e.$t("consensus.consensus1"))+" "),r("i",{staticClass:"el-icon-d-arrow-right"})]),r("h5",{staticClass:"font24 click",on:{click:function(t){e.toUrl("consensus")}}},[e._v(e._s(e.count.nodeNumber))])]),r("li",[r("p",{staticClass:"font18 capitalize"},[e._v(e._s(e.$t("home.home2"))+" "),r("i",{staticClass:"el-icon-d-arrow-right"})]),r("h5",{staticClass:"font24 click",on:{click:function(t){e.toUrl("consensus")}}},[e._v(e._s(e.count.entrustNumber)+"K")])]),r("li",[r("p",{staticClass:"font18 capitalize"},[e._v(e._s(e.$t("home.home3")))]),r("h5",{staticClass:"font24"},[e._v(e._s(e.count.circulateNumber)+"K")])]),r("li",[r("p",{staticClass:"font18 capitalize"},[e._v(e._s(e.$t("home.home4")))]),r("h5",{staticClass:"font24"},[e._v(e._s(e.count.tradeNumber)+"K")])])])]),r("div",{directives:[{name:"loading",rawName:"v-loading",value:e.packerListLoading,expression:"packerListLoading"}],staticClass:"h_animation"},[r("ul",{staticClass:"w1200 clicks",on:{click:function(t){e.toUrl("rotationInfo",e.rotationIndex)}}},e._l(e.packerList,function(t,o){return r("li",{key:o},[r("p",{staticClass:"tc font12"},[e._v(e._s(t.agentName?t.agentName:t.packingAddress))]),r("p",{directives:[{name:"show",rawName:"v-show",value:t.order!==e.pagekerId,expression:"item.order !== pagekerId"}],staticClass:"greybox tc"},[t.blockHash&&!t.yellow?r("img",{attrs:{src:a("1018")}}):t.yellow?r("img",{attrs:{src:a("c59f")}}):r("img",{attrs:{src:a("81da")}})]),r("p",{directives:[{name:"show",rawName:"v-show",value:t.order===e.pagekerId,expression:"item.order === pagekerId"}],staticClass:"blocks tc"},[r("img",{attrs:{src:a("17be")}})])])}),0)]),r("div",{staticClass:"h_chart w1200"},[r("div",{staticClass:"h_chart_left"},[r("div",{staticClass:"h_chart_title tc"},[r("span",{staticClass:"font14 tc capitalize"},[e._v(e._s(e.$t("home.home5")))]),e.isMobile?e._e():r("el-tooltip",{staticClass:"calc fr",attrs:{effect:"light",content:e.$t("home.home6"),placement:"top"}},[r("i",{staticClass:"iconfont icon-calculator_icon font18 cursor-p click",on:{click:e.toCalc}})]),e.isMobile?r("div",{staticClass:"calc fr"},[r("i",{staticClass:"iconfont icon-calculator_icon font18 cursor-p click",on:{click:e.toCalc}})]):e._e()],1),r("ve-line",{staticStyle:{top:"-40px"},attrs:{height:"100%",width:"100%",loading:e.yearChartLoading,data:e.yearChartData,"legend-visible":!1,colors:e.colors,settings:e.yearSettings}})],1),r("div",{staticClass:"h_chart_right"},[r("div",{staticClass:"h_chart_title tc"},[r("span",{staticClass:"font14 tc capitalize"},[e._v(e._s(e.$t("home.home7")))]),r("label",{staticClass:"calc fr font14 cursor-p click capitalize",on:{click:function(t){e.toUrl("transaction")}}},[e._v(e._s(e.$t("home.home8")))])]),r("ve-line",{staticStyle:{top:"-40px"},attrs:{height:"100%",width:"100%",loading:e.dayChartLoading,data:e.dayChartData,"legend-visible":!1,colors:e.colors,settings:e.daySettings}})],1)]),r("el-dialog",{staticClass:"home_dialog",attrs:{title:"",visible:e.calcDialog,"close-on-click-modal":!1,center:""},on:{"update:visible":function(t){e.calcDialog=t}}},[r("CalcBar")],1)],1)},o=[],s=(a("ac4d"),a("8a81"),a("ac6a"),a("901e")),n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"calcbar"},[a("h5",{staticClass:"font20 fw"},[e._v(e._s(e.$t("cale.cale0")))]),a("div",{staticClass:"tab"},[a("el-radio-group",{model:{value:e.radio,callback:function(t){e.radio=t},expression:"radio"}},[a("el-radio",{attrs:{label:1}},[e._v(e._s(e.$t("cale.cale1")))]),a("el-radio",{staticClass:"mr_50",attrs:{label:2}},[e._v(e._s(e.$t("type.4")))])],1)],1),a("div",{staticClass:"result"},[a("ul",[a("li",[e._v(e._s(e.$t("cale.cale3"))),a("label",[e._v(e._s(e.parrakeInfo.day)+" "),a("span",{staticClass:"fCN"},[e._v(e._s(e.symbol))])])]),a("li",[e._v(e._s(e.$t("cale.cale4"))),a("label",[e._v(e._s(e.parrakeInfo.week)+" "),a("span",{staticClass:"fCN"},[e._v(e._s(e.symbol))])])]),a("li",[e._v(e._s(e.$t("cale.cale5"))),a("label",[e._v(e._s(e.parrakeInfo.month)+" "),a("span",{staticClass:"fCN"},[e._v(e._s(e.symbol))])])]),a("li",[e._v(e._s(e.$t("cale.cale6"))),a("label",[e._v(e._s(e.parrakeInfo.year)+" "),a("span",{staticClass:"fCN"},[e._v(e._s(e.symbol))])])])])]),a("div",{directives:[{name:"show",rawName:"v-show",value:"1"===e.radio.toString(),expression:"radio.toString() === '1' "}],staticClass:"caleFrom partake"},[a("el-form",{ref:"partakeForm",attrs:{model:e.partakeForm,rules:e.partakeRules}},[a("el-form-item",{attrs:{label:e.$t("public.entrust"),prop:"entrust"}},[a("el-input",{model:{value:e.partakeForm.entrust,callback:function(t){e.$set(e.partakeForm,"entrust",t)},expression:"partakeForm.entrust"}})],1),a("el-form-item",{attrs:{label:e.$t("public.proportion")+"(%)",prop:"ratio"}},[a("el-input",{model:{value:e.partakeForm.ratio,callback:function(t){e.$set(e.partakeForm,"ratio",t)},expression:"partakeForm.ratio"}})],1),a("el-form-item",{attrs:{label:e.$t("public.creditValue"),prop:"credit"}},[a("el-input",{model:{value:e.partakeForm.credit,callback:function(t){e.$set(e.partakeForm,"credit",t)},expression:"partakeForm.credit"}})],1),a("el-form-item",{attrs:{label:e.$t("public.allEntrust"),prop:"allEntrust"}},[a("el-input",{model:{value:e.partakeForm.allEntrust,callback:function(t){e.$set(e.partakeForm,"allEntrust",t)},expression:"partakeForm.allEntrust"}})],1)],1)],1),a("div",{directives:[{name:"show",rawName:"v-show",value:"2"===e.radio.toString(),expression:"radio.toString() === '2' "}],staticClass:"caleFrom partake"},[a("el-form",{ref:"newNodeFrom",attrs:{model:e.newNodeFrom,rules:e.newNodeRules}},[a("el-form-item",{attrs:{label:e.$t("public.bond"),prop:"newEnsure"}},[a("el-input",{model:{value:e.newNodeFrom.newEnsure,callback:function(t){e.$set(e.newNodeFrom,"newEnsure",t)},expression:"newNodeFrom.newEnsure"}})],1),a("el-form-item",{attrs:{label:e.$t("public.proportion")+"(%)",prop:"newRadio"}},[a("el-input",{model:{value:e.newNodeFrom.newRadio,callback:function(t){e.$set(e.newNodeFrom,"newRadio",t)},expression:"newNodeFrom.newRadio"}})],1),a("el-form-item",{attrs:{label:e.$t("public.creditValue"),prop:"newCredit"}},[a("el-input",{model:{value:e.newNodeFrom.newCredit,callback:function(t){e.$set(e.newNodeFrom,"newCredit",t)},expression:"newNodeFrom.newCredit"}})],1),a("el-form-item",{attrs:{label:e.$t("public.allEntrust"),prop:"newAllEntrust"}},[a("el-input",{model:{value:e.newNodeFrom.newAllEntrust,callback:function(t){e.$set(e.newNodeFrom,"newAllEntrust",t)},expression:"newNodeFrom.newAllEntrust"}})],1),a("el-form-item",{attrs:{label:e.$t("public.entrust"),prop:"newEntrust"}},[a("el-input",{model:{value:e.newNodeFrom.newEntrust,callback:function(t){e.$set(e.newNodeFrom,"newEntrust",t)},expression:"newNodeFrom.newEntrust"}})],1)],1)],1)])},i=[],l=(a("6b54"),a("c5f6"),{data:function(){var e=this,t=function(t,a,r){a||r(new Error(e.$t("cale.cale7"))),a=Number(a),"number"!==typeof a||isNaN(a)?r(new Error(e.$t("cale.cale9"))):a<2e3||a>5e5?r(new Error(e.$t("cale.cale8"))):r()},a=function(t,a,r){a||r(new Error(e.$t("cale.cale10"))),a=Number(a),"number"!==typeof a||isNaN(a)?r(new Error(e.$t("cale.cale12"))):a<10||100<a?r(new Error(e.$t("cale.cale11"))):r()},r=function(t,a,r){a||r(new Error(e.$t("cale.cale13"))),a=Number(a),"number"!==typeof a||isNaN(a)?r(new Error(e.$t("cale.cale15"))):a>=0&&1<a?r(new Error(e.$t("cale.cale14"))):r()},o=function(t,a,r){a||r(new Error(e.$t("cale.cale16"))),a=Number(a),"number"!==typeof a||isNaN(a)?r(new Error(e.$t("cale.cale18"))):a<2e5||a>1e8?r(new Error(e.$t("cale.cale17"))):r()},s=function(t,a,r){a||r(new Error(e.$t("cale.cale19"))),a=Number(a),"number"!==typeof a||isNaN(a)?r(new Error(e.$t("cale.cale21"))):a<2e4||a>2e5?r(new Error(e.$t("cale.cale20"))):r()},n=function(t,a,r){a||r(new Error(e.$t("cale.cale10"))),a=Number(a),"number"!==typeof a||isNaN(a)?r(new Error(e.$t("cale.cale12"))):a<10||100<a?r(new Error(e.$t("cale.cale11"))):r()},i=function(t,a,r){a||r(new Error(e.$t("cale.cale13"))),a=Number(a),"number"!==typeof a||isNaN(a)?r(new Error(e.$t("cale.cale15"))):a<0||a>1?r(new Error(e.$t("cale.cale14"))):r()},l=function(t,a,r){a||r(new Error(e.$t("cale.cale16"))),a=Number(a),"number"!==typeof a||isNaN(a)?r(new Error(e.$t("cale.cale18"))):a<2e5||a>1e8?r(new Error(e.$t("cale.cale17"))):r()},c=function(t,a,r){a||r(new Error(e.$t("cale.cale22"))),a=Number(a),"number"!==typeof a||isNaN(a)?r(new Error(e.$t("cale.cale24"))):a<2e5||a>5e5?r(new Error(e.$t("cale.cale23"))):r()};return{radio:1,partakeForm:{entrust:2e3,ratio:10,credit:1,allEntrust:this.$store.state.NULSNumber.consensusTotal/1e8},partakeRules:{entrust:[{validator:t,trigger:"change"}],ratio:[{validator:a,trigger:"change"}],credit:[{validator:r,trigger:"change"}],allEntrust:[{validator:o,trigger:"change"}]},newNodeFrom:{newEnsure:2e4,newRadio:10,newCredit:1,newAllEntrust:this.$store.state.NULSNumber.consensusTotal/1e8,newEntrust:2e5},newNodeRules:{newEnsure:[{validator:s,trigger:"change"}],newRadio:[{validator:n,trigger:"change"}],newCredit:[{validator:i,trigger:"change"}],newAllEntrust:[{validator:l,trigger:"change"}],newEntrust:[{validator:c,trigger:"change"}]},symbol:sessionStorage.hasOwnProperty("symbol")?sessionStorage.getItem("symbol"):"DATT"}},created:function(){},watch:{radio:function(e,t){1===t?this.$refs["partakeForm"].resetFields():this.$refs["newNodeFrom"].resetFields()}},computed:{parrakeInfo:function(){var e={day:0,week:0,month:0,year:0},t=s["BigNumber"].clone();if(t.config({DECIMAL_PLACES:4}),"2"===this.radio.toString()){var a=this.newNodeFrom.newCredit*this.newNodeFrom.newEnsure*5e6/this.newNodeFrom.newAllEntrust+this.newNodeFrom.newCredit*this.newNodeFrom.newEntrust*5e6*this.newNodeFrom.newRadio*.01/this.newNodeFrom.newAllEntrust;e.year=t(a).div(1).toNumber()}else{var r=this.partakeForm.credit*(1-.01*this.partakeForm.ratio)*5e6*this.partakeForm.entrust/this.partakeForm.allEntrust;e.year=t(r).div(1).toNumber()}return e.month=t(e.year).div(12).toNumber(),e.day=t(e.year).div(365).toNumber(),e.week=t(e.day).multipliedBy(7).toNumber(),e}},methods:{count:function(e){this.$refs[e].validate(function(e){if(!e)return console.log("error submit!!"),!1;alert("submit!")})}}}),c=l,u=(a("bd74"),a("2877")),d=Object(u["a"])(c,n,i,!1,null,null,null),h=d.exports,m=a("6ace"),p={data:function(){return this.colors=["#7db46d","#7db46d"],this.yearSettings={yAxisType:["percent"],labelMap:{value:"APR"}},this.daySettings={yAxisType:["KMB"],labelMap:{value:"TXS"}},{isMobile:!1,homeSearch:"",height:this.$store.state.height,count:{nodeNumber:0,entrustNumber:"0",circulateNumber:"0",tradeNumber:"0"},countLoading:!0,calcDialog:!1,packerList:[],packerListLoading:!0,rotationIndex:"",pagekerId:0,yearChartData:{},dayChartData:{},yearChartLoading:!0,yearRateData:[],dayRateData:[],dayChartLoading:!0,homeSetInterval:null,heightSetInterval:null}},created:function(){var e=this;this.isMobile=/(iPhone|iOS|Android|Windows Phone)/i.test(navigator.userAgent),this.getNULSInfo(),this.getYearRateData(3),this.get14DaysData(0),this.getRotationList(),this.homeSetInterval=setInterval(function(){e.getRotationList(),e.height=e.$store.state.height},1e4)},mounted:function(){var e=this;this.heightSetInterval=setInterval(function(){0===e.height&&(e.height=e.$store.state.height,e.getNULSInfo(),e.getYearRateData(3),e.get14DaysData(0),e.getRotationList())},1e3)},destroyed:function(){clearInterval(this.homeSetInterval),clearInterval(this.heightSetInterval)},components:{CalcBar:h},methods:{getNULSInfo:function(){this.$store.state.nodeNumber.consensusCount?this.count.nodeNumber=this.$store.state.nodeNumber.consensusCount:this.count.nodeNumber=0;var e=this.$store.state.NULSNumber;if(0!==e.length){var t=new s["BigNumber"](Object(m["h"])(e.total,11));this.count.circulateNumber=t.toFormat(2);var a=new s["BigNumber"](Object(m["h"])(e.consensusTotal,11));this.count.entrustNumber=a.toFormat(2);var r=new s["BigNumber"](Object(m["h"])(e.circulation,11));this.count.tradeNumber=r.toFormat(2),this.countLoading=!1}},clickSearch:function(){var e=this;this.$post("/","search",[this.homeSearch]).then(function(t){t.hasOwnProperty("result")?"block"===t.result.type?(e.$router.push({name:"blockInfo",query:{height:t.result.data.txList[0].height}}),sessionStorage.setItem("navActive","block")):"tx"===t.result.type?e.$router.push({name:"transactionInfo",query:{hash:t.result.data.hash}}):"account"===t.result.type?e.$router.push({name:"addressInfo",query:{address:t.result.data.address}}):"contract"===t.result.type?e.$router.push({name:"contractsInfo",query:{contractAddress:t.result.data.contractAddress,tabName:"first"}}):e.$message({message:e.$t("codeInfo.codeInfo12"),type:"error",duration:1e3}):e.$message({message:e.$t("codeInfo.codeInfo12"),type:"error",duration:1e3}),e.homeSearch=""}).catch(function(e){console.log(e)})},toCalc:function(){this.calcDialog=!0},getRotationList:function(){var e=this;this.$post("/","getBestRoundInfo",[]).then(function(t){if(t.hasOwnProperty("result")){var a=!0,r=!1,o=void 0;try{for(var s,n=t.result.itemList[Symbol.iterator]();!(a=(s=n.next()).done);a=!0){var i=s.value;i.agentName=i.agentName?i.agentName:Object(m["f"])(i.seedAddress,6)}}catch(c){r=!0,o=c}finally{try{a||null==n.return||n.return()}finally{if(r)throw o}}e.rotationIndex=t.result.index,e.pagekerId=t.result.packerOrder,e.packerList=t.result.itemList.slice(t.result.packerOrder-1,t.result.packerOrder+6);var l=t.result.itemList.slice(t.result.packerOrder-2,t.result.packerOrder-1);e.packerList.unshift(l[0]),e.packerListLoading=!1}})},getYearRateData:function(e){var t=this;this.$post("/","getAnnulizedRewardStatistical",[e]).then(function(e){if(e.hasOwnProperty("result")){var a=!0,r=!1,o=void 0;try{for(var s,n=e.result[Symbol.iterator]();!(a=(s=n.next()).done);a=!0){var i=s.value;i.value=i.value/100}}catch(l){r=!0,o=l}finally{try{a||null==n.return||n.return()}finally{if(r)throw o}}t.yearRateData=e.result}})},get14DaysData:function(e){var t=this;this.$post("/","getTxStatistical",[e]).then(function(e){e.hasOwnProperty("result")&&(t.dayRateData=e.result)})},toUrl:function(e,t){"transaction"===e?this.$router.push({name:e}):this.$router.push({name:e,query:{rotation:t}})}},watch:{yearRateData:function(){this.yearChartLoading=!1,this.yearChartData={columns:["key","value"],rows:this.yearRateData}},dayRateData:function(){this.dayChartLoading=!1,this.dayChartData={columns:["key","value"],rows:this.dayRateData}}}},f=p,g=(a("de16"),Object(u["a"])(f,r,o,!1,null,null,null));t["default"]=g.exports},bd74:function(e,t,a){"use strict";var r=a("794f"),o=a.n(r);o.a},c59f:function(e,t,a){e.exports=a.p+"img/penYellow.cb31af02.svg"},de16:function(e,t,a){"use strict";var r=a("f3e7"),o=a.n(r);o.a},f3e7:function(e,t,a){}}]);