nano-wallet/js/app.8a975ebe.js

2 lines
44 KiB
JavaScript

(function(t){function e(e){for(var n,r,o=e[0],c=e[1],l=e[2],u=0,p=[];u<o.length;u++)r=o[u],Object.prototype.hasOwnProperty.call(s,r)&&s[r]&&p.push(s[r][0]),s[r]=0;for(n in c)Object.prototype.hasOwnProperty.call(c,n)&&(t[n]=c[n]);d&&d(e);while(p.length)p.shift()();return i.push.apply(i,l||[]),a()}function a(){for(var t,e=0;e<i.length;e++){for(var a=i[e],n=!0,r=1;r<a.length;r++){var c=a[r];0!==s[c]&&(n=!1)}n&&(i.splice(e--,1),t=o(o.s=a[0]))}return t}var n={},s={app:0},i=[];function r(t){return o.p+"js/"+({about:"about"}[t]||t)+"."+{about:"822dcecd"}[t]+".js"}function o(e){if(n[e])return n[e].exports;var a=n[e]={i:e,l:!1,exports:{}};return t[e].call(a.exports,a,a.exports,o),a.l=!0,a.exports}o.e=function(t){var e=[],a=s[t];if(0!==a)if(a)e.push(a[2]);else{var n=new Promise((function(e,n){a=s[t]=[e,n]}));e.push(a[2]=n);var i,c=document.createElement("script");c.charset="utf-8",c.timeout=120,o.nc&&c.setAttribute("nonce",o.nc),c.src=r(t);var l=new Error;i=function(e){c.onerror=c.onload=null,clearTimeout(u);var a=s[t];if(0!==a){if(a){var n=e&&("load"===e.type?"missing":e.type),i=e&&e.target&&e.target.src;l.message="Loading chunk "+t+" failed.\n("+n+": "+i+")",l.name="ChunkLoadError",l.type=n,l.request=i,a[1](l)}s[t]=void 0}};var u=setTimeout((function(){i({type:"timeout",target:c})}),12e4);c.onerror=c.onload=i,document.head.appendChild(c)}return Promise.all(e)},o.m=t,o.c=n,o.d=function(t,e,a){o.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:a})},o.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var a=Object.create(null);if(o.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)o.d(a,n,function(e){return t[e]}.bind(null,n));return a},o.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="/",o.oe=function(t){throw console.error(t),t};var c=window["webpackJsonp"]=window["webpackJsonp"]||[],l=c.push.bind(c);c.push=e,c=c.slice();for(var u=0;u<c.length;u++)e(c[u]);var d=l;i.push([2,"chunk-vendors"]),a()})({0:function(t,e){},1:function(t,e){},"1b5f":function(t,e,a){},2:function(t,e,a){t.exports=a("56d7")},"2dca":function(t,e,a){"use strict";var n=a("6939"),s=a.n(n);s.a},3:function(t,e){},4:function(t,e){},"43a3":function(t,e){},"4d81":function(t,e,a){},"56d7":function(t,e,a){"use strict";a.r(e);var n={};a.r(n),a.d(n,"pow",(function(){return ne})),a.d(n,"ready",(function(){return se})),a.d(n,"privatekey",(function(){return ie})),a.d(n,"node",(function(){return re})),a.d(n,"history",(function(){return oe})),a.d(n,"pending",(function(){return ce})),a.d(n,"resetState",(function(){return le}));var s={};a.r(s),a.d(s,"node",(function(){return he})),a.d(s,"getSeed",(function(){return me})),a.d(s,"getDetails",(function(){return ke})),a.d(s,"rpCall",(function(){return ye})),a.d(s,"history",(function(){return we})),a.d(s,"pending",(function(){return xe})),a.d(s,"resetState",(function(){return Oe}));a("e260"),a("e6cf"),a("cca6"),a("a79d");var i=a("2b0e"),r=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{attrs:{id:"app"}},[a("router-view")],1)},o=[],c={name:"App",components:{},data:function(){return{key:null}},watch:{$route:function(){this.$store.dispatch("app/node")}},mounted:function(){this.$store.dispatch("app/node")}},l=c,u=(a("5c0b"),a("2877")),d=Object(u["a"])(l,r,o,!1,null,null,null),p=d.exports,v=(a("d3b7"),a("8c4f")),f=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"wallet"},[a("div",{attrs:{type:"hidden",id:"workstorage"}}),a("div",{staticClass:"page",class:{active:!1===t.open},attrs:{id:"login"}},[a("div",{staticClass:"title rpc"},[t._v("RPC Server : "),a("span",[t._v(t._s(t.$route.params.node))])]),a("div",{attrs:{id:"inputs"}},[null!==t.error?a("div",{staticClass:"error"},[t._v(t._s(t.error))]):t._e(),a("label",{attrs:{for:"key"}},[t._v("Private Key")]),a("div",{staticClass:"login"},["checkbox"===t.logintype?a("input",{directives:[{name:"model",rawName:"v-model",value:t.key,expression:"key"}],attrs:{id:"key",name:"key",type:"checkbox"},domProps:{checked:Array.isArray(t.key)?t._i(t.key,null)>-1:t.key},on:{change:function(e){var a=t.key,n=e.target,s=!!n.checked;if(Array.isArray(a)){var i=null,r=t._i(a,i);n.checked?r<0&&(t.key=a.concat([i])):r>-1&&(t.key=a.slice(0,r).concat(a.slice(r+1)))}else t.key=s}}}):"radio"===t.logintype?a("input",{directives:[{name:"model",rawName:"v-model",value:t.key,expression:"key"}],attrs:{id:"key",name:"key",type:"radio"},domProps:{checked:t._q(t.key,null)},on:{change:function(e){t.key=null}}}):a("input",{directives:[{name:"model",rawName:"v-model",value:t.key,expression:"key"}],attrs:{id:"key",name:"key",type:t.logintype},domProps:{value:t.key},on:{input:function(e){e.target.composing||(t.key=e.target.value)}}}),a("span",{staticClass:"eye",on:{click:t.togglevisibility}},[a("span",{class:{active:"password"===t.logintype}},[a("i",{staticClass:"far fa-eye"})]),a("span",{class:{active:"text"===t.logintype}},[a("i",{staticClass:"far fa-eye-slash"})])])]),a("button",{staticClass:"openwallet btn",attrs:{type:"button"},on:{click:t.openWallet}},[t._v("Open Wallet")]),a("scan-qr",{on:{scanned:t.scanDone}})],1),a("div",{attrs:{id:"buttons"}},[a("router-link",{staticClass:"genwallet",attrs:{to:"/"+t.$route.params.node+"/generate"}},[t._v("Generate Wallet")])],1)]),a("div",{staticClass:"page",class:{active:!0===t.open},attrs:{id:"wallet"}},[a("div",{attrs:{id:"powstatus"}},[a("div",{staticClass:"status busy",class:{active:!1===t.ready}},[t._v("Calculating Work "),a("i",{staticClass:"fas fa-spinner fa-spin"})]),a("div",{staticClass:"status ready",class:{active:!0===t.ready}},[t._v("Ready "),a("i",{staticClass:"fas fa-check"})])]),a("div",{staticClass:"inner"},[a("div",{staticClass:"block"},[a("div",{staticClass:"headingtitle top"},[a("span",{attrs:{id:"closewallet"},on:{click:t.logout}},[a("i",{staticClass:"fal fa-sign-out fa-flip-horizontal"})]),a("span",[t._v("Wallet")]),a("span",{staticClass:"refresh rotate",class:{down:t.isActive},on:{click:t.refresh}},[a("i",{staticClass:"fal fa-sync"})])]),a("simplebar",{staticClass:"block pending"},[a("div",{attrs:{id:"output"}},[a("div",{staticClass:"balance"},[a("div",{staticClass:"raw",class:{active:t.balanceextra},on:{click:function(e){return t.copyToClipboard(t.address)}}},[t._v(t._s(t.address))]),a("div",{staticClass:"value",domProps:{innerHTML:t._s(t.abbreviateNumber(t.balance))}}),a("div",{staticClass:"raw",class:{active:t.balanceextra}},[t._v(t._s(t.balance))]),a("a",{staticClass:"balanceextra",attrs:{href:""},on:{click:function(e){e.preventDefault(),t.balanceextra=!t.balanceextra}}},[a("i",{staticClass:"fal fa-ellipsis-h",attrs:{"data-fa-transform":"grow-20"}})])])]),a("div",{staticClass:"headingtitle showmobile"},[t._v("History")]),t._l(t.pending,(function(e,n){return a("transaction",{key:n,attrs:{index:n,transaction:e,type:"pending"},on:{blockdetails:function(e){t.blockdetails=e},receive:t.refreshDetails}})}))],2)],1),a("simplebar",{staticClass:"block history"},[a("div",{staticClass:"headingtitle hidemobile"},[t._v("History")]),t._l(t.history,(function(e,n){return a("transaction",{key:n,attrs:{index:n,transaction:e,type:e.type},on:{blockdetails:function(e){t.blockdetails=e}}})}))],2)],1),a("div",{staticClass:"menu",attrs:{id:"walletmenu"}},[a("div",{staticClass:"bg"}),a("div",{staticClass:"content"},[a("div",{staticClass:"tab",attrs:{"data-tab":"#receive"},on:{click:function(e){t.receive=!0}}},[t._m(0),a("span",[t._v("Receive")])]),a("div",{staticClass:"tab",attrs:{"data-tab":"#send"},on:{click:function(e){t.send=!0}}},[t._m(1),a("span",[t._v("Send")])]),a("div",{staticClass:"tab",attrs:{"data-tab":"#settings"},on:{click:function(e){t.settings=!0}}},[t._m(2),a("span",[t._v("Settings")])])])])]),a("div",{staticClass:"page",class:{active:!1!==t.send},attrs:{id:"send"}},[a("a",{staticClass:"close",on:{click:function(e){t.send=!1}}},[a("i",{staticClass:"fal fa-times"})]),a("send",{on:{close:function(e){t.send=!1}}})],1),a("div",{staticClass:"page",class:{active:!1!==t.settings},attrs:{id:"settings"}},[a("a",{staticClass:"close",on:{click:function(e){t.settings=!1}}},[a("i",{staticClass:"fal fa-times"})]),a("settings",{attrs:{representative:t.representative},on:{change:t.refreshDetails}})],1),a("div",{staticClass:"page",class:{active:!1!==t.receive},attrs:{id:"receive"}},[a("a",{staticClass:"close",on:{click:function(e){t.receive=!1}}},[a("i",{staticClass:"fal fa-times"})]),a("receive",{attrs:{address:t.address}})],1),a("div",{staticClass:"page",class:{active:null!==t.blockdetails},attrs:{id:"blockdetails"}},[a("a",{staticClass:"close",on:{click:function(e){t.blockdetails=null}}},[a("i",{staticClass:"fal fa-times"})]),a("block-state",{attrs:{details:t.blockdetails}})],1)])},h=[function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("span",{staticClass:"menuicon"},[a("i",{staticClass:"fal fa-wallet",attrs:{"data-fa-transform":"grow-8"}})])},function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("span",{staticClass:"menuicon"},[a("i",{staticClass:"fal fa-coins",attrs:{"data-fa-transform":"grow-8"}})])},function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("span",{staticClass:"menuicon"},[a("i",{staticClass:"fal fa-cog",attrs:{"data-fa-transform":"grow-8"}})])}],m=(a("ac1f"),a("5319"),a("2ca0"),a("96cf"),a("1da1")),b=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"transaction",class:t.type},[a("div",{staticClass:"type icon",attrs:{value:t.hash},on:{click:function(e){return t.$emit("blockdetails",t.hash)}}},["send"===t.type?a("i",{staticClass:"fal fa-minus-circle"}):"pending"===t.type?a("i",{staticClass:"fal fa-exclamation-circle"}):a("i",{staticClass:"fal fa-plus-circle"})]),a("div",{staticClass:"innerdetails"},[a("div",{staticClass:"amount"},[a("div",{staticClass:"value",attrs:{title:t.rawValue},domProps:{innerHTML:t._s(t.formattedValue)}},[a("i",{staticClass:"fal fa-coin"})]),"pending"!==t.type?a("div",{staticClass:"type"},[t._v(t._s(t.transactionStatus(t.transaction.type)))]):t._e(),"pending"===t.type?a("div",{staticClass:"type"},[null!==t.privatekey?a("button",{staticClass:"pocket",on:{click:t.receive}},[t._v("Receive")]):a("div",{},[t._v("Pending")])]):t._e()]),a("div",{staticClass:"address"},["pending"!==t.type?a("span",{on:{click:function(e){return t.link("address",t.transaction.account)}}},[t._v(t._s(t.formattedDate)+" "+t._s(t.abbreviateAddress(t.transaction.account)))]):t._e(),"pending"===t.type?a("span",{on:{click:function(e){return t.link("address",t.transaction.source)}}},[t._v(t._s(t.abbreviateAddress(t.transaction.source)))]):t._e()])])])},k=[],g=(a("a9e3"),a("b680"),a("174c")),y=(a("fb6a"),a("6612")),C={data:function(){return{rawconv:{from:"raw",to:"Nano"},nanoconv:{from:"Nano",to:"raw"}}},computed:{},mounted:function(){},methods:{abbreviateNumber:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;return 2===e?y(t).format("0.[00]a"):y(t).format("0.[00000000000000000000]a")},copyToClipboard:function(t){var e=document.createElement("textarea");e.innerHTML=t,document.body.appendChild(e),e.select(),document.execCommand("copy"),document.body.removeChild(e),alert("Copied to clipboard")},link:function(t,e){var a=window.location.origin,n=this.$route.params.node;"address"==t&&window.open(a+"/#/"+n+"/address/"+e),"block"==t&&window.open(a+"/#/"+n+"/block/"+e)},abbreviateAddress:function(t){return t.substring(0,11)+"..."+t.slice(t.length-6)},highlightAddress:function(t){if(null!==t&&void 0!==t){var e=t.length-6;return'<span class="highlight">'+t.substring(0,11)+"</span>"+t.substring(11,e)+'<span class="highlight">'+t.slice(t.length-6)+"</span>"}return null},transactionStatus:function(t){return"send"===t?"Sent":"receive"===t?"Received":void 0}}},w=a("901e"),_=a.n(w),x={name:"Transaction",props:{transaction:Object,type:String,index:[Number,String]},mixins:[C],computed:{rawValue:function(){return g["c"](this.transaction.amount,this.rawconv)},formattedValue:function(){return("send"===this.transaction.type?"-":"+")+this.abbreviateNumber(g["c"](this.transaction.amount,this.rawconv),5)},formattedDate:function(){var t=new Date(1e3*this.transaction.local_timestamp);return t.getDate()+" "+t.toLocaleString("default",{month:"short"})+" "+t.getFullYear()},pow:function(){return this.$store.state.app.pow},ready:function(){return this.$store.state.app.ready},privatekey:function(){return this.$store.state.app.privatekey},hash:function(){return"pending"===this.type?this.index:this.transaction.hash}},methods:{receive:function(){var t=this;return Object(m["a"])(regeneratorRuntime.mark((function e(){var a,n,s,i,r,o,c,l,u,d,p;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(null!==t.pow){e.next=2;break}return e.abrupt("return",alert("Please wait for the status to be ready"));case 2:return a=g["f"](t.privatekey),n=g["e"](a,{useNanoPrefix:!0}),s={},s["action"]="account_info",s["representative"]="true",s["account"]=n,e.next=10,t.$store.dispatch("app/rpCall",s);case 10:return i=e.sent,r="0",o="open",c="0000000000000000000000000000000000000000000000000000000000000000",l=n,"balance"in i&&(r=i.balance,o="receive",c=i.frontier,l=i.representative),u=new _.a(r).plus(new _.a(t.transaction.amount)).toFixed(),d=g["d"](t.privatekey,{work:t.pow,previous:c,representative:l,balance:u,link:t.index}),p={},p["action"]="process",p["json_block"]="true",p["subtype"]=o,p["block"]=d.block,e.next=25,t.$store.dispatch("app/rpCall",p);case 25:t.$emit("receive",!0);case 26:case"end":return e.stop()}}),e)})))()}}},$=x,O=Object(u["a"])($,b,k,!1,null,"14a1a37d",null),R=O.exports,S=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"send"},[a("div",{attrs:{id:"sendform"}},[a("label",{attrs:{for:"amount"}},[t._v("Amount:")]),a("input",{directives:[{name:"model",rawName:"v-model",value:t.amount,expression:"amount"}],attrs:{type:"text",id:"amount",name:"amount"},domProps:{value:t.amount},on:{input:function(e){e.target.composing||(t.amount=e.target.value)}}}),a("label",{attrs:{for:"destination"}},[t._v("Destination:")]),a("input",{directives:[{name:"model",rawName:"v-model",value:t.destination,expression:"destination"}],attrs:{type:"text",id:"destination",name:"destination"},domProps:{value:t.destination},on:{input:function(e){e.target.composing||(t.destination=e.target.value)}}})]),a("button",{staticClass:"sendfunds btn",attrs:{type:"button"},on:{click:t.send}},[t._v("Send")]),a("scan-qr",{on:{scanned:t.scanDone}})],1)},j=[],T=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"scan-qr-code"},[a("button",{staticClass:"scan btn outline",attrs:{type:"button"},on:{click:t.scanQR}},[t._v("Scan QR")]),a("div",{staticClass:"page",class:{active:!1!==t.scan},staticStyle:{"z-index":"9"}},[a("a",{staticClass:"close",on:{click:t.closeScan}},[a("i",{staticClass:"fal fa-times"})]),t.loadingMsg?a("div",[t._v(t._s(t.loadingMsg))]):t._e(),a("canvas",{attrs:{id:"scan_"+t._uid}})])])},P=[],A=(a("4160"),a("159b"),a("ecec")),D=a.n(A),N=document.createElement("video"),E={name:"ScanQr",props:{},data:function(){return{amount:"",destination:"",scan:!1,scanner:null,canvas:null,stream:null,continue:!0,loadingMsg:"Unable to access video stream (please make sure you have a webcam enabled)"}},methods:{closeScan:function(){N.srcObject.getTracks().forEach((function(t){t.stop()})),this.scan=!1,this.continue=!1},scanQR:function(){var t=this;return Object(m["a"])(regeneratorRuntime.mark((function e(){var a,n,s,i;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:i=function(){if(n.loadingMsg="Loading video...",N.readyState===N.HAVE_ENOUGH_DATA){n.loadingMsg=null,a.height=N.videoHeight,a.width=N.videoWidth,n.canvas.drawImage(N,0,0,a.width,a.height);var t=n.canvas.getImageData(0,0,a.width,a.height),e=D()(t.data,t.width,t.height,{inversionAttempts:"dontInvert"});e&&(s(e.location.topLeftCorner,e.location.topRightCorner,"#0cd21a"),s(e.location.topRightCorner,e.location.bottomRightCorner,"#0cd21a"),s(e.location.bottomRightCorner,e.location.bottomLeftCorner,"#0cd21a"),s(e.location.bottomLeftCorner,e.location.topLeftCorner,"#0cd21a"),n.$emit("scanned",e.data),N.srcObject.getTracks().forEach((function(t){t.stop()})),n.continue=!1,setTimeout((function(){n.scan=!1}),1200))}!0===n.continue&&requestAnimationFrame(i)},s=function(t,e,a){n.canvas.beginPath(),n.canvas.moveTo(t.x,t.y),n.canvas.lineTo(e.x,e.y),n.canvas.lineWidth=4,n.canvas.strokeStyle=a,n.canvas.stroke()},t.scan=!0,t.continue=!0,a=document.getElementById("scan_"+t._uid),t.canvas=a.getContext("2d"),n=t,navigator.mediaDevices.getUserMedia({video:{facingMode:"environment"}}).then((function(t){N.srcObject=t,N.setAttribute("playsinline",!0),N.play(),requestAnimationFrame(i)}));case 8:case"end":return e.stop()}}),e)})))()}}},M=E,L=Object(u["a"])(M,T,P,!1,null,null,null),B=L.exports,H={name:"Send",mixins:[C],components:{ScanQr:B},props:{address:String},data:function(){return{amount:"",destination:""}},computed:{pow:function(){return this.$store.state.app.pow},ready:function(){return this.$store.state.app.ready},privatekey:function(){return this.$store.state.app.privatekey}},methods:{scanDone:function(t){this.destination=t.replace("nano:","")},send:function(){var t=this;return Object(m["a"])(regeneratorRuntime.mark((function e(){var a,n,s,i,r,o,c,l;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(null!==t.pow){e.next=2;break}return e.abrupt("return",alert("Please wait for the status to be ready"));case 2:return a=g["c"](t.amount,t.nanoconv),n=g["f"](t.privatekey),s=g["e"](n,{useNanoPrefix:!0}),i={},i["action"]="account_info",i["representative"]="true",i["account"]=s,e.next=11,t.$store.dispatch("app/rpCall",i);case 11:return r=e.sent,o=new _.a(r.balance).minus(new _.a(a)).toFixed(),c=g["d"](t.privatekey,{work:t.pow,previous:r.frontier,representative:r.representative,balance:o,link:t.destination}),console.log(c),l={},l["action"]="process",l["json_block"]="true",l["subtype"]="send",l["block"]=c.block,e.next=22,t.$store.dispatch("app/rpCall",l);case 22:t.$store.commit("app/pow",null),t.$emit("close","true");case 24:case"end":return e.stop()}}),e)})))()}}},W=H,q=Object(u["a"])(W,S,j,!1,null,null,null),Q=q.exports,F=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"receive inner"},[a("div",{staticClass:"block"},[a("div",{staticClass:"address"},[t._v("Address: "),a("span",{staticClass:"value",on:{click:function(e){return t.copyToClipboard(t.address)}}},[a("i",{staticClass:"fad fa-clone"})]),t._v(" "),a("span",{staticClass:"value",on:{click:function(e){return t.link("address",t.address)}}},[a("i",{staticClass:"fad fa-external-link"})])]),a("div",{staticClass:"address",domProps:{innerHTML:t._s(t.highlightAddress(t.address))}})]),a("div",{staticClass:"block"},[a("qr-block",{attrs:{address:"nano:"+t.address}})],1)])},I=[],V=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{attrs:{id:t._uid}})},J=[],G=a("6ffa"),K=a.n(G),z={name:"QrBlock",props:{address:String},data:function(){return{}},watch:{address:function(t){if(null!==t){var e=new K.a({width:512,height:512,data:t,image:"qr_logo.png",dotsOptions:{type:"rounded"},imageOptions:{hideBackgroundDots:!1},qrOptions:{}});e.append(document.getElementById(this._uid))}}},methods:{}},U=z,Y=Object(u["a"])(U,V,J,!1,null,null,null),X=Y.exports,Z={name:"Receive",mixins:[C],components:{QrBlock:X},props:{address:String},data:function(){return{newrep:""}},watch:{}},tt=Z,et=(a("6790"),Object(u["a"])(tt,F,I,!1,null,null,null)),at=et.exports,nt=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"settings inner"},[a("div",{staticClass:"block"},[a("div",{staticClass:"details"},[a("label",{attrs:{for:"representative"}},[t._v("Current Representative")]),a("a",{staticClass:"copy",attrs:{href:"#"},on:{click:function(e){return t.copyToClipboard(t.representative)}}},[a("i",{staticClass:"fad fa-clone"})]),a("div",{staticClass:"address",staticStyle:{"margin-bottom":"30px",background:"#00000014",padding:"4px 14px"},domProps:{innerHTML:t._s(t.highlightAddress(t.representative))}})]),t.change?a("div",{staticClass:"details"},[null!==t.error?a("div",{staticClass:"error"},[t._v(t._s(t.error))]):t._e(),a("label",{attrs:{for:"newrep"}},[t._v("Change Representative")]),a("input",{directives:[{name:"model",rawName:"v-model",value:t.newrep,expression:"newrep"}],staticClass:"newrep",attrs:{type:"text",name:"newrep"},domProps:{value:t.newrep},on:{input:function(e){e.target.composing||(t.newrep=e.target.value)}}})]):t._e(),t.change?a("scan-qr",{staticStyle:{"margin-bottom":"20px"},on:{scanned:t.scanDone}}):t._e(),a("div",{staticClass:"inline-buttons"},[t.change?t._e():a("button",{staticClass:"repchange btn",on:{click:function(e){t.change=!0}}},[t._v("Change Representative")]),t.change?a("button",{staticClass:"repchange btn",on:{click:t.changeRep}},[t._v("Confirm")]):t._e(),t.change?a("button",{staticClass:"repchange btn outline",on:{click:function(e){t.change=!1}}},[t._v("Cancel")]):t._e()])],1)])},st=[],it=(a("1276"),{name:"Settings",components:{ScanQr:B},props:{representative:String},mixins:[C],data:function(){return{newrep:"",change:!1,error:null}},computed:{pow:function(){return this.$store.state.app.pow},privatekey:function(){return this.$store.state.app.privatekey}},methods:{changeRep:function(){var t=this;return Object(m["a"])(regeneratorRuntime.mark((function e(){var a,n,s,i,r,o,c,l,u;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(null!==t.pow){e.next=2;break}return e.abrupt("return",alert("Please wait for the status to be ready"));case 2:return a=g["f"](t.privatekey),n=g["e"](a,{useNanoPrefix:!0}),s={},s["action"]="account_info",s["representative"]="true",s["account"]=n,e.next=10,t.$store.dispatch("app/rpCall",s);case 10:return i=e.sent,r="change",o=i.frontier,c=i.balance,l=g["d"](t.privatekey,{work:t.pow,previous:o,representative:t.newrep,balance:c,link:"0000000000000000000000000000000000000000000000000000000000000000"}),u={},u["action"]="process",u["json_block"]="true",u["subtype"]=r,u["block"]=l.block,e.next=22,t.$store.dispatch("app/rpCall",u);case 22:t.$emit("change",!0);case 23:case"end":return e.stop()}}),e)})))()},scanDone:function(t){t.startsWith("nanorep:")?this.newrep=t.replace("nanorep:","").split("?")[0]:this.error="Invalid QR"}}}),rt=it,ot=Object(u["a"])(rt,nt,st,!1,null,null,null),ct=ot.exports,lt=function(){var t=this,e=t.$createElement,a=t._self._c||e;return null!==t.blockstate?a("simplebar",{attrs:{id:"breakdown"}},[a("header",{staticClass:"headingtitle"},[t._v("State Block "),a("span",{staticClass:"value",on:{click:function(e){return t.copyToClipboard(t.hash)}}},[a("i",{staticClass:"fad fa-clone"})]),a("span",{staticClass:"value",on:{click:function(e){return t.link("block",t.hash)}}},[a("i",{staticClass:"fad fa-external-link"})])]),a("div",{staticClass:"stateblock block"},[t._v(t._s(t.hash))]),a("div",{staticClass:"block"},[a("div",{staticClass:"title"},[t._v("Block subtype "),a("span",{staticClass:"subtype value"},[t._v(t._s(t.blockstate.subtype))])]),a("div",{staticClass:"label"},[t._v("The type of transaction that created this state block")])]),a("div",{staticClass:"block"},[a("div",{staticClass:"title"},[t._v("Account "),a("span",{staticClass:"value",on:{click:function(e){return t.copyToClipboard(t.blockstate.contents.account)}}},[a("i",{staticClass:"fad fa-clone"})]),a("span",{staticClass:"value",on:{click:function(e){return t.link("address",t.blockstate.contents.account)}}},[a("i",{staticClass:"fad fa-external-link"})])]),a("div",{staticClass:"account"},[t._v(t._s(t.blockstate.contents.account))]),a("div",{staticClass:"label"},[t._v("The account represented by this state block")])]),a("div",{staticClass:"block"},[a("div",{staticClass:"title"},[t._v("Amount "),a("span",{staticClass:"amount value",domProps:{innerHTML:t._s(t.formattedValue(t.blockstate.amount))}})]),a("div",{staticClass:"raw"},[a("span",{staticClass:"amount_raw"},[t._v(t._s(t.blockstate.amount))]),t._v(" raw")]),a("div",{staticClass:"label"},[t._v("The amount of NANO that was sent in this transaction")])]),a("div",{staticClass:"block"},[a("div",{staticClass:"title"},[t._v("Balance "),a("span",{staticClass:"balance value",domProps:{innerHTML:t._s(t.formattedValue(t.blockstate.balance))}})]),a("div",{staticClass:"raw"},[a("span",{staticClass:"balance_raw"},[t._v(t._s(t.blockstate.balance))]),t._v(" raw")]),a("div",{staticClass:"label"},[t._v("The amount of NANO that was sent in this transaction")])]),a("div",{staticClass:"block"},[a("div",{staticClass:"title"},[t._v("Representative "),a("span",{staticClass:"value",on:{click:function(e){return t.copyToClipboard(t.blockstate.contents.representative)}}},[a("i",{staticClass:"fad fa-clone"})]),a("span",{staticClass:"value",on:{click:function(e){return t.link("address",t.blockstate.contents.representative)}}},[a("i",{staticClass:"fad fa-external-link"})])]),a("div",[a("span",{staticClass:"rep_raw"},[t._v(t._s(t.blockstate.contents.representative))])]),a("div",{staticClass:"label"},[t._v("The account's representative")])]),a("div",{staticClass:"block"},[a("div",{staticClass:"title"},[t._v("Recipient "),a("span",{staticClass:"value",on:{click:function(e){return t.copyToClipboard(t.blockstate.contents.representative)}}},[a("i",{staticClass:"fad fa-clone"})]),t._v(" "),a("span",{staticClass:"value",on:{click:function(e){return t.link("address",t.blockstate.contents.link_as_account)}}},[a("i",{staticClass:"fad fa-external-link"})])]),a("div",[a("span",{staticClass:"rec_raw"},[t._v(t._s(t.blockstate.contents.link_as_account))])]),a("div",{staticClass:"label"},[t._v("The account that is receiving the transaction")])]),a("div",{staticClass:"block"},[a("div",{staticClass:"title"},[t._v("Date "),a("span",{staticClass:"value"},[t._v(t._s(t.formattedDate))])]),a("div",{staticClass:"label"},[t._v("The date and time this block was discovered (converted to your local time)")])]),a("div",{staticClass:"block"},[a("div",{staticClass:"title"},[t._v("Previous Block "),a("span",{staticClass:"value",on:{click:function(e){return t.link("block",t.blockstate.contents.previous)}}},[a("i",{staticClass:"fad fa-external-link"})])]),a("div",[t._v(" "+t._s(t.blockstate.contents.previous)+" ")]),a("div",{staticClass:"label"},[t._v("The previous block in this account's chain")])]),a("div",{staticClass:"block"},[a("div",{staticClass:"title"},[t._v("Link")]),a("div",[t._v(t._s(t.blockstate.contents.link))]),a("div",{staticClass:"label"},[t._v("The destination address encoded in hex format or the block hash if open")])]),a("div",{staticClass:"block"},[a("div",{staticClass:"title"},[t._v("Proof of Work")]),a("div",[t._v(t._s(t.blockstate.contents.work))])]),a("div",{staticClass:"block"},[a("div",{staticClass:"title"},[t._v("Signature")]),a("div",[t._v(t._s(t.blockstate.contents.signature))])]),a("div",{staticClass:"block"},[a("div",{staticClass:"title"},[t._v("JSON "),a("span",{staticClass:"value",on:{click:function(e){t.copyToClipboard(JSON.stringify(t.blockstate))}}},[a("i",{staticClass:"fad fa-clone"})])]),a("div",{staticClass:"json"},[a("pre",[t._v(t._s(JSON.stringify(t.blockstate,null,4)))])])])]):t._e()},ut=[],dt=a("8d3b"),pt=(a("f138"),{name:"BlockState",components:{simplebar:dt["a"]},props:{details:{default:null,type:String},static:{default:!1,type:Boolean}},mixins:[C],data:function(){return{hash:null,blockstate:null}},mounted:function(){this.static&&this.getDetails(this.$route.params.hash)},watch:{details:function(t){var e=this;return Object(m["a"])(regeneratorRuntime.mark((function a(){return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:null!==t?e.getDetails(t):e.blockstate=null;case 1:case"end":return a.stop()}}),a)})))()}},methods:{getDetails:function(t){var e=this;return Object(m["a"])(regeneratorRuntime.mark((function a(){var n;return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:return n={action:"block_info",json_block:"true",hash:t},e.hash=t,a.next=4,e.$store.dispatch("app/rpCall",n);case 4:e.blockstate=a.sent;case 5:case"end":return a.stop()}}),a)})))()},formattedValue:function(t){return this.abbreviateNumber(g["c"](t,this.rawconv),5)}},computed:{formattedDate:function(){var t=new Date(1e3*this.blockstate.local_timestamp);return t.getDate()+" "+t.toLocaleString("default",{month:"short"})+" "+t.getFullYear()+" - "+t.toLocaleTimeString()}}}),vt=pt,ft=(a("2dca"),Object(u["a"])(vt,lt,ut,!1,null,"51ce3523",null)),ht=ft.exports,mt=a("5ba3"),bt=a.n(mt),kt=window.navigator.hardwareConcurrency||2,gt=Math.max(kt-1,1),yt=[];function Ct(){return{key:null,open:!1,details:{},error:null,balance:0,receive:!1,genwallet:!1,send:!1,settings:!1,representative:"",blockdetails:null,address:null,logintype:"password",walletdata:null,isActive:!1,balanceextra:!1,terminate:!1}}var wt={name:"Home",components:{Transaction:R,Send:Q,Receive:at,Settings:ct,BlockState:ht,simplebar:dt["a"],ScanQr:B},mixins:[C],data:function(){return Ct()},watch:{open:function(t){!0===t&&null!==this.key&&(console.log("open"),this.refreshDetails(!0))},pow:function(){var t=Object(m["a"])(regeneratorRuntime.mark((function t(e,a){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:!0===this.open&&e!==a&&null===e&&(console.log("pow change"),this.refreshDetails());case 1:case"end":return t.stop()}}),t,this)})));function e(e,a){return t.apply(this,arguments)}return e}()},mounted:function(){},computed:{loginicon:function(){return"password"===this.logintype?"fa-eye":"fa-eye-slash"},pow:function(){return this.$store.state.app.pow},ready:function(){return this.$store.state.app.ready},history:function(){return this.$store.state.app.history},pending:function(){return this.$store.state.app.pending},privatekey:function(){return this.$store.state.app.privatekey}},methods:{scanDone:function(t){if(t.startsWith("nanokey:"))this.key=t.replace("nanokey:","").substr(0,64);else if(t.startsWith("nanoseed:")){var e=t.replace("nanoseed:","").substr(0,64);this.key=g["g"](e,0)}else this.error="Invalid QR"},logout:function(){for(var t in Object.assign(this.$data,Ct()),this.$store.dispatch("app/resetState"),yt)console.log("Terminate: "+t),yt[t].terminate()},refresh:function(){this.isActive=!this.isActive,this.refreshDetails()},refreshDetails:function(){var t=arguments,e=this;return Object(m["a"])(regeneratorRuntime.mark((function a(){var n,s;return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:return n=t.length>0&&void 0!==t[0]&&t[0],s=null,"frontier"in e.details&&(s=e.details.frontier),a.prev=3,a.next=6,e.getDetails(e.privatekey);case 6:s===e.details.frontier&&!0!==n||e.genWork(e.privatekey,e.details),e.$store.dispatch("app/history",e.address),e.$store.dispatch("app/pending",e.address),e.details.balance?e.balance=g["c"](e.details.balance,e.rawconv):e.balance=0,e.representative=e.details.representative,a.next=17;break;case 13:a.prev=13,a.t0=a["catch"](3),e.error="Could not connect to RPC",e.open=!1;case 17:case"end":return a.stop()}}),a,null,[[3,13]])})))()},genWork:function(t,e){var a=this;return Object(m["a"])(regeneratorRuntime.mark((function n(){var s,i,r;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(a.$store.commit("app/pow",null),a.$store.commit("app/ready",!1),"frontier"in e?(console.log("Frontier in details"),s=e.frontier):(console.log("Frontier NOT in details"),s=g["f"](t)),!window.Worker){n.next=10;break}return console.log("Calculating pow for "+s+" this may take some time"),i=function(){return new Promise((function(t){yt=[];for(var e=0;e<gt;e++){var n=new bt.a;n.postMessage({blockHash:s,workerIndex:e,workerCount:gt}),n.onmessage=function(e){for(var n in console.log("Work: "+e.data),a.$store.commit("app/pow",e.data),a.$store.commit("app/ready",!0),yt)console.log("Terminate: "+n),yt[n].terminate();t()},yt.push(n)}}))},n.next=8,i();case 8:n.next=16;break;case 10:return console.log("Calculating pow for "+s+" (no worker) this may take some time"),n.next=13,g["b"](s);case 13:r=n.sent,a.$store.commit("app/pow",r),a.$store.commit("app/ready",!0);case 16:case"end":return n.stop()}}),n)})))()},togglevisibility:function(){console.log(this.logintype),this.logintype="password"===this.logintype?"text":"password"},getAddress:function(t){var e=g["f"](t);return g["e"](e,{useNanoPrefix:!0})},getDetails:function(t){var e=this;return Object(m["a"])(regeneratorRuntime.mark((function a(){return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:return e.address=e.getAddress(t),a.next=3,e.$store.dispatch("app/getDetails",e.address);case 3:e.details=a.sent;case 4:case"end":return a.stop()}}),a)})))()},openWallet:function(){var t=this;return Object(m["a"])(regeneratorRuntime.mark((function e(){var a;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(t.error=null,t.key)try{a=g["a"](t.key),!1===a?t.error="Invalid key":(t.$store.commit("app/privatekey",t.key),t.open=!0)}catch(n){t.error=n}case 2:case"end":return e.stop()}}),e)})))()}}},_t=wt,xt=Object(u["a"])(_t,f,h,!1,null,null,null),$t=xt.exports,Ot=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"page active",staticStyle:{top:"0"},attrs:{id:"blockdetails"}},[a("block-state",{attrs:{static:!0}})],1)},Rt=[],St={name:"Block",components:{BlockState:ht},data:function(){return{blockdetails:null}},watch:{},mounted:function(){this.blockdetails=this.$route.params.hash}},jt=St,Tt=Object(u["a"])(jt,Ot,Rt,!1,null,null,null),Pt=Tt.exports,At=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"page active",staticStyle:{top:"0"},attrs:{id:"blockdetails"}},[a("label",{attrs:{for:"key"}},[t._v("Enter node address")]),a("input",{directives:[{name:"model",rawName:"v-model",value:t.node,expression:"node"}],attrs:{type:"text",id:"node",name:"node"},domProps:{value:t.node},on:{input:function(e){e.target.composing||(t.node=e.target.value)}}}),a("button",{staticClass:"openwallet btn",attrs:{type:"button"},on:{click:t.openNode}},[t._v("Go To Node")])])},Dt=[],Nt={name:"Block",components:{},data:function(){return{node:""}},watch:{},methods:{openNode:function(){this.$router.push("/"+this.node)}}},Et=Nt,Mt=Object(u["a"])(Et,At,Dt,!1,null,null,null),Lt=Mt.exports,Bt=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"page active",attrs:{id:"genwallet"}},[a("router-link",{staticClass:"close",attrs:{to:"/"+t.$route.params.node}},[a("i",{staticClass:"fal fa-times"})]),a("div",{staticClass:"inner"},[a("div",{staticClass:"block"},[a("div",{staticClass:"details"},[a("label",{attrs:{for:"seed"}},[t._v("Seed")]),a("a",{staticClass:"copy",attrs:{href:"#"},on:{click:function(e){return t.copyToClipboard(t.walletdata.seed)}}},[a("i",{staticClass:"fad fa-clone"})]),a("input",{staticClass:"copytext",attrs:{type:"text",name:"seed"},domProps:{value:t.walletdata.seed}})]),a("div",{staticClass:"details"},[a("label",{attrs:{for:"privatekey"}},[t._v("Private Key")]),a("a",{staticClass:"copy",attrs:{href:"#"},on:{click:function(e){return t.copyToClipboard(t.walletdata.privatekey)}}},[a("i",{staticClass:"fad fa-clone"})]),a("input",{staticClass:"copytext",attrs:{type:"text",name:"privatekey"},domProps:{value:t.walletdata.privatekey}})]),a("div",{staticClass:"details"},[a("label",{attrs:{for:"publickey"}},[t._v("Public Key")]),a("a",{staticClass:"copy",attrs:{href:"#"},on:{click:function(e){return t.copyToClipboard(t.walletdata.publickey)}}},[a("i",{staticClass:"fad fa-clone"})]),a("input",{staticClass:"copytext",attrs:{type:"text",name:"publickey"},domProps:{value:t.walletdata.publickey}})]),a("div",{staticClass:"details"},[a("label",{attrs:{for:"address"}},[t._v("Address")]),a("a",{staticClass:"copy",attrs:{href:"#"},on:{click:function(e){return t.copyToClipboard(t.walletdata.address)}}},[a("i",{staticClass:"fad fa-clone"})]),a("input",{staticClass:"copytext",attrs:{type:"text",name:"address"},domProps:{value:t.walletdata.address}})]),a("button",{staticClass:"btn",on:{click:function(e){return t.copyToClipboard("Seed: "+t.walletdata.seed+"\nPrivate Key: "+t.walletdata.privatekey+"\nPublic Key: "+t.walletdata.publickey+"\nAddress: "+t.walletdata.address)}}},[t._v("Copy All")])]),a("div",{staticClass:"block"},[a("div",{staticClass:"canvas-bag"},[a("qr-block",{attrs:{address:"nanoseed:"+t.walletdata.seed}})],1)])])],1)},Ht=[],Wt={name:"Generate",mixins:[C],components:{QrBlock:X},data:function(){return{newrep:"",walletdata:{}}},methods:{},mounted:function(){var t=this;this.$store.dispatch("app/getSeed").then((function(e){t.walletdata=e}))}},qt=Wt,Qt=(a("fbea"),Object(u["a"])(qt,Bt,Ht,!1,null,"3bc37eb0",null)),Ft=Qt.exports,It=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"page active",staticStyle:{top:"0"},attrs:{id:"wallet"}},[a("div",{staticClass:"inner"},[a("div",{staticClass:"block"},[t._m(0),a("div",{attrs:{id:"output"}},[a("div",{staticClass:"balance"},[a("div",{staticClass:"raw",class:{active:t.balanceextra},on:{click:function(e){return t.copyToClipboard(t.$route.params.address)}}},[t._v(t._s(t.$route.params.address))]),a("div",{staticClass:"value",domProps:{innerHTML:t._s(t.abbreviateNumber(t.balance))}}),a("div",{staticClass:"raw",class:{active:t.balanceextra}},[t._v(t._s(t.balance))]),a("a",{staticClass:"balanceextra",attrs:{href:""},on:{click:function(e){e.preventDefault(),t.balanceextra=!t.balanceextra}}},[a("i",{staticClass:"fal fa-ellipsis-h",attrs:{"data-fa-transform":"grow-20"}})])])]),a("simplebar",{staticClass:"block history"},[a("div",{staticClass:"headingtitle showmobile"},[t._v("History")]),a("div",{attrs:{id:"pendingblocks"}}),t._l(t.pending,(function(e,n){return a("transaction",{key:n,attrs:{index:n,transaction:e,type:"pending"},on:{blockdetails:function(e){t.blockdetails=e}}})}))],2)],1),a("simplebar",{staticClass:"block history"},[a("div",{staticClass:"headingtitle hidemobile"},[t._v("History")]),t._l(t.history,(function(e,n){return a("transaction",{key:n,attrs:{index:n,transaction:e,type:e.type},on:{blockdetails:function(e){t.blockdetails=e}}})}))],2)],1),a("div",{staticClass:"page",class:{active:null!==t.blockdetails},staticStyle:{top:"0"},attrs:{id:"blockdetails"}},[a("a",{staticClass:"close",on:{click:function(e){t.blockdetails=null}}},[a("i",{staticClass:"fal fa-times"})]),a("block-state",{attrs:{details:t.blockdetails}})],1)])},Vt=[function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"headingtitle top"},[a("span",[t._v("Wallet")])])}],Jt={name:"Address",components:{Transaction:R,BlockState:ht,simplebar:dt["a"]},mixins:[C],data:function(){return{details:null,balance:0,blockdetails:null,balanceextra:!1}},computed:{history:function(){return this.$store.state.app.history},pending:function(){return this.$store.state.app.pending}},watch:{},methods:{getDetails:function(){var t=this;return Object(m["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.$store.dispatch("app/getDetails",t.$route.params.address);case 2:t.details=e.sent,t.$store.dispatch("app/history",t.$route.params.address),t.$store.dispatch("app/pending",t.$route.params.address),t.balance=g["c"](t.details.balance,t.rawconv),t.representative=t.details.representative;case 7:case"end":return e.stop()}}),e)})))()}},mounted:function(){this.$store.dispatch("app/resetState"),this.getDetails()}},Gt=Jt,Kt=Object(u["a"])(Gt,It,Vt,!1,null,null,null),zt=Kt.exports;i["a"].use(v["a"]);var Ut=[{path:"/",name:"Node",component:Lt},{path:"/:node",name:"Home",component:$t},{path:"/:node/generate",name:"Generate",component:Ft},{path:"/:node/block/:hash",name:"Block",component:Pt},{path:"/:node/address/:address",name:"Address",component:zt},{path:"/about",name:"About",component:function(){return a.e("about").then(a.bind(null,"f820"))}}],Yt=new v["a"]({routes:Ut}),Xt=Yt,Zt=a("2f62");function te(){return{privatekey:null,pow:null,ready:!1,history:[],pending:[],node:{address:null,port:null,path:"",auth:null}}}var ee=function(){return te()},ae=a("43a3");function ne(t,e){null!==e&&(console.log("Finished calculating"),console.log(e)),t.pow=e}function se(t,e){t.ready=e}function ie(t,e){t.privatekey=e}function re(t,e){t.node=e}function oe(t,e){t.history=e}function ce(t,e){t.pending=e}function le(t){Object.assign(t,ee())}var ue=a("53ca"),de=a("5530"),pe={"mynano.ninja":{port:443,path:"/api/node",protocol:"https"},"api.nanos.cc":{port:443,protocol:"https"}};function ve(){return window.location.protocol.replace(":","")}function fe(){return"https"==ve()?"7077":"7076"}function he(t){var e=t.commit,a=t.state,n=Object(de["a"])({},a.node);if(n.address=Xt.currentRoute.params.node,n.port=fe(),n.protocol=ve(),Xt.currentRoute.params.node in pe){var s=pe[Xt.currentRoute.params.node];n=Object(de["a"])(Object(de["a"])({},n),s)}"auth"in Xt.currentRoute.query&&(n.auth=Xt.currentRoute.query.auth),e("node",n)}function me(){return be.apply(this,arguments)}function be(){return be=Object(m["a"])(regeneratorRuntime.mark((function t(){var e,a,n,s,i;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,g["h"]();case 2:return e=t.sent,a=g["g"](e,0),n=g["f"](a),s=g["e"](n,{useNanoPrefix:!0}),i={seed:e,privatekey:a,publickey:n,address:s},t.abrupt("return",i);case 8:case"end":return t.stop()}}),t)}))),be.apply(this,arguments)}function ke(t,e){return ge.apply(this,arguments)}function ge(){return ge=Object(m["a"])(regeneratorRuntime.mark((function t(e,a){var n,s;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return n={action:"account_info",representative:"true",account:a},t.next=3,ye(e,n);case 3:return s=t.sent,t.abrupt("return",s);case 5:case"end":return t.stop()}}),t)}))),ge.apply(this,arguments)}function ye(t,e){return Ce.apply(this,arguments)}function Ce(){return Ce=Object(m["a"])(regeneratorRuntime.mark((function t(e,a){var n,s,i,r,o,c;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return n=e.commit,s=e.state,i=s.node.protocol+"://"+s.node.address+":"+s.node.port+s.node.path,r={method:"POST",body:JSON.stringify(a)},null!==s.node.auth&&(r.headers={Authorization:s.node.auth,"Content-Type":"application/json"}),t.next=6,fetch(i,r);case 6:return o=t.sent,t.next=9,o.json();case 9:return c=t.sent,console.log(c),console.log(n),t.abrupt("return",c);case 13:case"end":return t.stop()}}),t)}))),Ce.apply(this,arguments)}function we(t,e){return _e.apply(this,arguments)}function _e(){return _e=Object(m["a"])(regeneratorRuntime.mark((function t(e,a){var n,s;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return n={},n["action"]="account_history",n["account"]=a,n["count"]=64,console.log("history"),t.next=7,e.dispatch("rpCall",n);case 7:s=t.sent,Array.isArray(s.history)&&s.history.length&&e.commit("history",s.history);case 9:case"end":return t.stop()}}),t)}))),_e.apply(this,arguments)}function xe(t,e){return $e.apply(this,arguments)}function $e(){return $e=Object(m["a"])(regeneratorRuntime.mark((function t(e,a){var n,s;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return n={},n["action"]="pending",n["source"]="true",n["sorting"]="true",n["account"]=a,t.next=7,e.dispatch("rpCall",n);case 7:s=t.sent,console.log("pending1"),"object"===Object(ue["a"])(s.blocks)?(console.log("pending"),e.commit("pending",s.blocks)):e.commit("pending",[]);case 10:case"end":return t.stop()}}),t)}))),$e.apply(this,arguments)}function Oe(t){var e=t.dispatch,a=t.commit;a("resetState"),e("node")}var Re={namespaced:!0,state:ee,getters:ae,mutations:n,actions:s};i["a"].use(Zt["a"]);var Se=new Zt["a"].Store({modules:{app:Re}});i["a"].config.productionTip=!1,new i["a"]({router:Xt,store:Se,render:function(t){return t(p)}}).$mount("#app")},"5ba3":function(t,e,a){t.exports=function(){return new Worker(a.p+"1602516512737beec51b.worker.js")}},"5c0b":function(t,e,a){"use strict";var n=a("9c0c"),s=a.n(n);s.a},6790:function(t,e,a){"use strict";var n=a("4d81"),s=a.n(n);s.a},6939:function(t,e,a){},"9c0c":function(t,e,a){},fbea:function(t,e,a){"use strict";var n=a("1b5f"),s=a.n(n);s.a}});
//# sourceMappingURL=app.8a975ebe.js.map