@ethersphere/bee-dashboard 0.6.0 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +57 -0
- package/README.md +27 -10
- package/build/asset-manifest.json +13 -13
- package/build/index.html +1 -1
- package/build/static/js/2.8d4d28e5.chunk.js +3 -0
- package/build/static/js/{2.a35a3729.chunk.js.LICENSE.txt → 2.8d4d28e5.chunk.js.LICENSE.txt} +16 -3
- package/build/static/js/2.8d4d28e5.chunk.js.map +1 -0
- package/build/static/js/3.1e3c5cd7.chunk.js +2 -0
- package/build/static/js/3.1e3c5cd7.chunk.js.map +1 -0
- package/build/static/js/main.f316c903.chunk.js +2 -0
- package/build/static/js/main.f316c903.chunk.js.map +1 -0
- package/build/static/js/{runtime-main.3bb9c4ba.js → runtime-main.bd9d6fc5.js} +2 -2
- package/build/static/js/runtime-main.bd9d6fc5.js.map +1 -0
- package/build/static/media/logo.3d1155fe.svg +11 -0
- package/package.json +58 -50
- package/build/static/js/2.a35a3729.chunk.js +0 -3
- package/build/static/js/2.a35a3729.chunk.js.map +0 -1
- package/build/static/js/3.0431c757.chunk.js +0 -2
- package/build/static/js/3.0431c757.chunk.js.map +0 -1
- package/build/static/js/main.3cff6969.chunk.js +0 -2
- package/build/static/js/main.3cff6969.chunk.js.map +0 -1
- package/build/static/js/runtime-main.3bb9c4ba.js.map +0 -1
- package/build/static/media/swarm-logo-orange.f09e1111.svg +0 -35
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
(this["webpackJsonp@ethersphere/bee-dashboard"]=this["webpackJsonp@ethersphere/bee-dashboard"]||[]).push([[3],{646:function(e,t,n){"use strict";n.r(t),n.d(t,"getCLS",(function(){return m})),n.d(t,"getFCP",(function(){return g})),n.d(t,"getFID",(function(){return F})),n.d(t,"getLCP",(function(){return k})),n.d(t,"getTTFB",(function(){return C}));var i,a,r,o,c=function(e,t){return{name:e,value:void 0===t?-1:t,delta:0,entries:[],id:"v1-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12)}},u=function(e,t){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var n=new PerformanceObserver((function(e){return e.getEntries().map(t)}));return n.observe({type:e,buffered:!0}),n}}catch(e){}},s=function(e,t){var n=function n(i){"pagehide"!==i.type&&"hidden"!==document.visibilityState||(e(i),t&&(removeEventListener("visibilitychange",n,!0),removeEventListener("pagehide",n,!0)))};addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0)},f=function(e){addEventListener("pageshow",(function(t){t.persisted&&e(t)}),!0)},d="function"==typeof WeakSet?new WeakSet:new Set,p=function(e,t,n){var i;return function(){t.value>=0&&(n||d.has(t)||"hidden"===document.visibilityState)&&(t.delta=t.value-(i||0),(t.delta||void 0===i)&&(i=t.value,e(t)))}},m=function(e,t){var n,i=c("CLS",0),a=function(e){e.hadRecentInput||(i.value+=e.value,i.entries.push(e),n())},r=u("layout-shift",a);r&&(n=p(e,i,t),s((function(){r.takeRecords().map(a),n()})),f((function(){i=c("CLS",0),n=p(e,i,t)})))},v=-1,l=function(){return"hidden"===document.visibilityState?0:1/0},h=function(){s((function(e){var t=e.timeStamp;v=t}),!0)},S=function(){return v<0&&(v=l(),h(),f((function(){setTimeout((function(){v=l(),h()}),0)}))),{get timeStamp(){return v}}},g=function(e,t){var n,i=S(),a=c("FCP"),r=u("paint",(function(e){"first-contentful-paint"===e.name&&(r&&r.disconnect(),e.startTime<i.timeStamp&&(a.value=e.startTime,a.entries.push(e),d.add(a),n()))}));r&&(n=p(e,a,t),f((function(i){a=c("FCP"),n=p(e,a,t),requestAnimationFrame((function(){requestAnimationFrame((function(){a.value=performance.now()-i.timeStamp,d.add(a),n()}))}))})))},y={passive:!0,capture:!0},w=new Date,E=function(e,t){i||(i=t,a=e,r=new Date,T(removeEventListener),L())},L=function(){if(a>=0&&a<r-w){var e={entryType:"first-input",name:i.type,target:i.target,cancelable:i.cancelable,startTime:i.timeStamp,processingStart:i.timeStamp+a};o.forEach((function(t){t(e)})),o=[]}},b=function(e){if(e.cancelable){var t=(e.timeStamp>1e12?new Date:performance.now())-e.timeStamp;"pointerdown"==e.type?function(e,t){var n=function(){E(e,t),a()},i=function(){a()},a=function(){removeEventListener("pointerup",n,y),removeEventListener("pointercancel",i,y)};addEventListener("pointerup",n,y),addEventListener("pointercancel",i,y)}(t,e):E(t,e)}},T=function(e){["mousedown","keydown","touchstart","pointerdown"].forEach((function(t){return e(t,b,y)}))},F=function(e,t){var n,r=S(),m=c("FID"),v=function(e){e.startTime<r.timeStamp&&(m.value=e.processingStart-e.startTime,m.entries.push(e),d.add(m),n())},l=u("first-input",v);n=p(e,m,t),l&&s((function(){l.takeRecords().map(v),l.disconnect()}),!0),l&&f((function(){var r;m=c("FID"),n=p(e,m,t),o=[],a=-1,i=null,T(addEventListener),r=v,o.push(r),L()}))},k=function(e,t){var n,i=S(),a=c("LCP"),r=function(e){var t=e.startTime;t<i.timeStamp&&(a.value=t,a.entries.push(e)),n()},o=u("largest-contentful-paint",r);if(o){n=p(e,a,t);var m=function(){d.has(a)||(o.takeRecords().map(r),o.disconnect(),d.add(a),n())};["keydown","click"].forEach((function(e){addEventListener(e,m,{once:!0,capture:!0})})),s(m,!0),f((function(i){a=c("LCP"),n=p(e,a,t),requestAnimationFrame((function(){requestAnimationFrame((function(){a.value=performance.now()-i.timeStamp,d.add(a),n()}))}))}))}},C=function(e){var t,n=c("TTFB");t=function(){try{var t=performance.getEntriesByType("navigation")[0]||function(){var e=performance.timing,t={entryType:"navigation",startTime:0};for(var n in e)"navigationStart"!==n&&"toJSON"!==n&&(t[n]=Math.max(e[n]-e.navigationStart,0));return t}();n.value=n.delta=t.responseStart,n.entries=[t],e(n)}catch(e){}},"complete"===document.readyState?setTimeout(t,0):addEventListener("pageshow",t)}}}]);
|
|
2
|
-
//# sourceMappingURL=3.0431c757.chunk.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../node_modules/web-vitals/dist/web-vitals.js"],"names":["e","t","n","i","a","name","value","delta","entries","id","concat","Date","now","Math","floor","random","r","PerformanceObserver","supportedEntryTypes","includes","getEntries","map","observe","type","buffered","o","document","visibilityState","removeEventListener","addEventListener","c","persisted","u","WeakSet","Set","s","has","f","hadRecentInput","push","takeRecords","m","v","d","timeStamp","p","setTimeout","l","disconnect","startTime","add","requestAnimationFrame","performance","h","passive","capture","S","y","w","g","entryType","target","cancelable","processingStart","forEach","E","L","T","once","b","getEntriesByType","timing","max","navigationStart","responseStart","readyState"],"mappings":"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","file":"static/js/3.0431c757.chunk.js","sourcesContent":["var e,t,n,i,a=function(e,t){return{name:e,value:void 0===t?-1:t,delta:0,entries:[],id:\"v1-\".concat(Date.now(),\"-\").concat(Math.floor(8999999999999*Math.random())+1e12)}},r=function(e,t){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var n=new PerformanceObserver((function(e){return e.getEntries().map(t)}));return n.observe({type:e,buffered:!0}),n}}catch(e){}},o=function(e,t){var n=function n(i){\"pagehide\"!==i.type&&\"hidden\"!==document.visibilityState||(e(i),t&&(removeEventListener(\"visibilitychange\",n,!0),removeEventListener(\"pagehide\",n,!0)))};addEventListener(\"visibilitychange\",n,!0),addEventListener(\"pagehide\",n,!0)},c=function(e){addEventListener(\"pageshow\",(function(t){t.persisted&&e(t)}),!0)},u=\"function\"==typeof WeakSet?new WeakSet:new Set,s=function(e,t,n){var i;return function(){t.value>=0&&(n||u.has(t)||\"hidden\"===document.visibilityState)&&(t.delta=t.value-(i||0),(t.delta||void 0===i)&&(i=t.value,e(t)))}},f=function(e,t){var n,i=a(\"CLS\",0),u=function(e){e.hadRecentInput||(i.value+=e.value,i.entries.push(e),n())},f=r(\"layout-shift\",u);f&&(n=s(e,i,t),o((function(){f.takeRecords().map(u),n()})),c((function(){i=a(\"CLS\",0),n=s(e,i,t)})))},m=-1,v=function(){return\"hidden\"===document.visibilityState?0:1/0},d=function(){o((function(e){var t=e.timeStamp;m=t}),!0)},p=function(){return m<0&&(m=v(),d(),c((function(){setTimeout((function(){m=v(),d()}),0)}))),{get timeStamp(){return m}}},l=function(e,t){var n,i=p(),o=a(\"FCP\"),f=r(\"paint\",(function(e){\"first-contentful-paint\"===e.name&&(f&&f.disconnect(),e.startTime<i.timeStamp&&(o.value=e.startTime,o.entries.push(e),u.add(o),n()))}));f&&(n=s(e,o,t),c((function(i){o=a(\"FCP\"),n=s(e,o,t),requestAnimationFrame((function(){requestAnimationFrame((function(){o.value=performance.now()-i.timeStamp,u.add(o),n()}))}))})))},h={passive:!0,capture:!0},S=new Date,y=function(i,a){e||(e=a,t=i,n=new Date,w(removeEventListener),g())},g=function(){if(t>=0&&t<n-S){var a={entryType:\"first-input\",name:e.type,target:e.target,cancelable:e.cancelable,startTime:e.timeStamp,processingStart:e.timeStamp+t};i.forEach((function(e){e(a)})),i=[]}},E=function(e){if(e.cancelable){var t=(e.timeStamp>1e12?new Date:performance.now())-e.timeStamp;\"pointerdown\"==e.type?function(e,t){var n=function(){y(e,t),a()},i=function(){a()},a=function(){removeEventListener(\"pointerup\",n,h),removeEventListener(\"pointercancel\",i,h)};addEventListener(\"pointerup\",n,h),addEventListener(\"pointercancel\",i,h)}(t,e):y(t,e)}},w=function(e){[\"mousedown\",\"keydown\",\"touchstart\",\"pointerdown\"].forEach((function(t){return e(t,E,h)}))},L=function(n,f){var m,v=p(),d=a(\"FID\"),l=function(e){e.startTime<v.timeStamp&&(d.value=e.processingStart-e.startTime,d.entries.push(e),u.add(d),m())},h=r(\"first-input\",l);m=s(n,d,f),h&&o((function(){h.takeRecords().map(l),h.disconnect()}),!0),h&&c((function(){var r;d=a(\"FID\"),m=s(n,d,f),i=[],t=-1,e=null,w(addEventListener),r=l,i.push(r),g()}))},T=function(e,t){var n,i=p(),f=a(\"LCP\"),m=function(e){var t=e.startTime;t<i.timeStamp&&(f.value=t,f.entries.push(e)),n()},v=r(\"largest-contentful-paint\",m);if(v){n=s(e,f,t);var d=function(){u.has(f)||(v.takeRecords().map(m),v.disconnect(),u.add(f),n())};[\"keydown\",\"click\"].forEach((function(e){addEventListener(e,d,{once:!0,capture:!0})})),o(d,!0),c((function(i){f=a(\"LCP\"),n=s(e,f,t),requestAnimationFrame((function(){requestAnimationFrame((function(){f.value=performance.now()-i.timeStamp,u.add(f),n()}))}))}))}},b=function(e){var t,n=a(\"TTFB\");t=function(){try{var t=performance.getEntriesByType(\"navigation\")[0]||function(){var e=performance.timing,t={entryType:\"navigation\",startTime:0};for(var n in e)\"navigationStart\"!==n&&\"toJSON\"!==n&&(t[n]=Math.max(e[n]-e.navigationStart,0));return t}();n.value=n.delta=t.responseStart,n.entries=[t],e(n)}catch(e){}},\"complete\"===document.readyState?setTimeout(t,0):addEventListener(\"pageshow\",t)};export{f as getCLS,l as getFCP,L as getFID,T as getLCP,b as getTTFB};\n"],"sourceRoot":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
(this["webpackJsonp@ethersphere/bee-dashboard"]=this["webpackJsonp@ethersphere/bee-dashboard"]||[]).push([[0],{187:function(e){e.exports=JSON.parse('{"a":{"node":">=12.0.0","npm":">=6.0.0","bee":">=0.6.0"}}')},239:function(e,t,n){},240:function(e,t,n){},521:function(e,t,n){"use strict";n.r(t);var a=n(0),r=n.n(a),c=n(13),i=n.n(c),s=(n(239),n(7)),o=n(47),l=(n(240),n(634)),u=n(635),d=n(41),j=n(20),b=n(15),h=n(1),p=function(e){var t=e.component,n=e.layout,a=e.exact,r=e.path;return Object(h.jsx)(j.a,{exact:a,path:r,render:function(e){return Object(h.jsx)(n,Object(b.a)(Object(b.a)({},e),{},{children:Object(h.jsx)(t,Object(b.a)({},e))}))}})},x=n(118),O=n(119),m=n(210),g=n(208),v=function(e){Object(m.a)(n,e);var t=Object(g.a)(n);function n(e){var a;return Object(x.a)(this,n),(a=t.call(this,e)).state={error:null},a}return Object(O.a)(n,[{key:"componentDidCatch",value:function(e,t){console.error({error:e,errorInfo:t})}},{key:"render",value:function(){return this.state.error?Object(h.jsxs)("h1",{children:["Something went wrong. Error: ",this.state.error.message]}):this.props.children}}],[{key:"getDerivedStateFromError",value:function(e){return{error:e}}}]),n}(a.Component),f=n(524),y=n(219),w=n(638),k=n(578),B=n(215),S=n(525),C=n(120),A=n.n(C),N=n(18),P=n.n(N),I=n(34),D=n(29),L=n.n(D);function E(e){return D.BigNumber.isBigNumber(e)&&e.isInteger()||"bigint"===typeof e}function T(e){if(D.BigNumber.isBigNumber(e))return e;if("string"===typeof e)return new D.BigNumber(e);if("bigint"===typeof e)return new D.BigNumber(e.toString());if("number"===typeof e)return new D.BigNumber(e);throw new TypeError("Not a BigNumber or BigNumber convertible value. Type: ".concat(typeof e," value: ").concat(e))}function U(e){return R.apply(this,arguments)}function R(){return(R=Object(I.a)(P.a.mark((function e(t){return P.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,new Promise((function(e){return setTimeout((function(){e()}),t)}));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var q=[18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0],F=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:16;Object(x.a)(this,e),this.amount=void 0,this.decimals=void 0;var a=T(t);if(!E(a)||!q.includes(n))throw new TypeError("Not a valid token values");this.amount=a,this.decimals=n}return Object(O.a)(e,[{key:"toBigInt",get:function(){return BigInt(this.amount.toFixed(0))}},{key:"toString",get:function(){return this.amount.toFixed(0)}},{key:"toBigNumber",get:function(){return new D.BigNumber(this.amount)}},{key:"toDecimal",get:function(){return this.amount.dividedBy(new D.BigNumber(10).pow(this.decimals))}},{key:"toFixedDecimal",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:7;return this.toDecimal.toFixed(e)}}],[{key:"fromDecimal",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:16,a=T(t),r=a.multipliedBy(new D.BigNumber(10).pow(n));return new e(r,n)}}]),e}(),V=n(94),M=n.n(V),z=n(187),W=n(56),_={apiUrl:sessionStorage.getItem("api_host")||"http://localhost:1633",apiDebugUrl:sessionStorage.getItem("debug_api_host")||"http://localhost:1635",beeApi:null,beeDebugApi:null,setApiUrl:function(){},setDebugApiUrl:function(){}},Z=Object(a.createContext)(_);Z.Consumer;function H(e){var t=e.children,n=Object(a.useState)(_.apiUrl),r=Object(s.a)(n,2),c=r[0],i=r[1],o=Object(a.useState)(_.apiDebugUrl),l=Object(s.a)(o,2),u=l[0],d=l[1],j=Object(a.useState)(null),b=Object(s.a)(j,2),p=b[0],x=b[1],O=Object(a.useState)(null),m=Object(s.a)(O,2),g=m[0],v=m[1];return Object(a.useEffect)((function(){try{x(new W.Bee(c)),sessionStorage.setItem("api_host",c)}catch(e){x(null)}}),[c]),Object(a.useEffect)((function(){try{v(new W.BeeDebug(u)),sessionStorage.setItem("debug_api_host",u)}catch(e){v(null)}}),[u]),Object(h.jsx)(Z.Provider,{value:{apiUrl:c,apiDebugUrl:u,beeApi:p,beeDebugApi:g,setApiUrl:i,setDebugApiUrl:d},children:t})}var Y=n(188),G=n.n(Y),K={status:{all:!1,version:!1,blockchainConnection:!1,debugApiConnection:!1,apiConnection:!1,topology:!1,chequebook:!1},latestPublishedVersion:void 0,latestUserVersion:void 0,latestUserVersionExact:void 0,isLatestBeeVersion:!1,latestBeeVersionUrl:"https://github.com/ethersphere/bee/releases/latest",error:null,apiHealth:!1,debugApiHealth:null,nodeAddresses:null,topology:null,chequebookAddress:null,peers:null,chequebookBalance:null,peerBalances:null,peerCheques:null,settlements:null,latestBeeRelease:null,isLoading:!0,isRefreshing:!1,lastUpdate:null,start:function(){},stop:function(){},refresh:function(){return Promise.reject()}},J=Object(a.createContext)(K);J.Consumer;function X(e,t,n,a,r,c,i){var s={version:Boolean(e&&M.a.satisfies(e.version,z.a.bee,{includePrerelease:!0})),blockchainConnection:Boolean(null===t||void 0===t?void 0:t.ethereum),debugApiConnection:Boolean("ok"===(null===e||void 0===e?void 0:e.status)),apiConnection:n,topology:Boolean((null===a||void 0===a?void 0:a.connected)&&(null===a||void 0===a?void 0:a.connected)>0),chequebook:Boolean(null===r||void 0===r?void 0:r.chequebookAddress)&&null!==c&&(null===c||void 0===c?void 0:c.totalBalance.toBigNumber.isGreaterThan(0))};return Object(b.a)(Object(b.a)({},s),{},{all:!i&&Object.values(s).every((function(e){return e}))})}function $(e){var t,n,r=e.children,c=Object(a.useContext)(Z),i=c.beeApi,o=c.beeDebugApi,l=Object(a.useState)(!1),u=Object(s.a)(l,2),d=u[0],j=u[1],b=Object(a.useState)(null),p=Object(s.a)(b,2),x=p[0],O=p[1],m=Object(a.useState)(null),g=Object(s.a)(m,2),v=g[0],f=g[1],y=Object(a.useState)(null),w=Object(s.a)(y,2),k=w[0],B=w[1],S=Object(a.useState)(null),C=Object(s.a)(S,2),A=C[0],N=C[1],D=Object(a.useState)(null),L=Object(s.a)(D,2),E=L[0],T=L[1],U=Object(a.useState)(null),R=Object(s.a)(U,2),q=R[0],V=R[1],z=Object(a.useState)(null),W=Object(s.a)(z,2),_=W[0],H=W[1],Y=Object(a.useState)(null),$=Object(s.a)(Y,2),Q=$[0],ee=$[1],te=Object(a.useState)(null),ne=Object(s.a)(te,2),ae=ne[0],re=ne[1],ce=function(){var e=Object(a.useState)(null),t=Object(s.a)(e,2),n=t[0],r=t[1],c=Object(a.useState)(!1),i=Object(s.a)(c,2),o=i[0],l=i[1],u=Object(a.useState)(null),d=Object(s.a)(u,2),j=d[0],b=d[1];return Object(a.useEffect)((function(){G.a.get("".concat("https://api.github.com/repos/ethersphere/bee","/releases/latest")).then((function(e){r(e.data)})).catch((function(e){b(e)})).finally((function(){l(!1)}))}),[]),{latestBeeRelease:n,isLoadingLatestBeeRelease:o,error:j}}().latestBeeRelease,ie=Object(a.useState)(K.error),se=Object(s.a)(ie,2),oe=se[0],le=se[1],ue=Object(a.useState)(K.isLoading),de=Object(s.a)(ue,2),je=de[0],be=de[1],he=Object(a.useState)(K.isRefreshing),pe=Object(s.a)(he,2),xe=pe[0],Oe=pe[1],me=Object(a.useState)(K.lastUpdate),ge=Object(s.a)(me,2),ve=ge[0],fe=ge[1],ye=Object(a.useState)(3e4),we=Object(s.a)(ye,2),ke=we[0],Be=we[1],Se=null===(t=M.a.coerce(null===ce||void 0===ce?void 0:ce.name))||void 0===t?void 0:t.version,Ce=null===(n=M.a.coerce(null===x||void 0===x?void 0:x.version))||void 0===n?void 0:n.version,Ae=null===x||void 0===x?void 0:x.version;Object(a.useEffect)((function(){be(!0),j(!1),Ne()}),[i]),Object(a.useEffect)((function(){be(!0),O(null),f(null),B(null),T(null),N(null),V(null),H(null),ee(null),re(null),Ne()}),[o]);var Ne=function(){var e=Object(I.a)(P.a.mark((function e(){var t,n,a,r;return P.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!xe){e.next=2;break}return e.abrupt("return");case 2:if(i&&o){e.next=5;break}return be(!1),e.abrupt("return");case 5:return e.prev=5,Oe(!0),le(null),t=function(){var e=Object(I.a)(P.a.mark((function e(){var t,n,a;return P.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,o.getChequebookBalance();case 2:return t=e.sent,n=t.totalBalance,a=t.availableBalance,e.abrupt("return",{totalBalance:new F(n),availableBalance:new F(a)});case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),n=function(){var e=Object(I.a)(P.a.mark((function e(){var t,n;return P.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,o.getAllBalances();case 2:return t=e.sent,n=t.balances,e.abrupt("return",n.map((function(e){var t=e.peer,n=e.balance;return{peer:t,balance:new F(n)}})));case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),a=function(){var e=Object(I.a)(P.a.mark((function e(){var t,n,a,r;return P.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,o.getAllSettlements();case 2:return t=e.sent,n=t.totalReceived,a=t.settlements,r=t.totalSent,e.abrupt("return",{totalReceived:new F(n),totalSent:new F(r),settlements:a.map((function(e){var t=e.peer,n=e.received,a=e.sent;return{peer:t,received:new F(n),sent:new F(a)}}))});case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),r=[i.isConnected().then(j).catch((function(){return j(!1)})),o.getHealth().then(O).catch((function(){return O(null)})),o.getNodeAddresses().then(f).catch((function(){return f(null)})),o.getTopology().then(B).catch((function(){return B(null)})),o.getPeers().then(T).catch((function(){return T(null)})),o.getChequebookAddress().then(N).catch((function(){return N(null)})),o.getLastCheques().then(ee).catch((function(){return ee(null)})),t().then(V).catch((function(){return V(null)})),n().then(H).catch((function(){return H(null)})),a().then(re).catch((function(){return re(null)}))],e.next=14,Promise.allSettled(r);case 14:e.next=19;break;case 16:e.prev=16,e.t0=e.catch(5),le(e.t0);case 19:return e.prev=19,be(!1),Oe(!1),fe(Date.now()),e.finish(19);case 24:case"end":return e.stop()}}),e,null,[[5,16,19,24]])})));return function(){return e.apply(this,arguments)}}();return Object(a.useEffect)((function(){if(Ne(),ke){var e=setInterval(Ne,ke);return function(){return clearInterval(e)}}}),[ke,o,i]),Object(h.jsx)(J.Provider,{value:{status:X(x,v,d,k,A,q,oe),latestUserVersion:Ce,latestUserVersionExact:Ae,latestPublishedVersion:Se,isLatestBeeVersion:Boolean(Se&&Ce&&M.a.satisfies(Se,Ce,{includePrerelease:!0})),latestBeeVersionUrl:(null===ce||void 0===ce?void 0:ce.html_url)||"https://github.com/ethersphere/bee/releases/latest",error:oe,apiHealth:d,debugApiHealth:x,nodeAddresses:v,topology:k,chequebookAddress:A,peers:E,chequebookBalance:q,peerBalances:_,peerCheques:Q,settlements:ae,latestBeeRelease:ce,isLoading:je,isRefreshing:xe,lastUpdate:ve,start:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3e4;return Be(e)},stop:function(){return Be(null)},refresh:Ne},children:r})}var Q=Object(f.a)((function(e){return Object(y.a)({root:{width:"100%",marginBottom:e.spacing(2)}})}));function ee(){var e=Q(),t=Object(a.useContext)(J),n=t.isLoading,r=t.latestUserVersionExact,c=Object(a.useState)(!0),i=Object(s.a)(c,2),o=i[0],l=i[1],u=W.SUPPORTED_BEE_VERSION_EXACT===r;return n||!r?null:Object(h.jsx)(B.a,{in:!u&&o,children:Object(h.jsx)("div",{className:e.root,children:Object(h.jsxs)(w.a,{severity:"warning",action:Object(h.jsx)(S.a,{"aria-label":"close",color:"inherit",size:"small",onClick:function(){l(!1)},children:Object(h.jsx)(A.a,{fontSize:"inherit"})}),children:[Object(h.jsx)(k.a,{children:"Warning"}),"Your Bee node version (",Object(h.jsx)("code",{children:r}),") does not exactly match the Bee version we tested the Bee Dashboard against (",Object(h.jsx)("code",{children:W.SUPPORTED_BEE_VERSION_EXACT}),"). Please note that some functionality may not work properly."]})})})}var te=n(596),ne=n(597),ae=n(585),re=n(587),ce=n(526),ie=n(588),se=n(589),oe=n(590),le=n(591),ue=n(592),de=n(579),je=n(580),be=n(581),he=n(582),pe=n(583),xe=n(584),Oe=n.p+"static/media/swarm-logo-orange.f09e1111.svg",me=240,ge=[{label:"Status",id:"status",path:"/",icon:de.a},{label:"Files",id:"files",path:"/files/",icon:je.a},{label:"Stamps",id:"stamps",path:"/stamps/",icon:be.a},{label:"Accounting",id:"accounting",path:"/accounting/",icon:he.a},{label:"Peers",id:"peers",path:"/peers/",icon:pe.a},{label:"Settings",id:"settings",path:"/settings/",icon:xe.a}],ve=Object(f.a)((function(e){return Object(y.a)({root:{display:"flex"},appBar:{width:"calc(100% - ".concat(me,"px)"),marginLeft:me},logo:{padding:1,marginTop:20},drawer:{width:me,flexShrink:0},drawerPaper:{width:me},activeSideBar:{color:"#dd7700"},activeSideBarItem:{borderLeft:"4px solid #dd7700",backgroundColor:"inherit !important"},toolbar:e.mixins.toolbar})}));function fe(e){var t,n=ve();return Object(h.jsx)("div",{className:n.root,children:Object(h.jsxs)(ae.a,{className:n.drawer,variant:"permanent",classes:{paper:n.drawerPaper},anchor:"left",children:[Object(h.jsx)("div",{className:n.toolbar,style:{textAlign:"left",marginLeft:20},children:Object(h.jsx)(o.b,{to:"/",children:Object(h.jsx)("img",{alt:"swarm",className:n.logo,src:(e.themeMode,Oe),style:{maxHeight:"30px",alignItems:"center"}})})}),Object(h.jsx)(re.a,{children:ge.map((function(t){return Object(h.jsx)(o.b,{to:t.path,style:{color:"inherit",textDecoration:"none"},children:Object(h.jsxs)(ce.a,{button:!0,selected:e.location.pathname===t.path,className:e.location.pathname===t.path?n.activeSideBarItem:"",children:[Object(h.jsx)(ie.a,{className:e.location.pathname===t.path?n.activeSideBar:"",children:Object(h.jsx)(t.icon,{style:{height:"20px"}})}),Object(h.jsx)(se.a,{primary:t.label,className:e.location.pathname===t.path?n.activeSideBar:""})]})},t.id)}))}),Object(h.jsx)(oe.a,{}),Object(h.jsx)(re.a,{children:Object(h.jsx)(le.a,{href:"https://docs.ethswarm.org/docs/",target:"_blank",style:{textDecoration:"none"},children:Object(h.jsxs)(ce.a,{button:!0,children:[Object(h.jsx)(se.a,{primary:"Docs"}),Object(h.jsx)(ue.a,{fontSize:"small"})]})})}),Object(h.jsx)("div",{style:{position:"fixed",bottom:0,width:"inherit",padding:"10px"},children:Object(h.jsxs)(ce.a,{children:[Object(h.jsxs)("div",{style:{marginRight:"30px"},children:[Object(h.jsx)("div",{style:{backgroundColor:e.health?"#32c48d":"#c9201f",marginRight:"7px",height:"10px",width:"10px",borderRadius:"50%",display:"inline-block"}}),Object(h.jsx)("span",{children:"API"})]}),Object(h.jsxs)("div",{children:[Object(h.jsx)("div",{style:{backgroundColor:"ok"===(null===(t=e.nodeHealth)||void 0===t?void 0:t.status)?"#32c48d":"#c9201f",marginRight:"7px",height:"10px",width:"10px",borderRadius:"50%",display:"inline-block"}}),Object(h.jsx)("span",{children:"Debug API"})]})]})})]})})}var ye=n(593),we=n(594),ke=n(595),Be=Object(f.a)((function(){return Object(y.a)({appBar:{width:"calc(100% - ".concat(240,"px)"),marginLeft:240}})}));function Se(e){var t=Object(a.useState)(!1),n=Object(s.a)(t,2),r=n[0],c=n[1],i=Be();return Object(h.jsx)("div",{children:Object(h.jsx)("div",{style:{display:"fixed"},className:i.appBar,children:Object(h.jsx)(ye.a,{style:{display:"flex"},children:Object(h.jsx)("div",{style:{width:"100%"},children:Object(h.jsx)("div",{style:{float:"right"},children:Object(h.jsx)(S.a,{style:{marginRight:"10px"},"aria-label":"dark-mode",onClick:function(){return function(){var e=localStorage.getItem("theme");e?localStorage.setItem("theme","light"===e?"dark":"light"):localStorage.setItem("theme",r?"dark":"light"),c(!r),window.location.reload()}()},children:"dark"===e.themeMode?Object(h.jsx)(we.a,{}):Object(h.jsx)(ke.a,{})})})})})})})}var Ce=Object(f.a)((function(e){return Object(y.a)({content:{marginLeft:"240px",flexGrow:1,backgroundColor:e.palette.background.default,padding:e.spacing(3),paddingBottom:"65px"}})})),Ae=function(e){var t=Ce(),n=Object(a.useState)("light"),r=Object(s.a)(n,2),c=r[0],i=r[1],o=Object(a.useContext)(J),l=o.isLoading,u=o.apiHealth,d=o.debugApiHealth;return Object(a.useEffect)((function(){var e,t,n,a;return localStorage.getItem("theme")?i(String(localStorage.getItem("theme"))):(null===(e=window)||void 0===e||null===(t=e.matchMedia("(prefers-color-scheme: dark)"))||void 0===t?void 0:t.matches)&&i("dark"),null===(n=window)||void 0===n||null===(a=n.matchMedia("(prefers-color-scheme: dark)"))||void 0===a||a.addEventListener("change",(function(e){i((null===e||void 0===e?void 0:e.matches)?"dark":"light")})),function(){var e,t;return null===(e=window)||void 0===e||null===(t=e.matchMedia("(prefers-color-scheme: dark)"))||void 0===t?void 0:t.removeEventListener("change",(function(e){i((null===e||void 0===e?void 0:e.matches)?"dark":"light")}))}}),[]),Object(h.jsxs)("div",{children:[Object(h.jsx)(fe,Object(b.a)(Object(b.a)({},e),{},{themeMode:c,health:u,nodeHealth:d})),Object(h.jsx)(Se,{themeMode:c}),Object(h.jsx)(v,{children:Object(h.jsxs)("main",{className:t.content,children:[Object(h.jsx)(ee,{}),l?Object(h.jsx)(te.a,{style:{textAlign:"center",padding:"50px"},children:Object(h.jsx)(ne.a,{})}):e.children]})})]})},Ne=n(152),Pe=n(71),Ie=n(641),De=n(612),Le=n(533),Ee=n(616),Te=n(618),Ue=n(600),Re=n(613),qe=n(614),Fe=n(615),Ve=n(617),Me=n(603),ze=n(640),We=n(602),_e=n(604),Ze=n(598);function He(e){var t=Object(a.useState)(!1),n=Object(s.a)(t,2),r=n[0],c=n[1],i=Object(a.useState)(""),o=Object(s.a)(i,2),l=o[0],u=o[1];return Object(h.jsx)("div",{children:r?Object(h.jsxs)("div",{style:{display:"flex"},children:[Object(h.jsx)(Ze.a,{defaultValue:e.defaultHost,label:"Enter host",variant:"outlined",size:"small",onChange:function(e){return u(e.target.value)},style:{marginRight:"15px",minWidth:"300px"}}),Object(h.jsx)(Ue.a,{onClick:function(){l&&(e.setHost(l),c(!r))},size:"small",variant:"outlined",children:"Connect"}),Object(h.jsx)(Ue.a,{style:{marginLeft:"7px"},onClick:function(){return c(!r)},size:"small",children:"Cancel"})]}):Object(h.jsx)(Ue.a,{onClick:function(){return c(!r)},size:"small",variant:"outlined",children:"Change host"})})}var Ye=n(211),Ge=n(637),Ke=n(601),Je=n(636);function Xe(e){var t=e.children,n=e.value,a=e.index,r=Object(Ye.a)(e,["children","value","index"]);return Object(h.jsx)("div",Object(b.a)(Object(b.a)({role:"tabpanel",hidden:n!==a},r),{},{children:n===a&&Object(h.jsx)(Je.a,{p:3,children:Object(h.jsx)(Pe.a,{children:t})})}))}var $e=Object(f.a)((function(){return{root:{flexGrow:1}}}));function Qe(e){var t=e.values,n=e.index,a=e.indexChanged,c=$e(),i=r.a.useState(n||0),o=Object(s.a)(i,2),l=o[0],u=o[1],d=void 0!==n?n:l;return Object(h.jsxs)("div",{className:c.root,children:[Object(h.jsx)(Ge.a,{value:d,onChange:function(e,t){a?a(t):u(t)},children:t.map((function(e,t){var n=e.label;return Object(h.jsx)(Ke.a,{label:n},t)}))}),t.map((function(e,t){var n=e.component;return Object(h.jsx)(Xe,{value:d,index:t,children:n},t)}))]})}var et,tt,nt=n(639),at=function(e){return Object(h.jsx)("div",{style:{textAlign:"left"},children:Object(h.jsx)(nt.a,{language:e.language,showLineNumbers:e.showLineNumbers,children:e.code})})};!function(e){e[e.macOS=0]="macOS",e[e.Linux=1]="Linux",e[e.Windows=2]="Windows",e[e.iOS=3]="iOS",e[e.Android=4]="Android"}(et||(et={})),function(e){e[e.macOS=et.macOS]="macOS",e[e.Linux=et.Linux]="Linux"}(tt||(tt={}));var rt={platform:tt.macOS,setPlatform:function(){}},ct=Object(a.createContext)(rt);ct.Consumer;function it(e){var t=e.children,n=Object(a.useState)(tt.Linux),r=Object(s.a)(n,2),c=r[0],i=r[1];return Object(a.useEffect)((function(){var e=function(){var e=window.navigator.userAgent,t=window.navigator.platform;return["Macintosh","MacIntel","MacPPC","Mac68K"].includes(t)?et.macOS:["iPhone","iPad","iPod"].includes(t)?et.iOS:["Win32","Win64","Windows","WinCE"].includes(t)?et.Windows:/Android/.test(e)?et.Android:/Linux/.test(t)?et.Linux:null}();i(function(e){return Object.keys(tt).includes(e)}(e)?e:tt.Linux)}),[]),Object(h.jsx)(ct.Provider,{value:{platform:c,setPlatform:i},children:t})}function st(e){var t=Object(a.useContext)(ct),n=t.platform,r=t.setPlatform;return Object(h.jsx)(Qe,{index:n,indexChanged:r,values:[{label:"Linux",component:Object(h.jsx)(at,{showLineNumbers:e.showLineNumbers,language:"bash",code:e.linux})},{label:"macOS",component:Object(h.jsx)(at,{showLineNumbers:e.showLineNumbers,language:"bash",code:e.mac})}]})}function ot(e){var t=e.isOk,n=Object(a.useContext)(Z),r=n.setDebugApiUrl,c=n.apiDebugUrl,i=Object(h.jsxs)("div",{style:{display:"flex",marginTop:"25px",marginBottom:"25px"},children:[Object(h.jsxs)("span",{style:{marginRight:"15px"},children:["Debug API (",Object(h.jsx)(Pe.a,{variant:"button",children:c}),")"]}),Object(h.jsx)(He,{setHost:function(e){console.log(e),r(e)},defaultHost:c})]});return t?i:Object(h.jsxs)("div",{children:[i,Object(h.jsx)("div",{children:Object(h.jsxs)(Pe.a,{component:"div",variant:"body2",gutterBottom:!0,style:{margin:"15px"},children:["We cannot connect to your nodes debug API at ",Object(h.jsx)(Pe.a,{variant:"button",children:c}),". Please check the following to troubleshoot your issue.",Object(h.jsxs)(ze.a,{style:{marginTop:"20px"},children:[Object(h.jsx)(We.a,{expandIcon:Object(h.jsx)(Me.a,{}),"aria-controls":"panel1a-content",id:"panel1a-header",children:Object(h.jsx)(Pe.a,{children:"Troubleshoot"})}),Object(h.jsx)(_e.a,{children:Object(h.jsx)(Pe.a,{component:"div",children:Object(h.jsxs)("ol",{children:[Object(h.jsx)("li",{children:"Check the status of your node by running the below command to see if your node is running."}),Object(h.jsx)(st,{showLineNumbers:!0,linux:"sudo systemctl status bee",mac:"brew services list"}),Object(h.jsx)("li",{children:"If your node is running, check your firewall settings to make sure that port 1635 (or your custom specified port) is bound to localhost. If your node is not running try executing the below command to start your bee node"}),Object(h.jsx)(w.a,{style:{marginTop:"10px",marginBottom:"10px"},elevation:6,variant:"filled",severity:"error",children:'Your debug node API should never be completely open to the internet. If you want to connect remotely, make sure your firewall settings are set to only allow specific trusted IP addresses and block all other ports. A simple google search for "what is my ip" will show you your computers public IP address to allow.'}),Object(h.jsx)(st,{showLineNumbers:!0,linux:"sudo systemctl start bee",mac:"brew services start swarm-bee"}),Object(h.jsx)("li",{children:"Run the commands to validate your node is running and see the log output."}),Object(h.jsx)(st,{showLineNumbers:!0,linux:"sudo systemctl status bee \njournalctl --lines=100 --follow --unit bee",mac:"brew services list \ntail -f /usr/local/var/log/swarm-bee/bee.log"}),Object(h.jsxs)("li",{children:["Lastly, check your nodes configuration settings to validate the debug API is enabled and the Cross Origin Resource Sharing (CORS) setting is configured to allow your host. Config parameter"," ",Object(h.jsx)("strong",{children:"debug-api-enable"})," must be set to ",Object(h.jsx)("strong",{children:"true"})," and"," ",Object(h.jsx)("strong",{children:"cors-allowed-origins"})," must be set to your host domain or IP (you can also use the wildcard ",Object(h.jsx)("code",{children:"cors-allowed-origins: ['*']"}),"). If edits are made to the configuration run the restart command below for changes to take effect."]}),Object(h.jsx)(st,{showLineNumbers:!0,linux:"sudo vi /etc/bee/bee.yaml\nsudo systemctl restart bee",mac:"sudo vi /usr/local/etc/swarm-bee/bee.yaml \nbrew services restart swarm-bee"})]})})})]})]})})]})}function lt(e){var t=e.isOk,n=Object(a.useContext)(Z),r=n.setApiUrl,c=n.apiUrl;return Object(h.jsxs)("div",{children:[Object(h.jsxs)("div",{style:{display:"flex",marginBottom:"25px"},children:[Object(h.jsxs)("span",{style:{marginRight:"15px"},children:["Node API (",Object(h.jsx)(Pe.a,{variant:"button",children:c}),")"]}),Object(h.jsx)(He,{setHost:r,defaultHost:c})]}),Object(h.jsx)("div",{children:!t&&Object(h.jsxs)(Pe.a,{component:"div",variant:"body2",gutterBottom:!0,style:{margin:"15px"},children:["We cannot connect to your nodes API at ",Object(h.jsx)(Pe.a,{variant:"button",children:c}),". Please check the following to troubleshoot your issue.",Object(h.jsxs)(ze.a,{style:{marginTop:"20px"},children:[Object(h.jsx)(We.a,{expandIcon:Object(h.jsx)(Me.a,{}),"aria-controls":"panel1a-content",id:"panel1a-header",children:Object(h.jsx)(Pe.a,{children:"Troubleshoot"})}),Object(h.jsx)(_e.a,{children:Object(h.jsx)(Pe.a,{component:"div",children:Object(h.jsxs)("ol",{children:[Object(h.jsx)("li",{children:"Check the status of your node by running the below command to see if your node is running."}),Object(h.jsx)(st,{showLineNumbers:!0,linux:"sudo systemctl status bee",mac:"brew services list"}),Object(h.jsx)("li",{children:"If your node is running, check your firewall settings to make sure that port 1633 (or your custom specified port) is exposed to the internet. If your node is not running try executing the below command to start your bee node"}),Object(h.jsx)(st,{showLineNumbers:!0,linux:"sudo systemctl start bee",mac:"brew services start swarm-bee"}),Object(h.jsx)("li",{children:"Run the commands to validate your node is running and see the log output."}),Object(h.jsx)(st,{showLineNumbers:!0,linux:"sudo systemctl status bee \njournalctl --lines=100 --follow --unit bee",mac:"brew services list \ntail -f /usr/local/var/log/swarm-bee/bee.log"})]})})})]})]})})]})}function ut(e){var t=e.isOk,n=e.userVersion,a=e.latestVersion,r=e.latestUrl,c=Object(h.jsxs)("div",{style:{display:"flex"},children:[Object(h.jsxs)("div",{style:{marginRight:"30px"},children:[Object(h.jsx)("p",{children:Object(h.jsx)("span",{children:"User Version"})}),Object(h.jsx)(Pe.a,{component:"h5",variant:"h5",children:Object(h.jsx)("span",{children:n})})]}),Object(h.jsxs)("div",{children:[Object(h.jsx)("p",{children:Object(h.jsx)("span",{children:"Latest Version"})}),Object(h.jsx)(Pe.a,{component:"h5",variant:"h5",children:Object(h.jsx)("span",{children:a})})]})]});return t?Object(h.jsxs)(h.Fragment,{children:[Object(h.jsx)("span",{children:"You are running the latest version of Bee"}),c]}):Object(h.jsxs)(h.Fragment,{children:[Object(h.jsxs)("span",{children:["Your Bee version is out of date. Please update to the"," ",Object(h.jsx)("a",{href:r,rel:"noreferrer",target:"_blank",children:"latest"})," ","before continuing. Rerun the installation script below to upgrade. Reference the docs for help with updating."," ",Object(h.jsx)("a",{href:"https://docs.ethswarm.org/docs/installation/manual#upgrading-bee",rel:"noreferrer",target:"_blank",children:"Docs"})]}),Object(h.jsx)(st,{showLineNumbers:!0,linux:"bee version\nwget https://github.com/ethersphere/bee/releases/download/".concat(a,"/bee_").concat(a,"_amd64.deb\nsudo dpkg -i bee_").concat(a,"_amd64.deb"),mac:"bee version\nbrew tap ethersphere/tap\nbrew install swarm-bee\nbrew services start swarm-bee"}),c]})}var dt=n(191),jt=n.n(dt),bt=n(606),ht=n(607),pt=n(605);function xt(e){var t=Object(a.useState)(!1),n=Object(s.a)(t,2),r=n[0],c=n[1];return Object(h.jsxs)("div",{children:[Object(h.jsx)(S.a,{color:"primary",size:"small",onClick:function(){c(!0)},children:Object(h.jsx)(pt.a,{})}),Object(h.jsx)(bt.a,{onClose:function(){c(!1)},"aria-labelledby":"simple-dialog-title",open:r,children:Object(h.jsxs)("div",{style:{padding:"30px",textAlign:"center"},children:[Object(h.jsx)(ht.a,{id:"simple-dialog-title",children:e.label}),Object(h.jsx)(jt.a,{value:e.value,size:150,bgColor:"#ffffff",fgColor:"#000000",level:"L",includeMargin:!1,renderAs:"svg"})]})})]})}var Ot=n(192),mt=n(608);function gt(e){var t=e.value,n=Object(d.b)().enqueueSnackbar;return Object(h.jsx)("div",{style:{marginRight:"3px",marginLeft:"3px"},children:Object(h.jsx)(S.a,{color:"primary",size:"small",onClick:function(){return n("Copied: ".concat(t),{variant:"success"})},children:Object(h.jsx)(Ot.CopyToClipboard,{text:t,children:Object(h.jsx)(mt.a,{style:{height:"20px"}})})})})}var vt=n(193),ft=n.n(vt);function yt(e){return Object(h.jsx)(Pe.a,{component:"div",variant:"subtitle1",children:e.address?Object(h.jsxs)("div",{style:{display:"flex"},children:[e.hideBlockie?null:Object(h.jsx)("div",{style:{paddingTop:"5px",marginRight:"10px"},children:Object(h.jsx)(ft.a,{size:20,string:e.address})}),Object(h.jsx)("div",{children:Object(h.jsx)("a",{style:e.truncate?{marginRight:"7px",maxWidth:"200px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"block"}:{marginRight:"7px"},href:"".concat("https://blockscout.com/xdai/mainnet","/").concat(e.transaction?"tx":"address","/").concat(e.address),target:"_blank",rel:"noreferrer",children:e.address})}),Object(h.jsx)(xt,{value:e.address,label:"Ethereum Address"}),Object(h.jsx)(gt,{value:e.address})]}):"-"})}function wt(e){var t=e.isOk,n=e.nodeAddresses;return t?Object(h.jsxs)("div",{children:[Object(h.jsx)(Pe.a,{variant:"subtitle1",gutterBottom:!0,children:"Node Address"}),Object(h.jsx)(yt,{address:null===n||void 0===n?void 0:n.ethereum})]}):Object(h.jsxs)("p",{children:["Your Bee node must have access to the xDai blockchain, so that it can interact and deploy your chequebook contract. You can run"," ",Object(h.jsx)("a",{href:"https://www.xdaichain.com/",rel:"noreferrer",target:"_blank",children:"your own xDai node"}),", or use a provider instead - we recommend"," ",Object(h.jsx)("a",{href:"https://getblock.io/",rel:"noreferrer",target:"_blank",children:"Getblock"}),". By default, Bee expects a local node at http://localhost:8545. To use a provider instead, simply change the"," ",Object(h.jsx)("strong",{children:"swap-endpoint"})," in your configuration file."]})}var kt=n(527),Bt=n(611),St=n(609),Ct=n(610),At=n(530);function Nt(e){var t=e.successMessage,n=e.errorMessage,r=e.dialogMessage,c=e.min,i=e.max,o=e.label,l=e.action,u=Object(a.useState)(!1),j=Object(s.a)(u,2),b=j[0],p=j[1],x=Object(a.useState)(""),O=Object(s.a)(x,2),m=O[0],g=O[1],v=Object(a.useState)(null),f=Object(s.a)(v,2),y=f[0],w=f[1],k=Object(a.useState)(null),B=Object(s.a)(k,2),S=B[0],C=B[1],A=Object(d.b)().enqueueSnackbar,N=function(){p(!1)},D=function(){var e=Object(I.a)(P.a.mark((function e(){var a;return P.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!==y){e.next=2;break}return e.abrupt("return");case 2:return e.prev=2,e.next=5,l(y.toBigInt);case 5:a=e.sent,p(!1),A("".concat(t," Transaction ").concat(a),{variant:"success"}),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(2),A("".concat(n," Error: ").concat(e.t0.message),{variant:"error"});case 13:case"end":return e.stop()}}),e,null,[[2,10]])})));return function(){return e.apply(this,arguments)}}();return Object(h.jsxs)("div",{children:[Object(h.jsx)(Ue.a,{variant:"outlined",color:"primary",onClick:function(){p(!0)},children:o}),Object(h.jsxs)(bt.a,{open:b,onClose:N,"aria-labelledby":"form-dialog-title",children:[Object(h.jsx)(ht.a,{id:"form-dialog-title",children:o}),Object(h.jsxs)(St.a,{children:[Object(h.jsx)(Ct.a,{children:r}),Object(h.jsx)(kt.a,{autoFocus:!0,margin:"dense",id:"name",type:"text",placeholder:"Amount",fullWidth:!0,value:m,onChange:function(e){var t=e.target.value;g(t),C(null);try{var n=F.fromDecimal(t);w(n),c&&n.toDecimal.isLessThan(c)&&C(new Error("Needs to be more than ".concat(c))),i&&n.toDecimal.isGreaterThan(i)&&C(new Error("Needs to be less than ".concat(i)))}catch(e){C(e)}}}),S&&Object(h.jsxs)(At.a,{error:!0,children:["Please provide valid BZZ amount (max 16 decimals). Error: ",S.message]})]}),Object(h.jsxs)(Bt.a,{children:[Object(h.jsx)(Ue.a,{onClick:N,color:"primary",children:"Cancel"}),Object(h.jsx)(Ue.a,{onClick:D,color:"primary",children:o})]})]})]})}function Pt(){var e=Object(a.useContext)(Z).beeDebugApi;return Object(h.jsx)(Nt,{successMessage:"Successful deposit.",errorMessage:"Error with depositing",dialogMessage:"Specify the amount of BZZ you would like to withdraw from your node.",label:"Deposit",min:new D.BigNumber(0),action:function(t){if(!e)throw new Error("Bee Debug URL is not valid");return e.depositTokens(t.toString())}})}var It=function(e){var t=e.chequebookAddress,n=e.isOk;return Object(h.jsxs)("div",{children:[Object(h.jsx)("p",{style:{marginBottom:"20px",display:"flex"},children:t&&Object(h.jsx)(Pt,{})}),Object(h.jsx)("div",{style:{marginBottom:"10px"},children:!n&&Object(h.jsx)("div",{children:Object(h.jsxs)("span",{children:["Your chequebook is either not deployed or funded. To run the node you will need xDAI and xBZZ on the xDai network. You may need to aquire BZZ through (e.g. ",Object(h.jsx)("a",{href:"https://bzz.exchange/",children:"bzz.exchange"}),") and bridge it to the xDai network through the ",Object(h.jsx)("a",{href:"https://omni.xdaichain.com/bridge",children:"omni bridge"}),". To pay the transaction fees, you will also need xDAI token. You can purchase DAI on the network and bridge it to xDai network through the ",Object(h.jsx)("a",{href:"https://bridge.xdaichain.com/",children:"xDai Bridge"}),". See the"," ",Object(h.jsx)("a",{href:"https://www.xdaichain.com/#xdai-stable-chain",children:"official xDai website"})," for more information."]})})}),Object(h.jsx)(Pe.a,{variant:"subtitle1",gutterBottom:!0,children:"Chequebook Address"}),Object(h.jsx)(yt,{address:t})]})};function Dt(e){var t=e.isOk,n=e.topology,a=Object(h.jsxs)("div",{style:{display:"flex",marginTop:"15px"},children:[Object(h.jsxs)("div",{style:{marginRight:"30px"},children:[Object(h.jsx)(Pe.a,{component:"div",variant:"subtitle1",gutterBottom:!0,color:"textSecondary",children:Object(h.jsx)("span",{children:"Connected Peers"})}),Object(h.jsx)(Pe.a,{component:"h2",variant:"h5",children:(null===n||void 0===n?void 0:n.connected)?n.connected:"-"})]}),Object(h.jsxs)("div",{children:[Object(h.jsx)(Pe.a,{component:"div",variant:"subtitle1",gutterBottom:!0,color:"textSecondary",children:Object(h.jsx)("span",{children:"Discovered Nodes"})}),Object(h.jsx)(Pe.a,{component:"h2",variant:"h5",children:(null===n||void 0===n?void 0:n.population)?n.population:"-"})]})]});return t?Object(h.jsxs)(h.Fragment,{children:[Object(h.jsx)("span",{children:"You are connected to peers!"}),a]}):Object(h.jsxs)(h.Fragment,{children:[Object(h.jsx)("span",{children:"Your node is not connected to any peers"}),a]})}var Lt=Object(f.a)((function(e){return Object(y.a)({root:{padding:e.spacing(2),width:"100%"},button:{marginTop:e.spacing(1),marginRight:e.spacing(1)},actionsContainer:{margin:e.spacing(2)}})}));function Et(){var e=Lt(),t=Object(a.useState)(-1),n=Object(s.a)(t,2),r=n[0],c=n[1],i=Object(a.useContext)(J),o=i.status,l=i.isLoading,u=i.latestUserVersion,d=i.latestPublishedVersion,j=i.isLatestBeeVersion,b=i.latestBeeVersionUrl,p=i.topology,x=i.nodeAddresses,O=i.chequebookAddress,m=[{label:"Connected to Node DebugAPI",isOk:o.debugApiConnection,component:Object(h.jsx)(ot,{isOk:o.debugApiConnection})},{label:"Running latest Bee version",isOk:o.version,component:Object(h.jsx)(ut,{isOk:o.version,isLatestBeeVersion:j,userVersion:u,latestVersion:d,latestUrl:b})},{label:"Connected to xDai Blockchain",isOk:o.blockchainConnection,component:Object(h.jsx)(wt,{isOk:o.blockchainConnection,nodeAddresses:x})},{label:"Deployed and Funded Chequebook",isOk:o.chequebook,component:Object(h.jsx)(It,{chequebookAddress:null===O||void 0===O?void 0:O.chequebookAddress,isOk:o.chequebook})},{label:"Connected to Node API",isOk:o.apiConnection,component:Object(h.jsx)(lt,{isOk:o.apiConnection})},{label:"Connected to Peers",isOk:o.topology,component:Object(h.jsx)(Dt,{isOk:o.topology,topology:p})}];Object(a.useEffect)((function(){if(!(r>=0&&r<m.length)&&l)for(var e=0;e<m.length;++e)if(!m[e].isOk)return void c(e)}),[m]);var g=function(){c((function(e){return e+1}))},v=function(){c((function(e){return e-1}))};return Object(h.jsxs)(Ne.a,{className:e.root,children:[Object(h.jsx)(Pe.a,{variant:"h5",gutterBottom:!0,children:"Node Setup"}),Object(h.jsx)(Ie.a,{nonLinear:!0,activeStep:r,orientation:"vertical",children:m.map((function(t,n){var a=t.label,i=t.isOk,s=t.component;return Object(h.jsxs)(De.a,{children:[Object(h.jsx)(Le.a,{onClick:function(){return c(n===r?m.length:n)},StepIconComponent:function(){return l?Object(h.jsx)(Re.a,{style:{height:"25px",cursor:"pointer"}}):i?Object(h.jsx)(qe.a,{style:{color:"#32c48d",height:"25px",cursor:"pointer"}}):Object(h.jsx)(Fe.a,{style:{color:"#c9201f",height:"25px",cursor:"pointer"}})},children:Object(h.jsx)(Ee.a,{disabled:l,onClick:function(){return c(n===r?m.length:n)},style:{justifyContent:"space-between"},children:Object(h.jsxs)("div",{style:{display:"flex"},children:[Object(h.jsx)("div",{style:{marginTop:"5px"},children:a}),Object(h.jsx)("div",{style:{marginLeft:"12px"},children:n===r?Object(h.jsx)(Ve.a,{}):Object(h.jsx)(Me.a,{})})]})})}),Object(h.jsxs)(Te.a,{children:[Object(h.jsx)(Pe.a,{component:"div",children:s}),Object(h.jsx)("div",{className:e.actionsContainer,children:Object(h.jsxs)("div",{children:[Object(h.jsx)(Ue.a,{disabled:0===r,onClick:v,className:e.button,children:"Back"}),Object(h.jsx)(Ue.a,{variant:"contained",color:"primary",onClick:g,className:e.button,children:n<m.length-1?"Next":"Finish"})]})})]})]},a)}))})]})}var Tt=n(619),Ut=n(620),Rt=n(642),qt=n(621),Ft=n(622),Vt=Object(f.a)((function(){return Object(y.a)({root:{display:"flex",flex:"1 1 auto",flexDirection:"column"},status:{color:"#2145a0",backgroundColor:"#e1effe"}})}));var Mt=function(e){var t=e.userBeeVersion,n=e.nodeAddresses,r=e.nodeTopology,c=e.isOk,i=e.isLatestBeeVersion,l=e.latestUrl,u=Vt(),d=Object(a.useState)(!1),j=Object(s.a)(d,2),b=j[0],p=j[1];return Object(h.jsx)(Tt.a,{children:Object(h.jsxs)(Ut.a,{className:u.root,children:[Object(h.jsxs)(Pe.a,{component:"h5",variant:"h5",style:{display:"flex",justifyContent:"space-between"},children:[c&&Object(h.jsxs)("div",{children:[Object(h.jsx)(qe.a,{style:{color:"#32c48d",marginRight:"7px"}}),Object(h.jsx)("span",{children:"Your Bee node is running as expected"})]}),!c&&Object(h.jsxs)("div",{children:[Object(h.jsx)(Fe.a,{style:{color:"#c9201f",marginRight:"7px"}}),Object(h.jsx)("span",{children:"Could not connect to Bee Node"})]})]}),c&&Object(h.jsxs)(h.Fragment,{children:[Object(h.jsxs)("div",{style:{marginBottom:"20px"},children:[Object(h.jsxs)("span",{style:{marginRight:"20px"},children:["Discovered Nodes: ",null===r||void 0===r?void 0:r.population]}),Object(h.jsxs)("span",{style:{marginRight:"20px"},children:[Object(h.jsx)("span",{children:"Connected Peers: "}),Object(h.jsx)(o.b,{to:"/peers/",children:null===r||void 0===r?void 0:r.connected})]})]}),Object(h.jsxs)("div",{children:[Object(h.jsxs)(Pe.a,{component:"div",variant:"subtitle2",gutterBottom:!0,children:[Object(h.jsx)("span",{children:"AGENT: "}),Object(h.jsx)("a",{href:"https://github.com/ethersphere/bee",rel:"noreferrer",target:"_blank",children:"Bee"})," ",Object(h.jsx)("span",{children:t||"-"}),i?Object(h.jsx)(Rt.a,{style:{marginLeft:"7px",color:"#2145a0"},size:"small",label:"latest",className:u.status}):Object(h.jsx)(Ue.a,{size:"small",variant:"outlined",href:l,children:"update"})]}),Object(h.jsxs)(Pe.a,{component:"div",variant:"subtitle2",gutterBottom:!0,children:[Object(h.jsx)("span",{children:"PUBLIC KEY: "}),Object(h.jsx)("span",{children:(null===n||void 0===n?void 0:n.publicKey)?n.publicKey:"-"})]}),Object(h.jsxs)(Pe.a,{component:"div",variant:"subtitle2",gutterBottom:!0,children:[Object(h.jsx)("span",{children:"PSS PUBLIC KEY: "}),Object(h.jsx)("span",{children:(null===n||void 0===n?void 0:n.pssPublicKey)?n.pssPublicKey:"-"})]}),Object(h.jsxs)(Pe.a,{component:"div",variant:"subtitle2",gutterBottom:!0,children:[Object(h.jsx)("span",{children:"OVERLAY ADDRESS (PEER ID): "}),Object(h.jsx)("span",{children:(null===n||void 0===n?void 0:n.overlay)?n.overlay:"-"})]}),Object(h.jsxs)(Pe.a,{component:"div",variant:"subtitle2",gutterBottom:!0,children:[Object(h.jsx)(Pe.a,{component:"div",onClick:function(){return p(!b)},children:Object(h.jsxs)(Ue.a,{color:"primary",style:{padding:0,marginTop:"6px"},children:[b?Object(h.jsx)(qt.a,{style:{fontSize:"12px"}}):Object(h.jsx)(Ft.a,{style:{fontSize:"12px"}}),Object(h.jsx)("span",{children:"Underlay Addresses"})]})}),b&&Object(h.jsx)("div",{children:null===n||void 0===n?void 0:n.underlay.map((function(e){return Object(h.jsx)("li",{children:e},e)}))})]})]})]})]})})},zt=Object(f.a)((function(){return Object(y.a)({root:{display:"flex",alignItems:"center",justifyContent:"space-around",flexWrap:"wrap"},details:{display:"flex",flexDirection:"column"},content:{flex:"1 0 auto"}})}));var Wt=function(e){var t,n,a=zt();return Object(h.jsxs)(Tt.a,{className:a.root,children:[Object(h.jsx)("div",{className:a.details,children:Object(h.jsxs)(Ut.a,{className:a.content,children:[Object(h.jsx)(Pe.a,{variant:"subtitle1",gutterBottom:!0,children:"Ethereum Address"}),Object(h.jsx)(yt,{address:null===(t=e.nodeAddresses)||void 0===t?void 0:t.ethereum})]})}),Object(h.jsx)("div",{className:a.details,children:Object(h.jsxs)(Ut.a,{className:a.content,children:[Object(h.jsx)(Pe.a,{variant:"subtitle1",gutterBottom:!0,children:"Chequebook Contract Address"}),Object(h.jsx)(yt,{address:null===(n=e.chequebookAddress)||void 0===n?void 0:n.chequebookAddress})]})})]})},_t=Object(f.a)((function(e){return Object(y.a)({root:{width:"100%",display:"grid",rowGap:e.spacing(3)}})}));function Zt(){var e=_t(),t=Object(a.useContext)(J),n=t.status,r=t.latestUserVersion,c=t.isLatestBeeVersion,i=t.latestBeeVersionUrl,s=t.topology,o=t.nodeAddresses,l=t.chequebookAddress;return Object(h.jsxs)("div",{className:e.root,children:[Object(h.jsx)(Mt,{userBeeVersion:r,isLatestBeeVersion:c,isOk:n.all,nodeTopology:s,latestUrl:i,nodeAddresses:o}),o&&l&&Object(h.jsx)(Wt,{nodeAddresses:o,chequebookAddress:l}),Object(h.jsx)(Et,{})]})}var Ht=Object(f.a)({root:{flexGrow:1,marginTop:"20px"},title:{textAlign:"center",fontSize:26}});function Yt(){var e=Ht();return Object(h.jsx)(Tt.a,{className:e.root,children:Object(h.jsxs)(Ut.a,{children:[Object(h.jsx)(Pe.a,{className:e.title,gutterBottom:!0,children:"Looks like your node is not connected"}),Object(h.jsx)("div",{style:{marginBottom:"20px",textAlign:"center"},children:Object(h.jsxs)("strong",{children:[Object(h.jsx)(o.b,{to:"/",children:"Click to run status checks"})," on your nodes connection or check out the"," ",Object(h.jsx)("a",{href:"https://docs.ethswarm.org/docs/",target:"_blank",rel:"noreferrer",children:"Swarm Bee Docs"})]})}),Object(h.jsx)("div",{style:{marginBottom:"20px",textAlign:"center"},children:Object(h.jsxs)("p",{style:{marginTop:"50px"},children:["Still not working? Drop us a message on the Ethereum Swarm"," ",Object(h.jsx)("a",{href:"https://discord.gg/eKr9XPv7",target:"_blank",rel:"noreferrer",children:"Discord"})]})})]})})}var Gt=n(220),Kt=n(623),Jt=Object(f.a)((function(e){return Object(y.a)({root:{padding:e.spacing(.25),display:"flex",alignItems:"center"},input:{marginLeft:e.spacing(1),flex:1},iconButton:{padding:10},divider:{height:28,margin:4}})}));function Xt(){var e=Jt(),t=Object(a.useContext)(Z).apiUrl,n=Object(a.useState)(""),r=Object(s.a)(n,2),c=r[0],i=r[1],o=Object(a.useState)(null),l=Object(s.a)(o,2),u=l[0],d=l[1];return Object(h.jsxs)(h.Fragment,{children:[Object(h.jsxs)(Ne.a,{className:e.root,children:[Object(h.jsx)(Gt.a,{className:e.input,placeholder:"Enter swarm reference e.g. 0773a91efd6547c754fc1d95fb1c62c7d1b47f959c2caa685dfec8736da95c1c",inputProps:{"aria-label":"retrieve file from swarm"},value:c,onChange:function(e){i(e.target.value),W.Utils.Hex.isHexString(e.target.value,64)||W.Utils.Hex.isHexString(e.target.value,128)?d(null):d(new Error("Incorrect format of swarm hash"))}}),Object(h.jsx)(S.a,{href:"".concat(t,"/bzz/").concat(c),target:"_blank",disabled:null!==u||!c,className:e.iconButton,"aria-label":"download",children:Object(h.jsx)(Kt.a,{})})]}),u&&Object(h.jsx)(At.a,{error:!0,children:u.message})]})}var $t=n(643),Qt=n(207),en=Object(f.a)((function(e){return Object(y.a)({root:{width:"100%",marginTop:e.spacing(2),marginBottom:e.spacing(2)}})}));function tn(e){var t=en(),n=e.file.size>=1e8;return Object(h.jsx)(B.a,{in:n,children:Object(h.jsx)("div",{className:t.root,children:Object(h.jsxs)(w.a,{severity:"warning",children:[Object(h.jsx)(k.a,{children:"Warning"}),"The file you are trying to upload is above the recommended size. The chunks may not be synchronised properly over the network."]})})})}function nn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;return"".concat(e.substring(0,t),"...").concat(e.substring(e.length-n,e.length))}function an(e){var t=e.peerId,n=e.characterLength;return Object(h.jsx)(Pe.a,{variant:"button",style:{fontFamily:"monospace, monospace"},children:nn(t,n,n)})}var rn={stamps:null,error:null,isLoading:!1,lastUpdate:null,start:function(){},stop:function(){},refresh:function(){return Promise.reject()}},cn=Object(a.createContext)(rn);cn.Consumer;function sn(e){var t=e.depth,n=e.bucketDepth,a=e.utilization/Math.pow(2,t-n),r="".concat(Math.ceil(100*a),"%");return Object(b.a)(Object(b.a)({},e),{},{usage:a,usageText:r})}function on(e){var t=e.children,n=Object(a.useContext)(Z).beeApi,r=Object(a.useState)(rn.stamps),c=Object(s.a)(r,2),i=c[0],o=c[1],l=Object(a.useState)(rn.error),u=Object(s.a)(l,2),d=u[0],j=u[1],b=Object(a.useState)(rn.isLoading),p=Object(s.a)(b,2),x=p[0],O=p[1],m=Object(a.useState)(rn.lastUpdate),g=Object(s.a)(m,2),v=g[0],f=g[1],y=Object(a.useState)(null),w=Object(s.a)(y,2),k=w[0],B=w[1],S=function(){var e=Object(I.a)(P.a.mark((function e(){var t;return P.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!x){e.next=2;break}return e.abrupt("return");case 2:if(n){e.next=4;break}return e.abrupt("return");case 4:return e.prev=4,O(!0),e.next=8,n.getAllPostageBatch();case 8:t=e.sent,o(t.map(sn)),f(Date.now()),e.next=16;break;case 13:e.prev=13,e.t0=e.catch(4),j(e.t0);case 16:return e.prev=16,O(!1),e.finish(16);case 19:case"end":return e.stop()}}),e,null,[[4,13,16,19]])})));return function(){return e.apply(this,arguments)}}();return Object(a.useEffect)((function(){if(S(),k){var e=setInterval(S,k);return function(){return clearInterval(e)}}}),[k]),Object(h.jsx)(cn.Provider,{value:{stamps:i,error:d,isLoading:x,lastUpdate:v,start:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3e4;return B(e)},stop:function(){return B(null)},refresh:S},children:t})}var ln=n(49),un=n(128),dn={depth:"",amount:"",label:""},jn=Object(f.a)((function(e){return Object(y.a)({wrapper:{margin:e.spacing(1),position:"relative"},field:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},buttonProgress:{position:"absolute",top:"50%",left:"50%",marginTop:-12,marginBottom:-12}})}));function bn(e){var t=e.label,n=jn(),c=r.a.useState(!1),i=Object(s.a)(c,2),o=i[0],l=i[1],u=Object(a.useContext)(cn).refresh,j=Object(a.useContext)(Z).beeApi,b=function(){return l(!0)},p=function(){return l(!1)},x=Object(d.b)().enqueueSnackbar;return Object(h.jsx)(ln.c,{initialValues:dn,onSubmit:function(){var e=Object(I.a)(P.a.mark((function e(t,n){var a,r,c;return P.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,t.depth&&t.amount){e.next=3;break}return e.abrupt("return");case 3:if(j){e.next=5;break}return e.abrupt("return");case 5:return a=BigInt(t.amount),r=Number.parseInt(t.depth),c=t.label?{label:t.label}:void 0,e.next=10,j.createPostageBatch(a.toString(),r,c);case 10:return n.resetForm(),e.next=13,u();case 13:p(),e.next=20;break;case 16:e.prev=16,e.t0=e.catch(0),x("Error: ".concat(e.t0.message),{variant:"error"}),n.setSubmitting(!1);case 20:case"end":return e.stop()}}),e,null,[[0,16]])})));return function(t,n){return e.apply(this,arguments)}}(),validate:function(e){var t={};if(e.depth){var n=new L.a(e.depth);n.isInteger()?n.isLessThan(16)?t.depth="Minimal depth is 16":n.isGreaterThan(255)&&(t.depth="Depth has to be at most 255"):t.depth="Depth must be an integer"}else t.depth="Required field";if(e.amount){var a=new L.a(e.amount);a.isInteger()?a.isLessThanOrEqualTo(0)&&(t.amount="Amount must be greater than 0"):t.amount="Amount must be an integer"}else t.amount="Required field";return e.label&&!/^[0-9a-z]*$/i.test(e.label)&&(t.label="Label must be an alphanumeric string"),t},children:function(e){var a=e.submitForm,r=e.isValid,c=e.isSubmitting,i=e.values;return Object(h.jsxs)(ln.b,{children:[Object(h.jsxs)(Ue.a,{variant:"outlined",color:"primary",onClick:b,children:[t||"Buy Postage Stamp",c&&Object(h.jsx)(ne.a,{size:24,className:n.buttonProgress})]}),Object(h.jsxs)(bt.a,{open:o,onClose:p,"aria-labelledby":"form-dialog-title",children:[Object(h.jsx)(ht.a,{id:"form-dialog-title",children:"Purchase new postage stamp"}),Object(h.jsxs)(St.a,{children:[Object(h.jsxs)(Ct.a,{children:["Provide the depth, amount and optionally the label of the postage stamp. Please refer to the"," ",Object(h.jsx)("a",{href:"https://docs.ethswarm.org/docs/access-the-swarm/keep-your-data-alive",target:"blank",children:"official bee docs"})," ","to understand these values."]}),Object(h.jsx)(ln.a,{component:un.a,required:!0,name:"depth",autoFocus:!0,label:"Depth",fullWidth:!0,className:n.field}),Object(h.jsx)(ln.a,{component:un.a,required:!0,name:"amount",label:"Amount",fullWidth:!0,className:n.field}),Object(h.jsx)(ln.a,{component:un.a,name:"label",label:"Label",fullWidth:!0,className:n.field})]}),Object(h.jsxs)(Bt.a,{children:[Object(h.jsx)(Ue.a,{onClick:p,color:"primary",children:"Cancel"}),Object(h.jsx)("div",{className:n.wrapper,children:Object(h.jsxs)(Ue.a,{color:"primary",disabled:c||!r||!i.amount||!i.depth,type:"submit",variant:"contained",onClick:a,children:["Create",c&&Object(h.jsx)(ne.a,{size:24,className:n.buttonProgress})]})})]})]})]})}})}var hn=n(209),pn=n(625);function xn(e){var t=e.stamps,n=e.selectedStamp,a=e.setSelected,c=r.a.useState(null),i=Object(s.a)(c,2),o=i[0],l=i[1];if(!t)return null;var u=function(){return l(null)};return Object(h.jsxs)("div",{children:[Object(h.jsx)(Ue.a,{"aria-controls":"simple-menu","aria-haspopup":"true",onClick:function(e){l(e.currentTarget)},children:"Change"}),Object(h.jsx)(hn.a,{id:"simple-menu",anchorEl:o,keepMounted:!0,open:Boolean(o),onClose:u,children:t.map((function(e){return Object(h.jsxs)(pn.a,{onClick:function(){a(e),u()},selected:e.batchID===(null===n||void 0===n?void 0:n.batchID),children:[Object(h.jsx)(ie.a,{children:e.usageText}),Object(h.jsx)(an,{peerId:e.batchID})]},e.batchID)}))})]})}function On(){var e=Object(a.useState)(0),t=Object(s.a)(e,2),n=t[0],r=t[1],c=Object(a.useState)(null),i=Object(s.a)(c,2),o=i[0],l=i[1],u=Object(a.useState)(""),j=Object(s.a)(u,2),b=j[0],p=j[1],x=Object(a.useState)(!1),O=Object(s.a)(x,2),m=O[0],g=O[1],v=Object(a.useState)(null),f=Object(s.a)(v,2),y=f[0],w=f[1],k=Object(a.useContext)(cn),B=k.isLoading,S=k.error,C=k.stamps,A=Object(a.useContext)(Z).beeApi,N=Object(d.b)().enqueueSnackbar;Object(a.useEffect)((function(){if(!y&&C&&C.length>0){var e=C.reduce((function(e,t){return t.usage<e.usage?t:e}),C[0]);w(e)}}),[B,S,C,y]);return Object(h.jsx)("div",{children:Object(h.jsxs)("div",{children:[Object(h.jsx)(Qt.a,{onChange:function(e){e&&l(e[0])},filesLimit:1,maxFileSize:1e9},"dropzone-"+n),Object(h.jsxs)("div",{style:{marginTop:"15px"},children:[y&&Object(h.jsxs)("div",{style:{display:"flex"},children:[Object(h.jsxs)("small",{children:["with Postage Stamp"," ",Object(h.jsx)(Rt.a,{avatar:Object(h.jsx)($t.a,{children:y.usageText}),label:Object(h.jsx)(an,{peerId:y.batchID,characterLength:6}),deleteIcon:Object(h.jsx)(gt,{value:y.batchID}),onDelete:function(){},variant:"outlined"})]}),Object(h.jsx)(xn,{stamps:C,selectedStamp:y,setSelected:w})]}),!y&&Object(h.jsx)(bn,{}),Object(h.jsx)(Ue.a,{disabled:!o&&m&&!y,onClick:function(){null!==o&&null!==y&&A&&(g(!0),A.uploadFile(y.batchID,o).then((function(e){window.setTimeout((function(){l(null),p(e),r(n+1)}),0)})).catch((function(e){return N("Error uploading: ".concat(e.message),{variant:"error"})})).finally((function(){g(!1)})))},children:"Upload"}),o&&Object(h.jsx)(tn,{file:o}),m&&Object(h.jsx)(te.a,{style:{textAlign:"center",padding:"50px"},children:Object(h.jsx)(ne.a,{})}),b&&Object(h.jsxs)("div",{style:{marginBottom:"15px",display:"flex"},children:[Object(h.jsx)("span",{children:b}),Object(h.jsx)(gt,{value:b})]})]})]})})}function mn(){return Object(a.useContext)(J).status.all?Object(h.jsx)(te.a,{maxWidth:"sm",children:Object(h.jsx)(Qe,{values:[{label:"download",component:Object(h.jsx)(Xt,{})},{label:"upload",component:Object(h.jsx)(On,{})}]})}):Object(h.jsx)(Yt,{})}var gn=n(84),vn=n(626),fn=n(627),yn=n(628),wn=n(629),kn=n(630),Bn=n(631),Sn=n(644),Cn=Object(f.a)({table:{minWidth:650}});function An(e,t){var n,a,r;return(null===(n=e[t.address])||void 0===n?void 0:n.loading)?Object(h.jsx)(ne.a,{size:20}):(null===(a=e[t.address])||void 0===a?void 0:a.rtt)?Object(h.jsx)("span",{children:null===(r=e[t.address])||void 0===r?void 0:r.rtt}):Object(h.jsx)(Re.a,{})}var Nn=function(e){var t,n=Cn(),r=Object(a.useContext)(Z).beeDebugApi,c=Object(a.useState)({}),i=Object(s.a)(c,2),o=i[0],l=i[1];return Object(h.jsx)("div",{children:Object(h.jsx)(vn.a,{component:Ne.a,children:Object(h.jsxs)(fn.a,{className:n.table,children:[Object(h.jsx)(yn.a,{children:Object(h.jsxs)(wn.a,{children:[Object(h.jsx)(kn.a,{children:"Index"}),Object(h.jsx)(kn.a,{children:"Peer Id"}),Object(h.jsx)(kn.a,{align:"right",children:"Actions"})]})}),Object(h.jsx)(Bn.a,{children:null===(t=e.peers)||void 0===t?void 0:t.map((function(e,t){return Object(h.jsxs)(wn.a,{children:[Object(h.jsx)(kn.a,{component:"th",scope:"row",children:t+1}),Object(h.jsx)(kn.a,{children:e.address}),Object(h.jsx)(kn.a,{align:"right",children:Object(h.jsx)(Sn.a,{title:"Ping node",children:Object(h.jsx)(Ue.a,{color:"primary",onClick:function(){return t=e.address,l((function(e){return Object(b.a)(Object(b.a)({},e),{},Object(gn.a)({},t,{rtt:"",loading:!0}))})),void(null===r||void 0===r||r.pingPeer(t).then((function(e){l((function(n){return Object(b.a)(Object(b.a)({},n),{},Object(gn.a)({},t,{rtt:e.rtt,loading:!1}))}))})).catch((function(){l((function(e){return Object(b.a)(Object(b.a)({},e),{},Object(gn.a)({},t,{rtt:"error",loading:!1}))}))})));var t},children:An(o,e)})})})]},e.address)}))})]})})})},Pn=n(624),In=n(205),Dn=1e5,Ln="There may be issues with your Bee node or connection.",En={connectedPeers:[{minimumValue:200,explanation:"Perfect! ".concat(200," or more connected peers indicate a healthy topology."),score:2},{minimumValue:1,explanation:"Your Bee node is connected to peers, but this number should ideally be above ".concat(200,". If you have only started your Bee node, this number may increase quickly."),score:1},{minimumValue:0,explanation:"Your Bee node has not connected to any peers. "+Ln,score:0}],population:[{minimumValue:Dn,explanation:"Perfect! Your Bee node seems to have a realistic value for the network size, which means everything is working well on your end.",score:2},{minimumValue:1,explanation:"Population is usually above ".concat(Dn.toLocaleString(),". If the number does not increase within a few hours, there may be issues with your Bee node."),score:1},{minimumValue:0,explanation:"Your Bee node has no information on the network population. "+Ln,score:0}],depth:[{minimumValue:12,explanation:"Perfect! Your Bee node has the highest available depth.",score:2},{minimumValue:1,explanation:"Your Bee node is supposed to reach a depth of ".concat(12," eventually. Stagnation or decrease in this number may indicate problems with your Bee node."),score:1},{minimumValue:0,explanation:"Your Bee node has not started building its topology yet. "+Ln,score:0}]};function Tn(e,t){var n,a=En[e],r=a[0].score,c=Object(In.a)(a);try{for(c.s();!(n=c.n()).done;){var i=n.value;if(t>=i.minimumValue)return{score:i.score,maximumScore:r,explanation:i.explanation}}}catch(o){c.e(o)}finally{c.f()}var s=a[a.length-1];return{score:s.score,maximumScore:r,explanation:s.explanation}}var Un=n(633),Rn=n(632),qn=Object(f.a)({title:{fontSize:16}});function Fn(e){var t=e.label,n=e.tooltip,a=qn();return n?Object(h.jsx)(Sn.a,{title:n,children:Object(h.jsx)("span",{children:Object(h.jsxs)(Pn.a,{container:!0,direction:"row",justify:"space-between",children:[Object(h.jsx)(Pe.a,{className:a.title,color:"textSecondary",gutterBottom:!0,children:t}),Object(h.jsx)(Rn.a,{})]})})}):Object(h.jsx)(Pe.a,{className:a.title,color:"textSecondary",gutterBottom:!0,children:t})}var Vn=Object(f.a)({root:{minWidth:275}});function Mn(e){var t=e.loading,n=e.label,a=e.statistic,r=e.tooltip,c=Vn();return Object(h.jsx)(Tt.a,{className:c.root,children:Object(h.jsxs)(Ut.a,{children:[t&&Object(h.jsxs)(h.Fragment,{children:[Object(h.jsx)(Un.a,{width:180,height:25,animation:"wave"}),Object(h.jsx)(Un.a,{width:180,height:35,animation:"wave"})]}),!t&&Object(h.jsxs)(h.Fragment,{children:[Object(h.jsx)(Fn,{label:n,tooltip:r}),Object(h.jsx)(Pe.a,{variant:"h5",component:"h2",children:a})]})]})})}var zn=function(e){var t=e.thresholds,n=Object.values(t).reduce((function(e,t){return e+t.maximumScore}),0),a=Object.values(t).reduce((function(e,t){return e+t.score}),0),r=Math.round(a/n*100)+"%";return Object(h.jsx)("div",{style:{marginBottom:"20px"},children:Object(h.jsx)(Mn,{label:"Overall Health Indicator",statistic:r})})},Wn=function(e){var t=e.topology,n=e.thresholds;return Object(h.jsx)(Pn.a,{style:{marginBottom:"20px",flexGrow:1},children:Object(h.jsxs)(Pn.a,{container:!0,spacing:3,children:[Object(h.jsx)(Pn.a,{item:!0,xs:12,sm:12,md:6,lg:4,xl:4,children:Object(h.jsx)(Mn,{label:"Connected Peers",statistic:null===t||void 0===t?void 0:t.connected.toString(),tooltip:n.connectedPeers.explanation})},1),Object(h.jsx)(Pn.a,{item:!0,xs:12,sm:12,md:6,lg:4,xl:4,children:Object(h.jsx)(Mn,{label:"Population",statistic:null===t||void 0===t?void 0:t.population.toString(),tooltip:n.population.explanation})},2),Object(h.jsx)(Pn.a,{item:!0,xs:12,sm:12,md:6,lg:4,xl:4,children:Object(h.jsx)(Mn,{label:"Depth",statistic:null===t||void 0===t?void 0:t.depth.toString(),tooltip:n.depth.explanation})},3)]})})},_n=function(e){var t,n,a,r={connectedPeers:Tn("connectedPeers",(null===(t=e.topology)||void 0===t?void 0:t.connected)||0),population:Tn("population",(null===(n=e.topology)||void 0===n?void 0:n.population)||0),depth:Tn("depth",(null===(a=e.topology)||void 0===a?void 0:a.depth)||0)};return Object(h.jsxs)(h.Fragment,{children:[Object(h.jsx)(zn,Object(b.a)(Object(b.a)({},e),{},{thresholds:r})),Object(h.jsx)(Wn,Object(b.a)(Object(b.a)({},e),{},{thresholds:r}))]})};function Zn(){var e=Object(a.useContext)(J),t=e.topology,n=e.peers;return e.status.all?Object(h.jsxs)(h.Fragment,{children:[Object(h.jsx)(_n,{topology:t}),Object(h.jsx)(Nn,{peers:n})]}):Object(h.jsx)(Yt,{})}function Hn(){var e=Object(a.useContext)(Z).beeDebugApi;return Object(h.jsx)(Nt,{successMessage:"Successful withdrawl.",errorMessage:"Error with withdrawing.",dialogMessage:"Specify the amount of BZZ you would like to withdraw from your node.",label:"Withdraw",min:new D.BigNumber(0),action:function(t){if(!e)throw new Error("Bee Debug URL is not valid");return e.withdrawTokens(t.toString())}})}var Yn=Object(f.a)((function(e){return Object(y.a)({root:{display:"flex"},buttons:{display:"flex",columnGap:e.spacing(1)},gridContainer:{display:"flex",width:"100%",marginLeft:e.spacing(1),marginRight:e.spacing(1),columnGap:e.spacing(1),rowGap:e.spacing(1),flex:"0 1 auto",flexWrap:"wrap",justifyContent:"space-between"},chequebookActions:{justifyContent:"space-between",display:"flex",marginBottom:e.spacing(1)}})}));var Gn=function(e){var t=e.totalreceived,n=e.totalsent,a=e.chequebookBalance,r=Yn();return Object(h.jsxs)("div",{children:[Object(h.jsxs)("div",{className:r.chequebookActions,children:[Object(h.jsx)(Pe.a,{component:"h2",variant:"h6",children:"Chequebook"}),Object(h.jsxs)("div",{className:r.buttons,children:[Object(h.jsx)(Hn,{}),Object(h.jsx)(Pt,{})]})]}),Object(h.jsx)(Tt.a,{className:r.root,children:Object(h.jsxs)(Ut.a,{className:r.gridContainer,children:[Object(h.jsxs)("div",{children:[Object(h.jsx)(Pe.a,{component:"h2",variant:"h6",color:"primary",gutterBottom:!0,children:"Total Balance"}),Object(h.jsxs)(Pe.a,{variant:"h5",children:[null===a||void 0===a?void 0:a.totalBalance.toFixedDecimal()," BZZ"]})]}),Object(h.jsxs)("div",{children:[Object(h.jsx)(Pe.a,{component:"h2",variant:"h6",color:"primary",gutterBottom:!0,children:"Available Uncommitted Balance"}),Object(h.jsxs)(Pe.a,{variant:"h5",children:[null===a||void 0===a?void 0:a.availableBalance.toFixedDecimal()," BZZ"]})]}),Object(h.jsxs)("div",{children:[Object(h.jsx)(Pe.a,{component:"h2",variant:"h6",color:"primary",gutterBottom:!0,children:"Total Sent / Received"}),Object(h.jsxs)(Pe.a,{variant:"h5",children:[null===n||void 0===n?void 0:n.toFixedDecimal()," / ",null===t||void 0===t?void 0:t.toFixedDecimal()," BZZ"]})]})]})})]})};function Kn(e){var t=e.peerId,n=e.uncashedAmount,r=Object(a.useState)(!1),c=Object(s.a)(r,2),i=c[0],o=c[1],l=Object(a.useState)(!1),u=Object(s.a)(l,2),j=u[0],b=u[1],p=Object(d.b)().enqueueSnackbar,x=Object(a.useContext)(Z).beeDebugApi,O=function(){o(!1)};return Object(h.jsxs)("div",{children:[Object(h.jsx)(Ue.a,{variant:"contained",color:"primary",onClick:function(){o(!0)},style:{marginLeft:"7px"},children:"Cashout"}),Object(h.jsxs)(bt.a,{open:i,onClose:O,"aria-labelledby":"form-dialog-title",children:[Object(h.jsx)(ht.a,{id:"form-dialog-title",children:"Cashout Cheque"}),Object(h.jsx)(St.a,{children:Object(h.jsxs)(Ct.a,{style:{marginTop:"20px",overflowWrap:"break-word"},children:[j&&Object(h.jsxs)(h.Fragment,{children:[Object(h.jsxs)("span",{children:["Cashing out ",Object(h.jsx)("strong",{children:n})," from Peer ",Object(h.jsx)("strong",{children:t}),". Please wait..."]}),Object(h.jsx)(te.a,{style:{textAlign:"center",padding:"50px"},children:Object(h.jsx)(ne.a,{})})]}),!j&&Object(h.jsxs)("span",{children:["Are you sure you want to cashout ",Object(h.jsxs)("strong",{children:[n," BZZ"]})," from Peer"," ",Object(h.jsx)("strong",{children:t}),"?"]})]})}),Object(h.jsxs)(Bt.a,{children:[Object(h.jsx)(Ue.a,{onClick:O,color:"primary",children:"Cancel"}),Object(h.jsx)(Ue.a,{onClick:function(){x&&(t?(b(!0),x.cashoutLastCheque(t).then((function(e){o(!1),p(Object(h.jsxs)("span",{children:["Successfully cashed out cheque. Transaction",Object(h.jsx)(yt,{hideBlockie:!0,transaction:!0,address:e})]}),{variant:"success"})})).catch((function(e){p(Object(h.jsxs)("span",{children:["Error: ",e.message]}),{variant:"error"})})).finally((function(){b(!1)}))):p(Object(h.jsx)("span",{children:"Peer Id invalid"}),{variant:"error"}))},color:"primary",disabled:j,children:"Yes Cashout"})]})]})]})}var Jn=Object(f.a)({table:{minWidth:650},values:{textAlign:"right",fontFamily:"monospace, monospace"}});var Xn=function(e){var t=e.accounting,n=e.isLoadingUncashed;if(null===t)return null;var a=Jn();return Object(h.jsx)(vn.a,{component:Ne.a,children:Object(h.jsxs)(fn.a,{className:a.table,size:"small","aria-label":"Balances Table",children:[Object(h.jsx)(yn.a,{children:Object(h.jsxs)(wn.a,{children:[Object(h.jsx)(kn.a,{children:"Peer"}),Object(h.jsx)(kn.a,{align:"right",children:"Outstanding Balance"}),Object(h.jsx)(kn.a,{align:"right",children:"Settlements Sent / Received"}),Object(h.jsx)(kn.a,{align:"right",children:"Total"}),Object(h.jsx)(kn.a,{align:"right",children:"Uncashed Amount"}),Object(h.jsx)(kn.a,{})]})}),Object(h.jsx)(Bn.a,{children:t.map((function(e){var t=e.peer,r=e.balance,c=e.received,i=e.sent,s=e.uncashedAmount,o=e.total;return Object(h.jsxs)(wn.a,{children:[Object(h.jsx)(kn.a,{children:Object(h.jsxs)("div",{style:{display:"flex"},children:[Object(h.jsx)("small",{children:Object(h.jsx)(an,{peerId:t})}),Object(h.jsx)(gt,{value:t})]})}),Object(h.jsxs)(kn.a,{className:a.values,children:[Object(h.jsx)("span",{style:{color:r.toBigNumber.isPositive()?"#32c48d":"#c9201f"},children:r.toFixedDecimal()})," ","BZZ"]}),Object(h.jsxs)(kn.a,{className:a.values,children:["-",i.toFixedDecimal()," / ",c.toFixedDecimal()," BZZ"]}),Object(h.jsxs)(kn.a,{className:a.values,children:[Object(h.jsx)("span",{style:{color:o.toBigNumber.isPositive()?"#32c48d":"#c9201f"},children:o.toFixedDecimal()})," ","BZZ"]}),Object(h.jsxs)(kn.a,{className:a.values,children:[n&&"loading...",!n&&Object(h.jsxs)(h.Fragment,{children:[s.toBigNumber.isGreaterThan("0")?s.toFixedDecimal():"0"," BZZ"]})]}),Object(h.jsx)(kn.a,{className:a.values,children:s.toBigNumber.isGreaterThan("0")&&Object(h.jsx)(Kn,{uncashedAmount:s.toFixedDecimal(),peerId:t})})]},t)}))})]})})};var $n=function(e,t,n){var r=Object(a.useState)(!1),c=Object(s.a)(r,2),i=c[0],o=c[1],l=Object(a.useState)(void 0),u=Object(s.a)(l,2),d=u[0],j=u[1];Object(a.useEffect)((function(){if(!i&&e&&t&&!d){o(!0);var n=t.settlements.filter((function(e){return e.received.toBigNumber.gt("0")})).map((function(t){var n=t.peer;return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1e3;return new Promise(function(){var a=Object(I.a)(P.a.mark((function a(r,c){var i,s;return P.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:i=0;case 1:if(!(i<t)){a.next=21;break}return a.prev=2,a.next=5,e();case 5:return s=a.sent,r(s),a.abrupt("return");case 10:if(a.prev=10,a.t0=a.catch(2),!(i<t-1)){a.next=17;break}return a.next=15,U(n);case 15:a.next=18;break;case 17:c(a.t0);case 18:i++,a.next=1;break;case 21:case"end":return a.stop()}}),a,null,[[2,10]])})));return function(e,t){return a.apply(this,arguments)}}())}((function(){return e.getLastCashoutAction(n)}))}));Promise.allSettled(n).then((function(e){var t=function(e){var t,n={fulfilled:(t=e).filter((function(e){return"fulfilled"===e.status})),rejected:t.filter((function(e){return"rejected"===e.status}))};return{fulfilled:n.fulfilled.map((function(e){return e.value})),rejected:n.rejected.map((function(e){return e.reason?String(e.reason):"Unknown error"}))}}(e);j(t.fulfilled),o(!1)}))}}),[t,i,d]);var h=function(e,t,n){if(!e||!t)return null;var a={};return e.forEach((function(e){var t=e.peer,n=e.balance;return a[t]={peer:t,balance:n,sent:new F("0"),received:new F("0"),uncashedAmount:new F("0"),total:n}})),t.forEach((function(e){var t=e.peer,n=e.sent,r=e.received;return a[t]=Object(b.a)(Object(b.a)({},a[t]),{},{sent:n,received:r,total:new F(a[t].balance.toBigNumber.plus(r.toBigNumber).minus(n.toBigNumber))})})),n?(null===n||void 0===n||n.forEach((function(e){var t=e.peer,n=e.uncashedAmount;a[t].uncashedAmount=new F(n)})),Object.values(a).sort((function(e,t){return t.uncashedAmount.toBigNumber.minus(e.uncashedAmount.toBigNumber).toNumber()}))):Object.values(a)}(n,null===t||void 0===t?void 0:t.settlements,d);return{isLoadingUncashed:i,accounting:h}},Qn=Object(f.a)((function(e){return Object(y.a)({root:{width:"100%",display:"grid",rowGap:e.spacing(3)}})}));function ea(){var e=Qn(),t=Object(a.useContext)(J),n=t.status,r=t.nodeAddresses,c=t.chequebookAddress,i=t.chequebookBalance,s=t.settlements,o=t.peerBalances,l=Object(a.useContext)(Z).beeDebugApi,u=$n(l,s,o),d=u.accounting,j=u.isLoadingUncashed;return n.all?Object(h.jsxs)("div",{className:e.root,children:[Object(h.jsx)(Gn,{chequebookAddress:c,chequebookBalance:i,totalsent:null===s||void 0===s?void 0:s.totalSent,totalreceived:null===s||void 0===s?void 0:s.totalReceived}),Object(h.jsx)(Wt,{nodeAddresses:r,chequebookAddress:c}),Object(h.jsx)(Xn,{accounting:d,isLoadingUncashed:j})]}):Object(h.jsx)(Yt,{})}function ta(){var e=Object(a.useContext)(Z),t=e.apiUrl,n=e.apiDebugUrl,r=e.setApiUrl,c=e.setDebugApiUrl,i=Object(a.useState)(t),o=Object(s.a)(i,2),l=o[0],u=o[1],d=Object(a.useState)(n),j=Object(s.a)(d,2),b=j[0],p=j[1],x=l!==t||b!==n;return Object(h.jsx)("div",{children:Object(h.jsxs)(te.a,{children:[Object(h.jsx)(Pe.a,{variant:"h4",gutterBottom:!0,children:"Settings"}),Object(h.jsx)(Ne.a,{children:Object(h.jsx)(Ze.a,{label:"API Endpoint",style:{margin:0},placeholder:"ex: 127.0.0.0.1:1633",helperText:"Enter node host override / port",fullWidth:!0,defaultValue:t,margin:"normal",InputLabelProps:{shrink:!0},onChange:function(e){u(e.target.value)},variant:"filled"})}),Object(h.jsx)(Ne.a,{style:{marginTop:"20px"},children:Object(h.jsx)(Ze.a,{label:"Debug API Endpoint",style:{margin:0},placeholder:"ex: 127.0.0.0.1:1635",helperText:"Enter node debug host override / port",fullWidth:!0,defaultValue:n,onChange:function(e){p(e.target.value)},margin:"normal",InputLabelProps:{shrink:!0},variant:"filled"})}),x?Object(h.jsx)("div",{style:{marginTop:"20px"},children:Object(h.jsx)(Ue.a,{variant:"outlined",color:"primary",onClick:function(){l!==t&&r(l),b!==n&&c(b)},children:"Save"})}):null]})})}var na=Object(f.a)({table:{minWidth:650},values:{textAlign:"right",fontFamily:"monospace, monospace"}});var aa=function(e){var t=e.postageStamps;if(null===t)return null;var n=na();return Object(h.jsx)(vn.a,{component:Ne.a,children:Object(h.jsxs)(fn.a,{className:n.table,size:"small","aria-label":"Balances Table",children:[Object(h.jsx)(yn.a,{children:Object(h.jsxs)(wn.a,{children:[Object(h.jsx)(kn.a,{children:"Batch ID"}),Object(h.jsx)(kn.a,{align:"right",children:"Usage"})]})}),Object(h.jsx)(Bn.a,{children:t.map((function(e){var t=e.batchID,a=e.usageText;return Object(h.jsxs)(wn.a,{children:[Object(h.jsx)(kn.a,{children:Object(h.jsxs)("div",{style:{display:"flex"},children:[Object(h.jsx)("small",{children:Object(h.jsx)(an,{peerId:t})}),Object(h.jsx)(gt,{value:t})]})}),Object(h.jsx)(kn.a,{className:n.values,children:a})]},t)}))})]})})},ra=Object(f.a)((function(e){return Object(y.a)({root:{width:"100%",display:"grid",rowGap:e.spacing(2)},actions:{display:"flex",width:"100%",columnGap:e.spacing(1),rowGap:e.spacing(1),flex:"0 1 auto",flexWrap:"wrap",alignItems:"center"}})}));function ca(){var e=ra(),t=Object(a.useContext)(J),n=Object(a.useContext)(cn),r=n.stamps,c=n.isLoading,i=n.error,s=n.start,o=n.stop;return Object(a.useEffect)((function(){return s(),function(){return o()}}),[]),t.isLoading?Object(h.jsx)(te.a,{style:{textAlign:"center",padding:"50px"},children:Object(h.jsx)(ne.a,{})}):t.status.all?Object(h.jsxs)("div",{className:e.root,children:[i&&Object(h.jsxs)(te.a,{style:{textAlign:"center",padding:"50px"},children:["Error loading postage stamps details: ",i.message]}),!i&&Object(h.jsxs)(h.Fragment,{children:[Object(h.jsxs)("div",{className:e.actions,children:[Object(h.jsx)(bn,{}),Object(h.jsx)("div",{style:{height:"5px"},children:c&&Object(h.jsx)(ne.a,{})})]}),Object(h.jsx)(aa,{postageStamps:r})]})]}):Object(h.jsx)(Yt,{})}var ia=function(){return Object(h.jsxs)(j.c,{children:[Object(h.jsx)(p,{exact:!0,path:"/",layout:Ae,component:Zt}),Object(h.jsx)(p,{exact:!0,path:"/files/",layout:Ae,component:mn}),Object(h.jsx)(p,{exact:!0,path:"/peers/",layout:Ae,component:Zn}),Object(h.jsx)(p,{exact:!0,path:"/accounting/",layout:Ae,component:ea}),Object(h.jsx)(p,{exact:!0,path:"/settings/",layout:Ae,component:ta}),Object(h.jsx)(p,{exact:!0,path:"/stamps/",layout:Ae,component:ca})]})},sa=n(206),oa=n(127),la=function(e){return{MuiTab:{root:{backgroundColor:"transparent",fontWeight:e.typography.fontWeightRegular,marginRight:e.spacing(4),fontFamily:["-apple-system","BlinkMacSystemFont",'"Segoe UI"',"Roboto",'"Helvetica Neue"',"Arial","sans-serif",'"Apple Color Emoji"','"Segoe UI Emoji"','"Segoe UI Symbol"'].join(","),"&:hover":{color:e.palette.secondary,opacity:1},"&$selected":{color:e.palette.secondary,fontWeight:e.typography.fontWeightMedium},"&:focus":{color:e.palette.secondary}}},MuiTabs:{root:{borderBottom:"none"},indicator:{backgroundColor:e.palette.primary.main}}}},ua={MuiTab:{disableRipple:!0}},da=Object(sa.a)({palette:{type:"light",background:{default:"#fafafa"},primary:{light:oa.a.A200,main:"#dd7700",dark:oa.a[800]},secondary:{main:"#333333"}},typography:{fontFamily:["Work Sans","Montserrat","Nunito","Roboto",'"Helvetica Neue"',"Arial","sans-serif"].join(",")}}),ja=Object(sa.a)({palette:{type:"dark",background:{default:"#0d1117",paper:"#161b22"},primary:{light:oa.a.A200,main:"#dd7700",dark:oa.a[800]},secondary:{main:"#1f2937"}},typography:{fontFamily:["Work Sans","Montserrat","Nunito","Roboto",'"Helvetica Neue"',"Arial","sans-serif"].join(",")}});ja.overrides=la(ja),ja.props=ua,da.overrides=la(da),da.props=ua;var ba=function(){var e=Object(a.useState)("light"),t=Object(s.a)(e,2),n=t[0],r=t[1];return Object(a.useEffect)((function(){var e,t,n,a;return localStorage.getItem("theme")?r(String(localStorage.getItem("theme"))):(null===(e=window)||void 0===e||null===(t=e.matchMedia("(prefers-color-scheme: dark)"))||void 0===t?void 0:t.matches)&&r("dark"),null===(n=window)||void 0===n||null===(a=n.matchMedia("(prefers-color-scheme: dark)"))||void 0===a||a.addEventListener("change",(function(e){r((null===e||void 0===e?void 0:e.matches)?"dark":"light")})),function(){var e,t;return null===(e=window)||void 0===e||null===(t=e.matchMedia("(prefers-color-scheme: dark)"))||void 0===t?void 0:t.removeEventListener("change",(function(e){r((null===e||void 0===e?void 0:e.matches)?"dark":"light")}))}}),[]),Object(h.jsx)("div",{className:"App",children:Object(h.jsx)(l.a,{theme:"light"===n?da:ja,children:Object(h.jsx)(H,{children:Object(h.jsx)($,{children:Object(h.jsx)(on,{children:Object(h.jsx)(it,{children:Object(h.jsx)(d.a,{children:Object(h.jsxs)(h.Fragment,{children:[Object(h.jsx)(u.a,{}),Object(h.jsx)(o.a,{children:Object(h.jsx)(ia,{})})]})})})})})})})})},ha=function(e){e&&e instanceof Function&&n.e(3).then(n.bind(null,646)).then((function(t){var n=t.getCLS,a=t.getFID,r=t.getFCP,c=t.getLCP,i=t.getTTFB;n(e),a(e),r(e),c(e),i(e)}))};i.a.render(Object(h.jsx)(r.a.StrictMode,{children:Object(h.jsx)(ba,{})}),document.getElementById("root")),ha()}},[[521,1,2]]]);
|
|
2
|
-
//# sourceMappingURL=main.3cff6969.chunk.js.map
|