-
Notifications
You must be signed in to change notification settings - Fork 1
/
asset.js.map
1 lines (1 loc) · 68.9 KB
/
asset.js.map
1
{"version":3,"file":"asset.1500ed339049dc064007.js","sources":["webpack:///asset.1500ed339049dc064007.js"],"sourcesContent":["(window.webpackJsonp=window.webpackJsonp||[]).push([[17],{1949:function(e,t,a){\"use strict\";var n=a(0),r=a.n(n),s=a(2),l=a.n(s),o=a(33),i=a(1952),c=a(11),u=a.n(c),m=a(4),d=a.n(m),p=a(140),h=a(15),f=a(1),b=a.n(f),_=a(271),g=function(){function e(e,t){for(var a=0;a<t.length;a++){var n=t[a];n.enumerable=n.enumerable||!1,n.configurable=!0,\"value\"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,a,n){return a&&e(t.prototype,a),n&&e(t,n),t}}();function E(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}function v(e,t){if(!e)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!t||\"object\"!=typeof t&&\"function\"!=typeof t?e:t}function y(e,t){if(\"function\"!=typeof t&&null!==t)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var w=function(e){function t(){return E(this,t),v(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return y(t,r.a.Component),g(t,[{key:\"shouldComponentUpdate\",value:function(e){return!h.a.are_equal_shallow(e.assets,this.props.assets)||e.value!==this.props.value||e.scroll_length!==this.props.scroll_length}},{key:\"render\",value:function(){return this.props.assets.length?r.a.createElement(i.a,{entries:this.props.assets.map(function(e){return e&&e.get(\"symbol\")}).filter(function(e){return!!e}),values:this.props.assets.reduce(function(e,t){return t&&t.get(\"symbol\")&&(e[t.get(\"symbol\")]=t),e},{}),singleEntry:this.props.assets[0]?r.a.createElement(o.a,{asset:this.props.assets[0].get(\"id\"),amount:0,hide_amount:!0}):null,value:this.props.value,onChange:this.props.onChange,scroll_length:this.props.scroll_length}):null}}]),t}();w.propTypes={value:b.a.string,onChange:b.a.func,scroll_length:b.a.number},w=Object(p.a)(w,{asList:!0});var k=function(e){function t(){return E(this,t),v(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return y(t,_[\"a\"]),g(t,[{key:\"componentDidMount\",value:function(){this.onAssetChange(this.props.asset)}},{key:\"formatAmount\",value:function(e){return e||(e=\"\"),\"number\"==typeof e&&(e=e.toString()),e.trim().replace(/,/g,\"\")}},{key:\"_onChange\",value:function(e){this.props.onChange&&this.props.onChange({amount:this.getNumericEventValue(e),asset:this.props.asset})}},{key:\"onAssetChange\",value:function(e){this.props.onChange&&this.props.onChange({amount:this.props.amount,asset:e})}},{key:\"render\",value:function(){var e=this.props.error?d.a.translate(this.props.error):this.formatAmount(this.props.amount);return r.a.createElement(\"div\",{className:\"amount-selector\",style:this.props.style},r.a.createElement(\"label\",{className:\"right-label\"},this.props.display_balance),r.a.createElement(l.a,{className:\"left-label\",component:\"label\",content:this.props.label}),r.a.createElement(\"div\",{className:\"inline-label input-wrapper\"},r.a.createElement(\"input\",{disabled:this.props.disabled,type:\"text\",value:e||\"\",placeholder:this.props.placeholder,onChange:this._onChange.bind(this),tabIndex:this.props.tabIndex,onPaste:this.props.onPaste||this.onPaste.bind(this),onKeyPress:this.onKeyPress.bind(this)}),r.a.createElement(\"div\",{className:\"form-label select floating-dropdown\"},this.props.isPrice?r.a.createElement(\"div\",{className:\"dropdown-wrapper inactive\"},r.a.createElement(\"div\",null,this.props.asset.get(\"symbol\"),\"/\",this.props.base)):r.a.createElement(w,{ref:this.props.refCallback,value:this.props.asset.get(\"symbol\"),assets:u.a.List(this.props.assets),onChange:this.onAssetChange.bind(this),scroll_length:this.props.scroll_length}))))}}]),t}();k.propTypes={label:b.a.string,assets:b.a.array,amount:b.a.any,placeholder:b.a.string,onChange:b.a.func,tabIndex:b.a.number,error:b.a.string,scroll_length:b.a.number},k.defaultProps={disabled:!1,tabIndex:0},k=Object(p.a)(k),t.a=k},1951:function(e,t,a){\"use strict\";a.d(t,\"b\",function(){return v}),a.d(t,\"a\",function(){return E});var n=a(0),r=a.n(n),s=a(1),l=a.n(s),o=a(3),i=a.n(o),c=a(31),u=a(25),m=a(26),d=a(4),p=a.n(d),h=a(2248),f=function(){function e(e,t){for(var a=0;a<t.length;a++){var n=t[a];n.enumerable=n.enumerable||!1,n.configurable=!0,\"value\"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,a,n){return a&&e(t.prototype,a),n&&e(t,n),t}}();function b(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}function _(e,t){if(!e)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!t||\"object\"!=typeof t&&\"function\"!=typeof t?e:t}function g(e,t){if(\"function\"!=typeof t&&null!==t)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var E=function(e){function t(){return b(this,t),_(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return g(t,r.a.Component),f(t,[{key:\"render\",value:function(){var e=this.props,t=e.isActive,a=e.index,n=e.changeTab,s=e.title,l=e.className,o=e.updatedTab,c=e.disabled,u=e.subText,m=i()({\"is-active\":t},l);return\"string\"==typeof s&&s.indexOf(\".\")>0&&(s=p.a.translate(s)),this.props.collapsed?(\"string\"==typeof u&&(u=u.trim()),\"span\"===s.type&&(s=s.props.children[2]),r.a.createElement(\"option\",{value:a,\"data-is-link-to\":this.props.isLinkTo},s,o?\"*\":\"\",u&&\" (\",u&&u,u&&\")\")):r.a.createElement(\"li\",{className:m,onClick:c?null:n.bind(this,a,this.props.isLinkTo)},r.a.createElement(\"a\",null,r.a.createElement(\"span\",{className:\"tab-title\"},s,o?\"*\":\"\"),u&&r.a.createElement(\"div\",{className:\"tab-subtext\"},u)))}}]),t}();E.propTypes={changeTab:l.a.func,isActive:l.a.bool.isRequired,index:l.a.number.isRequired,className:l.a.string,isLinkTo:l.a.string,subText:l.a.oneOfType([l.a.object,l.a.string])},E.defaultProps={isActive:!1,index:0,className:\"\",isLinkTo:\"\",subText:null};var v=function(e){function t(e){b(this,t);var a=_(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return a.state={activeTab:e.setting?e.viewSettings.get(e.setting,e.defaultActiveTab):e.defaultActiveTab,width:window.innerWidth},a._setDimensions=a._setDimensions.bind(a),a}return g(t,r.a.Component),f(t,[{key:\"componentDidMount\",value:function(){this._setDimensions(),window.addEventListener(\"resize\",this._setDimensions,{capture:!1,passive:!0})}},{key:\"componentWillReceiveProps\",value:function(e){var t=e.viewSettings.get(e.setting);t!==this.props.viewSettings.get(this.props.setting)&&this.setState({activeTab:t})}},{key:\"componentWillUnmount\",value:function(){window.removeEventListener(\"resize\",this._setDimensions)}},{key:\"_setDimensions\",value:function(){var e=window.innerWidth;e!==this.state.width&&this.setState({width:e})}},{key:\"_changeTab\",value:function(e,t){e!==this.state.activeTab&&(\"\"!==t&&this.props.history.push(t),this.props.setting&&u.a.changeViewSetting(function(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}({},this.props.setting,e)),this.setState({activeTab:e}),this.props.onChangeTab&&this.props.onChangeTab(e))}},{key:\"render\",value:function(){var e=this,t=this.props,a=t.children,n=t.contentClass,s=t.tabsClass,l=t.style,o=t.segmented,c=this.state.width<900&&r.a.Children.count(a)>2,u=null,m=r.a.Children.map(a,function(t,a){if(!t)return null;if(c&&t.props.disabled)return null;var n=a===e.state.activeTab;return n&&(u=t.props.children),r.a.cloneElement(t,{collapsed:c,isActive:n,changeTab:e._changeTab.bind(e),index:a})}).filter(function(e){return null!==e});return u||(u=m[0].props.children),r.a.createElement(\"div\",{className:i()(this.props.actionButtons?\"with-buttons\":\"\",this.props.className)},r.a.createElement(\"div\",{className:\"service-selector\"},r.a.createElement(\"ul\",{style:l,className:i()(\"button-group no-margin\",s,{segmented:o})},c?r.a.createElement(\"li\",{style:{paddingLeft:10,paddingRight:10,minWidth:\"15rem\"}},r.a.createElement(\"select\",{value:this.state.activeTab,style:{marginTop:10,marginBottom:10},className:\"bts-select\",onChange:function(t){var a=parseInt(t.target.value,10);e._changeTab(a,t.target[a].attributes[\"data-is-link-to\"].value)}},m)):m,this.props.actionButtons?r.a.createElement(\"li\",{className:\"tabs-action-buttons\"},this.props.actionButtons):null)),r.a.createElement(\"div\",{className:i()(\"tab-content\",n)},u))}}]),t}();v.propTypes={setting:l.a.string,defaultActiveTab:l.a.number,segmented:l.a.bool},v.defaultProps={active:0,defaultActiveTab:0,segmented:!0,contentClass:\"\",style:{}},v=Object(c.a)(v,{listenTo:function(){return[m.a]},getProps:function(){return{viewSettings:m.a.getState().viewSettings}}}),v=Object(h.a)(v)},1952:function(e,t,a){\"use strict\";var n=a(0),r=a.n(n),s=a(15),l=a(1),o=a.n(l),i=function(){function e(e,t){for(var a=0;a<t.length;a++){var n=t[a];n.enumerable=n.enumerable||!1,n.configurable=!0,\"value\"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,a,n){return a&&e(t.prototype,a),n&&e(t,n),t}}();var c=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}(this,t);e.scroll_length;var a=function(e,t){if(!e)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!t||\"object\"!=typeof t&&\"function\"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return a.state={active:!1},a.listener=!1,a.onBodyClick=a.onBodyClick.bind(a),a}return function(e,t){if(\"function\"!=typeof t&&null!==t)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,r.a.Component),i(t,[{key:\"componentDidMount\",value:function(){this._setListener()}},{key:\"shouldComponentUpdate\",value:function(e,t){return!s.a.are_equal_shallow(e.entries,this.props.entries)||!s.a.are_equal_shallow(t,this.state)||e.value!==this.props.value}},{key:\"_setListener\",value:function(){(arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props).entries.length>1&&!this.listener&&(this.listener=!0,document.body.addEventListener(\"click\",this.onBodyClick,{capture:!1,passive:!0}))}},{key:\"_removeListener\",value:function(){document.body.removeEventListener(\"click\",this.onBodyClick),this.listener=!1}},{key:\"componentWillReceiveProps\",value:function(e){1===e.entries.length?this._removeListener():e.entries.length>1&&this._setListener(e)}},{key:\"componentWillUnmount\",value:function(){this._removeListener()}},{key:\"onBodyClick\",value:function(e){var 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})}},{key:\"onChange\",value:function(e,t){t.preventDefault(),t.stopPropagation(),this.props.onChange(e),this.setState({active:!1})}},{key:\"_toggleDropdown\",value:function(){this.setState({active:!this.state.active})}},{key:\"render\",value:function(){var e=this,t=this.props,a=t.entries,n=t.value,s=this.state.active;if(0===a.length)return null;if(1==a.length)return r.a.createElement(\"div\",{className:\"dropdown-wrapper inactive\"+(this.props.upperCase?\" upper-case\":\"\")},r.a.createElement(\"div\",null,this.props.singleEntry?this.props.singleEntry:a[0]));var l=a.map(function(t){return r.a.createElement(\"li\",{className:e.props.upperCase?\"upper-case\":\"\",key:t,onClick:e.onChange.bind(e,e.props.values[t])},r.a.createElement(\"span\",null,t))});return r.a.createElement(\"div\",{onClick:this._toggleDropdown.bind(this),className:\"dropdown-wrapper\"+(s?\" active\":\"\")+(this.props.upperCase?\" upper-case\":\"\")},r.a.createElement(\"div\",{style:{paddingRight:15}},n||r.a.createElement(\"span\",{className:\"hidden\"},\"A\")),r.a.createElement(\"ul\",{className:\"dropdown\",style:{overflow:a.length>this.props.scroll_length?\"auto\":\"hidden\"}},l))}}]),t}();c.propTypes={scroll_length:o.a.number},c.defaultProps={scroll_length:9},t.a=c},2240:function(e,t,a){\"use strict\";a.r(t);var n=a(0),r=a.n(n),s=a(2227),l=a(2),o=a.n(l),i=a(119),c=a(178),u=a(140),m=a(33),d=a(127),p=a(88),h=a(572),f=a(568),b=a(107),_=a(15),g=function(){function e(e,t){for(var a=0;a<t.length;a++){var n=t[a];n.enumerable=n.enumerable||!1,n.configurable=!0,\"value\"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,a,n){return a&&e(t.prototype,a),n&&e(t,n),t}}();var E=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}(this,t);var a=function(e,t){if(!e)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!t||\"object\"!=typeof t&&\"function\"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return a.state={time:e.time},a}return function(e,t){if(\"function\"!=typeof t&&null!==t)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,r.a.Component),g(t,[{key:\"getHours\",value:function(e){return e/3600}},{key:\"render\",value:function(){return r.a.createElement(\"div\",null,this.getHours(this.state.time),\"h\")}}]),t}(),v=a(5),y=a(14),w=a(37),k=a(579),x=a(3),C=a.n(x),P=a(270),O=a(1949),A=a(453),N=function(){function e(e,t){for(var a=0;a<t.length;a++){var n=t[a];n.enumerable=n.enumerable||!1,n.configurable=!0,\"value\"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,a,n){return a&&e(t.prototype,a),n&&e(t,n),t}}();function T(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}var S=function(e,t){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(e){return e};return function(n){return e.setState(T({},t,a(n)))}},j=function(e){return function(t){return t[e]}},I=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}(this,t);var a=function(e,t){if(!e)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!t||\"object\"!=typeof t&&\"function\"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return a.onAccountNameChanged=S(a,\"funderAccountName\"),a.onAccountChanged=S(a,\"newFunderAccount\"),a.onPoolInput=S(a,\"fundPoolAmount\",j(\"amount\")),a.onFundPool=function(){return A.a.fundPool(a.state.newFunderAccount?a.state.newFunderAccount.get(\"id\"):null,a.props.core,a.props.asset,a.state.fundPoolAmount.replace(/,/g,\"\"))},a.reset=function(){a.setState(a.initialState())},a.initialState=function(){return{funderAccountName:a.props.funderAccountName,fundPoolAmount:0,fundPoolAsset:new w.a({amount:0,precision:a.props.core.get(\"precision\"),asset_id:a.props.core.get(\"id\")}),claimPoolAmount:0,claimPoolAmountAsset:new w.a({amount:0,precision:a.props.core.get(\"precision\"),asset_id:a.props.core.get(\"id\")}),claimFeesAmount:0,claimFeesAmountAsset:new w.a({amount:0,precision:a.props.asset.get(\"precision\"),asset_id:a.props.asset.get(\"id\")})}},a.onClaimPool=function(){return A.a.claimPool(a.props.asset,a.state.claimPoolAmountAsset)},a.state=a.initialState(),a}return function(e,t){if(\"function\"!=typeof t&&null!==t)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,r.a.Component),N(t,[{key:\"onClaimInput\",value:function(e,t){var a=t.amount;this.state[e+\"Asset\"].setAmount({real:a}),this.setState(T({},e,a))}},{key:\"onClaimFees\",value:function(){var e=v.ChainStore.getAccount(this.props.funderAccountName);e&&A.a.claimPoolFees(e.get(\"id\"),this.props.asset,this.state.claimFeesAmountAsset)}},{key:\"renderFundPool\",value:function(){var e=this.props,t=this.state,a=this.onPoolInput,n=this.onFundPool,s=this.reset,l=this.onAccountNameChanged,i=this.onAccountChanged,c=e.asset,u=e.core,d=e.hideBalance,p=e.getDynamicObject,h=t.funderAccountName,f=t.fundPoolAmount,b=t.newFunderAccount,_=null;d||(_=p(c.get(\"dynamic_asset_data_id\")));var g=u.get(\"id\")||\"1.3.0\",E=0;if(b){var y=b.getIn([\"balances\",g]);if(y){var w=v.ChainStore.getObject(y);w&&(E=w.get(\"balance\"))}}var k=r.a.createElement(\"span\",null,r.a.createElement(o.a,{component:\"span\",content:\"transfer.available\"}),\": \",r.a.createElement(m.a,{amount:E,asset:g}));return r.a.createElement(\"div\",null,d||r.a.createElement(\"div\",{style:{paddingBottom:\"1.5rem\"}},r.a.createElement(o.a,{content:\"explorer.asset.fee_pool.pool_balance\"}),r.a.createElement(\"span\",null,\": \"),_?r.a.createElement(m.a,{amount:_.get(\"fee_pool\"),asset:g}):null),r.a.createElement(P.a,{label:\"transaction.funding_account\",accountName:h,onChange:l,onAccountChanged:i,account:h,error:null,tabIndex:1}),r.a.createElement(O.a,{label:\"transfer.amount\",display_balance:k,amount:f,onChange:a,asset:g,assets:[g],placeholder:\"0.0\",tabIndex:2,style:{width:\"100%\",paddingTop:16}}),r.a.createElement(\"div\",{style:{paddingTop:\"1rem\"},className:\"button-group\"},r.a.createElement(\"button\",{className:C()(\"button\",{disabled:f<=0}),onClick:n},r.a.createElement(o.a,{content:\"transaction.trxTypes.asset_fund_fee_pool\"})),r.a.createElement(\"button\",{className:\"button outline\",onClick:s},r.a.createElement(o.a,{content:\"account.perm.reset\"}))))}},{key:\"renderClaimPool\",value:function(){var e=this,t=this.props,a=this.onClaimPool,n=this.reset,s=this.state.claimPoolAmount,l=t.asset,i=t.core,c=(0,t.getDynamicObject)(l.get(\"dynamic_asset_data_id\")),u=i.get(\"id\")||\"1.3.0\",d=c?r.a.createElement(\"span\",{onClick:function(){e.state.claimPoolAmountAsset.setAmount({sats:c.get(\"fee_pool\")}),e.setState({claimPoolAmount:e.state.claimPoolAmountAsset.getAmount({real:!0})})}},r.a.createElement(o.a,{component:\"span\",content:\"transfer.available\"}),\": \",r.a.createElement(m.a,{amount:c.get(\"fee_pool\"),asset:u})):null;return r.a.createElement(\"div\",null,r.a.createElement(o.a,{component:\"p\",content:\"explorer.asset.fee_pool.claim_pool_text\"}),r.a.createElement(O.a,{label:\"transfer.amount\",display_balance:d,amount:s,onChange:this.onClaimInput.bind(this,\"claimPoolAmount\"),asset:u,assets:[u],placeholder:\"0.0\",tabIndex:2,style:{width:\"100%\",paddingTop:16}}),r.a.createElement(\"div\",{style:{paddingTop:\"1rem\"},className:\"button-group\"},r.a.createElement(\"button\",{className:C()(\"button\",{disabled:s<=0}),onClick:a},r.a.createElement(o.a,{content:\"transaction.trxTypes.asset_claim_fee_pool\"})),r.a.createElement(\"button\",{className:\"button outline\",onClick:n},r.a.createElement(o.a,{content:\"account.perm.reset\"}))))}},{key:\"renderClaimFees\",value:function(){var e=this.props,t=this.state.claimFeesAmount,a=e.asset,n=(0,e.getDynamicObject)(a.get(\"dynamic_asset_data_id\")),s=n?n.get(\"accumulated_fees\"):0,l=t>0&&this.state.claimFeesAmountAsset.getAmount()<=s,i=r.a.createElement(\"span\",null,r.a.createElement(o.a,{component:\"span\",content:\"transfer.available\"}),\": \",r.a.createElement(m.a,{amount:s,asset:a.get(\"id\")}));return r.a.createElement(\"div\",null,r.a.createElement(o.a,{component:\"p\",content:\"explorer.asset.fee_pool.claim_text\",asset:a.get(\"symbol\")}),r.a.createElement(\"div\",{style:{paddingBottom:\"1rem\"}},r.a.createElement(o.a,{content:\"explorer.asset.fee_pool.unclaimed_issuer_income\"}),\": \",n?r.a.createElement(m.a,{amount:n.get(\"accumulated_fees\"),asset:a.get(\"id\")}):null),r.a.createElement(O.a,{label:\"transfer.amount\",display_balance:i,amount:t,onChange:this.onClaimInput.bind(this,\"claimFeesAmount\"),asset:a.get(\"id\"),assets:[a.get(\"id\")],placeholder:\"0.0\",tabIndex:1,style:{width:\"100%\",paddingTop:16}}),r.a.createElement(\"div\",{style:{paddingTop:\"1rem\"},className:\"button-group\"},r.a.createElement(\"button\",{className:C()(\"button\",{disabled:!l}),onClick:this.onClaimFees.bind(this)},r.a.createElement(o.a,{content:\"explorer.asset.fee_pool.claim_fees\"})),r.a.createElement(\"button\",{className:\"button outline\",onClick:this.reset.bind(this)},r.a.createElement(o.a,{content:\"account.perm.reset\"}))))}},{key:\"render\",value:function(){return\"fund\"===this.props.type?this.renderFundPool():\"claim\"===this.props.type?this.renderClaimPool():\"claim_fees\"===this.props.type?this.renderClaimFees():void 0}}]),t}();I.defaultProps={type:\"fund\"};var F=I=Object(u.a)(I,{propNames:[\"asset\",\"core\"],defaultProps:{core:\"1.3.0\"},withDynamic:!0}),q=a(24),B=a(31),R=a(4),D=a.n(R),L=a(43),z=a(45),M=function(){function e(e,t){for(var a=0;a<t.length;a++){var n=t[a];n.enumerable=n.enumerable||!1,n.configurable=!0,\"value\"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,a,n){return a&&e(t.prototype,a),n&&e(t,n),t}}();function J(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}var U=function(e){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}(this,t);var e=function(e,t){if(!e)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!t||\"object\"!=typeof t&&\"function\"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.state={new_issuer_account_id:null,issuer_account_name:null},e}return function(e,t){if(\"function\"!=typeof t&&null!==t)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,r.a.Component),M(t,[{key:\"onAccountNameChanged\",value:function(e,t){this.setState(J({},e,t))}},{key:\"onAccountChanged\",value:function(e,t){this.setState(J({},e,t?t.get(\"id\"):null))}},{key:\"onSubmit\",value:function(){var e=this;A.a.updateOwner(this.props.asset,this.state.new_issuer_account_id).then(function(){e.onReset()})}},{key:\"onReset\",value:function(){this.setState({new_issuer_account_id:null,issuer_account_name:null})}},{key:\"render\",value:function(){var e=this.props.currentOwner;return r.a.createElement(\"div\",null,r.a.createElement(\"div\",{style:{paddingBottom:\"1rem\"}},r.a.createElement(P.a,{label:\"account.user_issued_assets.current_issuer\",accountName:e.get(\"name\"),account:e.get(\"name\"),error:null,tabIndex:1,disabled:!0})),r.a.createElement(P.a,{label:\"account.user_issued_assets.new_issuer\",accountName:this.state.issuer_account_name,onChange:this.onAccountNameChanged.bind(this,\"issuer_account_name\"),onAccountChanged:this.onAccountChanged.bind(this,\"new_issuer_account_id\"),account:this.state.issuer_account_name,error:null,tabIndex:1,typeahead:!0,excludeAccounts:[e.get(\"name\")]}),r.a.createElement(\"div\",{style:{paddingTop:\"1rem\"},className:\"button-group\"},r.a.createElement(\"button\",{className:C()(\"button\",{disabled:!this.state.new_issuer_account_id}),onClick:this.onSubmit.bind(this)},r.a.createElement(o.a,{content:\"account.user_issued_assets.update_owner\"})),r.a.createElement(\"button\",{className:\"button outline\",onClick:this.onReset.bind(this)},r.a.createElement(o.a,{content:\"account.perm.reset\"}))))}}]),t}();U.propTypes={account:L.a.ChainAccount.isRequired,currentOwner:L.a.ChainAccount.isRequired};var V=U=Object(z.a)(U),W=function(){function e(e,t){for(var a=0;a<t.length;a++){var n=t[a];n.enumerable=n.enumerable||!1,n.configurable=!0,\"value\"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,a,n){return a&&e(t.prototype,a),n&&e(t,n),t}}();var G=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}(this,t);var a=function(e,t){if(!e)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!t||\"object\"!=typeof t&&\"function\"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this)),n=new w.a({amount:0,asset_id:e.quote.get(\"id\"),precision:e.quote.get(\"precision\")}),r=new w.a({amount:0,asset_id:e.base.get(\"id\"),precision:e.base.get(\"precision\")}),s=new w.i({quote:n,base:r});return a.state={price:s,realPriceValue:s.toReal()},a}return function(e,t){if(\"function\"!=typeof t&&null!==t)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,r.a.Component),W(t,[{key:\"onPriceChanged\",value:function(e){var t=e.amount;this.state.price.setPriceFromReal(parseFloat(t)),this.setState({realPriceValue:t}),this.props.onPriceChanged&&this.props.onPriceChanged(this.state.price.clone())}},{key:\"render\",value:function(){var e=this.state,t=e.realPriceValue,a=e.price;return r.a.createElement(O.a,{label:this.props.label,amount:t,onChange:this.onPriceChanged.bind(this),asset:a.base.asset_id,base:this.props.quote.get(\"symbol\"),isPrice:!0,assets:[a.quote.asset_id],placeholder:\"0.0\",tabIndex:1,style:{width:\"100%\",paddingRight:\"10px\"}})}}]),t}(),K=G=Object(u.a)(G,{propNames:[\"quote\",\"base\"],defaultProps:{base:\"1.3.0\"}}),H=function(){function e(e,t){for(var a=0;a<t.length;a++){var n=t[a];n.enumerable=n.enumerable||!1,n.configurable=!0,\"value\"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,a,n){return a&&e(t.prototype,a),n&&e(t,n),t}}();function Y(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}var Z=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}(this,t);var a=function(e,t){if(!e)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!t||\"object\"!=typeof t&&\"function\"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return a.state=a.resetState(e),a}return function(e,t){if(\"function\"!=typeof t&&null!==t)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,r.a.Component),H(t,[{key:\"resetState\",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,t=e.account.get(\"id\"),a=e.asset.getIn([\"bitasset\",\"current_feed\"]),n=a.get(\"maintenance_collateral_ratio\",1750),r=a.get(\"maximum_short_squeeze_ratio\",1100);return{publisher:e.account.get(\"name\"),publisher_id:t,mcr:n,mcrValue:n/1e3,mssr:r,mssrValue:r/1e3}}},{key:\"onAccountNameChanged\",value:function(e,t){this.setState(Y({},e,t))}},{key:\"onAccountChanged\",value:function(e,t){this.setState(Y({},e,t?t.get(\"id\"):null))}},{key:\"onSubmit\",value:function(){A.a.publishFeed({publisher:this.state.publisher_id,asset_id:this.props.asset.get(\"id\"),mcr:this.state.mcr,mssr:this.state.mssr,feedPrice:this.state.feedPrice,cer:this.state.cer})}},{key:\"onPriceChanged\",value:function(e,t){this.setState(Y({},e,t))}},{key:\"onSetRatio\",value:function(e,t){var a,n=t.amount;n&&\"string\"==typeof n&&-1!==n.indexOf(\".\")&&n.indexOf(\".\")+4!==n.length&&(n=n.substr(0,n.indexOf(\".\")+4)),this.setState((Y(a={},e+\"Value\",n),Y(a,e,Math.floor(1e3*parseFloat(n))),a))}},{key:\"render\",value:function(){var e=this.props.asset,t=this.state,a=t.mcrValue,n=t.mssrValue,s=t.publisher,l=e.get(\"id\"),i=e.getIn([\"bitasset\",\"options\",\"short_backing_asset\"]);return r.a.createElement(\"div\",null,r.a.createElement(P.a,{label:\"explorer.asset.feed_producer\",accountName:s,onChange:this.onAccountNameChanged.bind(this,\"publisher\"),onAccountChanged:this.onAccountChanged.bind(this,\"publisher_id\"),account:s,error:null,tabIndex:1,typeahead:!0}),r.a.createElement(\"br\",null),r.a.createElement(K,{onPriceChanged:this.onPriceChanged.bind(this,\"cer\"),label:\"explorer.asset.fee_pool.core_exchange_rate\",quote:\"1.3.0\",base:l}),r.a.createElement(\"br\",null),r.a.createElement(K,{onPriceChanged:this.onPriceChanged.bind(this,\"feedPrice\"),label:\"explorer.asset.price_feed.feed_price\",quote:i,base:l}),r.a.createElement(\"br\",null),r.a.createElement(O.a,{label:\"explorer.asset.price_feed.maintenance_collateral_ratio\",amount:a,onChange:this.onSetRatio.bind(this,\"mcr\"),placeholder:\"0.0\",style:{width:\"100%\",paddingRight:\"10px\"}}),r.a.createElement(\"br\",null),r.a.createElement(O.a,{label:\"explorer.asset.price_feed.maximum_short_squeeze_ratio\",amount:n,onChange:this.onSetRatio.bind(this,\"mssr\"),placeholder:\"0.0\",style:{width:\"100%\",paddingRight:\"10px\"}}),r.a.createElement(\"div\",{style:{paddingTop:\"1rem\"},className:\"button-group\"},r.a.createElement(\"button\",{className:C()(\"button\",{disabled:!1}),onClick:this.onSubmit.bind(this)},r.a.createElement(o.a,{content:\"transaction.trxTypes.asset_publish_feed\"}))))}}]),t}();Z.propTypes={account:L.a.ChainAccount.isRequired},Z=Object(z.a)(Z);var Q=Z=Object(u.a)(Z),X=function(){function e(e,t){for(var a=0;a<t.length;a++){var n=t[a];n.enumerable=n.enumerable||!1,n.configurable=!0,\"value\"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,a,n){return a&&e(t.prototype,a),n&&e(t,n),t}}();var $=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}(this,t);var a=function(e,t){if(!e)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!t||\"object\"!=typeof t&&\"function\"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return a.initialState=function(){return{account:v.ChainStore.getAccount(a.props.funderAccountName),collateralAmount:\"0\",debtAmount:\"0\"}},a.state=a.initialState(),a}return function(e,t){if(\"function\"!=typeof t&&null!==t)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,r.a.Component),X(t,[{key:\"reset\",value:function(){this.setState(this.initialState())}},{key:\"_collateralBidInput\",value:function(e){this.setState({collateralAmount:e.amount})}},{key:\"_debtBidInput\",value:function(e){this.setState({debtAmount:e.amount})}},{key:\"_onBidCollateral\",value:function(){var e=this,t=this.state,a=t.collateralAmount,n=t.debtAmount;a=0==a?a:a.replace(/,/g,\"\"),n=0==n?n:n.replace(/,/g,\"\"),A.a.bidCollateral(this.state.account?this.state.account.get(\"id\"):null,this.props.core,this.props.asset,a,n),setTimeout(function(){e.props.onUpdate()},6e3)}},{key:\"removeBid\",value:function(){var e=this;A.a.bidCollateral(this.state.account?this.state.account.get(\"id\"):null,this.props.core,this.props.asset,0,0),setTimeout(function(){e.props.onUpdate()},6e3)}},{key:\"renderCollateralBid\",value:function(){var e=this.props,t=e.asset,a=e.core,n=this.state,s=n.account,l=n.collateralAmount,i=n.debtAmount,c=1,u=a.get(\"id\")||\"1.3.0\",p=0,h=s?s.getIn([\"balances\",u]):null;if(h){var f=v.ChainStore.getObject(h);f&&(p=f.get(\"balance\"))}var b=r.a.createElement(\"span\",null,r.a.createElement(o.a,{component:\"span\",content:\"transfer.available\"}),\": \",r.a.createElement(m.a,{amount:p,asset:u}));return r.a.createElement(\"div\",null,r.a.createElement(O.a,{label:\"transaction.collateral\",display_balance:b,amount:l,onChange:this._collateralBidInput.bind(this),asset:u,assets:[u],placeholder:\"0.0\",tabIndex:c++,style:{width:\"100%\",paddingTop:16}}),r.a.createElement(O.a,{label:\"transaction.borrow_amount\",amount:i,onChange:this._debtBidInput.bind(this),asset:t.get(\"id\"),assets:[t.get(\"id\")],placeholder:\"0.0\",tabIndex:c++,style:{width:\"100%\",paddingTop:16}}),\"0\"!==this.state.collateralAmount&&\"0\"!==this.state.debtAmount&&r.a.createElement(\"div\",{style:{paddingTop:\"1rem\"}},r.a.createElement(o.a,{content:\"explorer.asset.collateral.bid_price\"}),\" \",r.a.createElement(d.a,{base_amount:this.state.collateralAmount/1,base_asset:u,quote_amount:this.state.debtAmount/1,quote_asset:t.get(\"id\"),noPopOver:!0,ignorePriceFeed:!0})),r.a.createElement(\"div\",{style:{paddingTop:\"1rem\"},className:\"button-group\"},r.a.createElement(\"button\",{className:C()(\"button\"),onClick:this._onBidCollateral.bind(this),tabIndex:c++},r.a.createElement(o.a,{content:\"transaction.trxTypes.bid_collateral\"})),r.a.createElement(\"button\",{className:\"button outline\",onClick:this.reset.bind(this),tabIndex:c++},r.a.createElement(o.a,{content:\"account.perm.reset\"}))))}},{key:\"render\",value:function(){return this.renderCollateralBid()}}]),t}(),ee=$=Object(u.a)($,{propNames:[\"asset\",\"core\"],defaultProps:{core:\"1.3.0\"},withDynamic:!0}),te=a(1951),ae=a(7),ne=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e},re=function(){function e(e,t){for(var a=0;a<t.length;a++){var n=t[a];n.enumerable=n.enumerable||!1,n.configurable=!0,\"value\"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,a,n){return a&&e(t.prototype,a),n&&e(t,n),t}}();function se(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function le(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}function oe(e,t){if(!e)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!t||\"object\"!=typeof t&&\"function\"!=typeof t?e:t}function ie(e,t){if(\"function\"!=typeof t&&null!==t)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var ce=function(e){function t(){return le(this,t),oe(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return ie(t,r.a.Component),re(t,[{key:\"render\",value:function(){var e=this.props,t=e.isSet,a=e.name;return t?r.a.createElement(\"span\",{className:\"asset-flag\"},r.a.createElement(\"span\",{className:\"label info\"},r.a.createElement(o.a,{content:\"account.user_issued_assets.\"+a}))):r.a.createElement(\"span\",null)}}]),t}(),ue=function(e){function t(){return le(this,t),oe(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return ie(t,r.a.Component),re(t,[{key:\"render\",value:function(){var e=this.props,t=e.isSet,a=e.name;return t?r.a.createElement(\"span\",{className:\"asset-flag\"},r.a.createElement(\"span\",{className:\"label info\"},r.a.createElement(o.a,{content:\"account.user_issued_assets.\"+a}))):r.a.createElement(\"span\",null)}}]),t}(),me=function(e){function t(e){le(this,t);var a=oe(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return a.state={callOrders:[],collateralBids:[],marginTableSort:\"ratio\",collateralTableSort:\"price\",sortDirection:!0,showCollateralBidInInfo:!1,cumulativeGrouping:!1,activeFeedTab:\"feed\"},a}return ie(t,r.a.Component),re(t,[{key:\"componentWillMount\",value:function(){this._getMarginCollateral()}},{key:\"updateOnCollateralBid\",value:function(){this._getMarginCollateral()}},{key:\"_getMarginCollateral\",value:function(){var e=this;if(this.props.asset.has(\"bitasset\")){var t,a=(se(t={},this.props.asset.get(\"id\"),this.props.asset.toJS()),se(t,this.props.backingAsset.get(\"id\"),this.props.backingAsset.toJS()),t),n=this.props.asset.getIn([\"bitasset\",\"is_prediction_market\"],!1),r=this._getFeedPrice();if(r){try{var s=this.props.asset.getIn([\"bitasset\",\"current_feed\",\"maintenance_collateral_ratio\"]);y.Apis.instance().db_api().exec(\"get_call_orders\",[this.props.asset.get(\"id\"),300]).then(function(t){var l=t.map(function(t){return new w.b(t,a,e.props.asset.get(\"id\"),r,s,n)});e.setState({callOrders:l})})}catch(e){}try{y.Apis.instance().db_api().exec(\"get_collateral_bids\",[this.props.asset.get(\"id\"),100,0]).then(function(t){var n=t.map(function(t){return new w.c(t,a,e.props.asset.get(\"id\"),r)});e.setState({collateralBids:n})})}catch(e){console.log(\"get_collateral_bids Error: \",e)}}}}},{key:\"_getFeedPrice\",value:function(){var e,t=(se(e={},this.props.asset.get(\"id\"),this.props.asset.toJS()),se(e,this.props.backingAsset.get(\"id\"),this.props.backingAsset.toJS()),e),a=this.props.asset.getIn([\"bitasset\",\"is_prediction_market\"],!1),n=this.props.asset.getIn([\"bitasset\",\"current_feed\",\"maximum_short_squeeze_ratio\"]),r=b.a.extractRawFeedPrice(this.props.asset);if(0==r.getIn([\"base\",\"amount\"])&&0==r.getIn([\"quote\",\"amount\"]))return null;if((a&&r.getIn([\"base\",\"asset_id\"])===r.getIn([\"quote\",\"asset_id\"])&&(t[this.props.backingAsset.get(\"id\")]||(t[this.props.backingAsset.get(\"id\")]={precision:this.props.asset.get(\"precision\")}),r=(r=(r=(r=r.setIn([\"base\",\"amount\"],1)).setIn([\"base\",\"asset_id\"],this.props.backingAsset.get(\"id\"))).setIn([\"quote\",\"amount\"],1)).setIn([\"quote\",\"asset_id\"],this.props.asset.get(\"id\")),n=1e3),r.toJS)&&!t[r.toJS().base.asset_id])return;return new w.d({priceObject:r,market_base:this.props.asset.get(\"id\"),sqr:n,assets:t})}},{key:\"_toggleCumulativeGrouping\",value:function(){this.setState({cumulativeGrouping:!this.state.cumulativeGrouping})}},{key:\"_assetType\",value:function(e){return\"bitasset\"in e?e.bitasset.is_prediction_market?\"Prediction\":\"Smart\":\"Simple\"}},{key:\"formattedPrice\",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=arguments.length>4&&void 0!==arguments[4]&&arguments[4],l=e.base,o=e.quote;return r.a.createElement(d.a,{base_amount:l.amount,base_asset:l.asset_id,quote_amount:o.amount,quote_asset:o.asset_id,hide_value:a,hide_symbols:t,factor:n,negative_invert:s})}},{key:\"renderFlagIndicators\",value:function(e,t){return r.a.createElement(\"div\",null,t.map(function(t){return r.a.createElement(ce,{key:\"flag_\"+t,name:t,isSet:e[t]})}))}},{key:\"renderPermissionIndicators\",value:function(e,t){return r.a.createElement(\"div\",null,t.map(function(t){return r.a.createElement(ue,{key:\"perm_\"+t,name:t,isSet:e[t]})}))}},{key:\"renderAuthorityList\",value:function(e){return e.map(function(e){return r.a.createElement(\"span\",{key:e},r.a.createElement(i.a,{account:e}),\" \")})}},{key:\"renderMarketList\",value:function(e,t){var a=e.symbol;return t.map(function(e){if(e==a)return null;var t=e+\"_\"+a,n=e+\"/\"+a;return r.a.createElement(\"span\",{key:t},r.a.createElement(s.a,{to:\"/exchange/market/\"+t},n),\" \")}.bind(this))}},{key:\"renderAboutBox\",value:function(e,t){var a=v.ChainStore.getObject(e.issuer,!1,!1),n=a?a.get(\"name\"):\"\",l=b.a.parseDescription(e.options.description),i=l.main,c=l.short_name?l.short_name:null,u=(i=i&&i.length>0?i+\" \":i).match(/(http?):\\/\\/(www\\.)?[a-z0-9\\.:].*?(?=\\s)/g),m=v.ChainStore.getAsset(\"1.3.0\"),d=l.market?l.market:m?m.get(\"symbol\"):\"BTS\";\"bitasset\"in e&&e.bitasset.is_prediction_market&&(d=(d=v.ChainStore.getAsset(e.bitasset.options.short_backing_asset))?d.get(\"symbol\"):m.get(\"symbol\")),e.symbol===m.get(\"symbol\")&&(d=\"USD\"),u&&u.length&&u.forEach(function(e){var t='<a target=\"_blank\" class=\"external-link\" rel=\"noopener noreferrer\" href=\"'+e+'\">'+e+\"</a>\";i=i.replace(e,t)});var p=_.a.replaceName(t),h=p.name,g=p.prefix;return r.a.createElement(\"div\",{style:{overflow:\"visible\"}},r.a.createElement(f.a,{path:\"assets/\"+e.symbol,alt_path:\"assets/Asset\",section:\"summary\",symbol:(g||\"\")+h,description:i,issuer:n,hide_issuer:\"true\"}),c?r.a.createElement(\"p\",null,c):null,r.a.createElement(s.a,{className:\"button market-button\",to:\"/exchange/market/\"+e.symbol+\"_\"+d},r.a.createElement(o.a,{content:\"exchange.market\"})))}},{key:\"renderSummary\",value:function(e){var t=this.props.getDynamicObject(e.dynamic_asset_data_id);t&&(t=t.toJS());var a=e.options,n=b.a.getFlagBooleans(e.options.flags,this.props.asset.has(\"bitasset_data_id\")),s=Object.keys(n),l=t?r.a.createElement(\"tr\",null,r.a.createElement(\"td\",null,r.a.createElement(o.a,{content:\"explorer.asset.summary.current_supply\"})),r.a.createElement(\"td\",null,r.a.createElement(m.a,{amount:t.current_supply,asset:e.id}))):null,u=t?r.a.createElement(\"tr\",null,r.a.createElement(\"td\",null,r.a.createElement(o.a,{content:\"explorer.asset.summary.stealth_supply\"})),r.a.createElement(\"td\",null,r.a.createElement(m.a,{amount:t.confidential_supply,asset:e.id}))):null,d=n.charge_market_fee?r.a.createElement(\"tr\",null,r.a.createElement(\"td\",null,r.a.createElement(o.a,{content:\"explorer.asset.summary.market_fee\"})),r.a.createElement(\"td\",null,\" \",a.market_fee_percent/100,\" % \")):null,h=n.charge_market_fee&&a.extensions&&a.extensions.reward_percent>=0?r.a.createElement(\"tr\",null,r.a.createElement(\"td\",null,r.a.createElement(ae.Tooltip,{title:D.a.translate(\"account.user_issued_assets.reward_percent_tooltip\")},r.a.createElement(o.a,{content:\"explorer.asset.summary.market_fee_referral_reward_percent\"}),\" \",r.a.createElement(ae.Icon,{type:\"question-circle\",theme:\"filled\"}))),r.a.createElement(\"td\",null,\" \",a.extensions.reward_percent/100,\" % \")):null;return r.a.createElement(\"div\",{className:\"asset-card no-padding\"},r.a.createElement(\"div\",{className:\"card-divider\"},r.a.createElement(p.a,{name:e.symbol})),r.a.createElement(\"table\",{className:\"table key-value-table table-hover\"},r.a.createElement(\"tbody\",null,r.a.createElement(\"tr\",null,r.a.createElement(\"td\",null,r.a.createElement(o.a,{content:\"explorer.asset.summary.asset_type\"})),r.a.createElement(\"td\",null,\" \",this._assetType(e),\" \")),r.a.createElement(\"tr\",null,r.a.createElement(\"td\",null,r.a.createElement(o.a,{content:\"explorer.asset.summary.issuer\"})),r.a.createElement(\"td\",null,r.a.createElement(i.a,{account:e.issuer}))),r.a.createElement(\"tr\",null,r.a.createElement(\"td\",null,r.a.createElement(o.a,{content:\"explorer.assets.precision\"})),r.a.createElement(\"td\",null,\" \",e.precision,\" \")),e.bitasset?r.a.createElement(\"tr\",null,r.a.createElement(\"td\",null,r.a.createElement(o.a,{content:\"explorer.assets.backing_asset\"})),r.a.createElement(\"td\",null,r.a.createElement(c.a,{asset:e.bitasset.options.short_backing_asset}))):null,l,u,d,h)),r.a.createElement(\"br\",null),this.renderFlagIndicators(n,s))}},{key:\"renderPriceFeed\",value:function(e){var t=r.a.createElement(o.a,{content:\"explorer.asset.price_feed.title\"}),a=e.bitasset;if(!(\"current_feed\"in a))return r.a.createElement(\"div\",{header:t});var n=a.current_feed,s=this.formattedPrice(b.a.extractRawFeedPrice(e));return r.a.createElement(\"div\",{className:\"asset-card no-padding\"},r.a.createElement(\"div\",{className:\"card-divider\"},t),r.a.createElement(\"table\",{className:\"table key-value-table table-hover\",style:{padding:\"1.2rem\"}},r.a.createElement(\"tbody\",null,r.a.createElement(\"tr\",null,r.a.createElement(\"td\",null,r.a.createElement(o.a,{content:\"explorer.asset.price_feed.external_feed_price\"})),r.a.createElement(\"td\",null,s)),r.a.createElement(\"tr\",null,r.a.createElement(\"td\",null,r.a.createElement(o.a,{content:\"explorer.asset.price_feed.feed_lifetime\"})),r.a.createElement(\"td\",null,a.options.feed_lifetime_sec/60/60)),r.a.createElement(\"tr\",null,r.a.createElement(\"td\",null,r.a.createElement(o.a,{content:\"explorer.asset.price_feed.min_feeds\"})),r.a.createElement(\"td\",null,a.options.minimum_feeds)),r.a.createElement(\"tr\",null,r.a.createElement(\"td\",null,r.a.createElement(o.a,{content:\"explorer.asset.price_feed.maintenance_collateral_ratio\"})),r.a.createElement(\"td\",null,n.maintenance_collateral_ratio/1e3)),r.a.createElement(\"tr\",null,r.a.createElement(\"td\",null,r.a.createElement(o.a,{content:\"explorer.asset.price_feed.maximum_short_squeeze_ratio\"})),r.a.createElement(\"td\",null,n.maximum_short_squeeze_ratio/1e3)))))}},{key:\"_analyzeBids\",value:function(e){var t=e,a=0,n=0;return this.state.collateralBids.sort(function(e,t){return t.bid.toReal()-e.bid.toReal()}).forEach(function(e){var r=e.collateral,s=e.debt;n<t?(n+s>=t?(r=(s=t-n)/e.debt*r,e.consideredIfRevived=2):e.consideredIfRevived=1,a+=r,n+=s):e.consideredIfRevived=0}),{collateral:a,debt:n}}},{key:\"renderSettlement\",value:function(e){var t=this,a=r.a.createElement(o.a,{content:\"explorer.asset.settlement.title\"}),n=e.bitasset;if(!(\"current_feed\"in n))return r.a.createElement(\"div\",{header:a});var s=this.props.getDynamicObject(e.dynamic_asset_data_id);s&&(s=s.toJS());var l=s?s.current_supply:0,i=n.current_feed,c=e.bitasset.settlement_fund>0,u=null,p=null,h=null;if(c){var f,_=n.settlement_fund,g=this.formattedPrice(n.settlement_price),v=this.formattedPrice(n.settlement_price,!1,!1,i.maintenance_collateral_ratio/1e3,!0),y=(se(f={},this.props.asset.get(\"id\"),this.props.asset.toJS()),se(f,this.props.backingAsset.get(\"id\"),this.props.backingAsset.toJS()),f),w=this._getFeedPrice();if(!w)return;var k=l,x=n.settlement_fund,C=this._analyzeBids(k);h=r.a.createElement(d.a,{base_amount:n.settlement_fund/1+C.collateral,base_asset:y[n.options.short_backing_asset].id,quote_amount:C.debt,quote_asset:e.id,hide_value:!1,hide_symbols:!1,factor:i.maintenance_collateral_ratio/1e3,negative_invert:!0}),k/=Math.pow(10,e.precision),u=(x/=Math.pow(10,y[n.options.short_backing_asset].precision))/w.toReal()/k,p=(x+C.collateral/Math.pow(10,y[n.options.short_backing_asset].precision))/w.toReal()/k}else var P=this.getGlobalSettlementPrice(),O=n.force_settled_volume,A=n.options.force_settlement_offset_percent,N=n.options.force_settlement_delay_sec,T=n.options.maximum_force_settlement_volume,S=this.formattedPrice(b.a.extractRawFeedPrice(e),!1,!1,i.maximum_short_squeeze_ratio/1e3),j=this.formattedPrice(b.a.extractRawFeedPrice(e),!1,!1,1-A/1e4);return r.a.createElement(\"div\",{className:\"asset-card no-padding\"},r.a.createElement(\"div\",{className:\"card-divider\"},a),c&&r.a.createElement(o.a,{component:\"p\",content:\"explorer.asset.settlement.gs_description\"}),c&&r.a.createElement(\"p\",null,r.a.createElement(o.a,{content:\"explorer.asset.settlement.gs_revive\"}),\" (\",r.a.createElement(o.a,{content:\"explorer.asset.settlement.gs_see_actions\"}),\", \",r.a.createElement(o.a,{content:\"explorer.asset.settlement.gs_or\"}),\" \",r.a.createElement(\"a\",{onClick:function(){t.setState({showCollateralBidInInfo:!t.state.showCollateralBidInInfo})}},r.a.createElement(o.a,{content:\"explorer.asset.settlement.gs_place_bid\"})),\").\"),r.a.createElement(\"table\",{className:\"table key-value-table table-hover\",style:{padding:\"1.2rem\"}},c?r.a.createElement(\"tbody\",null,r.a.createElement(\"tr\",null,r.a.createElement(\"td\",null,r.a.createElement(o.a,{content:\"explorer.asset.settlement.settlement_price\"})),r.a.createElement(\"td\",null,g)),r.a.createElement(\"tr\",null,r.a.createElement(\"td\",null,r.a.createElement(o.a,{content:\"explorer.asset.settlement.settlement_funds\"})),r.a.createElement(\"td\",null,r.a.createElement(m.a,{asset:n.options.short_backing_asset,amount:_}))),r.a.createElement(\"tr\",null,r.a.createElement(\"td\",null,r.a.createElement(o.a,{content:\"explorer.asset.settlement.settlement_funds_collateral_ratio\"})),r.a.createElement(\"td\",null,u.toFixed(6))),r.a.createElement(\"tr\",null,r.a.createElement(\"td\",null,\" \"),r.a.createElement(\"td\",null,\" \")),r.a.createElement(\"tr\",null,r.a.createElement(\"td\",null,r.a.createElement(o.a,{style:{fontWeight:\"bold\"},content:\"explorer.asset.settlement.gs_revert\"})),r.a.createElement(\"td\",null,\" \")),r.a.createElement(\"tr\",null,r.a.createElement(\"td\",null,r.a.createElement(o.a,{content:\"explorer.asset.settlement.gs_auto_revive_price\"})),r.a.createElement(\"td\",null,v,\" / \",h)),r.a.createElement(\"tr\",null,r.a.createElement(\"td\",null,r.a.createElement(o.a,{content:\"explorer.asset.settlement.gs_collateral_valuation\",mcr:i.maintenance_collateral_ratio/1e3})),r.a.createElement(\"td\",null,p.toFixed(6)))):r.a.createElement(\"tbody\",null,r.a.createElement(\"tr\",null,r.a.createElement(\"td\",null,r.a.createElement(o.a,{content:\"explorer.asset.price_feed.maximum_short_squeeze_price\"})),r.a.createElement(\"td\",null,S)),r.a.createElement(\"tr\",null,r.a.createElement(\"td\",null,r.a.createElement(o.a,{content:\"explorer.asset.price_feed.global_settlement_price\"})),r.a.createElement(\"td\",null,P||\"-\")),r.a.createElement(\"tr\",null,r.a.createElement(\"td\",null,\" \"),r.a.createElement(\"td\",null,\" \")),r.a.createElement(\"tr\",null,r.a.createElement(\"td\",null,r.a.createElement(o.a,{style:{fontWeight:\"bold\"},content:\"explorer.asset.settlement.force_settlement\"})),r.a.createElement(\"td\",null,\" \")),r.a.createElement(\"tr\",null,r.a.createElement(\"td\",null,r.a.createElement(o.a,{content:\"explorer.asset.settlement.price\"}),\" (\",A/100,\"%\",\" \",r.a.createElement(o.a,{content:\"explorer.asset.settlement.offset\"}),\")\"),r.a.createElement(\"td\",null,j)),r.a.createElement(\"tr\",null,r.a.createElement(\"td\",null,r.a.createElement(o.a,{content:\"explorer.asset.settlement.delay\"})),r.a.createElement(\"td\",null,r.a.createElement(E,{time:N}))),r.a.createElement(\"tr\",null,r.a.createElement(\"td\",null,r.a.createElement(o.a,{content:\"explorer.asset.settlement.max_settle_volume\"}),\" (\",T/100,\"%)\"),r.a.createElement(\"td\",null,r.a.createElement(m.a,{asset:e.id,amount:l*(T/1e4)}))),r.a.createElement(\"tr\",null,r.a.createElement(\"td\",null,r.a.createElement(o.a,{content:\"explorer.asset.settlement.current_settled\"})),r.a.createElement(\"td\",null,r.a.createElement(m.a,{asset:e.id,amount:O}))),r.a.createElement(\"tr\",null,r.a.createElement(\"td\",null,r.a.createElement(o.a,{content:\"explorer.asset.settlement.settle_remaining_volume\"})),r.a.createElement(\"td\",null,0==O?100:Math.round(100-O/(l*(T/1e4))*100,2),\"%\")))))}},{key:\"renderFeePool\",value:function(e){var t=this.props.getDynamicObject(e.dynamic_asset_data_id);t&&(t=t.toJS());var a=e.options,n=v.ChainStore.getAsset(\"1.3.0\");return r.a.createElement(\"div\",{className:\"asset-card no-padding\"},r.a.createElement(\"div\",{className:\"card-divider\"},r.a.createElement(o.a,{content:\"explorer.asset.fee_pool.title\"})),r.a.createElement(o.a,{component:\"p\",content:\"explorer.asset.fee_pool.pool_text\",unsafe:!0,asset:e.symbol,core:n.get(\"symbol\")}),r.a.createElement(\"table\",{className:\"table key-value-table\",style:{padding:\"1.2rem\"}},r.a.createElement(\"tbody\",null,r.a.createElement(\"tr\",null,r.a.createElement(\"td\",null,r.a.createElement(o.a,{content:\"explorer.asset.fee_pool.core_exchange_rate\"})),r.a.createElement(\"td\",null,this.formattedPrice(a.core_exchange_rate))),r.a.createElement(\"tr\",null,r.a.createElement(\"td\",null,r.a.createElement(o.a,{content:\"explorer.asset.fee_pool.pool_balance\"})),r.a.createElement(\"td\",null,t?r.a.createElement(m.a,{asset:\"1.3.0\",amount:t.fee_pool}):null)),r.a.createElement(\"tr\",null,r.a.createElement(\"td\",null,r.a.createElement(o.a,{content:\"explorer.asset.fee_pool.unclaimed_issuer_income\"})),r.a.createElement(\"td\",null,t?r.a.createElement(m.a,{asset:e.id,amount:t.accumulated_fees}):null)))))}},{key:\"renderAssetOwnerUpdate\",value:function(e){return r.a.createElement(\"div\",{className:\"grid-content small-no-padding\",style:{overflowY:\"visible\"}},r.a.createElement(\"div\",{className:\"asset-card no-padding\"},r.a.createElement(\"div\",{className:\"card-divider\"},r.a.createElement(o.a,{content:\"account.user_issued_assets.update_owner\"})),r.a.createElement(o.a,{component:\"p\",content:\"account.user_issued_assets.update_owner_text\",asset:e.symbol}),r.a.createElement(V,{asset:e,account:this.props.currentAccount,currentOwner:e.issuer})))}},{key:\"renderFeedPublish\",value:function(e){return r.a.createElement(\"div\",{className:\"grid-content small-no-padding\",style:{overflowY:\"visible\"}},r.a.createElement(\"div\",{className:\"asset-card no-padding\"},r.a.createElement(\"div\",{className:\"card-divider\"},r.a.createElement(o.a,{content:\"transaction.trxTypes.asset_publish_feed\"})),r.a.createElement(o.a,{component:\"p\",content:\"explorer.asset.feed_producer_text\"}),r.a.createElement(Q,{asset:e.id,account:this.props.currentAccount,currentOwner:e.issuer})))}},{key:\"renderCollateralBid\",value:function(e){return r.a.createElement(\"div\",{className:\"grid-content small-no-padding\"},r.a.createElement(\"div\",{className:\"asset-card no-padding\"},r.a.createElement(\"div\",{className:\"card-divider\"},r.a.createElement(o.a,{content:\"explorer.asset.collateral.bid\"})),r.a.createElement(o.a,{component:\"p\",content:\"explorer.asset.collateral.bid_text\",asset:e.symbol}),r.a.createElement(o.a,{component:\"p\",content:\"explorer.asset.settlement.gs_included_on_revival\"}),r.a.createElement(o.a,{component:\"p\",content:\"explorer.asset.collateral.remove_bid\"}),r.a.createElement(ee,{asset:e.symbol,funderAccountName:this.props.currentAccount,onUpdate:this.updateOnCollateralBid.bind(this),hideBalance:!0})))}},{key:\"renderFeePoolFunding\",value:function(e){return r.a.createElement(\"div\",{className:\"grid-content small-no-padding\"},r.a.createElement(\"div\",{className:\"asset-card no-padding\"},r.a.createElement(\"div\",{className:\"card-divider\"},r.a.createElement(o.a,{content:\"explorer.asset.fee_pool.fund\"})),r.a.createElement(o.a,{component:\"p\",content:\"explorer.asset.fee_pool.fund_text\",asset:e.symbol}),r.a.createElement(F,{asset:e.symbol,funderAccountName:this.props.currentAccount,hideBalance:!0})))}},{key:\"renderFeePoolClaiming\",value:function(e){var t=this.props.getDynamicObject(e.dynamic_asset_data_id);return t&&(t=t.toJS()),r.a.createElement(\"div\",{className:\"grid-content small-no-padding\"},r.a.createElement(\"div\",{className:\"asset-card no-padding\"},r.a.createElement(\"div\",{className:\"card-divider\"},r.a.createElement(o.a,{content:\"explorer.asset.fee_pool.claim_balance\"})),r.a.createElement(F,{asset:e.symbol,funderAccountName:this.props.currentAccount,dynamic:t,hideBalance:!0,type:\"claim\"})))}},{key:\"renderFeesClaiming\",value:function(e){var t=this.props.getDynamicObject(e.dynamic_asset_data_id);return t&&(t=t.toJS()),r.a.createElement(\"div\",{className:\"grid-content small-no-padding\"},r.a.createElement(\"div\",{className:\"asset-card no-padding\"},r.a.createElement(\"div\",{className:\"card-divider\"},r.a.createElement(o.a,{content:\"transaction.trxTypes.asset_claim_fees\"})),r.a.createElement(F,{asset:e.symbol,dynamic:t,funderAccountName:this.props.currentAccount,hideBalance:!0,type:\"claim_fees\"})))}},{key:\"renderPermissions\",value:function(e){var t=e.options,a=b.a.getFlagBooleans(e.options.issuer_permissions,this.props.asset.has(\"bitasset_data_id\")),n=Object.keys(a),s=a.charge_market_fee?r.a.createElement(\"tr\",null,r.a.createElement(\"td\",null,r.a.createElement(o.a,{content:\"explorer.asset.permissions.max_market_fee\"})),r.a.createElement(\"td\",null,r.a.createElement(m.a,{amount:+t.max_market_fee,asset:e.id}))):null,l=r.a.createElement(\"tr\",null,r.a.createElement(\"td\",null,r.a.createElement(o.a,{content:\"explorer.asset.permissions.max_supply\"})),r.a.createElement(\"td\",null,r.a.createElement(m.a,{amount:+t.max_supply,asset:e.id}))),i=a.white_list?r.a.createElement(\"div\",null,r.a.createElement(\"br\",null),!!t.blacklist_authorities&&!!t.blacklist_authorities.length&&r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,{content:\"explorer.asset.permissions.blacklist_authorities\"}),\": \",this.renderAuthorityList(t.blacklist_authorities)),!!t.blacklist_markets&&!!t.blacklist_markets.length&&r.a.createElement(r.a.Fragment,null,r.a.createElement(\"br\",null),r.a.createElement(o.a,{content:\"explorer.asset.permissions.blacklist_markets\"}),\": \",this.renderMarketList(e,t.blacklist_markets)),!!t.whitelist_authorities&&!!t.whitelist_authorities.length&&r.a.createElement(r.a.Fragment,null,r.a.createElement(\"br\",null),r.a.createElement(o.a,{content:\"explorer.asset.permissions.whitelist_authorities\"}),\": \",this.renderAuthorityList(t.whitelist_authorities)),!!t.whitelist_markets&&!!t.whitelist_markets.length&&r.a.createElement(r.a.Fragment,null,r.a.createElement(\"br\",null),r.a.createElement(o.a,{content:\"explorer.asset.permissions.whitelist_markets\"}),\": \",this.renderMarketList(e,t.whitelist_markets))):null,c=e.options.extensions.whitelist_market_fee_sharing&&r.a.createElement(r.a.Fragment,null,r.a.createElement(\"br\",null),r.a.createElement(o.a,{content:\"explorer.asset.permissions.accounts_in_whitelist_market_fee_sharing\"}),\": \",this.renderAuthorityList(e.options.extensions.whitelist_market_fee_sharing));return r.a.createElement(\"div\",{className:\"asset-card no-padding\"},r.a.createElement(\"div\",{className:\"card-divider\"},r.a.createElement(o.a,{content:\"explorer.asset.permissions.title\"})),r.a.createElement(\"table\",{className:\"table key-value-table table-hover\",style:{padding:\"1.2rem\"}},r.a.createElement(\"tbody\",null,s,l)),r.a.createElement(\"br\",null),this.renderPermissionIndicators(a,n),r.a.createElement(\"br\",null),i,c)}},{key:\"getGlobalSettlementPrice\",value:function(){if(!this.state.callOrders)return null;for(var e=null,t=null,a=this.state.callOrders.length,n=0;n<a;n++){var s=this.state.callOrders[n];null==e?(e=s,t=s.getRatio()):s.getRatio()<t&&(t=s.getRatio(),e=s)}if(null==e)return null;var l=e.debt,o=e.collateral;return r.a.createElement(d.a,{base_amount:o,base_asset:e.call_price.base.asset_id,quote_amount:l,quote_asset:e.call_price.quote.asset_id})}},{key:\"_renderFeedTable\",value:function(e){var t=this,a=e.bitasset;if(!(\"feeds\"in a)||0==a.feeds.length||a.is_prediction_market||!a.feeds.length)return null;var n=(new Date).getTime(),s=new Date(n-1e3*e.bitasset.options.feed_lifetime_sec),l=a.feeds;l=l.filter(function(e){return new Date(e[1][0])>s}).sort(function(e,t){return new Date(t[1][0])-new Date(e[1][0])});var c,u=b.a.extractRawFeedPrice(l[0][1][1]),m=l[0][1][1].core_exchange_rate,d=[];c=[{key:\"publisher\",fixed:\"left\",width:150,title:r.a.createElement(o.a,{content:\"explorer.asset.price_feed_data.publisher\"}),dataIndex:\"publisher\",render:function(e){return r.a.createElement(i.a,{account:e})}},{key:\"feed_price\",title:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,{content:\"explorer.asset.price_feed_data.feed_price\"}),\" \",\"(\",this.formattedPrice(u,!1,!0),\")\"),dataIndex:\"feed_price\",render:function(e){return t.formattedPrice(e,!0)}},{key:\"core_exchange_rate\",title:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,{content:\"explorer.asset.price_feed_data.core_exchange_rate\"}),\" \",\"(\",this.formattedPrice(m,!1,!0),\")\"),dataIndex:\"core_exchange_rate\",render:function(e){return t.formattedPrice(e,!0)}},{key:\"maintenance_collateral_ratio\",title:r.a.createElement(o.a,{content:\"explorer.asset.price_feed_data.maintenance_collateral_ratio\"}),dataIndex:\"maintenance_collateral_ratio\",render:function(e){return e}},{key:\"maximum_short_squeeze_ratio\",title:r.a.createElement(o.a,{content:\"explorer.asset.price_feed_data.maintenance_collateral_ratio\"}),dataIndex:\"maximum_short_squeeze_ratio\",render:function(e){return e}},{key:\"publishDate\",fixed:\"right\",width:150,title:r.a.createElement(o.a,{content:\"explorer.asset.price_feed_data.published\"}),dataIndex:\"publishDate\",render:function(e){return r.a.createElement(h.a,{time:e})}}];for(var p=0;p<l.length;p++){var f=l[p],_=f[0],g=new Date(f[1][0]+\"Z\"),E=b.a.extractRawFeedPrice(f[1][1]),v=f[1][1].core_exchange_rate,y=\"\"+f[1][1].maintenance_collateral_ratio/1e3,w=\"\"+f[1][1].maximum_short_squeeze_ratio/1e3;d.push({publisher:_,feed_price:E,core_exchange_rate:v,maintenance_collateral_ratio:y,maximum_short_squeeze_ratio:w,publishDate:g})}return r.a.createElement(ae.Table,{style:{width:\"100%\"},rowKey:\"feedPublisher\",columns:c,dataSource:d,pagination:!1})}},{key:\"_renderMarginTable\",value:function(){var e,t=this,a=this.state.cumulativeGrouping,n=[],s=a?r.a.createElement(\"span\",null,\" (\",r.a.createElement(o.a,{content:\"explorer.asset.cumulative\"}),\")\"):r.a.createElement(\"span\",null,\" \"),l=0,c=0;this.state.callOrders.map(function(e){l+=e.debt,c+=e.collateral,n.push({borrower:e.borrower,collateral:{amount:a?c:e.collateral,asset:e.getCollateral().asset_id},debt:{amount:a?l:e.debt,asset:e.amountToReceive().asset_id},call:e.call_price,tcr:e.order.target_collateral_ratio,cr:{ratio:e.getRatio(),status:e.getStatus()}})});var u=function(e){var a=n[0][e];return n.length?r.a.createElement(\"span\",null,r.a.createElement(\"br\",null),a.base?t.formattedPrice(a,!1,!0):r.a.createElement(m.a,{asset:a.asset,amount:a.amount,hide_amount:!0})):null};return e=[{key:\"borrower\",fixed:\"left\",width:200,title:r.a.createElement(o.a,{content:\"transaction.borrower\"}),dataIndex:\"borrower\",sorter:function(e,t){var a=v.ChainStore.getAccount(e.borrower,!1);a&&(a=a.get(\"name\"));var n=v.ChainStore.getAccount(t.borrower,!1);return n&&(n=n.get(\"name\")),a>n?1:a<n?-1:0},render:function(e){return r.a.createElement(i.a,{account:e})}},{key:\"collateral\",title:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,{content:\"transaction.collateral\"}),s,u(\"collateral\")),dataIndex:\"collateral\",sorter:function(e,t){return e.collateral.amount>t.collateral.amount?1:e.collateral.amount<t.collateral.amount?-1:0},render:function(e){return r.a.createElement(ae.Tooltip,{title:D.a.translate(\"explorer.asset.margin_positions.click_to_switch_to_cumulative\"),mouseEnterDelay:.5},r.a.createElement(\"span\",{onClick:t._toggleCumulativeGrouping.bind(t),style:{cursor:\"pointer\"}},r.a.createElement(m.a,{amount:e.amount,asset:e.asset,hide_asset:!0})))}},{key:\"debt\",title:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,{content:\"transaction.borrow_amount\"}),s,u(\"debt\")),dataIndex:\"debt\",sorter:function(e,t){return e.debt.amount>t.debt.amount?1:e.debt.amount<t.debt.amount?-1:0},render:function(e){return r.a.createElement(ae.Tooltip,{title:D.a.translate(\"explorer.asset.margin_positions.click_to_switch_to_cumulative\"),mouseEnterDelay:.5},r.a.createElement(\"span\",{onClick:t._toggleCumulativeGrouping.bind(t),style:{cursor:\"pointer\"}},r.a.createElement(m.a,{amount:e.amount,asset:e.asset,hide_asset:!0})))}},{key:\"call\",title:r.a.createElement(\"span\",null,r.a.createElement(o.a,{content:\"exchange.call\"}),u(\"call\")),dataIndex:\"call\",render:function(e){return t.formattedPrice(e,!0,!1)}},{key:\"tcr\",title:r.a.createElement(ae.Tooltip,{title:D.a.translate(\"borrow.target_collateral_ratio_explanation\")},r.a.createElement(o.a,{content:\"borrow.target_collateral_ratio_short\"})),dataIndex:\"tcr\",render:function(e){return e?(e/1e3).toFixed(3):\"-\"}},{key:\"cr\",title:r.a.createElement(o.a,{content:\"borrow.coll_ratio\"}),dataIndex:\"cr\",fixed:\"right\",width:100,sorter:function(e,t){return e.cr.ratio>t.cr.ratio?1:e.cr.ratio<t.cr.ratio?-1:0},render:function(e){var t=\"margin-ratio \"+e.status;return r.a.createElement(r.a.Fragment,null,r.a.createElement(\"div\",{className:t},e.ratio.toFixed(3)))}}],r.a.createElement(ae.Table,{style:{width:\"100%\"},rowKey:\"feedMargins\",columns:e,dataSource:n,rowClassName:\"margin-row\",pagination:{pageSize:Number(25)}})}},{key:\"_renderCollBidTable\",value:function(){var e,t=[];e=[{key:\"bidder\",title:r.a.createElement(o.a,{content:\"transaction.bidder\"}),dataIndex:\"bidder\",fixed:\"left\",width:200,render:function(e){return r.a.createElement(i.a,{account:e})}},{key:\"collateral\",title:r.a.createElement(o.a,{content:\"transaction.collateral\"}),dataIndex:\"collateral\",render:function(e){return r.a.createElement(m.a,{amount:e.amount,asset:e.asset_id,hide_asset:!0})}},{key:\"debt\",title:r.a.createElement(o.a,{content:\"transaction.borrow_amount\"}),dataIndex:\"debt\",render:function(e){return r.a.createElement(m.a,{amount:e.amount,asset:e.asset_id,hide_asset:!0})}},{key:\"debt_cum\",title:r.a.createElement(o.a,{content:\"transaction.cumulative_borrow_amount\"}),dataIndex:\"debt_cum\",render:function(e){return r.a.createElement(m.a,{amount:e.amount,asset:e.asset_id,hide_asset:!0})}},{key:\"price\",title:r.a.createElement(o.a,{content:\"explorer.asset.collateral_bid.bid\"}),dataIndex:\"price\",render:function(e){return r.a.createElement(d.a,{base_amount:e.base.amount,base_asset:e.base.asset_id,quote_amount:e.quote.amount,quote_asset:e.quote.asset_id,hide_symbols:!0})}},{key:\"cr\",title:r.a.createElement(o.a,{content:\"borrow.coll_ratio\"}),dataIndex:\"cr\",render:function(e){return e.toFixed(3)}},{key:\"included\",title:r.a.createElement(o.a,{content:\"borrow.considered_on_revival\"}),dataIndex:\"included\",render:function(e){return 2==e?r.a.createElement(o.a,{content:\"explorer.asset.collateral_bid.included.partial\"}):1==e?r.a.createElement(o.a,{content:\"explorer.asset.collateral_bid.included.yes\"}):r.a.createElement(o.a,{content:\"explorer.asset.collateral_bid.included.no\"})}}];var a=0;return this.state.collateralBids.map(function(e){a+=e.debt,t.push({bidder:e.bidder,collateral:{amount:e.bid.base.amount,asset:e.bid.base.asset_id},debt:{amount:e.bid.quote.amount,asset:e.bid.quote.asset_id},debt_cum:{amount:a,asset:e.bid.quote.asset_id},price:e.bid,cr:e.getRatio(),included:e.consideredIfRevived})}),r.a.createElement(ae.Table,{style:{width:\"100%\"},rowKey:\"feedCollBid\",columns:e,dataSource:t,pagination:{pageSize:Number(25)}})}},{key:\"_setFeedTab\",value:function(e){this.setState({activeFeedTab:e})}},{key:\"renderFeedTables\",value:function(e){var t=e.bitasset;if(!(\"feeds\"in t)||0==t.feeds.length||t.is_prediction_market||!t.feeds.length)return null;var a=t.settlement_fund>0;return r.a.createElement(ae.Tabs,{onChange:this._setFeedTab.bind(this),activeKey:this.state.activeFeedTab},r.a.createElement(ae.Tabs.TabPane,{tab:D.a.translate(\"explorer.asset.price_feed_data.title\"),key:\"feed\"},\"feed\"==this.state.activeFeedTab?this._renderFeedTable(e):null),r.a.createElement(ae.Tabs.TabPane,{tab:D.a.translate(a?\"explorer.asset.collateral_bid.title\":\"explorer.asset.margin_positions.title\"),key:\"margin\"},\"margin\"==this.state.activeFeedTab?a?this._renderCollBidTable():this._renderMarginTable():null))}},{key:\"render\",value:function(){var e=this.props.asset.toJS(),t=\"bitasset\"in e?this.renderPriceFeed(e):null,a=\"bitasset\"in e?this.renderFeedTables(e):null;return r.a.createElement(\"div\",{className:\"grid-container asset-page\"},r.a.createElement(\"div\",{className:\"grid-block page-layout\"},r.a.createElement(\"div\",{className:\"grid-block main-content wrap\"},r.a.createElement(\"div\",{className:\"grid-block medium-up-1\",style:{width:\"100%\"}},this.renderAboutBox(e,this.props.asset)),r.a.createElement(te.b,{setting:\"assetDataTabs\",className:\"grid-block vertical\",tabsClass:\"bordered-header content-block\",contentClass:\"tab-no-background\",segmented:!1},r.a.createElement(te.a,{title:\"explorer.asset.info\"},r.a.createElement(\"div\",{className:\"grid-block vertical large-horizontal medium-up-1 large-up-2\",style:{paddingTop:\"1rem\"}},r.a.createElement(\"div\",{className:\"grid-content small-no-padding\"},this.renderSummary(e)),r.a.createElement(\"div\",{className:\"grid-content small-no-padding\"},this.renderPermissions(e)),r.a.createElement(\"div\",{className:\"grid-content small-no-padding\"},this.renderFeePool(e)),t?r.a.createElement(\"div\",{className:\"grid-content small-no-padding\"},this.renderPriceFeed(e)):null,t?r.a.createElement(\"div\",{className:\"grid-content small-no-padding\"},this.renderSettlement(e)):null,this.state.showCollateralBidInInfo?r.a.createElement(\"div\",{className:\"grid-content small-no-padding\"},this.renderCollateralBid(e)):null),a||null),r.a.createElement(te.a,{title:\"explorer.asset.actions\"},r.a.createElement(\"div\",{className:\"grid-block vertical large-horizontal medium-up-1 large-up-2\",style:{paddingTop:\"1rem\"}},this.renderFeePoolFunding(e),this.renderFeePoolClaiming(e),this.renderFeesClaiming(e),this.renderAssetOwnerUpdate(e),\"bitasset\"in e&&!e.bitasset.is_prediction_market?this.renderFeedPublish(e):null,this.state.collateralBids.length>0&&this.renderCollateralBid(e)))))))}}]),t}();me=Object(B.a)(me,{listenTo:function(){return[q.a]},getProps:function(){return{currentAccount:q.a.getState().currentAccount||q.a.getState().passwordAccount}}}),me=Object(u.a)(me,{propNames:[\"backingAsset\"]});var de=function(e){function t(){return le(this,t),oe(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return ie(t,r.a.Component),re(t,[{key:\"render\",value:function(){if(null===this.props.asset)return r.a.createElement(k.a,{subtitle:\"asset_not_found_subtitle\"});var e=this.props.asset.has(\"bitasset\")?this.props.asset.getIn([\"bitasset\",\"options\",\"short_backing_asset\"]):\"1.3.0\";return r.a.createElement(me,ne({},this.props,{backingAsset:e}))}}]),t}();de=Object(u.a)(de,{withDynamic:!0});var pe=function(e){function t(){return le(this,t),oe(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return ie(t,r.a.Component),re(t,[{key:\"render\",value:function(){var e=this.props.match.params.symbol.toUpperCase();return r.a.createElement(de,ne({},this.props,{asset:e}))}}]),t}();t.default=pe}}]);"],"mappings":"AAAA","sourceRoot":""}