text: (window.webpackJsonp=window.webpackJsonp||[]).push([[27],{1126:function(e,t,r){"use strict";r.r(t);r(28),r(26),r(57);var a=r(3),n=r.n(a),i=(r(16),r(54),r(12),r(1)),o=r.n(i),s=(r(80),r(70)),l={props:["value"]},c=(r(651),r(0)),d=Object(c.a)(l,function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"reward-icon",class:{empty:0==this.value,partial:0<this.value&&this.value<1,done:1<=this.value}},[t("svg",{staticClass:"ring",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 36 36"}},[t("path",{attrs:{d:"M18 2.0845\n         a 15.9155 15.9155 0 0 1 0 31.831\n         a 15.9155 15.9155 0 0 1 0 -31.831","stroke-dasharray":(100*Math.min(1,this.value)).toFixed(0)+", 100"}})]),this._v(" "),t("div",{staticClass:"inner"},[this._t("default")],2)])},[],!1,null,"46890c4e",null);d.options.__file="RewardIcon.vue";var f={components:{RewardIcon:d.exports},props:["balanceNumber","tier","to"],methods:{navigateTo:function(e){this.balanceNumber>=this.tier&&e&&this.$router.push(e)}}},u=(r(653),Object(c.a)(f,function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"reward",on:{click:function(t){e.navigateTo(e.to)}}},[r("reward-icon",{attrs:{value:e.balanceNumber/e.tier}},[e._t("reward-icon")],2),e._v(" "),r("div",{staticClass:"info"},[r("div",{staticClass:"header bright"},[r("h3",[e._t("header"),e._v(" "),e.balanceNumber>=e.tier&&e.to?r("icon",{attrs:{name:"chevron-right"}}):e._e()],2)]),e._v(" "),e.balanceNumber>=e.tier?r("div",[r("p",[e._t("eligible")],2)]):r("div",[r("p",[e._t("ineligible")],2)])])],1)},[],!1,null,"86800a68",null));u.options.__file="Reward.vue";var p=u.exports,h=r(2),m={data:function(){return{error:null,ready:!1,rewards:[],manualOverride:!1,overrideBalance:{numerator:"1"+"0".repeat(20),denominator:"1"+"0".repeat(18),currency:"BRD",precision:18,scale:18}}},components:{Reward:p},mounted:function(){this.fetch()},methods:{fetch:function(){var e=o()(regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return this.ready=!1,this.error=null,e.prev=2,e.t0=Promise,e.t1=this.$store.dispatch("native/getBalances"),e.next=7,this.$store.dispatch("experiments/fetch");case 7:return e.t2=e.sent,e.t3=[e.t1,e.t2],e.next=11,e.t0.all.call(e.t0,e.t3);case 11:return e.next=13,this.getRewards();case 13:e.next=18;break;case 15:e.prev=15,e.t4=e.catch(2),this.error=e.t4;case 18:this.ready=!0;case 19:case"end":return e.stop()}},e,this,[[2,15]])}));return function(){return e.apply(this,arguments)}}(),getRewards:function(){var e=o()(regeneratorRuntime.mark(function e(){var t;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:(t=[{name:"fees.discount",tier:1e3,iconName:"rewards-percent",header:this.$t("exchange.rewards.fees.discount-short",{discount:"25%"}),ineligible:this.$t("exchange.rewards.fees.discount-promo",{amount:(1e3-this.balanceNumber).toFixed(0),ticker:"BRD",discount:"25%"}),eligible:this.$t("exchange.rewards.fees.discount-text",{discount:"25%"}),navigatesTo:"/rewards/trade-discount"},{name:"support.phone",tier:2500,iconName:"rewards-phone",header:this.$t("exchange.rewards.support.phone-short"),ineligible:this.$t("exchange.rewards.support.phone-promo",{amount:(2500-this.balanceNumber).toFixed(0),ticker:"BRD"}),eligible:this.$t("exchange.rewards.support.phone-text"),navigatesTo:"/rewards/phone-support"}]).push({name:"tax-discount",tier:250,iconName:"tax-discount",header:this.$t("exchange.rewards.tax-discount-short"),ineligible:this.$t("exchange.rewards.tax-discount-promo",{amount:(250-this.balanceNumber).toFixed(0),ticker:"BRD"}),eligible:this.$t("exchange.rewards.tax-discount-text"),navigatesTo:"/rewards/tax-discount"}),t.push({name:"call-from-ceo",tier:1e5,iconName:"call-from-ceo",header:this.$t("exchange.rewards.call-from-ceo-short"),ineligible:this.$t("exchange.rewards.call-from-ceo-promo",{amount:(1e5-this.balanceNumber).toFixed(0),ticker:"BRD"}),eligible:this.$t("exchange.rewards.call-from-ceo-text"),navigatesTo:"/rewards/call-from-ceo"}),this.rewards=t.sort(function(e,t){return e.tier-t.tier});case 4:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}(),navigateTo:function(e){e&&this.$router.push(e)}},computed:n()({balanceNumber:function(){return Number(this.brdBalance.numerator)/Number(this.brdBalance.denominator)},brdBalance:function(){var e=this.overrideBalance,t=this.walletBalance;return this.manualOverride?e:t}},Object(s.b)({walletBalance:function(e){return((Object(h.g)(e,"native.wallet")||[]).find(function(e){return e.ticker.match(/^brd$/i)})||{}).balance||{numerator:"0",denominator:"1"+"0".repeat(18),currency:"BRD"}}}))},w=(r(655),Object(c.a)(m,function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("scroll",[r("loader",{staticClass:"rewards-page",attrs:{data:e.ready,error:e.error,retry:e.fetch}},[r("checkpoint",{attrs:{name:"rewards.index"}}),e._v(" "),r("portal",{attrs:{to:"mobile-title"}},[r("span",{key:"rewards"},[e._v(e._s(e.$t("general.rewards")))])]),e._v(" "),r("butter-currency",{staticClass:"balance-header bright",attrs:{value:e.brdBalance,precision:2,trim:!1,commas:!0}}),e._v(" "),r("p",[e._v(e._s(e.$t("exchange.rewards.transactions-text")))]),e._v(" "),r("div",{staticClass:"rewards-list"},e._l(e.rewards,function(t){return r("reward",{key:t.name,attrs:{balanceNumber:e.balanceNumber,tier:t.tier,to:t.navigatesTo}},[r("icon",{attrs:{slot:"reward-icon",name:t.iconName},slot:"reward-icon"}),e._v(" "),r("span",{attrs:{slot:"header"},slot:"header"},[e._v("\n          "+e._s(t.header)+"\n        ")]),e._v(" "),r("span",{attrs:{slot:"ineligible"},slot:"ineligible"},[e._v("\n          "+e._s(t.ineligible)+"\n        ")]),e._v(" "),r("span",{attrs:{slot:"eligible"},slot:"eligible"},[e._v("\n          "+e._s(t.eligible)+"\n        ")])],1)}),1),e._v(" "),e.manualOverride?r("div",[r("b-input",{model:{value:e.brdBalance.numerator,callback:function(t){e.$set(e.brdBalance,"numerator",t)},expression:"brdBalance.numerator"}})],1):e._e(),e._v(" "),r("div",{staticClass:"spacer"},[e._v(" ")]),e._v(" "),r("div",{staticClass:"button"},[r("stateful-button",{attrs:{"button-style":"butter"},on:{click:function(t){e.navigateTo("/exchange/trade")}}},[e._v("\n        "+e._s(e.$t("general.button.trade"))+"\n      ")])],1)],1)],1)},[],!1,null,null,null));w.options.__file="index.vue";t.default=w.exports},517:function(e,t,r){var a=r(652);"string"==typeof a&&(a=[[e.i,a,""]]),a.locals&&(e.exports=a.locals);(0,r(7).default)("60119534",a,!0,{})},518:function(e,t,r){var a=r(654);"string"==typeof a&&(a=[[e.i,a,""]]),a.locals&&(e.exports=a.locals);(0,r(7).default)("5315bf32",a,!0,{})},519:function(e,t,r){var a=r(656);"string"==typeof a&&(a=[[e.i,a,""]]),a.locals&&(e.exports=a.locals);(0,r(7).default)("12432dc6",a,!0,{})},651:function(e,t,r){"use strict";var a=r(517);r.n(a).a},652:function(e,t,r){var a=r(17);(e.exports=r(6)(!1)).push([e.i,"@font-face{font-family:Circular-Pro-Book;src:url("+a(r(8))+");src:url("+a(r(8))+'?#iefix) format("embedded-opentype"),url('+a(r(18))+') format("woff2"),url('+a(r(19))+') format("woff");font-weight:400;font-style:normal}@font-face{font-family:Circular-Pro-Bold;src:url('+a(r(9))+");src:url("+a(r(9))+'?#iefix) format("embedded-opentype"),url('+a(r(20))+') format("woff2"),url('+a(r(21))+') format("woff");font-weight:400;font-style:normal}@-webkit-keyframes autofill-data-v-46890c4e{to{color:#666;background:transparent}}.reward-icon[data-v-46890c4e]{display:block;position:relative;color:#f9f9f9}.reward-icon svg.ring[data-v-46890c4e]{position:absolute;top:0;right:0;width:100%;height:100%}.reward-icon svg.ring path[data-v-46890c4e]{fill:#342943;stroke:#5b6dee;stroke-width:2px;stroke-linecap:round}.reward-icon.empty svg.ring path[data-v-46890c4e]{stroke:transparent}.reward-icon.done svg.ring path[data-v-46890c4e]{fill:#5b6dee;stroke:transparent}.reward-icon .inner[data-v-46890c4e]{position:absolute;display:flex;left:0;right:0;top:0;bottom:0;justify-content:center;align-items:center;text-align:center}.reward-icon .inner .icon[data-v-46890c4e]{margin:0 11px;height:16.5px;width:16.5px;flex-shrink:0;flex-grow:0}',""])},653:function(e,t,r){"use strict";var a=r(518);r.n(a).a},654:function(e,t,r){var a=r(17);(e.exports=r(6)(!1)).push([e.i,"@font-face{font-family:Circular-Pro-Book;src:url("+a(r(8))+");src:url("+a(r(8))+'?#iefix) format("embedded-opentype"),url('+a(r(18))+') format("woff2"),url('+a(r(19))+') format("woff");font-weight:400;font-style:normal}@font-face{font-family:Circular-Pro-Bold;src:url('+a(r(9))+");src:url("+a(r(9))+'?#iefix) format("embedded-opentype"),url('+a(r(20))+') format("woff2"),url('+a(r(21))+') format("woff");font-weight:400;font-style:normal}@-webkit-keyframes autofill-data-v-86800a68{to{color:#666;background:transparent}}.reward .info .header .icon[data-v-86800a68]{display:inline-flex;align-items:center;height:22px}.reward .info .header .icon svg[data-v-86800a68]{width:100%;height:100%}.reward[data-v-86800a68]{width:100%;padding-top:5.5px;padding-bottom:22px;display:flex;flex-direction:row;border-bottom:1px solid hsla(0,0%,100%,.07);background-color:#211f3f}.reward .reward-icon[data-v-86800a68]{margin:0 11px;height:38.5px;width:38.5px;flex-shrink:0;flex-grow:0}.reward .info[data-v-86800a68]{display:flex;flex-direction:column;flex-grow:1;flex-shrink:1}.reward .info .header[data-v-86800a68]{min-height:38.5px;display:flex;flex-direction:row;justify-content:center}.reward .info .header h3[data-v-86800a68]{display:flex;justify-content:space-between;align-items:center;flex:0.5;flex-grow:1}.reward .info .header .icon[data-v-86800a68]{justify-content:center;width:36px;height:36px;margin-right:8.8px;padding:8.8px;border-radius:50%}.reward .info p[data-v-86800a68]{margin:0 22px 0 0}',""])},655:function(e,t,r){"use strict";var a=r(519);r.n(a).a},656:function(e,t,r){var a=r(17);(e.exports=r(6)(!1)).push([e.i,"@font-face{font-family:Circular-Pro-Book;src:url("+a(r(8))+");src:url("+a(r(8))+'?#iefix) format("embedded-opentype"),url('+a(r(18))+') format("woff2"),url('+a(r(19))+') format("woff");font-weight:400;font-style:normal}@font-face{font-family:Circular-Pro-Bold;src:url('+a(r(9))+");src:url("+a(r(9))+'?#iefix) format("embedded-opentype"),url('+a(r(20))+') format("woff2"),url('+a(r(21))+') format("woff");font-weight:400;font-style:normal}@-webkit-keyframes autofill{to{color:#666;background:transparent}}.rewards-page{position:absolute;color:hsla(0,0%,100%,.5);min-height:100%;width:100%;padding-bottom:22px;display:flex;flex-direction:column;align-items:center}.rewards-page .balance-header{display:block;margin-top:22px;text-align:center;line-height:66px;font-size:44px;font-weight:600}.rewards-page .balance-header .ticker{font-size:16.5px;line-height:16.5px;color:hsla(0,0%,100%,.5)}.rewards-page>p{margin:22px;text-align:center;max-width:264px}.rewards-page .spacer{flex-grow:1;flex-shrink:1}.rewards-page .bright{color:#fff}.rewards-page .rewards-list{width:100%;border-width:1px 2px 2px;border-top:2px solid hsla(0,0%,100%,.07);max-width:440px}.rewards-page .button{width:100%;max-width:440px}.rewards-page .button .stateful-button{background-color:#5b6dee}.rewards-page .button .stateful-button:active{color:hsla(0,0%,100%,.5);background-color:#5667e0}.rewards-page .reward{width:100%;padding-top:5.5px;padding-bottom:22px;display:flex;flex-direction:row;border-bottom:1px solid hsla(0,0%,100%,.07)}.rewards-page .reward .info{display:flex;flex-direction:column;flex-grow:1;flex-shrink:1}.rewards-page .reward .info .header{min-height:38.5px;display:flex;flex-direction:column;justify-content:center}.rewards-page .reward .info p{margin:0 22px 0 0}',""])}}]);
  //# sourceMappingURL=220fefc34bea40feb556.js.map