-
Notifications
You must be signed in to change notification settings - Fork 13
/
explorer.5fd96ff63d31c9746164.js
1 lines (1 loc) · 63.7 KB
/
explorer.5fd96ff63d31c9746164.js
1
"use strict";(this.webpackChunkBitShares2_light=this.webpackChunkBitShares2_light||[]).push([[726],{36925:(e,t,a)=>{a.r(t),a.d(t,{default:()=>O});var s=a(96540),n=a(9476),r=a(10658),l=a.n(r),i=a(46128),o=a(64143),c=a(27584),m=a(24873),d=a(96366),p=a(63024),h=a(95093),u=a.n(h),g=a(87040),_=a(41643),b=a(55840),E=a(96218),f=a(24609),y=a(72090),A=a(50548),k=a(79260),x=a(80849),v=a.n(x),w=a(84181),S=a(15483),C=(a(81461),a(92646));const N=()=>new f.Vd({amount:0,asset_id:"1.3.0"});class B extends s.Component{constructor(e){super(),this.state={info:null,filterValue:null,showModal:!1,amount:null,balanceError:!1,maxAmount:!1,feeAmount:N(),mortgageAmount:0,rateAmount:0},this.showAcceptModal=this.showAcceptModal.bind(this),this.hideAcceptModal=this.hideAcceptModal.bind(this),this._handleFilterInput=this._handleFilterInput.bind(this),this._checkBalance=this._checkBalance.bind(this)}componentDidMount(){_.Ay.getAll({flag:"first"})}_checkBalance(){const{currentAccount:e}=this.props,t=y.ChainStore.getAccount(e),{feeAmount:a,mortgageAmount:s,selectAsset:n}=this.state;if(!n||!t)return;const r=t.getIn(["balances",n.get("id")]),l=t.getIn(["balances",a.asset_id]);if(!r)return this.setState({balanceError:!0});let i=y.ChainStore.getObject(r),o=l?y.ChainStore.getObject(l):null;if(o&&0!==o.get("balance")||this.setState({feeAmount:N()}),!i||!a)return;if(!s)return this.setState({balanceError:!1});let c=new f.Vd({asset_id:n.get("id"),amount:s,precision:n.get("precision")}).getAmount({real:!0});const m=(0,S.rT)(c,n,a,i);null!==m&&this.setState({balanceError:!m})}showAcceptModal(e){let t=e.acceptable_collateral.map((e=>e[0])),a=e.asset_type,s=t[0];"string"==typeof s&&(s=y.ChainStore.getAsset(s)),"string"==typeof a&&(a=y.ChainStore.getAsset(a)),this.setState({showModal:!0,assetList:t,selectAsset:s,debtAsset:a,currentBalance:e.current_balance,info:e})}hideAcceptModal(){this.setState({showModal:!1})}_handleFilterInput(e){this.setState({filterValue:e.target.value.toUpperCase()})}_sortByAmount(e,t,a,s){return g.A.convert_satoshi_to_typed(e,y.ChainStore.getAsset(t))-g.A.convert_satoshi_to_typed(a,y.ChainStore.getAsset(s))}_getColumns(){let{locale:e}=this.props;return"zh"===e&&(e="zh_CN"),[{title:"ID",dataIndex:"id"},{title:l().translate("credit_offer.asset"),dataIndex:"asset_type",render:e=>s.createElement(m.A,{asset:e})},{title:l().translate("credit_offer.account"),dataIndex:"owner_account",render:e=>s.createElement(p.A,{account:e})},{title:l().translate("credit_offer.total_amount"),dataIndex:"total_balance",align:"right",sorter:(e,t)=>this._sortByAmount(e.total_balance,e.asset_type,t.total_balance,t.asset_type),render:(e,t)=>s.createElement(d.A,{amount:e,asset:t.asset_type,hide_asset:!0,trimZero:!0})},{title:l().translate("credit_offer.available_amount"),align:"right",dataIndex:"current_balance",sorter:(e,t)=>this._sortByAmount(e.current_balance,e.asset_type,t.current_balance,t.asset_type),render:(e,t)=>s.createElement(d.A,{amount:e,asset:t.asset_type,hide_asset:!0,trimZero:!0})},{title:l().translate("credit_offer.min_borrow"),align:"right",dataIndex:"min_deal_amount",sorter:(e,t)=>this._sortByAmount(e.min_deal_amount,e.asset_type,t.min_deal_amount,t.asset_type),render:(e,t)=>s.createElement(d.A,{amount:e,asset:t.asset_type,hide_asset:!0,trimZero:!0})},{title:l().translate("credit_offer.fee_rate"),align:"right",dataIndex:"fee_rate",sorter:(e,t)=>e.fee_rate-t.fee_rate,render:e=>`${g.A.format_number(parseFloat(e)/parseFloat(_.g_)*100,2,!1)}%`},{title:l().translate("credit_offer.repay_period"),dataIndex:"max_duration_seconds",align:"right",sorter:(e,t)=>e.max_duration_seconds-t.max_duration_seconds,render:t=>(0,_.EA)(t,e)},{title:l().translate("credit_offer.validity_period"),dataIndex:"auto_disable_time",render:e=>u().utc(e).local().format("YYYY-MM-DD HH:mm:ss")},{title:l().translate("credit_offer.mortgage_assets"),dataIndex:"acceptable_collateral",render:e=>e.map((e=>s.createElement("div",{key:e[0]},s.createElement(m.A,{asset:e[0]}))))},{title:l().translate("credit_offer.borrow"),key:"action",render:(e,t)=>s.createElement("span",{style:{fontSize:20}},s.createElement(i.Tooltip,{title:l().translate("credit_offer.borrow")},s.createElement(i.Icon,{type:"dollar",style:{cursor:"pointer",marginRight:"20px"},onClick:()=>{this.showAcceptModal(t)}})))}]}_sortByAsset(){let{allList:e}=this.props,{filterValue:t}=this.state;return t?e.filter((e=>{let a=y.ChainStore.getAsset(e.asset_type)?.get("symbol");return a.includes(t.toUpperCase())})):e}_onSubmit(){let{selectAsset:e,mortgageAmount:t,info:a,debtAsset:s,amount:n}=this.state,{currentAccount:r}=this.props,l=y.ChainStore.getAccount(r);if(a.owner_account!==l.get("id")){let r={borrower:l.get("id"),offer_id:a.id,borrow_amount:new f.Vd({asset_id:s.get("id"),real:n,precision:s.get("precision")}),collateral:new f.Vd({asset_id:e.get("id"),amount:t,precision:e.get("precision")}),max_fee_rate:a.fee_rate,min_duration_seconds:a.max_duration_seconds};_.Ay.accept(r).then((()=>{this.hideAcceptModal()})).catch((e=>{console.error(e)}))}}_onAssetChange(e){this.setState({selectAsset:y.ChainStore.getAsset(e)},this._checkBalance)}_onAmountChanged({amount:e,asset:t}){if(!t)return;"object"!=typeof t&&(t=y.ChainStore.getAsset(t));let{info:a,selectAsset:s}=this.state;if(t&&a&&s){let n=a.acceptable_collateral.findIndex((e=>e[0]==s.get("id")));if(n<0)return;let r=a.acceptable_collateral[n][1].base,l=a.acceptable_collateral[n][1].quote,i=new f.Vd({asset_id:r.asset_id,amount:r.amount,precision:y.ChainStore.getAsset(r.asset_id).get("precision")}),o=new f.Vd({asset_id:l.asset_id,amount:l.amount,precision:y.ChainStore.getAsset(l.asset_id).get("precision")}),c=new f.gm({base:i,quote:o}),m=parseFloat(e)*c.toReal(!0);m=Number.isNaN(m)?0:Math.ceil(m*10**s.get("precision")),new f.Vd({asset_id:s.get("id"),real:m,precision:s.get("precision")});let d=new f.Vd({asset_id:t.get("id"),real:e,precision:t.get("precision")}),p=parseFloat(d.getAmount())/a.total_balance,h=parseFloat(a.fee_rate)/_.g_*a.total_balance*p;this.setState({amount:e,error:null,maxAmount:!1,mortgageAmount:m,rateAmount:h},this._checkBalance)}}_setTotal(e){const{currentBalance:t}=this.state;if(e){let a=new f.Vd({amount:t,asset_id:e.get("id"),precision:e.get("precision")});this.setState({maxAmount:!0}),this._onAmountChanged({amount:a.getAmount({real:!0}),asset:e.get("id")})}}_onFeeChanged(e){e&&this.setState({feeAmount:e,error:null},this._checkBalance)}_renderAcceptModal(){let{selectAsset:e,assetList:t,debtAsset:a,amount:n,currentBalance:r,balanceError:c,feeAmount:m,info:p,mortgageAmount:h,rateAmount:u}=this.state;if(!a)return null;let{currentAccount:g}=this.props,b=y.ChainStore.getAccount(g),E=null,x=new f.Vd({amount:p.min_deal_amount,asset_id:a.get("id"),precision:a.get("precision")}),S=x.clone(r),C=n<x.getAmount({real:!0}),N=S.getAmount({real:!0}),B=n>N||N<=0;const O=!n||C||B||!e||c||b.get("id")==p.owner_account;let I=B?"has-error":"";E=r&&r>0?s.createElement("span",null,s.createElement(v(),{component:"span",content:"credit_offer.current_balance"}),":"," ",s.createElement("span",{className:I,style:{borderBottom:"#A09F9F 1px dotted",cursor:"pointer"},onClick:this._setTotal.bind(this,a,m.getAmount({real:!0}),m.asset_id)},s.createElement(d.A,{amount:r,asset:a.get("id"),trimZero:!0}))):s.createElement("span",null,s.createElement("span",{className:I},s.createElement(v(),{content:"transfer.errors.noFunds"})));const T=e.toJS(),L=o.A.getFlagBooleans(T.options.flags,!!T.bitasset_data_id),j=y.ChainStore.getObject(T.issuer,!1,!1),P=j?j.get("name"):"";let M=[l().translate("credit_offer.override_authority_warning_p1",{symbol:T.symbol})," ",s.createElement("a",{target:"_blank",href:`/account/${P}`},P),s.createElement("br",null),l().translate("credit_offer.override_authority_warning_p2")," ",s.createElement("a",{target:"_blank",href:`/asset/${T.symbol}`},T.symbol)];return s.createElement(i.Modal,{wrapClassName:"modal--transaction-confirm",title:l().translate("credit_offer.borrow"),visible:this.state.showModal,id:"modal-repay",overlay:!0,onCancel:this.hideAcceptModal,footer:[p.owner_account==p.owner_account&&s.createElement(v(),{component:"span",content:"credit_offer.info_borrow_err"})||null,s.createElement(i.Button,{key:"send",disabled:O,onClick:this._onSubmit.bind(this)},s.createElement(v(),{content:"wallet.submit"})),s.createElement(i.Button,{key:"Cancel",onClick:this.hideAcceptModal},s.createElement(v(),{content:"wallet.cancel"}))]},L.override_authority&&s.createElement("div",{style:{marginBottom:12}},s.createElement(i.Alert,{message:M})),s.createElement("div",{className:"grid-block vertical no-overflow"},s.createElement(i.Form,{className:"full-width",layout:"vertical"},s.createElement(i.Form.Item,{label:l().translate("credit_offer.mortgage_assets"),colon:!1},s.createElement("div",{style:{textAlign:"right",width:"100%"}},s.createElement(k.A,{selectStyle:{width:"100%"},value:e.get("symbol"),assets:t,onChange:this._onAssetChange.bind(this)}))),s.createElement(A.A,{label:"credit_offer.borrow_amount",amount:n,asset:a.get("id"),display_balance:E,onChange:this._onAmountChanged.bind(this),allowNaN:!0}),s.createElement(i.Form.Item,{label:l().translate("credit_offer.repay_period"),labelCol:{span:8},wrapperCol:{span:16},colon:!1},s.createElement("div",{style:{textAlign:"right",width:"100%"}},(0,_.EA)(p.max_duration_seconds,this.props.locale))),s.createElement(i.Form.Item,{label:l().translate("credit_offer.min_borrow"),labelCol:{span:8},wrapperCol:{span:16},colon:!1},s.createElement("div",{style:{textAlign:"right",width:"100%",color:C?"red":"#7ed321"}},s.createElement(d.A,{amount:p.min_deal_amount,asset:p.asset_type,trimZero:!0}))),s.createElement(i.Form.Item,{label:l().translate("credit_offer.mortgage_assets"),labelCol:{span:8},wrapperCol:{span:16},colon:!1},s.createElement("div",{style:{textAlign:"right",width:"100%",color:c?"red":"#7ed321"}},s.createElement(d.A,{amount:h,asset:e.get("id"),trimZero:!0}))),s.createElement(i.Form.Item,{label:l().translate("credit_offer.estimated_fee"),labelCol:{span:8},wrapperCol:{span:16},colon:!1},s.createElement("div",{style:{textAlign:"right",width:"100%",color:"#7ed321"}},s.createElement("span",null,s.createElement(d.A,{amount:u,asset:a.get("id"),trimZero:!0}),` (${100*parseFloat(p.fee_rate)/_.g_}%)`))),s.createElement(w.A,{account:b,transaction:{type:"credit_offer_accept",data:{type:"memo",content:null}},onChange:this._onFeeChanged.bind(this)}))))}render(){let{filterValue:e}=this.state,t=this._sortByAsset();return s.createElement("div",{className:"grid-content app-tables no-padding"},s.createElement("div",{className:"content-block small-12"},s.createElement("div",{className:"generic-bordered-box",style:{margin:"20px"}},s.createElement("div",{className:"header-selector"},s.createElement("div",{className:"filter inline-block"},s.createElement(c.A,{value:e,placeholder:l().translate("credit_offer.plh_input_asset_name"),onChange:this._handleFilterInput})))),s.createElement("div",{className:"generic-bordered-box",style:{marginBottom:"40px"}},s.createElement("div",{className:"grid-wrapper"},s.createElement(i.Table,{rowKey:"id",columns:this._getColumns(),dataSource:t,pagination:{hideOnSinglePage:!0,pageSize:10}}))),this._renderAcceptModal()))}}const O=B=(0,n.N)(B,{listenTo:()=>[b.A,E.A,C.A],getProps:e=>({currentAccount:b.A.getState().currentAccount,passwordAccount:b.A.getState().passwordAccount,allList:E.A.getState().allList,locale:C.A.getState().currentLocale})})},2156:(e,t,a)=>{a.r(t),a.d(t,{default:()=>Qe});var s=a(96540),n=a(10658),r=a.n(n),l=a(9404),i=a.n(l),o=a(12569),c=a(72342),m=a(72090),d=a(96366),p=a(80849),h=a.n(p),u=a(32382),g=a(9476),_=a(84259),b=a(74248),E=a(32485),f=a.n(E),y=a(24180),A=a(46128),k=a(27584),x=a(87040);a(27641);class v extends s.Component{static propTypes={witness:o.A.ChainAccount.isRequired};_onRowClick(e){e.preventDefault(),this.props.history.push(`/account/${this.props.witness.get("name")}`)}render(){let{witness:e,isCurrent:t,rank:a}=this.props,n=m.ChainStore.getWitnessById(this.props.witness.get("id"));if(!n)return null;n.get("total_votes");let r=n.get("last_aslot"),l={};l=this.props.most_recent-r>100?{borderLeft:"1px solid #FCAB53"}:{borderLeft:"1px solid #50D2C2"};let i=new Date(Date.now()-(this.props.most_recent-r)*m.ChainStore.getObject("2.0.0").getIn(["parameters","block_interval"])*1e3),o=t?"active-witness":"",c=n.get("total_missed"),p=f()("txtlabel",{success:c<=500},{info:c>500&&c<=1250},{warning:c>1250&&c<=2e3},{error:c>=200});return s.createElement("tr",{className:o,onClick:this._onRowClick.bind(this)},s.createElement("td",null,a),s.createElement("td",{style:l},e.get("name")),s.createElement("td",null,s.createElement(u.A,{time:new Date(i)})),s.createElement("td",null,n.get("last_confirmed_block_num")),s.createElement("td",{className:p},c),s.createElement("td",null,s.createElement(d.A,{amount:n.get("total_votes"),asset:"1.3.0",decimalOffset:5})))}}v=(0,c.A)(v),v=(0,y.y)(v);class w extends s.Component{static propTypes={witnesses:o.A.ChainObjectsList.isRequired};constructor(){super(),this.state={sortBy:"rank",inverseSort:!0},this.handleBlockIdClick=this.handleBlockIdClick.bind(this)}_setSort(e){this.setState({sortBy:e,inverseSort:e===this.state.sortBy?!this.state.inverseSort:this.state.inverseSort})}handleBlockIdClick(e){return()=>{this.props.history.push(`/block/${e}`)}}render(){let{witnesses:e,current:t,cardView:a,witnessList:n}=this.props,{sortBy:r,inverseSort:l}=this.state,i=0,o={};e.filter((e=>!!e&&-1!==n.indexOf(e.get("id")))).sort(((e,t)=>{if(e&&t)return parseInt(t.get("total_votes"),10)-parseInt(e.get("total_votes"),10)})).forEach(((e,t)=>{if(e){let a=e.get("last_aslot");i<a&&(i=a),o[e.get("id")]=t+1}}));let c=[];e.length>0&&e[1]&&(c=e.filter((e=>{if(!e)return!1;let t=m.ChainStore.getObject(e.get("witness_account"));if(!t)return!1;if(!m.ChainStore.getWitnessById(t.get("id")))return!1;let a=t.get("name");return!!a&&-1!==a.indexOf(this.props.filter)})).map((e=>{const t=m.ChainStore.getObject(e.get("witness_account")),a=m.ChainStore.getWitnessById(t.get("id"));let s=a.get("last_aslot"),n=new Date(Date.now()-(this.props.current_aslot-s)*m.ChainStore.getObject("2.0.0").getIn(["parameters","block_interval"])*1e3);return{id:e.get("id"),key:t.get("name"),rank:o[e.get("id")],name:t.get("name"),signing_key:a.get("signing_key"),url:x.A.sanitize(a.get("url")),lastConfirmedBlock:{id:a.get("last_confirmed_block_num"),timestamp:n.getTime()},blocksMissed:a.get("total_missed"),votes:a.get("total_votes")}})));const p=[{key:"#",title:"#",dataIndex:"rank",sorter:(e,t)=>e.rank>t.rank?1:e.rank<t.rank?-1:0},{key:"name",title:"NAME",dataIndex:"name",sorter:(e,t)=>e.name>t.name?1:e.name<t.name?-1:0},{key:"url",title:"URL",dataIndex:"url",align:"center",render:e=>s.createElement("div",{style:{width:"100%",textAlign:"center"}},e&&(e=>/(http|https):\/\/(\w+:{0,1}\w*)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%!\-\/]))?/.test(e))(e)&&(e=>s.createElement(A.Popover,{content:s.createElement("a",{href:e,target:"_blank",rel:"noopener noreferrer"},e),trigger:"hover"},s.createElement(A.Icon,{type:"link"})))(e)||null)},{key:"lastConfirmedBlock",title:"LAST CONFIRMED BLOCK",dataIndex:"lastConfirmedBlock",render:e=>s.createElement("span",null,s.createElement("a",{style:{display:"inline-block",minWidth:"100px"},href:"javascript:void(0)",onClick:this.handleBlockIdClick(e.id)},"#",Number(e.id).toLocaleString())," ",s.createElement(u.A,{time:new Date(e.timestamp)})),sorter:(e,t)=>e.lastConfirmedBlock.timestamp>t.lastConfirmedBlock.timestamp?-1:e.lastConfirmedBlock.timestamp<t.lastConfirmedBlock.timestamp?1:0},{key:"blocksMissed",title:"BLOCKS MISSED",dataIndex:"blocksMissed",render:e=>{const t=f()("txtlabel",{success:e<=500},{info:e>500&&e<=1250},{warning:e>1250&&e<=2e3},{error:e>=200});return s.createElement("span",{className:t},e)},sorter:(e,t)=>e.blocksMissed>t.blocksMissed?1:e.blocksMissed<t.blocksMissed?-1:0},{key:"votes",title:"VOTES",dataIndex:"votes",render:e=>s.createElement(d.A,{amount:e,asset:"1.3.0",decimalOffset:5}),sorter:(e,t)=>e.votes>t.votes?1:e.votes<t.votes?-1:0},{key:"key",title:"KEY",dataIndex:"signing_key",align:"center",render:e=>s.createElement("div",{style:{textAlign:"center",width:"100%"}},(e=>s.createElement(A.Popover,{content:s.createElement("span",null,e),trigger:"hover"},s.createElement(A.Icon,{type:"key"})))(e))}];return s.createElement(A.Table,{rowClassName:e=>e.id===t?"active-witness":"",columns:p,dataSource:c,pagination:!1})}}w=(0,c.A)(w,{show_loader:!0}),w=(0,y.y)(w);class S extends s.Component{static propTypes={globalObject:o.A.ChainObject.isRequired,dynGlobalObject:o.A.ChainObject.isRequired};static defaultProps={globalObject:"2.0.0",dynGlobalObject:"2.1.0"};constructor(e){super(e),this.state={filterWitness:e.filterWitness||"",cardView:e.cardView}}_onFilter(e){this.setState({filterWitness:e.target.value.toLowerCase()}),_.A.changeViewSetting({filterWitness:e.target.value.toLowerCase()})}_toggleView(){_.A.changeViewSetting({cardView:!this.state.cardView}),this.setState({cardView:!this.state.cardView})}render(){let{dynGlobalObject:e,globalObject:t}=this.props;e=e.toJS(),t=t.toJS();let a=m.ChainStore.getObject(e.current_witness),n=null;return a&&(n=m.ChainStore.getObject(a.get("witness_account"))),s.createElement("div",{className:"grid-block"},s.createElement("div",{className:"grid-block"},s.createElement("div",{className:"grid-block"},s.createElement("div",{className:"grid-content "},s.createElement("div",{className:"explore-witness--info"},s.createElement("table",null,s.createElement("thead",null,s.createElement("tr",null,s.createElement("th",null,s.createElement(h(),{content:"explorer.witnesses.current"})),s.createElement("th",null,s.createElement(h(),{content:"explorer.blocks.active_witnesses"})),s.createElement("th",null,s.createElement(h(),{content:"explorer.witnesses.participation"})),s.createElement("th",null,s.createElement(h(),{content:"explorer.witnesses.pay"})),s.createElement("th",null,s.createElement(h(),{content:"explorer.witnesses.budget"})),s.createElement("th",null,s.createElement(h(),{content:"explorer.witnesses.next_vote"})))),s.createElement("tbody",null,s.createElement("tr",null,s.createElement("td",null,n?n.get("name"):null),s.createElement("td",null,Object.keys(t.active_witnesses).length),s.createElement("td",null,e.participation,"%"),s.createElement("td",null,s.createElement(d.A,{amount:t.parameters.witness_pay_per_block,asset:"1.3.0"})),s.createElement("td",null," ",s.createElement(d.A,{amount:e.witness_budget,asset:"1.3.0"})),s.createElement("td",null," ",s.createElement(u.A,{time:new Date(e.next_maintenance_time+"Z")})))))),s.createElement(k.A,{placeholder:r().translate("explorer.witnesses.filter_by_name"),value:this.state.filterWitness,onChange:this._onFilter.bind(this),style:{width:"200px",marginBottom:"12px",marginTop:"4px"}}),s.createElement(w,{current_aslot:e.current_aslot,current:a?a.get("id"):null,witnesses:i().List(t.active_witnesses),witnessList:t.active_witnesses,filter:this.state.filterWitness,cardView:this.state.cardView})))))}}S=(0,c.A)(S);class C extends s.Component{render(){return s.createElement(S,this.props)}}const N=C=(0,g.N)(C,{listenTo:()=>[b.A],getProps:()=>({cardView:b.A.getState().viewSettings.get("cardView"),filterWitness:b.A.getState().viewSettings.get("filterWitness")})});class B extends s.Component{static propTypes={committee_members:o.A.ChainObjectsList.isRequired};constructor(){super()}render(){let{committee_members:e,membersList:t}=this.props,a=null,n={};e.filter((e=>!!e&&-1!==t.indexOf(e.get("id")))).forEach(((e,t)=>{e&&(n[e.get("id")]=t+1)})),e.length>0&&e[1]&&(a=e.filter((e=>{if(!e)return!1;let t=m.ChainStore.getObject(e.get("committee_member_account"));return!!t&&!!m.ChainStore.getCommitteeMemberById(t.get("id"))&&-1!==t.get("name").indexOf(this.props.filter||"")})).map((e=>{let t=m.ChainStore.getObject(e.get("committee_member_account")),a=m.ChainStore.getCommitteeMemberById(t.get("id"));return{key:e.get("id"),rank:n[e.get("id")],name:t.get("name"),votes:a.get("total_votes"),url:x.A.sanitize(a.get("url"))}})));const r=[{key:"#",title:"#",dataIndex:"rank",sorter:(e,t)=>e.rank>t.rank?1:e.rank<t.rank?-1:0},{key:"name",title:"NAME",dataIndex:"name",sorter:(e,t)=>e.name>t.name?1:e.name<t.name?-1:0},{key:"votes",title:"VOTES",dataIndex:"votes",render:e=>s.createElement(d.A,{amount:e,asset:"1.3.0",decimalOffset:5}),sorter:(e,t)=>e.votes>t.votes?1:e.votes<t.votes?-1:0},{key:"url",title:"WEBPAGE",dataIndex:"url",render:e=>s.createElement("a",{href:e,target:"_blank",rel:"noopener noreferrer"},e)}];return s.createElement(A.Table,{columns:r,dataSource:a,pagination:!1})}}B=(0,c.A)(B,{show_loader:!0});class O extends s.Component{static propTypes={globalObject:o.A.ChainObject.isRequired};static defaultProps={globalObject:"2.0.0"};constructor(e){super(e),this.state={filterCommitteeMember:e.filterCommitteeMember||""}}shouldComponentUpdate(e,t){return!i().is(e.globalObject,this.props.globalObject)||t.filterCommitteeMember!==this.state.filterCommitteeMember||t.cardView!==this.state.cardView}_onFilter(e){this.setState({filterCommitteeMember:e.target.value.toLowerCase()}),_.A.changeViewSetting({filterCommitteeMember:e.target.value.toLowerCase()})}render(){let{globalObject:e}=this.props;e=e.toJS();let t=[];for(let a in e.active_committee_members)e.active_committee_members.hasOwnProperty(a)&&t.push(e.active_committee_members[a]);return s.createElement("div",{className:"grid-block"},s.createElement("div",{className:"grid-block vertical medium-horizontal"},s.createElement("div",{className:"grid-block vertical"},s.createElement("div",{className:"grid-content"},s.createElement(k.A,{placeholder:r().translate("explorer.witnesses.filter_by_name"),value:this.state.filterCommitteeMember,onChange:this._onFilter.bind(this),style:{width:"200px",marginBottom:"12px",marginTop:"4px"}}),s.createElement(B,{filter:this.state.filterCommitteeMember,committee_members:i().List(e.active_committee_members),membersList:e.active_committee_members})))))}}O=(0,c.A)(O);class I extends s.Component{render(){return s.createElement(O,this.props)}}const T=I=(0,g.N)(I,{listenTo:()=>[b.A],getProps:()=>({cardView:b.A.getState().viewSettings.get("cardViewCommittee"),filterCommitteeMember:b.A.getState().viewSettings.get("filterCommitteeMember")})});var L=a(57127),j=a(81428),P=a(37554);const{operations:M}=m.ChainTypes;let q=Object.keys(M),D={general:[0,25,26,27,28,32,33,37,39,41,49,50,52,69,70,71,72,73],asset:[10,11,12,13,14,15,16,17,18,19,38,43,44,47,48],market:[1,2,3,4,45,46,59,60,61,62,63],account:[5,6,7,8,9],business:[20,21,22,23,24,29,30,31,34,35,36]},F=[5,7,20,21,34];class V extends s.Component{static propTypes={globalObject:o.A.ChainObject.isRequired};static defaultProps={globalObject:"2.0.0"};constructor(e){super(e)}shouldComponentUpdate(e){return!i().is(e.globalObject,this.props.globalObject)}render(){let{globalObject:e,settings:t,opIds:a,title:n}=this.props;e=e.toJS();const l=m.ChainStore.getAsset("1.3.0");let i=e.parameters.current_fees,o=e.parameters.network_percent_of_fee/1e4,c=i.scale,p=i.parameters,u=t.get("fee_asset")||l.get("symbol"),g=r().translate("transaction.trxTypes"),_=a.map((e=>{let t=p.findIndex((t=>t[0]===e));if(-1===t)return void console.warn("Asking for non-existing fee id %d! Check group settings in Fees.jsx",e);let a=p[t],n=a[0],l=a[1],i=q[n],m=g[i],h=o;10===n&&(h=.5+.5*o);let _=[],b=!1,E=f()("label","info");for(let e in l){let a=l[e]*c/1e4,i=a*h,o=r().translate("transaction.feeTypes"),p=a?s.createElement(d.A,{amount:a,asset:"1.3.0"}):o._none,g=a?s.createElement(P.Rq,{fromAsset:"1.3.0",fullPrecision:!0,amount:a,toAsset:u,fullDecimals:!0}):o._none,f=i?s.createElement(d.A,{amount:i,asset:"1.3.0"}):o._none,y=i?s.createElement(P.Rq,{fromAsset:"1.3.0",fullPrecision:!0,amount:i,toAsset:u,fullDecimals:!0}):o._none,A=null;b||(b=!0,A=s.createElement("td",{rowSpan:"6",style:{width:"15em"}},s.createElement("span",{className:E},m))),F.indexOf(n)<0?"Annual Membership"!=o[e]&&_.push(s.createElement("tr",{key:n.toString()+e},A,s.createElement("td",null,o[e]),s.createElement("td",{style:{textAlign:"right"}},p,0!==a&&"BTS"!==u?s.createElement("span",null," / ",g):null),s.createElement("td",{style:{textAlign:"right"}},8!==t?f:null,8!==t&&0!==a&&"BTS"!==u?s.createElement("span",null," / ",y):null))):_.push(s.createElement("tr",{key:n.toString()+e},A,s.createElement("td",null,o[e]),s.createElement("td",{style:{textAlign:"right"}},"- ",s.createElement("sup",null,"*")),s.createElement("td",{style:{textAlign:"right"}},f,0!==a&&"BTS"!==u?s.createElement("span",null," / ",y):null)))}return s.createElement("tbody",{key:t},_)}));return s.createElement("div",{className:"asset-card"},s.createElement(A.Card,null,this.props.title.toUpperCase()),s.createElement("table",{className:"table"},s.createElement("thead",null,s.createElement("tr",null,s.createElement("th",null,s.createElement(h(),{content:"explorer.block.op"})),s.createElement("th",null,s.createElement(h(),{content:"explorer.fees.type"})),s.createElement("th",{style:{textAlign:"right"}},s.createElement(h(),{content:"explorer.fees.fee"})),s.createElement("th",{style:{textAlign:"right"}},s.createElement(h(),{content:"explorer.fees.feeltm"})))),_))}}V=(0,c.A)(V);class R extends s.Component{render(){let e=r().translate("transaction.feeGroups"),t=[];for(let a in D){let n=e[a],r=D[a];t.push(s.createElement(V,{key:a,settings:this.props.settings,opIds:r,title:n}))}return s.createElement("div",{className:"grid-block vertical",style:{overflow:"visible"}},s.createElement("div",{className:"grid-block small-12 shrink",style:{overflow:"visible"}},s.createElement(j.A,{path:"components/Fees"})),s.createElement("div",{className:"grid-block small-12 ",style:{overflow:"visible"}},s.createElement("div",{className:"grid-content"},t)))}}const z=R;class U extends s.Component{render(){return s.createElement(L.A,{stores:[b.A],inject:{settings:b.A.getState().settings}},s.createElement(z,this.props))}}const W=U;var H=a(77157),$=a(54625),G=a(6882),K=a(31267),Z=a(35917),J=a(44068),Y=a(60819),X=a(58921),Q=a.n(X);class ee extends s.Component{shouldComponentUpdate(e){if(e.blocks.size<20)return!1;let t=this.refs.trx_chart?this.refs.trx_chart.chart:null;if(t&&e.blocks!==this.props.blocks){let{trxData:a,colors:s}=this._getData(e),n=t.series[0],r=n.xData[n.xData.length-1];if(n.xData.length)return a.forEach((e=>{e[0]>r&&n.addPoint(e,!1,n.xData.length>=30)})),t.options.plotOptions.column.colors=s,t.redraw(),!1}return e.blocks!==this.props.blocks||e.head_block!==this.props.head_block}_getData(e){let{blocks:t,head_block:a}=e,s=[],n=0;return s=t.filter((e=>e.id>=a-30)).sort(((e,t)=>e.id-t.id)).takeLast(30).map((e=>(n=Math.max(e.transactions.length,n),[e.id,e.transactions.length]))).toArray(),{colors:s.map((e=>e[1]<=5?"#50D2C2":e[1]<=10?"#A0D3E8":e[1]<=20?"#FCAB53":"#deb869")),trxData:s,max:n}}render(){let{trxData:e,colors:t,max:a}=this._getData(this.props),n=r().translate("explorer.blocks.transactions"),l={chart:{type:"column",backgroundColor:"rgba(255, 0, 0, 0)",spacing:[0,0,5,0],height:100},title:{text:null},credits:{enabled:!1},legend:{enabled:!1},rangeSelector:{enabled:!1},navigator:{enabled:!1},scrollbar:{enabled:!1},tooltip:{shared:!1,formatter:function(){return n+": "+this.y}},series:[{name:"Transactions",data:e,color:"#50D2C2"}],xAxis:{labels:{enabled:!1},title:{text:null}},yAxis:{min:0,max:Math.max(1.5,a+.5),title:{text:null},labels:{enabled:!1},gridLineWidth:0,currentPriceIndicator:{enabled:!1}},plotOptions:{column:{animation:!0,minPointLength:5,colorByPoint:!0,colors:t,borderWidth:0}}};return e.length?s.createElement(Q(),{ref:"trx_chart",config:l}):null}}const te=ee;var ae=a(37688),se=a(77127);class ne extends s.Component{shouldComponentUpdate(e){if(e.blockTimes.length<19)return!1;if(0===this.props.blockTimes.length)return!0;let t=this.refs.chart?this.refs.chart.chart:null;if(t){let{blockTimes:a,colors:s}=this._getData(e),n=t.series[0],r=n.xData[n.xData.length-1];if(n.xData.length)return a.forEach((e=>{e[0]>r&&n.addPoint(e,!1,n.xData.length>=30)})),t.options.plotOptions.column.colors=s,t.redraw(),!1}return e.blockTimes[e.blockTimes.length-1][0]!==this.props.blockTimes[this.props.blockTimes.length-1][0]||e.blockTimes.length!==this.props.blockTimes.length}_getData(){let{blockTimes:e,head_block:t}=this.props;var a,s,n,r;e.filter((e=>e[0]>=t-30)),e&&e.length&&(s=30,e=(r=null==(a=e)?0:a.length)?(s=r-(s=n||void 0===s?1:(0,se.A)(s)),(0,ae.A)(a,s<0?0:s,r)):[]);let l=e.map((e=>e[1]<=5?"#50D2C2":e[1]<=10?"#A0D3E8":e[1]<=20?"#FCAB53":"#deb869"));return{blockTimes:e,colors:l}}render(){let{blockTimes:e,colors:t}=this._getData(this.props),a=r().translate("explorer.blocks.block_time"),n={chart:{type:"column",backgroundColor:"rgba(255, 0, 0, 0)",spacing:[0,0,5,0],height:100},title:{text:null},credits:{enabled:!1},legend:{enabled:!1},rangeSelector:{enabled:!1},navigator:{enabled:!1},scrollbar:{enabled:!1},tooltip:{shared:!1,formatter:function(){return a+": "+this.y+"s"}},series:[{name:"Block time",data:e,color:"#50D2C2"}],xAxis:{labels:{enabled:!1},title:{text:null}},yAxis:{min:0,title:{text:null},labels:{enabled:!1},gridLineWidth:0,currentPriceIndicator:{enabled:!1}},plotOptions:{column:{animation:!0,minPointLength:3,colorByPoint:!0,colors:t,borderWidth:0}}};return e.length?s.createElement(Q(),{ref:"chart",config:n}):null}}const re=ne;var le=a(68477),ie=a.n(le),oe=a(14830);a(81643);class ce extends s.Component{shouldComponentUpdate(e){return e.blockTime!==this.props.blockTime}render(){let{blockTime:e}=this.props,t=(new Date).getTime()-new Date(e).getTime(),a=f()("txtlabel",{success:t<=6e3},{info:t>6e3&&t<=15e3},{warning:t>15e3&&t<=25e3},{error:t>25e3});return e?s.createElement("h3",{className:a},s.createElement(u.A,{time:e})):null}}class me extends s.Component{static propTypes={globalObject:o.A.ChainObject.isRequired,dynGlobalObject:o.A.ChainObject.isRequired};static defaultProps={globalObject:"2.0.0",dynGlobalObject:"2.1.0",latestBlocks:{},assets:{},accounts:{},height:1};constructor(e){super(e),this.state={animateEnter:!1,operationsHeight:null,blocksHeight:null},this._updateHeight=this._updateHeight.bind(this)}_getBlock(e,t){e&&(e=parseInt(e,10),G.A.getLatest(e,t))}UNSAFE_componentWillMount(){window.addEventListener("resize",this._updateHeight,{capture:!1,passive:!0})}componentWillUnmount(){window.removeEventListener("resize",this._updateHeight)}UNSAFE_componentWillReceiveProps(e){if(0===e.latestBlocks.size)return this._getInitialBlocks();this.state.animateEnter||this.setState({animateEnter:!0});let t=e.dynGlobalObject.get("head_block_number");return e.latestBlocks.size>=20&&e.dynGlobalObject.get("head_block_number")!==e.latestBlocks.get(0).id?this._getBlock(t,t):void 0}componentDidMount(){this._getInitialBlocks();let e=this.refs.operations;ie().initialize(e);let t=this.refs.blocks;ie().initialize(t),this._updateHeight()}shouldComponentUpdate(e,t){return!i().is(e.latestBlocks,this.props.latestBlocks)||!x.A.are_equal_shallow(t,this.state)}componentDidUpdate(){this._updateHeight()}_getInitialBlocks(){let e=parseInt(this.props.dynGlobalObject.get("head_block_number"),10);if(e)for(let t=19;t>=0;t--){let a=!1;if(this.props.latestBlocks.size>0)for(let s=0;s<this.props.latestBlocks.size;s++)if(this.props.latestBlocks.get(s).id===e-t){a=!0;break}a||this._getBlock(e-t,e)}}_updateHeight(){let e=this.refs.outerWrapper.offsetHeight,t=this.refs.operationsText.offsetHeight,a=this.refs.blocksText.offsetHeight;this.setState({operationsHeight:e-t,blocksHeight:e-a},this.psUpdate)}psUpdate(){let e=this.refs.operations;ie().update(e);let t=this.refs.blocks;ie().update(t)}render(){let{latestBlocks:e,latestTransactions:t,globalObject:a,dynGlobalObject:n,coreAsset:r}=this.props,{blocksHeight:l,operationsHeight:i}=this.state;const o=this.props.getDynamicObject(r.get("dynamic_asset_data_id"));let c=null,m=null,p=null,u=0,g=e.size,_=0,b=[],E=0;if(e&&e.size>=20){let a,r,l;e.filter(((e,t)=>e.id===n.get("head_block_number")-t)).sort(((e,t)=>e.id-t.id)).forEach(((e,t)=>{u+=e.transactions.length,t>0?(b.push([e.id,(e.timestamp-a)/1e3]),r=e.timestamp):l=e.timestamp,a=e.timestamp})),c=e.sort(((e,t)=>t.id-e.id)).take(20).map((e=>s.createElement("tr",{key:e.id},s.createElement("td",null,s.createElement($.N_,{to:`/block/${e.id}`},"#",x.A.format_number(e.id,0))),s.createElement("td",null,s.createElement(K.XU,{value:e.timestamp,format:"time"})),s.createElement("td",null,s.createElement(J.A,{witness:e.witness})),s.createElement("td",null,x.A.format_number(e.transactions.length,0))))).toArray();let i=0;m=t.sort(((e,t)=>t.block_num-e.block_num)).take(20).map((e=>{let t=0;return e.operations.map((a=>i>15?null:s.createElement(Z.A,{key:i++,op:a,result:e.operation_results[t++],block:e.block_num,hideFee:!0,hideOpLabel:!1,current:"1.2.0",hideDate:!0,hidePending:!0}))).filter((e=>!!e))})).toArray(),p=e.first().timestamp,E=b.reduce(((e,t,a,s)=>e+t[1]/s.length),0),_=u/((r-l)/1e3)}return s.createElement("div",{ref:"outerWrapper",className:"grid-block vertical"},s.createElement("div",{className:"align-center grid-block shrink small-horizontal blocks-row"},s.createElement("div",{className:"grid-block text-center small-6 medium-3"},s.createElement("div",{className:"grid-content no-overflow"},s.createElement("span",{className:"txtlabel"},s.createElement(h(),{component:"span",content:"explorer.blocks.current_block"})),s.createElement("h2",null,"#",x.A.format_number(n.get("head_block_number"),0)))),s.createElement("div",{className:"grid-block text-center small-6 medium-3"},s.createElement("div",{className:"grid-content no-overflow"},s.createElement("span",{className:"txtlabel"},s.createElement(h(),{component:"span",content:"explorer.blocks.last_block"})),s.createElement(ce,{blockTime:p}))),s.createElement("div",{className:"grid-block text-center small-6 medium-3"},s.createElement("div",{className:"grid-content no-overflow"},s.createElement("span",{className:"txtlabel"},s.createElement(h(),{component:"span",content:"explorer.blocks.trx_per_sec"})),s.createElement("h2",null,x.A.format_number(_,2)))),s.createElement("div",{className:"grid-block text-center small-6 medium-3"},s.createElement("div",{className:"grid-content no-overflow"},s.createElement("span",{className:"txtlabel"},s.createElement(h(),{component:"span",content:"explorer.blocks.avg_conf_time"})),s.createElement("h2",null,x.A.format_number(E/2,2),"s")))),s.createElement("div",{className:"align-center grid-block shrink small-horizontal blocks-row"},s.createElement("div",{className:"grid-block text-center small-6 medium-3"},s.createElement("div",{className:"grid-content no-overflow clear-fix"},s.createElement("span",{className:"txtlabel"},s.createElement(h(),{component:"span",content:"explorer.blocks.active_witnesses"})),s.createElement("h2",{className:"txtlabel success"},a.get("active_witnesses").size))),s.createElement("div",{className:"grid-block text-center small-6 medium-3"},s.createElement("div",{className:"grid-content no-overflow clear-fix"},s.createElement("span",{className:"txtlabel"},s.createElement(h(),{component:"span",content:"explorer.blocks.active_committee_members"})),s.createElement("h2",{className:"txtlabel success"},a.get("active_committee_members").size))),s.createElement("div",{className:"grid-block text-center small-6 medium-3"},s.createElement("div",{className:"grid-content no-overflow clear-fix"},s.createElement("span",{className:"txtlabel"},s.createElement(h(),{component:"span",content:"explorer.blocks.trx_per_block"})),s.createElement("h2",null,x.A.format_number(u/g||0,2)))),s.createElement("div",{className:"grid-block text-center small-6 medium-3"},s.createElement("div",{className:"grid-content no-overflow clear-fix"},s.createElement("span",{className:"txtlabel"},s.createElement(h(),{component:"span",content:"explorer.blocks.recently_missed_blocks"})),s.createElement("h2",{className:"txtlabel warning",style:{fontWeight:"100"}},n.get("recently_missed_count"))))),s.createElement("div",{className:"align-center grid-block shrink small-vertical medium-horizontal blocks-row"},s.createElement("div",{className:"grid-block text-center small-12 medium-3"},s.createElement("div",{className:"grid-content no-overflow clear-fix"},s.createElement("span",{className:"txtlabel"},s.createElement(h(),{component:"span",content:"explorer.asset.summary.current_supply"})),s.createElement("h3",{className:"txtlabel"},o?s.createElement(d.A,{amount:o.get("current_supply"),asset:r.get("id"),decimalOffset:5}):null))),s.createElement("div",{className:"grid-block text-center small-12 medium-3"},s.createElement("div",{className:"grid-content no-overflow"},s.createElement("div",{className:"txtlabel"},s.createElement(h(),{component:"span",content:"explorer.blocks.block_times"})),s.createElement(re,{blockTimes:b,head_block_number:n.get("head_block_number")}))),s.createElement("div",{className:"grid-block text-center small-12 medium-3"},s.createElement("div",{className:"grid-content no-overflow"},s.createElement("div",{className:"txtlabel"},s.createElement(h(),{component:"span",content:"explorer.blocks.trx_per_block"})),s.createElement(te,{blocks:e,head_block:n.get("head_block_number")}))),s.createElement("div",{className:"grid-block text-center small-12 medium-3"},s.createElement("div",{className:"grid-content no-overflow clear-fix"},s.createElement("span",{className:"txtlabel"},s.createElement(h(),{component:"span",content:"explorer.asset.summary.stealth_supply"})),s.createElement("h3",{className:"txtlabel"},o?s.createElement(d.A,{amount:o.get("confidential_supply"),asset:r.get("id"),decimalOffset:5}):null)))),s.createElement("div",{ref:"transactionsBlock",className:"grid-block no-overflow"},s.createElement("div",{className:"grid-block small-12 medium-6 vertical no-overflow",style:{paddingBottom:0}},s.createElement("div",{className:"grid-block vertical no-overflow generic-bordered-box"},s.createElement("div",{ref:"operationsText"},s.createElement("div",{className:"block-content-header"},s.createElement(h(),{content:"account.recent"})),s.createElement("table",{className:"table fixed-height-2rem"},s.createElement("thead",null,s.createElement("tr",null,s.createElement("th",null,s.createElement(h(),{content:"account.votes.info"})))))),s.createElement("div",{className:"grid-block",style:{maxHeight:i||"400px",overflow:"hidden"},ref:"operations"},s.createElement("table",{className:"table fixed-height-2rem"},s.createElement("tbody",null,m))))),s.createElement("div",{className:"grid-block medium-6 show-for-medium vertical no-overflow",style:{paddingBottom:0,paddingLeft:5}},s.createElement("div",{className:"grid-block vertical no-overflow generic-bordered-box"},s.createElement("div",{ref:"blocksText"},s.createElement("div",{className:"block-content-header"},s.createElement(h(),{component:"span",content:"explorer.blocks.recent"}))),s.createElement("div",{className:"grid-block vertical",style:{maxHeight:l||"438px",overflow:"hidden"},ref:"blocks"},s.createElement("table",{className:"table fixed-height-2rem"},s.createElement("thead",null,s.createElement("tr",null,s.createElement("th",null,s.createElement(h(),{component:"span",content:"explorer.block.id"})),s.createElement("th",null,s.createElement(h(),{component:"span",content:"explorer.block.date"})),s.createElement("th",null,s.createElement(h(),{component:"span",content:"explorer.block.witness"})),s.createElement("th",null,s.createElement(h(),{component:"span",content:"explorer.block.count"})))),s.createElement(oe.A,{component:"tbody",transitionName:"newrow"},c)))))))}}me=(0,c.A)(me,{show_loader:!0});const de=me=(0,Y.A)(me,{propNames:["coreAsset"],withDynamic:!0});class pe extends s.Component{render(){return s.createElement(L.A,{stores:[H.A],inject:{latestBlocks:()=>H.A.getState().latestBlocks,latestTransactions:()=>H.A.getState().latestTransactions}},s.createElement(de,null))}}const he=pe;var ue=a(72181),ge=a(5556),_e=a.n(ge),be=a(44352),Ee=a(63024),fe=a(64143),ye=a(91001),Ae=a(73667),ke=a(62716),xe=a(99772);let ve=(0,Ae.Ay)("__graphene__");class we extends s.Component{constructor(e){super();let t=ke.Apis.instance().chain_id;t=t?t.substr(0,8):"4018d784",this.state={chainID:t,foundLast:!1,lastAsset:"",isLoading:!1,totalAssets:"object"!=typeof ve.get(`totalAssets_${t}`)?ve.get(`totalAssets_${t}`):t&&"4018d784"===t?3e3:50,assetsFetched:0,activeFilter:"market",filterSearch:e.filterSearch||"",rowsOnPage:"25"},this._toggleFilter=this._toggleFilter.bind(this),this.handleRowsChange=this.handleRowsChange.bind(this),this.handleFilterChange=this.handleFilterChange.bind(this)}shouldComponentUpdate(e,t){return!i().is(e.assets,this.props.assets)||!x.A.are_equal_shallow(t,this.state)}UNSAFE_componentWillMount(){this._checkAssets(this.props.assets,!0)}handleFilterChange(e){this.setState({filterSearch:(e.target.value||"").toUpperCase()})}handleRowsChange(e){this.setState({rowsOnPage:e})}_checkAssets(e,t){this.setState({isLoading:!0});let a=e.sort(((e,t)=>e.symbol>t.symbol?1:e.symbol<t.symbol?-1:0)).last();0===e.size||t?(be.A.getAssetList.defer("A",100),this.setState({assetsFetched:100})):e.size>=this.state.assetsFetched&&(be.A.getAssetList.defer(a.symbol,100),this.setState({assetsFetched:this.state.assetsFetched+99})),e.size>this.state.totalAssets&&ve.set(`totalAssets_${this.state.chainID}`,e.size),this.state.assetsFetched>=this.state.totalAssets-100&&this.setState({isLoading:!1})}UNSAFE_componentWillReceiveProps(e){e.assets!==this.props.assets&&this._checkAssets(e.assets)}linkToAccount(e){return e?s.createElement(Ee.A,{account:e}):s.createElement("span",null,"-")}_toggleFilter(e){this.setState({activeFilter:e.target.value})}_onFilter(e,t){this.setState({[e]:t.target.value.toUpperCase()}),_.A.changeViewSetting({[e]:t.target.value.toUpperCase()})}render(){let e,{assets:t}=this.props,{activeFilter:a}=this.state,n=(r().translate("markets.filter").toUpperCase(),m.ChainStore.getAsset("1.3.0")),l=[],i=[];return"user"==a&&(i=[{key:"symbol",title:"symbol",dataIndex:"symbol",defaultSortOrder:"ascend",sorter:(e,t)=>e.symbol>t.symbol?1:e.symbol<t.symbol?-1:0,render:e=>s.createElement($.N_,{to:`/asset/${e}`},s.createElement(ye.A,{name:e}))},{key:"issuer",title:"issuer",dataIndex:"issuer",sorter:(e,t)=>{let a=m.ChainStore.getAccount(e.issuer,!1),s=m.ChainStore.getAccount(t.issuer,!1);return a&&(a=a.get("name")),s&&(s=s.get("name")),a>s?1:a<s?-1:0},render:e=>this.linkToAccount(e)},{key:"currentSupply",title:"Supply",dataIndex:"currentSupply",sorter:(e,t)=>(e.currentSupply=parseFloat(e.currentSupply),t.currentSupply=parseFloat(t.currentSupply),e.currentSupply>t.currentSupply?1:e.currentSupply<t.currentSupply?-1:0),render:(e,t)=>s.createElement(d.A,{amount:t.currentSupply,asset:t.assetId,hide_asset:!0})},{key:"marketId",title:"",dataIndex:"marketId",render:e=>s.createElement($.N_,{to:`/market/${e}`},s.createElement(A.Icon,{type:"line-chart"})," ",s.createElement(h(),{content:"header.exchange"}))}],t.filter((e=>!e.market_asset&&-1!==e.symbol.indexOf(this.state.filterSearch))).map((e=>{let t=fe.A.parseDescription(e.options.description),a=e.symbol+"_"+(t.market?t.market:n?n.get("symbol"):"BTS");l.push({symbol:e.symbol,issuer:e.issuer,currentSupply:e.dynamic.current_supply,assetId:e.id,marketId:a})}))),"market"==a&&(i=[{key:"symbol",title:"symbol",dataIndex:"symbol",defaultSortOrder:"ascend",sorter:(e,t)=>e.symbol>t.symbol?1:e.symbol<t.symbol?-1:0,render:e=>s.createElement($.N_,{to:`/asset/${e}`},s.createElement(ye.A,{name:e}))},{key:"issuer",title:"issuer",dataIndex:"issuer",sorter:(e,t)=>{let a=m.ChainStore.getAccount(e.issuer,!1),s=m.ChainStore.getAccount(t.issuer,!1);return a&&(a=a.get("name")),s&&(s=s.get("name")),a>s?1:a<s?-1:0},render:e=>this.linkToAccount(e)},{key:"currentSupply",title:"Supply",dataIndex:"currentSupply",sorter:(e,t)=>(e.currentSupply=parseFloat(e.currentSupply),t.currentSupply=parseFloat(t.currentSupply),e.currentSupply>t.currentSupply?1:e.currentSupply<t.currentSupply?-1:0),render:(e,t)=>s.createElement(d.A,{amount:t.currentSupply,asset:t.assetId,hide_asset:!0})},{key:"marketId",title:"",dataIndex:"marketId",render:e=>s.createElement($.N_,{to:`/market/${e}`},s.createElement(A.Icon,{type:"line-chart"})," ",s.createElement(h(),{content:"header.exchange"}))}],t.filter((e=>e.bitasset_data&&!e.bitasset_data.is_prediction_market&&-1!==e.symbol.indexOf(this.state.filterSearch))).map((e=>{let t=fe.A.parseDescription(e.options.description),a=e.symbol+"_"+(t.market?t.market:n?n.get("symbol"):"BTS");l.push({symbol:e.symbol,issuer:e.issuer,currentSupply:e.dynamic.current_supply,assetId:e.id,marketId:a})}))),"prediction"==a&&(e=t.filter((e=>{let t=fe.A.parseDescription(e.options.description);return e.bitasset_data&&e.bitasset_data.is_prediction_market&&(-1!==e.symbol.toLowerCase().indexOf(this.state.filterSearch.toLowerCase())||-1!==t.main.toLowerCase().indexOf(this.state.filterSearch.toLowerCase()))})).sort(((e,t)=>e.symbol<t.symbol?-1:e.symbol>t.symbol?1:0)).map((e=>{let t=fe.A.parseDescription(e.options.description);return{asset:e,description:t,marketID:e.symbol+"_"+(t.market?t.market:n?n.get("symbol"):"BTS")}})).toArray()),s.createElement("div",{className:"grid-block vertical"},s.createElement("div",{className:"grid-block vertical"},s.createElement("div",{className:"grid-block main-content small-12 medium-10 medium-offset-1 main-content vertical"},s.createElement("div",{className:"generic-bordered-box"},s.createElement("div",{style:{textAlign:"left",marginBottom:"24px"}},s.createElement("span",{style:{display:"inline-block",width:"0px",marginTop:"2px",float:"left",fontSize:"18px"}},this.state.isLoading?s.createElement(A.Icon,{type:"loading"}):null),s.createElement(k.A,{value:this.state.filterSearch,style:{width:"200px"},onChange:this.handleFilterChange}),s.createElement(A.Radio.Group,{value:this.state.activeFilter,onChange:this._toggleFilter,style:{marginBottom:"7px",marginLeft:"24px"}},s.createElement(A.Radio,{value:"market"},s.createElement(h(),{content:"explorer.assets.market"})),s.createElement(A.Radio,{value:"user"},s.createElement(h(),{content:"explorer.assets.user"})),s.createElement(A.Radio,{value:"prediction"},s.createElement(h(),{content:"explorer.assets.prediction"}))),s.createElement(A.Select,{style:{width:"150px",marginLeft:"24px"},value:this.state.rowsOnPage,onChange:this.handleRowsChange},s.createElement(A.Select.Option,{key:"10"},"10 rows"),s.createElement(A.Select.Option,{key:"25"},"25 rows"),s.createElement(A.Select.Option,{key:"50"},"50 rows"),s.createElement(A.Select.Option,{key:"100"},"100 rows"),s.createElement(A.Select.Option,{key:"200"},"200 rows"))),"prediction"==a?s.createElement(xe.A,{style:{paddingBottom:20},size:"large",itemLayout:"horizontal",dataSource:e,renderItem:e=>s.createElement(xe.A.Item,{key:e.asset.id.split(".")[2],actions:[s.createElement($.N_,{className:"button outline",to:`/market/${e.marketID}`},s.createElement(h(),{content:"header.exchange"}))]},s.createElement(xe.A.Item.Meta,{title:s.createElement("div",null,s.createElement("span",{style:{paddingTop:10,fontWeight:"bold"}},s.createElement($.N_,{to:`/asset/${e.asset.symbol}`},s.createElement(ye.A,{name:e.asset.symbol}))),e.description.condition?s.createElement("span",null," ","(",e.description.condition,")"):null),description:s.createElement("span",null,e.description?s.createElement("div",{style:{padding:"10px 20px 5px 0",lineHeight:"18px"}},e.description.main):null,s.createElement("span",{style:{padding:"0 20px 5px 0",lineHeight:"18px"}},s.createElement(Ee.A,{account:e.asset.issuer}),s.createElement("span",null," ","-"," ",s.createElement(d.A,{amount:e.asset.dynamic.current_supply,asset:e.asset.id})),e.description.expiry?s.createElement("span",null," ","-"," ",e.description.expiry):null))})),pagination:{position:"bottom",pageSize:this.state.rowsOnPage}}):s.createElement(A.Table,{style:{width:"100%",marginTop:"16px"},rowKey:"symbol",columns:i,dataSource:l,pagination:{pageSize:this.state.rowsOnPage,total:l.length}})))))}}we.defaultProps={assets:{}},we.propTypes={assets:_e().object.isRequired};const Se=we;class Ce extends s.Component{render(){return s.createElement(L.A,{stores:[ue.A,b.A],inject:{assets:()=>ue.A.getState().assets,filterMPA:()=>b.A.getState().viewSettings.get("filterMPA"),filterUIA:()=>b.A.getState().viewSettings.get("filterUIA")}},s.createElement(Se,null))}}const Ne=Ce;var Be=a(55840),Oe=a(64741),Ie=a(99429),Te=a(36234),Le=a(89247),je=a(40702);class Pe extends s.Component{constructor(e){super(),this.state={searchTerm:e.searchTerm,isLoading:!1,rowsOnPage:"25"},this._searchAccounts=(0,Oe.A)(this._searchAccounts,200),this.handleRowsChange=this.handleRowsChange.bind(this),this.balanceObjects=[]}shouldComponentUpdate(e,t){return!i().is(e.searchAccounts,this.props.searchAccounts)||t.searchTerm!==this.state.searchTerm||t.isLoading!==this.state.isLoading}_onSearchChange(e){this.setState({searchTerm:e.target.value.toLowerCase(),isLoading:!0}),this._searchAccounts(e.target.value)}_searchAccounts(e){Ie.A.accountSearch(e),this.setState({isLoading:!1})}_onAddContact(e,t){t.preventDefault(),Ie.A.addAccountContact(e),this.forceUpdate()}_onRemoveContact(e,t){t.preventDefault(),Ie.A.removeAccountContact(e),this.forceUpdate()}handleRowsChange(e){this.setState({rowsOnPage:e}),this.forceUpdate()}_ensureBalanceObject(e){e&&"string"==typeof e&&(this.balanceObjects[e]||(this.balanceObjects[e]=parseFloat(m.ChainStore.getObject(e).get("balance")))),this.balanceObjects[e]||(this.balanceObjects[e]=0)}render(){let{searchAccounts:e}=this.props,{searchTerm:t}=this.state,a=[],n=[];return n=[{title:s.createElement(h(),{component:"span",content:"explorer.assets.id"}),dataIndex:"accountId",key:"accountId",defaultSortOrder:"ascend",sorter:(e,t)=>e.accountId>t.accountId?1:e.accountId<t.accountId?-1:0,render:e=>s.createElement("div",null,e)},{title:s.createElement(Te.A,{name:"user",title:"icons.user.account"}),dataIndex:"accountContacts",key:"accountContacts",render:(e,t)=>e.has(t.accountName)?s.createElement("div",{onClick:this._onRemoveContact.bind(this,t.accountName)},s.createElement(Te.A,{name:"minus-circle",title:"icons.minus_circle.remove_contact"})):s.createElement("div",{onClick:this._onAddContact.bind(this,t.accountName)},s.createElement(Te.A,{name:"plus-circle",title:"icons.plus_circle.add_contact"}))},{title:s.createElement(h(),{component:"span",content:"account.name"}),dataIndex:"accountName",key:"accountName",sorter:(e,t)=>e.accountName>t.accountName?1:e.accountName<t.accountName?-1:0,render:e=>s.createElement("div",null,s.createElement($.N_,{to:`/account/${e}/overview`},e))},{title:s.createElement(h(),{component:"span",content:"gateway.balance"}),dataIndex:"accountBalance",key:"accountBalance",sorter:(e,t)=>(this._ensureBalanceObject(e.accountBalance),this._ensureBalanceObject(t.accountBalance),this.balanceObjects[e.accountBalance]>this.balanceObjects[t.accountBalance]?1:this.balanceObjects[e.accountBalance]<this.balanceObjects[t.accountBalance]?-1:0),render:e=>s.createElement("div",null,e?s.createElement(Le.A,{balance:e}):"n/a")},{title:s.createElement(h(),{component:"span",content:"account.percent"}),dataIndex:"accountBalance",key:"accountBalancePercentage",sorter:(e,t)=>(this._ensureBalanceObject(e.accountBalance),this._ensureBalanceObject(t.accountBalance),this.balanceObjects[e.accountBalance]>this.balanceObjects[t.accountBalance]?1:this.balanceObjects[e.accountBalance]<this.balanceObjects[t.accountBalance]?-1:0),render:e=>s.createElement("div",null,e?s.createElement(Le.A,{balance:e,asPercentage:!0}):"n/a")}],e.size>0&&t&&t.length>0&&e.filter((e=>-1!==e.indexOf(t))).sort(((e,t)=>e>t?1:e<t?-1:0)).map(((e,t)=>{let s=m.ChainStore.getAccount(t.toLowerCase()),n=s&&s.getIn(["balances","1.3.0"])||null;a.push({accountId:t,accountContacts:Be.A.getState().accountContacts,accountName:e,accountBalance:n})})),s.createElement("div",{className:"grid-block vertical"},s.createElement("div",{className:"grid-block vertical"},s.createElement("div",{className:"grid-block main-content small-12 medium-10 medium-offset-1 main-content vertical"},s.createElement("div",{className:"generic-bordered-box"},s.createElement("div",{style:{textAlign:"left",marginBottom:"24px"}},s.createElement(k.A,{placeholder:"Search",value:this.state.searchTerm,style:{width:"200px"},onChange:this._onSearchChange.bind(this)}),s.createElement(A.Select,{style:{width:"150px",marginLeft:"24px"},value:this.state.rowsOnPage,onChange:this.handleRowsChange},s.createElement(A.Select.Option,{key:"10"},"10 rows"),s.createElement(A.Select.Option,{key:"25"},"25 rows"),s.createElement(A.Select.Option,{key:"50"},"50 rows"),s.createElement(A.Select.Option,{key:"100"},"100 rows"),s.createElement(A.Select.Option,{key:"200"},"200 rows")),s.createElement("div",{style:{display:"inline-block",marginLeft:"24px"}},this.state.searchTerm&&0==this.state.searchTerm.length?s.createElement(h(),{content:"account.start_typing_to_search"}):null)),s.createElement(A.Table,{style:{width:"100%",marginTop:"16px"},rowKey:"accountId",columns:n,dataSource:a,pagination:{position:"bottom",pageSize:Number(this.state.rowsOnPage)}}),this.state.isLoading?s.createElement("div",{style:{textAlign:"center",padding:10}},s.createElement(je.A,{type:"three-bounce"})):null))))}}Pe.defaultProps={searchAccounts:{}},Pe.propTypes={searchAccounts:_e().object.isRequired};const Me=Pe;class qe extends s.Component{render(){return s.createElement(L.A,{stores:[Be.A],inject:{searchAccounts:()=>Be.A.getState().searchAccounts,searchTerm:()=>Be.A.getState().searchTerm}},s.createElement(Me,null))}}const De=qe;var Fe=a(66897),Ve=a(74806),Re=a(17071),ze=a(78740);class Ue extends s.Component{static propTypes={defaultAsset:o.A.ChainAsset.isRequired};static defaultProps={defaultAsset:"1.3.0"};constructor(e){super(e),this.state={filterAssetA:this.props.defaultAsset?this.props.defaultAsset.get("symbol"):null,filterAssetB:null,filterShareAsset:null,start:"1.19.0",limit:10,total:0,isExchangeModalVisible:!1,isStakeModalVisible:!1,selectedPool:null},this.timer=null}componentDidMount(){this._getLiquidityPools()}componentWillReceiveProps(e){if(e.liquidityPools!==this.props.liquidityPools){const{liquidityPools:t}=e;t.size>0&&t.last().id!==this.props.lastPoolId&&this.setState({start:t.last().id},(()=>this._getLiquidityPools()))}}_getLiquidityPools(){const{filterAssetA:e,filterAssetB:t,filterShareAsset:a,GetLimit:s,start:n}=this.state;this.timer&&clearTimeout(this.timer),this.timer=setTimeout((()=>{a?Ve.A.getLiquidityPoolsByShareAsset.defer(a):Ve.A.getLiquidityPools.defer(e,t,s,n)}),500)}_resetLiquidityPools(){this.setState({start:"1.19.0",lastPoolId:null,total:0}),Ve.A.resetLiquidityPools()}_onFilterAssetA(e){e.target.value?this.setState({filterAssetA:e.target.value.toUpperCase()},(()=>{this._getLiquidityPools(),this._resetLiquidityPools()})):(this.setState({filterAssetA:""}),this._resetLiquidityPools())}_onFilterAssetB(e){e.target.value?this.setState({filterAssetB:e.target.value.toUpperCase()},(()=>{this._getLiquidityPools(),this._resetLiquidityPools()})):(this.setState({filterAssetB:""}),this._resetLiquidityPools())}_onFilterShareAsset(e){e.target.value?this.setState({filterAssetA:null,filterAssetB:null,filterShareAsset:e.target.value.toUpperCase()},(()=>{this._getLiquidityPools(),this._resetLiquidityPools()})):(this.setState({filterShareAsset:""}),this._resetLiquidityPools())}_handleRowsChange(e){this.setState({limit:parseInt(e,10),start:"1.19.0"},(()=>{this._resetLiquidityPools(),this._getLiquidityPools()}))}_showExchangeModal(e){this.setState({isExchangeModalVisible:!0,selectedPool:e})}_hideExchangeModal(){this.setState({isExchangeModalVisible:!1,selectedPool:null})}_showStakeModal(e){this.setState({isStakeModalVisible:!0,selectedPool:e})}_hideStakeModal(){this.setState({isStakeModalVisible:!1,selectedPool:null})}render(){let e=Be.A.getState().myActiveAccounts.length>0||!!Be.A.getState().currentAccount;const t=[{key:"id",dataIndex:"id",title:r().translate("poolmart.liquidity_pools.pool_id"),sorter:(e,t)=>e.id.split(".")[2]-t.id.split(".")[2]},{key:"share_asset_str",dataIndex:"share_asset_str",title:r().translate("poolmart.liquidity_pools.share_asset"),render:e=>e?s.createElement($.N_,{to:`/asset/${e}`},s.createElement(ye.A,{name:e})):null,sorter:(e,t)=>e.share_asset_str>t.share_asset_str?1:e.share_asset_str<t.share_asset_str?-1:0},{key:"asset_a_str",dataIndex:"asset_a_str",title:r().translate("poolmart.liquidity_pools.asset_a"),render:e=>e?s.createElement($.N_,{to:`/asset/${e}`},s.createElement(ye.A,{name:e})):null,sorter:(e,t)=>e.asset_a_str>t.asset_a_str?1:e.asset_a_str<t.asset_a_str?-1:0},{key:"asset_a_qty",dataIndex:"asset_a_qty",title:r().translate("poolmart.liquidity_pools.asset_a_qty"),sorter:(e,t)=>e.asset_a_qty-t.asset_a_qty},{key:"asset_b_str",dataIndex:"asset_b_str",title:r().translate("poolmart.liquidity_pools.asset_b"),render:e=>e?s.createElement($.N_,{to:`/asset/${e}`},s.createElement(ye.A,{name:e})):null,sorter:(e,t)=>e.asset_b_str>t.asset_b_str?1:e.asset_b_str<t.asset_b_str?-1:0},{key:"asset_b_qty",dataIndex:"asset_b_qty",title:r().translate("poolmart.liquidity_pools.asset_b_qty"),sorter:(e,t)=>e.asset_b_qty-t.asset_b_qty},{key:"taker_fee_percent",dataIndex:"taker_fee_percent_str",title:r().translate("poolmart.liquidity_pools.taker_fee_percent")},{key:"withdrawal_fee_percent",dataIndex:"withdrawal_fee_percent_str",title:r().translate("poolmart.liquidity_pools.withdrawal_fee_percent")},{key:"exchange",title:r().translate("poolmart.liquidity_pools.exchange"),render:t=>e?s.createElement("a",{onClick:()=>this._showExchangeModal(t)},s.createElement(Te.A,{name:"poolmart"})):s.createElement(Te.A,{name:"poolmart"})},{key:"stake_unstake",title:r().translate("poolmart.liquidity_pools.stake_unstake"),render:t=>e?s.createElement("a",{onClick:()=>this._showStakeModal(t)},s.createElement(Te.A,{name:"deposit"})):s.createElement(Te.A,{name:"deposit"})}],a=[];return this.props.liquidityPools.forEach((e=>{const t=e;t.share_asset_str=e.share_asset_obj?e.share_asset_obj.get("symbol"):e.share_asset,t.asset_a_str=e.asset_a_obj?e.asset_a_obj.get("symbol"):e.asset_a,t.asset_b_str=e.asset_b_obj?e.asset_b_obj.get("symbol"):e.asset_b,t.asset_a_qty=e.asset_a_obj?e.balance_a/Math.pow(10,e.asset_a_obj.get("precision")):0,t.asset_b_qty=e.asset_b_obj?e.balance_b/Math.pow(10,e.asset_b_obj.get("precision")):0,t.taker_fee_percent_str=e.taker_fee_percent/100+"%",t.withdrawal_fee_percent_str=e.withdrawal_fee_percent/100+"%",a.push(t)})),s.createElement("div",{className:"grid-block vertical"},s.createElement("div",{className:"grid-content no-padding"},s.createElement(k.A,{placeholder:r().translate("poolmart.liquidity_pools.asset_a"),value:this.state.filterAssetA,onChange:this._onFilterAssetA.bind(this),style:{width:"200px",marginBottom:"12px",marginTop:"4px"}}),s.createElement(k.A,{placeholder:r().translate("poolmart.liquidity_pools.asset_b"),value:this.state.filterAssetB,onChange:this._onFilterAssetB.bind(this),style:{width:"200px",marginLeft:"20px",marginBottom:"12px",marginTop:"4px"}}),s.createElement(k.A,{placeholder:r().translate("poolmart.liquidity_pools.share_asset"),value:this.state.filterShareAsset,onChange:this._onFilterShareAsset.bind(this),style:{width:"200px",marginLeft:"20px",marginBottom:"12px",marginTop:"4px"}}),s.createElement(A.Select,{style:{width:"150px",marginLeft:"24px",marginTop:"4px"},value:this.state.limit,onChange:this._handleRowsChange.bind(this)},s.createElement(A.Select.Option,{key:"10"},"10 rows"),s.createElement(A.Select.Option,{key:"25"},"25 rows"),s.createElement(A.Select.Option,{key:"50"},"50 rows"),s.createElement(A.Select.Option,{key:"100"},"100 rows"))),s.createElement("div",{className:"grid-content no-padding"},s.createElement(A.Table,{columns:t,rowKey:"id",dataSource:a,pagination:{pageSize:this.state.limit,total:a.length}})),this.state.isExchangeModalVisible&&s.createElement(Re.A,{isModalVisible:this.state.isExchangeModalVisible,onHideModal:this._hideExchangeModal.bind(this),pool:this.state.selectedPool.share_asset}),this.state.isStakeModalVisible&&s.createElement(ze.A,{isModalVisible:this.state.isStakeModalVisible,onHideModal:this._hideStakeModal.bind(this),pool:this.state.selectedPool.share_asset}))}}Ue=(0,c.A)(Ue,{show_loader:!0});class We extends s.Component{render(){return s.createElement(Ue,this.props)}}const He=(0,g.N)(We,{listenTo:()=>[Fe.A],getProps:()=>({liquidityPools:Fe.A.getState().liquidityPools,liquidityPoolsLoading:Fe.A.getState().liquidityPoolsLoading,lastPoolId:Fe.A.getState().lastPoolId})});var $e=a(58586),Ge=a(9540);class Ke extends s.Component{constructor(){super(),this.state={height:null},this._setDimensions=this._setDimensions.bind(this)}UNSAFE_componentWillMount(){window.addEventListener("resize",this._setDimensions,{capture:!1,passive:!0})}componentDidMount(){this._setDimensions()}componentWillUnmount(){window.removeEventListener("resize",this._setDimensions)}_setDimensions(){let e=this.refs.wrapper.offsetHeight;e!==this.state.height&&this.setState({height:e})}render(){return s.createElement("div",{ref:"wrapper",className:"grid-block no-overflow"},s.createElement(Ge.A,{style:{width:"100%",padding:20},listHeight:this.state.height?this.state.height:null,className:"no-overflow",headerStyle:{paddingTop:0,borderTop:"none"},tabHeader:!0,columns:[{name:"star",index:1},{name:"market",index:2},{name:"quoteSupply",index:3},{name:"vol",index:4},{name:"price",index:5},{name:"change",index:6}]}))}}const Ze=Ke;class Je extends s.Component{render(){return s.createElement(L.A,{stores:[b.A,ue.A,$e.A],inject:{starredMarkets:()=>b.A.getState().starredMarkets,viewSettings:()=>b.A.getState().viewSettings,lookupResults:()=>ue.A.getState().lookupResults,marketBase:()=>$e.A.getState().marketBase}},s.createElement(Ze,null))}}const Ye=Je;class Xe extends s.Component{constructor(e){super(e),this.state={tabs:[{name:"blocks",link:"/explorer/blocks",translate:"explorer.blocks.title",content:he},{name:"assets",link:"/explorer/assets",translate:"explorer.assets.title",content:Ne},{name:"pools",link:"/explorer/pools",translate:"poolmart.liquidity_pools.title",content:He},{name:"accounts",link:"/explorer/accounts",translate:"explorer.accounts.title",content:De},{name:"witnesses",link:"/explorer/witnesses",translate:"explorer.witnesses.title",content:N},{name:"committee_members",link:"/explorer/committee-members",translate:"explorer.committee_members.title",content:T},{name:"markets",link:"/explorer/markets",translate:"markets.title",content:Ye},{name:"fees",link:"/explorer/fees",translate:"fees.title",content:W}]}}render(){return s.createElement(A.Tabs,{activeKey:this.props.location.pathname,animated:!1,style:{display:"table",height:"100%",width:"100%"},onChange:e=>{this.props.history.push(e)}},this.state.tabs.map((e=>{const t=e.content;return s.createElement(A.Tabs.TabPane,{key:e.link,tab:r().translate(e.translate)},s.createElement("div",{className:"padding"},s.createElement(t,null)))})))}}const Qe=Xe},62611:(e,t,a)=>{a.d(t,{A:()=>o});var s=a(96540),n=a(87040),r=a(5556),l=a.n(r);class i extends s.Component{static propTypes={scroll_length:l().number};static defaultProps={scroll_length:9};constructor(e){e.scroll_length,super(e),this.state={active:!1},this.listener=!1,this.onBodyClick=this.onBodyClick.bind(this)}componentDidMount(){this._setListener()}shouldComponentUpdate(e,t){return!n.A.are_equal_shallow(e.entries,this.props.entries)||!n.A.are_equal_shallow(t,this.state)||e.value!==this.props.value}_setListener(e=this.props){e.entries.length>1&&!this.listener&&(this.listener=!0,document.body.addEventListener("click",this.onBodyClick,{capture:!1,passive:!0}))}_removeListener(){document.body.removeEventListener("click",this.onBodyClick),this.listener=!1}UNSAFE_componentWillReceiveProps(e){1===e.entries.length?this._removeListener():e.entries.length>1&&this._setListener(e)}componentWillUnmount(){this._removeListener()}onBodyClick(e){let t=e.target,a=!1;do{if(t.classList&&t.classList.contains("dropdown")&&t.id===this.props.id){a=!0;break}}while(t=t.parentNode);a?e.stopPropagation():this.setState({active:!1})}onChange(e,t){t.preventDefault(),t.stopPropagation(),this.props.onChange(e),this.setState({active:!1})}_toggleDropdown(){this.setState({active:!this.state.active})}render(){const{entries:e,value:t}=this.props;let{active:a}=this.state;if(0===e.length)return null;if(1==e.length)return s.createElement("div",{className:"dropdown-wrapper inactive"+(this.props.upperCase?" upper-case":"")},s.createElement("div",null,this.props.singleEntry?this.props.singleEntry:e[0]));{let n=e.map((e=>s.createElement("li",{className:this.props.upperCase?"upper-case":"",key:e,onClick:this.onChange.bind(this,this.props.values[e])},s.createElement("span",null,e))));return s.createElement("div",{onClick:this._toggleDropdown.bind(this),className:"dropdown-wrapper"+(a?" active":"")+(this.props.upperCase?" upper-case":"")},s.createElement("div",{style:{paddingRight:15}},t||s.createElement("span",{className:"hidden"},"A")),s.createElement("ul",{className:"dropdown",style:{overflow:e.length>this.props.scroll_length?"auto":"hidden"}},n))}}}const o=i},44068:(e,t,a)=>{a.d(t,{A:()=>o});var s=a(96540),n=a(12569),r=a(72342),l=a(63024);class i extends s.Component{static propTypes={witness:n.A.ChainObject.isRequired};render(){let e=this.props.witness.get("witness_account");return s.createElement(l.A,{account:e})}}const o=i=(0,r.A)(i)},27641:(e,t,a)=>{a.r(t)}}]);