@ethersphere/bee-dashboard 0.8.0 → 0.9.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.
@@ -0,0 +1,2 @@
1
+ (this["webpackJsonp@ethersphere/bee-dashboard"]=this["webpackJsonp@ethersphere/bee-dashboard"]||[]).push([[3],{626:function(e,t,n){"use strict";n.r(t),n.d(t,"getCLS",(function(){return y})),n.d(t,"getFCP",(function(){return h})),n.d(t,"getFID",(function(){return C})),n.d(t,"getLCP",(function(){return k})),n.d(t,"getTTFB",(function(){return D}));var i,r,a,o,u=function(e,t){return{name:e,value:void 0===t?-1:t,delta:0,entries:[],id:"v2-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12)}},c=function(e,t){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){if("first-input"===e&&!("PerformanceEventTiming"in self))return;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)},m=function(e,t,n){var i;return function(r){t.value>=0&&(r||n)&&(t.delta=t.value-(i||0),(t.delta||void 0===i)&&(i=t.value,e(t)))}},d=-1,p=function(){return"hidden"===document.visibilityState?0:1/0},v=function(){s((function(e){var t=e.timeStamp;d=t}),!0)},l=function(){return d<0&&(d=p(),v(),f((function(){setTimeout((function(){d=p(),v()}),0)}))),{get firstHiddenTime(){return d}}},h=function(e,t){var n,i=l(),r=u("FCP"),a=function(e){"first-contentful-paint"===e.name&&(s&&s.disconnect(),e.startTime<i.firstHiddenTime&&(r.value=e.startTime,r.entries.push(e),n(!0)))},o=window.performance&&performance.getEntriesByName&&performance.getEntriesByName("first-contentful-paint")[0],s=o?null:c("paint",a);(o||s)&&(n=m(e,r,t),o&&a(o),f((function(i){r=u("FCP"),n=m(e,r,t),requestAnimationFrame((function(){requestAnimationFrame((function(){r.value=performance.now()-i.timeStamp,n(!0)}))}))})))},g=!1,T=-1,y=function(e,t){g||(h((function(e){T=e.value})),g=!0);var n,i=function(t){T>-1&&e(t)},r=u("CLS",0),a=0,o=[],d=function(e){if(!e.hadRecentInput){var t=o[0],i=o[o.length-1];a&&e.startTime-i.startTime<1e3&&e.startTime-t.startTime<5e3?(a+=e.value,o.push(e)):(a=e.value,o=[e]),a>r.value&&(r.value=a,r.entries=o,n())}},p=c("layout-shift",d);p&&(n=m(i,r,t),s((function(){p.takeRecords().map(d),n(!0)})),f((function(){a=0,T=-1,r=u("CLS",0),n=m(i,r,t)})))},E={passive:!0,capture:!0},w=new Date,L=function(e,t){i||(i=t,r=e,a=new Date,F(removeEventListener),S())},S=function(){if(r>=0&&r<a-w){var e={entryType:"first-input",name:i.type,target:i.target,cancelable:i.cancelable,startTime:i.timeStamp,processingStart:i.timeStamp+r};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(){L(e,t),r()},i=function(){r()},r=function(){removeEventListener("pointerup",n,E),removeEventListener("pointercancel",i,E)};addEventListener("pointerup",n,E),addEventListener("pointercancel",i,E)}(t,e):L(t,e)}},F=function(e){["mousedown","keydown","touchstart","pointerdown"].forEach((function(t){return e(t,b,E)}))},C=function(e,t){var n,a=l(),d=u("FID"),p=function(e){e.startTime<a.firstHiddenTime&&(d.value=e.processingStart-e.startTime,d.entries.push(e),n(!0))},v=c("first-input",p);n=m(e,d,t),v&&s((function(){v.takeRecords().map(p),v.disconnect()}),!0),v&&f((function(){var a;d=u("FID"),n=m(e,d,t),o=[],r=-1,i=null,F(addEventListener),a=p,o.push(a),S()}))},P={},k=function(e,t){var n,i=l(),r=u("LCP"),a=function(e){var t=e.startTime;t<i.firstHiddenTime&&(r.value=t,r.entries.push(e)),n()},o=c("largest-contentful-paint",a);if(o){n=m(e,r,t);var d=function(){P[r.id]||(o.takeRecords().map(a),o.disconnect(),P[r.id]=!0,n(!0))};["keydown","click"].forEach((function(e){addEventListener(e,d,{once:!0,capture:!0})})),s(d,!0),f((function(i){r=u("LCP"),n=m(e,r,t),requestAnimationFrame((function(){requestAnimationFrame((function(){r.value=performance.now()-i.timeStamp,P[r.id]=!0,n(!0)}))}))}))}},D=function(e){var t,n=u("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}();if(n.value=n.delta=t.responseStart,n.value<0||n.value>performance.now())return;n.entries=[t],e(n)}catch(e){}},"complete"===document.readyState?setTimeout(t,0):addEventListener("pageshow",t)}}}]);
2
+ //# sourceMappingURL=3.bed31167.chunk.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../node_modules/web-vitals/dist/web-vitals.js"],"names":["e","t","n","i","r","name","value","delta","entries","id","concat","Date","now","Math","floor","random","a","PerformanceObserver","supportedEntryTypes","includes","self","getEntries","map","observe","type","buffered","o","document","visibilityState","removeEventListener","addEventListener","c","persisted","u","f","s","m","timeStamp","v","setTimeout","firstHiddenTime","p","disconnect","startTime","push","window","performance","getEntriesByName","requestAnimationFrame","d","l","h","hadRecentInput","length","takeRecords","g","passive","capture","y","T","S","E","entryType","target","cancelable","processingStart","forEach","w","L","b","F","once","P","getEntriesByType","timing","max","navigationStart","responseStart","readyState"],"mappings":"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","file":"static/js/3.bed31167.chunk.js","sourcesContent":["var e,t,n,i,r=function(e,t){return{name:e,value:void 0===t?-1:t,delta:0,entries:[],id:\"v2-\".concat(Date.now(),\"-\").concat(Math.floor(8999999999999*Math.random())+1e12)}},a=function(e,t){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){if(\"first-input\"===e&&!(\"PerformanceEventTiming\"in self))return;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(e,t,n){var i;return function(r){t.value>=0&&(r||n)&&(t.delta=t.value-(i||0),(t.delta||void 0===i)&&(i=t.value,e(t)))}},f=-1,s=function(){return\"hidden\"===document.visibilityState?0:1/0},m=function(){o((function(e){var t=e.timeStamp;f=t}),!0)},v=function(){return f<0&&(f=s(),m(),c((function(){setTimeout((function(){f=s(),m()}),0)}))),{get firstHiddenTime(){return f}}},p=function(e,t){var n,i=v(),o=r(\"FCP\"),f=function(e){\"first-contentful-paint\"===e.name&&(m&&m.disconnect(),e.startTime<i.firstHiddenTime&&(o.value=e.startTime,o.entries.push(e),n(!0)))},s=window.performance&&performance.getEntriesByName&&performance.getEntriesByName(\"first-contentful-paint\")[0],m=s?null:a(\"paint\",f);(s||m)&&(n=u(e,o,t),s&&f(s),c((function(i){o=r(\"FCP\"),n=u(e,o,t),requestAnimationFrame((function(){requestAnimationFrame((function(){o.value=performance.now()-i.timeStamp,n(!0)}))}))})))},d=!1,l=-1,h=function(e,t){d||(p((function(e){l=e.value})),d=!0);var n,i=function(t){l>-1&&e(t)},f=r(\"CLS\",0),s=0,m=[],v=function(e){if(!e.hadRecentInput){var t=m[0],i=m[m.length-1];s&&e.startTime-i.startTime<1e3&&e.startTime-t.startTime<5e3?(s+=e.value,m.push(e)):(s=e.value,m=[e]),s>f.value&&(f.value=s,f.entries=m,n())}},h=a(\"layout-shift\",v);h&&(n=u(i,f,t),o((function(){h.takeRecords().map(v),n(!0)})),c((function(){s=0,l=-1,f=r(\"CLS\",0),n=u(i,f,t)})))},g={passive:!0,capture:!0},y=new Date,T=function(i,r){e||(e=r,t=i,n=new Date,S(removeEventListener),E())},E=function(){if(t>=0&&t<n-y){var r={entryType:\"first-input\",name:e.type,target:e.target,cancelable:e.cancelable,startTime:e.timeStamp,processingStart:e.timeStamp+t};i.forEach((function(e){e(r)})),i=[]}},w=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(){T(e,t),r()},i=function(){r()},r=function(){removeEventListener(\"pointerup\",n,g),removeEventListener(\"pointercancel\",i,g)};addEventListener(\"pointerup\",n,g),addEventListener(\"pointercancel\",i,g)}(t,e):T(t,e)}},S=function(e){[\"mousedown\",\"keydown\",\"touchstart\",\"pointerdown\"].forEach((function(t){return e(t,w,g)}))},L=function(n,f){var s,m=v(),p=r(\"FID\"),d=function(e){e.startTime<m.firstHiddenTime&&(p.value=e.processingStart-e.startTime,p.entries.push(e),s(!0))},l=a(\"first-input\",d);s=u(n,p,f),l&&o((function(){l.takeRecords().map(d),l.disconnect()}),!0),l&&c((function(){var a;p=r(\"FID\"),s=u(n,p,f),i=[],t=-1,e=null,S(addEventListener),a=d,i.push(a),E()}))},b={},F=function(e,t){var n,i=v(),f=r(\"LCP\"),s=function(e){var t=e.startTime;t<i.firstHiddenTime&&(f.value=t,f.entries.push(e)),n()},m=a(\"largest-contentful-paint\",s);if(m){n=u(e,f,t);var p=function(){b[f.id]||(m.takeRecords().map(s),m.disconnect(),b[f.id]=!0,n(!0))};[\"keydown\",\"click\"].forEach((function(e){addEventListener(e,p,{once:!0,capture:!0})})),o(p,!0),c((function(i){f=r(\"LCP\"),n=u(e,f,t),requestAnimationFrame((function(){requestAnimationFrame((function(){f.value=performance.now()-i.timeStamp,b[f.id]=!0,n(!0)}))}))}))}},P=function(e){var t,n=r(\"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}();if(n.value=n.delta=t.responseStart,n.value<0||n.value>performance.now())return;n.entries=[t],e(n)}catch(e){}},\"complete\"===document.readyState?setTimeout(t,0):addEventListener(\"pageshow\",t)};export{h as getCLS,p as getFCP,L as getFID,F as getLCP,P as getTTFB};\n"],"sourceRoot":""}
@@ -0,0 +1,2 @@
1
+ (this["webpackJsonp@ethersphere/bee-dashboard"]=this["webpackJsonp@ethersphere/bee-dashboard"]||[]).push([[0],{188:function(e){e.exports=JSON.parse('{"a":{"node":">=12.0.0","npm":">=6.0.0","bee":">=0.6.0"}}')},238:function(e,t,n){},239:function(e,t,n){},520:function(e,t,n){"use strict";n.r(t);var a=n(0),r=n.n(a),c=n(13),o=n.n(c),i=(n(238),n(42)),s=(n(239),n(616)),l=n(617),u=n(29),d=n(19),b=n(562),j=n(524),h=n(218),p=n(560),m=n(69),O=n(561),x=n(563),g=n(1),f=Object(j.a)((function(e){return Object(h.a)({root:{height:"100%"},content:{maxWidth:500,marginBottom:e.spacing(4),"&:last-child":{marginBottom:0}},icon:{height:"1rem"}})}));function v(){var e=f();return Object(g.jsxs)(p.a,{container:!0,direction:"column",justifyContent:"center",alignItems:"center",className:e.root,children:[Object(g.jsx)(p.a,{item:!0,className:e.content,children:Object(g.jsx)(m.a,{variant:"h1",align:"center",children:"Uh oh, it looks like your node is not connected."})}),Object(g.jsx)(p.a,{item:!0,className:e.content,children:Object(g.jsxs)(m.a,{align:"center",children:["Please check your node status to fix the problem. You can also check out the"," ",Object(g.jsx)(O.a,{href:"https://docs.ethswarm.org/docs/",target:"_blank",rel:"noreferrer",children:"Swarm Bee Docs"})," ","or ask for support on the"," ",Object(g.jsx)(O.a,{href:"https://discord.gg/eKr9XPv7",target:"_blank",rel:"noreferrer",children:"Ethereum Swarm Discord"}),"."]})}),Object(g.jsx)(p.a,{item:!0,className:e.content,children:Object(g.jsx)(m.a,{align:"center",children:Object(g.jsx)(b.a,{component:i.b,variant:"contained",startIcon:Object(g.jsx)(x.a,{className:e.icon}),to:In.STATUS,children:"Check node status"})})})]})}var y=n(15),w=n.n(y),k=n(27),C=n(7),S=n(45),B=n(92),N=n.n(B),A=n(188),T=n(189),L=n.n(T),P=n(83),I=n(122),D=n(28),E=n.n(D);function F(e){return D.BigNumber.isBigNumber(e)&&e.isInteger()||"bigint"===typeof e}function R(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 _.apply(this,arguments)}function _(){return(_=Object(k.a)(w.a.mark((function e(t){return w.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 W=[18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0],z=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:16;Object(P.a)(this,e),this.amount=void 0,this.decimals=void 0;var a=R(t);if(!F(a)||!W.includes(n))throw new TypeError("Not a valid token values");this.amount=a,this.decimals=n}return Object(I.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=R(t),r=a.multipliedBy(new D.BigNumber(10).pow(n));return new e(r,n)}}]),e}(),q=n(57),M={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(){}},V=Object(a.createContext)(M);V.Consumer;function Z(e){var t=e.children,n=Object(a.useState)(M.apiUrl),r=Object(C.a)(n,2),c=r[0],o=r[1],i=Object(a.useState)(M.apiDebugUrl),s=Object(C.a)(i,2),l=s[0],u=s[1],d=Object(a.useState)(null),b=Object(C.a)(d,2),j=b[0],h=b[1],p=Object(a.useState)(null),m=Object(C.a)(p,2),O=m[0],x=m[1];return Object(a.useEffect)((function(){try{h(new q.Bee(c)),sessionStorage.setItem("api_host",c)}catch(e){h(null)}}),[c]),Object(a.useEffect)((function(){try{x(new q.BeeDebug(l)),sessionStorage.setItem("debug_api_host",l)}catch(e){x(null)}}),[l]),Object(g.jsx)(V.Provider,{value:{apiUrl:c,apiDebugUrl:l,beeApi:j,beeDebugApi:O,setApiUrl:o,setDebugApiUrl:u},children:t})}var Y=window.location.search.includes("devMode=1"),H={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()}},G=Object(a.createContext)(H);G.Consumer;function K(e,t,n,a,r,c,o){var i=Y||Boolean(Object({NODE_ENV:"production",PUBLIC_URL:".",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_BEE_HOST:"http://localhost:1633",REACT_APP_BEE_DEBUG_HOST:"http://localhost:1635",REACT_APP_BEE_DOCS_HOST:"https://docs.ethswarm.org/docs/",REACT_APP_BEE_DISCORD_HOST:"https://discord.gg/eKr9XPv7",REACT_APP_BLOCKCHAIN_EXPLORER_URL:"https://blockscout.com/xdai/mainnet",REACT_APP_BEE_GITHUB_REPO_URL:"https://api.github.com/repos/ethersphere/bee"}).REACT_APP_DEV_MODE),s={version:Boolean(e&&N.a.satisfies(e.version,A.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)||i,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))||i};return Object(S.a)(Object(S.a)({},s),{},{all:!o&&Object.values(s).every((function(e){return e}))})}function X(e){var t,n,r=e.children,c=Object(a.useContext)(V),o=c.beeApi,i=c.beeDebugApi,s=Object(a.useState)(!1),l=Object(C.a)(s,2),u=l[0],d=l[1],b=Object(a.useState)(null),j=Object(C.a)(b,2),h=j[0],p=j[1],m=Object(a.useState)(null),O=Object(C.a)(m,2),x=O[0],f=O[1],v=Object(a.useState)(null),y=Object(C.a)(v,2),S=y[0],B=y[1],A=Object(a.useState)(null),T=Object(C.a)(A,2),P=T[0],I=T[1],D=Object(a.useState)(null),E=Object(C.a)(D,2),F=E[0],R=E[1],U=Object(a.useState)(null),_=Object(C.a)(U,2),W=_[0],q=_[1],M=Object(a.useState)(null),Z=Object(C.a)(M,2),Y=Z[0],X=Z[1],J=Object(a.useState)(null),$=Object(C.a)(J,2),Q=$[0],ee=$[1],te=Object(a.useState)(null),ne=Object(C.a)(te,2),ae=ne[0],re=ne[1],ce=function(){var e=Object(a.useState)(null),t=Object(C.a)(e,2),n=t[0],r=t[1],c=Object(a.useState)(!1),o=Object(C.a)(c,2),i=o[0],s=o[1],l=Object(a.useState)(null),u=Object(C.a)(l,2),d=u[0],b=u[1];return Object(a.useEffect)((function(){L.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(){s(!1)}))}),[]),{latestBeeRelease:n,isLoadingLatestBeeRelease:i,error:d}}(),oe=ce.latestBeeRelease,ie=Object(a.useState)(H.error),se=Object(C.a)(ie,2),le=se[0],ue=se[1],de=Object(a.useState)(H.isLoading),be=Object(C.a)(de,2),je=be[0],he=be[1],pe=Object(a.useState)(H.isRefreshing),me=Object(C.a)(pe,2),Oe=me[0],xe=me[1],ge=Object(a.useState)(H.lastUpdate),fe=Object(C.a)(ge,2),ve=fe[0],ye=fe[1],we=Object(a.useState)(3e4),ke=Object(C.a)(we,2),Ce=ke[0],Se=ke[1],Be=null===(t=N.a.coerce(null===oe||void 0===oe?void 0:oe.name))||void 0===t?void 0:t.version,Ne=null===(n=N.a.coerce(null===h||void 0===h?void 0:h.version))||void 0===n?void 0:n.version,Ae=null===h||void 0===h?void 0:h.version;Object(a.useEffect)((function(){he(!0),d(!1),Te()}),[o]),Object(a.useEffect)((function(){he(!0),p(null),f(null),B(null),R(null),I(null),q(null),X(null),ee(null),re(null),Te()}),[i]);var Te=function(){var e=Object(k.a)(w.a.mark((function e(){var t,n,a,r;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!Oe){e.next=2;break}return e.abrupt("return");case 2:if(o&&i){e.next=5;break}return he(!1),e.abrupt("return");case 5:return e.prev=5,xe(!0),ue(null),t=function(){var e=Object(k.a)(w.a.mark((function e(){var t,n,a;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i.getChequebookBalance();case 2:return t=e.sent,n=t.totalBalance,a=t.availableBalance,e.abrupt("return",{totalBalance:new z(n),availableBalance:new z(a)});case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),n=function(){var e=Object(k.a)(w.a.mark((function e(){var t,n;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i.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 z(n)}})));case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),a=function(){var e=Object(k.a)(w.a.mark((function e(){var t,n,a,r;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i.getAllSettlements();case 2:return t=e.sent,n=t.totalReceived,a=t.settlements,r=t.totalSent,e.abrupt("return",{totalReceived:new z(n),totalSent:new z(r),settlements:a.map((function(e){var t=e.peer,n=e.received,a=e.sent;return{peer:t,received:new z(n),sent:new z(a)}}))});case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),r=[o.isConnected().then(d).catch((function(){return d(!1)})),i.getHealth().then(p).catch((function(){return p(null)})),i.getNodeAddresses().then(f).catch((function(){return f(null)})),i.getTopology().then(B).catch((function(){return B(null)})),i.getPeers().then(R).catch((function(){return R(null)})),i.getChequebookAddress().then(I).catch((function(){return I(null)})),i.getLastCheques().then(ee).catch((function(){return ee(null)})),t().then(q).catch((function(){return q(null)})),n().then(X).catch((function(){return X(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),ue(e.t0);case 19:return e.prev=19,he(!1),xe(!1),ye(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(Te(),Ce){var e=setInterval(Te,Ce);return function(){return clearInterval(e)}}}),[Ce,i,o]),Object(g.jsx)(G.Provider,{value:{status:K(h,x,u,S,P,W,le),latestUserVersion:Ne,latestUserVersionExact:Ae,latestPublishedVersion:Be,isLatestBeeVersion:Boolean(Be&&Ne&&N.a.satisfies(Be,Ne,{includePrerelease:!0})),latestBeeVersionUrl:(null===oe||void 0===oe?void 0:oe.html_url)||"https://github.com/ethersphere/bee/releases/latest",error:le,apiHealth:u,debugApiHealth:h,nodeAddresses:x,topology:S,chequebookAddress:P,peers:F,chequebookBalance:W,peerBalances:Y,peerCheques:Q,settlements:ae,latestBeeRelease:oe,isLoading:je,isRefreshing:Oe,lastUpdate:ve,start:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3e4;return Se(e)},stop:function(){return Se(null)},refresh:Te},children:r})}var J=n(525),$=n(564),Q=n(523),ee=n(565),te=n(566),ne=Object(j.a)((function(e){return Object(h.a)({root:{width:"100%",padding:0,margin:0,marginTop:e.spacing(4),"&:first-child":{marginTop:0}},rootLevel1:{marginTop:e.spacing(1)},rootLevel2:{marginTop:e.spacing(.5)},header:{backgroundColor:e.palette.background.paper},contentLevel0:{marginTop:e.spacing(1)},contentLevel12:{marginTop:e.spacing(.25)},infoText:{color:"#c9c9c9"}})}));function ae(e){var t=e.children,n=e.label,r=e.level,c=e.defaultOpen,o=e.info,i=ne(),s=Object(a.useState)(Boolean(c)),l=Object(C.a)(s,2),u=l[0],d=l[1],b="",j="h1",h=i.contentLevel0;return 1===r?(b=i.rootLevel1,j="h2",h=i.contentLevel12):2===r&&(b=i.rootLevel2,j="h3",h=i.contentLevel12),Object(g.jsxs)("div",{className:"".concat(i.root," ").concat(b),children:[Object(g.jsxs)(J.a,{button:!0,onClick:function(){d(!u)},className:i.header,children:[Object(g.jsx)($.a,{primary:Object(g.jsx)(m.a,{variant:j,children:n})}),Object(g.jsxs)("div",{style:{display:"flex"},children:[!u&&Object(g.jsx)(m.a,{variant:"body2",className:i.infoText,children:o}),u?Object(g.jsx)(ee.a,{}):Object(g.jsx)(te.a,{})]})]}),Object(g.jsx)(Q.a,{in:u,timeout:"auto",unmountOnExit:!0,children:Object(g.jsx)("div",{className:h,children:t})})]})}var re=n(623),ce=n(569),oe=n(570),ie=Object(j.a)((function(e){return Object(h.a)({header:{backgroundColor:e.palette.background.paper,marginBottom:e.spacing(.25),wordBreak:"break-word"},copyValue:{cursor:"pointer",padding:e.spacing(1),borderRadius:0,"&:hover":{backgroundColor:"#fcf2e8",color:e.palette.primary.main}}})}));function se(e){var t=e.label,n=e.value,a=e.tooltip,r=ie();return Object(g.jsx)(J.a,{className:r.header,children:Object(g.jsxs)(p.a,{container:!0,direction:"row",justifyContent:"space-between",alignItems:"center",children:[t&&Object(g.jsx)(m.a,{variant:"body1",children:t}),n&&Object(g.jsxs)(m.a,{variant:"body2",children:[n,a&&Object(g.jsx)(re.a,{title:a,placement:"top",arrow:!0,children:Object(g.jsx)(ce.a,{size:"small",className:r.copyValue,children:Object(g.jsx)(oe.a,{strokeWidth:1})})})]})]})})}var le=n(72),ue=n.n(le),de=n(571),be=n(572),je=Object(j.a)((function(e){return Object(h.a)({header:{backgroundColor:e.palette.background.paper,marginBottom:e.spacing(.25),borderLeft:"".concat(e.spacing(.25),"px solid rgba(0,0,0,0)"),wordBreak:"break-word"},headerOpen:{borderLeft:"".concat(e.spacing(.25),"px solid ").concat(e.palette.primary.main)},copyValue:{cursor:"pointer",padding:e.spacing(1),borderRadius:0,"&:hover":{backgroundColor:"#fcf2e8",color:e.palette.primary.main}},content:{marginTop:e.spacing(2),marginBottom:e.spacing(2)},keyMargin:{marginRight:e.spacing(1)}})}));function he(e){var t,n=e.label,r=e.value,c=je(),o=Object(a.useState)(!1),i=Object(C.a)(o,2),s=i[0],l=i[1],u=Object(a.useState)(!1),d=Object(C.a)(u,2),b=d[0],j=d[1],h=function(){return l(!s)},O=function(){return j(!0)},x=function(){return j(!1)},f=function(e){var t=function(e){return e.replace(/^0x/i,"").length}(e);return t%6===0?e.match(/(0x|.{6})/gi)||[]:e.match(/(0x|.{1,8})/gi)||[]}(r),v="string"===typeof(t=r)&&/^0x[0-9a-f]+$/i.test(t),y="".concat(v?"".concat(f[0]," ").concat(f[1]):f[0],"[\u2026]").concat(f[f.length-1]);return Object(g.jsx)(J.a,{className:"".concat(c.header," ").concat(s?c.headerOpen:""),children:Object(g.jsxs)(p.a,{container:!0,direction:"column",justifyContent:"space-between",alignItems:"stretch",children:[Object(g.jsxs)(p.a,{container:!0,direction:"row",justifyContent:"space-between",alignItems:"center",children:[n&&Object(g.jsx)(m.a,{variant:"body1",children:n}),Object(g.jsx)(m.a,{variant:"body2",children:Object(g.jsxs)("div",{children:[!s&&Object(g.jsx)("span",{className:c.copyValue,children:Object(g.jsx)(re.a,{title:b?"Copied":"Copy",placement:"top",arrow:!0,onClose:x,children:Object(g.jsx)(le.CopyToClipboard,{text:r,children:Object(g.jsx)("span",{onClick:O,children:r?y:""})})})}),Object(g.jsx)(ce.a,{size:"small",className:c.copyValue,children:s?Object(g.jsx)(de.a,{onClick:h,strokeWidth:1}):Object(g.jsx)(be.a,{onClick:h,strokeWidth:1})})]})})]}),Object(g.jsx)(Q.a,{in:s,timeout:"auto",unmountOnExit:!0,children:Object(g.jsx)("div",{className:c.content,children:Object(g.jsx)(re.a,{title:b?"Copied":"Copy",placement:"top",arrow:!0,onClose:x,children:Object(g.jsx)(le.CopyToClipboard,{text:r,children:Object(g.jsx)("span",{onClick:O,children:Object(g.jsx)("span",{className:c.copyValue,children:f.map((function(e,t){return Object(g.jsx)(m.a,{variant:"body2",className:c.keyMargin,component:"span",children:e},t)}))})})})})})})]})})}var pe=n(191),me=1e5,Oe="There may be issues with your Bee node or connection.",xe={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. "+Oe,score:0}],population:[{minimumValue:me,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(me.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. "+Oe,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. "+Oe,score:0}]};function ge(e,t){var n,a=xe[e],r=a[0].score,c=Object(pe.a)(a);try{for(c.s();!(n=c.n()).done;){var o=n.value;if(t>=o.minimumValue)return{score:o.score,maximumScore:r,explanation:o.explanation}}}catch(s){c.e(s)}finally{c.f()}var i=a[a.length-1];return{score:i.score,maximumScore:r,explanation:i.explanation}}var fe=function(e){var t,n,a,r,c,o,i={connectedPeers:ge("connectedPeers",(null===(t=e.topology)||void 0===t?void 0:t.connected)||0),population:ge("population",(null===(n=e.topology)||void 0===n?void 0:n.population)||0),depth:ge("depth",(null===(a=e.topology)||void 0===a?void 0:a.depth)||0)},s=Object.values(i).reduce((function(e,t){return e+t.maximumScore}),0),l=Object.values(i).reduce((function(e,t){return e+t.score}),0),u=Math.round(l/s*100)+"%";return Object(g.jsxs)(g.Fragment,{children:[Object(g.jsx)(se,{label:"Overall Health Indicator",value:u}),Object(g.jsx)(se,{label:"Connected Peers",value:null===(r=e.topology)||void 0===r?void 0:r.connected.toString(),tooltip:i.connectedPeers.explanation}),Object(g.jsx)(se,{label:"Population",value:null===(c=e.topology)||void 0===c?void 0:c.population.toString(),tooltip:i.population.explanation}),Object(g.jsx)(se,{label:"Depth",value:null===(o=e.topology)||void 0===o?void 0:o.depth.toString(),tooltip:i.depth.explanation})]})};function ve(){var e=Object(a.useContext)(G),t=e.status,n=e.latestUserVersion,r=e.isLatestBeeVersion,c=e.latestBeeVersionUrl,o=e.topology,i=e.nodeAddresses,s=e.chequebookAddress;return t.all?Object(g.jsxs)("div",{children:[Object(g.jsxs)(ae,{label:"Bee Node",defaultOpen:!0,children:[Object(g.jsx)(se,{label:"Agent",value:Object(g.jsxs)("div",{children:[Object(g.jsx)("a",{href:"https://github.com/ethersphere/bee",rel:"noreferrer",target:"_blank",children:"Bee"})," ".concat(n||"-"," "),Object(g.jsx)(b.a,{size:"small",variant:"outlined",href:c,target:"_blank",children:r?"latest":"update"})]})}),Object(g.jsx)(he,{label:"Public key",value:(null===i||void 0===i?void 0:i.publicKey)||""}),Object(g.jsx)(he,{label:"PSS public key",value:(null===i||void 0===i?void 0:i.pssPublicKey)||""}),Object(g.jsx)(he,{label:"Overlay address (Peer ID)",value:(null===i||void 0===i?void 0:i.overlay)||""}),Object(g.jsx)(ae,{level:1,label:"Underlay addresses",children:null===i||void 0===i?void 0:i.underlay.map((function(e){return Object(g.jsx)(se,{value:e},e)}))})]}),Object(g.jsxs)(ae,{label:"Blockchain",defaultOpen:!0,children:[Object(g.jsx)(he,{label:"Ethereum address",value:(null===i||void 0===i?void 0:i.ethereum)||""}),Object(g.jsx)(he,{label:"Chequebook contract address",value:(null===s||void 0===s?void 0:s.chequebookAddress)||""})]}),Object(g.jsx)(ae,{label:"Connectivity",defaultOpen:!0,children:Object(g.jsx)(fe,{topology:o})})]}):Object(g.jsx)(v,{})}var ye=n(621),we=n(210),ke=n(619),Ce=n(573),Se=["children","value","index"];function Be(e){var t=e.children,n=e.value,a=e.index,r=Object(we.a)(e,Se);return Object(g.jsx)("div",Object(S.a)(Object(S.a)({role:"tabpanel",hidden:n!==a},r),{},{children:n===a&&t}))}var Ne=Object(j.a)((function(e){return Object(h.a)({root:{flexGrow:1},content:{marginTop:e.spacing(2)}})}));function Ae(e){var t=e.values,n=e.index,a=e.indexChanged,c=Ne(),o=r.a.useState(n||0),i=Object(C.a)(o,2),s=i[0],l=i[1],u=void 0!==n?n:s;return Object(g.jsxs)("div",{className:c.root,children:[Object(g.jsx)(ke.a,{value:u,onChange:function(e,t){a?a(t):l(t)},variant:"fullWidth",children:t.map((function(e,t){var n=e.label;return Object(g.jsx)(Ce.a,{label:n},t)}))}),Object(g.jsx)("div",{className:c.content,children:t.map((function(e,t){var n=e.component;return Object(g.jsx)(Be,{value:u,index:t,children:n},t)}))})]})}var Te,Le,Pe=n(622),Ie=function(e){return Object(g.jsx)("div",{style:{textAlign:"left"},children:Object(g.jsx)(Pe.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"}(Te||(Te={})),function(e){e[e.macOS=Te.macOS]="macOS",e[e.Linux=Te.Linux]="Linux"}(Le||(Le={}));var De={platform:Le.macOS,setPlatform:function(){}},Ee=Object(a.createContext)(De);Ee.Consumer;function Fe(e){var t=e.children,n=Object(a.useState)(Le.Linux),r=Object(C.a)(n,2),c=r[0],o=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)?Te.macOS:["iPhone","iPad","iPod"].includes(t)?Te.iOS:["Win32","Win64","Windows","WinCE"].includes(t)?Te.Windows:/Android/.test(e)?Te.Android:/Linux/.test(t)?Te.Linux:null}();o(function(e){return Object.keys(Le).includes(e)}(e)?e:Le.Linux)}),[]),Object(g.jsx)(Ee.Provider,{value:{platform:c,setPlatform:o},children:t})}function Re(e){var t=Object(a.useContext)(Ee),n=t.platform,r=t.setPlatform;return Object(g.jsx)(Ae,{index:n,indexChanged:r,values:[{label:"Linux",component:Object(g.jsx)(Ie,{showLineNumbers:e.showLineNumbers,language:"bash",code:e.linux})},{label:"macOS",component:Object(g.jsx)(Ie,{showLineNumbers:e.showLineNumbers,language:"bash",code:e.mac})}]})}var Ue=n(219),_e=n(574),We=n(575),ze=n(576),qe=Object(j.a)((function(e){return Object(h.a)({action:{marginTop:e.spacing(.75),marginBottom:e.spacing(1),marginRight:e.spacing(1)}})}));function Me(e){var t=e.children,n=qe();return Array.isArray(t)?Object(g.jsx)(p.a,{container:!0,direction:"row",children:t.filter((function(e){return e})).map((function(e,t){return Object(g.jsx)(p.a,{className:n.action,children:e},t)}))}):Object(g.jsx)(p.a,{container:!0,direction:"row",children:Object(g.jsx)(p.a,{className:n.action,children:t})})}var Ve=Object(j.a)((function(e){return Object(h.a)({header:{backgroundColor:"#F7F7F7",marginBottom:e.spacing(.25)},typography:{color:"#242424"}})}));function Ze(e){var t=e.children,n=Ve();return Object(g.jsx)(J.a,{className:n.header,children:Object(g.jsx)(m.a,{variant:"body1",className:n.typography,children:t})})}var Ye=Object(j.a)((function(e){return Object(h.a)({header:{backgroundColor:e.palette.background.paper,marginBottom:e.spacing(.25),borderLeft:"".concat(e.spacing(.25),"px solid rgba(0,0,0,0)"),wordBreak:"break-word"},headerOpen:{borderLeft:"".concat(e.spacing(.25),"px solid ").concat(e.palette.primary.main)},copyValue:{cursor:"pointer",padding:e.spacing(1),borderRadius:0,"&:hover":{backgroundColor:"#fcf2e8",color:e.palette.primary.main}},content:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},keyMargin:{marginRight:e.spacing(1)},unselectableLabel:{cursor:"default",userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none"}})}));function He(e){var t=e.label,n=e.value,r=e.onConfirm,c=e.onChange,o=e.confirmLabel,i=e.confirmLabelDisabled,s=e.expandedOnly,l=e.helperText,u=e.placeholder,d=e.mapperFn,j=Ye(),h=Object(a.useState)(Boolean(s)),O=Object(C.a)(h,2),x=O[0],f=O[1],v=Object(a.useState)(n||""),y=Object(C.a)(v,2),w=y[0],k=y[1],S=function(){return f(!x)};return Object(g.jsxs)(g.Fragment,{children:[Object(g.jsx)(J.a,{className:"".concat(j.header," ").concat(x?j.headerOpen:""),children:Object(g.jsxs)(p.a,{container:!0,direction:"column",justifyContent:"space-between",alignItems:"stretch",children:[Object(g.jsxs)(p.a,{container:!0,direction:"row",justifyContent:"space-between",alignItems:"center",children:[t&&Object(g.jsx)(m.a,{variant:"body1",className:j.unselectableLabel,children:t}),Object(g.jsx)(m.a,{variant:"body2",children:Object(g.jsxs)("div",{children:[!x&&n,!s&&Object(g.jsx)(ce.a,{size:"small",className:j.copyValue,children:x?Object(g.jsx)(de.a,{onClick:S,strokeWidth:1}):Object(g.jsx)(_e.a,{onClick:S,strokeWidth:1})})]})})]}),Object(g.jsx)(Q.a,{in:x,timeout:"auto",unmountOnExit:!0,children:Object(g.jsx)(Ue.a,{value:w,placeholder:u,onChange:function(e){d&&(e.target.value=d(e.target.value)),k(e.target.value),c&&c(e.target.value)},fullWidth:!0,className:j.content,autoFocus:!0})})]})}),Object(g.jsxs)(Q.a,{in:x,timeout:"auto",unmountOnExit:!0,children:[l&&Object(g.jsx)(Ze,{children:l}),Object(g.jsxs)(Me,{children:[Object(g.jsx)(b.a,{variant:"contained",disabled:w===n||Boolean(i)||""===w&&void 0===n,startIcon:Object(g.jsx)(We.a,{size:"1rem"}),onClick:function(){return r(w)},children:o||"Save"}),Object(g.jsx)(b.a,{variant:"contained",disabled:w===n||""===w,startIcon:Object(g.jsx)(ze.a,{size:"1rem"}),onClick:function(){return k(n||"")},children:"Cancel"})]})]})]})}var Ge=n(577);function Ke(e){var t=e.isOk,n=e.size,a=e.className,r=n||"1rem";return e.isLoading?Object(g.jsx)(Ge.a,{size:r,className:a}):Object(g.jsx)("span",{className:a,style:{backgroundColor:t?"#1de600":"#ff3a52",height:r,width:r,borderRadius:"50%",display:"inline-block"}})}function Xe(){var e=Object(a.useContext)(G),t=e.status,n=e.isLoading,r=Object(a.useContext)(V),c=r.setDebugApiUrl,o=r.apiDebugUrl,i=t.debugApiConnection;return Object(g.jsxs)(ae,{label:Object(g.jsxs)(g.Fragment,{children:[Object(g.jsx)(Ke,{isOk:i,isLoading:n})," Connection to Bee Debug API"]}),children:[Object(g.jsx)(Ze,{children:i?"The connection to the Bee nodes debug API has been successful":"We cannot connect to your nodes debug API. Please check the following to troubleshoot your issue."}),Object(g.jsx)(He,{label:"Bee Debug API",value:o,onConfirm:c}),!i&&Object(g.jsx)(ae,{level:1,label:"Troubleshoot",children:Object(g.jsx)(se,{label:Object(g.jsxs)("ol",{children:[Object(g.jsx)("li",{children:"Check the status of your node by running the below command to see if your node is running."}),Object(g.jsx)(Re,{showLineNumbers:!0,linux:"sudo systemctl status bee",mac:"brew services list"}),Object(g.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(g.jsx)(ye.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(g.jsx)(Re,{showLineNumbers:!0,linux:"sudo systemctl start bee",mac:"brew services start swarm-bee"}),Object(g.jsx)("li",{children:"Run the commands to validate your node is running and see the log output."}),Object(g.jsx)(Re,{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(g.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(g.jsx)("strong",{children:"debug-api-enable"})," must be set to ",Object(g.jsx)("strong",{children:"true"})," and"," ",Object(g.jsx)("strong",{children:"cors-allowed-origins"})," must be set to your host domain or IP (you can also use the wildcard ",Object(g.jsx)("code",{children:"cors-allowed-origins: ['*']"}),"). If edits are made to the configuration run the restart command below for changes to take effect."]}),Object(g.jsx)(Re,{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 Je(){var e=Object(a.useContext)(V),t=e.setApiUrl,n=e.apiUrl,r=Object(a.useContext)(G),c=r.status,o=r.isLoading,i=c.apiConnection;return Object(g.jsxs)(ae,{label:Object(g.jsxs)(g.Fragment,{children:[Object(g.jsx)(Ke,{isOk:i,isLoading:o})," Connection to Bee API"]}),children:[Object(g.jsx)(Ze,{children:i?"The connection to the Bee nodes API has been successful":"Could not connect to your Bee nodes API. Please check the troubleshoot below on how you may resolve it."}),Object(g.jsx)(He,{label:"Bee API",value:n,onConfirm:t}),!i&&Object(g.jsx)(ae,{level:1,label:"Troubleshoot",children:Object(g.jsx)(se,{label:Object(g.jsxs)("ol",{children:[Object(g.jsx)("li",{children:"Check the status of your node by running the below command to see if your node is running."}),Object(g.jsx)(Re,{showLineNumbers:!0,linux:"sudo systemctl status bee",mac:"brew services list"}),Object(g.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(g.jsx)(Re,{showLineNumbers:!0,linux:"sudo systemctl start bee",mac:"brew services start swarm-bee"}),Object(g.jsx)("li",{children:"Run the commands to validate your node is running and see the log output."}),Object(g.jsx)(Re,{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 $e(){var e=Object(a.useContext)(G),t=e.status,n=e.isLoading,r=e.latestUserVersion,c=e.latestPublishedVersion,o=e.latestBeeVersionUrl,i=t.version;return Object(g.jsxs)(ae,{label:Object(g.jsxs)(g.Fragment,{children:[Object(g.jsx)(Ke,{isOk:i,isLoading:n})," Bee Version"]}),children:[Object(g.jsx)(Ze,{children:i?"You are running the latest version of Bee.":Object(g.jsxs)(g.Fragment,{children:["Your Bee version is out of date. Please update to the"," ",Object(g.jsx)("a",{href:o,rel:"noreferrer",target:"_blank",children:"latest"})," ","before continuing. Rerun the installation script below to upgrade. For more information please see the"," ",Object(g.jsx)("a",{href:"https://docs.ethswarm.org/docs/installation/manual#upgrading-bee",rel:"noreferrer",target:"_blank",children:"Docs"}),".",Object(g.jsx)(Re,{showLineNumbers:!0,linux:"bee version\nwget https://github.com/ethersphere/bee/releases/download/".concat(c,"/bee_").concat(c,"_amd64.deb\nsudo dpkg -i bee_").concat(c,"_amd64.deb"),mac:"bee version\nbrew tap ethersphere/tap\nbrew install swarm-bee\nbrew services start swarm-bee"})]})}),Object(g.jsx)(se,{label:"Your Version",value:r||"-"}),Object(g.jsx)(se,{label:"Latest Version",value:c||"-"})]})}function Qe(){var e=Object(a.useContext)(G),t=e.status,n=e.isLoading,r=e.nodeAddresses,c=t.blockchainConnection;return Object(g.jsxs)(ae,{label:Object(g.jsxs)(g.Fragment,{children:[Object(g.jsx)(Ke,{isOk:c,isLoading:n})," Connection to Blockchain"]}),children:[Object(g.jsx)(Ze,{children:c?"Your node is connected to the xDai blockchain":Object(g.jsxs)(g.Fragment,{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(g.jsx)("a",{href:"https://www.xdaichain.com/",rel:"noreferrer",target:"_blank",children:"your own xDai node"}),", or use a provider instead - we recommend"," ",Object(g.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(g.jsx)("strong",{children:"swap-endpoint"})," in your configuration file."]})}),(null===r||void 0===r?void 0:r.ethereum)&&Object(g.jsx)(he,{label:"Ethereum Address",value:null===r||void 0===r?void 0:r.ethereum})]})}var et=n(585),tt=n(582),nt=n(578),at=n(584),rt=n(580),ct=n(581),ot=n(579),it=n(583);function st(e){var t=e.successMessage,n=e.errorMessage,r=e.dialogMessage,c=e.min,o=e.max,i=e.label,s=e.action,l=e.icon,d=Object(a.useState)(!1),j=Object(C.a)(d,2),h=j[0],p=j[1],m=Object(a.useState)(""),O=Object(C.a)(m,2),x=O[0],f=O[1],v=Object(a.useState)(null),y=Object(C.a)(v,2),S=y[0],B=y[1],N=Object(a.useState)(null),A=Object(C.a)(N,2),T=A[0],L=A[1],P=Object(u.b)().enqueueSnackbar,I=function(){p(!1)},D=function(){var e=Object(k.a)(w.a.mark((function e(){var a;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!==S){e.next=2;break}return e.abrupt("return");case 2:return e.prev=2,e.next=5,s(S.toBigInt);case 5:a=e.sent,p(!1),P("".concat(t," Transaction ").concat(a),{variant:"success"}),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(2),P("".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(g.jsxs)("div",{children:[Object(g.jsx)(b.a,{variant:"contained",onClick:function(e){p(!0),e.stopPropagation()},startIcon:l,children:i}),Object(g.jsxs)(nt.a,{open:h,onClose:I,"aria-labelledby":"form-dialog-title",children:[Object(g.jsx)(ot.a,{id:"form-dialog-title",children:i}),Object(g.jsxs)(rt.a,{children:[Object(g.jsx)(ct.a,{children:r}),Object(g.jsx)(tt.a,{autoFocus:!0,margin:"dense",id:"name",type:"text",placeholder:"Amount",fullWidth:!0,value:x,onChange:function(e){var t=e.target.value;f(t),L(null);try{var n=z.fromDecimal(t);B(n),c&&n.toDecimal.isLessThan(c)&&L(new Error("Needs to be more than ".concat(c))),o&&n.toDecimal.isGreaterThan(o)&&L(new Error("Needs to be less than ".concat(o)))}catch(e){L(e)}}}),T&&Object(g.jsxs)(it.a,{error:!0,children:["Please provide valid BZZ amount (max 16 decimals). Error: ",T.message]})]}),Object(g.jsxs)(at.a,{children:[Object(g.jsx)(b.a,{onClick:I,color:"primary",children:"Cancel"}),Object(g.jsx)(b.a,{onClick:D,color:"primary",children:i})]})]})]})}function lt(){var e=Object(a.useContext)(V).beeDebugApi;return Object(g.jsx)(st,{successMessage:"Successful deposit.",errorMessage:"Error with depositing",dialogMessage:"Specify the amount of BZZ you would like to deposit to your node.",label:"Deposit",icon:Object(g.jsx)(et.a,{size:"1rem"}),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 ut=function(){var e=Object(a.useContext)(G),t=e.status,n=e.isLoading,r=e.chequebookAddress,c=t.chequebook;return Object(g.jsxs)(ae,{label:Object(g.jsxs)(g.Fragment,{children:[Object(g.jsx)(Ke,{isOk:c,isLoading:n})," Chequebook Deployment & Funding"]}),children:[Object(g.jsx)(Ze,{children:c?"Your chequebook is deployed and funded":Object(g.jsxs)(g.Fragment,{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 (e.g. ",Object(g.jsx)("a",{href:"https://bzz.exchange/",children:"bzz.exchange"}),") and bridge it to the xDai network through the ",Object(g.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(g.jsx)("a",{href:"https://bridge.xdaichain.com/",children:"xDai Bridge"}),". See the"," ",Object(g.jsx)("a",{href:"https://www.xdaichain.com/#xdai-stable-chain",children:"official xDai website"})," for more information."]})}),r&&Object(g.jsxs)(g.Fragment,{children:[Object(g.jsx)(he,{label:"Chequebook Address",value:r.chequebookAddress}),Object(g.jsx)(Me,{children:Object(g.jsx)(lt,{})})]})]})};function dt(){var e=Object(a.useContext)(G),t=e.status,n=e.isLoading,r=e.topology,c=t.topology;return Object(g.jsxs)(ae,{label:Object(g.jsxs)(g.Fragment,{children:[Object(g.jsx)(Ke,{isOk:c,isLoading:n})," Connection to Peers"]}),children:[Object(g.jsx)(Ze,{children:c?"You are connected to other Bee nodes":"Your node is not connected to any peers. Please wait a bit if you just started the node, otherwise review your configuration file."}),Object(g.jsx)(fe,{topology:r})]})}function bt(){return Object(g.jsxs)("div",{children:[Object(g.jsx)(Xe,{}),Object(g.jsx)($e,{}),Object(g.jsx)(Qe,{}),Object(g.jsx)(ut,{}),Object(g.jsx)(Je,{}),Object(g.jsx)(dt,{})]})}var jt=n(618),ht=["index.html","index.htm"];function pt(e){if(!e.length)return!1;var t=e.find((function(e){return ht.includes(e.path)}));if(t)return t.name;var n=e[0].path.split("/")[0]+"/";if(e.every((function(e){return e.path.startsWith(n)}))){var a=e.find((function(e){return ht.map((function(e){return n+e})).includes(e.path)}));if(a)return a.name}return!1}function mt(e){return{name:e.name,size:e.data.byteLength,type:e.contentType,arrayBuffer:function(){return new Promise((function(t){return t(e.data)}))}}}var Ot=function e(t){var n=this;Object(P.a)(this,e),this.name=void 0,this.path=void 0,this.type=void 0,this.size=void 0,this.webkitRelativePath=void 0,this.arrayBuffer=void 0,this.data=void 0;var a=Reflect.get(t,"path")||t.webkitRelativePath||t.name;this.path=a.startsWith("/")?a.slice(1):a,this.webkitRelativePath=this.path,this.name=t.name,this.type=t.type,this.size=t.size,this.data=t.arrayBuffer(),this.arrayBuffer=Object(k.a)(w.a.mark((function e(){var t;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.data;case 2:return t=e.sent,e.abrupt("return",t);case 4:case"end":return e.stop()}}),e)})))},xt=n(587),gt=n(586),ft=n(588),vt=Object(j.a)((function(){return Object(h.a)({image:{width:"100%",height:"100%",objectFit:"cover"}})}));function yt(e){var t=vt(),n={};return e.maxHeight&&(n.maxHeight=e.maxHeight),e.maxWidth&&(n.maxWidth=e.maxWidth),Object(g.jsx)("img",{className:t.image,alt:e.alt,src:e.src,style:n})}var wt=Object(j.a)((function(){return Object(h.a)({wrapper:{display:"flex",justifyContent:"center",alignItems:"center",width:"175px",height:"175px",background:"repeating-linear-gradient(\n 45deg,\n #efefef,\n #efefef 4px,\n #ffffff 4px,\n #ffffff 8px\n )"}})}));function kt(e){var t=e.children,n=wt();return Object(g.jsx)("div",{className:n.wrapper,children:t})}function Ct(e){var t=e.icon;return Object(g.jsx)(kt,{children:t})}function St(e){var t=e.files,n=Object(a.useState)(void 0),r=Object(C.a)(n,2),c=r[0],o=r[1],i=Object(a.useState)(void 0),s=Object(C.a)(i,2),l=s[0],u=s[1];Object(a.useEffect)((function(){1===t.length?t[0].type.startsWith("image/")?t[0].arrayBuffer().then((function(e){var t=new Blob([e]);u(URL.createObjectURL(t))})):(u(void 0),o(Object(g.jsx)(Ct,{icon:Object(g.jsx)(gt.a,{})}))):pt(t)?(u(void 0),o(Object(g.jsx)(Ct,{icon:Object(g.jsx)(xt.a,{})}))):(u(void 0),o(Object(g.jsx)(Ct,{icon:Object(g.jsx)(ft.a,{})})))}),[t]);var d,b=function(){return 1===t.length?t[0].type:pt(t)?"Website":"Folder"};return Object(g.jsxs)(jt.a,{mb:4,children:[Object(g.jsx)(jt.a,{bgcolor:"background.paper",children:Object(g.jsxs)(p.a,{container:!0,direction:"row",children:[c||Object(g.jsx)(yt,{maxWidth:"250px",maxHeight:"175px",alt:"Upload Preview",src:l}),Object(g.jsxs)(jt.a,{p:2,children:[Object(g.jsx)(m.a,{children:1===t.length?"Filename: "+t[0].name:"Folder name: "+t[0].path.split("/")[0]}),Object(g.jsxs)(m.a,{children:["Kind: ",b()]}),Object(g.jsxs)(m.a,{children:["Size: ",(d=t.reduce((function(e,t){return e+t.size}),0),d>=1e6?(d/1e6).toFixed(2)+" MB":d>=1e3?(d/1e3).toFixed(2)+" kB":d+" bytes")]})]})]})}),["Folder","Website"].includes(b())&&Object(g.jsx)(jt.a,{mt:.25,p:2,bgcolor:"background.paper",children:Object(g.jsxs)(p.a,{container:!0,justifyContent:"space-between",alignItems:"center",direction:"row",children:[Object(g.jsx)(m.a,{variant:"subtitle2",children:"Folder content"}),Object(g.jsxs)(m.a,{variant:"subtitle2",children:[t.length," items"]})]})})]})}var Bt=n(589),Nt=Object(j.a)((function(){return Object(h.a)({button:{position:"relative",whiteSpace:"nowrap","&:hover, &:focus":{"& svg":{stroke:"#fff",transition:"0.1s"}}},spinnerWrapper:{position:"absolute",left:"50%",top:"50%",width:"40px",height:"40px",transform:"translate(-50%, -50%)"}})}));function At(e){var t=e.children,n=e.onClick,a=e.iconType,c=e.className,o=e.disabled,i=e.loading,s=Nt(),l=r.a.createElement(a,{size:"1.25rem",color:o?"rgba(0, 0, 0, 0.26)":"#dd7700"}),u=c?[c,s.button].join(" "):s.button;return Object(g.jsxs)(b.a,{className:u,onClick:function(e){n(),e.currentTarget.blur()},variant:"contained",startIcon:l,disabled:o,children:[t,i&&Object(g.jsx)("div",{className:s.spinnerWrapper,children:Object(g.jsx)(Ge.a,{})})]})}function Tt(e){var t=e.onDownload,n=e.onCancel;return Object(g.jsxs)(Me,{children:[Object(g.jsx)(At,{onClick:t,iconType:et.a,children:"Download This File"}),Object(g.jsx)(b.a,{onClick:n,variant:"contained",startIcon:Object(g.jsx)(Bt.a,{}),children:"Cancel"})]})}function Lt(){var e=Object(a.useContext)(V),t=e.apiUrl,n=e.beeApi,r=Object(a.useState)(""),c=Object(C.a)(r,2),o=c[0],i=c[1],s=Object(a.useState)(void 0),l=Object(C.a)(s,2),d=l[0],b=l[1],j=Object(a.useState)(null),h=Object(C.a)(j,2),p=h[0],m=h[1],O=Object(u.b)().enqueueSnackbar;function x(){return(x=Object(k.a)(w.a.mark((function e(t){var a,r;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n){e.next=2;break}return e.abrupt("return");case 2:return i(t),e.prev=3,e.next=6,n.downloadFile(t);case 6:a=e.sent,m(mt(a)),e.next=16;break;case 10:e.prev=10,e.t0=e.catch(3),(r="object"===typeof e.t0&&null!==e.t0&&Reflect.get(e.t0,"message")).includes("path address not found")&&(r="The specified hash does not have an index document set."),r.includes("Not Found: Not Found")&&(r="The specified hash was not found."),O(Object(g.jsxs)("span",{children:["Error: ",r||"Unknown"]}),{variant:"error"});case 16:case"end":return e.stop()}}),e,null,[[3,10]])})))).apply(this,arguments)}if(p)return Object(g.jsxs)(g.Fragment,{children:[Object(g.jsx)(jt.a,{mb:4,children:Object(g.jsx)(St,{files:[new Ot(p)]})}),Object(g.jsx)(Tt,{onCancel:function(){return m(null)},onDownload:function(){window.open("".concat(t,"/bzz/").concat(o,"/"),"_blank")}})]});return Object(g.jsx)(He,{label:"Swarm Hash",onConfirm:function(e){return function(e){return x.apply(this,arguments)}(e)},onChange:function(e){q.Utils.isHexString(e,64)||q.Utils.isHexString(e,128)?b(void 0):b("Incorrect format of swarm hash. Expected 64 or 128 hexstring characters.")},helperText:d,confirmLabel:"Search",confirmLabelDisabled:Boolean(d),placeholder:"e.g. 31fb0362b1a42536134c86bc58b97ac0244e5c6630beec3e27c2d1cecb38c605",expandedOnly:!0,mapperFn:function(e){return function(e){return e.length<64?e:function(e){var t=e.match(/[a-fA-F0-9]{64,128}/);return t&&t[0]||null}(e)||e}(e)}})}var Pt={stamps:null,error:null,isLoading:!1,lastUpdate:null,start:function(){},stop:function(){},refresh:function(){return Promise.reject()}},It=Object(a.createContext)(Pt);It.Consumer;function Dt(e){var t=e.depth,n=e.bucketDepth,a=e.utilization/Math.pow(2,t-n),r="".concat(Math.ceil(100*a),"%");return Object(S.a)(Object(S.a)({},e),{},{usage:a,usageText:r})}function Et(e){var t=e.children,n=Object(a.useContext)(V).beeDebugApi,r=Object(a.useState)(Pt.stamps),c=Object(C.a)(r,2),o=c[0],i=c[1],s=Object(a.useState)(Pt.error),l=Object(C.a)(s,2),u=l[0],d=l[1],b=Object(a.useState)(Pt.isLoading),j=Object(C.a)(b,2),h=j[0],p=j[1],m=Object(a.useState)(Pt.lastUpdate),O=Object(C.a)(m,2),x=O[0],f=O[1],v=Object(a.useState)(null),y=Object(C.a)(v,2),S=y[0],B=y[1],N=function(){var e=Object(k.a)(w.a.mark((function e(){var t;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!h){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,p(!0),e.next=8,n.getAllPostageBatch();case 8:t=e.sent,i(t.map(Dt)),f(Date.now()),e.next=16;break;case 13:e.prev=13,e.t0=e.catch(4),d(e.t0);case 16:return e.prev=16,p(!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(N(),S){var e=setInterval(N,S);return function(){return clearInterval(e)}}}),[S]),Object(g.jsx)(It.Provider,{value:{stamps:o,error:u,isLoading:h,lastUpdate:x,start:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3e4;return B(e)},stop:function(){return B(null)},refresh:N},children:t})}var Ft=n(50),Rt=n(129),Ut={depth:"",amount:"",label:""},_t=Object(j.a)((function(e){return Object(h.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 Wt(e){var t=e.onClose,n=_t(),r=Object(a.useContext)(It).refresh,c=Object(a.useContext)(V).beeDebugApi,o=Object(u.b)().enqueueSnackbar;return Object(g.jsx)(Ft.c,{initialValues:Ut,onSubmit:function(){var e=Object(k.a)(w.a.mark((function e(n,a){var i,s,l;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,n.depth&&n.amount){e.next=3;break}return e.abrupt("return");case 3:if(c){e.next=5;break}return e.abrupt("return");case 5:return i=BigInt(n.amount),s=Number.parseInt(n.depth),l=n.label?{label:n.label}:void 0,e.next=10,c.createPostageBatch(i.toString(),s,l);case 10:return a.resetForm(),e.next=13,r();case 13:t(),e.next=20;break;case 16:e.prev=16,e.t0=e.catch(0),o("Error: ".concat(e.t0.message),{variant:"error"}),a.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 E.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 E.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,o=e.values;return Object(g.jsx)(Ft.b,{children:Object(g.jsxs)(nt.a,{open:!0,onClose:t,"aria-labelledby":"form-dialog-title",children:[Object(g.jsx)(ot.a,{id:"form-dialog-title",children:"Buy new postage stamp"}),Object(g.jsxs)(rt.a,{children:[Object(g.jsx)(Ft.a,{component:Rt.a,required:!0,name:"depth",autoFocus:!0,label:"Depth",fullWidth:!0,className:n.field}),Object(g.jsx)(Ft.a,{component:Rt.a,required:!0,name:"amount",label:"Amount",fullWidth:!0,className:n.field}),Object(g.jsx)(Ft.a,{component:Rt.a,name:"label",label:"Label",fullWidth:!0,className:n.field})]}),Object(g.jsxs)(at.a,{children:[Object(g.jsx)(b.a,{onClick:t,variant:"contained",children:"Cancel"}),Object(g.jsx)("div",{className:n.wrapper,children:Object(g.jsxs)(b.a,{disabled:c||!r||!o.amount||!o.depth,type:"submit",variant:"contained",onClick:a,children:["Create",c&&Object(g.jsx)(Ge.a,{size:24,className:n.buttonProgress})]})})]}),Object(g.jsx)(rt.a,{children:Object(g.jsx)(ct.a,{children:"Please refer to the official Bee documentation to understand these values."})})]})})}})}var zt=n(591),qt=n(620),Mt=n(593),Vt=n(594),Zt=Object(j.a)((function(e){return Object(h.a)({dialog:{background:e.palette.background.default,borderRadius:0,width:"100%",maxWidth:"890px"},title:{color:"#606060",textAlign:"center"},select:{background:e.palette.background.paper,borderRadius:0,border:0},option:{height:"52px"},hint:{marginBottom:"16px"}})}));function Yt(e){var t=e.stamps,n=e.onSelect,r=e.onClose,c=Object(a.useState)(null),o=Object(C.a)(c,2),i=o[0],s=o[1],l=Zt();return Object(g.jsxs)(nt.a,{open:!0,onClose:r,"aria-labelledby":"form-dialog-title",fullWidth:!0,PaperProps:{className:l.dialog},children:[Object(g.jsx)(ot.a,{id:"form-dialog-title",className:l.title,children:"Select postage stamp"}),Object(g.jsx)(rt.a,{children:Object(g.jsx)(zt.a,{fullWidth:!0,children:Object(g.jsx)(qt.a,{onChange:function(e){return function(e){var n=t.find((function(t){return t.batchID===e}));n&&s(n)}(e.target.value)},fullWidth:!0,variant:"outlined",className:l.select,defaultValue:"",children:t.map((function(e){return Object(g.jsx)(Mt.a,{value:e.batchID,className:l.option,children:e.batchID.slice(0,8)},e.batchID)}))})})}),Object(g.jsx)(jt.a,{mb:2,children:Object(g.jsx)(rt.a,{children:Object(g.jsxs)(Me,{children:[Object(g.jsx)(b.a,{disabled:!i,onClick:function(){i&&(n(i),r())},variant:"contained",startIcon:Object(g.jsx)(Vt.a,{}),children:"Select"}),Object(g.jsx)(b.a,{onClick:r,variant:"contained",startIcon:Object(g.jsx)(Bt.a,{}),children:"Cancel"})]})})}),Object(g.jsx)(rt.a,{children:Object(g.jsxs)(m.a,{className:l.hint,children:["Please refer to the"," ",Object(g.jsx)("a",{href:"https://docs.ethswarm.org/docs/access-the-swarm/keep-your-data-alive#purchase-a-batch-of-stamps",target:"_blank",rel:"noreferrer",children:"official Bee documentation"})," ","to understand these values."]})})]})}var Ht=n(596),Gt=n(595),Kt=Object(j.a)((function(e){return Object(h.a)({header:{backgroundColor:e.palette.background.paper,marginBottom:e.spacing(.25),borderLeft:"".concat(e.spacing(.25),"px solid rgba(0,0,0,0)"),wordBreak:"break-word"},headerOpen:{borderLeft:"".concat(e.spacing(.25),"px solid ").concat(e.palette.primary.main)},openLinkIcon:{cursor:"pointer",padding:e.spacing(1),borderRadius:0,"&:hover":{backgroundColor:"#fcf2e8",color:e.palette.primary.main}},content:{marginTop:e.spacing(2),marginBottom:e.spacing(2)},keyMargin:{marginRight:e.spacing(1)},copyValue:{cursor:"pointer",padding:e.spacing(1),borderRadius:0,"&:hover":{backgroundColor:"#fcf2e8",color:e.palette.primary.main}}})}));function Xt(e){var t=e.label,n=e.value,r=Kt(),c=Object(a.useState)(!1),o=Object(C.a)(c,2),i=o[0],s=o[1];return Object(g.jsx)(J.a,{className:r.header,children:Object(g.jsx)(p.a,{container:!0,direction:"column",justifyContent:"space-between",alignItems:"stretch",children:Object(g.jsxs)(p.a,{container:!0,direction:"row",justifyContent:"space-between",alignItems:"center",children:[t&&Object(g.jsx)(m.a,{variant:"body1",children:t}),Object(g.jsx)(m.a,{variant:"body2",children:Object(g.jsxs)("div",{children:[Object(g.jsx)("span",{className:r.copyValue,children:Object(g.jsx)(re.a,{title:i?"Copied":"Copy",placement:"top",arrow:!0,onClose:function(){return s(!1)},children:Object(g.jsx)(ue.a,{text:n,children:Object(g.jsxs)("span",{onClick:function(){return s(!0)},children:[n.slice(0,19),"..."]})})})}),Object(g.jsx)(ce.a,{size:"small",className:r.openLinkIcon,children:Object(g.jsx)(Gt.a,{onClick:function(){return window.open(n)},strokeWidth:1})})]})})]})})})}function Jt(e){var t=e.uploadReference,n=e.onUploadNewClick;return Object(g.jsxs)(g.Fragment,{children:[Object(g.jsxs)(jt.a,{mb:4,children:[Object(g.jsx)(he,{label:"Swarm hash",value:t}),Object(g.jsx)(Xt,{label:"Share on Swarm Gateway",value:"https://gateway.ethswarm.org/access/".concat(t)})]}),Object(g.jsx)(jt.a,{mb:2,children:Object(g.jsx)(Me,{children:Object(g.jsx)(At,{onClick:n,iconType:Ht.a,children:"Back to Upload"})})}),Object(g.jsxs)(m.a,{children:["The Swarm Gateway is graciously provided by the Swarm Foundation. This service is under development and provided for testing purposes only. Learn more at"," ",Object(g.jsx)("a",{href:"https://gateway.ethswarm.org/",children:"https://gateway.ethswarm.org/"}),"."]})]})}function $t(e){var t=e.width,n=e.usage,a=Math.round(100*n),r=a+"%",c=98-a+"%";return Object(g.jsx)("div",{style:{display:"flex",alignItems:"center",height:"100%",width:t},children:Object(g.jsxs)("div",{style:{display:"flex",height:"4px",width:"100%"},children:[Object(g.jsx)("div",{style:{width:r,background:"#dd7200"}}),Object(g.jsx)("div",{style:{width:"2%"}}),Object(g.jsx)("div",{style:{width:c,background:"#c9c9c9"}})]})})}function Qt(e){var t=e.stamp,n=e.shorten;return Object(g.jsx)(jt.a,{p:2,width:"100%",children:Object(g.jsxs)(p.a,{container:!0,justifyContent:"space-between",alignItems:"center",direction:"row",children:[Object(g.jsx)(m.a,{variant:"subtitle2",children:n?t.batchID.slice(0,8):t.batchID}),Object(g.jsx)($t,{width:"100px",usage:t.usage})]})})}function en(e){var t=e.stamp;return Object(g.jsxs)(jt.a,{mb:4,children:[Object(g.jsx)(jt.a,{mb:.25,p:2,bgcolor:"background.paper",children:Object(g.jsx)(m.a,{variant:"subtitle2",children:"Associated postage stamp:"})}),Object(g.jsx)(jt.a,{bgcolor:"background.paper",children:Object(g.jsx)(Qt,{stamp:t,shorten:!0})})]})}var tn=n(597),nn=n(598),an=n(599);function rn(e){var t=e.canSelectStamp,n=e.hasSelectedStamp,a=e.onUpload,r=e.onBuy,c=e.onSelect,o=e.onCancel,i=e.onClearStamp,s=e.isUploading,l=!n,u=t&&!n,d=n,j=t&&n;return Object(g.jsxs)(g.Fragment,{children:[Object(g.jsxs)(Me,{children:[l?Object(g.jsx)(At,{onClick:r,iconType:tn.a,children:"Buy New Postage Stamp"}):null,u?Object(g.jsx)(At,{onClick:c,iconType:nn.a,children:"Use Existing Postage Stamp"}):null,d?Object(g.jsx)(At,{onClick:a,iconType:We.a,disabled:s,loading:s,children:"Upload To Your Node"}):null,j?Object(g.jsx)(At,{onClick:i,iconType:an.a,disabled:s,children:"Change Postage Stamp"}):null,Object(g.jsx)(b.a,{onClick:o,variant:"contained",startIcon:Object(g.jsx)(Bt.a,{}),children:"Cancel"})]}),u?Object(g.jsx)(m.a,{children:"You need a postage stamp to upload. Please refer to the official Bee documentation to understand how postage stamps work."}):null]})}var cn=n(207),on=n(600),sn=Object(j.a)((function(e){return Object(h.a)({areaWrapper:{position:"relative",marginBottom:e.spacing(2)},dropzone:{background:e.palette.background.default,outline:"none",color:"transparent",zIndex:1,"& svg":{opacity:0}},buttonWrapper:{top:"0",left:"0",position:"absolute",display:"flex",width:"100%",height:"100%",justifyContent:"center",alignItems:"center"},button:{marginLeft:e.spacing(.5),marginRight:e.spacing(.5),zIndex:2}})}));function ln(e){var t=e.setFiles,n=e.maximumSizeInBytes,a=sn(),r=Object(u.b)().enqueueSnackbar,c=function(){return document.querySelector(".MuiDropzoneArea-root input")};return Object(g.jsxs)(g.Fragment,{children:[Object(g.jsxs)("div",{className:a.areaWrapper,children:[Object(g.jsx)(cn.a,{dropzoneClass:a.dropzone,onChange:function(e){if(e){var n=e.map((function(e){return new Ot(e)})),a=1===e.length?e[0].name:pt(n)||void 0;if(e.length&&!a)return r("To upload a website, there must be an index.html or index.htm in the root of the folder.",{variant:"error"}),void function(e){t(e),setTimeout((function(){t([])}),0)}(n);t(n)}},filesLimit:1,maxFileSize:n,showPreviews:!1}),Object(g.jsx)("div",{className:a.buttonWrapper,children:Object(g.jsx)(At,{className:a.button,onClick:function(){var e=c();e&&(e.removeAttribute("directory"),e.removeAttribute("webkitdirectory"),e.removeAttribute("mozdirectory"),e.click())},iconType:on.a,children:"Add File"})})]}),Object(g.jsx)(m.a,{children:"You can click the button above or simply drag and drop to add a file."})]})}var un=Object(j.a)((function(e){return Object(h.a)({content:{marginTop:e.spacing(2)},loadingProgress:{textAlign:"center",padding:"50px"}})}));function dn(){var e=un(),t=Object(a.useState)(0),n=Object(C.a)(t,2),r=n[0],c=n[1],o=Object(a.useState)([]),i=Object(C.a)(o,2),s=i[0],l=i[1],d=Object(a.useState)(""),b=Object(C.a)(d,2),j=b[0],h=b[1],p=Object(a.useState)(!1),m=Object(C.a)(p,2),O=m[0],x=m[1],f=Object(a.useState)(!1),v=Object(C.a)(f,2),y=v[0],w=v[1],k=Object(a.useState)(null),S=Object(C.a)(k,2),B=S[0],N=S[1],A=Object(a.useState)(!1),T=Object(C.a)(A,2),L=T[0],P=T[1],I=Object(a.useContext)(It),D=I.stamps,E=I.refresh,F=Object(a.useContext)(V).beeApi,R=Object(u.b)().enqueueSnackbar;Object(a.useEffect)((function(){E()}),[]);var U=function(){l([]),N(null),P(!1)};return Object(g.jsxs)(g.Fragment,{children:[s.length?Object(g.jsx)(St,{files:s}):Object(g.jsx)(ln,{maximumSizeInBytes:1e9,setFiles:l}),null===B||j?null:Object(g.jsx)(en,{stamp:B}),s.length&&!j?Object(g.jsx)(rn,{canSelectStamp:null!==D&&D.length>0,hasSelectedStamp:null!==B,onCancel:U,onBuy:function(){return x(!0)},onSelect:function(){return w(!0)},onUpload:function(){if(F&&s.length&&B){var e=1===s.length?s[0].name:pt(s)||void 0;P(!0),F.uploadFiles(B.batchID,s,{indexDocument:e}).then((function(e){return h(e.reference)})).catch((function(e){return R("Error uploading: ".concat(e.message),{variant:"error"})})).finally((function(){return P(!1)}))}},onClearStamp:function(){return N(null)},isUploading:L}):null,Object(g.jsx)("div",{className:e.content,children:j&&Object(g.jsx)(Jt,{onUploadNewClick:function(){setTimeout((function(){U(),c(r+1),h("")}),0)},uploadReference:j})}),O?Object(g.jsx)(Wt,{onClose:function(){return x(!1)}}):null,D&&y?Object(g.jsx)(Yt,{stamps:D,onClose:function(){return w(!1)},onSelect:function(e){return N(e)}}):null]})}function bn(){return Object(a.useContext)(G).status.all?Object(g.jsx)(Ae,{values:[{label:"download",component:Object(g.jsx)(Lt,{})},{label:"upload",component:Object(g.jsx)(dn,{})}]}):Object(g.jsx)(v,{})}var jn=n(604),hn=n(603),pn=n(204),mn=n.n(pn),On=n(601);function xn(e){var t=Object(a.useState)(!1),n=Object(C.a)(t,2),r=n[0],c=n[1];return Object(g.jsxs)("div",{children:[Object(g.jsx)(ce.a,{color:"primary",size:"small",onClick:function(){c(!0)},children:Object(g.jsx)(On.a,{})}),Object(g.jsx)(nt.a,{onClose:function(){c(!1)},"aria-labelledby":"simple-dialog-title",open:r,children:Object(g.jsxs)("div",{style:{padding:"30px",textAlign:"center"},children:[Object(g.jsx)(ot.a,{id:"simple-dialog-title",children:e.label}),Object(g.jsx)(mn.a,{value:e.value,size:150,bgColor:"#ffffff",fgColor:"#000000",level:"L",includeMargin:!1,renderAs:"svg"})]})})]})}var gn=n(602);function fn(e){var t=e.value,n=Object(u.b)().enqueueSnackbar;return Object(g.jsx)("div",{style:{marginRight:"3px",marginLeft:"3px"},children:Object(g.jsx)(ce.a,{color:"primary",size:"small",onClick:function(){return n("Copied: ".concat(t),{variant:"success"})},children:Object(g.jsx)(le.CopyToClipboard,{text:t,children:Object(g.jsx)(gn.a,{style:{height:"20px"}})})})})}var vn=n(205),yn=n.n(vn);function wn(e){return Object(g.jsx)(m.a,{component:"div",variant:"subtitle1",children:e.address?Object(g.jsxs)("div",{style:{display:"flex"},children:[e.hideBlockie?null:Object(g.jsx)("div",{style:{paddingTop:"5px",marginRight:"10px"},children:Object(g.jsx)(yn.a,{size:20,string:e.address})}),Object(g.jsx)("div",{children:Object(g.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(g.jsx)(xn,{value:e.address,label:"Ethereum Address"}),Object(g.jsx)(fn,{value:e.address})]}):"-"})}function kn(e){var t=e.peerId,n=e.uncashedAmount,r=Object(a.useState)(!1),c=Object(C.a)(r,2),o=c[0],i=c[1],s=Object(a.useState)(!1),l=Object(C.a)(s,2),d=l[0],j=l[1],h=Object(u.b)().enqueueSnackbar,p=Object(a.useContext)(V).beeDebugApi,m=function(){i(!1)};return Object(g.jsxs)("div",{children:[Object(g.jsxs)(b.a,{variant:"contained",onClick:function(){i(!0)},startIcon:Object(g.jsx)(hn.a,{size:"1rem"}),children:["Cash out peer ",t.substr(0,8),"[\u2026]"]}),Object(g.jsxs)(nt.a,{open:o,onClose:m,"aria-labelledby":"form-dialog-title",children:[Object(g.jsx)(ot.a,{id:"form-dialog-title",children:"Cashout Cheque"}),Object(g.jsx)(rt.a,{children:Object(g.jsxs)(ct.a,{style:{marginTop:"20px",overflowWrap:"break-word"},children:[d&&Object(g.jsxs)(g.Fragment,{children:[Object(g.jsxs)("span",{children:["Cashing out ",Object(g.jsx)("strong",{children:n})," from Peer ",Object(g.jsx)("strong",{children:t}),". Please wait..."]}),Object(g.jsx)(jn.a,{style:{textAlign:"center",padding:"50px"},children:Object(g.jsx)(Ge.a,{})})]}),!d&&Object(g.jsxs)("span",{children:["Are you sure you want to cashout ",Object(g.jsxs)("strong",{children:[n," BZZ"]})," from Peer"," ",Object(g.jsx)("strong",{children:t}),"?"]})]})}),Object(g.jsxs)(at.a,{children:[Object(g.jsx)(b.a,{onClick:m,color:"primary",children:"Cancel"}),Object(g.jsx)(b.a,{onClick:function(){p&&(t?(j(!0),p.cashoutLastCheque(t).then((function(e){i(!1),h(Object(g.jsxs)("span",{children:["Successfully cashed out cheque. Transaction",Object(g.jsx)(wn,{hideBlockie:!0,transaction:!0,address:e})]}),{variant:"success"})})).catch((function(e){h(Object(g.jsxs)("span",{children:["Error: ",e.message]}),{variant:"error"})})).finally((function(){j(!1)}))):h(Object(g.jsx)("span",{children:"Peer Id invalid"}),{variant:"error"}))},color:"primary",disabled:d,children:"Yes Cashout"})]})]})]})}function Cn(e){var t=e.accounting,n=e.isLoadingUncashed,a=e.totalUncashed;return Object(g.jsxs)(ae,{label:"Peers (".concat((null===t||void 0===t?void 0:t.length)||0,")"),info:"".concat(a.toFixedDecimal()," BZZ (uncashed)"),children:[Object(g.jsx)(se,{label:"Uncashed Amount Total",value:"".concat(a.toFixedDecimal()," BZZ")}),null===t||void 0===t?void 0:t.map((function(e){var t=e.peer,a=e.balance,r=e.received,c=e.sent,o=e.uncashedAmount,i=e.total;return Object(g.jsxs)(ae,{label:"Peer ".concat(t.substr(0,8),"[\u2026]"),level:1,info:"".concat(o.toFixedDecimal()," BZZ (uncashed)"),children:[Object(g.jsx)(he,{label:"Peer ID",value:t}),Object(g.jsx)(se,{label:"Outstanding Balance",value:"".concat(a.toFixedDecimal()," BZZ")}),Object(g.jsx)(se,{label:"Settlements Sent / Received",value:"-".concat(c.toFixedDecimal()," / ").concat(r.toFixedDecimal()," BZZ")}),Object(g.jsx)(se,{label:"Total",value:"".concat(i.toFixedDecimal()," BZZ")}),Object(g.jsx)(se,{label:"Uncashed Amount",value:n?"loading\u2026":"".concat(o.toFixedDecimal()," BZZ")}),o.toBigNumber.isGreaterThan("0")&&Object(g.jsx)(Me,{children:Object(g.jsx)(kn,{uncashedAmount:o.toFixedDecimal(),peerId:t})})]},t)}))]})}var Sn=function(e,t,n){var r=Object(a.useState)(!1),c=Object(C.a)(r,2),o=c[0],i=c[1],s=Object(a.useState)(void 0),l=Object(C.a)(s,2),u=l[0],d=l[1];Object(a.useEffect)((function(){if(!o&&e&&t&&!u){i(!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(k.a)(w.a.mark((function a(r,c){var o,i;return w.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:o=0;case 1:if(!(o<t)){a.next=21;break}return a.prev=2,a.next=5,e();case 5:return i=a.sent,r(i),a.abrupt("return");case 10:if(a.prev=10,a.t0=a.catch(2),!(o<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:o++,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);d(t.fulfilled),i(!1)}))}}),[t,o,u,e]);var b=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 z("0"),received:new z("0"),uncashedAmount:new z("0"),total:n}})),t.forEach((function(e){var t=e.peer,n=e.sent,r=e.received;return a[t]=Object(S.a)(Object(S.a)({},a[t]),{},{sent:n,received:r,total:new z(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 z(n)})),Object.values(a).sort((function(e,t){var n=t.uncashedAmount.toBigNumber.minus(e.uncashedAmount.toBigNumber).toNumber();return 0!==n?n:e.peer<t.peer?-1:1}))):Object.values(a).sort((function(e,t){return e.peer<t.peer?-1:1}))}(n,null===t||void 0===t?void 0:t.settlements,u),j=new z("0");return null===b||void 0===b||b.forEach((function(e){var t=e.uncashedAmount;return j=new z(j.toBigNumber.plus(t.toBigNumber))})),{isLoadingUncashed:o,totalUncashed:j,accounting:b}},Bn=n(605);function Nn(){var e=Object(a.useContext)(V).beeDebugApi;return Object(g.jsx)(st,{successMessage:"Successful withdrawal.",errorMessage:"Error with withdrawing.",dialogMessage:"Specify the amount of BZZ you would like to withdraw from your node.",label:"Withdraw",icon:Object(g.jsx)(Bn.a,{size:"1rem"}),min:new D.BigNumber(0),action:function(t){if(!e)throw new Error("Bee Debug URL is not valid");return e.withdrawTokens(t.toString())}})}function An(){var e=Object(a.useContext)(G),t=e.status,n=e.nodeAddresses,r=e.chequebookAddress,c=e.chequebookBalance,o=e.settlements,i=e.peerBalances,s=Object(a.useContext)(V).beeDebugApi,l=Sn(s,o,i),u=l.accounting,d=l.totalUncashed,b=l.isLoadingUncashed;return t.all?Object(g.jsxs)("div",{children:[Object(g.jsxs)(ae,{label:"Chequebook",defaultOpen:!0,children:[Object(g.jsx)(se,{label:"Total Balance",value:"".concat(null===c||void 0===c?void 0:c.totalBalance.toFixedDecimal()," BZZ")}),Object(g.jsx)(se,{label:"Available Uncommitted Balance",value:"".concat(null===c||void 0===c?void 0:c.availableBalance.toFixedDecimal()," BZZ")}),Object(g.jsx)(se,{label:"Total Cheques Amount Sent",value:"".concat(null===o||void 0===o?void 0:o.totalSent.toFixedDecimal()," BZZ")}),Object(g.jsx)(se,{label:"Total Cheques Amount Received",value:"".concat(null===o||void 0===o?void 0:o.totalReceived.toFixedDecimal()," BZZ")}),Object(g.jsxs)(Me,{children:[Object(g.jsx)(Nn,{}),Object(g.jsx)(lt,{})]})]}),Object(g.jsxs)(ae,{label:"Blockchain",defaultOpen:!0,children:[Object(g.jsx)(he,{label:"Ethereum address",value:(null===n||void 0===n?void 0:n.ethereum)||""}),Object(g.jsx)(he,{label:"Chequebook contract address",value:(null===r||void 0===r?void 0:r.chequebookAddress)||""})]}),Object(g.jsx)(Cn,{accounting:u,isLoadingUncashed:b,totalUncashed:d})]}):Object(g.jsx)(v,{})}function Tn(){var e=Object(a.useContext)(V),t=e.apiUrl,n=e.apiDebugUrl,r=e.setApiUrl,c=e.setDebugApiUrl;return Object(g.jsxs)(ae,{label:"API Settings",defaultOpen:!0,children:[Object(g.jsx)(He,{label:"Bee API",value:t,onConfirm:r}),Object(g.jsx)(He,{label:"Bee Debug API",value:n,onConfirm:c})]})}var Ln=Object(j.a)((function(e){return Object(h.a)({root:{width:"100%",padding:0,margin:0,marginTop:e.spacing(4),"&:first-child":{marginTop:0}},rootLevel1:{marginTop:e.spacing(1)},rootLevel2:{marginTop:e.spacing(.5)},header:{backgroundColor:e.palette.background.paper},contentLevel0:{marginTop:e.spacing(1)},contentLevel12:{marginTop:e.spacing(.25)},infoText:{color:"#c9c9c9"}})}));function Pn(e){var t=e.children,n=e.expandable,r=e.defaultOpen,c=Ln(),o=Object(a.useState)(Boolean(r)),i=Object(C.a)(o,2),s=i[0],l=i[1];return Object(g.jsxs)("div",{className:"".concat(c.root," ").concat(c.rootLevel2),children:[Object(g.jsxs)(J.a,{button:!0,onClick:function(){l(!s)},className:c.header,children:[t,s?Object(g.jsx)(ee.a,{}):Object(g.jsx)(te.a,{})]}),Object(g.jsx)(Q.a,{in:s,timeout:"auto",unmountOnExit:!0,children:Object(g.jsx)("div",{className:c.contentLevel12,children:n})})]})}var In,Dn=function(e){var t=e.postageStamps;return null===t?null:Object(g.jsx)(ae,{label:"Postage Stamps",defaultOpen:!0,children:t.map((function(e){return Object(g.jsx)(Pn,{expandable:Object(g.jsx)(he,{label:"Batch ID",value:e.batchID}),children:Object(g.jsx)(Qt,{stamp:e,shorten:!0})},e.batchID)}))})},En=Object(j.a)((function(){return Object(h.a)({root:{width:"100%",display:"grid"},actions:{display:"flex",width:"100%",flex:"0 1 auto",flexWrap:"wrap",alignItems:"center"}})}));function Fn(){var e=En(),t=Object(a.useState)(!1),n=Object(C.a)(t,2),r=n[0],c=n[1],o=Object(a.useContext)(It),i=o.stamps,s=o.isLoading,l=o.error,u=o.start,d=o.stop,b=Object(a.useContext)(G).status;return Object(a.useEffect)((function(){if(b.all)return u(),function(){return d()}}),[b]),b.all?Object(g.jsxs)("div",{className:e.root,children:[l&&Object(g.jsxs)(jn.a,{style:{textAlign:"center",padding:"50px"},children:["Error loading postage stamps details: ",l.message]}),!l&&Object(g.jsxs)(g.Fragment,{children:[Object(g.jsxs)("div",{className:e.actions,children:[r?Object(g.jsx)(Wt,{onClose:function(){return c(!1)}}):null,Object(g.jsx)(At,{onClick:function(){return c(!0)},iconType:tn.a,children:"Buy New Postage Stamp"}),Object(g.jsx)("div",{style:{height:"5px"},children:s&&Object(g.jsx)(Ge.a,{})})]}),Object(g.jsx)(Dn,{postageStamps:i})]})]}):Object(g.jsx)(v,{})}!function(e){e.INFO="/",e.FILES="/files",e.ACCOUNTING="/accounting",e.SETTINGS="/settings",e.STAMPS="/stamps",e.STATUS="/status"}(In||(In={}));var Rn=function(){return Object(g.jsxs)(d.c,{children:[Object(g.jsx)(d.a,{exact:!0,path:In.FILES,component:bn}),Object(g.jsx)(d.a,{exact:!0,path:In.ACCOUNTING,component:An}),Object(g.jsx)(d.a,{exact:!0,path:In.SETTINGS,component:Tn}),Object(g.jsx)(d.a,{exact:!0,path:In.STAMPS,component:Fn}),Object(g.jsx)(d.a,{exact:!0,path:In.STATUS,component:bt}),Object(g.jsx)(d.a,{path:In.INFO,component:ve})]})},Un=n(209),_n=n(208),Wn=function(e){Object(Un.a)(n,e);var t=Object(_n.a)(n);function n(e){var a;return Object(P.a)(this,n),(a=t.call(this,e)).state={error:null},a}return Object(I.a)(n,[{key:"componentDidCatch",value:function(e,t){console.error({error:e,errorInfo:t})}},{key:"render",value:function(){return this.state.error?Object(g.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),zn=n(606),qn=n(126),Mn=n.n(qn),Vn=Object(j.a)((function(e){return Object(h.a)({root:{width:"100%",marginBottom:e.spacing(2)}})}));function Zn(){var e=Vn(),t=Object(a.useContext)(G),n=t.isLoading,r=t.latestUserVersionExact,c=Object(a.useState)(!0),o=Object(C.a)(c,2),i=o[0],s=o[1],l=q.SUPPORTED_BEE_VERSION_EXACT===r;return n||!r?null:Object(g.jsx)(Q.a,{in:!l&&i,children:Object(g.jsx)("div",{className:e.root,children:Object(g.jsxs)(ye.a,{severity:"warning",action:Object(g.jsx)(ce.a,{"aria-label":"close",color:"inherit",size:"small",onClick:function(){s(!1)},children:Object(g.jsx)(Mn.a,{fontSize:"inherit"})}),children:[Object(g.jsx)(zn.a,{children:"Warning"}),"Your Bee node version (",Object(g.jsx)("code",{children:r}),") does not exactly match the Bee version we tested the Bee Dashboard against (",Object(g.jsx)("code",{children:q.SUPPORTED_BEE_VERSION_EXACT}),"). Please note that some functionality may not work properly."]})})})}var Yn=n(613),Hn=n(592),Gn=n(614),Kn=n(609),Xn=n(610),Jn=n(611),$n=n(612),Qn=n(615),ea=n(6),ta=n(607),na=Object(ea.a)((function(e){return{root:{paddingLeft:e.spacing(4),paddingRight:e.spacing(4),borderLeft:"4px solid rgba(0,0,0,0)","&.Mui-selected, &.Mui-selected:hover":{borderLeft:"4px solid ".concat(e.palette.primary.main),backgroundColor:"#2c2c2c",color:"#f9f9f9"}},button:{"&:hover":{backgroundColor:"#2c2c2c",color:"#f9f9f9","@media (hover: none)":{backgroundColor:"#2c2c2c",color:"#f9f9f9"}}}}}))(J.a),aa=Object(j.a)((function(e){return Object(h.a)({icon:{color:"inherit"},activeIcon:{color:e.palette.primary.main}})}));function ra(e){var t=e.iconStart,n=e.iconEnd,a=e.path,r=e.label,c=aa(),o=Object(d.f)(),i=Boolean(Object(d.e)(o.pathname,{path:a,exact:!0}));return Object(g.jsxs)(na,{button:!0,selected:i,disableRipple:!0,children:[Object(g.jsx)(ta.a,{className:i?c.activeIcon:c.icon,children:t}),Object(g.jsx)($.a,{primary:r}),Object(g.jsx)(ta.a,{className:i?c.activeIcon:c.icon,children:n})]})}var ca=n(608),oa=Object(j.a)((function(e){return Object(h.a)({icon:{color:"inherit"},iconSmall:{height:e.spacing(2)},root:{height:e.spacing(4),paddingLeft:e.spacing(1),paddingRight:e.spacing(4),color:"#f9f9f9",borderLeft:"0px solid rgba(0,0,0,0)","&.Mui-selected, &.Mui-selected:hover":{borderLeft:"0px solid ".concat(e.palette.primary.main),backgroundColor:"#2c2c2c"}},rootError:{backgroundColor:"rgba(255, 58, 82, 0.25)"},button:{"&:hover":{backgroundColor:"#2c2c2c",color:"white","@media (hover: none)":{backgroundColor:"#2c2c2c",color:"white"}}},smallerText:{fontSize:"0.9rem"}})}));function ia(e){var t=e.path,n=Object(a.useContext)(G),r=n.status,c=n.isLoading,o=oa(),i=Object(d.f)(),s=Boolean(Object(d.e)(i.pathname,{path:t,exact:!0}));return Object(g.jsxs)(J.a,{button:!0,classes:{root:"".concat(o.root," ").concat(r.all?"":o.rootError),button:o.button},selected:s,disableRipple:!0,children:[Object(g.jsx)(ta.a,{style:{marginLeft:"30px"},children:Object(g.jsx)(Ke,{isOk:r.all,isLoading:c})}),Object(g.jsx)($.a,{primary:Object(g.jsx)(m.a,{className:o.smallerText,children:"Node ".concat(r.all?"OK":"Error")})}),Object(g.jsx)(ta.a,{className:o.icon,children:r.all?null:Object(g.jsx)(ca.a,{className:o.iconSmall})})]})}var sa=n.p+"static/media/logo.3d1155fe.svg",la=[{label:"Info",path:In.INFO,icon:Kn.a},{label:"Files",path:In.FILES,icon:Xn.a},{label:"Stamps",path:In.STAMPS,icon:nn.a},{label:"Accounting",path:In.ACCOUNTING,icon:Jn.a},{label:"Settings",path:In.SETTINGS,icon:$n.a}],ua=Object(j.a)((function(e){return Object(h.a)({root:{flexWrap:"nowrap",minHeight:"100vh",paddingTop:e.spacing(8),paddingBottom:e.spacing(8)},drawer:{width:300,flexShrink:0},drawerPaper:{width:300,backgroundColor:"#212121"},logo:{marginLeft:e.spacing(8),marginRight:e.spacing(8)},icon:{height:e.spacing(4)},iconSmall:{height:e.spacing(2)},divider:{backgroundColor:"#2c2c2c",marginLeft:e.spacing(4),marginRight:e.spacing(4)},link:{color:"#9f9f9f",textDecoration:"none","&:hover":{textDecoration:"none","@media (hover: none)":{textDecoration:"none"}}}})}));function da(){var e=ua();return Object(g.jsx)(Yn.a,{className:e.drawer,variant:"permanent",anchor:"left",classes:{paper:e.drawerPaper},children:Object(g.jsxs)(p.a,{container:!0,direction:"column",justifyContent:"space-between",className:e.root,children:[Object(g.jsx)(p.a,{className:e.logo,children:Object(g.jsx)(i.b,{to:In.INFO,children:Object(g.jsx)("img",{alt:"swarm",src:sa})})}),Object(g.jsxs)(p.a,{children:[Object(g.jsx)(Hn.a,{children:la.map((function(t){return Object(g.jsx)(i.b,{to:t.path,className:e.link,children:Object(g.jsx)(ra,{iconStart:Object(g.jsx)(t.icon,{className:e.icon}),path:t.path,label:t.label},t.path)},t.path)}))}),Object(g.jsx)(Gn.a,{className:e.divider}),Object(g.jsx)(Hn.a,{children:Object(g.jsx)(O.a,{href:"https://docs.ethswarm.org/docs/",target:"_blank",className:e.link,children:Object(g.jsx)(ra,{iconStart:Object(g.jsx)(Qn.a,{className:e.icon}),iconEnd:Object(g.jsx)(Gt.a,{className:e.iconSmall}),label:Object(g.jsx)("span",{children:"Docs"})})})})]}),Object(g.jsx)(p.a,{children:Object(g.jsx)(i.b,{to:In.STATUS,className:e.link,children:Object(g.jsx)(ia,{path:In.STATUS})})})]})})}var ba,ja=Object(j.a)((function(e){return Object(h.a)({content:{backgroundColor:e.palette.background.default,minHeight:"100vh"}})})),ha=function(e){var t=ja(),n=Object(a.useContext)(G).isLoading;return Object(g.jsxs)("div",{style:{display:"flex"},children:[Object(g.jsx)(da,{}),Object(g.jsx)(jn.a,{className:t.content,children:Object(g.jsx)(Wn,{children:Object(g.jsxs)(g.Fragment,{children:[Object(g.jsx)(Zn,{}),n?Object(g.jsx)("div",{style:{textAlign:"center",width:"100%"},children:Object(g.jsx)(Ge.a,{})}):e.children]})})})]})},pa=n(206),ma=n(128),Oa=Object(pa.a)({palette:{type:"light",background:{default:"#efefef"},primary:{light:"#fcf2e8",main:"#dd7700",dark:ma.a[800]},secondary:{main:"#333333"}},typography:{fontFamily:["Work Sans","Montserrat","Nunito","Roboto",'"Helvetica Neue"',"Arial","sans-serif"].join(","),h1:{fontSize:"1.3rem",fontWeight:500},h2:{fontSize:"1rem",fontWeight:500},h3:{fontSize:"0.8rem",fontWeight:500},body2:{fontFamily:'"IBM Plex Mono", monospace',fontWeight:500,fontSize:"1rem"}}});Oa.overrides={MuiListItem:{button:{"&:hover":{backgroundColor:"#fcf2e8",color:(ba=Oa).palette.primary.main,"@media (hover: none)":{backgroundColor:"#fcf2e8",color:ba.palette.primary.main}}}},MuiContainer:{root:{padding:ba.spacing(8)},maxWidthXs:{padding:ba.spacing(8)},maxWidthSm:{padding:ba.spacing(8)},maxWidthMd:{padding:ba.spacing(8)},maxWidthLg:{padding:ba.spacing(8)},maxWidthXl:{padding:ba.spacing(8)}},MuiButton:{startIcon:{marginLeft:ba.spacing(1)},endIcon:{marginRight:ba.spacing(1)},outlined:{border:"none",borderRadius:ba.spacing(10),color:ba.palette.primary.main,backgroundColor:"#fcf2e8"},outlinedSizeSmall:{padding:ba.spacing(1),paddingLeft:ba.spacing(2),paddingRight:ba.spacing(2),boxShadow:"none","&:hover":{backgroundColor:ba.palette.primary.main,color:"white",boxShadow:"none","@media (hover: none)":{backgroundColor:ba.palette.primary.main,color:"white",boxShadow:"none"}}},outlinedSizeLarge:{padding:ba.spacing(4),borderRadius:0,boxShadow:"none","&:hover":{backgroundColor:ba.palette.primary.main,color:"white",boxShadow:"none","@media (hover: none)":{backgroundColor:ba.palette.primary.main,color:"white",boxShadow:"none"}}},containedSizeLarge:{padding:ba.spacing(4),borderRadius:0,boxShadow:"none","&:hover":{backgroundColor:ba.palette.primary.main,color:"white",boxShadow:"none","@media (hover: none)":{backgroundColor:ba.palette.primary.main,color:"white",boxShadow:"none"}}},containedSizeSmall:{padding:ba.spacing(1),paddingLeft:ba.spacing(2),paddingRight:ba.spacing(2),borderRadius:0,boxShadow:"none","&:hover":{backgroundColor:ba.palette.primary.main,color:"white",boxShadow:"none","@media (hover: none)":{backgroundColor:ba.palette.primary.main,color:"white",boxShadow:"none"}}},contained:{padding:ba.spacing(2),backgroundColor:"white",boxShadow:"none",borderRadius:0,"&:hover":{backgroundColor:ba.palette.primary.main,color:"white",boxShadow:"none","@media (hover: none)":{backgroundColor:ba.palette.primary.main,color:"white",boxShadow:"none"}},"&:focus":{backgroundColor:ba.palette.primary.main,color:"white"},"&:active":{backgroundColor:ba.palette.primary.main,color:"white"},"&:disabled":{backgroundColor:"white"}}},MuiTab:{root:{backgroundColor:ba.palette.background.paper,"&:hover":{backgroundColor:"#fcf2e8",color:ba.palette.primary.main,opacity:1},"&$selected":{fontWeight:ba.typography.fontWeightMedium}},textColorInherit:{opacity:.5}},MuiTabs:{root:{borderBottom:"none"},indicator:{backgroundColor:"transparent"}}},Oa.props={MuiTab:{disableRipple:!0},MuiButtonBase:{disableRipple:!0}};var xa=function(){return Object(g.jsx)("div",{className:"App",children:Object(g.jsx)(s.a,{theme:Oa,children:Object(g.jsx)(Z,{children:Object(g.jsx)(X,{children:Object(g.jsx)(Et,{children:Object(g.jsx)(Fe,{children:Object(g.jsx)(u.a,{children:Object(g.jsx)(i.a,{children:Object(g.jsxs)(g.Fragment,{children:[Object(g.jsx)(l.a,{}),Object(g.jsx)(ha,{children:Object(g.jsx)(Rn,{})})]})})})})})})})})})},ga=function(e){e&&e instanceof Function&&n.e(3).then(n.bind(null,626)).then((function(t){var n=t.getCLS,a=t.getFID,r=t.getFCP,c=t.getLCP,o=t.getTTFB;n(e),a(e),r(e),c(e),o(e)}))};o.a.render(Object(g.jsx)(r.a.StrictMode,{children:Object(g.jsx)(xa,{})}),document.getElementById("root")),ga()}},[[520,1,2]]]);
2
+ //# sourceMappingURL=main.64e0d8b1.chunk.js.map