diff --git a/hostd/assets/404.html b/hostd/assets/404.html index e8fd0978f..b291496c1 100644 --- a/hostd/assets/404.html +++ b/hostd/assets/404.html @@ -1 +1 @@ -
0&&k 0&&k>1,c=-7,d=n?i-1:0,f=n?-1:1,h=e[t+d];for(d+=f,o=h&(1<<-c)-1,h>>=-c,c+=s;c>0;o=256*o+e[t+d],d+=f,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=r;c>0;a=256*a+e[t+d],d+=f,c-=8);if(0===o)o=1-u;else{if(o===l)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,r),o-=u}return(h?-1:1)*a*Math.pow(2,o-r)},t.write=function(e,t,n,r,i,o){var a,s,l,u=8*o-i-1,c=(1<>1,f=23===i?5960464477539062e-23:0,h=r?0:o-1,p=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(isNaN(t=Math.abs(t))||t===1/0?(s=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),a+d>=1?t+=f/l:t+=f*Math.pow(2,1-d),t*l>=2&&(a++,l/=2),a+d>=c?(s=0,a=c):a+d>=1?(s=(t*l-1)*Math.pow(2,i),a+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,i),a=0));i>=8;e[n+h]=255&s,h+=p,s/=256,i-=8);for(a=a<0;e[n+h]=255&a,h+=p,a/=256,u-=8);e[n+h-p]|=128*m}},39515:function(e,t,n){var r=n(38761)(n(37772),"DataView");e.exports=r},89612:function(e,t,n){var r=n(52118),i=n(96909),o=n(98138),a=n(4174),s=n(7942);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t0&&i>0&&g({width:p,height:i,margin:s})},[g,p,i,s]);var x=w4({source:wJ});return(Eo({dataKey:"nearest"===(void 0===f?"nearest":f)?Ei:Er,onPointerMove:l,onPointerOut:u,onPointerUp:c,onPointerDown:d,allowedSources:kt}),g)?null==p||null==i?ef.createElement(jG.Z,null,function(t){return ef.createElement(kn,j9({},e,{width:null==e.width?t.width:e.width,height:null==e.height?t.height:e.height}))}):null==y?ef.createElement(jQ,null,ef.createElement(kn,e)):null==b?ef.createElement(jK,null,ef.createElement(kn,e)):p>0&&i>0?ef.createElement("svg",{width:p,height:i,"aria-label":void 0===t?"XYChart":t},r,(void 0===n||n)&&ef.createElement("rect",j9({x:s.left,y:s.top,width:p-s.left-s.right,height:i-s.top-s.bottom,fill:"transparent"},x))):null:m&&v?ef.createElement(j7,{xScale:m,yScale:v,theme:h,initialDimensions:{width:p,height:i,margin:s},horizontal:o},ef.createElement(kn,e)):(console.warn("[@visx/xychart] XYChart: When no DataProvider is available in context, you must pass xScale & yScale config to XYChart."),null)}function kr(e){return ef.createElement(Ep,e)}function ki(e){return ef.createElement(EL,e)}function ko(){return(ko=Object.assign?Object.assign.bind():function(e){for(var t=1;t{e.stopPropagation(),i(n)},children:(0,ed.jsx)(lL.xVB,{})}),(0,ed.jsx)(lD,{icon:s?"contrast":"hover",tip:"".concat(t,": hide all"),variant:"ghost",onClick:e=>{e.stopPropagation(),o(n)},children:(0,ed.jsx)(lL.pHg,{})})]})]})}function Tn(e){let{title:t,children:n}=e;return(0,ed.jsxs)("div",{className:"flex flex-col gap-6",children:[t&&(0,ed.jsx)(dm,{anchorLink:!0,size:"24",children:t}),(0,ed.jsx)(nA,{className:"p-6",children:(0,ed.jsx)("div",{className:"flex flex-col gap-6",children:n})})]})}function Tr(e){let{title:t,description:n,control:r}=e;return(0,ed.jsxs)("div",{className:"flex gap-10 justify-between",children:[(0,ed.jsxs)("div",{className:"flex flex-col gap-2 max-w-[600px]",children:[(0,ed.jsx)(dm,{size:"20",children:t}),(0,ed.jsx)(nC,{size:"14",children:n})]}),(0,ed.jsx)("div",{className:"",children:r})]})}function Ti(e){let{open:t,params:n,trigger:r,onOpenChange:i}=e,{body:o,title:a,variant:s,action:l,onConfirm:u}=n||{},c=(0,M2.cI)(),d=(0,ef.useCallback)(()=>{u&&u(),i(!1)},[u,i]);return(0,ed.jsx)(uR,{title:a,trigger:r,open:t,onOpenChange:i,contentVariants:{className:"w-[400px]"},children:(0,ed.jsx)("form",{onSubmit:c.handleSubmit(d),children:(0,ed.jsxs)("div",{className:"flex flex-col gap-4",children:[o,(0,ed.jsx)("div",{className:"flex gap-1 justify-end",children:(0,ed.jsx)(_x,{variant:s,form:c,size:"small",children:l})})]})})})}function To(e){let{name:t,peerCount:n,isSynced:r,nodeBlockHeight:i,connectPeer:o}=e;return(0,ed.jsxs)("div",{className:"flex justify-between items-center",children:[(0,ed.jsx)(n_,{font:"mono",weight:"bold",size:"20",children:t}),(0,ed.jsxs)("div",{className:"flex items-center",children:[n?(0,ed.jsxs)(lD,{className:"relative left-2 only:left-0",variant:"ghost",onClick:o,tip:"".concat(n," connected peers"),children:[(0,ed.jsx)(n_,{color:"subtle",children:n.toLocaleString()}),(0,ed.jsx)(lL.RK4,{})]}):null,i&&r?(0,ed.jsx)(lN,{content:"Blockchain is synced",children:(0,ed.jsx)("div",{className:"relative left-2",children:(0,ed.jsxs)(lD,{variant:"ghost",state:"waiting",children:[(0,ed.jsx)(n_,{color:"subtle",children:i.toLocaleString()}),(0,ed.jsx)(n_,{color:"green",children:(0,ed.jsx)(lL.Y3p,{})})]})})}):null]})]})}function Ta(e){let{nodeBlockHeight:t,networkBlockHeight:n,moreThan100BlocksToSync:r,percent:i}=e;return(0,ed.jsxs)("div",{className:"flex flex-col justify-between h-full mb-1",children:[(0,ed.jsx)(d9,{variant:"accent",value:t&&n?t:0,max:n||1,className:""}),(0,ed.jsxs)("div",{className:"flex justify-between mt-1.5",children:[(0,ed.jsx)(n_,{color:"subtle",size:"10",children:"Syncing..."}),t&&n?r?(0,ed.jsx)(n_,{color:"subtle",size:"10",children:"".concat(t.toLocaleString()," / ").concat(n.toLocaleString()," (").concat(i,"%)")}):(0,ed.jsx)(n_,{color:"subtle",size:"10",children:"(".concat(i,"%)")}):null]})]})}function Ts(e){let{name:t,peerCount:n,connectPeer:r,isSynced:i,syncPercent:o,nodeBlockHeight:a,estimatedBlockHeight:s,firstTimeSyncing:l,moreThan100BlocksToSync:u,children:c}=e;return(0,ed.jsx)(pr,{rootProps:{openDelay:100,closeDelay:1e3},contentProps:{side:"right",align:"start",sideOffset:5,className:"!max-w-none"},trigger:(0,ed.jsxs)("div",{className:"relative hover:scale-105 transition-transform",children:[i||100===o||0===o?null:(0,ed.jsx)("div",{className:"absolute -bottom-2.5 w-full flex justify-center",children:(0,ed.jsxs)(n_,{className:"bg-amber-500 py-px px-1 rounded-sm scale-75",size:"10",children:[o,"%"]})}),(0,ed.jsx)(d_,{size:30})]}),children:(0,ed.jsxs)("div",{className:"flex flex-col gap-2 px-1 pt-1 pb-2 w-[350px]",children:[(0,ed.jsx)(To,{nodeBlockHeight:a,isSynced:i,name:t,peerCount:n,connectPeer:r}),i?(0,ed.jsx)(c6,{className:"w-full mb-0.5"}):(0,ed.jsx)(Ta,{percent:o,nodeBlockHeight:a,networkBlockHeight:s,moreThan100BlocksToSync:u}),l&&(0,ed.jsxs)(ed.Fragment,{children:[(0,ed.jsx)(n_,{color:"contrast",size:"14",children:"Welcome to Sia! The blockchain is syncing to the current network height. Depending on your system this process may take a while."}),(0,ed.jsx)(c6,{className:"w-full mb-1"})]}),c]})})}function Tl(e){let{testnetName:t}=e;return(0,ed.jsxs)("div",{className:"flex gap-2 items-center justify-center py-2 px-3 bg-amber-600 dark:bg-amber-500",children:[(0,ed.jsx)(n_,{color:"lo",children:(0,ed.jsx)(lL.RdX,{})}),(0,ed.jsxs)(n_,{size:"14",color:"lo",children:["You are on the ",t,"."]})]})}function Tu(e){let{type:t,label:n,link:r,tip:i,icon:o,value:a,onClick:s,decimalsLimit:l,units:u}=e;return(0,ed.jsxs)("div",{className:"flex justify-between items-center",children:[(0,ed.jsx)(lN,{align:"start",side:"bottom",content:i,children:(0,ed.jsxs)("div",{className:"flex gap-1 items-center relative overflow-hidden",children:[(0,ed.jsx)(n_,{className:"flex relative",children:o||(0,ed.jsx)(lL.RdX,{})}),(0,ed.jsx)(n_,{size:"12",ellipsis:!0,children:r?(0,ed.jsx)(dS,{href:r,target:"_blank",children:n}):n})]})}),(0,ed.jsx)("div",{className:(0,eX.cx)("flex items-center",s?"cursor-pointer":""),onClick:()=>{s&&s(a)},children:"siacoin"===t?(0,ed.jsx)(O$,{value:a,variant:"value",size:"12",fixed:l,dynamicUnits:!1,showTooltip:!1}):(0,ed.jsx)(OX,{value:a,variant:"value",size:"12",format:e=>"".concat(f0(e,l)," ").concat(u)})})]})}function Tc(e){let{name:t,form:n,fields:r}=e,i=r[t],{average:o,suggestion:a,placeholder:s,units:l,suggestionTip:u,averageTip:c,after:d,decimalsLimitSc:f=6,decimalsLimitFiat:h=6,tipsDecimalsLimitSc:p=0}=i,{setValue:m,value:v,error:g}=M8({name:t,field:i,form:n}),y=(0,ef.useMemo)(()=>s?new(fJ())(s):a&&"boolean"!=typeof a?new(fJ())(a):void 0,[s,a]);return(0,ed.jsxs)("div",{className:"flex flex-col gap-3 items-end",children:[(0,ed.jsxs)("div",{className:"flex flex-col gap-3 w-[250px]",children:[(0,ed.jsx)(f5,{name:t,size:"small",sc:v,units:l,decimalsLimitSc:f,decimalsLimitFiat:h,error:g,changed:n.formState.dirtyFields[t],placeholder:y,onChange:e=>{m(e,!0)},onBlur:()=>{m(v,!0)}}),o&&(0,ed.jsx)(Tu,{type:"siacoin",label:"Network average",tip:c||"Averages provided by Sia Central.",decimalsLimit:p,value:(0,gX.qN)(o),onClick:()=>{m(o,!0)}}),a&&u&&(0,ed.jsx)(Tu,{type:"siacoin",label:"Suggestion",tip:u,decimalsLimit:p,value:(0,gX.qN)(a),onClick:()=>{m(a,!0)}}),(0,ed.jsx)(d||(()=>null),{name:t,form:n,fields:r})]}),(0,ed.jsx)("div",{className:"h-[20px]",children:(0,ed.jsx)(_y,{form:n,name:t})})]})}function Td(e){let{name:t,form:n,fields:r}=e,i=r[t],{average:o,averageTip:a,suggestion:s,suggestionTip:l,decimalsLimit:u=2,placeholder:c,units:d}=i,{setValue:f,value:h,error:p}=M8({form:n,field:i,name:t}),m=(0,ef.useMemo)(()=>c?new(fJ())(c):s&&"boolean"!=typeof s?new(fJ())(s):void 0,[c,s]);return(0,ed.jsxs)("div",{className:"flex flex-col gap-3 items-end",children:[(0,ed.jsxs)("div",{className:"flex flex-col gap-3 w-[250px]",children:[(0,ed.jsx)(f1,{name:t,value:h,units:d,decimalsLimit:u,placeholder:m,state:p?"invalid":n.formState.dirtyFields[t]?"valid":"default",onChange:e=>{f(void 0!==e?new(fJ())(e):void 0,!0)},onBlur:()=>{f(h,!0)}}),(0,ed.jsxs)("div",{className:"flex flex-col gap-2",children:[o&&(0,ed.jsx)(Tu,{type:"number",label:"Network average",tip:a||"Averages provided by Sia Central.",decimalsLimit:u,value:o,units:d,onClick:()=>{f(o,!0)}}),s&&l&&(0,ed.jsx)(Tu,{type:"number",label:"Suggestion",tip:l,decimalsLimit:u,value:s,units:d,onClick:()=>{f(s,!0)}})]})]}),(0,ed.jsx)("div",{className:"h-[20px]",children:(0,ed.jsx)(_y,{form:n,name:t})})]})}function Tf(e){let{label:t,link:n,tip:r,value:i,onClick:o}=e;return(0,ed.jsxs)("div",{className:"flex justify-between items-center",children:[(0,ed.jsx)(lN,{align:"start",side:"bottom",content:r,children:(0,ed.jsxs)("div",{className:"flex gap-1 items-center relative overflow-hidden",children:[(0,ed.jsx)(n_,{className:"flex relative",children:(0,ed.jsx)(lL.RdX,{})}),(0,ed.jsx)(n_,{size:"12",children:n?(0,ed.jsx)(dS,{href:n,target:"_blank",children:t}):t})]})}),(0,ed.jsx)("div",{className:"flex cursor-pointer items-center",onClick:o,children:(0,ed.jsx)(n_,{size:"12",children:(0,ed.jsx)(l1,{children:i})})})]})}function Th(e){let{name:t,form:n,fields:r,type:i}=e,o=r[t],{placeholder:a,suggestion:s,suggestionTip:l}=o,{ref:u,onChange:c,setValue:d,onBlur:f,error:h}=M8({name:t,form:n,field:o});return(0,ed.jsxs)("div",{className:"flex flex-col gap-3 items-end",children:[(0,ed.jsxs)("div",{className:"flex flex-col gap-3 w-[250px]",children:[(0,ed.jsx)(fO,{ref:u,name:t,placeholder:a,type:i,state:h?"invalid":n.formState.dirtyFields[t]?"valid":"default",onChange:c,onBlur:f}),(0,ed.jsx)("div",{className:"flex flex-col gap-2",children:s&&l&&(0,ed.jsx)(Tf,{label:"Suggestion",tip:l,value:s,onClick:()=>{d(s,!0)}})})]}),(0,ed.jsx)("div",{className:"h-[20px]",children:(0,ed.jsx)(_y,{form:n,name:t})})]})}function Tp(e){let{name:t,form:n,fields:r}=e,i=r[t],{suggestion:o,suggestionTip:a}=i,{setValue:s,value:l,error:u}=M8({name:t,field:i,form:n});return(0,ed.jsxs)("div",{className:"flex flex-col gap-3 items-end",children:[(0,ed.jsxs)("div",{className:"flex flex-col gap-3 w-[250px]",children:[(0,ed.jsx)("div",{className:"flex justify-end w-full",children:(0,ed.jsx)(hv,{name:t,size:"medium",checked:l,state:u?"invalid":n.formState.dirtyFields[t]?"valid":"default",onCheckedChange:e=>{s(e,!0)},onBlur:()=>{s(l,!0)}})}),(0,ed.jsx)("div",{className:"flex flex-col gap-2",children:void 0!==o&&a&&(0,ed.jsx)(Tf,{label:"Suggestion",tip:a,value:o?"on":"off",onClick:()=>{s(o,!0)}})})]}),(0,ed.jsx)("div",{className:"h-[20px]",children:(0,ed.jsx)(_y,{form:n,name:t})})]})}function Tm(e){let{name:t,form:n,fields:r}=e,i=r[t],{options:o,suggestion:a,suggestionTip:s}=i,{ref:l,onChange:u,setValue:c,onBlur:d,value:f,error:h}=M8({name:t,form:n,field:i});return(0,ed.jsxs)("div",{className:"flex flex-col gap-3 items-end",children:[(0,ed.jsxs)("div",{className:"flex flex-col gap-3 w-[250px]",children:[(0,ed.jsx)("div",{className:"flex justify-end w-full",children:(0,ed.jsx)(f9,{ref:l,name:t,size:"small",value:f,state:h?"invalid":n.formState.dirtyFields[t]?"valid":"default",onChange:u,onBlur:d,children:null==o?void 0:o.map(e=>(0,ed.jsx)(he,{value:e.value,children:e.label},e.value))})}),(0,ed.jsx)("div",{className:"flex flex-col gap-2",children:void 0!==a&&s&&(0,ed.jsx)(Tf,{label:"Suggestion",tip:s,value:a?"on":"off",onClick:()=>{c(a,!0)}})})]}),(0,ed.jsx)("div",{className:"h-[20px]",children:(0,ed.jsx)(_y,{form:n,name:t})})]})}function Tv(e){let{title:t,category:n,form:r,fields:i}=e,o=Object.entries(i).filter(e=>{let[t,i]=e;return i.category===n&&!i.hidden&&(!i.show||i.show(r.getValues()))});return 0===o.length?null:(0,ed.jsx)(Tn,{title:t,children:o.map((e,t)=>{let[n,a]=e;return(0,ed.jsxs)(ef.Fragment,{children:[(0,ed.jsx)(Tr,{title:a.title,description:a.description,control:"number"===a.type?(0,ed.jsx)(Td,{form:r,name:n,fields:i}):"siacoin"===a.type?(0,ed.jsx)(Tc,{form:r,name:n,fields:i}):"text"===a.type?(0,ed.jsx)(Th,{form:r,name:n,fields:i}):"password"===a.type?(0,ed.jsx)(Th,{form:r,type:"password",fields:i,name:n}):"boolean"===a.type?(0,ed.jsx)(Tp,{form:r,name:n,fields:i}):"select"===a.type?(0,ed.jsx)(Tm,{form:r,name:n,fields:i}):null}),t