diff --git a/hostd/assets/404.html b/hostd/assets/404.html index 42c8cdca9..c672fa3bb 100644 --- a/hostd/assets/404.html +++ b/hostd/assets/404.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/hostd/assets/_next/static/xFJbN4XtjpSNszXHiQONK/_buildManifest.js b/hostd/assets/_next/static/bAS1nGr3emIeMnvTm1rWQ/_buildManifest.js similarity index 100% rename from hostd/assets/_next/static/xFJbN4XtjpSNszXHiQONK/_buildManifest.js rename to hostd/assets/_next/static/bAS1nGr3emIeMnvTm1rWQ/_buildManifest.js diff --git a/hostd/assets/_next/static/xFJbN4XtjpSNszXHiQONK/_ssgManifest.js b/hostd/assets/_next/static/bAS1nGr3emIeMnvTm1rWQ/_ssgManifest.js similarity index 100% rename from hostd/assets/_next/static/xFJbN4XtjpSNszXHiQONK/_ssgManifest.js rename to hostd/assets/_next/static/bAS1nGr3emIeMnvTm1rWQ/_ssgManifest.js diff --git a/hostd/assets/_next/static/chunks/pages/_app-2bb66a937c3b6491.js b/hostd/assets/_next/static/chunks/pages/_app-b516cd040637730b.js similarity index 96% rename from hostd/assets/_next/static/chunks/pages/_app-2bb66a937c3b6491.js rename to hostd/assets/_next/static/chunks/pages/_app-b516cd040637730b.js index 77cc979cf..7821a397c 100644 --- a/hostd/assets/_next/static/chunks/pages/_app-2bb66a937c3b6491.js +++ b/hostd/assets/_next/static/chunks/pages/_app-b516cd040637730b.js @@ -14,7 +14,7 @@ * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,i=n?Symbol.for("react.portal"):60106,o=n?Symbol.for("react.fragment"):60107,a=n?Symbol.for("react.strict_mode"):60108,s=n?Symbol.for("react.profiler"):60114,l=n?Symbol.for("react.provider"):60109,u=n?Symbol.for("react.context"):60110,c=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.concurrent_mode"):60111,f=n?Symbol.for("react.forward_ref"):60112,h=n?Symbol.for("react.suspense"):60113,p=n?Symbol.for("react.suspense_list"):60120,m=n?Symbol.for("react.memo"):60115,v=n?Symbol.for("react.lazy"):60116,g=n?Symbol.for("react.block"):60121,y=n?Symbol.for("react.fundamental"):60117,b=n?Symbol.for("react.responder"):60118,x=n?Symbol.for("react.scope"):60119;function w(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case c:case d:case o:case s:case a:case h:return e;default:switch(e=e&&e.$$typeof){case u:case f:case v:case m:case l:return e;default:return t}}case i:return t}}}function E(e){return w(e)===d}t.AsyncMode=c,t.ConcurrentMode=d,t.ContextConsumer=u,t.ContextProvider=l,t.Element=r,t.ForwardRef=f,t.Fragment=o,t.Lazy=v,t.Memo=m,t.Portal=i,t.Profiler=s,t.StrictMode=a,t.Suspense=h,t.isAsyncMode=function(e){return E(e)||w(e)===c},t.isConcurrentMode=E,t.isContextConsumer=function(e){return w(e)===u},t.isContextProvider=function(e){return w(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return w(e)===f},t.isFragment=function(e){return w(e)===o},t.isLazy=function(e){return w(e)===v},t.isMemo=function(e){return w(e)===m},t.isPortal=function(e){return w(e)===i},t.isProfiler=function(e){return w(e)===s},t.isStrictMode=function(e){return w(e)===a},t.isSuspense=function(e){return w(e)===h},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===d||e===s||e===a||e===h||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===v||e.$$typeof===m||e.$$typeof===l||e.$$typeof===u||e.$$typeof===f||e.$$typeof===y||e.$$typeof===b||e.$$typeof===x||e.$$typeof===g)},t.typeOf=w},73887:function(e,t,n){"use strict";e.exports=n(43459)},62333:function(e,t){/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */t.read=function(e,t,n,r,i){var o,a,s=8*i-r-1,l=(1<>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:(h?-1:1)*(1/0);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();++t-1}},34893:function(e){e.exports=function(e,t,n){for(var r=-1,i=null==e?0:e.length;++r=200&&(d=l,f=!1,t=new r(t));t:for(;++c0&&o(c)?n>1?e(c,n-1,o,a,s):r(s,c):a||(s[s.length]=c)}return s}},15308:function(e,t,n){var r=n(55463)();e.exports=r},26548:function(e,t,n){var r=n(15308),i=n(90249);e.exports=function(e,t){return e&&r(e,t,i)}},13324:function(e,t,n){var r=n(17297),i=n(33812);e.exports=function(e,t){t=r(t,e);for(var n=0,o=t.length;null!=e&&n=120&&g.length>=120)?new r(h&&g):void 0}g=e[0];var y=-1,b=p[0];t:for(;++yi?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++r=200){var m=t?null:s(e);if(m)return l(m);f=!1,c=a,p=new r}else p=t?[]:h;t:for(;++u=i?e:r(e,t,n)}},10768:function(e,t,n){var r=n(77832);e.exports=function(e,t){for(var n=e.length;n--&&r(t,e[n],0)>-1;);return n}},51821:function(e,t,n){var r=n(77832);e.exports=function(e,t){for(var n=-1,i=e.length;++n-1;);return n}},79882:function(e,t,n){var r=n(79162);e.exports=function(e){var t=new e.constructor(e.byteLength);return new r(t).set(new r(e)),t}},92175:function(e,t,n){e=n.nmd(e);var r=n(37772),i=t&&!t.nodeType&&t,o=i&&e&&!e.nodeType&&e,a=o&&o.exports===i?r.Buffer:void 0,s=a?a.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=s?s(n):new e.constructor(n);return e.copy(r),r}},34727:function(e,t,n){var r=n(79882);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}},96058:function(e){var t=/\w*$/;e.exports=function(e){var n=new e.constructor(e.source,t.exec(e));return n.lastIndex=e.lastIndex,n}},70169:function(e,t,n){var r=n(50857),i=r?r.prototype:void 0,o=i?i.valueOf:void 0;e.exports=function(e){return o?Object(o.call(e)):{}}},6190:function(e,t,n){var r=n(79882);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}},27520:function(e,t,n){var r=n(4795);e.exports=function(e,t){if(e!==t){var n=void 0!==e,i=null===e,o=e==e,a=r(e),s=void 0!==t,l=null===t,u=t==t,c=r(t);if(!l&&!c&&!a&&e>t||a&&s&&u&&!l&&!c||i&&s&&u||!n&&u||!o)return 1;if(!i&&!a&&!c&&e=l)return u;return u*("desc"==n[i]?-1:1)}}return e.index-t.index}},51522:function(e){e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n1?n[o-1]:void 0,s=o>2?n[2]:void 0;for(a=e.length>3&&"function"==typeof a?(o--,a):void 0,s&&i(n[0],n[1],s)&&(a=o<3?void 0:a,o=1),t=Object(t);++rc))return!1;var f=l.get(e),h=l.get(t);if(f&&h)return f==t&&h==e;var p=-1,m=!0,v=2&n?new r:void 0;for(l.set(e,t),l.set(t,e);++p-1&&e%1==0&&e-1}},94769:function(e,t,n){var r=n(22218);e.exports=function(e,t){var n=this.__data__,i=r(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this}},92411:function(e,t,n){var r=n(89612),i=n(80235),o=n(10326);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(o||i),string:new r}}},36417:function(e,t,n){var r=n(27937);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},86928:function(e,t,n){var r=n(27937);e.exports=function(e){return r(this,e).get(e)}},79493:function(e,t,n){var r=n(27937);e.exports=function(e){return r(this,e).has(e)}},24150:function(e,t,n){var r=n(27937);e.exports=function(e,t){var n=r(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this}},75179:function(e){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}},73477:function(e){e.exports=function(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}}},77777:function(e,t,n){var r=n(30733);e.exports=function(e){var t=r(e,function(e){return 500===n.size&&n.clear(),e}),n=t.cache;return t}},99191:function(e,t,n){var r=n(38761)(Object,"create");e.exports=r},54248:function(e,t,n){var r=n(60241)(Object.keys,Object);e.exports=r},62966:function(e){e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},4146:function(e,t,n){e=n.nmd(e);var r=n(51242),i=t&&!t.nodeType&&t,o=i&&e&&!e.nodeType&&e,a=o&&o.exports===i&&r.process,s=function(){try{var e=o&&o.require&&o.require("util").types;if(e)return e;return a&&a.binding&&a.binding("util")}catch(e){}}();e.exports=s},37157:function(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},60241:function(e){e.exports=function(e,t){return function(n){return e(t(n))}}},43114:function(e,t,n){var r=n(49432),i=Math.max;e.exports=function(e,t,n){return t=i(void 0===t?e.length-1:t,0),function(){for(var o=arguments,a=-1,s=i(o.length-t,0),l=Array(s);++a0){if(++n>=800)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}},15243:function(e,t,n){var r=n(80235);e.exports=function(){this.__data__=new r,this.size=0}},72858:function(e){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},4417:function(e){e.exports=function(e){return this.__data__.get(e)}},8605:function(e){e.exports=function(e){return this.__data__.has(e)}},71418:function(e,t,n){var r=n(80235),i=n(10326),o=n(96738);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var a=n.__data__;if(!i||a.length<199)return a.push([e,t]),this.size=++n.size,this;n=this.__data__=new o(a)}return n.set(e,t),this.size=n.size,this}},66024:function(e){e.exports=function(e,t,n){for(var r=n-1,i=e.length;++r=t||n<0||v&&r>=c}function x(){var e,n,r,o=i();if(b(o))return w(o);f=setTimeout(x,(e=o-h,n=o-p,r=t-e,v?s(r,c-n):r))}function w(e){return(f=void 0,g&&l)?y(e):(l=u=void 0,d)}function E(){var e,n=i(),r=b(n);if(l=arguments,u=this,h=n,r){if(void 0===f)return p=e=h,f=setTimeout(x,t),m?y(e):d;if(v)return clearTimeout(f),f=setTimeout(x,t),y(h)}return void 0===f&&(f=setTimeout(x,t)),d}return t=o(t)||0,r(n)&&(m=!!n.leading,c=(v="maxWait"in n)?a(o(n.maxWait)||0,t):c,g="trailing"in n?!!n.trailing:g),E.cancel=function(){void 0!==f&&clearTimeout(f),p=0,l=h=u=f=void 0},E.flush=function(){return void 0===f?d:w(i())},E}},97329:function(e,t,n){var r=n(61655),i=n(66188),o=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,a=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");e.exports=function(e){return(e=i(e))&&e.replace(o,r).replace(a,"")}},17335:function(e,t,n){var r=n(85246),i=n(62034),o=n(36060),a=n(93746),s=o(function(e,t){return a(e)?r(e,i(t,1,a,!0)):[]});e.exports=s},45861:function(e,t,n){e.exports=n(28460)},41225:function(e){e.exports=function(e,t){return e===t||e!=e&&t!=t}},35676:function(e,t,n){var r=n(62034);e.exports=function(e){return(null==e?0:e.length)?r(e,1):[]}},72579:function(e,t,n){var r=n(13324);e.exports=function(e,t,n){var i=null==e?void 0:r(e,t);return void 0===i?n:i}},3440:function(e,t,n){var r=n(13940),i=n(36740),o=Object.prototype.hasOwnProperty,a=i(function(e,t,n){o.call(e,n)?e[n].push(t):r(e,n,[t])});e.exports=a},93352:function(e,t,n){var r=n(32726),i=n(1369);e.exports=function(e,t){return null!=e&&i(e,t,r)}},95041:function(e,t,n){var r=n(20187),i=n(1369);e.exports=function(e,t){return null!=e&&i(e,t,r)}},23059:function(e){e.exports=function(e){return e}},30898:function(e,t,n){var r=n(50343),i=n(88390),o=n(36060),a=n(5642),s=o(function(e){var t=r(e,a);return t.length&&t[0]===e[0]?i(t):[]});e.exports=s},79631:function(e,t,n){var r=n(15183),i=n(15125),o=Object.prototype,a=o.hasOwnProperty,s=o.propertyIsEnumerable,l=r(function(){return arguments}())?r:function(e){return i(e)&&a.call(e,"callee")&&!s.call(e,"callee")};e.exports=l},86152:function(e){var t=Array.isArray;e.exports=t},67878:function(e,t,n){var r=n(61049),i=n(61158);e.exports=function(e){return null!=e&&i(e.length)&&!r(e)}},93746:function(e,t,n){var r=n(67878),i=n(15125);e.exports=function(e){return i(e)&&r(e)}},73226:function(e,t,n){e=n.nmd(e);var r=n(37772),i=n(36330),o=t&&!t.nodeType&&t,a=o&&e&&!e.nodeType&&e,s=a&&a.exports===o?r.Buffer:void 0,l=s?s.isBuffer:void 0;e.exports=l||i},18149:function(e,t,n){var r=n(88746);e.exports=function(e,t){return r(e,t)}},61049:function(e,t,n){var r=n(53366),i=n(29259);e.exports=function(e){if(!i(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},61158:function(e){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},4714:function(e,t,n){var r=n(74511),i=n(47826),o=n(4146),a=o&&o.isMap,s=a?i(a):r;e.exports=s},29259:function(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},15125:function(e){e.exports=function(e){return null!=e&&"object"==typeof e}},97030:function(e,t,n){var r=n(53366),i=n(47353),o=n(15125),a=Object.prototype,s=Function.prototype.toString,l=a.hasOwnProperty,u=s.call(Object);e.exports=function(e){if(!o(e)||"[object Object]"!=r(e))return!1;var t=i(e);if(null===t)return!0;var n=l.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&s.call(n)==u}},43679:function(e,t,n){var r=n(8109),i=n(47826),o=n(4146),a=o&&o.isSet,s=a?i(a):r;e.exports=s},4795:function(e,t,n){var r=n(53366),i=n(15125);e.exports=function(e){return"symbol"==typeof e||i(e)&&"[object Symbol]"==r(e)}},77598:function(e,t,n){var r=n(35522),i=n(47826),o=n(4146),a=o&&o.isTypedArray,s=a?i(a):r;e.exports=s},90249:function(e,t,n){var r=n(1634),i=n(86411),o=n(67878);e.exports=function(e){return o(e)?r(e):i(e)}},18582:function(e,t,n){var r=n(1634),i=n(18390),o=n(67878);e.exports=function(e){return o(e)?r(e,!0):i(e)}},56974:function(e){e.exports=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}},19950:function(e,t,n){var r=n(13940),i=n(26548),o=n(68286);e.exports=function(e,t){var n={};return t=o(t,3),i(e,function(e,i,o){r(n,t(e,i,o),e)}),n}},34519:function(e,t,n){var r=n(13940),i=n(26548),o=n(68286);e.exports=function(e,t){var n={};return t=o(t,3),i(e,function(e,i,o){r(n,i,t(e,i,o))}),n}},30733:function(e,t,n){var r=n(96738);function i(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(i.Cache||r),n}i.Cache=r,e.exports=i},98537:function(e,t,n){var r=n(84565),i=n(97263)(function(e,t,n){r(e,t,n)});e.exports=i},34291:function(e){e.exports=function(){}},61100:function(e,t,n){var r=n(37772);e.exports=function(){return r.Date.now()}},17620:function(e,t,n){var r=n(50343),i=n(18874),o=n(29078),a=n(17297),s=n(752),l=n(48642),u=n(29097),c=n(76939),d=u(function(e,t){var n={};if(null==e)return n;var u=!1;t=r(t,function(t){return t=a(t,e),u||(u=t.length>1),t}),s(e,c(e),n),u&&(n=i(n,7,l));for(var d=t.length;d--;)o(n,t[d]);return n});e.exports=d},65798:function(e,t,n){var r=n(20256),i=n(82952),o=n(21401),a=n(33812);e.exports=function(e){return o(e)?r(a(e)):i(e)}},57370:function(e,t,n){var r=n(34311)(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()});e.exports=r},829:function(e,t,n){var r=n(62034),i=n(23813),o=n(36060),a=n(82406),s=o(function(e,t){if(null==e)return[];var n=t.length;return n>1&&a(e,t[0],t[1])?t=[]:n>2&&a(t[0],t[1],t[2])&&(t=[t[0]]),i(e,r(t,1),[])});e.exports=s},30981:function(e){e.exports=function(){return[]}},36330:function(e){e.exports=function(){return!1}},12436:function(e,t,n){var r=n(54073),i=n(29259);e.exports=function(e,t,n){var o=!0,a=!0;if("function"!=typeof e)throw TypeError("Expected a function");return i(n)&&(o="leading"in n?!!n.leading:o,a="trailing"in n?!!n.trailing:a),r(e,t,{leading:o,maxWait:t,trailing:a})}},61258:function(e,t,n){var r=n(36473),i=n(89419),o=n(38101),a=Math.min;e.exports=function(e,t){if((e=o(e))<1||e>9007199254740991)return[];var n=4294967295,s=a(e,4294967295);t=i(t),e-=4294967295;for(var l=r(s,t);++n"+t.value+""+i[o].show+""+e.value+"",type:10}):r.push({value:(1!=t.type?"(":"")+t.value+(1!=t.type?")":"")+""+e.value+"",type:1})):2===i[o].type||9===i[o].type?(e=r.pop(),t=r.pop(),r.push({value:(1!=t.type?"(":"")+t.value+(1!=t.type?")":"")+i[o].show+(1!=e.type?"(":"")+e.value+(1!=e.type?")":""),type:i[o].type})):12===i[o].type&&(e=r.pop(),t=r.pop(),n=r.pop(),r.push({value:i[o].show+"("+n.value+","+t.value+","+e.value+")",type:12}));return r[0].value},e.exports=r},66655:function(e,t,n){"use strict";var r=n(72346);function i(e,t){for(var n=0;np.length-2?p.length-1:e.length-l;n>0;n--)if(void 0!==p[n])for(i=0;i0&&jn)s.push(e);else{for(;n>=i&&!c||c&&i1)throw new r.Exception("Uncaught Syntax error");return o[0].value>1e15?"Infinity":parseFloat(o[0].value.toFixed(15))},r.eval=function(e,t,n){return void 0===t?this.lex(e).toPostfix().postfixEval():void 0!==n?this.lex(e,t).toPostfix().postfixEval(n):void 0!==t.length?this.lex(e,t).toPostfix().postfixEval():this.lex(e).toPostfix().postfixEval(t)},e.exports=r},38617:function(e,t,n){"use strict";n.d(t,{F:function(){return u},f:function(){return c}});var r=n(2784);let i=["light","dark"],o="(prefers-color-scheme: dark)",a="undefined"==typeof window,s=(0,r.createContext)(void 0),l={setTheme:e=>{},themes:[]},u=()=>{var e;return null!==(e=(0,r.useContext)(s))&&void 0!==e?e:l},c=e=>(0,r.useContext)(s)?r.createElement(r.Fragment,null,e.children):r.createElement(f,e),d=["light","dark"],f=({forcedTheme:e,disableTransitionOnChange:t=!1,enableSystem:n=!0,enableColorScheme:a=!0,storageKey:l="theme",themes:u=d,defaultTheme:c=n?"system":"light",attribute:f="data-theme",value:g,children:y,nonce:b})=>{let[x,w]=(0,r.useState)(()=>p(l,c)),[E,k]=(0,r.useState)(()=>p(l)),j=g?Object.values(g):u,_=(0,r.useCallback)(e=>{let r=e;if(!r)return;"system"===e&&n&&(r=v());let o=g?g[r]:r,s=t?m():null,l=document.documentElement;if("class"===f?(l.classList.remove(...j),o&&l.classList.add(o)):o?l.setAttribute(f,o):l.removeAttribute(f),a){let e=i.includes(c)?c:null,t=i.includes(r)?r:e;l.style.colorScheme=t}null==s||s()},[]),S=(0,r.useCallback)(e=>{w(e);try{localStorage.setItem(l,e)}catch(e){}},[e]),O=(0,r.useCallback)(t=>{let r=v(t);k(r),"system"===x&&n&&!e&&_("system")},[x,e]);(0,r.useEffect)(()=>{let e=window.matchMedia(o);return e.addListener(O),O(e),()=>e.removeListener(O)},[O]),(0,r.useEffect)(()=>{let e=e=>{e.key===l&&S(e.newValue||c)};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)},[S]),(0,r.useEffect)(()=>{_(null!=e?e:x)},[e,x]);let C=(0,r.useMemo)(()=>({theme:x,setTheme:S,forcedTheme:e,resolvedTheme:"system"===x?E:x,themes:n?[...u,"system"]:u,systemTheme:n?E:void 0}),[x,S,e,E,n,u]);return r.createElement(s.Provider,{value:C},r.createElement(h,{forcedTheme:e,disableTransitionOnChange:t,enableSystem:n,enableColorScheme:a,storageKey:l,themes:u,defaultTheme:c,attribute:f,value:g,children:y,attrs:j,nonce:b}),y)},h=(0,r.memo)(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:a,enableColorScheme:s,defaultTheme:l,value:u,attrs:c,nonce:d})=>{let f="system"===l,h="class"===n?`var d=document.documentElement,c=d.classList;c.remove(${c.map(e=>`'${e}'`).join(",")});`:`var d=document.documentElement,n='${n}',s='setAttribute';`,p=s?i.includes(l)&&l?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${l}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",m=(e,t=!1,r=!0)=>{let o=u?u[e]:e,a=t?e+"|| ''":`'${o}'`,l="";return s&&r&&!t&&i.includes(e)&&(l+=`d.style.colorScheme = '${e}';`),"class"===n?l+=t||o?`c.add(${a})`:"null":o&&(l+=`d[s](n,${a})`),l},v=e?`!function(){${h}${m(e)}}()`:a?`!function(){try{${h}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${f})){var t='${o}',m=window.matchMedia(t);if(m.media!==t||m.matches){${m("dark")}}else{${m("light")}}}else if(e){${u?`var x=${JSON.stringify(u)};`:""}${m(u?"x[e]":"e",!0)}}${f?"":"else{"+m(l,!1,!1)+"}"}${p}}catch(e){}}()`:`!function(){try{${h}var e=localStorage.getItem('${t}');if(e){${u?`var x=${JSON.stringify(u)};`:""}${m(u?"x[e]":"e",!0)}}else{${m(l,!1,!1)};}${p}}catch(t){}}();`;return r.createElement("script",{nonce:d,dangerouslySetInnerHTML:{__html:v}})},()=>!0),p=(e,t)=>{let n;if(!a){try{n=localStorage.getItem(e)||void 0}catch(e){}return n||t}},m=()=>{let e=document.createElement("style");return e.appendChild(document.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(e),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(e)},1)}},v=e=>(e||(e=window.matchMedia(o)),e.matches?"dark":"light")},86570:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/_app",function(){return n(76176)}])},4941:function(e,t,n){"use strict";n.d(t,{Ul:function(){return s},WD:function(){return l},fu:function(){return c},o4:function(){return u}});var r=n(52322),i=n(52735),o=n(82851),a=n(99182);function s(e){let{currentPage:t,parentPage:n,commandPage:s,className:l,...u}=e,c=(0,a.U8)(e=>e.search);if((null==n?void 0:n.namespace)===(null==t?void 0:t.namespace)&&!c)return(0,r.jsx)(a.mY.Item,{className:(0,o.cx)((0,i.Vkc)(),"group",l),value:"".concat(null==s?void 0:s.label," ").concat(u.children.toString()),...u})}function l(e){let{currentPage:t,commandPage:n,className:s,...l}=e,u=(0,a.U8)(e=>e.search),c=n.namespace.startsWith((null==t?void 0:t.namespace)||"");if(u&&c||n.namespace===(null==t?void 0:t.namespace))return(0,r.jsx)(a.mY.Item,{className:(0,o.cx)((0,i.Vkc)(),"group",s),value:"".concat(n.label," ").concat(l.children.toString()),...l})}function u(e){let{currentPage:t,commandPage:n,className:s,...l}=e,u=(0,a.U8)(e=>e.search),c=n.namespace.startsWith((null==t?void 0:t.namespace)||"");if(u&&c||!t||n.namespace===(null==t?void 0:t.namespace))return(0,r.jsx)(a.mY.Item,{className:(0,o.cx)((0,i.Vkc)(),"group",s),value:"".concat(n.label," ").concat(l.children.toString()),...l})}function c(e){let{heading:t,currentPage:n,commandPage:o,...s}=e,l=(0,a.U8)(e=>e.search);return(0,r.jsx)(a.mY.Group,{heading:l&&(null==n?void 0:n.namespace)!==o.namespace&&(0,r.jsx)(i.__J,{className:"px-1",size:"12",children:o.label}),...s})}n(2784)},3639:function(e,t,n){"use strict";n.d(t,{F:function(){return y}});var r=n(52322),i=n(4941);let o={namespace:"contracts/filterStatus",label:"Contracts filter by status"},a=[{id:"filterStatusActive",value:"active",label:"Contract is active"},{id:"filterStatusSuccessful",value:"successful",label:"Contract was successful"},{id:"filterStatusPending",value:"pending",label:"Contract is pending"},{id:"filterStatusRejected",value:"rejected",label:"Contract was rejected"},{id:"filterStatusFailed",value:"failed",label:"Contract has failed"}];function s(e){let{select:t,currentPage:n}=e;return(0,r.jsx)(i.fu,{currentPage:n,commandPage:o,children:a.map(e=>(0,r.jsx)(i.WD,{currentPage:n,commandPage:o,onSelect:()=>{t(e)},children:e.label},e.id+e.value))})}var l=n(22515),u=n(734);let c={namespace:"contracts/filterAddress",label:"Contracts filter by ID"};function d(e){let{select:t,currentPage:n}=e,{openDialog:o}=(0,l.Rh)(),a=(0,u.O)("");return(0,r.jsx)(i.fu,{currentPage:n,commandPage:c,children:(0,r.jsx)(i.WD,{currentPage:n,commandPage:c,onSelect:()=>{t(),o("contractsFilterContractId")},children:a.label})})}function f(e){let{select:t,currentPage:n,parentPage:o,commandPage:a}=e,{openDialog:s}=(0,l.Rh)();return(0,r.jsx)(i.Ul,{currentPage:n,parentPage:o,commandPage:a,onSelect:()=>{t(),s("contractsFilterContractId")},children:c.label})}function h(e){let{currentPage:t,select:n}=e;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s,{currentPage:t,select:n}),(0,r.jsx)(d,{currentPage:t,select:n})]})}let p={namespace:"contracts",label:"Contracts"};function m(e){let{currentPage:t,parentPage:n,pushPage:a,select:s}=e;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.Ul,{currentPage:t,parentPage:n,commandPage:p,onSelect:()=>{a(o)},children:o.label}),(0,r.jsx)(f,{currentPage:t,parentPage:n,commandPage:p,select:s})]})}var v=n(92838),g=n(2784);function y(e){let{currentPage:t,parentPage:n,pushPage:i,beforeSelect:o,afterSelect:a}=e,{setFilter:s}=(0,v.G)(),l=(0,g.useCallback)(e=>{o&&o(),e&&s(e),a&&a()},[s,o,a]);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(m,{parentPage:n,currentPage:t,pushPage:i,select:l}),(0,r.jsx)(h,{currentPage:t,select:l})]})}},71930:function(e,t,n){"use strict";n.d(t,{_:function(){return i},h:function(){return o}});var r=n(27444);let i={home:"/",volumes:{index:"/volumes"},contracts:{index:"/contracts"},config:{index:"/config",host:"/config#host",pricing:"/config#pricing",dns:"/config#dns",bandwidth:"/config#bandwidth",registry:"/config#registry",accounts:"/config#accounts"},wallet:{view:"/wallet"},node:{index:"/node",txPool:"/node/txpool",peers:"/node/peers"},login:"/login"},o=r.dk},99957:function(e,t,n){"use strict";n.d(t,{iV:function(){return y},ZR:function(){return g}});var r=n(52322),i=n(2784),o=n(52735),a=n(27444);let s=[{value:"",label:"Off"},{value:"route53",label:"Route 53"},{value:"noip",label:"No-IP"},{value:"duckdns",label:"Duck DNS"},{value:"cloudflare",label:"Cloudflare"}],l={acceptingContracts:!1,netAddress:"",maxContractDuration:void 0,contractPrice:void 0,baseRPCPrice:void 0,sectorAccessPrice:void 0,collateralMultiplier:void 0,maxCollateral:void 0,storagePrice:void 0,egressPrice:void 0,ingressPrice:void 0,priceTableValidity:void 0,maxRegistryEntries:void 0,accountExpiry:void 0,maxAccountBalance:void 0,ingressLimit:void 0,egressLimit:void 0,dnsProvider:"",dnsIpv4:!1,dnsIpv6:!1,dnsDuckDnsToken:"",dnsNoIpEmail:"",dnsNoIpPassword:"",dnsAwsId:"",dnsAwsSecret:"",dnsAwsZoneId:"",dnsCloudflareToken:"",dnsCloudflareZoneId:""};var u=n(6391),c=n.n(u),d=n(96206),f=n(94977),h=n(63955),p=n(92762),m=n(2850);let v=(0,i.createContext)({}),g=()=>(0,i.useContext)(v);function y(e){let{children:t}=e,n=function(){let e=(0,a.rV)({standalone:"configSettingsForm",config:{swr:{refreshInterval:(0,o.sWj)(1)}}}),t=(0,a.Te)(),n=(0,a.uo)({disabled:!e.data||!e.data.ddns.provider,config:{swr:{revalidateOnFocus:!1,errorRetryCount:0}}}),[u,v]=(0,p.Z)("v0/config/showAdvanced",{defaultValue:!1}),g=(0,h.cI)({mode:"all",defaultValues:l}),y=(0,i.useCallback)(e=>{let t;let n=(t=null,"duckdns"===e.ddns.provider&&(t={dnsDuckDnsToken:e.ddns.options.token}),"noip"===e.ddns.provider&&(t={dnsNoIpEmail:e.ddns.options.email,dnsNoIpPassword:e.ddns.options.password}),"route53"===e.ddns.provider&&(t={dnsAwsId:e.ddns.options.ID,dnsAwsSecret:e.ddns.options.secret,dnsAwsZoneId:e.ddns.options.zoneID}),"cloudflare"===e.ddns.provider&&(t={dnsCloudflareToken:e.ddns.options.token,dnsCloudflareZoneId:e.ddns.options.zoneID}),{acceptingContracts:e.acceptingContracts,netAddress:e.netAddress,maxContractDuration:new(c())(e.maxContractDuration).div((0,o.S5V)(1)),contractPrice:(0,d.ll)(e.contractPrice,6),baseRPCPrice:(0,d.ll)((0,f.sS)(e.baseRPCPrice),6),sectorAccessPrice:(0,d.ll)((0,f.nS)(e.sectorAccessPrice),6),collateralMultiplier:new(c())(e.collateralMultiplier),maxCollateral:(0,d.ll)(e.maxCollateral,6),storagePrice:(0,d.ll)((0,f.SY)(e.storagePrice),6),egressPrice:(0,d.ll)((0,f.B1)(e.egressPrice),6),ingressPrice:(0,d.ll)((0,f.dK)(e.ingressPrice),6),priceTableValidity:new(c())(e.priceTableValidity).div(1e9).div(60),maxRegistryEntries:new(c())(e.maxRegistryEntries),accountExpiry:new(c())(e.accountExpiry).div(1e9).div(86400),maxAccountBalance:(0,d.ll)(e.maxAccountBalance,6),ingressLimit:(0,o.BTR)(new(c())(e.ingressLimit)),egressLimit:(0,o.BTR)(new(c())(e.egressLimit)),dnsProvider:e.ddns.provider,dnsIpv4:e.ddns.ipv4,dnsIpv6:e.ddns.ipv6,...t});return g.reset(n),n},[g]),b=(0,i.useMemo)(()=>[e.data],[e.data]),x=(0,i.useCallback)(()=>e.data?y(e.data):null,[y,e.data]),[w,E]=(0,i.useState)(!1);(0,i.useEffect)(()=>{if(!w){let e=x();e&&E(!0)}},[w,x]);let k=(0,i.useCallback)(async()=>{let t=await e.mutate();t?(y(t),await n.mutate()):(0,o.OHV)("Error fetching settings.")},[e,y,n]),j=(0,i.useCallback)(async n=>{if(e.data)try{var r,i,a;let s;let l={};u||(l.maxCollateral=(r=n.storagePrice,i=n.collateralMultiplier,new(c())(12960).times(r).div((0,o.S5V)(1)).times(i)));let h={...n,...l},p=await t.patch({payload:(a=e.data,s=null,"duckdns"===h.dnsProvider&&(s={token:h.dnsDuckDnsToken}),"noip"===h.dnsProvider&&(s={email:h.dnsNoIpEmail,password:h.dnsNoIpPassword}),"route53"===h.dnsProvider&&(s={ID:h.dnsAwsId,secret:h.dnsAwsSecret,zoneID:h.dnsAwsZoneId}),"cloudflare"===h.dnsProvider&&(s={token:h.dnsCloudflareToken,zoneID:h.dnsCloudflareZoneId}),{...a,acceptingContracts:h.acceptingContracts,netAddress:h.netAddress,maxContractDuration:Number(h.maxContractDuration.times((0,o.S5V)(1)).toFixed(0)),contractPrice:(0,d.qN)(h.contractPrice).toString(),baseRPCPrice:h.baseRPCPrice.div((0,d.ll)((0,f.sS)(1))).toFixed(0),sectorAccessPrice:h.sectorAccessPrice.div((0,d.ll)((0,f.nS)(1))).toFixed(0),collateralMultiplier:h.collateralMultiplier.toNumber(),maxCollateral:(0,d.qN)(h.maxCollateral).toString(),storagePrice:h.storagePrice.div((0,d.ll)((0,f.SY)(1))).toFixed(0),egressPrice:h.egressPrice.div((0,d.ll)((0,f.B1)(1))).toFixed(0),ingressPrice:h.ingressPrice.div((0,d.ll)((0,f.dK)(1))).toFixed(0),priceTableValidity:Number(h.priceTableValidity.times(60).times(1e9).toFixed(0)),maxRegistryEntries:Number(h.maxRegistryEntries.toFixed(0)),accountExpiry:Number(h.accountExpiry.times(86400).times(1e9).toFixed(0)),maxAccountBalance:(0,d.qN)(h.maxAccountBalance).toString(),ingressLimit:Number((0,o.YaL)(h.ingressLimit).toFixed(0)),egressLimit:Number((0,o.YaL)(h.egressLimit).toFixed(0)),ddns:{...null==a?void 0:a.ddns,provider:h.dnsProvider,ipv4:h.dnsIpv4,ipv6:h.dnsIpv6,options:s}})});if(p.error)throw Error(p.error);g.formState.dirtyFields.netAddress?(0,o.OPV)("Settings have been saved. Address has changed, make sure to re-announce the host.",{duration:2e4}):(0,o.OPV)("Settings have been saved."),await k()}catch(e){(0,o.OHV)(e.message),console.log(e)}},[g,u,e,t,k]),_=(0,i.useMemo)(()=>(function(e){let{showAdvanced:t}=e;return{acceptingContracts:{type:"boolean",category:"host",title:"Accepting contracts",description:(0,r.jsx)(r.Fragment,{children:"Whether or not the host is accepting contracts."}),validation:{}},netAddress:{type:"text",category:"host",title:"Address",description:(0,r.jsx)(r.Fragment,{children:"The network address of the host."}),placeholder:"my.host.com:9882",validation:{required:"required"}},maxContractDuration:{type:"number",category:"host",title:"Maximum contract duration",units:"months",decimalsLimit:2,suggestion:new(c())(6),suggestionTip:"The default maximum duration is 6 months.",description:(0,r.jsx)(r.Fragment,{children:"The maximum contract duration that the host will accept."}),hidden:!t,validation:{required:"required",validate:{min:e=>new(c())(e).gte((0,o.E6f)(4320))||"must be at least 1 month"}}},storagePrice:{title:"Storage price",type:"siacoin",category:"pricing",units:"SC/TB/month",decimalsLimitSc:6,description:(0,r.jsx)(r.Fragment,{children:"The host's storage price in siacoins per TB per month."}),validation:{required:"required"}},egressPrice:{title:"Egress price",type:"siacoin",category:"pricing",units:"SC/TB",decimalsLimitSc:6,description:(0,r.jsx)(r.Fragment,{children:"The host's egress price in siacoins per TB."}),validation:{required:"required"}},ingressPrice:{title:"Ingress price",type:"siacoin",category:"pricing",units:"SC/TB",decimalsLimitSc:6,description:(0,r.jsx)(r.Fragment,{children:"The host's ingress price in siacoins per TB."}),validation:{required:"required"}},collateralMultiplier:{title:"Collateral multiplier",type:"number",category:"pricing",units:"* storage price",placeholder:"2",decimalsLimit:1,description:(0,r.jsx)(r.Fragment,{children:"The host's target collateral as a multiple of storage price."}),suggestion:new(c())(2),suggestionTip:"The default multiplier is 2x the storage price.",validation:{required:"required"}},maxCollateral:{title:"Maximum collateral",type:"siacoin",category:"pricing",decimalsLimitSc:6,description:(0,r.jsx)(r.Fragment,{children:"The host's maximum collateral in siacoins."}),hidden:!t,validation:{required:"required"}},contractPrice:{title:"Contract price",type:"siacoin",category:"pricing",decimalsLimitSc:6,description:(0,r.jsx)(r.Fragment,{children:"The host's contract price in siacoins."}),hidden:!t,validation:{required:"required"}},baseRPCPrice:{title:"Base RPC price",type:"siacoin",category:"pricing",units:"SC/million",decimalsLimitSc:6,description:(0,r.jsx)(r.Fragment,{children:"The host's base RPC price in siacoins per million calls."}),hidden:!t,validation:{required:"required"}},sectorAccessPrice:{title:"Sector access price",type:"siacoin",category:"pricing",units:"SC/million",decimalsLimitSc:6,description:(0,r.jsx)(r.Fragment,{children:"The host's sector access price in siacoins million sectors."}),hidden:!t,validation:{required:"required"}},priceTableValidity:{title:"Price table validity",type:"number",category:"pricing",units:"minutes",description:(0,r.jsx)(r.Fragment,{children:"How long a renter's registered price table remains valid."}),hidden:!t,validation:{required:"required"}},maxRegistryEntries:{title:"Maximum registry size",type:"number",category:"registry",units:"entries",decimalsLimit:0,description:(0,r.jsx)(r.Fragment,{children:"The maximum number of registry entries that the host will store. Each registry entry is up to 113 bytes."}),hidden:!t,validation:{required:"required"}},accountExpiry:{title:"Expiry",type:"number",category:"RHP3",units:"days",description:(0,r.jsx)(r.Fragment,{children:"How long a renter's ephemeral accounts are inactive before the host prunes them and recovers the remaining funds."}),hidden:!t,validation:{required:"required",validate:{min:e=>new(c())(e).gte(7)||"must be at least 1 week"}}},maxAccountBalance:{title:"Maximum balance",type:"siacoin",category:"RHP3",description:(0,r.jsx)(r.Fragment,{children:"Maximum balance a renter's ephemeral account can have. When the limit is reached, deposits are rejected until some of the funds have been spent."}),hidden:!t,validation:{required:"required",validate:{min:e=>new(c())(e).gte(1)||"must be at least 1 SC"}}},ingressLimit:{title:"Ingress limit",type:"number",category:"bandwidth",units:"MB/second",description:(0,r.jsx)(r.Fragment,{children:"The maximum amount of ingress bandwidth traffic in MB per second."}),validation:{required:"required"}},egressLimit:{title:"Egress limit",type:"number",category:"bandwidth",units:"MB/second",description:(0,r.jsx)(r.Fragment,{children:"The maximum amount of egress bandwidth traffic in MB per second."}),validation:{required:"required"}},dnsProvider:{title:"Dynamic DNS Provider",type:"select",category:"DNS",options:s,description:(0,r.jsx)(r.Fragment,{children:"Enable dynamic DNS with one of the supported providers."}),validation:{validate:e=>!!s.find(t=>t.value===e)||"must be one of supported providers"}},dnsIpv4:{title:"IPv4",type:"boolean",category:"DNS",description:(0,r.jsx)(r.Fragment,{children:"Whether IPv4 is enabled."}),show:e=>!!e.dnsProvider,validation:{validate:(e,t)=>!t.dnsProvider||!!(e||t.dnsIpv6)||"at least one of IPv4 and IPv6 must be enabled"},trigger:["dnsIpv6"]},dnsIpv6:{type:"boolean",title:"IPv6",category:"DNS",description:(0,r.jsx)(r.Fragment,{children:"Whether IPv6 is enabled."}),show:e=>!!e.dnsProvider,validation:{validate:(e,t)=>!t.dnsProvider||!!(e||t.dnsIpv4)||"at least one of IPv4 and IPv6 must be enabled"},trigger:["dnsIpv4"]},dnsDuckDnsToken:{type:"text",title:"Token",category:"DNS",description:(0,r.jsx)(r.Fragment,{children:"DuckDNS token."}),show:e=>"duckdns"===e.dnsProvider,validation:{validate:(e,t)=>"duckdns"!==t.dnsProvider||!!e||"required"}},dnsNoIpEmail:{type:"text",title:"Email",category:"DNS",description:(0,r.jsx)(r.Fragment,{children:"No-IP email."}),show:e=>"noip"===e.dnsProvider,validation:{validate:(e,t)=>"noip"!==t.dnsProvider||!!e||"required"}},dnsNoIpPassword:{type:"password",title:"Password",category:"DNS",description:(0,r.jsx)(r.Fragment,{children:"No-IP password."}),show:e=>"noip"===e.dnsProvider,validation:{validate:(e,t)=>"noip"!==t.dnsProvider||!!e||"required"}},dnsAwsId:{type:"text",title:"ID",category:"DNS",description:(0,r.jsx)(r.Fragment,{children:"AWS Route53 ID."}),show:e=>"route53"===e.dnsProvider,validation:{validate:(e,t)=>"route53"!==t.dnsProvider||!!e||"required"}},dnsAwsSecret:{type:"password",title:"Secret",category:"DNS",description:(0,r.jsx)(r.Fragment,{children:"AWS Route53 secret."}),show:e=>"route53"===e.dnsProvider,validation:{validate:(e,t)=>"route53"!==t.dnsProvider||!!e||"required"}},dnsAwsZoneId:{type:"text",title:"Zone ID",category:"DNS",description:(0,r.jsx)(r.Fragment,{children:"AWS Route53 zone ID."}),show:e=>"route53"===e.dnsProvider,validation:{validate:(e,t)=>"route53"!==t.dnsProvider||!!e||"required"}},dnsCloudflareToken:{type:"text",title:"Token",category:"DNS",description:(0,r.jsx)(r.Fragment,{children:"Cloudflare token."}),show:e=>"cloudflare"===e.dnsProvider,validation:{validate:(e,t)=>"cloudflare"!==t.dnsProvider||!!e||"required"}},dnsCloudflareZoneId:{type:"text",title:"Zone ID",category:"DNS",description:(0,r.jsx)(r.Fragment,{children:"Cloudflare zone ID."}),show:e=>"cloudflare"===e.dnsProvider,validation:{validate:(e,t)=>"cloudflare"!==t.dnsProvider||!!e||"required"}}}})({showAdvanced:u}),[u]),S=(0,o.WsO)(_),O=(0,i.useMemo)(()=>g.handleSubmit(j,S),[g,j,S]),C=(0,i.useCallback)(()=>{let e=g.getValues(),t=x();if(t)for(let[n,r]of(g.reset(t),Object.entries(e)))g.setValue(n,r,{shouldDirty:!0})},[g,x]),{isUnlocked:M}=(0,m.Hv)();(0,i.useEffect)(()=>{M&&k()},[M]),(0,i.useEffect)(()=>{g.formState.isSubmitting||C()},[g,u,b]);let A=Object.entries(g.formState.dirtyFields).filter(e=>{let[t,n]=e;return!!n}).length;return{fields:_,settings:e,dynDNSCheck:n,changeCount:A,revalidateAndResetFormData:k,form:g,onSubmit:O,showAdvanced:u,setShowAdvanced:v}}();return(0,r.jsx)(v.Provider,{value:n,children:t})}},92838:function(e,t,n){"use strict";n.d(t,{x:function(){return b},G:function(){return y}});var r=n(52322),i=n(52735),o=n(5632),a=n(27444),s=n(2784),l=n(56860),u=n(41775),c=n(96206),d=n(22515);function f(e){let{id:t,status:n,contentProps:o,buttonProps:l}=e,c=(0,a.kr)(),{openDialog:f}=(0,d.Rh)(),h=(0,s.useCallback)(async()=>{let e=await c.put({params:{id:t}});e.error?(0,i.OHV)(e.error):(0,i.OPV)((0,r.jsxs)(r.Fragment,{children:["Integrity check successfully started, depending on contract data size this operation can take a while. Check ",(0,r.jsx)(i.EKh,{children:"hostd"})," ",(0,r.jsx)(i.rUS,{onClick:()=>f("alerts"),children:"alerts"})," for status updates."]}),{duration:12e3})},[t,c,f]),p=["active","pending"].includes(n);return(0,r.jsxs)(i.h_2,{trigger:(0,r.jsx)(i.zxk,{variant:"ghost",icon:"hover",...l,children:(0,r.jsx)(u.iG7,{})}),contentProps:{align:"start",...o},children:[(0,r.jsx)("div",{className:"px-1.5 py-1",children:(0,r.jsxs)(i.xvT,{size:"14",weight:"medium",color:"subtle",children:["Contract ",t.slice(0,24),"..."]})}),(0,r.jsx)(i.Juw,{children:"Actions"}),(0,r.jsx)(i.ua7,{content:p?"Trigger a data integrity check":"Data integrity check only available for active or pending contracts",children:(0,r.jsx)("div",{children:(0,r.jsxs)(i.Xiv,{disabled:!p,onSelect:()=>h(),children:[(0,r.jsx)(i.KpP,{children:(0,r.jsx)(u.dDl,{})}),"Integrity check"]})})})]})}let h=[{id:"actions",label:"",fixed:!0,cellClassName:"w-[50px] !pl-2 !pr-4 [&+*]:!pl-0",render:e=>{let{data:{id:t,status:n}}=e;return(0,r.jsx)(f,{id:t,status:n})}},{id:"contractId",label:"contract ID",category:"general",render:e=>{let{data:t}=e,{id:n,renewedFrom:o,isRenewedFrom:a,renewedTo:s,isRenewedTo:l}=t;return(0,r.jsxs)("div",{className:"flex flex-col gap-1 w-full",children:[(0,r.jsx)(i.XxW,{size:"12",value:(0,i.I13)(n),label:"contract ID"}),a&&(0,r.jsx)(i.ua7,{content:"Renewed from",align:"start",children:(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)(i.xvT,{color:"subtle",children:(0,r.jsx)(u.L6f,{className:"scale-75"})}),(0,r.jsx)(i.XxW,{color:"subtle",size:"10",value:(0,i.I13)(o),label:"contract ID"})]})}),l&&(0,r.jsx)(i.ua7,{content:"Renewed to",align:"start",children:(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)(i.xvT,{color:"subtle",children:(0,r.jsx)(u.IRm,{className:"scale-75"})}),(0,r.jsx)(i.XxW,{color:"subtle",size:"10",value:(0,i.I13)(s),label:"contract ID"})]})})]})}},{id:"status",label:"status",category:"general",render:e=>{let{data:{status:t}}=e;return(0,r.jsx)(i.Cts,{variant:"active"===t?"amber":"failed"===t?"red":"pending"===t?"amber":"rejected"===t?"red":"successful"===t?"green":void 0,children:t})}},{id:"timeline",label:"timeline",category:"time",render:e=>{let{data:t,context:{currentHeight:n,contractsTimeRange:o}}=e,{contractHeightStart:a,contractHeightEnd:s,revision:l,status:u}=t;return(0,r.jsx)("div",{className:"w-[400px]",children:(0,r.jsx)(i.TaT,{currentHeight:n,contractHeightStart:a,contractHeightEnd:"rejected"===u?void 0:s,proofWindowHeightStart:"rejected"===u?void 0:l.windowStart,proofWindowHeightEnd:"rejected"===u?void 0:l.windowEnd,range:o})})}},{id:"contractHeightStart",label:"start date",category:"time",contentClassName:"w-[120px] justify-end",render:e=>{let{data:{contractHeightStart:t},context:{currentHeight:n}}=e;return(0,r.jsx)(i.xvT,{size:"12",children:(0,c.rN)((0,i.jrD)(n,t))})}},{id:"contractHeightEnd",label:"expiration date",category:"time",contentClassName:"w-[120px] justify-end",render:e=>{let{data:{contractHeightEnd:t},context:{currentHeight:n}}=e;return(0,r.jsx)(i.xvT,{size:"12",children:(0,c.rN)((0,i.jrD)(n,t))})}},{id:"payoutHeight",label:"payout date",category:"time",contentClassName:"w-[120px] justify-end",render:e=>{let{data:{payoutHeight:t},context:{currentHeight:n}}=e;return(0,r.jsx)(i.xvT,{size:"12",children:(0,c.rN)((0,i.jrD)(n,t))})}},{id:"filesize",label:"data size",category:"general",contentClassName:"w-[120px] justify-end",render:e=>{let{data:{revision:{filesize:t}}}=e;return(0,r.jsx)(i.m2c,{size:"12",value:t,variant:"value",format:e=>(0,c.vW)(e.toNumber())})}},{id:"fileMerkleRoot",label:"merkle root",category:"general",contentClassName:"w-[120px] justify-end",render:e=>{let{data:{revision:{fileMerkleRoot:t}}}=e;return(0,r.jsx)(i.XxW,{size:"12",value:(0,i.I13)(t)})}},{id:"payout",label:"payout",category:"financial",contentClassName:"w-[120px] justify-end",render:e=>{let{data:{revision:t}}=e;return(0,r.jsx)(i.YKL,{size:"12",value:t.payout})}},{id:"remainingRenterFunds",label:"remaining renter funds",category:"financial",contentClassName:"w-[120px] justify-end",render:e=>{let{data:{revision:t}}=e;return(0,r.jsx)(i.YKL,{size:"12",value:t.remainingRenterFunds})}},{id:"lockedCollateral",label:"locked collateral",category:"financial",contentClassName:"w-[120px] justify-end",render:e=>{let{data:{lockedCollateral:t}}=e;return(0,r.jsx)(i.YKL,{size:"12",value:t})}},{id:"usageRiskedCollateral",label:"risked collateral",category:"financial",contentClassName:"w-[120px] justify-end",render:e=>{let{data:{usage:t}}=e;return(0,r.jsx)(i.YKL,{size:"12",value:t.riskedCollateral})}},{id:"usageTotal",label:"total usage",category:"financial",contentClassName:"w-[120px] justify-end",render:e=>{let{data:{usage:t}}=e;return(0,r.jsx)(i.YKL,{size:"12",value:t.total})}},{id:"usageStorage",label:"storage usage",category:"financial",contentClassName:"w-[120px] justify-end",render:e=>{let{data:{usage:t}}=e;return(0,r.jsx)(i.YKL,{size:"12",value:t.storage})}},{id:"usageIngress",label:"ingress usage",category:"financial",contentClassName:"w-[120px] justify-end",render:e=>{let{data:{usage:t}}=e;return(0,r.jsx)(i.YKL,{size:"12",value:t.ingress})}},{id:"usageEgress",label:"egress usage",category:"financial",contentClassName:"w-[120px] justify-end",render:e=>{let{data:{usage:t}}=e;return(0,r.jsx)(i.YKL,{size:"12",value:t.egress})}},{id:"usageAccountFunding",label:"account funding usage",category:"financial",contentClassName:"w-[120px] justify-end",render:e=>{let{data:{usage:t}}=e;return(0,r.jsx)(i.YKL,{size:"12",value:t.accountFunding})}},{id:"usageRpc",label:"RPC usage",category:"financial",contentClassName:"w-[120px] justify-end",render:e=>{let{data:{usage:t}}=e;return(0,r.jsx)(i.YKL,{size:"12",value:t.rpc})}}].map(e=>({...e,..."financial"===e.category?{icon:(0,r.jsx)(u.dZ8,{className:"relative opacity-50 scale-75"}),label:e.label,tip:"financial: ".concat(e.label)}:{label:e.label,tip:e.label}}));var p=n(6391),m=n.n(p),v=n(25573);let g=(0,s.createContext)({}),y=()=>(0,s.useContext)(g);function b(e){let{children:t}=e,n=function(){var e,t;let n=(0,o.useRouter)(),r=Number(n.query.limit||50),u=Number(n.query.offset||0),{filters:c,setFilter:d,removeFilter:f,removeLastFilter:p,resetFilters:g}=(0,i.Uu5)(),{configurableColumns:y,enabledColumns:b,sortableColumns:x,toggleColumnVisibility:w,setColumnsVisible:E,setColumnsHidden:k,toggleSort:j,setSortDirection:_,setSortField:S,sortField:O,sortDirection:C,resetDefaultColumnVisibility:M}=(0,i.oy6)("hostd/v0/contracts",{columns:h,columnsDefaultVisible:l.gd,sortOptions:l.Fo,defaultSortField:l.nw}),A=(0,a.GP)({payload:{limit:r,offset:u,sortField:null===(e=l.Fo.find(e=>e.id===O))||void 0===e?void 0:e.value,sortDesc:"desc"===C,contractIDs:c.filter(e=>"filterContractId"===e.id).map(e=>e.value),statuses:c.filter(e=>e.id.startsWith("filterStatus")).map(e=>e.value)},config:{swr:{refreshInterval:(0,i.XBW)(60)}}}),P=function(e){let{response:t}=e;return(0,s.useMemo)(()=>{var e;return t.data?(null===(e=t.data.contracts)||void 0===e?void 0:e.map(e=>(function(e){var t;let n=new(m())(e.usage.accountFunding||0),r=new(m())(e.usage.egress||0),i=new(m())(e.usage.ingress||0),o=new(m())(e.usage.riskedCollateral||0),a=new(m())(e.usage.rpc||0),s=new(m())(e.usage.storage||0),l=n.plus(r).plus(i).plus(a).plus(s),u=e.resolutionHeight>0?e.resolutionHeight+144:e.revision.windowEnd+144;return{id:e.revision.parentID,revision:{parentID:e.revision.parentID,unlockConditions:e.revision.unlockConditions,filesize:new(m())(e.revision.filesize||0),fileMerkleRoot:e.revision.fileMerkleRoot,windowStart:e.revision.windowStart,windowEnd:e.revision.windowEnd,payout:new(m())("active"==e.status||e.resolutionHeight>0?e.revision.validProofOutputs[1].value:e.revision.missedProofOutputs[1].value),remainingRenterFunds:new(m())((null===(t=e.revision.validProofOutputs)||void 0===t?void 0:t[0].value)||0),validProofOutputs:e.revision.validProofOutputs,missedProofOutputs:e.revision.missedProofOutputs,unlockHash:e.revision.unlockHash,revisionNumber:e.revision.revisionNumber},usage:{total:l,accountFunding:n,egress:r,ingress:i,riskedCollateral:o,rpc:a,storage:s},lockedCollateral:new(m())(e.lockedCollateral||0),hostSignature:e.hostSignature,renterSignature:e.renterSignature,status:e.status,negotiationHeight:e.negotiationHeight,formationConfirmed:e.formationConfirmed,revisionConfirmed:e.revisionConfirmed,resolutionHeight:e.resolutionHeight,payoutHeight:u,contractHeightStart:e.negotiationHeight,contractHeightEnd:e.revision.windowStart,renewedTo:e.renewedTo,renewedFrom:e.renewedFrom,isRenewedFrom:"fcid:0000000000000000000000000000000000000000000000000000000000000000"!==e.renewedFrom,isRenewedTo:"fcid:0000000000000000000000000000000000000000000000000000000000000000"!==e.renewedTo}})(e)))||[]:null},[t.data])}({response:A}),T=(0,s.useMemo)(()=>h.filter(e=>b.includes(e.id)),[b]),N=A.isValidating,R=A.error,D=(0,i.c2j)(P,N,R,c),{estimatedBlockHeight:L,isSynced:F,nodeBlockHeight:V}=(0,v.n)(),I=F?V:L,{range:z}=(0,s.useMemo)(()=>(0,i.EJC)(I,P||[]),[I,P]);return{dataState:D,offset:u,limit:r,cellContext:{contractsTimeRange:z,currentHeight:I},pageCount:(null==P?void 0:P.length)||0,totalCount:null===(t=A.data)||void 0===t?void 0:t.count,columns:T,dataset:P,configurableColumns:y,enabledColumns:b,sortableColumns:x,toggleColumnVisibility:w,setColumnsVisible:E,setColumnsHidden:k,toggleSort:j,setSortDirection:_,setSortField:S,sortField:O,sortDirection:C,resetDefaultColumnVisibility:M,filters:c,setFilter:d,removeFilter:f,removeLastFilter:p,resetFilters:g}}();return(0,r.jsx)(g.Provider,{value:n,children:t})}},56860:function(e,t,n){"use strict";n.d(t,{Fo:function(){return i},gd:function(){return r},nw:function(){return o}});let r=["contractId","status","usageTotal","lockedCollateral","timeline"],i=[{id:"status",value:"status",label:"status",category:"general"},{id:"timeline",value:"negotiationHeight",label:"timeline",category:"time"},{id:"contractHeightStart",value:"negotiationHeight",label:"start height",category:"time"},{id:"contractHeightEnd",value:"expirationHeight",label:"expiration height",category:"time"}],o="timeline"},22515:function(e,t,n){"use strict";n.d(t,{Tu:function(){return em},xQ:function(){return ev},Rh:function(){return ep}});var r=n(52322),i=n(2784),o=n(52735),a=n(27444),s=n(96206),l=n(63955);function u(e,t,n){var r=this,o=(0,i.useRef)(null),a=(0,i.useRef)(0),s=(0,i.useRef)(null),l=(0,i.useRef)([]),u=(0,i.useRef)(),c=(0,i.useRef)(),d=(0,i.useRef)(e),f=(0,i.useRef)(!0);(0,i.useEffect)(function(){d.current=e},[e]);var h=!t&&0!==t&&"undefined"!=typeof window;if("function"!=typeof e)throw TypeError("Expected a function");t=+t||0;var p=!!(n=n||{}).leading,m=!("trailing"in n)||!!n.trailing,v="maxWait"in n,g=v?Math.max(+n.maxWait||0,t):null;return(0,i.useEffect)(function(){return f.current=!0,function(){f.current=!1}},[]),(0,i.useMemo)(function(){var e=function(e){var t=l.current,n=u.current;return l.current=u.current=null,a.current=e,c.current=d.current.apply(n,t)},n=function(e,t){h&&cancelAnimationFrame(s.current),s.current=h?requestAnimationFrame(e):setTimeout(e,t)},i=function(e){if(!f.current)return!1;var n=e-o.current;return!o.current||n>=t||n<0||v&&e-a.current>=g},y=function(t){return s.current=null,m&&l.current?e(t):(l.current=u.current=null,c.current)},b=function e(){var r=Date.now();if(i(r))return y(r);if(f.current){var s=t-(r-o.current);n(e,v?Math.min(s,g-(r-a.current)):s)}},x=function(){var d=Date.now(),h=i(d);if(l.current=[].slice.call(arguments),u.current=r,o.current=d,h){if(!s.current&&f.current)return a.current=o.current,n(b,t),p?e(o.current):c.current;if(v)return n(b,t),e(o.current)}return s.current||n(b,t),c.current};return x.cancel=function(){s.current&&(h?cancelAnimationFrame(s.current):clearTimeout(s.current)),a.current=0,l.current=o.current=u.current=s.current=null},x.isPending=function(){return!!s.current},x.flush=function(){return s.current?y(Date.now()):c.current},x},[p,v,t,g,m,h])}function c(e,t){return e===t}function d(e){return"function"==typeof e?function(){return e}:e}var f=n(99182),h=n(4941),p=n(41775);function m(e){let{search:t}=e;return(0,r.jsxs)(o.xvT,{color:"verySubtle",className:"flex flex-col gap-2 justify-center items-center mt-5 mb-3",children:[(0,r.jsx)(o.xvT,{color:"verySubtle",className:"flex gap-2 justify-center items-center",children:(0,r.jsx)(p.Qbr,{})}),(0,r.jsx)(o.xvT,{size:"12",color:"verySubtle",className:"flex justify-center",children:t?"No matching directory.":"Select a directory to get started."})]})}function v(){var e;let t=(0,a.On)({config:{swr:{revalidateOnFocus:!1,keepPreviousData:!0}}});return(null===(e=t.data)||void 0===e?void 0:e.OS)==="windows"?"\\":"/"}var g=n(5648),y=n.n(g),b=n(1573),x=n.n(b);function w(e){let{currentPath:t,childPath:n,separator:r}=e;return"\\"===t&&n.endsWith(":")?n+r:E(t,n,r)}function E(e,t,n){e=e===n?e:x()(e,n),t=y()(t,n);let r="";return(r=e.length?t.length&&t!==n?e===n?n+t:e+n+t:e:t).endsWith(":")?r+n:r}function k(){return(0,r.jsxs)(o.xvT,{color:"verySubtle",className:"flex flex-col gap-2 justify-center items-center mt-5 mb-3",children:[(0,r.jsx)(o.xvT,{color:"verySubtle",className:"flex gap-2 justify-center items-center",children:(0,r.jsx)(p.Qbr,{})}),(0,r.jsx)(o.xvT,{size:"12",color:"verySubtle",className:"flex justify-center",children:"Error loading directory."})]})}function j(e){let{path:t,onCreate:n}=e,s=v(),l=(0,a.Kw)(),[u,c]=(0,i.useState)(""),d=(0,i.useCallback)(async()=>{let e=await l.put({payload:{path:w({currentPath:t,childPath:u,separator:s})}});e.error?(0,o.OHV)("Error creating directory: ".concat(e.error)):(n(u),c(""))},[l,u,n,t,s]);return(0,r.jsxs)("div",{className:"flex items-center gap-2 overflow-hidden w-full",children:[(0,r.jsx)(o.xvT,{color:"verySubtle",className:"group-data-[selected=true]:text-gray-1000 dark:group-data-[selected=true]:text-graydark-1000",children:(0,r.jsx)(p.L37,{})}),(0,r.jsx)("div",{className:"flex-1",children:(0,r.jsx)(o.nvn,{focus:"none",variant:"ghost",placeholder:"type new directory name",className:"!pl-0 font-normal h-5",value:u,onChange:e=>{c(e.currentTarget.value)},onKeyUp:e=>{e.stopPropagation(),"Enter"===e.key&&d()},size:"small"})})]})}function _(e){let{path:t,setPath:n,commandPage:i,currentPage:a,beforeSelect:s,afterSelect:l}=e,u=v();return(0,r.jsx)(h.WD,{commandPage:i,currentPage:a,onSelect:()=>{t&&(s&&s(),n(function(e,t){if(e.endsWith(":\\"))return t;let n="".concat(e.split(t).slice(0,-1).join(t));return""===n?t:n.endsWith(":")?n+t:n}(t,u)),l&&l())},value:"..",children:(0,r.jsxs)("div",{className:"flex items-center gap-2 overflow-hidden",children:[(0,r.jsx)(o.xvT,{color:"verySubtle",className:"group-data-[selected=true]:text-gray-1000 dark:group-data-[selected=true]:text-graydark-1000",children:(0,r.jsx)(p.ROc,{size:16})}),(0,r.jsx)(o.xvT,{ellipsis:!0,children:".."})]})},"..")}let S={namespace:"volumes/directorySelect",label:"Directory select"};function O(e){var t,n,i,a,s,l,u;let{path:c,dir:d,setPath:g,currentPage:y,beforeSelect:b,afterSelect:x}=e,E=v(),O=(null===(t=d.data)||void 0===t?void 0:t.path)===E,C=(null===(n=d.data)||void 0===n?void 0:n.path)==="\\";return(0,r.jsxs)(h.fu,{currentPage:y,commandPage:S,children:[d.isValidating||!d.data||d.error?null:O?null:(0,r.jsx)(_,{path:d.data.path,setPath:g,currentPage:y,commandPage:S,afterSelect:x,beforeSelect:b}),(0,r.jsxs)(f.mY.Empty,{children:[!d.isValidating&&d.error?(0,r.jsx)(k,{}):null,d.isValidating||d.error||(null===(a=d.data)||void 0===a?void 0:null===(i=a.directories)||void 0===i?void 0:i.length)?null:(0,r.jsx)(m,{search:c})]}),!d.isValidating&&!d.error&&(null===(l=d.data)||void 0===l?void 0:null===(s=l.directories)||void 0===s?void 0:s.length)?d.data.directories.map(e=>(0,r.jsx)(h.WD,{commandPage:S,currentPage:y,onSelect:()=>{b&&b();let t=w({currentPath:d.data.path,childPath:e,separator:E});g(t),x&&x()},value:e,children:(0,r.jsxs)("div",{className:"flex items-center gap-2 overflow-hidden",children:[(0,r.jsx)(o.xvT,{color:"verySubtle",className:"group-data-[selected=true]:text-gray-1000 dark:group-data-[selected=true]:text-graydark-1000",children:(0,r.jsx)(p.ROc,{size:16})}),(0,r.jsx)(o.xvT,{ellipsis:!0,children:e})]})},e)):null,!C&&!d.isValidating&&!d.error&&(0,r.jsx)(h.WD,{commandPage:S,currentPage:y,value:"create new directory",children:(0,r.jsx)(j,{path:null===(u=d.data)||void 0===u?void 0:u.path,onCreate:e=>{d.mutate(t=>{var n;return{...t,directories:(null==t?void 0:null===(n=t.directories)||void 0===n?void 0:n.concat(e))||[e]}})}})})]})}function C(e){let{path:t,dir:n,onChange:i}=e;return(0,r.jsx)(f.mY,{label:"Select volume",shouldFilter:!1,children:(0,r.jsx)(o.s_4,{className:"h-[200px] p-1 overflow-hidden",children:(0,r.jsx)(o.xrM,{keyToResetScrollbars:t,children:(0,r.jsx)(f.mY.List,{children:(0,r.jsx)(O,{path:t,dir:n,setPath:i,currentPage:S})})})})})}var M=n(82851);function A(e){let{label:t,newSizeGB:n,currentSizeGB:i=0,maxSizeGB:a=0}=e,l=in,c=n>a;return(0,r.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,r.jsxs)("div",{className:"relative w-full h-1 rounded-lg bg-gray-300 dark:bg-graydark-300 overflow-hidden",children:[(0,r.jsx)("div",{className:(0,M.cx)("absolute h-1 rounded-tl-lg rounded-bl-lg",void 0!==n&&u?"bg-red-500 dark:bg-red-500":"bg-gray-700 dark:bg-graydark-800",l?"z-10":"z-0"),style:{width:a?"".concat(i/a*100,"%"):"0%"}}),(0,r.jsx)("div",{className:(0,M.cx)("absolute h-1 rounded-tl-lg rounded-bl-lg",c?"bg-amber-500 dark:bg-amber-500":void 0!==n&&l?"bg-green-500 dark:bg-green-500":"bg-gray-700 dark:bg-graydark-800",u?"z-10":"z-0"),style:{width:a?"".concat(n/a*100,"%"):"0%"}})]}),(0,r.jsxs)("div",{className:"h-4 flex justify-between",children:[t||(0,r.jsx)("div",{}),void 0!==n&&a?(0,r.jsx)(o.xvT,{size:"12",color:"subtle",children:"".concat((n/a*100).toFixed(0),"% of ").concat((0,s.vW)((0,o.Hzd)(a))," available")}):null]})]})}let P={size:void 0,name:"",path:"~",immediatePath:"~"};function T(e){var t;let{trigger:n,open:c,onOpenChange:d}=e,{closeDialog:f}=ep(),h=(0,a.HU)(),p=v(),m=(0,l.cI)({mode:"all",defaultValues:P}),g=m.watch("path"),y=m.watch("immediatePath"),b=m.watch("name"),x=m.watch("size"),w=u(()=>{g!==y&&m.setValue("path",y)},500);(0,i.useEffect)(()=>{w()},[y]),(0,i.useEffect)(()=>{g!==y&&m.setValue("immediatePath",g)},[g]);let k=(0,i.useCallback)(async e=>{let t=await h.post({payload:{localPath:E(g,b,p),maxSectors:(0,o.WN2)(e.size).toNumber()}});t.error?(0,o.OHV)(t.error):((0,o.OPV)("New volume created."),m.reset(P),f())},[m,h,f,b,g,p]),j=(0,a.cM)({disabled:!c,params:{path:""===g?p:g},config:{swr:{shouldRetryOnError:!1}}});(0,i.useEffect)(()=>{j.error&&m.setError("immediatePath",{message:"Directory does not exist"})},[j.error]),(0,i.useEffect)(()=>{j.data&&j.data.path!==g&&m.setValue("path",j.data.path)},[j.data]);let _=(null==x?void 0:x.toNumber())||0,S=j.data?(0,o.Uzc)(j.data.freeBytes).toNumber():0,O=(0,o.Uzc)((null===(t=j.data)||void 0===t?void 0:t.freeBytes)||0).toNumber(),M=(0,i.useMemo)(()=>({name:{type:"text",title:"Name",placeholder:"data.dat",validation:{required:"required"}},immediatePath:{type:"text",title:"Location",placeholder:"Enter a directory or select one below",validation:{required:"required",validate:{}}},path:{type:"text",title:"Location",validation:{required:"required",validate:{req:e=>"\\"!==e||"directory within a drive required"}}},size:{type:"number",title:"Size",decimalsLimit:0,units:"GB",placeholder:"1,000",validation:{required:"required",validate:{between:e=>{let t="Must be between ".concat((0,s.vW)((0,o.Hzd)(10))," and ").concat((0,s.vW)((0,o.Hzd)(O),{fixed:3}));return e<=O&&e>=10||t},nospace:()=>O>10||"not enough space in directory"}}}}),[O]),T=(0,o.WsO)(M);return m.register("path",M.path.validation),(0,r.jsx)(o.VqE,{title:"Create Volume",trigger:n,open:c,onOpenChange:e=>{e||m.reset(P),d(e)},contentVariants:{className:"w-[400px]"},onSubmit:m.handleSubmit(k,T),controls:(0,r.jsx)("div",{className:"flex flex-col gap-1",children:(0,r.jsx)(o.ZqQ,{form:m,children:"Create"})}),children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsx)(o.nvN,{size:"14",children:"Create a new volume. Select a system directory and specific the size of the volume."}),(0,r.jsx)(o.yEL,{name:"name",form:m,fields:M}),(0,r.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,r.jsx)("div",{className:"flex flex-col gap-1",children:(0,r.jsx)(o.yEL,{name:"immediatePath",form:m,fields:M})}),(0,r.jsx)(C,{path:g,dir:j,onChange:e=>m.setValue("path",e,{shouldDirty:!0,shouldTouch:!0,shouldValidate:!0})})]}),(0,r.jsx)(o.jIp,{name:"size",form:m,fields:M}),(0,r.jsx)(A,{newSizeGB:_,currentSizeGB:0,maxSizeGB:S})]})})}let N={size:void 0};function R(e){var t,n;let{trigger:u,open:c,onOpenChange:d}=e,{id:f,closeDialog:h}=ep(),p=v(),m=(0,a.ST)({disabled:!f,params:{id:f}}),g=(0,a.cM)({disabled:!c||!m.data,params:{path:null===(t=m.data)||void 0===t?void 0:t.localPath.split(p).slice(0,-1).join(p)}}),y=(0,a.G)(),b=(0,l.cI)({mode:"all",defaultValues:N}),x=b.watch("size"),w=(0,i.useCallback)(async e=>{let t=await y.put({params:{id:Number(f)},payload:{maxSectors:(0,o.WN2)(e.size).toNumber()}});t.error?(0,o.OHV)(t.error):((0,o.OPV)("Volume resizing initiated."),b.reset(N),h())},[b,f,y,h]);(0,i.useEffect)(()=>{m.data&&b.reset(N)},[m.data]);let E=null==x?void 0:x.toNumber(),k=m.data?(0,o.bjP)(m.data.totalSectors).toNumber():0,j=g.data?(0,o.Uzc)(g.data.totalBytes).toNumber():0,_=k=1,O=(0,i.useMemo)(()=>({size:{type:"number",title:"New size",decimalsLimit:0,units:"GB",placeholder:"1,000",validation:{required:"required",validate:{between:e=>{let t="Must be between ".concat((0,s.vW)((0,o.Hzd)(10))," and ").concat((0,s.vW)((0,o.Hzd)(j),{fixed:3}));return e<=j&&e>=10||t}}}}}),[j]),C=(0,o.WsO)(O);return(0,r.jsx)(o.VqE,{title:"Resize Volume",trigger:u,open:c,onOpenChange:e=>{e||b.reset(N),d(e)},contentVariants:{className:"max-w-[400px]"},onSubmit:b.handleSubmit(w,C),controls:(0,r.jsx)("div",{className:"flex flex-col gap-1",children:(0,r.jsx)(o.ZqQ,{form:b,children:"Resize"})}),children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsxs)(o.nvN,{size:"14",children:["Grow or shrink the volume. When growing a volume, make sure to check that there is enough space on-disk. When shrinking a volume, any data that needs to be moved will be placed into other volumes, meaning that no data will be lost. If ",(0,r.jsx)(o.EKh,{children:"hostd"})," is unable to migrate the data, an error will be returned and the operation will be stopped."]}),(0,r.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,r.jsx)(o.__J,{children:"Volume"}),(0,r.jsx)(o.xvT,{font:"mono",ellipsis:!0,children:null===(n=m.data)||void 0===n?void 0:n.localPath})]}),(0,r.jsx)(o.jIp,{name:"size",form:b,fields:O}),(0,r.jsx)(A,{currentSizeGB:k,newSizeGB:E,maxSizeGB:j,label:S?(0,r.jsx)(o.xvT,{size:"12",color:"subtle",children:_?"Increase by ".concat((0,s.vW)((0,o.Hzd)(E-k))):"Decrease by ".concat((0,s.vW)((0,o.Hzd)(k-E)))}):(0,r.jsx)(o.xvT,{size:"12",color:"subtle",children:"Current size is ".concat((0,s.vW)((0,o.Hzd)(k)))})})]})})}let D={path:"",force:!1};function L(e){var t,n,u;let{trigger:c,open:d,onOpenChange:f}=e,{id:h,closeDialog:p}=ep(),m=(0,a.uq)(),v=(0,a.ST)({disabled:!h,params:{id:h}}),g=(0,o.x9T)(null===(t=v.data)||void 0===t?void 0:t.totalSectors),y=(0,o.x9T)(null===(n=v.data)||void 0===n?void 0:n.usedSectors),b=null===(u=v.data)||void 0===u?void 0:u.localPath,x=(0,l.cI)({mode:"all",defaultValues:D}),w=(0,i.useCallback)(async e=>{var t;let n=await m.delete({params:{id:null===(t=v.data)||void 0===t?void 0:t.ID,force:e.force}});n.error?(0,o.OHV)(n.error):((0,o.OPV)("Volume permanently deleted."),x.reset(),p())},[x,v.data,m,p]),E=(0,i.useMemo)(()=>({path:{type:"text",title:"Path",placeholder:b,validation:{required:"required",validate:{equals:e=>e===b||"directory path does not match"}}},force:{type:"boolean",title:"Force",validation:{}}}),[b]),k=(0,o.WsO)(E);return(0,r.jsx)(o.VqE,{title:"Delete Volume",trigger:c,open:d,onOpenChange:e=>{e||x.reset(D),f(e)},contentVariants:{className:"w-[400px]"},onSubmit:x.handleSubmit(w,k),children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsx)(o.nvN,{size:"14",children:"Are you sure you would like to delete the volume?"}),(0,r.jsxs)(o.nvN,{size:"14",children:[(0,r.jsx)(o.EKh,{children:"hostd"})," will move"," ",(0,r.jsx)(o.xvT,{weight:"semibold",children:(0,s.vW)(y)})," of stored data and will lose ",(0,r.jsx)(o.xvT,{weight:"semibold",children:(0,s.vW)(g)})," ","of storage capacity. It is not recommended to remove or resize volumes when contracts are about to expire."]}),(0,r.jsx)(o.nvN,{size:"14",children:"Enter the volume path to confirm the removal."}),(0,r.jsx)(o.yEL,{name:"path",form:x,fields:E}),(0,r.jsxs)("div",{className:"flex gap-1",children:[(0,r.jsx)(o.QBj,{name:"force",size:"medium",form:x,fields:E}),(0,r.jsx)(o.Yqd,{children:(0,r.jsx)("div",{className:"flex gap-1 max-w-[200px]",children:(0,r.jsx)(o.nvN,{size:"14",children:"Force deleting a volume will remove the volume even if the data can NOT be relocated - this will result in severe data loss and contract failure. Be extremely careful when using this option."})})})]}),(0,r.jsx)(o.ZqQ,{variant:"red",form:x,children:"Delete"})]})})}var F=n(6391),V=n.n(F);function I(){let{dialog:e,openDialog:t,closeDialog:n}=ep(),s=(0,a.Os)(),l=(0,a.cj)(),u=(0,i.useCallback)(async e=>{let{sc:t,address:n}=e,r=await l.post({payload:{address:n,amount:t.toString()}});return r.error?{error:r.error}:{transactionId:r.data}},[l]);return(0,r.jsx)(o.weF,{balance:s.data?new(V())(s.data.spendable):void 0,send:u,open:"sendSiacoin"===e,onOpenChange:r=>r?t(e):n()})}function z(){let{id:e,dialog:t,openDialog:n,closeDialog:s}=ep(),l=(0,a.Qq)({params:{},config:{swr:{revalidateOnFocus:!1,refreshInterval:6e4}},disabled:"transactionDetails"!==t}),u=(0,i.useMemo)(()=>{var t;let n=null===(t=l.data)||void 0===t?void 0:t.find(t=>t.ID===e);return n?{txType:(0,o.leQ)(n.transaction,n.source),inflow:n.inflow,outflow:n.outflow,timestamp:n.timestamp,raw:n.transaction}:null},[l,e]);return(0,r.jsx)(o.mPE,{id:e,transaction:u,open:"transactionDetails"===t,onOpenChange:e=>e?n(t):s()})}var Z=n(734),B=n(2850),H=n(71930),U=n(5632);let W={namespace:"wallet",label:"Wallet"};function q(e){let{currentPage:t,parentPage:n,pushPage:i}=e,{openDialog:s,closeDialog:l}=ep(),u=(0,U.useRouter)(),c=(0,a.On)({config:{swr:{revalidateOnFocus:!1,keepPreviousData:!0}}});return(0,r.jsxs)(h.fu,{currentPage:t,commandPage:W,children:[(0,r.jsx)(h.Ul,{currentPage:t,parentPage:n,commandPage:W,onSelect:()=>{i(W)},children:W.label}),(0,r.jsx)(h.WD,{currentPage:t,commandPage:W,onSelect:()=>{u.push(H._.wallet.view),l()},children:"View wallet transactions"}),(0,r.jsx)(h.WD,{currentPage:t,commandPage:W,onSelect:()=>{s("sendSiacoin")},children:"Send siacoin"}),(0,r.jsx)(h.WD,{currentPage:t,commandPage:W,onSelect:()=>{s("addressDetails")},children:"Receive siacoin"}),(0,r.jsx)(h.WD,{currentPage:t,commandPage:W,onSelect:()=>{s("addressDetails")},children:"View wallet address"}),(0,r.jsx)(h.WD,{currentPage:t,commandPage:W,onSelect:()=>{var e;(0,o.vQq)(null===(e=c.data)||void 0===e?void 0:e.walletAddress,"wallet address"),l()},children:"Copy wallet address to clipboard"})]})}var $=n(38617);let Y={namespace:"settings",label:"Settings"};function G(e){let{currentPage:t,parentPage:n}=e,{openDialog:i,closeDialog:o}=ep(),{setTheme:a}=(0,$.F)(),{settings:s,setSettings:l,lock:u,currencyOptions:c,setCurrency:d}=(0,B.Hv)();return(0,r.jsxs)(h.fu,{currentPage:t,commandPage:Y,children:[(0,r.jsx)(h.Ul,{currentPage:t,parentPage:n,commandPage:Y,onSelect:()=>{i("settings")},children:"Open settings"}),(0,r.jsx)(h.WD,{currentPage:t,commandPage:Y,onSelect:()=>{l({siaCentral:!s.siaCentral}),o()},children:(s.siaCentral?"Disable":"Enable")+" external API - Sia Central exchange rates"}),(0,r.jsx)(h.o4,{currentPage:t,commandPage:Y,onSelect:()=>{u(),o()},children:"Lock hostd"}),(0,r.jsx)(h.WD,{currentPage:t,commandPage:Y,onSelect:()=>{i("settings")},children:"Open interface theme menu"}),(0,r.jsx)(h.WD,{currentPage:t,commandPage:Y,onSelect:()=>{a("system"),o()},children:"Set theme to system preference"}),(0,r.jsx)(h.WD,{currentPage:t,commandPage:Y,onSelect:()=>{a("dark"),o()},children:"Set theme to dark"}),(0,r.jsx)(h.WD,{currentPage:t,commandPage:Y,onSelect:()=>{a("light"),o()},children:"Set theme to light"}),(0,r.jsx)(h.WD,{currentPage:t,commandPage:Y,onSelect:()=>{i("settings")},children:"Open currency settings menu"}),c.map(e=>{let{id:n,label:i}=e;return(0,r.jsx)(h.WD,{currentPage:t,commandPage:Y,onSelect:()=>{d(n),o()},children:"Set currency to ".concat(i)},n)})]})}let K={namespace:"node",label:"Blockchain node"};function X(e){let{currentPage:t,parentPage:n,pushPage:i}=e,{openDialog:o,closeDialog:a}=ep(),s=(0,U.useRouter)();return(0,r.jsxs)(h.fu,{currentPage:t,commandPage:K,children:[(0,r.jsx)(h.Ul,{currentPage:t,parentPage:n,commandPage:K,onSelect:()=>{i(K)},children:K.label}),(0,r.jsx)(h.WD,{currentPage:t,commandPage:K,onSelect:()=>{o("connectPeer")},children:"Connect to a peer"}),(0,r.jsx)(h.WD,{currentPage:t,commandPage:K,onSelect:()=>{s.push(H._.node.index),a()},children:"View peers"})]})}var Q=n(99957);let J={namespace:"configuration",label:"Configuration"};function ee(e){let{currentPage:t,parentPage:n,pushPage:i}=e,o=(0,U.useRouter)(),{showAdvanced:a}=(0,Q.ZR)(),{closeDialog:s}=ep();return(0,r.jsxs)(h.fu,{currentPage:t,commandPage:J,children:[(0,r.jsx)(h.Ul,{currentPage:t,parentPage:n,commandPage:J,onSelect:()=>{i(J)},children:J.label}),(0,r.jsx)(h.WD,{currentPage:t,commandPage:J,onSelect:()=>{o.push(H._.config.index),s()},children:"Open configuration"}),(0,r.jsx)(h.WD,{currentPage:t,commandPage:J,onSelect:()=>{o.push(H._.config.host),s()},children:"Configure host"}),(0,r.jsx)(h.WD,{currentPage:t,commandPage:J,onSelect:()=>{o.push(H._.config.pricing),s()},children:"Configure pricing"}),(0,r.jsx)(h.WD,{currentPage:t,commandPage:J,onSelect:()=>{o.push(H._.config.dns),s()},children:"Configure DNS"}),(0,r.jsx)(h.WD,{currentPage:t,commandPage:J,onSelect:()=>{o.push(H._.config.bandwidth),s()},children:"Configure bandwidth"}),a&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(h.WD,{currentPage:t,commandPage:J,onSelect:()=>{o.push(H._.config.registry),s()},children:"Configure registry"}),(0,r.jsx)(h.WD,{currentPage:t,commandPage:J,onSelect:()=>{o.push(H._.config.accounts),s()},children:"Configure accounts"})]})]})}var et=n(92838);function en(e){let{search:t}=e;return(0,r.jsxs)(o.xvT,{color:"verySubtle",className:"flex flex-col gap-2 justify-center items-center mt-5 mb-3",children:[(0,r.jsx)(o.xvT,{color:"verySubtle",className:"flex gap-2 justify-center items-center",children:(0,r.jsx)(p.owP,{})}),(0,r.jsx)(o.xvT,{size:"12",color:"verySubtle",className:"flex justify-center",children:t?"No results matching query.":"Type a query to get started."})]})}var er=n(3639);let ei={namespace:"contracts",label:"Contracts"};function eo(e){let{currentPage:t,parentPage:n,pushPage:i,beforeSelect:o,afterSelect:a}=e,s=(0,U.useRouter)(),{closeDialog:l}=ep();return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(h.Ul,{currentPage:t,parentPage:n,commandPage:n,onSelect:()=>{i(ei)},children:ei.label}),(0,r.jsx)(h.fu,{currentPage:t,commandPage:ei,children:(0,r.jsx)(h.WD,{currentPage:t,commandPage:ei,onSelect:()=>{s.push(H._.contracts.index),l()},children:"View contracts"})}),(0,r.jsx)(er.F,{parentPage:ei,currentPage:t,beforeSelect:o,afterSelect:a,pushPage:i})]})}let ea={namespace:"volumes",label:"Volumes"};function es(e){let{currentPage:t,parentPage:n,pushPage:i}=e,o=(0,U.useRouter)(),{openDialog:a,closeDialog:s}=ep();return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(h.Ul,{currentPage:t,parentPage:n,commandPage:n,onSelect:()=>{i(ea)},children:ea.label}),(0,r.jsxs)(h.fu,{currentPage:t,commandPage:ea,children:[(0,r.jsx)(h.WD,{currentPage:t,commandPage:ea,onSelect:()=>{o.push(H._.volumes.index),s()},children:"View volumes"}),(0,r.jsx)(h.WD,{currentPage:t,commandPage:ea,onSelect:()=>{a("volumeCreate")},children:"Create volume"})]})]})}function el(e){var t,n,a,s,l,h,p,m,v;let{panel:g}=e,y=(0,U.useRouter)(),{resetFilters:b}=(0,et.G)(),{closeDialog:x}=ep(),[w,E]=(0,i.useState)(""),[k]=(s=t&&t.equalityFn||c,h=(a=(n=(0,i.useState)(d(w)))[1],l=[n[0],(0,i.useCallback)(function(e){return a(d(e))},[])])[0],p=l[1],m=u((0,i.useCallback)(function(e){return p(e)},[p]),500,t),s((v=(0,i.useRef)(w)).current,w)||(m(w),v.current=w),[h,m]),[j,_]=(0,i.useState)([]),S=j[j.length-1],O=0===j.length,C=(0,i.useCallback)(e=>{_(t=>[...t,e])},[_]),A=(0,i.useCallback)(()=>{x()},[x]),P=(0,i.useCallback)(()=>{E("")},[E]),T=(null==S?void 0:S.empty)||en;return(0,r.jsxs)(f.mY,{label:"Command Menu",loop:!0,className:(0,M.cx)(g&&(0,o.z$)()),onKeyDown:e=>{(j.length>0&&"Escape"===e.key||"Backspace"===e.key&&!w)&&(e.preventDefault(),_(e=>e.slice(0,-1)))},children:[S&&(0,r.jsx)(o.__J,{className:"px-2",children:S.label}),(0,r.jsx)(f.mY.Input,{value:w,onValueChange:E,className:(0,o.cEb)({variant:"ghost",focus:"none"}),placeholder:(null==S?void 0:S.prompt)||(O?"Search for commands, eg: theme, redundancy":"Search commands")}),(0,r.jsx)(o.Z0O,{className:"my-2"}),(0,r.jsxs)(f.mY.List,{children:[(0,r.jsx)(f.mY.Empty,{children:(0,r.jsx)(T,{search:w,debouncedSearch:k})}),(0,r.jsx)(G,{currentPage:S,pushPage:C}),(0,r.jsx)(q,{currentPage:S,pushPage:C}),(0,r.jsx)(es,{currentPage:S,pushPage:C}),(0,r.jsx)(eo,{currentPage:S,pushPage:C,beforeSelect:()=>{A(),b()},afterSelect:()=>{y.pathname.startsWith(H._.contracts.index)||y.push(H._.contracts.index),P()}}),(0,r.jsx)(ee,{currentPage:S,pushPage:C}),(0,r.jsx)(X,{currentPage:S,pushPage:C})]})]})}function eu(e){let{open:t,onOpenChange:n,setOpen:a}=e,{isUnlocked:s}=(0,B.Hv)(),{isConnected:l}=(0,o.Y97)({route:H.h});return(0,i.useEffect)(()=>{if(!s||!l)return;let e=e=>{"k"===e.key&&e.metaKey&&a()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[s,l,a]),(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(o.VqE,{open:t,onOpenChange:n,contentVariants:{className:"!absolute !p-1 w-[450px] top-[200px]"},bodyClassName:"!px-1 !py-1",closeClassName:"hidden",children:(0,r.jsx)(el,{})})})}function ec(e){let{open:t,onOpenChange:n}=e,s=(0,a.Z7)(),l=(0,a.Uy)(),u=(0,i.useCallback)(async e=>{let t=await l.post({payload:[e]});t.error?(0,o.OHV)("Error dismissing alert."):(0,o.OPV)("Alert has been dismissed.")},[l]),c=(0,i.useCallback)(async(e,t)=>{if(!s.data)return;let n=await l.post({payload:e});n.error?(0,o.OHV)(t?"Error dismissing all ".concat(t," alerts."):"Error dismissing all alerts."):(0,o.OPV)(t?"All ".concat(t," alerts have been dismissed."):"All alerts have been dismissed.")},[l,s]);return(0,r.jsx)(o.hcY,{open:t,onOpenChange:e=>{n(e)},alerts:s,dataFieldOrder:ed,dataFields:ef,dismissMany:c,dismissOne:u})}let ed=["error","contractID","blockHeight","resolution","volume","volumeID","elapsed","error","checked","missing","corrupt","total","oldSectors","currentSectors","targetSectors","migratedSectors","migrated","target","force"],ef={error:{render:e=>{let{value:t}=e;return(0,r.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,r.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"error"}),(0,r.jsx)(o.xvT,{color:"contrast",children:t})]})}},contractId:{render:e=>{let{value:t}=e;return(0,r.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,r.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"contract ID"}),(0,r.jsx)(o.XxW,{value:String(t)})]})}},blockHeight:{render:e=>{let{value:t}=e;return(0,r.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,r.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"block height"}),(0,r.jsx)(o.XxW,{value:String(t),type:"block"})]})}},resolution:{render:e=>{let{value:t}=e;return(0,r.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,r.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"resolution"}),(0,r.jsx)(o.XxW,{value:String(t)})]})}},volume:{render:e=>{let{value:t}=e;return(0,r.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,r.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"volume"}),(0,r.jsx)(o.XxW,{value:String(t)})]})}},volumeID:{render:e=>{let{value:t}=e;return(0,r.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,r.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"volume ID"}),(0,r.jsx)(o.XxW,{value:String(t)})]})}},elapsed:{render:e=>{let{value:t}=e;return(0,r.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,r.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"elapsed"}),(0,r.jsx)(o.xvT,{color:"contrast",ellipsis:!0,children:(0,s.bc)(Number(t))})]})}},checked:{render:e=>{let{value:t}=e;return(0,r.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,r.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"checked"}),(0,r.jsx)(o.xvT,{color:"contrast",ellipsis:!0,children:t.toLocaleString()})]})}},missing:{render:e=>{let{value:t}=e;return(0,r.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,r.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"missing"}),(0,r.jsx)(o.xvT,{color:"contrast",ellipsis:!0,children:t.toLocaleString()})]})}},corrupt:{render:e=>{let{value:t}=e;return(0,r.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,r.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"corrupt"}),(0,r.jsx)(o.xvT,{color:"contrast",ellipsis:!0,children:t.toLocaleString()})]})}},total:{render:e=>{let{value:t}=e;return(0,r.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,r.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"total"}),(0,r.jsx)(o.xvT,{color:"contrast",ellipsis:!0,children:t.toLocaleString()})]})}},oldSectors:{render:e=>{let{value:t}=e;return(0,r.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,r.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"old sectors"}),(0,r.jsx)(o.xvT,{color:"contrast",ellipsis:!0,children:t.toLocaleString()})]})}},currentSectors:{render:e=>{let{value:t}=e;return(0,r.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,r.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"current sectors"}),(0,r.jsx)(o.xvT,{color:"contrast",ellipsis:!0,children:t.toLocaleString()})]})}},targetSectors:{render:e=>{let{value:t}=e;return(0,r.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,r.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"target sectors"}),(0,r.jsx)(o.xvT,{color:"contrast",ellipsis:!0,children:t.toLocaleString()})]})}},migratedSectors:{render:e=>{let{value:t}=e;return(0,r.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,r.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"migrated sectors"}),(0,r.jsx)(o.xvT,{color:"contrast",ellipsis:!0,children:t.toLocaleString()})]})}},migrated:{render:e=>{let{value:t}=e;return(0,r.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,r.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"migrated"}),(0,r.jsx)(o.xvT,{color:"contrast",ellipsis:!0,children:t.toLocaleString()})]})}},target:{render:e=>{let{value:t}=e;return(0,r.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,r.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"target"}),(0,r.jsx)(o.xvT,{color:"contrast",ellipsis:!0,children:t.toLocaleString()})]})}},force:{render:e=>{let{value:t}=e;return(0,r.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,r.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"force"}),(0,r.jsx)(o.xvT,{color:"contrast",ellipsis:!0,children:t?"true":"false"})]})}}},eh=(0,i.createContext)({}),ep=()=>(0,i.useContext)(eh);function em(e){let{children:t}=e,n=function(){let[e,t]=(0,i.useState)(),[n,r]=(0,i.useState)(),o=(0,i.useCallback)((e,n)=>{t(e),r(n)},[t,r]),[a,s]=(0,i.useState)(),l=(0,i.useCallback)(e=>{t("confirm"),s(e)},[t,s]),u=(0,i.useCallback)(()=>{t(void 0),r(void 0),s(void 0)},[t,r,s]),c=(0,i.useCallback)(e=>{e||u()},[u]);return{dialog:e,id:n,openDialog:o,confirm:a,openConfirmDialog:l,closeDialog:u,onOpenChange:c}}();return(0,r.jsx)(eh.Provider,{value:n,children:t})}function ev(){var e;let{dialog:t,openDialog:n,openConfirmDialog:i,onOpenChange:s,closeDialog:l,confirm:u}=ep(),c=(0,a.Wl)(),d=(0,a.Os)();return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(eu,{open:"cmdk"===t,onOpenChange:s,setOpen:()=>n("cmdk")}),(0,r.jsx)(o.DLL,{open:"settings"===t,onOpenChange:s}),(0,r.jsx)(ec,{open:"alerts"===t,onOpenChange:s}),(0,r.jsx)(I,{}),(0,r.jsx)(o.YNn,{open:"addressDetails"===t,address:null===(e=d.data)||void 0===e?void 0:e.address,isValidating:d.isValidating,onOpenChange:e=>e?n(t):l()}),(0,r.jsx)(z,{}),(0,r.jsx)(o.D_D,{connect:e=>c.put({payload:{address:e}}),open:"connectPeer"===t,onOpenChange:e=>e?n(t):l()}),(0,r.jsx)(T,{open:"volumeCreate"===t,onOpenChange:e=>e?n(t):l()}),(0,r.jsx)(R,{open:"volumeResize"===t,onOpenChange:e=>e?n(t):l()}),(0,r.jsx)(L,{open:"volumeDelete"===t,onOpenChange:e=>e?n(t):l()}),(0,r.jsx)(Z.Y,{open:"contractsFilterContractId"===t,onOpenChange:e=>e?n(t):l()}),(0,r.jsx)(o.QHy,{open:"confirm"===t,params:u,onOpenChange:e=>e?i(u):l()})]})}},5187:function(e,t,n){"use strict";n.d(t,{C:function(){return E},B:function(){return w}});var r=n(52322),i=n(2784),o=n(52735),a=n(96206);let s={successful:{color:o.O9T.green[600]},active:{color:o.O9T.amber[600]},pending:{color:o.O9T.amber[600],pattern:!0},rejected:{color:o.O9T.red[600]},failed:{color:o.O9T.red[600]},storage:{label:"storage",color:o.O9T.emerald[600]},storagePhysical:{color:o.O9T.indigo[600]},ingress:{label:"ingress",color:o.O9T.pink[600]},egress:{label:"egress",color:o.O9T.blue[600]},registry:{label:"registry",color:o.O9T.purple[600]},storageWrites:{label:"storage write",color:o.O9T.pink[600]},storageReads:{label:"storage read",color:o.O9T.blue[600]},registryReads:{label:"registry reads",color:o.O9T.green[600]},registryWrites:{label:"registry writes",color:o.O9T.yellow[600]},rpc:{label:"RPC",color:o.O9T.slate[500]},capacityStorage:{label:"capacity",color:o.O9T.neutral[500]},capacityRegistry:{label:"capacity",color:o.O9T.neutral[500]},contract:{color:o.O9T.red[800]},collateral:{color:o.O9T.amber[600]},sectorsTemp:{label:"temp sectors",color:o.O9T.amber[600]},sectorsContract:{label:"contract sectors",color:o.O9T.green[600]},sectorAccess:{label:"sector access",color:o.O9T.blue[600]},sc:{color:o.O9T.green[600]},sf:{color:o.O9T.amber[600]},locked:{color:o.O9T.purple[600]},risked:{color:o.O9T.amber[600]},burnt:{color:o.O9T.red[600]}};var l=n(27444);function u(e,t,n){return{...e,category:t,pattern:n}}function c(e,t,n){return{...e,category:t,label:n}}var d=n(6391),f=n.n(d),h=n(14817),p=n(66700);function m(e,t){for(var n=Math.abs(e).toString();n.length"7"===e.value),x=(0,i.createContext)({}),w=()=>(0,i.useContext)(x);function E(e){let{children:t}=e,n=function(){let[e,t]=(0,y.Z)("v0/metrics/dataTimeSpan",{defaultValue:b.value}),[n,r]=(0,y.Z)("v0/metrics/dataInterval",{defaultValue:b.interval}),d=function(e){let[t,n]=(0,i.useState)(new Date().getTime());return(0,i.useEffect)(()=>{n(new Date().getTime());let t=setInterval(()=>{n(new Date().getTime()),console.log("reset time range")},(0,h.uQ)(e));return()=>clearInterval(t)},[e]),t}(n),x=(0,i.useMemo)(()=>(0,o.OQF)(e,d),[e,d]),w=(0,i.useCallback)(e=>{let n=h.lv.find(t=>t.value===e);r(n.interval),t(n.value)},[t,r]),E=(0,i.useMemo)(()=>(0,o.kOJ)(n),[n]),k=(0,l.KU)({params:{interval:n,start:function(e,t){(0,v.Z)(1,arguments);var n=(0,p.Z)(e);if(isNaN(n.getTime()))throw RangeError("Invalid time value");var r=null!=t&&t.format?String(t.format):"extended",i=null!=t&&t.representation?String(t.representation):"complete";if("extended"!==r&&"basic"!==r)throw RangeError("format must be 'extended' or 'basic'");if("date"!==i&&"time"!==i&&"complete"!==i)throw RangeError("representation must be 'date', 'time', or 'complete'");var o="",a="",s="extended"===r?"-":"";if("time"!==i){var l=m(n.getDate(),2),u=m(n.getMonth()+1,2),c=m(n.getFullYear(),4);o="".concat(c).concat(s).concat(u).concat(s).concat(l)}if("date"!==i){var d=n.getTimezoneOffset();if(0!==d){var f=Math.abs(d),h=m(Math.floor(f/60),2),g=m(f%60,2);a="".concat(d<0?"+":"-").concat(h,":").concat(g)}else a="Z";var y=m(n.getHours(),2),b=m(n.getMinutes(),2),x=m(n.getSeconds(),2),w=""===o?"":"T",E=[y,b,x].join("extended"===r?":":"");o="".concat(o).concat(w).concat(E).concat(a)}return o}(new Date(x.start-(0,h.uQ)(n)))},config:{swr:{revalidateOnFocus:!1,refreshInterval:(0,o.sWj)(5)}}}),j=(0,i.useMemo)(()=>{var e;let t=(0,o.Y_Z)(null===(e=k.data)||void 0===e?void 0:e.map(e=>({storagePotential:Number(e.revenue.potential.storage),ingressPotential:Number(e.revenue.potential.ingress),egressPotential:Number(e.revenue.potential.egress),registryReadPotential:Number(e.revenue.potential.registryRead),registryWritePotential:Number(e.revenue.potential.registryWrite),rpcPotential:Number(e.revenue.potential.rpc),storage:Number(e.revenue.earned.storage),ingress:Number(e.revenue.earned.ingress),egress:Number(e.revenue.earned.egress),registryRead:Number(e.revenue.earned.registryRead),registryWrite:Number(e.revenue.earned.registryWrite),rpc:Number(e.revenue.earned.rpc),potential:new(f())(e.revenue.potential.storage).plus(e.revenue.potential.ingress).plus(e.revenue.potential.egress).plus(e.revenue.potential.registryRead).plus(e.revenue.potential.registryWrite).plus(e.revenue.potential.rpc).toNumber(),earned:new(f())(e.revenue.earned.storage).plus(e.revenue.earned.ingress).plus(e.revenue.earned.egress).plus(e.revenue.earned.registryRead).plus(e.revenue.earned.registryWrite).plus(e.revenue.earned.rpc).toNumber(),timestamp:new Date(e.timestamp).getTime()})),"delta"),n=(0,o.fVJ)(t);return{data:t,stats:n,config:{enabledGraph:["storage","storagePotential","ingress","ingressPotential","egress","egressPotential","registryRead","registryReadPotential","registryWrite","registryWritePotential","rpc","rpcPotential"],enabledTip:["potential","earned","storage","storagePotential","ingress","ingressPotential","egress","egressPotential","registryRead","registryReadPotential","registryWrite","registryWritePotential","rpc","rpcPotential"],categories:["earned","potential"],data:{storagePotential:u(s.storage,"potential",!0),ingressPotential:u(s.ingress,"potential",!0),egressPotential:u(s.egress,"potential",!0),registryReadPotential:u(s.registryReads,"potential",!0),registryWritePotential:u(s.registryWrites,"potential",!0),rpcPotential:u(s.rpc,"potential",!0),storage:u(s.storage,"earned"),ingress:u(s.ingress,"earned"),egress:u(s.egress,"earned"),registryRead:u(s.registryReads,"earned"),registryWrite:u(s.registryWrites,"earned"),rpc:u(s.rpc,"earned"),earned:c({},"earned","total"),potential:c({},"potential","total")},format:e=>(0,a.Vz)(e),formatTimestamp:E,disableAnimations:!0},chartType:"line",isLoading:k.isValidating}},[k,E]),_=(0,i.useMemo)(()=>{var e;let t=(0,o.Y_Z)(null===(e=k.data)||void 0===e?void 0:e.map(e=>({locked:Number(e.contracts.lockedCollateral),risked:Number(e.contracts.riskedCollateral),timestamp:new Date(e.timestamp).getTime()})),"none"),n=(0,o.fVJ)(t);return{data:t,stats:n,config:{enabledGraph:["locked","risked"],enabledTip:["locked","risked"],data:{locked:s.locked,risked:s.risked},format:e=>(0,a.Vz)(e),formatTimestamp:E,disableAnimations:!0},chartType:"area",isLoading:k.isValidating}},[k,E]),S=(0,i.useMemo)(()=>{var e;let t=(0,o.Y_Z)(null===(e=k.data)||void 0===e?void 0:e.map(e=>({baseRPC:(0,g.sS)(e.pricing.baseRPCPrice).toNumber(),collateral:(0,g.c5)(new(f())(e.pricing.storagePrice).times(e.pricing.collateralMultiplier)).toNumber(),contract:Number(e.pricing.contractPrice),egress:(0,g.B1)(e.pricing.egressPrice).toNumber(),ingress:(0,g.dK)(e.pricing.ingressPrice).toNumber(),sectorAccess:(0,g.nS)(e.pricing.sectorAccessPrice).toNumber(),storage:(0,g.SY)(e.pricing.storagePrice).toNumber(),timestamp:new Date(e.timestamp).getTime()})),"none"),n=(0,o.fVJ)(t);return{data:t,stats:n,config:{enabledGraph:["storage","ingress","egress","collateral","contract","sectorAccess","baseRPC"],enabledTip:["storage","ingress","egress","collateral","contract","sectorAccess","baseRPC"],data:{baseRPC:s.rpc,sectorAccess:s.sectorAccess,contract:s.contract,collateral:s.collateral,egress:s.egress,ingress:s.ingress,storage:s.storage},format:e=>(0,a.Vz)(e),formatTimestamp:E,disableAnimations:!0},chartType:"line",isLoading:k.isValidating}},[k,E]),O=(0,i.useMemo)(()=>{var e;let t=(0,o.Y_Z)(null===(e=k.data)||void 0===e?void 0:e.map(e=>({active:e.contracts.active,failed:e.contracts.failed,pending:e.contracts.pending,rejected:e.contracts.rejected,successful:e.contracts.successful,timestamp:new Date(e.timestamp).getTime()})),"none"),n=(0,o.fVJ)(t);return{data:t,stats:n,config:{enabledGraph:["successful","active","pending","rejected","failed"],enabledTip:["successful","active","pending","rejected","failed"],data:{active:s.active,failed:s.failed,pending:s.pending,rejected:s.rejected,successful:s.successful},format:e=>"".concat(e," contracts"),formatTimestamp:E,disableAnimations:!0},chartType:"areastack",isLoading:k.isValidating}},[k,E]),C=(0,i.useMemo)(()=>{var e;let t=(0,o.Y_Z)(null===(e=k.data)||void 0===e?void 0:e.map(e=>({maxSectors:(0,o.B$N)(e.storage.totalSectors).times(4).toNumber(),registryEntries:113*e.registry.entries,maxRegistryEntries:113*e.registry.maxEntries,tempSectors:(0,o.B$N)(e.storage.tempSectors).times(4).toNumber(),physicalSectors:(0,o.B$N)(e.storage.physicalSectors).times(4).toNumber(),contractSectors:(0,o.B$N)(e.storage.contractSectors).times(4).toNumber(),timestamp:new Date(e.timestamp).getTime()})),"none"),n=(0,o.fVJ)(t);return{data:t,stats:n,config:{enabledGraph:["contractSectors","physicalSectors","tempSectors","registryEntries","maxSectors","maxRegistryEntries"],enabledTip:["contractSectors","physicalSectors","tempSectors","registryEntries","maxSectors","maxRegistryEntries"],categories:["storage used","storage capacity"],data:{maxSectors:c(s.capacityStorage,"storage capacity","sectors"),maxRegistryEntries:c(s.capacityRegistry,"storage capacity","registry"),physicalSectors:c(s.storagePhysical,"storage used","sectors physical"),registryEntries:c(s.registry,"storage used","registry (max)"),tempSectors:c(s.sectorsTemp,"storage used","sectors temp"),contractSectors:c(s.storage,"storage used","sectors contract")},format:e=>(0,a.vW)(e),formatTimestamp:E,disableAnimations:!0},chartType:"line",isLoading:k.isValidating}},[k,E]),M=(0,i.useMemo)(()=>{var e;let t=(0,o.Y_Z)(null===(e=k.data)||void 0===e?void 0:e.map(e=>({storageReads:e.storage.reads,storageWrites:e.storage.writes,registryReads:e.registry.reads,registryWrites:e.registry.writes,timestamp:new Date(e.timestamp).getTime()})),"delta"),n=(0,o.fVJ)(t);return{data:t,stats:n,config:{enabledGraph:["storageReads","storageWrites","registryReads","registryWrites"],enabledTip:["storageReads","storageWrites","registryReads","registryWrites"],data:{registryReads:s.registryReads,registryWrites:s.registryWrites,storageReads:s.storageReads,storageWrites:s.storageWrites},format:e=>(0,a.yF)(e),formatTimestamp:E,disableAnimations:!0},chartType:"line",isLoading:k.isValidating}},[k,E]),A=(0,i.useMemo)(()=>{var e;let t=(0,o.Y_Z)(null===(e=k.data)||void 0===e?void 0:e.map(e=>({egress:e.data.rhp3.egress+e.data.rhp2.egress,ingress:e.data.rhp3.ingress+e.data.rhp2.ingress,timestamp:new Date(e.timestamp).getTime()})),"delta"),n=(0,o.fVJ)(t);return{data:t,stats:n,config:{enabledGraph:["ingress","egress"],enabledTip:["ingress","egress"],data:{ingress:s.ingress,egress:s.egress},format:e=>(0,a.vW)(e),formatTimestamp:E,disableAnimations:!0},chartType:"line",isLoading:k.isValidating}},[k,E]);return{dataTimeSpan:e,setDataTimeSpan:w,timeRange:x,dataInterval:n,setDataInterval:r,operations:M,revenue:j,collateral:_,contracts:O,storage:C,pricing:S,bandwidth:A}}();return(0,r.jsx)(x.Provider,{value:n,children:t})}},14817:function(e,t,n){"use strict";n.d(t,{lv:function(){return i},uQ:function(){return o}});var r=n(52735);let i=[{label:"1D",interval:"5m",value:"1"},{label:"7D",interval:"15m",value:"7"},{label:"1M",interval:"hourly",value:"30"},{label:"3M",interval:"daily",value:"90"},{label:"1Y",interval:"daily",value:"365"},{label:"ALL",interval:"weekly",value:"all"}];function o(e){return"5m"===e?(0,r.sWj)(5):"15m"===e?(0,r.sWj)(15):"hourly"===e?(0,r.ytg)(1):"daily"===e?(0,r.NrH)(1):"weekly"===e?(0,r.NrH)(7):"monthly"===e?(0,r.NrH)(30):"yearly"===e?(0,r.NrH)(365):0}},78743:function(e,t,n){"use strict";n.d(t,{Y:function(){return y},F:function(){return g}});var r=n(52322),i=n(52735),o=n(27444),a=n(2784);let s=["actions","path","storage","available","readOnly","successfulReads","successfulWrites","failedReads","failedWrites"];var l=n(41775),u=n(96206),c=n(22515);function d(e){var t,n;let{id:a,contentProps:s,buttonProps:u}=e,{openDialog:d}=(0,c.Rh)(),h=(0,o.Rz)(),p=(0,o.ST)({params:{id:a}}),m=(0,o._3)(),v=p.data&&"ready"==p.data.status,g=p.data&&!["ready","unavailable"].includes(p.data.status);return(0,r.jsxs)(i.h_2,{trigger:(0,r.jsx)(i.zxk,{variant:"ghost",icon:"hover",...u,children:(0,r.jsx)(l.iG7,{})}),contentProps:{align:"start",...s},children:[(0,r.jsx)("div",{className:"px-1.5 py-1",children:(0,r.jsxs)(i.xvT,{size:"14",weight:"medium",color:"subtle",children:["Volume ",p.data?(0,i.$Gg)(null===(t=p.data)||void 0===t?void 0:t.localPath,24):a]})}),(0,r.jsx)(i.Juw,{children:"Actions"}),g?(0,r.jsxs)(i.Xiv,{onSelect:async()=>{var e;let t=null===(e=p.data)||void 0===e?void 0:e.status,n=await m.delete({params:{id:Number(a)}});n.error?(0,i.OHV)("Error canceling volume ".concat(f(t),".")):(0,i.OPV)("Successfully canceled volume ".concat(f(t),"."))},children:[(0,r.jsx)(i.KpP,{children:(0,r.jsx)(l.PcV,{})}),"Cancel ".concat(f(null===(n=p.data)||void 0===n?void 0:n.status))]}):null,p.data?(0,r.jsxs)(i.Xiv,{disabled:!v,onSelect:async()=>{let e=!p.data.readOnly,t=await h.put({params:{id:Number(a)},payload:{readOnly:e}});t.error?(0,i.OHV)(e?"Error setting volume to read-only.":"Error setting volume to read/write."):(0,i.OPV)(e?"Volume set to read-only.":"Volume set to read/write.")},children:[(0,r.jsx)(i.KpP,{children:p.data.readOnly?(0,r.jsx)(l.dr6,{}):(0,r.jsx)(l.Lur,{})}),p.data.readOnly?"Set to read/write":"Set to read-only"]}):null,(0,r.jsxs)(i.Xiv,{disabled:!v,onSelect:()=>d("volumeResize",a),children:[(0,r.jsx)(i.KpP,{children:(0,r.jsx)(l.BB5,{})}),"Resize"]}),(0,r.jsxs)(i.Xiv,{disabled:g,onSelect:()=>d("volumeDelete",a),children:[(0,r.jsx)(i.KpP,{children:(0,r.jsx)(l.Jrl,{})}),"Delete"]})]})}function f(e){return"resizing"===e?"resize":"creating"===e?"creation":"removing"===e?"removal":"operation"}let h=[{id:"actions",label:"",fixed:!0,cellClassName:"w-[50px] !pl-2 !pr-4 [&+*]:!pl-0",render:e=>{let{data:t}=e;return(0,r.jsx)(d,{id:t.id})}},{id:"path",label:"path",category:"general",render:e=>{let{data:t}=e;return(0,r.jsx)(i.xvT,{font:"mono",ellipsis:!0,children:t.localPath})}},{id:"available",label:"status",category:"general",render:e=>{var t;let{data:n}=e;return(0,r.jsx)(i.ua7,{side:"right",content:n.available?"available":(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.xvT,{children:"unavailable"}),(0,r.jsx)("div",{className:"flex flex-col",children:null===(t=n.errors)||void 0===t?void 0:t.map(e=>(0,r.jsx)(i.xvT,{size:"10",noWrap:!0,children:e},e))})]}),children:(0,r.jsxs)("div",{className:"flex gap-2 items-center",children:[n.available&&"ready"===n.status&&(0,r.jsx)(i.xvT,{color:"green",children:(0,r.jsx)(l.DI$,{})}),n.available&&"ready"!==n.status&&(0,r.jsx)(i.xvT,{color:"amber",children:(0,r.jsx)(l.dsj,{})}),!n.available&&(0,r.jsx)(i.xvT,{color:"amber",children:(0,r.jsx)(l.SmH,{})}),(0,r.jsx)(i.xvT,{size:"12",className:"relative -top-px",children:n.status})]})})}},{id:"readOnly",label:"read/write",category:"general",render:e=>{let{data:t}=e;return t.readOnly?(0,r.jsx)(i.ua7,{content:"Read-only",children:(0,r.jsx)(i.xvT,{children:(0,r.jsx)(l.Lur,{})})}):(0,r.jsx)(i.ua7,{content:"Read and write enabled",children:(0,r.jsx)(i.xvT,{color:"subtle",children:(0,r.jsx)(l.dr6,{})})})}},{id:"storage",label:"storage",category:"general",render:e=>{let{data:t}=e;return(0,r.jsx)("div",{className:"flex gap-1 w-full max-w-[200px] pt-[10px]",children:(0,r.jsx)(i.kod,{variant:"accent",value:t.usedBytes,max:t.totalBytes,label:"".concat((0,u.vW)(t.usedBytes)," / ").concat((0,u.vW)(t.totalBytes))})})}},{id:"successfulReads",label:"successful reads",category:"operations",render:e=>{let{data:t}=e;return(0,r.jsx)(i.m2c,{variant:"value",size:"12",value:t.successfulReads,format:e=>e.toNumber().toLocaleString()})}},{id:"successfulWrites",label:"successful writes",category:"operations",render:e=>{let{data:t}=e;return(0,r.jsx)(i.m2c,{variant:"value",size:"12",value:t.successfulWrites,format:e=>e.toNumber().toLocaleString()})}},{id:"failedReads",label:"failed reads",category:"operations",render:e=>{let{data:t}=e;return(0,r.jsx)(i.m2c,{variant:"value",size:"12",value:t.failedReads,format:e=>e.toNumber().toLocaleString()})}},{id:"failedWrites",label:"failed writes",category:"operations",render:e=>{let{data:t}=e;return(0,r.jsx)(i.m2c,{variant:"value",size:"12",value:t.failedWrites,format:e=>e.toNumber().toLocaleString()})}}];var p=n(6391),m=n.n(p);let v=(0,a.createContext)({}),g=()=>(0,a.useContext)(v);function y(e){let{children:t}=e,n=function(){let{configurableColumns:e,enabledColumns:t,toggleColumnVisibility:n,setColumnsVisible:r,setColumnsHidden:l,toggleSort:u,setSortDirection:c,setSortField:d,sortField:f,sortDirection:p,resetDefaultColumnVisibility:v}=(0,i.oy6)("hostd/v0/volumes",{columns:h,columnsDefaultVisible:s}),g=(0,o.Fn)({config:{swr:{refreshInterval:e=>e.find(e=>!["ready","unavailable"].includes(e.status))?(0,i.XBW)(5):(0,i.XBW)(60)}}}),y=function(e){let{response:t}=e;return(0,a.useMemo)(()=>{var e;return t.data?(null===(e=t.data)||void 0===e?void 0:e.map(e=>({id:String(e.ID),ID:e.ID,localPath:e.localPath,usedSectors:e.usedSectors,usedBytes:new(m())(e.usedSectors).times((0,i.B$N)(4)).toNumber(),totalBytes:new(m())(e.totalSectors).times((0,i.B$N)(4)).toNumber(),totalSectors:e.totalSectors,status:e.status,readOnly:e.readOnly,available:e.available,failedReads:new(m())(e.failedReads),failedWrites:new(m())(e.failedWrites),successfulReads:new(m())(e.successfulReads),successfulWrites:new(m())(e.successfulWrites),errors:e.errors})))||[]:null},[t.data])}({response:g}),b=(0,a.useMemo)(()=>h.filter(e=>t.includes(e.id)),[t]),x=g.isValidating,w=g.error,E=(0,i.c2j)(y,x,w,[]);return{dataState:E,totalCount:(null==y?void 0:y.length)||0,isLoading:g.isValidating,columns:b,dataset:y,configurableColumns:e,enabledColumns:t,toggleColumnVisibility:n,setColumnsVisible:r,setColumnsHidden:l,toggleSort:u,setSortDirection:c,setSortField:d,sortField:f,sortDirection:p,resetDefaultColumnVisibility:v}}();return(0,r.jsx)(v.Provider,{value:n,children:t})}},734:function(e,t,n){"use strict";n.d(t,{O:function(){return u},Y:function(){return f}});var r=n(52322),i=n(52735),o=n(92838),a=n(63397),s=n(24511),l=n(22515);function u(e){return{id:"filterContractId",value:e,label:"contract ID is ".concat(e)}}let c={contractId:""},d=s.Ry().shape({contractId:s.Z_().required("Required")});function f(e){let{trigger:t,open:n,onOpenChange:s}=e,{closeDialog:f}=(0,l.Rh)(),{setFilter:h}=(0,o.G)(),p=(0,a.TA)({initialValues:c,validationSchema:d,onSubmit:e=>{h(u(e.contractId)),p.resetForm(),f()}});return(0,r.jsx)(i.VqE,{trigger:t,title:"Filter by contract ID",open:n,onOpenChange:e=>{e||p.resetForm(),s(e)},contentVariants:{className:"w-[400px]"},onSubmit:p.handleSubmit,children:(0,r.jsx)("div",{className:"flex flex-col gap-4",children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsx)(i.cB7,{formik:p,title:"Contract ID",name:"contractId",placeholder:"Exact match for contract ID",autoComplete:"off",type:"text",variants:{size:"medium"}}),(0,r.jsx)(i.IKw,{formik:p,size:"medium",children:"Filter"})]})})})}},25573:function(e,t,n){"use strict";n.d(t,{n:function(){return o}});var r=n(2850),i=n(27444);function o(){var e,t,n,o;let{isUnlocked:a}=(0,r.Hv)(),s=(0,i.d$)({config:{swr:{refreshInterval:e=>(null==e?void 0:e.synced)?6e4:1e4}}}),l=(0,i.nH)(),u=s.data?null===(e=s.data)||void 0===e?void 0:e.chainIndex.height:0,c=(0,i.Os)({config:{swr:{refreshInterval:e=>(null==e?void 0:e.scanHeight)>=u?6e4:1e4}}}),d=a&&u&&l?Number((100*Math.min(u/l,1)).toFixed(1)):0,f=a&&u&&c.data?Number((100*Math.min(c.data.scanHeight/l,1)).toFixed(1)):0;return{isSynced:null===(t=s.data)||void 0===t?void 0:t.synced,isWalletSynced:(null===(n=s.data)||void 0===n?void 0:n.synced)&&(null===(o=c.data)||void 0===o?void 0:o.scanHeight)>=u-1,nodeBlockHeight:u,estimatedBlockHeight:l,syncPercent:d,walletScanPercent:f,moreThan100BlocksToSync:!!u&&!!l&&l-u>100,firstTimeSyncing:!!u&&!!l&&l-u>5e4}}},94977:function(e,t,n){"use strict";n.d(t,{B1:function(){return m},K9:function(){return c},LP:function(){return v},SY:function(){return s},c5:function(){return h},co:function(){return l},dK:function(){return g},dz:function(){return a},nS:function(){return d},rZ:function(){return f},s2:function(){return p},sS:function(){return u}});var r=n(52735),i=n(6391),o=n.n(i);let a="/TB/month";function s(e){return new(o())(e).times((0,r.xf5)(1)).times((0,r.S5V)(1))}let l="/million";function u(e){return new(o())(e).times(1e7)}let c="/million";function d(e){return new(o())(e).times(1e7)}let f="/TB/month";function h(e){return new(o())(e).times((0,r.xf5)(1)).times((0,r.S5V)(1))}let p="/TB";function m(e){return new(o())(e).times((0,r.xf5)(1))}let v="/TB";function g(e){return new(o())(e).times((0,r.xf5)(1))}},76176:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return E}});var r=n(52322);n(37832);var i=n(52735),o=n(92838),a=n(5187),s=n(22515),l=n(78743),u=n(99957),c=n(41775),d=n(25573),f=n(71930),h=n(27444),p=n(6391),m=n.n(p),v=n(96206),g=n(2850),y=n(92762);function b(){var e,t;let{isUnlocked:n}=(0,g.Hv)(),{openDialog:o}=(0,s.Rh)(),{dataset:a}=(0,l.F)(),u=(0,h.rV)(),p=(0,h.Os)(),[b,w]=(0,y.Z)("v0/hostd/onboarding/maximized",{defaultValue:!0}),E=(0,d.n)();if(!n)return null;let k=new(m())((null===(e=p.data)||void 0===e?void 0:e.confirmed)||0),j=(0,v.qN)(5e3),_=p.data&&k.gte(j),S=(null==a?void 0:a.length)>0,O=null===(t=u.data)||void 0===t?void 0:t.acceptingContracts,C=E.isSynced,M=[_,S,O,C],A=M.length,P=M.filter(e=>e).length;return A===P?null:b?(0,r.jsx)("div",{className:"z-20 fixed bottom-5 left-1/2 -translate-x-1/2 flex justify-center",children:(0,r.jsx)(i.s_4,{className:"w-[400px] flex flex-col max-h-[600px]",children:(0,r.jsxs)(i.xrM,{children:[(0,r.jsxs)("div",{className:"flex justify-between items-center px-3 py-2 border-b border-gray-200 dark:border-graydark-300",children:[(0,r.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,r.jsx)(i.TRl,{}),(0,r.jsx)(i.xvT,{size:"20",weight:"semibold",children:"Welcome to Sia"})]}),(0,r.jsx)(i.zxk,{variant:"ghost",onClick:()=>w(!1),children:(0,r.jsx)(c.mli,{})})]}),(0,r.jsx)("div",{className:"flex justify-between items-center px-3 py-2 border-b border-gray-200 dark:border-graydark-300",children:(0,r.jsx)(i.xvT,{size:"14",children:"Get set up by completing the following steps. Once they are complete, your host is ready to store data."})}),(0,r.jsx)(x,{title:(0,r.jsx)(i.rUS,{href:f._.wallet.view,onClick:()=>o("addressDetails"),ellipsis:!0,size:"14",underline:"hover",children:"Step 1: Fund your wallet"}),description:"Fund your wallet with at least ".concat((0,v.Vz)(j)," siacoin to cover required contract collateral.").concat(E.isWalletSynced?"":" Balance will not be accurate until wallet is finished scanning."),action:_?(0,r.jsx)(i.xvT,{color:"green",children:(0,r.jsx)(c.Y3p,{})}):(0,r.jsxs)(r.Fragment,{children:[!E.isWalletSynced&&(0,r.jsx)(i.ua7,{content:"Wallet scanning progress ".concat(E.walletScanPercent,"%"),children:(0,r.jsxs)(i.xvT,{size:"14",children:[E.walletScanPercent,"%"]})}),(0,r.jsx)(i.rUS,{href:f._.wallet.view,onClick:()=>o("addressDetails"),children:(0,r.jsx)(c.V8Q,{})}),(0,r.jsx)(i.xvT,{color:"amber",children:(0,r.jsx)(c.Fs9,{})})]})}),(0,r.jsx)(x,{title:(0,r.jsx)(i.rUS,{href:f._.volumes.index,ellipsis:!0,size:"14",underline:"hover",children:"Step 2: Add a volume"}),description:"Add a system volume that will be used to store data.",action:S?(0,r.jsx)(i.xvT,{color:"green",children:(0,r.jsx)(c.Y3p,{})}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.rUS,{href:f._.volumes.index,children:(0,r.jsx)(c.V8Q,{})}),(0,r.jsx)(i.xvT,{color:"amber",children:(0,r.jsx)(c.Fs9,{})})]})}),(0,r.jsx)(x,{title:(0,r.jsx)(i.rUS,{href:f._.config.index,ellipsis:!0,size:"14",underline:"hover",children:"Step 3: Configure pricing and settings"}),description:"Configure your host's pricing and settings and start accepting contracts.",action:O?(0,r.jsx)(i.xvT,{color:"green",children:(0,r.jsx)(c.Y3p,{})}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.rUS,{href:f._.config.index,children:(0,r.jsx)(c.V8Q,{})}),(0,r.jsx)(i.xvT,{color:"amber",children:(0,r.jsx)(c.Fs9,{})})]})}),(0,r.jsx)(x,{title:(0,r.jsx)(i.rUS,{href:f._.node.index,underline:"hover",ellipsis:!0,size:"14",children:"Step 4: Wait for the blockchain to sync"}),description:"The blockchain will sync in the background, this takes some time. No user action required.",action:C?(0,r.jsx)(i.xvT,{color:"green",children:(0,r.jsx)(c.Y3p,{})}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(i.xvT,{ellipsis:!0,size:"14",children:[E.syncPercent,"%"]}),(0,r.jsx)(i.xvT,{color:"amber",children:(0,r.jsx)(c.hzZ,{})})]})})]})})}):(0,r.jsx)("div",{className:"z-30 fixed bottom-5 left-1/2 -translate-x-1/2 flex justify-center",children:(0,r.jsx)(i.zxk,{onClick:()=>w(!0),size:"large",className:"flex gap-3 !px-3",children:(0,r.jsxs)(i.xvT,{className:"flex items-center gap-1",children:[(0,r.jsx)(i.TRl,{}),"Setup: ",P,"/",A," steps complete"]})})})}function x(e){let{title:t,action:n,description:o}=e;return(0,r.jsx)("div",{className:"border-t first:border-t-0 border-gray-200 dark:border-graydark-300 px-3 py-2",children:(0,r.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,r.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,r.jsx)("div",{className:"flex-1 flex items-center",children:t}),n]}),(0,r.jsx)("div",{className:"pr-5",children:(0,r.jsx)(i.xvT,{size:"12",color:"subtle",children:o})})]})})}function w(e){let{children:t}=e;return(0,r.jsx)(s.Tu,{children:(0,r.jsx)(u.iV,{children:(0,r.jsx)(l.Y,{children:(0,r.jsx)(o.x,{children:(0,r.jsxs)(a.C,{children:[(0,r.jsx)(s.xQ,{}),(0,r.jsx)(b,{}),t]})})})})})}function E(e){let{Component:t,pageProps:n}=e;return(0,r.jsx)(i.PD$,{fallback:n.fallback,passwordProtectRequestHooks:!0,lockRoutes:f._,children:(0,r.jsx)(w,{children:(0,r.jsx)(t,{...n})})})}},52735:function(e,t,n){"use strict";let r,i,o,a;n.d(t,{hcY:function(){return _F},tU3:function(){return _N},zXq:function(){return _Q},juT:function(){return _o},Cts:function(){return lg},Z58:function(){return SM},WVB:function(){return cP},zxk:function(){return le},b0u:function(){return EL},EKh:function(){return lx},vRO:function(){return Oe},QHy:function(){return SQ},TaT:function(){return Sq},eQh:function(){return lE},HfT:function(){return S1},ncR:function(){return jq},A06:function(){return SR},Vy9:function(){return SD},VqE:function(){return l9},h_2:function(){return cL},Xiv:function(){return cF},Juw:function(){return cV},KpP:function(){return cI},XOF:function(){return jW},jIp:function(){return Ot},QBj:function(){return On},yEL:function(){return _Y},cB7:function(){return jQ},ZqQ:function(){return jX},IKw:function(){return j3},Hzd:function(){return Ov},WN2:function(){return Ow},X6q:function(){return cU},Yqd:function(){return fj},__J:function(){return cJ},rUS:function(){return c2},TRl:function(){return c3},YaL:function(){return Oy},kFS:function(){return cT},FzK:function(){return SG},Clw:function(){return cA},B$N:function(){return Oh},PD$:function(){return Os},Wxm:function(){return fC},uDJ:function(){return j8},s_4:function(){return tG},nvN:function(){return t$},u5Q:function(){return SA},j4H:function(){return f_},J2e:function(){return dg},kod:function(){return dP},xrM:function(){return l6},PhF:function(){return fO},Z0O:function(){return c_},DLL:function(){return Sb},KJW:function(){return _l},rsf:function(){return fU},D_D:function(){return Sd},xf5:function(){return Op},iA_:function(){return j5},t6k:function(){return S2},xvT:function(){return tq},nvn:function(){return d3},ua7:function(){return s7},mPE:function(){return Sf},XxW:function(){return jw},m2c:function(){return jj},YKL:function(){return jk},QUh:function(){return Sw},weF:function(){return _7},YNn:function(){return Sm},DmW:function(){return Sv},jrD:function(){return SI},E6f:function(){return SV},Uzc:function(){return Om},BTR:function(){return Og},O9T:function(){return m4},fVJ:function(){return SS},vQq:function(){return jf},NrH:function(){return EP},Y_Z:function(){return SE},EJC:function(){return OE},kOJ:function(){return S_},OQF:function(){return Sk},leQ:function(){return jv},ytg:function(){return EA},Vkc:function(){return cO},sWj:function(){return EM},S5V:function(){return SL},z$:function(){return tY},XBW:function(){return ET},x9T:function(){return Ob},bjP:function(){return Ox},I13:function(){return jp},cEb:function(){return d4},OHV:function(){return ju},OPV:function(){return jl},$Gg:function(){return jh},Y97:function(){return _T},c2j:function(){return _R},WsO:function(){return _$},Uu5:function(){return Of},oy6:function(){return Od}});var s,l,u,c,d,f,h,p,m,v,g,y,b=n(52322),x=n(2784),w=n.t(x,2),E=n(7896),k=n(34540),j=n(26215),_=n(99575);function S(e){let t=e+"CollectionProvider",[n,r]=(0,k.b)(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=e+"CollectionSlot",s=x.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=o(a,n),s=(0,j.e)(t,i.collectionRef);return x.createElement(_.g7,{ref:s},r)}),l=e+"CollectionItemSlot",u="data-radix-collection-item",c=x.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,a=x.useRef(null),s=(0,j.e)(t,a),c=o(l,n);return x.useEffect(()=>(c.itemMap.set(a,{ref:a,...i}),()=>void c.itemMap.delete(a))),x.createElement(_.g7,{[u]:"",ref:s},r)});return[{Provider:e=>{let{scope:t,children:n}=e,r=x.useRef(null),o=x.useRef(new Map).current;return x.createElement(i,{scope:t,itemMap:o,collectionRef:r},n)},Slot:s,ItemSlot:c},function(t){let n=o(e+"CollectionConsumer",t),r=x.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${u}]`)),r=Array.from(n.itemMap.values()),i=r.sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current));return i},[n.collectionRef,n.itemMap]);return r},r]}var O=n(41816),C=n(73597),M=n(72130),A=n(64680),P=n(28245),T=n(26074);let N="Collapsible",[R,D]=(0,k.b)(N),[L,F]=R(N),V=((e,t)=>{let{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:o,onOpenChange:a,...s}=e,[l=!1,u]=(0,C.T)({prop:r,defaultProp:i,onChange:a});return(0,x.createElement)(L,{scope:n,disabled:o,contentId:(0,T.M)(),open:l,onOpenToggle:(0,x.useCallback)(()=>u(e=>!e),[u])},(0,x.createElement)(M.WV.div,(0,E.Z)({"data-state":z(l),"data-disabled":o?"":void 0},s,{ref:t})))},"CollapsibleContent"),I=((e,t)=>{let{forceMount:n,...r}=e,i=F(V,e.__scopeCollapsible);return(0,x.createElement)(P.z,{present:n||i.open},({present:e})=>(0,x.createElement)(I,(0,E.Z)({},r,{ref:t,present:e})))},(0,x.forwardRef)((e,t)=>{let{__scopeCollapsible:n,present:r,children:i,...o}=e,a=F(V,n),[s,l]=(0,x.useState)(r),u=(0,x.useRef)(null),c=(0,j.e)(t,u),d=(0,x.useRef)(0),f=d.current,h=(0,x.useRef)(0),p=h.current,m=a.open||s,v=(0,x.useRef)(m),g=(0,x.useRef)();return(0,x.useEffect)(()=>{let e=requestAnimationFrame(()=>v.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,A.b)(()=>{let e=u.current;if(e){g.current=g.current||{transitionDuration:e.style.transitionDuration,animationDuration:e.style.animationDuration,animationFillMode:e.style.animationFillMode},e.style.transitionDuration="0s",e.style.animationDuration="0s",e.style.animationFillMode="none";let t=e.getBoundingClientRect();d.current=t.height,h.current=t.width,v.current||(e.style.transitionDuration=g.current.transitionDuration,e.style.animationDuration=g.current.animationDuration,e.style.animationFillMode=g.current.animationFillMode),l(r)}},[a.open,r]),(0,x.createElement)(M.WV.div,(0,E.Z)({"data-state":z(a.open),"data-disabled":a.disabled?"":void 0,id:a.contentId,hidden:!m},o,{ref:c,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":p?`${p}px`:void 0,...e.style}}),m&&i)}));function z(e){return e?"open":"closed"}let Z="Accordion",B=["Home","End","ArrowDown","ArrowUp"],[H,U,W]=S(Z),[q,$]=(0,k.b)(Z,[W,D]),Y=(D(),x.forwardRef((e,t)=>{let{type:n,...r}=e;return x.createElement(H.Provider,{scope:e.__scopeAccordion},"multiple"===n?x.createElement(ee,(0,E.Z)({},r,{ref:t})):x.createElement(J,(0,E.Z)({},r,{ref:t})))}));Y.propTypes={type(e){let t=e.value||e.defaultValue;return e.type&&!["single","multiple"].includes(e.type)?Error("Invalid prop `type` supplied to `Accordion`. Expected one of `single | multiple`."):"multiple"===e.type&&"string"==typeof t?Error("Invalid prop `type` supplied to `Accordion`. Expected `single` when `defaultValue` or `value` is type `string`."):"single"===e.type&&Array.isArray(t)?Error("Invalid prop `type` supplied to `Accordion`. Expected `multiple` when `defaultValue` or `value` is type `string[]`."):null}};let[G,K]=q(Z),[X,Q]=q(Z,{collapsible:!1}),J=x.forwardRef((e,t)=>{let{value:n,defaultValue:r,onValueChange:i=()=>{},collapsible:o=!1,...a}=e,[s,l]=(0,C.T)({prop:n,defaultProp:r,onChange:i});return x.createElement(G,{scope:e.__scopeAccordion,value:s?[s]:[],onItemOpen:l,onItemClose:x.useCallback(()=>o&&l(""),[o,l])},x.createElement(X,{scope:e.__scopeAccordion,collapsible:o},x.createElement(er,(0,E.Z)({},a,{ref:t}))))}),ee=x.forwardRef((e,t)=>{let{value:n,defaultValue:r,onValueChange:i=()=>{},...o}=e,[a=[],s]=(0,C.T)({prop:n,defaultProp:r,onChange:i}),l=x.useCallback(e=>s((t=[])=>[...t,e]),[s]),u=x.useCallback(e=>s((t=[])=>t.filter(t=>t!==e)),[s]);return x.createElement(G,{scope:e.__scopeAccordion,value:a,onItemOpen:l,onItemClose:u},x.createElement(X,{scope:e.__scopeAccordion,collapsible:!0},x.createElement(er,(0,E.Z)({},o,{ref:t}))))}),[et,en]=q(Z),er=x.forwardRef((e,t)=>{let{__scopeAccordion:n,disabled:r,...i}=e,o=x.useRef(null),a=(0,j.e)(o,t),s=U(n),l=(0,O.M)(e.onKeyDown,e=>{var t;if(!B.includes(e.key))return;let n=e.target,r=s().filter(e=>{var t;return!(null!==(t=e.ref.current)&&void 0!==t&&t.disabled)}),i=r.findIndex(e=>e.ref.current===n),o=r.length;if(-1===i)return;e.preventDefault();let a=i;switch(e.key){case"Home":a=0;break;case"End":a=o-1;break;case"ArrowDown":a=i+1;break;case"ArrowUp":(a=i-1)<0&&(a=o-1)}let l=a%o;null===(t=r[l].ref.current)||void 0===t||t.focus()});return x.createElement(et,{scope:n,disabled:r},x.createElement(H.Slot,{scope:n},x.createElement(M.WV.div,(0,E.Z)({},i,{ref:a,onKeyDown:r?void 0:l}))))}),[ei,eo]=q("AccordionItem");var ea=n(82851),es=n(83317);function el(e){return e.split("-")[0]}function eu(e){return e.split("-")[1]}function ec(e){return["top","bottom"].includes(el(e))?"x":"y"}function ed(e){return"y"===e?"height":"width"}function ef(e,t,n){let r,{reference:i,floating:o}=e,a=i.x+i.width/2-o.width/2,s=i.y+i.height/2-o.height/2,l=ec(t),u=ed(l),c=i[u]/2-o[u]/2,d="x"===l;switch(el(t)){case"top":r={x:a,y:i.y-o.height};break;case"bottom":r={x:a,y:i.y+i.height};break;case"right":r={x:i.x+i.width,y:s};break;case"left":r={x:i.x-o.width,y:s};break;default:r={x:i.x,y:i.y}}switch(eu(t)){case"start":r[l]-=c*(n&&d?-1:1);break;case"end":r[l]+=c*(n&&d?-1:1)}return r}let eh=async(e,t,n)=>{let{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,s=await (null==a.isRTL?void 0:a.isRTL(t)),l=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:c}=ef(l,r,s),d=r,f={},h=0;for(let n=0;n({name:"arrow",options:e,async fn(t){let{element:n,padding:r=0}=null!=e?e:{},{x:i,y:o,placement:a,rects:s,platform:l}=t;if(null==n)return{};let u=ep(r),c={x:i,y:o},d=ec(a),f=eu(a),h=ed(d),p=await l.getDimensions(n),m="y"===d?"top":"left",v="y"===d?"bottom":"right",g=s.reference[h]+s.reference[d]-c[d]-s.floating[h],y=c[d]-s.reference[d],b=await (null==l.getOffsetParent?void 0:l.getOffsetParent(n)),x=b?"y"===d?b.clientHeight||0:b.clientWidth||0:0;0===x&&(x=s.floating[h]);let w=u[m],E=x-p[h]-u[v],k=x/2-p[h]/2+(g/2-y/2),j=ey(w,eg(k,E)),_=("start"===f?u[m]:u[v])>0&&k!==j&&s.reference[h]<=s.floating[h];return{[d]:c[d]-(_?kex[e])}let eE={start:"end",end:"start"};function ek(e){return e.replace(/start|end/g,e=>eE[e])}let ej=["top","right","bottom","left"];ej.reduce((e,t)=>e.concat(t,t+"-start",t+"-end"),[]);let e_=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r,i,o;let{placement:a,middlewareData:s,rects:l,initialPlacement:u,platform:c,elements:d}=t,{mainAxis:f=!0,crossAxis:h=!0,fallbackPlacements:p,fallbackStrategy:m="bestFit",flipAlignment:v=!0,...g}=e,y=el(a),b=p||(y!==u&&v?function(e){let t=ew(e);return[ek(e),t,ek(t)]}(u):[ew(u)]),x=[u,...b],w=await ev(t,g),E=[],k=(null==(n=s.flip)?void 0:n.overflows)||[];if(f&&E.push(w[y]),h){let{main:e,cross:t}=function(e,t,n){void 0===n&&(n=!1);let r=eu(e),i=ec(e),o=ed(i),a="x"===i?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=ew(a)),{main:a,cross:ew(a)}}(a,l,await (null==c.isRTL?void 0:c.isRTL(d.floating)));E.push(w[e],w[t])}if(k=[...k,{placement:a,overflows:E}],!E.every(e=>e<=0)){let e=(null!=(r=null==(i=s.flip)?void 0:i.index)?r:0)+1,t=x[e];if(t)return{data:{index:e,overflows:k},reset:{placement:t}};let n="bottom";switch(m){case"bestFit":{let e=null==(o=k.map(e=>[e,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:o[0].placement;e&&(n=e);break}case"initialPlacement":n=u}if(a!==n)return{reset:{placement:n}}}return{}}}};function eS(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function eO(e){return ej.some(t=>e[t]>=0)}let eC=function(e){let{strategy:t="referenceHidden",...n}=void 0===e?{}:e;return{name:"hide",async fn(e){let{rects:r}=e;switch(t){case"referenceHidden":{let t=eS(await ev(e,{...n,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:t,referenceHidden:eO(t)}}}case"escaped":{let t=eS(await ev(e,{...n,altBoundary:!0}),r.floating);return{data:{escapedOffsets:t,escaped:eO(t)}}}default:return{}}}}},eM=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){let{x:n,y:r}=t,i=await async function(e,t){let{placement:n,platform:r,elements:i}=e,o=await (null==r.isRTL?void 0:r.isRTL(i.floating)),a=el(n),s=eu(n),l="x"===ec(n),u=["left","top"].includes(a)?-1:1,c=o&&l?-1:1,d="function"==typeof t?t(e):t,{mainAxis:f,crossAxis:h,alignmentAxis:p}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return s&&"number"==typeof p&&(h="end"===s?-1*p:p),l?{x:h*c,y:f*u}:{x:f*u,y:h*c}}(t,e);return{x:n+i.x,y:r+i.y,data:i}}}};function eA(e){return"x"===e?"y":"x"}let eP=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){let{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=e,u={x:n,y:r},c=await ev(t,l),d=ec(el(i)),f=eA(d),h=u[d],p=u[f];if(o){let e="y"===d?"bottom":"right";h=ey(h+c["y"===d?"top":"left"],eg(h,h-c[e]))}a&&(p=ey(p+c["y"===f?"top":"left"],eg(p,p-c["y"===f?"bottom":"right"])));let m=s.fn({...t,[d]:h,[f]:p});return{...m,data:{x:m.x-n,y:m.y-r}}}}},eT=function(e){return void 0===e&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:o,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:u=!0}=e,c={x:n,y:r},d=ec(i),f=eA(d),h=c[d],p=c[f],m="function"==typeof s?s({...o,placement:i}):s,v="number"==typeof m?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){let e="y"===d?"height":"width",t=o.reference[d]-o.floating[e]+v.mainAxis,n=o.reference[d]+o.reference[e]-v.mainAxis;hn&&(h=n)}if(u){var g,y,b,x;let e="y"===d?"width":"height",t=["top","left"].includes(el(i)),n=o.reference[f]-o.floating[e]+(t&&null!=(g=null==(y=a.offset)?void 0:y[f])?g:0)+(t?0:v.crossAxis),r=o.reference[f]+o.reference[e]+(t?0:null!=(b=null==(x=a.offset)?void 0:x[f])?b:0)-(t?v.crossAxis:0);pr&&(p=r)}return{[d]:h,[f]:p}}}};function eN(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function eR(e){if(null==e)return window;if(!eN(e)){let t=e.ownerDocument;return t&&t.defaultView||window}return e}function eD(e){return eR(e).getComputedStyle(e)}function eL(e){return eN(e)?"":e?(e.nodeName||"").toLowerCase():""}function eF(){let e=navigator.userAgentData;return null!=e&&e.brands?e.brands.map(e=>e.brand+"/"+e.version).join(" "):navigator.userAgent}function eV(e){return e instanceof eR(e).HTMLElement}function eI(e){return e instanceof eR(e).Element}function ez(e){return"undefined"!=typeof ShadowRoot&&(e instanceof eR(e).ShadowRoot||e instanceof ShadowRoot)}function eZ(e){let{overflow:t,overflowX:n,overflowY:r}=eD(e);return/auto|scroll|overlay|hidden/.test(t+r+n)}function eB(e){let t=/firefox/i.test(eF()),n=eD(e);return"none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||["transform","perspective"].includes(n.willChange)||t&&"filter"===n.willChange||t&&!!n.filter&&"none"!==n.filter}function eH(){return!/^((?!chrome|android).)*safari/i.test(eF())}let eU=Math.min,eW=Math.max,eq=Math.round;function e$(e,t,n){var r,i,o,a;void 0===t&&(t=!1),void 0===n&&(n=!1);let s=e.getBoundingClientRect(),l=1,u=1;t&&eV(e)&&(l=e.offsetWidth>0&&eq(s.width)/e.offsetWidth||1,u=e.offsetHeight>0&&eq(s.height)/e.offsetHeight||1);let c=eI(e)?eR(e):window,d=!eH()&&n,f=(s.left+(d&&null!=(r=null==(i=c.visualViewport)?void 0:i.offsetLeft)?r:0))/l,h=(s.top+(d&&null!=(o=null==(a=c.visualViewport)?void 0:a.offsetTop)?o:0))/u,p=s.width/l,m=s.height/u;return{width:p,height:m,top:h,right:f+p,bottom:h+m,left:f,x:f,y:h}}function eY(e){return((e instanceof eR(e).Node?e.ownerDocument:e.document)||window.document).documentElement}function eG(e){return eI(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function eK(e){return e$(eY(e)).left+eG(e).scrollLeft}function eX(e){return"html"===eL(e)?e:e.assignedSlot||e.parentNode||(ez(e)?e.host:null)||eY(e)}function eQ(e){return eV(e)&&"fixed"!==getComputedStyle(e).position?e.offsetParent:null}function eJ(e){let t=eR(e),n=eQ(e);for(;n&&["table","td","th"].includes(eL(n))&&"static"===getComputedStyle(n).position;)n=eQ(n);return n&&("html"===eL(n)||"body"===eL(n)&&"static"===getComputedStyle(n).position&&!eB(n))?t:n||function(e){let t=eX(e);for(ez(t)&&(t=t.host);eV(t)&&!["html","body"].includes(eL(t));){if(eB(t))return t;t=t.parentNode}return null}(e)||t}function e0(e){if(eV(e))return{width:e.offsetWidth,height:e.offsetHeight};let t=e$(e);return{width:t.width,height:t.height}}function e1(e,t){var n;void 0===t&&(t=[]);let r=function e(t){let n=eX(t);return["html","body","#document"].includes(eL(n))?t.ownerDocument.body:eV(n)&&eZ(n)?n:e(n)}(e),i=r===(null==(n=e.ownerDocument)?void 0:n.body),o=eR(r),a=i?[o].concat(o.visualViewport||[],eZ(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(e1(a))}function e2(e,t,n){return"viewport"===t?em(function(e,t){let n=eR(e),r=eY(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;let e=eH();(e||!e&&"fixed"===t)&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s,y:l}}(e,n)):eI(t)?function(e,t){let n=e$(e,!1,"fixed"===t),r=n.top+e.clientTop,i=n.left+e.clientLeft;return{top:r,left:i,x:i,y:r,right:i+e.clientWidth,bottom:r+e.clientHeight,width:e.clientWidth,height:e.clientHeight}}(t,n):em(function(e){var t;let n=eY(e),r=eG(e),i=null==(t=e.ownerDocument)?void 0:t.body,o=eW(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=eW(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+eK(e),l=-r.scrollTop;return"rtl"===eD(i||n).direction&&(s+=eW(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}(eY(e)))}let e4={getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,o=[..."clippingAncestors"===n?function(e){let t=e1(e),n=["absolute","fixed"].includes(eD(e).position)&&eV(e)?eJ(e):e;return eI(n)?t.filter(e=>eI(e)&&function(e,t){let n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&ez(n)){let n=t;do{if(n&&e===n)return!0;n=n.parentNode||n.host}while(n)}return!1}(e,n)&&"body"!==eL(e)):[]}(t):[].concat(n),r],a=o[0],s=o.reduce((e,n)=>{let r=e2(t,n,i);return e.top=eW(r.top,e.top),e.right=eU(r.right,e.right),e.bottom=eU(r.bottom,e.bottom),e.left=eW(r.left,e.left),e},e2(t,a,i));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:r}=e,i=eV(n),o=eY(n);if(n===o)return t;let a={scrollLeft:0,scrollTop:0},s={x:0,y:0};if((i||!i&&"fixed"!==r)&&(("body"!==eL(n)||eZ(o))&&(a=eG(n)),eV(n))){let e=e$(n,!0);s.x=e.x+n.clientLeft,s.y=e.y+n.clientTop}return{...t,x:t.x-a.scrollLeft+s.x,y:t.y-a.scrollTop+s.y}},isElement:eI,getDimensions:e0,getOffsetParent:eJ,getDocumentElement:eY,getElementRects:e=>{let{reference:t,floating:n,strategy:r}=e;return{reference:function(e,t,n){let r=eV(t),i=eY(t),o=e$(e,r&&function(e){let t=e$(e);return eq(t.width)!==e.offsetWidth||eq(t.height)!==e.offsetHeight}(t),"fixed"===n),a={scrollLeft:0,scrollTop:0},s={x:0,y:0};if(r||!r&&"fixed"!==n){if(("body"!==eL(t)||eZ(i))&&(a=eG(t)),eV(t)){let e=e$(t,!0);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else i&&(s.x=eK(i))}return{x:o.left+a.scrollLeft-s.x,y:o.top+a.scrollTop-s.y,width:o.width,height:o.height}}(t,eJ(n),r),floating:{...e0(n),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>"rtl"===eD(e).direction};function e3(e,t,n,r){void 0===r&&(r={});let{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=!0,animationFrame:s=!1}=r,l=i&&!s,u=o&&!s,c=l||u?[...eI(e)?e1(e):[],...e1(t)]:[];c.forEach(e=>{l&&e.addEventListener("scroll",n,{passive:!0}),u&&e.addEventListener("resize",n)});let d,f=null;if(a){let r=!0;f=new ResizeObserver(()=>{r||n(),r=!1}),eI(e)&&!s&&f.observe(e),f.observe(t)}let h=s?e$(e):null;return s&&function t(){let r=e$(e);h&&(r.x!==h.x||r.y!==h.y||r.width!==h.width||r.height!==h.height)&&n(),h=r,d=requestAnimationFrame(t)}(),n(),()=>{var e;c.forEach(e=>{l&&e.removeEventListener("scroll",n),u&&e.removeEventListener("resize",n)}),null==(e=f)||e.disconnect(),f=null,s&&cancelAnimationFrame(d)}}let e5=(e,t,n)=>eh(e,t,{platform:e4,...n});var e6=n(28316),e8="undefined"!=typeof document?x.useLayoutEffect:x.useEffect;function e7(e){let{middleware:t,placement:n="bottom",strategy:r="absolute",whileElementsMounted:i}=void 0===e?{}:e,o=x.useRef(null),a=x.useRef(null),s=function(e){let t=x.useRef(e);return e8(()=>{t.current=e}),t}(i),l=x.useRef(null),[u,c]=x.useState({x:null,y:null,strategy:r,placement:n,middlewareData:{}}),[d,f]=x.useState(t);!function e(t,n){let r,i,o;if(t===n)return!0;if(typeof t!=typeof n)return!1;if("function"==typeof t&&t.toString()===n.toString())return!0;if(t&&n&&"object"==typeof t){if(Array.isArray(t)){if((r=t.length)!=n.length)return!1;for(i=r;0!=i--;)if(!e(t[i],n[i]))return!1;return!0}if((r=(o=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(i=r;0!=i--;)if(!Object.prototype.hasOwnProperty.call(n,o[i]))return!1;for(i=r;0!=i--;){let r=o[i];if(("_owner"!==r||!t.$$typeof)&&!e(t[r],n[r]))return!1}return!0}return t!=t&&n!=n}(null==d?void 0:d.map(e=>{let{options:t}=e;return t}),null==t?void 0:t.map(e=>{let{options:t}=e;return t}))&&f(t);let h=x.useCallback(()=>{o.current&&a.current&&e5(o.current,a.current,{middleware:d,placement:n,strategy:r}).then(e=>{p.current&&e6.flushSync(()=>{c(e)})})},[d,n,r]);e8(()=>{p.current&&h()},[h]);let p=x.useRef(!1);e8(()=>(p.current=!0,()=>{p.current=!1}),[]);let m=x.useCallback(()=>{if("function"==typeof l.current&&(l.current(),l.current=null),o.current&&a.current){if(s.current){let e=s.current(o.current,a.current,h);l.current=e}else h()}},[h,s]),v=x.useCallback(e=>{o.current=e,m()},[m]),g=x.useCallback(e=>{a.current=e,m()},[m]),y=x.useMemo(()=>({reference:o,floating:a}),[]);return x.useMemo(()=>({...u,update:h,refs:y,reference:v,floating:g}),[u,h,y,v,g])}let e9=e=>{let{element:t,padding:n}=e;return{name:"arrow",options:e,fn(e){if(Object.prototype.hasOwnProperty.call(t,"current")){if(null!=t.current)return eb({element:t.current,padding:n}).fn(e)}else if(t)return eb({element:t,padding:n}).fn(e);return{}}}},te=(0,x.forwardRef)((e,t)=>{let{children:n,width:r=10,height:i=5,...o}=e;return(0,x.createElement)(M.WV.svg,(0,E.Z)({},o,{ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none"}),e.asChild?n:(0,x.createElement)("polygon",{points:"0,0 30,0 15,10"}))});function tt(e){let[t,n]=(0,x.useState)(void 0);return(0,A.b)(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{let r,i;if(!Array.isArray(t)||!t.length)return;let o=t[0];if("borderBoxSize"in o){let e=o.borderBoxSize,t=Array.isArray(e)?e[0]:e;r=t.inlineSize,i=t.blockSize}else r=e.offsetWidth,i=e.offsetHeight;n({width:r,height:i})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)},[e]),t}let tn="Popper",[tr,ti]=(0,k.b)(tn),[to,ta]=tr(tn),ts=(0,x.forwardRef)((e,t)=>{let{__scopePopper:n,virtualRef:r,...i}=e,o=ta("PopperAnchor",n),a=(0,x.useRef)(null),s=(0,j.e)(t,a);return(0,x.useEffect)(()=>{o.onAnchorChange((null==r?void 0:r.current)||a.current)}),r?null:(0,x.createElement)(M.WV.div,(0,E.Z)({},i,{ref:s}))}),tl="PopperContent",[tu,tc]=tr(tl),[td,tf]=tr(tl,{hasParent:!1,positionUpdateFns:new Set}),th=(0,x.forwardRef)((e,t)=>{var n,r,i,o,a,s,l,u;let{__scopePopper:c,side:d="bottom",sideOffset:f=0,align:h="center",alignOffset:p=0,arrowPadding:m=0,collisionBoundary:v=[],collisionPadding:g=0,sticky:y="partial",hideWhenDetached:b=!1,avoidCollisions:w=!0,...E}=e,k=ta(tl,c),[_,S]=(0,x.useState)(null),O=(0,j.e)(t,e=>S(e)),[C,P]=(0,x.useState)(null),T=tt(C),N=null!==(n=null==T?void 0:T.width)&&void 0!==n?n:0,R=null!==(r=null==T?void 0:T.height)&&void 0!==r?r:0,D="number"==typeof g?g:{top:0,right:0,bottom:0,left:0,...g},L=Array.isArray(v)?v:[v],F=L.length>0,V={padding:D,boundary:L.filter(tg),altBoundary:F},{reference:I,floating:z,strategy:Z,x:B,y:H,placement:U,middlewareData:W,update:q}=e7({strategy:"fixed",placement:d+("center"!==h?"-"+h:""),whileElementsMounted:e3,middleware:[eM({mainAxis:f+R,alignmentAxis:p}),w?eP({mainAxis:!0,crossAxis:!1,limiter:"partial"===y?eT():void 0,...V}):void 0,C?e9({element:C,padding:m}):void 0,w?e_({...V}):void 0,ty({arrowWidth:N,arrowHeight:R}),b?eC({strategy:"referenceHidden"}):void 0].filter(tv)});(0,A.b)(()=>{I(k.anchor)},[I,k.anchor]);let $=null!==B&&null!==H,[Y,G]=tb(U),K=null===(i=W.arrow)||void 0===i?void 0:i.x,X=null===(o=W.arrow)||void 0===o?void 0:o.y,Q=(null===(a=W.arrow)||void 0===a?void 0:a.centerOffset)!==0,[J,ee]=(0,x.useState)();(0,A.b)(()=>{_&&ee(window.getComputedStyle(_).zIndex)},[_]);let{hasParent:et,positionUpdateFns:en}=tf(tl,c),er=!et;(0,x.useLayoutEffect)(()=>{if(!er)return en.add(q),()=>{en.delete(q)}},[er,en,q]),(0,x.useLayoutEffect)(()=>{er&&$&&Array.from(en).reverse().forEach(e=>requestAnimationFrame(e))},[er,$,en]);let ei={"data-side":Y,"data-align":G,...E,ref:O,style:{...E.style,animation:$?void 0:"none",opacity:null!==(s=W.hide)&&void 0!==s&&s.referenceHidden?0:void 0}};return(0,x.createElement)("div",{ref:z,"data-radix-popper-content-wrapper":"",style:{position:Z,left:0,top:0,transform:$?`translate3d(${Math.round(B)}px, ${Math.round(H)}px, 0)`:"translate3d(0, -200%, 0)",minWidth:"max-content",zIndex:J,"--radix-popper-transform-origin":[null===(l=W.transformOrigin)||void 0===l?void 0:l.x,null===(u=W.transformOrigin)||void 0===u?void 0:u.y].join(" ")}},(0,x.createElement)(tu,{scope:c,placedSide:Y,onArrowChange:P,arrowX:K,arrowY:X,shouldHideArrow:Q},er?(0,x.createElement)(td,{scope:c,hasParent:!0,positionUpdateFns:en},(0,x.createElement)(M.WV.div,ei)):(0,x.createElement)(M.WV.div,ei)))}),tp={top:"bottom",right:"left",bottom:"top",left:"right"},tm=(0,x.forwardRef)(function(e,t){let{__scopePopper:n,...r}=e,i=tc("PopperArrow",n),o=tp[i.placedSide];return(0,x.createElement)("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0}},(0,x.createElement)(te,(0,E.Z)({},r,{ref:t,style:{...r.style,display:"block"}})))});function tv(e){return void 0!==e}function tg(e){return null!==e}let ty=e=>({name:"transformOrigin",options:e,fn(t){var n,r,i,o,a;let{placement:s,rects:l,middlewareData:u}=t,c=(null===(n=u.arrow)||void 0===n?void 0:n.centerOffset)!==0,d=c?0:e.arrowWidth,f=c?0:e.arrowHeight,[h,p]=tb(s),m={start:"0%",center:"50%",end:"100%"}[p],v=(null!==(r=null===(i=u.arrow)||void 0===i?void 0:i.x)&&void 0!==r?r:0)+d/2,g=(null!==(o=null===(a=u.arrow)||void 0===a?void 0:a.y)&&void 0!==o?o:0)+f/2,y="",b="";return"bottom"===h?(y=c?m:`${v}px`,b=`${-f}px`):"top"===h?(y=c?m:`${v}px`,b=`${l.floating.height+f}px`):"right"===h?(y=`${-f}px`,b=c?m:`${g}px`):"left"===h&&(y=`${l.floating.width+f}px`,b=c?m:`${g}px`),{data:{x:y,y:b}}}});function tb(e){let[t,n="center"]=e.split("-");return[t,n]}let tx=e=>{let{__scopePopper:t,children:n}=e,[r,i]=(0,x.useState)(null);return(0,x.createElement)(to,{scope:t,anchor:r,onAnchorChange:i},n)};var tw=n(6500);let tE=(0,x.forwardRef)((e,t)=>(0,x.createElement)(M.WV.span,(0,E.Z)({},e,{ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}))),[tk,tj]=(0,k.b)("Tooltip",[ti]),t_=ti(),tS="tooltip.open",[tO,tC]=tk("TooltipProvider"),tM="Tooltip",[tA,tP]=tk(tM),tT="TooltipTrigger",tN=(0,x.forwardRef)((e,t)=>{let{__scopeTooltip:n,...r}=e,i=tP(tT,n),o=tC(tT,n),a=t_(n),s=(0,x.useRef)(null),l=(0,j.e)(t,s,i.onTriggerChange),u=(0,x.useRef)(!1),c=(0,x.useRef)(!1),d=(0,x.useCallback)(()=>u.current=!1,[]);return(0,x.useEffect)(()=>()=>document.removeEventListener("pointerup",d),[d]),(0,x.createElement)(ts,(0,E.Z)({asChild:!0},a),(0,x.createElement)(M.WV.button,(0,E.Z)({"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute},r,{ref:l,onPointerMove:(0,O.M)(e.onPointerMove,e=>{"touch"===e.pointerType||c.current||o.isPointerInTransitRef.current||(i.onTriggerEnter(),c.current=!0)}),onPointerLeave:(0,O.M)(e.onPointerLeave,()=>{i.onTriggerLeave(),c.current=!1}),onPointerDown:(0,O.M)(e.onPointerDown,()=>{u.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:(0,O.M)(e.onFocus,()=>{u.current||i.onOpen()}),onBlur:(0,O.M)(e.onBlur,i.onClose),onClick:(0,O.M)(e.onClick,e=>{let t=0===e.detail;t&&i.onClose()})})))}),tR="TooltipPortal",[tD,tL]=tk(tR,{forceMount:void 0}),tF="TooltipContent",tV=(0,x.forwardRef)((e,t)=>{let n=tL(tF,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i="top",...o}=e,a=tP(tF,e.__scopeTooltip);return(0,x.createElement)(P.z,{present:r||a.open},a.disableHoverableContent?(0,x.createElement)(tB,(0,E.Z)({side:i},o,{ref:t})):(0,x.createElement)(tI,(0,E.Z)({side:i},o,{ref:t})))}),tI=(0,x.forwardRef)((e,t)=>{let n=tP(tF,e.__scopeTooltip),r=tC(tF,e.__scopeTooltip),i=(0,x.useRef)(null),o=(0,j.e)(t,i),[a,s]=(0,x.useState)(null),{trigger:l,onClose:u}=n,c=i.current,{onPointerInTransitChange:d}=r,f=(0,x.useCallback)(()=>{s(null),d(!1)},[d]),h=(0,x.useCallback)((e,t)=>{let n=e.currentTarget,r={x:e.clientX,y:e.clientY},i=function(e,t){let n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(n,r,i,o)){case o:return"left";case i:return"right";case n:return"top";case r:return"bottom";default:return null}}(r,n.getBoundingClientRect()),o="right"===i||"bottom"===i?-5:5,a="right"===i||"left"===i?{x:e.clientX+o,y:e.clientY}:{x:e.clientX,y:e.clientY+o},l=function(e){let{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}(t.getBoundingClientRect()),u=function(e){let t=e.slice();return t.sort((e,t)=>e.xt.x?1:e.yt.y?1:0),function(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n=2;){let e=t[t.length-1],n=t[t.length-2];if((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x))t.pop();else break}t.push(r)}t.pop();let n=[];for(let t=e.length-1;t>=0;t--){let r=e[t];for(;n.length>=2;){let e=n[n.length-1],t=n[n.length-2];if((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x))n.pop();else break}n.push(r)}return(n.pop(),1===t.length&&1===n.length&&t[0].x===n[0].x&&t[0].y===n[0].y)?t:t.concat(n)}(t)}([a,...l]);s(u),d(!0)},[d]);return(0,x.useEffect)(()=>()=>f(),[f]),(0,x.useEffect)(()=>{if(l&&c){let e=e=>h(e,c),t=e=>h(e,l);return l.addEventListener("pointerleave",e),c.addEventListener("pointerleave",t),()=>{l.removeEventListener("pointerleave",e),c.removeEventListener("pointerleave",t)}}},[l,c,h,f]),(0,x.useEffect)(()=>{if(a){let e=e=>{let t=e.target,n={x:e.clientX,y:e.clientY},r=(null==l?void 0:l.contains(t))||(null==c?void 0:c.contains(t)),i=!function(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,o=t.length-1;er!=u>r&&n<(l-a)*(r-s)/(u-s)+a;c&&(i=!i)}return i}(n,a);r?f():i&&(f(),u())};return document.addEventListener("pointermove",e),()=>document.removeEventListener("pointermove",e)}},[l,c,a,u,f]),(0,x.createElement)(tB,(0,E.Z)({},e,{ref:o}))}),[tz,tZ]=tk(tM,{isInside:!1}),tB=(0,x.forwardRef)((e,t)=>{let{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:o,onPointerDownOutside:a,...s}=e,l=tP(tF,n),u=t_(n),{onClose:c}=l;return(0,x.useEffect)(()=>(document.addEventListener(tS,c),()=>document.removeEventListener(tS,c)),[c]),(0,x.useEffect)(()=>{if(l.trigger){let e=e=>{let t=e.target;null!=t&&t.contains(l.trigger)&&c()};return window.addEventListener("scroll",e,{capture:!0}),()=>window.removeEventListener("scroll",e,{capture:!0})}},[l.trigger,c]),(0,x.createElement)(es.XB,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:e=>e.preventDefault(),onDismiss:c},(0,x.createElement)(th,(0,E.Z)({"data-state":l.stateAttribute},u,s,{ref:t,style:{...s.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)"}}),(0,x.createElement)(_.A4,null,r),(0,x.createElement)(tz,{scope:n,isInside:!0},(0,x.createElement)(tE,{id:l.contentId,role:"tooltip"},i||r))))}),tH=e=>{let{__scopeTooltip:t,children:n,open:r,defaultOpen:i=!1,onOpenChange:o,disableHoverableContent:a,delayDuration:s}=e,l=tC(tM,e.__scopeTooltip),u=t_(t),[c,d]=(0,x.useState)(null),f=(0,T.M)(),h=(0,x.useRef)(0),p=null!=a?a:l.disableHoverableContent,m=null!=s?s:l.delayDuration,v=(0,x.useRef)(!1),[g=!1,y]=(0,C.T)({prop:r,defaultProp:i,onChange:e=>{e?(l.onOpen(),document.dispatchEvent(new CustomEvent(tS))):l.onClose(),null==o||o(e)}}),b=(0,x.useMemo)(()=>g?v.current?"delayed-open":"instant-open":"closed",[g]),w=(0,x.useCallback)(()=>{window.clearTimeout(h.current),v.current=!1,y(!0)},[y]),E=(0,x.useCallback)(()=>{window.clearTimeout(h.current),y(!1)},[y]),k=(0,x.useCallback)(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{v.current=!0,y(!0)},m)},[m,y]);return(0,x.useEffect)(()=>()=>window.clearTimeout(h.current),[]),(0,x.createElement)(tx,u,(0,x.createElement)(tA,{scope:t,contentId:f,open:g,stateAttribute:b,trigger:c,onTriggerChange:d,onTriggerEnter:(0,x.useCallback)(()=>{l.isOpenDelayed?k():w()},[l.isOpenDelayed,k,w]),onTriggerLeave:(0,x.useCallback)(()=>{p?E():window.clearTimeout(h.current)},[E,p]),onOpen:w,onClose:E,disableHoverableContent:p},n))},tU=e=>{let{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,o=tP(tR,t);return(0,x.createElement)(tD,{scope:t,forceMount:n},(0,x.createElement)(P.z,{present:n||o.open},(0,x.createElement)(tw.h,{asChild:!0,container:i},r)))},tW=(0,ea.j)([],{variants:{display:{default:"inline-block",none:""},font:{mono:"font-mono",sans:"font-sans"},color:{verySubtle:"text-gray-700 dark:text-graydark-700",subtle:"text-gray-1000 dark:text-graydark-1000",contrast:"text-gray-1100 dark:text-white",lo:"text-white dark:text-graydark-50",accent:"text-accent-1100 dark:text-accentdark-1100",red:"text-red-700 dark:text-red-400",green:"text-emerald-700 dark:text-emerald-500",amber:"text-amber-600 dark:text-amber-500",none:""},weight:{extrabold:"font-extrabold",bold:"font-bold",medium:"font-medium",semibold:"font-semibold",regular:"font-normal",normal:"font-normal",light:"font-light",none:""},size:{10:"text-xxs",12:"text-xs",14:"text-sm",16:"text-base",18:"text-lg",20:"text-xl",24:"text-2xl",30:"text-3xl",36:"text-4xl",40:"text-5xl",48:"text-5xl",60:"text-6xl",64:"text-6xl"},scaleSize:{12:"text-xxs md:text-xs",14:"text-xs md:text-sm",16:"text-sm md:text-base",18:"text-base md:text-lg",20:"text-base md:text-xl",24:"text-xl md:text-2xl",30:"text-2xl md:text-3xl",36:"text-3xl md:text-4xl",40:"text-4xl md:text-5xl",48:"text-4xl md:text-5xl",60:"text-5xl md:text-6xl",64:"text-5xl md:text-6xl"},noWrap:{true:"whitespace-nowrap"},underline:{accent:"underline underline-offset-2 decoration-2 decoration-accent-900 dark:decoration-accentdark-900",show:"underline underline-offset-2 decoration-gray-1100 dark:decoration-gray-500",hover:"hover:underline underline-offset-2 decoration-gray-1100 dark:decoration-gray-500",none:""},ellipsis:{true:"overflow-hidden text-ellipsis whitespace-nowrap"},wrapEllipsis:{true:"overflow-hidden text-ellipsis"}},defaultVariants:{display:"default",weight:"regular",font:"sans",color:"contrast",underline:"none"}}),tq=x.forwardRef((e,t)=>{let{tag:n="span",className:r,font:i,color:o,weight:a,size:s,scaleSize:l,noWrap:u,underline:c,ellipsis:d,wrapEllipsis:f,...h}=e;return(0,b.jsx)(n,{ref:t,className:(0,ea.cx)(r,tW({font:i,color:o,weight:a,size:s,scaleSize:l,underline:c,noWrap:u,ellipsis:d,wrapEllipsis:f})),...h})}),t$=x.forwardRef((e,t)=>{let{size:n="18",...r}=e;return(0,b.jsx)(tq,{tag:"p",...r,ref:t,weight:"regular",scaleSize:n,color:"subtle",className:(0,ea.cx)("leading-relaxed md:leading-relaxed",e.className)})}),tY=(0,ea.j)(["bg-white dark:bg-graydark-200","transition-shadow ease-in-out duration-300","shadow-sm hover:shadow","rounded","border","border-gray-400 dark:border-graydark-400"]),tG=x.forwardRef((e,t)=>{let{className:n,...r}=e;return(0,b.jsx)("div",{ref:t,className:tY({className:n}),...r})});var tK=n(34406);let tX=(void 0===tK||tK.env,"production"),tQ=1/60*1e3,tJ="undefined"!=typeof performance?()=>performance.now():()=>Date.now(),t0="undefined"!=typeof window?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(tJ()),tQ),t1=!0,t2=!1,t4=!1,t3={delta:0,timestamp:0},t5=["read","update","preRender","render","postRender"],t6=t5.reduce((e,t)=>(e[t]=function(e){let t=[],n=[],r=0,i=!1,o=!1,a=new WeakSet,s={schedule:(e,o=!1,s=!1)=>{let l=s&&i,u=l?t:n;return o&&a.add(e),-1===u.indexOf(e)&&(u.push(e),l&&i&&(r=t.length)),e},cancel:e=>{let t=n.indexOf(e);-1!==t&&n.splice(t,1),a.delete(e)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length)for(let n=0;nt2=!0),e),{}),t8=t5.reduce((e,t)=>{let n=t6[t];return e[t]=(e,t=!1,r=!1)=>(t2||nn(),n.schedule(e,t,r)),e},{}),t7=t5.reduce((e,t)=>(e[t]=t6[t].cancel,e),{}),t9=t5.reduce((e,t)=>(e[t]=()=>t6[t].process(t3),e),{}),ne=e=>t6[e].process(t3),nt=e=>{t2=!1,t3.delta=t1?tQ:Math.max(Math.min(e-t3.timestamp,40),1),t3.timestamp=e,t4=!0,t5.forEach(ne),t4=!1,t2&&(t1=!1,t0(nt))},nn=()=>{t2=!0,t1=!0,t4||t0(nt)},nr=()=>t3,ni="undefined"!=typeof document,no=ni?x.useLayoutEffect:x.useEffect;function na(){let e=(0,x.useRef)(!1);return no(()=>(e.current=!0,()=>{e.current=!1}),[]),e}let ns=(0,x.createContext)(null);function nl(e){let t=(0,x.useRef)(null);return null===t.current&&(t.current=e()),t.current}class nu extends x.Component{getSnapshotBeforeUpdate(e){let t=this.props.childRef.current;if(t&&e.isPresent&&!this.props.isPresent){let e=this.props.sizeRef.current;e.height=t.offsetHeight||0,e.width=t.offsetWidth||0,e.top=t.offsetTop,e.left=t.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function nc({children:e,isPresent:t}){let n=(0,x.useId)(),r=(0,x.useRef)(null),i=(0,x.useRef)({width:0,height:0,top:0,left:0});return(0,x.useInsertionEffect)(()=>{let{width:e,height:o,top:a,left:s}=i.current;if(t||!r.current||!e||!o)return;r.current.dataset.motionPopId=n;let l=document.createElement("style");return document.head.appendChild(l),l.sheet&&l.sheet.insertRule(` + */var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,i=n?Symbol.for("react.portal"):60106,o=n?Symbol.for("react.fragment"):60107,a=n?Symbol.for("react.strict_mode"):60108,s=n?Symbol.for("react.profiler"):60114,l=n?Symbol.for("react.provider"):60109,u=n?Symbol.for("react.context"):60110,c=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.concurrent_mode"):60111,f=n?Symbol.for("react.forward_ref"):60112,h=n?Symbol.for("react.suspense"):60113,p=n?Symbol.for("react.suspense_list"):60120,m=n?Symbol.for("react.memo"):60115,v=n?Symbol.for("react.lazy"):60116,g=n?Symbol.for("react.block"):60121,y=n?Symbol.for("react.fundamental"):60117,b=n?Symbol.for("react.responder"):60118,x=n?Symbol.for("react.scope"):60119;function w(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case c:case d:case o:case s:case a:case h:return e;default:switch(e=e&&e.$$typeof){case u:case f:case v:case m:case l:return e;default:return t}}case i:return t}}}function E(e){return w(e)===d}t.AsyncMode=c,t.ConcurrentMode=d,t.ContextConsumer=u,t.ContextProvider=l,t.Element=r,t.ForwardRef=f,t.Fragment=o,t.Lazy=v,t.Memo=m,t.Portal=i,t.Profiler=s,t.StrictMode=a,t.Suspense=h,t.isAsyncMode=function(e){return E(e)||w(e)===c},t.isConcurrentMode=E,t.isContextConsumer=function(e){return w(e)===u},t.isContextProvider=function(e){return w(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return w(e)===f},t.isFragment=function(e){return w(e)===o},t.isLazy=function(e){return w(e)===v},t.isMemo=function(e){return w(e)===m},t.isPortal=function(e){return w(e)===i},t.isProfiler=function(e){return w(e)===s},t.isStrictMode=function(e){return w(e)===a},t.isSuspense=function(e){return w(e)===h},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===d||e===s||e===a||e===h||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===v||e.$$typeof===m||e.$$typeof===l||e.$$typeof===u||e.$$typeof===f||e.$$typeof===y||e.$$typeof===b||e.$$typeof===x||e.$$typeof===g)},t.typeOf=w},73887:function(e,t,n){"use strict";e.exports=n(43459)},62333:function(e,t){/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */t.read=function(e,t,n,r,i){var o,a,s=8*i-r-1,l=(1<>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:(h?-1:1)*(1/0);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();++t-1}},34893:function(e){e.exports=function(e,t,n){for(var r=-1,i=null==e?0:e.length;++r=200&&(d=l,f=!1,t=new r(t));t:for(;++c0&&o(c)?n>1?e(c,n-1,o,a,s):r(s,c):a||(s[s.length]=c)}return s}},15308:function(e,t,n){var r=n(55463)();e.exports=r},26548:function(e,t,n){var r=n(15308),i=n(90249);e.exports=function(e,t){return e&&r(e,t,i)}},13324:function(e,t,n){var r=n(17297),i=n(33812);e.exports=function(e,t){t=r(t,e);for(var n=0,o=t.length;null!=e&&n=120&&g.length>=120)?new r(h&&g):void 0}g=e[0];var y=-1,b=p[0];t:for(;++yi?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++r=200){var m=t?null:s(e);if(m)return l(m);f=!1,c=a,p=new r}else p=t?[]:h;t:for(;++u=i?e:r(e,t,n)}},10768:function(e,t,n){var r=n(77832);e.exports=function(e,t){for(var n=e.length;n--&&r(t,e[n],0)>-1;);return n}},51821:function(e,t,n){var r=n(77832);e.exports=function(e,t){for(var n=-1,i=e.length;++n-1;);return n}},79882:function(e,t,n){var r=n(79162);e.exports=function(e){var t=new e.constructor(e.byteLength);return new r(t).set(new r(e)),t}},92175:function(e,t,n){e=n.nmd(e);var r=n(37772),i=t&&!t.nodeType&&t,o=i&&e&&!e.nodeType&&e,a=o&&o.exports===i?r.Buffer:void 0,s=a?a.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=s?s(n):new e.constructor(n);return e.copy(r),r}},34727:function(e,t,n){var r=n(79882);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}},96058:function(e){var t=/\w*$/;e.exports=function(e){var n=new e.constructor(e.source,t.exec(e));return n.lastIndex=e.lastIndex,n}},70169:function(e,t,n){var r=n(50857),i=r?r.prototype:void 0,o=i?i.valueOf:void 0;e.exports=function(e){return o?Object(o.call(e)):{}}},6190:function(e,t,n){var r=n(79882);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}},27520:function(e,t,n){var r=n(4795);e.exports=function(e,t){if(e!==t){var n=void 0!==e,i=null===e,o=e==e,a=r(e),s=void 0!==t,l=null===t,u=t==t,c=r(t);if(!l&&!c&&!a&&e>t||a&&s&&u&&!l&&!c||i&&s&&u||!n&&u||!o)return 1;if(!i&&!a&&!c&&e=l)return u;return u*("desc"==n[i]?-1:1)}}return e.index-t.index}},51522:function(e){e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n1?n[o-1]:void 0,s=o>2?n[2]:void 0;for(a=e.length>3&&"function"==typeof a?(o--,a):void 0,s&&i(n[0],n[1],s)&&(a=o<3?void 0:a,o=1),t=Object(t);++rc))return!1;var f=l.get(e),h=l.get(t);if(f&&h)return f==t&&h==e;var p=-1,m=!0,v=2&n?new r:void 0;for(l.set(e,t),l.set(t,e);++p-1&&e%1==0&&e-1}},94769:function(e,t,n){var r=n(22218);e.exports=function(e,t){var n=this.__data__,i=r(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this}},92411:function(e,t,n){var r=n(89612),i=n(80235),o=n(10326);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(o||i),string:new r}}},36417:function(e,t,n){var r=n(27937);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},86928:function(e,t,n){var r=n(27937);e.exports=function(e){return r(this,e).get(e)}},79493:function(e,t,n){var r=n(27937);e.exports=function(e){return r(this,e).has(e)}},24150:function(e,t,n){var r=n(27937);e.exports=function(e,t){var n=r(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this}},75179:function(e){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}},73477:function(e){e.exports=function(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}}},77777:function(e,t,n){var r=n(30733);e.exports=function(e){var t=r(e,function(e){return 500===n.size&&n.clear(),e}),n=t.cache;return t}},99191:function(e,t,n){var r=n(38761)(Object,"create");e.exports=r},54248:function(e,t,n){var r=n(60241)(Object.keys,Object);e.exports=r},62966:function(e){e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},4146:function(e,t,n){e=n.nmd(e);var r=n(51242),i=t&&!t.nodeType&&t,o=i&&e&&!e.nodeType&&e,a=o&&o.exports===i&&r.process,s=function(){try{var e=o&&o.require&&o.require("util").types;if(e)return e;return a&&a.binding&&a.binding("util")}catch(e){}}();e.exports=s},37157:function(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},60241:function(e){e.exports=function(e,t){return function(n){return e(t(n))}}},43114:function(e,t,n){var r=n(49432),i=Math.max;e.exports=function(e,t,n){return t=i(void 0===t?e.length-1:t,0),function(){for(var o=arguments,a=-1,s=i(o.length-t,0),l=Array(s);++a0){if(++n>=800)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}},15243:function(e,t,n){var r=n(80235);e.exports=function(){this.__data__=new r,this.size=0}},72858:function(e){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},4417:function(e){e.exports=function(e){return this.__data__.get(e)}},8605:function(e){e.exports=function(e){return this.__data__.has(e)}},71418:function(e,t,n){var r=n(80235),i=n(10326),o=n(96738);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var a=n.__data__;if(!i||a.length<199)return a.push([e,t]),this.size=++n.size,this;n=this.__data__=new o(a)}return n.set(e,t),this.size=n.size,this}},66024:function(e){e.exports=function(e,t,n){for(var r=n-1,i=e.length;++r=t||n<0||v&&r>=c}function x(){var e,n,r,o=i();if(b(o))return w(o);f=setTimeout(x,(e=o-h,n=o-p,r=t-e,v?s(r,c-n):r))}function w(e){return(f=void 0,g&&l)?y(e):(l=u=void 0,d)}function E(){var e,n=i(),r=b(n);if(l=arguments,u=this,h=n,r){if(void 0===f)return p=e=h,f=setTimeout(x,t),m?y(e):d;if(v)return clearTimeout(f),f=setTimeout(x,t),y(h)}return void 0===f&&(f=setTimeout(x,t)),d}return t=o(t)||0,r(n)&&(m=!!n.leading,c=(v="maxWait"in n)?a(o(n.maxWait)||0,t):c,g="trailing"in n?!!n.trailing:g),E.cancel=function(){void 0!==f&&clearTimeout(f),p=0,l=h=u=f=void 0},E.flush=function(){return void 0===f?d:w(i())},E}},97329:function(e,t,n){var r=n(61655),i=n(66188),o=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,a=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");e.exports=function(e){return(e=i(e))&&e.replace(o,r).replace(a,"")}},17335:function(e,t,n){var r=n(85246),i=n(62034),o=n(36060),a=n(93746),s=o(function(e,t){return a(e)?r(e,i(t,1,a,!0)):[]});e.exports=s},45861:function(e,t,n){e.exports=n(28460)},41225:function(e){e.exports=function(e,t){return e===t||e!=e&&t!=t}},35676:function(e,t,n){var r=n(62034);e.exports=function(e){return(null==e?0:e.length)?r(e,1):[]}},72579:function(e,t,n){var r=n(13324);e.exports=function(e,t,n){var i=null==e?void 0:r(e,t);return void 0===i?n:i}},3440:function(e,t,n){var r=n(13940),i=n(36740),o=Object.prototype.hasOwnProperty,a=i(function(e,t,n){o.call(e,n)?e[n].push(t):r(e,n,[t])});e.exports=a},93352:function(e,t,n){var r=n(32726),i=n(1369);e.exports=function(e,t){return null!=e&&i(e,t,r)}},95041:function(e,t,n){var r=n(20187),i=n(1369);e.exports=function(e,t){return null!=e&&i(e,t,r)}},23059:function(e){e.exports=function(e){return e}},30898:function(e,t,n){var r=n(50343),i=n(88390),o=n(36060),a=n(5642),s=o(function(e){var t=r(e,a);return t.length&&t[0]===e[0]?i(t):[]});e.exports=s},79631:function(e,t,n){var r=n(15183),i=n(15125),o=Object.prototype,a=o.hasOwnProperty,s=o.propertyIsEnumerable,l=r(function(){return arguments}())?r:function(e){return i(e)&&a.call(e,"callee")&&!s.call(e,"callee")};e.exports=l},86152:function(e){var t=Array.isArray;e.exports=t},67878:function(e,t,n){var r=n(61049),i=n(61158);e.exports=function(e){return null!=e&&i(e.length)&&!r(e)}},93746:function(e,t,n){var r=n(67878),i=n(15125);e.exports=function(e){return i(e)&&r(e)}},73226:function(e,t,n){e=n.nmd(e);var r=n(37772),i=n(36330),o=t&&!t.nodeType&&t,a=o&&e&&!e.nodeType&&e,s=a&&a.exports===o?r.Buffer:void 0,l=s?s.isBuffer:void 0;e.exports=l||i},18149:function(e,t,n){var r=n(88746);e.exports=function(e,t){return r(e,t)}},61049:function(e,t,n){var r=n(53366),i=n(29259);e.exports=function(e){if(!i(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},61158:function(e){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},4714:function(e,t,n){var r=n(74511),i=n(47826),o=n(4146),a=o&&o.isMap,s=a?i(a):r;e.exports=s},29259:function(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},15125:function(e){e.exports=function(e){return null!=e&&"object"==typeof e}},97030:function(e,t,n){var r=n(53366),i=n(47353),o=n(15125),a=Object.prototype,s=Function.prototype.toString,l=a.hasOwnProperty,u=s.call(Object);e.exports=function(e){if(!o(e)||"[object Object]"!=r(e))return!1;var t=i(e);if(null===t)return!0;var n=l.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&s.call(n)==u}},43679:function(e,t,n){var r=n(8109),i=n(47826),o=n(4146),a=o&&o.isSet,s=a?i(a):r;e.exports=s},4795:function(e,t,n){var r=n(53366),i=n(15125);e.exports=function(e){return"symbol"==typeof e||i(e)&&"[object Symbol]"==r(e)}},77598:function(e,t,n){var r=n(35522),i=n(47826),o=n(4146),a=o&&o.isTypedArray,s=a?i(a):r;e.exports=s},90249:function(e,t,n){var r=n(1634),i=n(86411),o=n(67878);e.exports=function(e){return o(e)?r(e):i(e)}},18582:function(e,t,n){var r=n(1634),i=n(18390),o=n(67878);e.exports=function(e){return o(e)?r(e,!0):i(e)}},56974:function(e){e.exports=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}},19950:function(e,t,n){var r=n(13940),i=n(26548),o=n(68286);e.exports=function(e,t){var n={};return t=o(t,3),i(e,function(e,i,o){r(n,t(e,i,o),e)}),n}},34519:function(e,t,n){var r=n(13940),i=n(26548),o=n(68286);e.exports=function(e,t){var n={};return t=o(t,3),i(e,function(e,i,o){r(n,i,t(e,i,o))}),n}},30733:function(e,t,n){var r=n(96738);function i(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(i.Cache||r),n}i.Cache=r,e.exports=i},98537:function(e,t,n){var r=n(84565),i=n(97263)(function(e,t,n){r(e,t,n)});e.exports=i},34291:function(e){e.exports=function(){}},61100:function(e,t,n){var r=n(37772);e.exports=function(){return r.Date.now()}},17620:function(e,t,n){var r=n(50343),i=n(18874),o=n(29078),a=n(17297),s=n(752),l=n(48642),u=n(29097),c=n(76939),d=u(function(e,t){var n={};if(null==e)return n;var u=!1;t=r(t,function(t){return t=a(t,e),u||(u=t.length>1),t}),s(e,c(e),n),u&&(n=i(n,7,l));for(var d=t.length;d--;)o(n,t[d]);return n});e.exports=d},65798:function(e,t,n){var r=n(20256),i=n(82952),o=n(21401),a=n(33812);e.exports=function(e){return o(e)?r(a(e)):i(e)}},57370:function(e,t,n){var r=n(34311)(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()});e.exports=r},829:function(e,t,n){var r=n(62034),i=n(23813),o=n(36060),a=n(82406),s=o(function(e,t){if(null==e)return[];var n=t.length;return n>1&&a(e,t[0],t[1])?t=[]:n>2&&a(t[0],t[1],t[2])&&(t=[t[0]]),i(e,r(t,1),[])});e.exports=s},30981:function(e){e.exports=function(){return[]}},36330:function(e){e.exports=function(){return!1}},12436:function(e,t,n){var r=n(54073),i=n(29259);e.exports=function(e,t,n){var o=!0,a=!0;if("function"!=typeof e)throw TypeError("Expected a function");return i(n)&&(o="leading"in n?!!n.leading:o,a="trailing"in n?!!n.trailing:a),r(e,t,{leading:o,maxWait:t,trailing:a})}},61258:function(e,t,n){var r=n(36473),i=n(89419),o=n(38101),a=Math.min;e.exports=function(e,t){if((e=o(e))<1||e>9007199254740991)return[];var n=4294967295,s=a(e,4294967295);t=i(t),e-=4294967295;for(var l=r(s,t);++n"+t.value+""+i[o].show+""+e.value+"",type:10}):r.push({value:(1!=t.type?"(":"")+t.value+(1!=t.type?")":"")+""+e.value+"",type:1})):2===i[o].type||9===i[o].type?(e=r.pop(),t=r.pop(),r.push({value:(1!=t.type?"(":"")+t.value+(1!=t.type?")":"")+i[o].show+(1!=e.type?"(":"")+e.value+(1!=e.type?")":""),type:i[o].type})):12===i[o].type&&(e=r.pop(),t=r.pop(),n=r.pop(),r.push({value:i[o].show+"("+n.value+","+t.value+","+e.value+")",type:12}));return r[0].value},e.exports=r},66655:function(e,t,n){"use strict";var r=n(72346);function i(e,t){for(var n=0;np.length-2?p.length-1:e.length-l;n>0;n--)if(void 0!==p[n])for(i=0;i0&&jn)s.push(e);else{for(;n>=i&&!c||c&&i1)throw new r.Exception("Uncaught Syntax error");return o[0].value>1e15?"Infinity":parseFloat(o[0].value.toFixed(15))},r.eval=function(e,t,n){return void 0===t?this.lex(e).toPostfix().postfixEval():void 0!==n?this.lex(e,t).toPostfix().postfixEval(n):void 0!==t.length?this.lex(e,t).toPostfix().postfixEval():this.lex(e).toPostfix().postfixEval(t)},e.exports=r},38617:function(e,t,n){"use strict";n.d(t,{F:function(){return u},f:function(){return c}});var r=n(2784);let i=["light","dark"],o="(prefers-color-scheme: dark)",a="undefined"==typeof window,s=(0,r.createContext)(void 0),l={setTheme:e=>{},themes:[]},u=()=>{var e;return null!==(e=(0,r.useContext)(s))&&void 0!==e?e:l},c=e=>(0,r.useContext)(s)?r.createElement(r.Fragment,null,e.children):r.createElement(f,e),d=["light","dark"],f=({forcedTheme:e,disableTransitionOnChange:t=!1,enableSystem:n=!0,enableColorScheme:a=!0,storageKey:l="theme",themes:u=d,defaultTheme:c=n?"system":"light",attribute:f="data-theme",value:g,children:y,nonce:b})=>{let[x,w]=(0,r.useState)(()=>p(l,c)),[E,k]=(0,r.useState)(()=>p(l)),j=g?Object.values(g):u,_=(0,r.useCallback)(e=>{let r=e;if(!r)return;"system"===e&&n&&(r=v());let o=g?g[r]:r,s=t?m():null,l=document.documentElement;if("class"===f?(l.classList.remove(...j),o&&l.classList.add(o)):o?l.setAttribute(f,o):l.removeAttribute(f),a){let e=i.includes(c)?c:null,t=i.includes(r)?r:e;l.style.colorScheme=t}null==s||s()},[]),S=(0,r.useCallback)(e=>{w(e);try{localStorage.setItem(l,e)}catch(e){}},[e]),O=(0,r.useCallback)(t=>{let r=v(t);k(r),"system"===x&&n&&!e&&_("system")},[x,e]);(0,r.useEffect)(()=>{let e=window.matchMedia(o);return e.addListener(O),O(e),()=>e.removeListener(O)},[O]),(0,r.useEffect)(()=>{let e=e=>{e.key===l&&S(e.newValue||c)};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)},[S]),(0,r.useEffect)(()=>{_(null!=e?e:x)},[e,x]);let C=(0,r.useMemo)(()=>({theme:x,setTheme:S,forcedTheme:e,resolvedTheme:"system"===x?E:x,themes:n?[...u,"system"]:u,systemTheme:n?E:void 0}),[x,S,e,E,n,u]);return r.createElement(s.Provider,{value:C},r.createElement(h,{forcedTheme:e,disableTransitionOnChange:t,enableSystem:n,enableColorScheme:a,storageKey:l,themes:u,defaultTheme:c,attribute:f,value:g,children:y,attrs:j,nonce:b}),y)},h=(0,r.memo)(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:a,enableColorScheme:s,defaultTheme:l,value:u,attrs:c,nonce:d})=>{let f="system"===l,h="class"===n?`var d=document.documentElement,c=d.classList;c.remove(${c.map(e=>`'${e}'`).join(",")});`:`var d=document.documentElement,n='${n}',s='setAttribute';`,p=s?i.includes(l)&&l?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${l}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",m=(e,t=!1,r=!0)=>{let o=u?u[e]:e,a=t?e+"|| ''":`'${o}'`,l="";return s&&r&&!t&&i.includes(e)&&(l+=`d.style.colorScheme = '${e}';`),"class"===n?l+=t||o?`c.add(${a})`:"null":o&&(l+=`d[s](n,${a})`),l},v=e?`!function(){${h}${m(e)}}()`:a?`!function(){try{${h}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${f})){var t='${o}',m=window.matchMedia(t);if(m.media!==t||m.matches){${m("dark")}}else{${m("light")}}}else if(e){${u?`var x=${JSON.stringify(u)};`:""}${m(u?"x[e]":"e",!0)}}${f?"":"else{"+m(l,!1,!1)+"}"}${p}}catch(e){}}()`:`!function(){try{${h}var e=localStorage.getItem('${t}');if(e){${u?`var x=${JSON.stringify(u)};`:""}${m(u?"x[e]":"e",!0)}}else{${m(l,!1,!1)};}${p}}catch(t){}}();`;return r.createElement("script",{nonce:d,dangerouslySetInnerHTML:{__html:v}})},()=>!0),p=(e,t)=>{let n;if(!a){try{n=localStorage.getItem(e)||void 0}catch(e){}return n||t}},m=()=>{let e=document.createElement("style");return e.appendChild(document.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(e),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(e)},1)}},v=e=>(e||(e=window.matchMedia(o)),e.matches?"dark":"light")},86570:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/_app",function(){return n(76176)}])},4941:function(e,t,n){"use strict";n.d(t,{Ul:function(){return s},WD:function(){return l},fu:function(){return c},o4:function(){return u}});var r=n(52322),i=n(52735),o=n(82851),a=n(99182);function s(e){let{currentPage:t,parentPage:n,commandPage:s,className:l,...u}=e,c=(0,a.U8)(e=>e.search);if((null==n?void 0:n.namespace)===(null==t?void 0:t.namespace)&&!c)return(0,r.jsx)(a.mY.Item,{className:(0,o.cx)((0,i.Vkc)(),"group",l),value:"".concat(null==s?void 0:s.label," ").concat(u.children.toString()),...u})}function l(e){let{currentPage:t,commandPage:n,className:s,...l}=e,u=(0,a.U8)(e=>e.search),c=n.namespace.startsWith((null==t?void 0:t.namespace)||"");if(u&&c||n.namespace===(null==t?void 0:t.namespace))return(0,r.jsx)(a.mY.Item,{className:(0,o.cx)((0,i.Vkc)(),"group",s),value:"".concat(n.label," ").concat(l.children.toString()),...l})}function u(e){let{currentPage:t,commandPage:n,className:s,...l}=e,u=(0,a.U8)(e=>e.search),c=n.namespace.startsWith((null==t?void 0:t.namespace)||"");if(u&&c||!t||n.namespace===(null==t?void 0:t.namespace))return(0,r.jsx)(a.mY.Item,{className:(0,o.cx)((0,i.Vkc)(),"group",s),value:"".concat(n.label," ").concat(l.children.toString()),...l})}function c(e){let{heading:t,currentPage:n,commandPage:o,...s}=e,l=(0,a.U8)(e=>e.search);return(0,r.jsx)(a.mY.Group,{heading:l&&(null==n?void 0:n.namespace)!==o.namespace&&(0,r.jsx)(i.__J,{className:"px-1",size:"12",children:o.label}),...s})}n(2784)},3639:function(e,t,n){"use strict";n.d(t,{F:function(){return y}});var r=n(52322),i=n(4941);let o={namespace:"contracts/filterStatus",label:"Contracts filter by status"},a=[{id:"filterStatusActive",value:"active",label:"Contract is active"},{id:"filterStatusSuccessful",value:"successful",label:"Contract was successful"},{id:"filterStatusPending",value:"pending",label:"Contract is pending"},{id:"filterStatusRejected",value:"rejected",label:"Contract was rejected"},{id:"filterStatusFailed",value:"failed",label:"Contract has failed"}];function s(e){let{select:t,currentPage:n}=e;return(0,r.jsx)(i.fu,{currentPage:n,commandPage:o,children:a.map(e=>(0,r.jsx)(i.WD,{currentPage:n,commandPage:o,onSelect:()=>{t(e)},children:e.label},e.id+e.value))})}var l=n(22515),u=n(734);let c={namespace:"contracts/filterAddress",label:"Contracts filter by ID"};function d(e){let{select:t,currentPage:n}=e,{openDialog:o}=(0,l.Rh)(),a=(0,u.O)("");return(0,r.jsx)(i.fu,{currentPage:n,commandPage:c,children:(0,r.jsx)(i.WD,{currentPage:n,commandPage:c,onSelect:()=>{t(),o("contractsFilterContractId")},children:a.label})})}function f(e){let{select:t,currentPage:n,parentPage:o,commandPage:a}=e,{openDialog:s}=(0,l.Rh)();return(0,r.jsx)(i.Ul,{currentPage:n,parentPage:o,commandPage:a,onSelect:()=>{t(),s("contractsFilterContractId")},children:c.label})}function h(e){let{currentPage:t,select:n}=e;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s,{currentPage:t,select:n}),(0,r.jsx)(d,{currentPage:t,select:n})]})}let p={namespace:"contracts",label:"Contracts"};function m(e){let{currentPage:t,parentPage:n,pushPage:a,select:s}=e;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.Ul,{currentPage:t,parentPage:n,commandPage:p,onSelect:()=>{a(o)},children:o.label}),(0,r.jsx)(f,{currentPage:t,parentPage:n,commandPage:p,select:s})]})}var v=n(92838),g=n(2784);function y(e){let{currentPage:t,parentPage:n,pushPage:i,beforeSelect:o,afterSelect:a}=e,{setFilter:s}=(0,v.G)(),l=(0,g.useCallback)(e=>{o&&o(),e&&s(e),a&&a()},[s,o,a]);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(m,{parentPage:n,currentPage:t,pushPage:i,select:l}),(0,r.jsx)(h,{currentPage:t,select:l})]})}},71930:function(e,t,n){"use strict";n.d(t,{_:function(){return i},h:function(){return o}});var r=n(27444);let i={home:"/",volumes:{index:"/volumes"},contracts:{index:"/contracts"},config:{index:"/config",host:"/config#host",pricing:"/config#pricing",dns:"/config#dns",bandwidth:"/config#bandwidth",registry:"/config#registry",accounts:"/config#accounts"},wallet:{view:"/wallet"},node:{index:"/node",txPool:"/node/txpool",peers:"/node/peers"},login:"/login"},o=r.dk},99957:function(e,t,n){"use strict";n.d(t,{iV:function(){return y},ZR:function(){return g}});var r=n(52322),i=n(2784),o=n(52735),a=n(27444);let s=[{value:"",label:"Off"},{value:"route53",label:"Route 53"},{value:"noip",label:"No-IP"},{value:"duckdns",label:"Duck DNS"},{value:"cloudflare",label:"Cloudflare"}],l={acceptingContracts:!1,netAddress:"",maxContractDuration:void 0,contractPrice:void 0,baseRPCPrice:void 0,sectorAccessPrice:void 0,collateralMultiplier:void 0,maxCollateral:void 0,storagePrice:void 0,egressPrice:void 0,ingressPrice:void 0,priceTableValidity:void 0,maxRegistryEntries:void 0,accountExpiry:void 0,maxAccountBalance:void 0,ingressLimit:void 0,egressLimit:void 0,dnsProvider:"",dnsIpv4:!1,dnsIpv6:!1,dnsDuckDnsToken:"",dnsNoIpEmail:"",dnsNoIpPassword:"",dnsAwsId:"",dnsAwsSecret:"",dnsAwsZoneId:"",dnsCloudflareToken:"",dnsCloudflareZoneId:""};var u=n(6391),c=n.n(u),d=n(96206),f=n(94977),h=n(63955),p=n(92762),m=n(2850);let v=(0,i.createContext)({}),g=()=>(0,i.useContext)(v);function y(e){let{children:t}=e,n=function(){let e=(0,a.rV)({standalone:"configSettingsForm",config:{swr:{refreshInterval:(0,o.sWj)(1)}}}),t=(0,a.Te)(),n=(0,a.uo)({disabled:!e.data||!e.data.ddns.provider,config:{swr:{revalidateOnFocus:!1,errorRetryCount:0}}}),[u,v]=(0,p.Z)("v0/config/showAdvanced",{defaultValue:!1}),g=(0,h.cI)({mode:"all",defaultValues:l}),y=(0,i.useCallback)(e=>{let t;let n=(t=null,"duckdns"===e.ddns.provider&&(t={dnsDuckDnsToken:e.ddns.options.token}),"noip"===e.ddns.provider&&(t={dnsNoIpEmail:e.ddns.options.email,dnsNoIpPassword:e.ddns.options.password}),"route53"===e.ddns.provider&&(t={dnsAwsId:e.ddns.options.ID,dnsAwsSecret:e.ddns.options.secret,dnsAwsZoneId:e.ddns.options.zoneID}),"cloudflare"===e.ddns.provider&&(t={dnsCloudflareToken:e.ddns.options.token,dnsCloudflareZoneId:e.ddns.options.zoneID}),{acceptingContracts:e.acceptingContracts,netAddress:e.netAddress,maxContractDuration:new(c())(e.maxContractDuration).div((0,o.S5V)(1)),contractPrice:(0,d.ll)(e.contractPrice,6),baseRPCPrice:(0,d.ll)((0,f.sS)(e.baseRPCPrice),6),sectorAccessPrice:(0,d.ll)((0,f.nS)(e.sectorAccessPrice),6),collateralMultiplier:new(c())(e.collateralMultiplier),maxCollateral:(0,d.ll)(e.maxCollateral,6),storagePrice:(0,d.ll)((0,f.SY)(e.storagePrice),6),egressPrice:(0,d.ll)((0,f.B1)(e.egressPrice),6),ingressPrice:(0,d.ll)((0,f.dK)(e.ingressPrice),6),priceTableValidity:new(c())(e.priceTableValidity).div(1e9).div(60),maxRegistryEntries:new(c())(e.maxRegistryEntries),accountExpiry:new(c())(e.accountExpiry).div(1e9).div(86400),maxAccountBalance:(0,d.ll)(e.maxAccountBalance,6),ingressLimit:(0,o.BTR)(new(c())(e.ingressLimit)),egressLimit:(0,o.BTR)(new(c())(e.egressLimit)),dnsProvider:e.ddns.provider,dnsIpv4:e.ddns.ipv4,dnsIpv6:e.ddns.ipv6,...t});return g.reset(n),n},[g]),b=(0,i.useMemo)(()=>[e.data],[e.data]),x=(0,i.useCallback)(()=>e.data?y(e.data):null,[y,e.data]),[w,E]=(0,i.useState)(!1);(0,i.useEffect)(()=>{if(!w){let e=x();e&&E(!0)}},[w,x]);let k=(0,i.useCallback)(async()=>{let t=await e.mutate();t?(y(t),await n.mutate()):(0,o.OHV)("Error fetching settings.")},[e,y,n]),j=(0,i.useCallback)(async n=>{if(e.data)try{var r,i,a;let s;let l={};u||(l.maxCollateral=(r=n.storagePrice,i=n.collateralMultiplier,new(c())(12960).times(r).div((0,o.S5V)(1)).times(i)));let h={...n,...l},p=await t.patch({payload:(a=e.data,s=null,"duckdns"===h.dnsProvider&&(s={token:h.dnsDuckDnsToken}),"noip"===h.dnsProvider&&(s={email:h.dnsNoIpEmail,password:h.dnsNoIpPassword}),"route53"===h.dnsProvider&&(s={ID:h.dnsAwsId,secret:h.dnsAwsSecret,zoneID:h.dnsAwsZoneId}),"cloudflare"===h.dnsProvider&&(s={token:h.dnsCloudflareToken,zoneID:h.dnsCloudflareZoneId}),{...a,acceptingContracts:h.acceptingContracts,netAddress:h.netAddress,maxContractDuration:Number(h.maxContractDuration.times((0,o.S5V)(1)).toFixed(0)),contractPrice:(0,d.qN)(h.contractPrice).toString(),baseRPCPrice:h.baseRPCPrice.div((0,d.ll)((0,f.sS)(1))).toFixed(0),sectorAccessPrice:h.sectorAccessPrice.div((0,d.ll)((0,f.nS)(1))).toFixed(0),collateralMultiplier:h.collateralMultiplier.toNumber(),maxCollateral:(0,d.qN)(h.maxCollateral).toString(),storagePrice:h.storagePrice.div((0,d.ll)((0,f.SY)(1))).toFixed(0),egressPrice:h.egressPrice.div((0,d.ll)((0,f.B1)(1))).toFixed(0),ingressPrice:h.ingressPrice.div((0,d.ll)((0,f.dK)(1))).toFixed(0),priceTableValidity:Number(h.priceTableValidity.times(60).times(1e9).toFixed(0)),maxRegistryEntries:Number(h.maxRegistryEntries.toFixed(0)),accountExpiry:Number(h.accountExpiry.times(86400).times(1e9).toFixed(0)),maxAccountBalance:(0,d.qN)(h.maxAccountBalance).toString(),ingressLimit:Number((0,o.YaL)(h.ingressLimit).toFixed(0)),egressLimit:Number((0,o.YaL)(h.egressLimit).toFixed(0)),ddns:{...null==a?void 0:a.ddns,provider:h.dnsProvider,ipv4:h.dnsIpv4,ipv6:h.dnsIpv6,options:s}})});if(p.error)throw Error(p.error);g.formState.dirtyFields.netAddress?(0,o.OPV)("Settings have been saved. Address has changed, make sure to re-announce the host.",{duration:2e4}):(0,o.OPV)("Settings have been saved."),await k()}catch(e){(0,o.OHV)(e.message),console.log(e)}},[g,u,e,t,k]),_=(0,i.useMemo)(()=>(function(e){let{showAdvanced:t}=e;return{acceptingContracts:{type:"boolean",category:"host",title:"Accepting contracts",description:(0,r.jsx)(r.Fragment,{children:"Whether or not the host is accepting contracts."}),validation:{}},netAddress:{type:"text",category:"host",title:"Address",description:(0,r.jsx)(r.Fragment,{children:"The network address of the host."}),placeholder:"my.host.com:9882",validation:{required:"required"}},maxContractDuration:{type:"number",category:"host",title:"Maximum contract duration",units:"months",decimalsLimit:2,suggestion:new(c())(6),suggestionTip:"The default maximum duration is 6 months.",description:(0,r.jsx)(r.Fragment,{children:"The maximum contract duration that the host will accept."}),hidden:!t,validation:{required:"required",validate:{min:e=>new(c())(e).gte((0,o.E6f)(4320))||"must be at least 1 month"}}},storagePrice:{title:"Storage price",type:"siacoin",category:"pricing",units:"SC/TB/month",decimalsLimitSc:6,description:(0,r.jsx)(r.Fragment,{children:"The host's storage price in siacoins per TB per month."}),validation:{required:"required"}},egressPrice:{title:"Egress price",type:"siacoin",category:"pricing",units:"SC/TB",decimalsLimitSc:6,description:(0,r.jsx)(r.Fragment,{children:"The host's egress price in siacoins per TB."}),validation:{required:"required"}},ingressPrice:{title:"Ingress price",type:"siacoin",category:"pricing",units:"SC/TB",decimalsLimitSc:6,description:(0,r.jsx)(r.Fragment,{children:"The host's ingress price in siacoins per TB."}),validation:{required:"required"}},collateralMultiplier:{title:"Collateral multiplier",type:"number",category:"pricing",units:"* storage price",placeholder:"2",decimalsLimit:1,description:(0,r.jsx)(r.Fragment,{children:"The host's target collateral as a multiple of storage price."}),suggestion:new(c())(2),suggestionTip:"The default multiplier is 2x the storage price.",validation:{required:"required"}},maxCollateral:{title:"Maximum collateral",type:"siacoin",category:"pricing",decimalsLimitSc:6,description:(0,r.jsx)(r.Fragment,{children:"The host's maximum collateral in siacoins."}),hidden:!t,validation:{required:"required"}},contractPrice:{title:"Contract price",type:"siacoin",category:"pricing",decimalsLimitSc:6,description:(0,r.jsx)(r.Fragment,{children:"The host's contract price in siacoins."}),hidden:!t,validation:{required:"required"}},baseRPCPrice:{title:"Base RPC price",type:"siacoin",category:"pricing",units:"SC/million",decimalsLimitSc:6,description:(0,r.jsx)(r.Fragment,{children:"The host's base RPC price in siacoins per million calls."}),hidden:!t,validation:{required:"required"}},sectorAccessPrice:{title:"Sector access price",type:"siacoin",category:"pricing",units:"SC/million",decimalsLimitSc:6,description:(0,r.jsx)(r.Fragment,{children:"The host's sector access price in siacoins million sectors."}),hidden:!t,validation:{required:"required"}},priceTableValidity:{title:"Price table validity",type:"number",category:"pricing",units:"minutes",description:(0,r.jsx)(r.Fragment,{children:"How long a renter's registered price table remains valid."}),hidden:!t,validation:{required:"required"}},maxRegistryEntries:{title:"Maximum registry size",type:"number",category:"registry",units:"entries",decimalsLimit:0,description:(0,r.jsx)(r.Fragment,{children:"The maximum number of registry entries that the host will store. Each registry entry is up to 113 bytes."}),hidden:!t,validation:{required:"required"}},accountExpiry:{title:"Expiry",type:"number",category:"RHP3",units:"days",description:(0,r.jsx)(r.Fragment,{children:"How long a renter's ephemeral accounts are inactive before the host prunes them and recovers the remaining funds."}),hidden:!t,validation:{required:"required",validate:{min:e=>new(c())(e).gte(7)||"must be at least 1 week"}}},maxAccountBalance:{title:"Maximum balance",type:"siacoin",category:"RHP3",description:(0,r.jsx)(r.Fragment,{children:"Maximum balance a renter's ephemeral account can have. When the limit is reached, deposits are rejected until some of the funds have been spent."}),hidden:!t,validation:{required:"required",validate:{min:e=>new(c())(e).gte(1)||"must be at least 1 SC"}}},ingressLimit:{title:"Ingress limit",type:"number",category:"bandwidth",units:"MB/second",description:(0,r.jsx)(r.Fragment,{children:"The maximum amount of ingress bandwidth traffic in MB per second."}),validation:{required:"required"}},egressLimit:{title:"Egress limit",type:"number",category:"bandwidth",units:"MB/second",description:(0,r.jsx)(r.Fragment,{children:"The maximum amount of egress bandwidth traffic in MB per second."}),validation:{required:"required"}},dnsProvider:{title:"Dynamic DNS Provider",type:"select",category:"DNS",options:s,description:(0,r.jsx)(r.Fragment,{children:"Enable dynamic DNS with one of the supported providers."}),validation:{validate:e=>!!s.find(t=>t.value===e)||"must be one of supported providers"}},dnsIpv4:{title:"IPv4",type:"boolean",category:"DNS",description:(0,r.jsx)(r.Fragment,{children:"Whether IPv4 is enabled."}),show:e=>!!e.dnsProvider,validation:{validate:(e,t)=>!t.dnsProvider||!!(e||t.dnsIpv6)||"at least one of IPv4 and IPv6 must be enabled"},trigger:["dnsIpv6"]},dnsIpv6:{type:"boolean",title:"IPv6",category:"DNS",description:(0,r.jsx)(r.Fragment,{children:"Whether IPv6 is enabled."}),show:e=>!!e.dnsProvider,validation:{validate:(e,t)=>!t.dnsProvider||!!(e||t.dnsIpv4)||"at least one of IPv4 and IPv6 must be enabled"},trigger:["dnsIpv4"]},dnsDuckDnsToken:{type:"text",title:"Token",category:"DNS",description:(0,r.jsx)(r.Fragment,{children:"DuckDNS token."}),show:e=>"duckdns"===e.dnsProvider,validation:{validate:(e,t)=>"duckdns"!==t.dnsProvider||!!e||"required"}},dnsNoIpEmail:{type:"text",title:"Email",category:"DNS",description:(0,r.jsx)(r.Fragment,{children:"No-IP email."}),show:e=>"noip"===e.dnsProvider,validation:{validate:(e,t)=>"noip"!==t.dnsProvider||!!e||"required"}},dnsNoIpPassword:{type:"password",title:"Password",category:"DNS",description:(0,r.jsx)(r.Fragment,{children:"No-IP password."}),show:e=>"noip"===e.dnsProvider,validation:{validate:(e,t)=>"noip"!==t.dnsProvider||!!e||"required"}},dnsAwsId:{type:"text",title:"ID",category:"DNS",description:(0,r.jsx)(r.Fragment,{children:"AWS Route53 ID."}),show:e=>"route53"===e.dnsProvider,validation:{validate:(e,t)=>"route53"!==t.dnsProvider||!!e||"required"}},dnsAwsSecret:{type:"password",title:"Secret",category:"DNS",description:(0,r.jsx)(r.Fragment,{children:"AWS Route53 secret."}),show:e=>"route53"===e.dnsProvider,validation:{validate:(e,t)=>"route53"!==t.dnsProvider||!!e||"required"}},dnsAwsZoneId:{type:"text",title:"Zone ID",category:"DNS",description:(0,r.jsx)(r.Fragment,{children:"AWS Route53 zone ID."}),show:e=>"route53"===e.dnsProvider,validation:{validate:(e,t)=>"route53"!==t.dnsProvider||!!e||"required"}},dnsCloudflareToken:{type:"text",title:"Token",category:"DNS",description:(0,r.jsx)(r.Fragment,{children:"Cloudflare token."}),show:e=>"cloudflare"===e.dnsProvider,validation:{validate:(e,t)=>"cloudflare"!==t.dnsProvider||!!e||"required"}},dnsCloudflareZoneId:{type:"text",title:"Zone ID",category:"DNS",description:(0,r.jsx)(r.Fragment,{children:"Cloudflare zone ID."}),show:e=>"cloudflare"===e.dnsProvider,validation:{validate:(e,t)=>"cloudflare"!==t.dnsProvider||!!e||"required"}}}})({showAdvanced:u}),[u]),S=(0,o.WsO)(_),O=(0,i.useMemo)(()=>g.handleSubmit(j,S),[g,j,S]),C=(0,i.useCallback)(()=>{let e=g.getValues(),t=x();if(t)for(let[n,r]of(g.reset(t),Object.entries(e)))g.setValue(n,r,{shouldDirty:!0})},[g,x]),{isUnlocked:M}=(0,m.Hv)();(0,i.useEffect)(()=>{M&&k()},[M]),(0,i.useEffect)(()=>{g.formState.isSubmitting||C()},[g,u,b]);let A=Object.entries(g.formState.dirtyFields).filter(e=>{let[t,n]=e;return!!n}).length;return{fields:_,settings:e,dynDNSCheck:n,changeCount:A,revalidateAndResetFormData:k,form:g,onSubmit:O,showAdvanced:u,setShowAdvanced:v}}();return(0,r.jsx)(v.Provider,{value:n,children:t})}},92838:function(e,t,n){"use strict";n.d(t,{x:function(){return b},G:function(){return y}});var r=n(52322),i=n(52735),o=n(5632),a=n(27444),s=n(2784),l=n(56860),u=n(41775),c=n(96206),d=n(22515);function f(e){let{id:t,status:n,contentProps:o,buttonProps:l}=e,c=(0,a.kr)(),{openDialog:f}=(0,d.Rh)(),h=(0,s.useCallback)(async()=>{let e=await c.put({params:{id:t}});e.error?(0,i.OHV)(e.error):(0,i.OPV)((0,r.jsxs)(r.Fragment,{children:["Integrity check successfully started, depending on contract data size this operation can take a while. Check ",(0,r.jsx)(i.EKh,{children:"hostd"})," ",(0,r.jsx)(i.rUS,{onClick:()=>f("alerts"),children:"alerts"})," for status updates."]}),{duration:12e3})},[t,c,f]),p=["active","pending"].includes(n);return(0,r.jsxs)(i.h_2,{trigger:(0,r.jsx)(i.zxk,{variant:"ghost",icon:"hover",...l,children:(0,r.jsx)(u.iG7,{})}),contentProps:{align:"start",...o},children:[(0,r.jsx)("div",{className:"px-1.5 py-1",children:(0,r.jsxs)(i.xvT,{size:"14",weight:"medium",color:"subtle",children:["Contract ",t.slice(0,24),"..."]})}),(0,r.jsx)(i.Juw,{children:"Actions"}),(0,r.jsx)(i.ua7,{content:p?"Trigger a data integrity check":"Data integrity check only available for active or pending contracts",children:(0,r.jsx)("div",{children:(0,r.jsxs)(i.Xiv,{disabled:!p,onSelect:()=>h(),children:[(0,r.jsx)(i.KpP,{children:(0,r.jsx)(u.dDl,{})}),"Integrity check"]})})})]})}let h=[{id:"actions",label:"",fixed:!0,cellClassName:"w-[50px] !pl-2 !pr-4 [&+*]:!pl-0",render:e=>{let{data:{id:t,status:n}}=e;return(0,r.jsx)(f,{id:t,status:n})}},{id:"contractId",label:"contract ID",category:"general",render:e=>{let{data:t}=e,{id:n,renewedFrom:o,isRenewedFrom:a,renewedTo:s,isRenewedTo:l}=t;return(0,r.jsxs)("div",{className:"flex flex-col gap-1 w-full",children:[(0,r.jsx)(i.XxW,{size:"12",value:(0,i.I13)(n),label:"contract ID"}),a&&(0,r.jsx)(i.ua7,{content:"Renewed from",align:"start",children:(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)(i.xvT,{color:"subtle",children:(0,r.jsx)(u.L6f,{className:"scale-75"})}),(0,r.jsx)(i.XxW,{color:"subtle",size:"10",value:(0,i.I13)(o),label:"contract ID"})]})}),l&&(0,r.jsx)(i.ua7,{content:"Renewed to",align:"start",children:(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)(i.xvT,{color:"subtle",children:(0,r.jsx)(u.IRm,{className:"scale-75"})}),(0,r.jsx)(i.XxW,{color:"subtle",size:"10",value:(0,i.I13)(s),label:"contract ID"})]})})]})}},{id:"status",label:"status",category:"general",render:e=>{let{data:{status:t}}=e;return(0,r.jsx)(i.Cts,{variant:"active"===t?"amber":"failed"===t?"red":"pending"===t?"amber":"rejected"===t?"red":"successful"===t?"green":void 0,children:t})}},{id:"timeline",label:"timeline",category:"time",render:e=>{let{data:t,context:{currentHeight:n,contractsTimeRange:o}}=e,{contractHeightStart:a,contractHeightEnd:s,revision:l,status:u}=t;return(0,r.jsx)("div",{className:"w-[400px]",children:(0,r.jsx)(i.TaT,{currentHeight:n,contractHeightStart:a,contractHeightEnd:"rejected"===u?void 0:s,proofWindowHeightStart:"rejected"===u?void 0:l.windowStart,proofWindowHeightEnd:"rejected"===u?void 0:l.windowEnd,range:o})})}},{id:"contractHeightStart",label:"start date",category:"time",contentClassName:"w-[120px] justify-end",render:e=>{let{data:{contractHeightStart:t},context:{currentHeight:n}}=e;return(0,r.jsx)(i.xvT,{size:"12",children:(0,c.rN)((0,i.jrD)(n,t))})}},{id:"contractHeightEnd",label:"expiration date",category:"time",contentClassName:"w-[120px] justify-end",render:e=>{let{data:{contractHeightEnd:t},context:{currentHeight:n}}=e;return(0,r.jsx)(i.xvT,{size:"12",children:(0,c.rN)((0,i.jrD)(n,t))})}},{id:"payoutHeight",label:"payout date",category:"time",contentClassName:"w-[120px] justify-end",render:e=>{let{data:{payoutHeight:t},context:{currentHeight:n}}=e;return(0,r.jsx)(i.xvT,{size:"12",children:(0,c.rN)((0,i.jrD)(n,t))})}},{id:"filesize",label:"data size",category:"general",contentClassName:"w-[120px] justify-end",render:e=>{let{data:{revision:{filesize:t}}}=e;return(0,r.jsx)(i.m2c,{size:"12",value:t,variant:"value",format:e=>(0,c.vW)(e.toNumber())})}},{id:"fileMerkleRoot",label:"merkle root",category:"general",contentClassName:"w-[120px] justify-end",render:e=>{let{data:{revision:{fileMerkleRoot:t}}}=e;return(0,r.jsx)(i.XxW,{size:"12",value:(0,i.I13)(t)})}},{id:"payout",label:"payout",category:"financial",contentClassName:"w-[120px] justify-end",render:e=>{let{data:{revision:t}}=e;return(0,r.jsx)(i.YKL,{size:"12",value:t.payout})}},{id:"remainingRenterFunds",label:"remaining renter funds",category:"financial",contentClassName:"w-[120px] justify-end",render:e=>{let{data:{revision:t}}=e;return(0,r.jsx)(i.YKL,{size:"12",value:t.remainingRenterFunds})}},{id:"lockedCollateral",label:"locked collateral",category:"financial",contentClassName:"w-[120px] justify-end",render:e=>{let{data:{lockedCollateral:t}}=e;return(0,r.jsx)(i.YKL,{size:"12",value:t})}},{id:"usageRiskedCollateral",label:"risked collateral",category:"financial",contentClassName:"w-[120px] justify-end",render:e=>{let{data:{usage:t}}=e;return(0,r.jsx)(i.YKL,{size:"12",value:t.riskedCollateral})}},{id:"usageTotal",label:"total usage",category:"financial",contentClassName:"w-[120px] justify-end",render:e=>{let{data:{usage:t}}=e;return(0,r.jsx)(i.YKL,{size:"12",value:t.total})}},{id:"usageStorage",label:"storage usage",category:"financial",contentClassName:"w-[120px] justify-end",render:e=>{let{data:{usage:t}}=e;return(0,r.jsx)(i.YKL,{size:"12",value:t.storage})}},{id:"usageIngress",label:"ingress usage",category:"financial",contentClassName:"w-[120px] justify-end",render:e=>{let{data:{usage:t}}=e;return(0,r.jsx)(i.YKL,{size:"12",value:t.ingress})}},{id:"usageEgress",label:"egress usage",category:"financial",contentClassName:"w-[120px] justify-end",render:e=>{let{data:{usage:t}}=e;return(0,r.jsx)(i.YKL,{size:"12",value:t.egress})}},{id:"usageAccountFunding",label:"account funding usage",category:"financial",contentClassName:"w-[120px] justify-end",render:e=>{let{data:{usage:t}}=e;return(0,r.jsx)(i.YKL,{size:"12",value:t.accountFunding})}},{id:"usageRpc",label:"RPC usage",category:"financial",contentClassName:"w-[120px] justify-end",render:e=>{let{data:{usage:t}}=e;return(0,r.jsx)(i.YKL,{size:"12",value:t.rpc})}}].map(e=>({...e,..."financial"===e.category?{icon:(0,r.jsx)(u.dZ8,{className:"relative opacity-50 scale-75"}),label:e.label,tip:"financial: ".concat(e.label)}:{label:e.label,tip:e.label}}));var p=n(6391),m=n.n(p),v=n(25573);let g=(0,s.createContext)({}),y=()=>(0,s.useContext)(g);function b(e){let{children:t}=e,n=function(){var e,t;let n=(0,o.useRouter)(),r=Number(n.query.limit||50),u=Number(n.query.offset||0),{filters:c,setFilter:d,removeFilter:f,removeLastFilter:p,resetFilters:g}=(0,i.Uu5)(),{configurableColumns:y,enabledColumns:b,sortableColumns:x,toggleColumnVisibility:w,setColumnsVisible:E,setColumnsHidden:k,toggleSort:j,setSortDirection:_,setSortField:S,sortField:O,sortDirection:C,resetDefaultColumnVisibility:M}=(0,i.oy6)("hostd/v0/contracts",{columns:h,columnsDefaultVisible:l.gd,sortOptions:l.Fo,defaultSortField:l.nw}),A=(0,a.GP)({payload:{limit:r,offset:u,sortField:null===(e=l.Fo.find(e=>e.id===O))||void 0===e?void 0:e.value,sortDesc:"desc"===C,contractIDs:c.filter(e=>"filterContractId"===e.id).map(e=>e.value),statuses:c.filter(e=>e.id.startsWith("filterStatus")).map(e=>e.value)},config:{swr:{refreshInterval:(0,i.XBW)(60)}}}),P=function(e){let{response:t}=e;return(0,s.useMemo)(()=>{var e;return t.data?(null===(e=t.data.contracts)||void 0===e?void 0:e.map(e=>(function(e){var t;let n=new(m())(e.usage.accountFunding||0),r=new(m())(e.usage.egress||0),i=new(m())(e.usage.ingress||0),o=new(m())(e.usage.riskedCollateral||0),a=new(m())(e.usage.rpc||0),s=new(m())(e.usage.storage||0),l=n.plus(r).plus(i).plus(a).plus(s),u=e.resolutionHeight>0?e.resolutionHeight+144:e.revision.windowEnd+144;return{id:e.revision.parentID,revision:{parentID:e.revision.parentID,unlockConditions:e.revision.unlockConditions,filesize:new(m())(e.revision.filesize||0),fileMerkleRoot:e.revision.fileMerkleRoot,windowStart:e.revision.windowStart,windowEnd:e.revision.windowEnd,payout:new(m())("active"==e.status||e.resolutionHeight>0?e.revision.validProofOutputs[1].value:e.revision.missedProofOutputs[1].value),remainingRenterFunds:new(m())((null===(t=e.revision.validProofOutputs)||void 0===t?void 0:t[0].value)||0),validProofOutputs:e.revision.validProofOutputs,missedProofOutputs:e.revision.missedProofOutputs,unlockHash:e.revision.unlockHash,revisionNumber:e.revision.revisionNumber},usage:{total:l,accountFunding:n,egress:r,ingress:i,riskedCollateral:o,rpc:a,storage:s},lockedCollateral:new(m())(e.lockedCollateral||0),hostSignature:e.hostSignature,renterSignature:e.renterSignature,status:e.status,negotiationHeight:e.negotiationHeight,formationConfirmed:e.formationConfirmed,revisionConfirmed:e.revisionConfirmed,resolutionHeight:e.resolutionHeight,payoutHeight:u,contractHeightStart:e.negotiationHeight,contractHeightEnd:e.revision.windowStart,renewedTo:e.renewedTo,renewedFrom:e.renewedFrom,isRenewedFrom:"fcid:0000000000000000000000000000000000000000000000000000000000000000"!==e.renewedFrom,isRenewedTo:"fcid:0000000000000000000000000000000000000000000000000000000000000000"!==e.renewedTo}})(e)))||[]:null},[t.data])}({response:A}),T=(0,s.useMemo)(()=>h.filter(e=>b.includes(e.id)),[b]),N=A.isValidating,R=A.error,D=(0,i.c2j)(P,N,R,c),{estimatedBlockHeight:L,isSynced:F,nodeBlockHeight:V}=(0,v.n)(),I=F?V:L,{range:z}=(0,s.useMemo)(()=>(0,i.EJC)(I,P||[]),[I,P]);return{dataState:D,offset:u,limit:r,cellContext:{contractsTimeRange:z,currentHeight:I},pageCount:(null==P?void 0:P.length)||0,totalCount:null===(t=A.data)||void 0===t?void 0:t.count,columns:T,dataset:P,configurableColumns:y,enabledColumns:b,sortableColumns:x,toggleColumnVisibility:w,setColumnsVisible:E,setColumnsHidden:k,toggleSort:j,setSortDirection:_,setSortField:S,sortField:O,sortDirection:C,resetDefaultColumnVisibility:M,filters:c,setFilter:d,removeFilter:f,removeLastFilter:p,resetFilters:g}}();return(0,r.jsx)(g.Provider,{value:n,children:t})}},56860:function(e,t,n){"use strict";n.d(t,{Fo:function(){return i},gd:function(){return r},nw:function(){return o}});let r=["contractId","status","usageTotal","lockedCollateral","timeline"],i=[{id:"status",value:"status",label:"status",category:"general"},{id:"timeline",value:"negotiationHeight",label:"timeline",category:"time"},{id:"contractHeightStart",value:"negotiationHeight",label:"start height",category:"time"},{id:"contractHeightEnd",value:"expirationHeight",label:"expiration height",category:"time"}],o="timeline"},22515:function(e,t,n){"use strict";n.d(t,{Tu:function(){return em},xQ:function(){return ev},Rh:function(){return ep}});var r=n(52322),i=n(2784),o=n(52735),a=n(27444),s=n(96206),l=n(63955);function u(e,t,n){var r=this,o=(0,i.useRef)(null),a=(0,i.useRef)(0),s=(0,i.useRef)(null),l=(0,i.useRef)([]),u=(0,i.useRef)(),c=(0,i.useRef)(),d=(0,i.useRef)(e),f=(0,i.useRef)(!0);(0,i.useEffect)(function(){d.current=e},[e]);var h=!t&&0!==t&&"undefined"!=typeof window;if("function"!=typeof e)throw TypeError("Expected a function");t=+t||0;var p=!!(n=n||{}).leading,m=!("trailing"in n)||!!n.trailing,v="maxWait"in n,g=v?Math.max(+n.maxWait||0,t):null;return(0,i.useEffect)(function(){return f.current=!0,function(){f.current=!1}},[]),(0,i.useMemo)(function(){var e=function(e){var t=l.current,n=u.current;return l.current=u.current=null,a.current=e,c.current=d.current.apply(n,t)},n=function(e,t){h&&cancelAnimationFrame(s.current),s.current=h?requestAnimationFrame(e):setTimeout(e,t)},i=function(e){if(!f.current)return!1;var n=e-o.current;return!o.current||n>=t||n<0||v&&e-a.current>=g},y=function(t){return s.current=null,m&&l.current?e(t):(l.current=u.current=null,c.current)},b=function e(){var r=Date.now();if(i(r))return y(r);if(f.current){var s=t-(r-o.current);n(e,v?Math.min(s,g-(r-a.current)):s)}},x=function(){var d=Date.now(),h=i(d);if(l.current=[].slice.call(arguments),u.current=r,o.current=d,h){if(!s.current&&f.current)return a.current=o.current,n(b,t),p?e(o.current):c.current;if(v)return n(b,t),e(o.current)}return s.current||n(b,t),c.current};return x.cancel=function(){s.current&&(h?cancelAnimationFrame(s.current):clearTimeout(s.current)),a.current=0,l.current=o.current=u.current=s.current=null},x.isPending=function(){return!!s.current},x.flush=function(){return s.current?y(Date.now()):c.current},x},[p,v,t,g,m,h])}function c(e,t){return e===t}function d(e){return"function"==typeof e?function(){return e}:e}var f=n(99182),h=n(4941),p=n(41775);function m(e){let{search:t}=e;return(0,r.jsxs)(o.xvT,{color:"verySubtle",className:"flex flex-col gap-2 justify-center items-center mt-5 mb-3",children:[(0,r.jsx)(o.xvT,{color:"verySubtle",className:"flex gap-2 justify-center items-center",children:(0,r.jsx)(p.Qbr,{})}),(0,r.jsx)(o.xvT,{size:"12",color:"verySubtle",className:"flex justify-center",children:t?"No matching directory.":"Select a directory to get started."})]})}function v(){var e;let t=(0,a.On)({config:{swr:{revalidateOnFocus:!1,keepPreviousData:!0}}});return(null===(e=t.data)||void 0===e?void 0:e.OS)==="windows"?"\\":"/"}var g=n(5648),y=n.n(g),b=n(1573),x=n.n(b);function w(e){let{currentPath:t,childPath:n,separator:r}=e;return"\\"===t&&n.endsWith(":")?n+r:E(t,n,r)}function E(e,t,n){e=e===n?e:x()(e,n),t=y()(t,n);let r="";return(r=e.length?t.length&&t!==n?e===n?n+t:e+n+t:e:t).endsWith(":")?r+n:r}function k(){return(0,r.jsxs)(o.xvT,{color:"verySubtle",className:"flex flex-col gap-2 justify-center items-center mt-5 mb-3",children:[(0,r.jsx)(o.xvT,{color:"verySubtle",className:"flex gap-2 justify-center items-center",children:(0,r.jsx)(p.Qbr,{})}),(0,r.jsx)(o.xvT,{size:"12",color:"verySubtle",className:"flex justify-center",children:"Error loading directory."})]})}function j(e){let{path:t,onCreate:n}=e,s=v(),l=(0,a.Kw)(),[u,c]=(0,i.useState)(""),d=(0,i.useCallback)(async()=>{let e=await l.put({payload:{path:w({currentPath:t,childPath:u,separator:s})}});e.error?(0,o.OHV)("Error creating directory: ".concat(e.error)):(n(u),c(""))},[l,u,n,t,s]);return(0,r.jsxs)("div",{className:"flex items-center gap-2 overflow-hidden w-full",children:[(0,r.jsx)(o.xvT,{color:"verySubtle",className:"group-data-[selected=true]:text-gray-1000 dark:group-data-[selected=true]:text-graydark-1000",children:(0,r.jsx)(p.L37,{})}),(0,r.jsx)("div",{className:"flex-1",children:(0,r.jsx)(o.nvn,{focus:"none",variant:"ghost",placeholder:"type new directory name",className:"!pl-0 font-normal h-5",value:u,onChange:e=>{c(e.currentTarget.value)},onKeyUp:e=>{e.stopPropagation(),"Enter"===e.key&&d()},size:"small"})})]})}function _(e){let{path:t,setPath:n,commandPage:i,currentPage:a,beforeSelect:s,afterSelect:l}=e,u=v();return(0,r.jsx)(h.WD,{commandPage:i,currentPage:a,onSelect:()=>{t&&(s&&s(),n(function(e,t){if(e.endsWith(":\\"))return t;let n="".concat(e.split(t).slice(0,-1).join(t));return""===n?t:n.endsWith(":")?n+t:n}(t,u)),l&&l())},value:"..",children:(0,r.jsxs)("div",{className:"flex items-center gap-2 overflow-hidden",children:[(0,r.jsx)(o.xvT,{color:"verySubtle",className:"group-data-[selected=true]:text-gray-1000 dark:group-data-[selected=true]:text-graydark-1000",children:(0,r.jsx)(p.ROc,{size:16})}),(0,r.jsx)(o.xvT,{ellipsis:!0,children:".."})]})},"..")}let S={namespace:"volumes/directorySelect",label:"Directory select"};function O(e){var t,n,i,a,s,l,u;let{path:c,dir:d,setPath:g,currentPage:y,beforeSelect:b,afterSelect:x}=e,E=v(),O=(null===(t=d.data)||void 0===t?void 0:t.path)===E,C=(null===(n=d.data)||void 0===n?void 0:n.path)==="\\";return(0,r.jsxs)(h.fu,{currentPage:y,commandPage:S,children:[d.isValidating||!d.data||d.error?null:O?null:(0,r.jsx)(_,{path:d.data.path,setPath:g,currentPage:y,commandPage:S,afterSelect:x,beforeSelect:b}),(0,r.jsxs)(f.mY.Empty,{children:[!d.isValidating&&d.error?(0,r.jsx)(k,{}):null,d.isValidating||d.error||(null===(a=d.data)||void 0===a?void 0:null===(i=a.directories)||void 0===i?void 0:i.length)?null:(0,r.jsx)(m,{search:c})]}),!d.isValidating&&!d.error&&(null===(l=d.data)||void 0===l?void 0:null===(s=l.directories)||void 0===s?void 0:s.length)?d.data.directories.map(e=>(0,r.jsx)(h.WD,{commandPage:S,currentPage:y,onSelect:()=>{b&&b();let t=w({currentPath:d.data.path,childPath:e,separator:E});g(t),x&&x()},value:e,children:(0,r.jsxs)("div",{className:"flex items-center gap-2 overflow-hidden",children:[(0,r.jsx)(o.xvT,{color:"verySubtle",className:"group-data-[selected=true]:text-gray-1000 dark:group-data-[selected=true]:text-graydark-1000",children:(0,r.jsx)(p.ROc,{size:16})}),(0,r.jsx)(o.xvT,{ellipsis:!0,children:e})]})},e)):null,!C&&!d.isValidating&&!d.error&&(0,r.jsx)(h.WD,{commandPage:S,currentPage:y,value:"create new directory",children:(0,r.jsx)(j,{path:null===(u=d.data)||void 0===u?void 0:u.path,onCreate:e=>{d.mutate(t=>{var n;return{...t,directories:(null==t?void 0:null===(n=t.directories)||void 0===n?void 0:n.concat(e))||[e]}})}})})]})}function C(e){let{path:t,dir:n,onChange:i}=e;return(0,r.jsx)(f.mY,{label:"Select volume",shouldFilter:!1,children:(0,r.jsx)(o.s_4,{className:"h-[200px] p-1 overflow-hidden",children:(0,r.jsx)(o.xrM,{keyToResetScrollbars:t,children:(0,r.jsx)(f.mY.List,{children:(0,r.jsx)(O,{path:t,dir:n,setPath:i,currentPage:S})})})})})}var M=n(82851);function A(e){let{label:t,newSizeGB:n,currentSizeGB:i=0,maxSizeGB:a=0}=e,l=in,c=n>a;return(0,r.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,r.jsxs)("div",{className:"relative w-full h-1 rounded-lg bg-gray-300 dark:bg-graydark-300 overflow-hidden",children:[(0,r.jsx)("div",{className:(0,M.cx)("absolute h-1 rounded-tl-lg rounded-bl-lg",void 0!==n&&u?"bg-red-500 dark:bg-red-500":"bg-gray-700 dark:bg-graydark-800",l?"z-10":"z-0"),style:{width:a?"".concat(i/a*100,"%"):"0%"}}),(0,r.jsx)("div",{className:(0,M.cx)("absolute h-1 rounded-tl-lg rounded-bl-lg",c?"bg-amber-500 dark:bg-amber-500":void 0!==n&&l?"bg-green-500 dark:bg-green-500":"bg-gray-700 dark:bg-graydark-800",u?"z-10":"z-0"),style:{width:a?"".concat(n/a*100,"%"):"0%"}})]}),(0,r.jsxs)("div",{className:"h-4 flex justify-between",children:[t||(0,r.jsx)("div",{}),void 0!==n&&a?(0,r.jsx)(o.xvT,{size:"12",color:"subtle",children:"".concat((n/a*100).toFixed(0),"% of ").concat((0,s.vW)((0,o.Hzd)(a))," available")}):null]})]})}let P={size:void 0,name:"",path:"~",immediatePath:"~"};function T(e){var t;let{trigger:n,open:c,onOpenChange:d}=e,{closeDialog:f}=ep(),h=(0,a.HU)(),p=v(),m=(0,l.cI)({mode:"all",defaultValues:P}),g=m.watch("path"),y=m.watch("immediatePath"),b=m.watch("name"),x=m.watch("size"),w=u(()=>{g!==y&&m.setValue("path",y)},500);(0,i.useEffect)(()=>{w()},[y]),(0,i.useEffect)(()=>{g!==y&&m.setValue("immediatePath",g)},[g]);let k=(0,i.useCallback)(async e=>{let t=await h.post({payload:{localPath:E(g,b,p),maxSectors:(0,o.WN2)(e.size).toNumber()}});t.error?(0,o.OHV)(t.error):((0,o.OPV)("New volume created."),m.reset(P),f())},[m,h,f,b,g,p]),j=(0,a.cM)({disabled:!c,params:{path:""===g?p:g},config:{swr:{shouldRetryOnError:!1}}});(0,i.useEffect)(()=>{j.error&&m.setError("immediatePath",{message:"Directory does not exist"})},[j.error]),(0,i.useEffect)(()=>{j.data&&j.data.path!==g&&m.setValue("path",j.data.path)},[j.data]);let _=(null==x?void 0:x.toNumber())||0,S=j.data?(0,o.Uzc)(j.data.freeBytes).toNumber():0,O=(0,o.Uzc)((null===(t=j.data)||void 0===t?void 0:t.freeBytes)||0).toNumber(),M=(0,i.useMemo)(()=>({name:{type:"text",title:"Name",placeholder:"data.dat",validation:{required:"required"}},immediatePath:{type:"text",title:"Location",placeholder:"Enter a directory or select one below",validation:{required:"required",validate:{}}},path:{type:"text",title:"Location",validation:{required:"required",validate:{req:e=>"\\"!==e||"directory within a drive required"}}},size:{type:"number",title:"Size",decimalsLimit:0,units:"GB",placeholder:"1,000",validation:{required:"required",validate:{between:e=>{let t="Must be between ".concat((0,s.vW)((0,o.Hzd)(10))," and ").concat((0,s.vW)((0,o.Hzd)(O),{fixed:3}));return e<=O&&e>=10||t},nospace:()=>O>10||"not enough space in directory"}}}}),[O]),T=(0,o.WsO)(M);return m.register("path",M.path.validation),(0,r.jsx)(o.VqE,{title:"Create Volume",trigger:n,open:c,onOpenChange:e=>{e||m.reset(P),d(e)},contentVariants:{className:"w-[400px]"},onSubmit:m.handleSubmit(k,T),controls:(0,r.jsx)("div",{className:"flex flex-col gap-1",children:(0,r.jsx)(o.ZqQ,{form:m,children:"Create"})}),children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsx)(o.nvN,{size:"14",children:"Create a new volume. Select a system directory and specific the size of the volume."}),(0,r.jsx)(o.yEL,{name:"name",form:m,fields:M}),(0,r.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,r.jsx)("div",{className:"flex flex-col gap-1",children:(0,r.jsx)(o.yEL,{name:"immediatePath",form:m,fields:M})}),(0,r.jsx)(C,{path:g,dir:j,onChange:e=>m.setValue("path",e,{shouldDirty:!0,shouldTouch:!0,shouldValidate:!0})})]}),(0,r.jsx)(o.jIp,{name:"size",form:m,fields:M}),(0,r.jsx)(A,{newSizeGB:_,currentSizeGB:0,maxSizeGB:S})]})})}let N={size:void 0};function R(e){var t,n;let{trigger:u,open:c,onOpenChange:d}=e,{id:f,closeDialog:h}=ep(),p=v(),m=(0,a.ST)({disabled:!f,params:{id:f}}),g=(0,a.cM)({disabled:!c||!m.data,params:{path:null===(t=m.data)||void 0===t?void 0:t.localPath.split(p).slice(0,-1).join(p)}}),y=(0,a.G)(),b=(0,l.cI)({mode:"all",defaultValues:N}),x=b.watch("size"),w=(0,i.useCallback)(async e=>{let t=await y.put({params:{id:Number(f)},payload:{maxSectors:(0,o.WN2)(e.size).toNumber()}});t.error?(0,o.OHV)(t.error):((0,o.OPV)("Volume resizing initiated."),b.reset(N),h())},[b,f,y,h]);(0,i.useEffect)(()=>{m.data&&b.reset(N)},[m.data]);let E=null==x?void 0:x.toNumber(),k=m.data?(0,o.bjP)(m.data.totalSectors).toNumber():0,j=g.data?(0,o.Uzc)(g.data.totalBytes).toNumber():0,_=k=1,O=(0,i.useMemo)(()=>({size:{type:"number",title:"New size",decimalsLimit:0,units:"GB",placeholder:"1,000",validation:{required:"required",validate:{between:e=>{let t="Must be between ".concat((0,s.vW)((0,o.Hzd)(10))," and ").concat((0,s.vW)((0,o.Hzd)(j),{fixed:3}));return e<=j&&e>=10||t}}}}}),[j]),C=(0,o.WsO)(O);return(0,r.jsx)(o.VqE,{title:"Resize Volume",trigger:u,open:c,onOpenChange:e=>{e||b.reset(N),d(e)},contentVariants:{className:"max-w-[400px]"},onSubmit:b.handleSubmit(w,C),controls:(0,r.jsx)("div",{className:"flex flex-col gap-1",children:(0,r.jsx)(o.ZqQ,{form:b,children:"Resize"})}),children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsxs)(o.nvN,{size:"14",children:["Grow or shrink the volume. When growing a volume, make sure to check that there is enough space on-disk. When shrinking a volume, any data that needs to be moved will be placed into other volumes, meaning that no data will be lost. If ",(0,r.jsx)(o.EKh,{children:"hostd"})," is unable to migrate the data, an error will be returned and the operation will be stopped."]}),(0,r.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,r.jsx)(o.__J,{children:"Volume"}),(0,r.jsx)(o.xvT,{font:"mono",ellipsis:!0,children:null===(n=m.data)||void 0===n?void 0:n.localPath})]}),(0,r.jsx)(o.jIp,{name:"size",form:b,fields:O}),(0,r.jsx)(A,{currentSizeGB:k,newSizeGB:E,maxSizeGB:j,label:S?(0,r.jsx)(o.xvT,{size:"12",color:"subtle",children:_?"Increase by ".concat((0,s.vW)((0,o.Hzd)(E-k))):"Decrease by ".concat((0,s.vW)((0,o.Hzd)(k-E)))}):(0,r.jsx)(o.xvT,{size:"12",color:"subtle",children:"Current size is ".concat((0,s.vW)((0,o.Hzd)(k)))})})]})})}let D={path:"",force:!1};function L(e){var t,n,u;let{trigger:c,open:d,onOpenChange:f}=e,{id:h,closeDialog:p}=ep(),m=(0,a.uq)(),v=(0,a.ST)({disabled:!h,params:{id:h}}),g=(0,o.x9T)(null===(t=v.data)||void 0===t?void 0:t.totalSectors),y=(0,o.x9T)(null===(n=v.data)||void 0===n?void 0:n.usedSectors),b=null===(u=v.data)||void 0===u?void 0:u.localPath,x=(0,l.cI)({mode:"all",defaultValues:D}),w=(0,i.useCallback)(async e=>{var t;let n=await m.delete({params:{id:null===(t=v.data)||void 0===t?void 0:t.ID,force:e.force}});n.error?(0,o.OHV)(n.error):((0,o.OPV)("Volume permanently deleted."),x.reset(),p())},[x,v.data,m,p]),E=(0,i.useMemo)(()=>({path:{type:"text",title:"Path",placeholder:b,validation:{required:"required",validate:{equals:e=>e===b||"directory path does not match"}}},force:{type:"boolean",title:"Force",validation:{}}}),[b]),k=(0,o.WsO)(E);return(0,r.jsx)(o.VqE,{title:"Delete Volume",trigger:c,open:d,onOpenChange:e=>{e||x.reset(D),f(e)},contentVariants:{className:"w-[400px]"},onSubmit:x.handleSubmit(w,k),children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsx)(o.nvN,{size:"14",children:"Are you sure you would like to delete the volume?"}),(0,r.jsxs)(o.nvN,{size:"14",children:[(0,r.jsx)(o.EKh,{children:"hostd"})," will move"," ",(0,r.jsx)(o.xvT,{weight:"semibold",children:(0,s.vW)(y)})," of stored data and will lose ",(0,r.jsx)(o.xvT,{weight:"semibold",children:(0,s.vW)(g)})," ","of storage capacity. It is not recommended to remove or resize volumes when contracts are about to expire."]}),(0,r.jsx)(o.nvN,{size:"14",children:"Enter the volume path to confirm the removal."}),(0,r.jsx)(o.yEL,{name:"path",form:x,fields:E}),(0,r.jsxs)("div",{className:"flex gap-1",children:[(0,r.jsx)(o.QBj,{name:"force",size:"medium",form:x,fields:E}),(0,r.jsx)(o.Yqd,{children:(0,r.jsx)("div",{className:"flex gap-1 max-w-[200px]",children:(0,r.jsx)(o.nvN,{size:"14",children:"Force deleting a volume will remove the volume even if the data can NOT be relocated - this will result in severe data loss and contract failure. Be extremely careful when using this option."})})})]}),(0,r.jsx)(o.ZqQ,{variant:"red",form:x,children:"Delete"})]})})}var F=n(6391),V=n.n(F);function I(){let{dialog:e,openDialog:t,closeDialog:n}=ep(),s=(0,a.Os)(),l=(0,a.cj)(),u=(0,i.useCallback)(async e=>{let{sc:t,address:n}=e,r=await l.post({payload:{address:n,amount:t.toString()}});return r.error?{error:r.error}:{transactionId:r.data}},[l]);return(0,r.jsx)(o.weF,{balance:s.data?new(V())(s.data.spendable):void 0,send:u,open:"sendSiacoin"===e,onOpenChange:r=>r?t(e):n()})}function z(){let{id:e,dialog:t,openDialog:n,closeDialog:s}=ep(),l=(0,a.Qq)({params:{},config:{swr:{revalidateOnFocus:!1,refreshInterval:6e4}},disabled:"transactionDetails"!==t}),u=(0,i.useMemo)(()=>{var t;let n=null===(t=l.data)||void 0===t?void 0:t.find(t=>t.ID===e);return n?{txType:(0,o.leQ)(n.transaction,n.source),inflow:n.inflow,outflow:n.outflow,timestamp:n.timestamp,raw:n.transaction}:null},[l,e]);return(0,r.jsx)(o.mPE,{id:e,transaction:u,open:"transactionDetails"===t,onOpenChange:e=>e?n(t):s()})}var Z=n(734),B=n(2850),H=n(71930),U=n(5632);let W={namespace:"wallet",label:"Wallet"};function q(e){let{currentPage:t,parentPage:n,pushPage:i}=e,{openDialog:s,closeDialog:l}=ep(),u=(0,U.useRouter)(),c=(0,a.On)({config:{swr:{revalidateOnFocus:!1,keepPreviousData:!0}}});return(0,r.jsxs)(h.fu,{currentPage:t,commandPage:W,children:[(0,r.jsx)(h.Ul,{currentPage:t,parentPage:n,commandPage:W,onSelect:()=>{i(W)},children:W.label}),(0,r.jsx)(h.WD,{currentPage:t,commandPage:W,onSelect:()=>{u.push(H._.wallet.view),l()},children:"View wallet transactions"}),(0,r.jsx)(h.WD,{currentPage:t,commandPage:W,onSelect:()=>{s("sendSiacoin")},children:"Send siacoin"}),(0,r.jsx)(h.WD,{currentPage:t,commandPage:W,onSelect:()=>{s("addressDetails")},children:"Receive siacoin"}),(0,r.jsx)(h.WD,{currentPage:t,commandPage:W,onSelect:()=>{s("addressDetails")},children:"View wallet address"}),(0,r.jsx)(h.WD,{currentPage:t,commandPage:W,onSelect:()=>{var e;(0,o.vQq)(null===(e=c.data)||void 0===e?void 0:e.walletAddress,"wallet address"),l()},children:"Copy wallet address to clipboard"})]})}var $=n(38617);let Y={namespace:"settings",label:"Settings"};function G(e){let{currentPage:t,parentPage:n}=e,{openDialog:i,closeDialog:o}=ep(),{setTheme:a}=(0,$.F)(),{settings:s,setSettings:l,lock:u,currencyOptions:c,setCurrency:d}=(0,B.Hv)();return(0,r.jsxs)(h.fu,{currentPage:t,commandPage:Y,children:[(0,r.jsx)(h.Ul,{currentPage:t,parentPage:n,commandPage:Y,onSelect:()=>{i("settings")},children:"Open settings"}),(0,r.jsx)(h.WD,{currentPage:t,commandPage:Y,onSelect:()=>{l({siaCentral:!s.siaCentral}),o()},children:(s.siaCentral?"Disable":"Enable")+" external API - Sia Central exchange rates"}),(0,r.jsx)(h.o4,{currentPage:t,commandPage:Y,onSelect:()=>{u(),o()},children:"Lock hostd"}),(0,r.jsx)(h.WD,{currentPage:t,commandPage:Y,onSelect:()=>{i("settings")},children:"Open interface theme menu"}),(0,r.jsx)(h.WD,{currentPage:t,commandPage:Y,onSelect:()=>{a("system"),o()},children:"Set theme to system preference"}),(0,r.jsx)(h.WD,{currentPage:t,commandPage:Y,onSelect:()=>{a("dark"),o()},children:"Set theme to dark"}),(0,r.jsx)(h.WD,{currentPage:t,commandPage:Y,onSelect:()=>{a("light"),o()},children:"Set theme to light"}),(0,r.jsx)(h.WD,{currentPage:t,commandPage:Y,onSelect:()=>{i("settings")},children:"Open currency settings menu"}),c.map(e=>{let{id:n,label:i}=e;return(0,r.jsx)(h.WD,{currentPage:t,commandPage:Y,onSelect:()=>{d(n),o()},children:"Set currency to ".concat(i)},n)})]})}let K={namespace:"node",label:"Blockchain node"};function X(e){let{currentPage:t,parentPage:n,pushPage:i}=e,{openDialog:o,closeDialog:a}=ep(),s=(0,U.useRouter)();return(0,r.jsxs)(h.fu,{currentPage:t,commandPage:K,children:[(0,r.jsx)(h.Ul,{currentPage:t,parentPage:n,commandPage:K,onSelect:()=>{i(K)},children:K.label}),(0,r.jsx)(h.WD,{currentPage:t,commandPage:K,onSelect:()=>{o("connectPeer")},children:"Connect to a peer"}),(0,r.jsx)(h.WD,{currentPage:t,commandPage:K,onSelect:()=>{s.push(H._.node.index),a()},children:"View peers"})]})}var Q=n(99957);let J={namespace:"configuration",label:"Configuration"};function ee(e){let{currentPage:t,parentPage:n,pushPage:i}=e,o=(0,U.useRouter)(),{showAdvanced:a}=(0,Q.ZR)(),{closeDialog:s}=ep();return(0,r.jsxs)(h.fu,{currentPage:t,commandPage:J,children:[(0,r.jsx)(h.Ul,{currentPage:t,parentPage:n,commandPage:J,onSelect:()=>{i(J)},children:J.label}),(0,r.jsx)(h.WD,{currentPage:t,commandPage:J,onSelect:()=>{o.push(H._.config.index),s()},children:"Open configuration"}),(0,r.jsx)(h.WD,{currentPage:t,commandPage:J,onSelect:()=>{o.push(H._.config.host),s()},children:"Configure host"}),(0,r.jsx)(h.WD,{currentPage:t,commandPage:J,onSelect:()=>{o.push(H._.config.pricing),s()},children:"Configure pricing"}),(0,r.jsx)(h.WD,{currentPage:t,commandPage:J,onSelect:()=>{o.push(H._.config.dns),s()},children:"Configure DNS"}),(0,r.jsx)(h.WD,{currentPage:t,commandPage:J,onSelect:()=>{o.push(H._.config.bandwidth),s()},children:"Configure bandwidth"}),a&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(h.WD,{currentPage:t,commandPage:J,onSelect:()=>{o.push(H._.config.registry),s()},children:"Configure registry"}),(0,r.jsx)(h.WD,{currentPage:t,commandPage:J,onSelect:()=>{o.push(H._.config.accounts),s()},children:"Configure accounts"})]})]})}var et=n(92838);function en(e){let{search:t}=e;return(0,r.jsxs)(o.xvT,{color:"verySubtle",className:"flex flex-col gap-2 justify-center items-center mt-5 mb-3",children:[(0,r.jsx)(o.xvT,{color:"verySubtle",className:"flex gap-2 justify-center items-center",children:(0,r.jsx)(p.owP,{})}),(0,r.jsx)(o.xvT,{size:"12",color:"verySubtle",className:"flex justify-center",children:t?"No results matching query.":"Type a query to get started."})]})}var er=n(3639);let ei={namespace:"contracts",label:"Contracts"};function eo(e){let{currentPage:t,parentPage:n,pushPage:i,beforeSelect:o,afterSelect:a}=e,s=(0,U.useRouter)(),{closeDialog:l}=ep();return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(h.Ul,{currentPage:t,parentPage:n,commandPage:n,onSelect:()=>{i(ei)},children:ei.label}),(0,r.jsx)(h.fu,{currentPage:t,commandPage:ei,children:(0,r.jsx)(h.WD,{currentPage:t,commandPage:ei,onSelect:()=>{s.push(H._.contracts.index),l()},children:"View contracts"})}),(0,r.jsx)(er.F,{parentPage:ei,currentPage:t,beforeSelect:o,afterSelect:a,pushPage:i})]})}let ea={namespace:"volumes",label:"Volumes"};function es(e){let{currentPage:t,parentPage:n,pushPage:i}=e,o=(0,U.useRouter)(),{openDialog:a,closeDialog:s}=ep();return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(h.Ul,{currentPage:t,parentPage:n,commandPage:n,onSelect:()=>{i(ea)},children:ea.label}),(0,r.jsxs)(h.fu,{currentPage:t,commandPage:ea,children:[(0,r.jsx)(h.WD,{currentPage:t,commandPage:ea,onSelect:()=>{o.push(H._.volumes.index),s()},children:"View volumes"}),(0,r.jsx)(h.WD,{currentPage:t,commandPage:ea,onSelect:()=>{a("volumeCreate")},children:"Create volume"})]})]})}function el(e){var t,n,a,s,l,h,p,m,v;let{panel:g}=e,y=(0,U.useRouter)(),{resetFilters:b}=(0,et.G)(),{closeDialog:x}=ep(),[w,E]=(0,i.useState)(""),[k]=(s=t&&t.equalityFn||c,h=(a=(n=(0,i.useState)(d(w)))[1],l=[n[0],(0,i.useCallback)(function(e){return a(d(e))},[])])[0],p=l[1],m=u((0,i.useCallback)(function(e){return p(e)},[p]),500,t),s((v=(0,i.useRef)(w)).current,w)||(m(w),v.current=w),[h,m]),[j,_]=(0,i.useState)([]),S=j[j.length-1],O=0===j.length,C=(0,i.useCallback)(e=>{_(t=>[...t,e])},[_]),A=(0,i.useCallback)(()=>{x()},[x]),P=(0,i.useCallback)(()=>{E("")},[E]),T=(null==S?void 0:S.empty)||en;return(0,r.jsxs)(f.mY,{label:"Command Menu",loop:!0,className:(0,M.cx)(g&&(0,o.z$)()),onKeyDown:e=>{(j.length>0&&"Escape"===e.key||"Backspace"===e.key&&!w)&&(e.preventDefault(),_(e=>e.slice(0,-1)))},children:[S&&(0,r.jsx)(o.__J,{className:"px-2",children:S.label}),(0,r.jsx)(f.mY.Input,{value:w,onValueChange:E,className:(0,o.cEb)({variant:"ghost",focus:"none"}),placeholder:(null==S?void 0:S.prompt)||(O?"Search for commands, eg: theme, redundancy":"Search commands")}),(0,r.jsx)(o.Z0O,{className:"my-2"}),(0,r.jsxs)(f.mY.List,{children:[(0,r.jsx)(f.mY.Empty,{children:(0,r.jsx)(T,{search:w,debouncedSearch:k})}),(0,r.jsx)(G,{currentPage:S,pushPage:C}),(0,r.jsx)(q,{currentPage:S,pushPage:C}),(0,r.jsx)(es,{currentPage:S,pushPage:C}),(0,r.jsx)(eo,{currentPage:S,pushPage:C,beforeSelect:()=>{A(),b()},afterSelect:()=>{y.pathname.startsWith(H._.contracts.index)||y.push(H._.contracts.index),P()}}),(0,r.jsx)(ee,{currentPage:S,pushPage:C}),(0,r.jsx)(X,{currentPage:S,pushPage:C})]})]})}function eu(e){let{open:t,onOpenChange:n,setOpen:a}=e,{isUnlocked:s}=(0,B.Hv)(),{isConnected:l}=(0,o.Y97)({route:H.h});return(0,i.useEffect)(()=>{if(!s||!l)return;let e=e=>{"k"===e.key&&e.metaKey&&a()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[s,l,a]),(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(o.VqE,{open:t,onOpenChange:n,contentVariants:{className:"!absolute !p-1 w-[450px] top-[200px]"},bodyClassName:"!px-1 !py-1",closeClassName:"hidden",children:(0,r.jsx)(el,{})})})}function ec(e){let{open:t,onOpenChange:n}=e,s=(0,a.Z7)(),l=(0,a.Uy)(),u=(0,i.useCallback)(async e=>{let t=await l.post({payload:[e]});t.error?(0,o.OHV)("Error dismissing alert."):(0,o.OPV)("Alert has been dismissed.")},[l]),c=(0,i.useCallback)(async(e,t)=>{if(!s.data)return;let n=await l.post({payload:e});n.error?(0,o.OHV)(t?"Error dismissing all ".concat(t," alerts."):"Error dismissing all alerts."):(0,o.OPV)(t?"All ".concat(t," alerts have been dismissed."):"All alerts have been dismissed.")},[l,s]);return(0,r.jsx)(o.hcY,{open:t,onOpenChange:e=>{n(e)},alerts:s,dataFieldOrder:ed,dataFields:ef,dismissMany:c,dismissOne:u})}let ed=["error","contractID","blockHeight","resolution","volume","volumeID","elapsed","error","checked","missing","corrupt","total","oldSectors","currentSectors","targetSectors","migratedSectors","migrated","target","force"],ef={error:{render:e=>{let{value:t}=e;return(0,r.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,r.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"error"}),(0,r.jsx)(o.xvT,{color:"contrast",children:t})]})}},contractId:{render:e=>{let{value:t}=e;return(0,r.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,r.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"contract ID"}),(0,r.jsx)(o.XxW,{value:String(t)})]})}},blockHeight:{render:e=>{let{value:t}=e;return(0,r.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,r.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"block height"}),(0,r.jsx)(o.XxW,{value:String(t),type:"block"})]})}},resolution:{render:e=>{let{value:t}=e;return(0,r.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,r.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"resolution"}),(0,r.jsx)(o.XxW,{value:String(t)})]})}},volume:{render:e=>{let{value:t}=e;return(0,r.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,r.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"volume"}),(0,r.jsx)(o.XxW,{value:String(t)})]})}},volumeID:{render:e=>{let{value:t}=e;return(0,r.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,r.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"volume ID"}),(0,r.jsx)(o.XxW,{value:String(t)})]})}},elapsed:{render:e=>{let{value:t}=e;return(0,r.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,r.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"elapsed"}),(0,r.jsx)(o.xvT,{color:"contrast",ellipsis:!0,children:(0,s.bc)(Number(t))})]})}},checked:{render:e=>{let{value:t}=e;return(0,r.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,r.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"checked"}),(0,r.jsx)(o.xvT,{color:"contrast",ellipsis:!0,children:t.toLocaleString()})]})}},missing:{render:e=>{let{value:t}=e;return(0,r.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,r.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"missing"}),(0,r.jsx)(o.xvT,{color:"contrast",ellipsis:!0,children:t.toLocaleString()})]})}},corrupt:{render:e=>{let{value:t}=e;return(0,r.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,r.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"corrupt"}),(0,r.jsx)(o.xvT,{color:"contrast",ellipsis:!0,children:t.toLocaleString()})]})}},total:{render:e=>{let{value:t}=e;return(0,r.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,r.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"total"}),(0,r.jsx)(o.xvT,{color:"contrast",ellipsis:!0,children:t.toLocaleString()})]})}},oldSectors:{render:e=>{let{value:t}=e;return(0,r.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,r.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"old sectors"}),(0,r.jsx)(o.xvT,{color:"contrast",ellipsis:!0,children:t.toLocaleString()})]})}},currentSectors:{render:e=>{let{value:t}=e;return(0,r.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,r.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"current sectors"}),(0,r.jsx)(o.xvT,{color:"contrast",ellipsis:!0,children:t.toLocaleString()})]})}},targetSectors:{render:e=>{let{value:t}=e;return(0,r.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,r.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"target sectors"}),(0,r.jsx)(o.xvT,{color:"contrast",ellipsis:!0,children:t.toLocaleString()})]})}},migratedSectors:{render:e=>{let{value:t}=e;return(0,r.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,r.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"migrated sectors"}),(0,r.jsx)(o.xvT,{color:"contrast",ellipsis:!0,children:t.toLocaleString()})]})}},migrated:{render:e=>{let{value:t}=e;return(0,r.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,r.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"migrated"}),(0,r.jsx)(o.xvT,{color:"contrast",ellipsis:!0,children:t.toLocaleString()})]})}},target:{render:e=>{let{value:t}=e;return(0,r.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,r.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"target"}),(0,r.jsx)(o.xvT,{color:"contrast",ellipsis:!0,children:t.toLocaleString()})]})}},force:{render:e=>{let{value:t}=e;return(0,r.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,r.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"force"}),(0,r.jsx)(o.xvT,{color:"contrast",ellipsis:!0,children:t?"true":"false"})]})}}},eh=(0,i.createContext)({}),ep=()=>(0,i.useContext)(eh);function em(e){let{children:t}=e,n=function(){let[e,t]=(0,i.useState)(),[n,r]=(0,i.useState)(),o=(0,i.useCallback)((e,n)=>{t(e),r(n)},[t,r]),[a,s]=(0,i.useState)(),l=(0,i.useCallback)(e=>{t("confirm"),s(e)},[t,s]),u=(0,i.useCallback)(()=>{t(void 0),r(void 0),s(void 0)},[t,r,s]),c=(0,i.useCallback)(e=>{e||u()},[u]);return{dialog:e,id:n,openDialog:o,confirm:a,openConfirmDialog:l,closeDialog:u,onOpenChange:c}}();return(0,r.jsx)(eh.Provider,{value:n,children:t})}function ev(){var e;let{dialog:t,openDialog:n,openConfirmDialog:i,onOpenChange:s,closeDialog:l,confirm:u}=ep(),c=(0,a.Wl)(),d=(0,a.Os)();return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(eu,{open:"cmdk"===t,onOpenChange:s,setOpen:()=>n("cmdk")}),(0,r.jsx)(o.DLL,{open:"settings"===t,onOpenChange:s}),(0,r.jsx)(ec,{open:"alerts"===t,onOpenChange:s}),(0,r.jsx)(I,{}),(0,r.jsx)(o.YNn,{open:"addressDetails"===t,address:null===(e=d.data)||void 0===e?void 0:e.address,isValidating:d.isValidating,onOpenChange:e=>e?n(t):l()}),(0,r.jsx)(z,{}),(0,r.jsx)(o.D_D,{connect:e=>c.put({payload:{address:e}}),open:"connectPeer"===t,onOpenChange:e=>e?n(t):l()}),(0,r.jsx)(T,{open:"volumeCreate"===t,onOpenChange:e=>e?n(t):l()}),(0,r.jsx)(R,{open:"volumeResize"===t,onOpenChange:e=>e?n(t):l()}),(0,r.jsx)(L,{open:"volumeDelete"===t,onOpenChange:e=>e?n(t):l()}),(0,r.jsx)(Z.Y,{open:"contractsFilterContractId"===t,onOpenChange:e=>e?n(t):l()}),(0,r.jsx)(o.QHy,{open:"confirm"===t,params:u,onOpenChange:e=>e?i(u):l()})]})}},5187:function(e,t,n){"use strict";n.d(t,{C:function(){return E},B:function(){return w}});var r=n(52322),i=n(2784),o=n(52735),a=n(96206);let s={successful:{color:o.O9T.green[600]},active:{color:o.O9T.amber[600]},pending:{color:o.O9T.amber[600],pattern:!0},rejected:{color:o.O9T.red[600]},failed:{color:o.O9T.red[600]},storage:{label:"storage",color:o.O9T.emerald[600]},storagePhysical:{color:o.O9T.indigo[600]},ingress:{label:"ingress",color:o.O9T.pink[600]},egress:{label:"egress",color:o.O9T.blue[600]},registry:{label:"registry",color:o.O9T.purple[600]},storageWrites:{label:"storage write",color:o.O9T.pink[600]},storageReads:{label:"storage read",color:o.O9T.blue[600]},registryReads:{label:"registry reads",color:o.O9T.green[600]},registryWrites:{label:"registry writes",color:o.O9T.yellow[600]},rpc:{label:"RPC",color:o.O9T.slate[500]},capacityStorage:{label:"capacity",color:o.O9T.neutral[500]},capacityRegistry:{label:"capacity",color:o.O9T.neutral[500]},contract:{color:o.O9T.red[800]},collateral:{color:o.O9T.amber[600]},sectorsTemp:{label:"temp sectors",color:o.O9T.amber[600]},sectorsContract:{label:"contract sectors",color:o.O9T.green[600]},sectorAccess:{label:"sector access",color:o.O9T.blue[600]},sc:{color:o.O9T.green[600]},sf:{color:o.O9T.amber[600]},locked:{color:o.O9T.purple[600]},risked:{color:o.O9T.amber[600]},burnt:{color:o.O9T.red[600]}};var l=n(27444);function u(e,t,n){return{...e,category:t,pattern:n}}function c(e,t,n){return{...e,category:t,label:n}}var d=n(6391),f=n.n(d),h=n(14817),p=n(66700);function m(e,t){for(var n=Math.abs(e).toString();n.length"7"===e.value),x=(0,i.createContext)({}),w=()=>(0,i.useContext)(x);function E(e){let{children:t}=e,n=function(){let[e,t]=(0,y.Z)("v0/metrics/dataTimeSpan",{defaultValue:b.value}),[n,r]=(0,y.Z)("v0/metrics/dataInterval",{defaultValue:b.interval}),d=function(e){let[t,n]=(0,i.useState)(new Date().getTime());return(0,i.useEffect)(()=>{n(new Date().getTime());let t=setInterval(()=>{n(new Date().getTime()),console.log("reset time range")},(0,h.uQ)(e));return()=>clearInterval(t)},[e]),t}(n),x=(0,i.useMemo)(()=>(0,o.OQF)(e,d),[e,d]),w=(0,i.useCallback)(e=>{let n=h.lv.find(t=>t.value===e);r(n.interval),t(n.value)},[t,r]),E=(0,i.useMemo)(()=>(0,o.kOJ)(n),[n]),k=(0,l.KU)({params:{interval:n,start:function(e,t){(0,v.Z)(1,arguments);var n=(0,p.Z)(e);if(isNaN(n.getTime()))throw RangeError("Invalid time value");var r=null!=t&&t.format?String(t.format):"extended",i=null!=t&&t.representation?String(t.representation):"complete";if("extended"!==r&&"basic"!==r)throw RangeError("format must be 'extended' or 'basic'");if("date"!==i&&"time"!==i&&"complete"!==i)throw RangeError("representation must be 'date', 'time', or 'complete'");var o="",a="",s="extended"===r?"-":"";if("time"!==i){var l=m(n.getDate(),2),u=m(n.getMonth()+1,2),c=m(n.getFullYear(),4);o="".concat(c).concat(s).concat(u).concat(s).concat(l)}if("date"!==i){var d=n.getTimezoneOffset();if(0!==d){var f=Math.abs(d),h=m(Math.floor(f/60),2),g=m(f%60,2);a="".concat(d<0?"+":"-").concat(h,":").concat(g)}else a="Z";var y=m(n.getHours(),2),b=m(n.getMinutes(),2),x=m(n.getSeconds(),2),w=""===o?"":"T",E=[y,b,x].join("extended"===r?":":"");o="".concat(o).concat(w).concat(E).concat(a)}return o}(new Date(x.start-(0,h.uQ)(n)))},config:{swr:{revalidateOnFocus:!1,refreshInterval:(0,o.sWj)(5)}}}),j=(0,i.useMemo)(()=>{var e;let t=(0,o.Y_Z)(null===(e=k.data)||void 0===e?void 0:e.map(e=>({storagePotential:Number(e.revenue.potential.storage),ingressPotential:Number(e.revenue.potential.ingress),egressPotential:Number(e.revenue.potential.egress),registryReadPotential:Number(e.revenue.potential.registryRead),registryWritePotential:Number(e.revenue.potential.registryWrite),rpcPotential:Number(e.revenue.potential.rpc),storage:Number(e.revenue.earned.storage),ingress:Number(e.revenue.earned.ingress),egress:Number(e.revenue.earned.egress),registryRead:Number(e.revenue.earned.registryRead),registryWrite:Number(e.revenue.earned.registryWrite),rpc:Number(e.revenue.earned.rpc),potential:new(f())(e.revenue.potential.storage).plus(e.revenue.potential.ingress).plus(e.revenue.potential.egress).plus(e.revenue.potential.registryRead).plus(e.revenue.potential.registryWrite).plus(e.revenue.potential.rpc).toNumber(),earned:new(f())(e.revenue.earned.storage).plus(e.revenue.earned.ingress).plus(e.revenue.earned.egress).plus(e.revenue.earned.registryRead).plus(e.revenue.earned.registryWrite).plus(e.revenue.earned.rpc).toNumber(),timestamp:new Date(e.timestamp).getTime()})),"delta"),n=(0,o.fVJ)(t);return{data:t,stats:n,config:{enabledGraph:["storage","storagePotential","ingress","ingressPotential","egress","egressPotential","registryRead","registryReadPotential","registryWrite","registryWritePotential","rpc","rpcPotential"],enabledTip:["potential","earned","storage","storagePotential","ingress","ingressPotential","egress","egressPotential","registryRead","registryReadPotential","registryWrite","registryWritePotential","rpc","rpcPotential"],categories:["earned","potential"],data:{storagePotential:u(s.storage,"potential",!0),ingressPotential:u(s.ingress,"potential",!0),egressPotential:u(s.egress,"potential",!0),registryReadPotential:u(s.registryReads,"potential",!0),registryWritePotential:u(s.registryWrites,"potential",!0),rpcPotential:u(s.rpc,"potential",!0),storage:u(s.storage,"earned"),ingress:u(s.ingress,"earned"),egress:u(s.egress,"earned"),registryRead:u(s.registryReads,"earned"),registryWrite:u(s.registryWrites,"earned"),rpc:u(s.rpc,"earned"),earned:c({},"earned","total"),potential:c({},"potential","total")},format:e=>(0,a.Vz)(e),formatTimestamp:E,disableAnimations:!0},chartType:"line",isLoading:k.isValidating}},[k,E]),_=(0,i.useMemo)(()=>{var e;let t=(0,o.Y_Z)(null===(e=k.data)||void 0===e?void 0:e.map(e=>({locked:Number(e.contracts.lockedCollateral),risked:Number(e.contracts.riskedCollateral),timestamp:new Date(e.timestamp).getTime()})),"none"),n=(0,o.fVJ)(t);return{data:t,stats:n,config:{enabledGraph:["locked","risked"],enabledTip:["locked","risked"],data:{locked:s.locked,risked:s.risked},format:e=>(0,a.Vz)(e),formatTimestamp:E,disableAnimations:!0},chartType:"area",isLoading:k.isValidating}},[k,E]),S=(0,i.useMemo)(()=>{var e;let t=(0,o.Y_Z)(null===(e=k.data)||void 0===e?void 0:e.map(e=>({baseRPC:(0,g.sS)(e.pricing.baseRPCPrice).toNumber(),collateral:(0,g.c5)(new(f())(e.pricing.storagePrice).times(e.pricing.collateralMultiplier)).toNumber(),contract:Number(e.pricing.contractPrice),egress:(0,g.B1)(e.pricing.egressPrice).toNumber(),ingress:(0,g.dK)(e.pricing.ingressPrice).toNumber(),sectorAccess:(0,g.nS)(e.pricing.sectorAccessPrice).toNumber(),storage:(0,g.SY)(e.pricing.storagePrice).toNumber(),timestamp:new Date(e.timestamp).getTime()})),"none"),n=(0,o.fVJ)(t);return{data:t,stats:n,config:{enabledGraph:["storage","ingress","egress","collateral","contract","sectorAccess","baseRPC"],enabledTip:["storage","ingress","egress","collateral","contract","sectorAccess","baseRPC"],data:{baseRPC:s.rpc,sectorAccess:s.sectorAccess,contract:s.contract,collateral:s.collateral,egress:s.egress,ingress:s.ingress,storage:s.storage},format:e=>(0,a.Vz)(e),formatTimestamp:E,disableAnimations:!0},chartType:"line",isLoading:k.isValidating}},[k,E]),O=(0,i.useMemo)(()=>{var e;let t=(0,o.Y_Z)(null===(e=k.data)||void 0===e?void 0:e.map(e=>({active:e.contracts.active,failed:e.contracts.failed,pending:e.contracts.pending,rejected:e.contracts.rejected,successful:e.contracts.successful,timestamp:new Date(e.timestamp).getTime()})),"none"),n=(0,o.fVJ)(t);return{data:t,stats:n,config:{enabledGraph:["successful","active","pending","rejected","failed"],enabledTip:["successful","active","pending","rejected","failed"],data:{active:s.active,failed:s.failed,pending:s.pending,rejected:s.rejected,successful:s.successful},format:e=>"".concat(e," contracts"),formatTimestamp:E,disableAnimations:!0},chartType:"areastack",isLoading:k.isValidating}},[k,E]),C=(0,i.useMemo)(()=>{var e;let t=(0,o.Y_Z)(null===(e=k.data)||void 0===e?void 0:e.map(e=>({maxSectors:(0,o.B$N)(e.storage.totalSectors).times(4).toNumber(),registryEntries:113*e.registry.entries,maxRegistryEntries:113*e.registry.maxEntries,tempSectors:(0,o.B$N)(e.storage.tempSectors).times(4).toNumber(),physicalSectors:(0,o.B$N)(e.storage.physicalSectors).times(4).toNumber(),contractSectors:(0,o.B$N)(e.storage.contractSectors).times(4).toNumber(),timestamp:new Date(e.timestamp).getTime()})),"none"),n=(0,o.fVJ)(t);return{data:t,stats:n,config:{enabledGraph:["contractSectors","physicalSectors","tempSectors","registryEntries","maxSectors","maxRegistryEntries"],enabledTip:["contractSectors","physicalSectors","tempSectors","registryEntries","maxSectors","maxRegistryEntries"],categories:["storage used","storage capacity"],data:{maxSectors:c(s.capacityStorage,"storage capacity","sectors"),maxRegistryEntries:c(s.capacityRegistry,"storage capacity","registry"),physicalSectors:c(s.storagePhysical,"storage used","sectors physical"),registryEntries:c(s.registry,"storage used","registry (max)"),tempSectors:c(s.sectorsTemp,"storage used","sectors temp"),contractSectors:c(s.storage,"storage used","sectors contract")},format:e=>(0,a.vW)(e),formatTimestamp:E,disableAnimations:!0},chartType:"line",isLoading:k.isValidating}},[k,E]),M=(0,i.useMemo)(()=>{var e;let t=(0,o.Y_Z)(null===(e=k.data)||void 0===e?void 0:e.map(e=>({storageReads:e.storage.reads,storageWrites:e.storage.writes,registryReads:e.registry.reads,registryWrites:e.registry.writes,timestamp:new Date(e.timestamp).getTime()})),"delta"),n=(0,o.fVJ)(t);return{data:t,stats:n,config:{enabledGraph:["storageReads","storageWrites","registryReads","registryWrites"],enabledTip:["storageReads","storageWrites","registryReads","registryWrites"],data:{registryReads:s.registryReads,registryWrites:s.registryWrites,storageReads:s.storageReads,storageWrites:s.storageWrites},format:e=>(0,a.yF)(e),formatTimestamp:E,disableAnimations:!0},chartType:"line",isLoading:k.isValidating}},[k,E]),A=(0,i.useMemo)(()=>{var e;let t=(0,o.Y_Z)(null===(e=k.data)||void 0===e?void 0:e.map(e=>({egress:e.data.rhp3.egress+e.data.rhp2.egress,ingress:e.data.rhp3.ingress+e.data.rhp2.ingress,timestamp:new Date(e.timestamp).getTime()})),"delta"),n=(0,o.fVJ)(t);return{data:t,stats:n,config:{enabledGraph:["ingress","egress"],enabledTip:["ingress","egress"],data:{ingress:s.ingress,egress:s.egress},format:e=>(0,a.vW)(e),formatTimestamp:E,disableAnimations:!0},chartType:"line",isLoading:k.isValidating}},[k,E]);return{dataTimeSpan:e,setDataTimeSpan:w,timeRange:x,dataInterval:n,setDataInterval:r,operations:M,revenue:j,collateral:_,contracts:O,storage:C,pricing:S,bandwidth:A}}();return(0,r.jsx)(x.Provider,{value:n,children:t})}},14817:function(e,t,n){"use strict";n.d(t,{lv:function(){return i},uQ:function(){return o}});var r=n(52735);let i=[{label:"1D",interval:"5m",value:"1"},{label:"7D",interval:"15m",value:"7"},{label:"1M",interval:"hourly",value:"30"},{label:"3M",interval:"daily",value:"90"},{label:"1Y",interval:"daily",value:"365"},{label:"ALL",interval:"weekly",value:"all"}];function o(e){return"5m"===e?(0,r.sWj)(5):"15m"===e?(0,r.sWj)(15):"hourly"===e?(0,r.ytg)(1):"daily"===e?(0,r.NrH)(1):"weekly"===e?(0,r.NrH)(7):"monthly"===e?(0,r.NrH)(30):"yearly"===e?(0,r.NrH)(365):0}},78743:function(e,t,n){"use strict";n.d(t,{Y:function(){return y},F:function(){return g}});var r=n(52322),i=n(52735),o=n(27444),a=n(2784);let s=["actions","path","storage","available","readOnly","successfulReads","successfulWrites","failedReads","failedWrites"];var l=n(41775),u=n(96206),c=n(22515);function d(e){var t,n;let{id:a,contentProps:s,buttonProps:u}=e,{openDialog:d}=(0,c.Rh)(),h=(0,o.Rz)(),p=(0,o.ST)({params:{id:a}}),m=(0,o._3)(),v=p.data&&"ready"==p.data.status,g=p.data&&!["ready","unavailable"].includes(p.data.status);return(0,r.jsxs)(i.h_2,{trigger:(0,r.jsx)(i.zxk,{variant:"ghost",icon:"hover",...u,children:(0,r.jsx)(l.iG7,{})}),contentProps:{align:"start",...s},children:[(0,r.jsx)("div",{className:"px-1.5 py-1",children:(0,r.jsxs)(i.xvT,{size:"14",weight:"medium",color:"subtle",children:["Volume ",p.data?(0,i.$Gg)(null===(t=p.data)||void 0===t?void 0:t.localPath,24):a]})}),(0,r.jsx)(i.Juw,{children:"Actions"}),g?(0,r.jsxs)(i.Xiv,{onSelect:async()=>{var e;let t=null===(e=p.data)||void 0===e?void 0:e.status,n=await m.delete({params:{id:Number(a)}});n.error?(0,i.OHV)("Error canceling volume ".concat(f(t),".")):(0,i.OPV)("Successfully canceled volume ".concat(f(t),"."))},children:[(0,r.jsx)(i.KpP,{children:(0,r.jsx)(l.PcV,{})}),"Cancel ".concat(f(null===(n=p.data)||void 0===n?void 0:n.status))]}):null,p.data?(0,r.jsxs)(i.Xiv,{disabled:!v,onSelect:async()=>{let e=!p.data.readOnly,t=await h.put({params:{id:Number(a)},payload:{readOnly:e}});t.error?(0,i.OHV)(e?"Error setting volume to read-only.":"Error setting volume to read/write."):(0,i.OPV)(e?"Volume set to read-only.":"Volume set to read/write.")},children:[(0,r.jsx)(i.KpP,{children:p.data.readOnly?(0,r.jsx)(l.dr6,{}):(0,r.jsx)(l.Lur,{})}),p.data.readOnly?"Set to read/write":"Set to read-only"]}):null,(0,r.jsxs)(i.Xiv,{disabled:!v,onSelect:()=>d("volumeResize",a),children:[(0,r.jsx)(i.KpP,{children:(0,r.jsx)(l.BB5,{})}),"Resize"]}),(0,r.jsxs)(i.Xiv,{disabled:g,onSelect:()=>d("volumeDelete",a),children:[(0,r.jsx)(i.KpP,{children:(0,r.jsx)(l.Jrl,{})}),"Delete"]})]})}function f(e){return"resizing"===e?"resize":"creating"===e?"creation":"removing"===e?"removal":"operation"}let h=[{id:"actions",label:"",fixed:!0,cellClassName:"w-[50px] !pl-2 !pr-4 [&+*]:!pl-0",render:e=>{let{data:t}=e;return(0,r.jsx)(d,{id:t.id})}},{id:"path",label:"path",category:"general",render:e=>{let{data:t}=e;return(0,r.jsx)(i.xvT,{font:"mono",ellipsis:!0,children:t.localPath})}},{id:"available",label:"status",category:"general",render:e=>{var t;let{data:n}=e;return(0,r.jsx)(i.ua7,{side:"right",content:n.available?"available":(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.xvT,{children:"unavailable"}),(0,r.jsx)("div",{className:"flex flex-col",children:null===(t=n.errors)||void 0===t?void 0:t.map(e=>(0,r.jsx)(i.xvT,{size:"10",noWrap:!0,children:e},e))})]}),children:(0,r.jsxs)("div",{className:"flex gap-2 items-center",children:[n.available&&"ready"===n.status&&(0,r.jsx)(i.xvT,{color:"green",children:(0,r.jsx)(l.DI$,{})}),n.available&&"ready"!==n.status&&(0,r.jsx)(i.xvT,{color:"amber",children:(0,r.jsx)(l.dsj,{})}),!n.available&&(0,r.jsx)(i.xvT,{color:"amber",children:(0,r.jsx)(l.SmH,{})}),(0,r.jsx)(i.xvT,{size:"12",className:"relative -top-px",children:n.status})]})})}},{id:"readOnly",label:"read/write",category:"general",render:e=>{let{data:t}=e;return t.readOnly?(0,r.jsx)(i.ua7,{content:"Read-only",children:(0,r.jsx)(i.xvT,{children:(0,r.jsx)(l.Lur,{})})}):(0,r.jsx)(i.ua7,{content:"Read and write enabled",children:(0,r.jsx)(i.xvT,{color:"subtle",children:(0,r.jsx)(l.dr6,{})})})}},{id:"storage",label:"storage",category:"general",render:e=>{let{data:t}=e;return(0,r.jsx)("div",{className:"flex gap-1 w-full max-w-[200px] pt-[10px]",children:(0,r.jsx)(i.kod,{variant:"accent",value:t.usedBytes,max:t.totalBytes,label:"".concat((0,u.vW)(t.usedBytes)," / ").concat((0,u.vW)(t.totalBytes))})})}},{id:"successfulReads",label:"successful reads",category:"operations",render:e=>{let{data:t}=e;return(0,r.jsx)(i.m2c,{variant:"value",size:"12",value:t.successfulReads,format:e=>e.toNumber().toLocaleString()})}},{id:"successfulWrites",label:"successful writes",category:"operations",render:e=>{let{data:t}=e;return(0,r.jsx)(i.m2c,{variant:"value",size:"12",value:t.successfulWrites,format:e=>e.toNumber().toLocaleString()})}},{id:"failedReads",label:"failed reads",category:"operations",render:e=>{let{data:t}=e;return(0,r.jsx)(i.m2c,{variant:"value",size:"12",value:t.failedReads,format:e=>e.toNumber().toLocaleString()})}},{id:"failedWrites",label:"failed writes",category:"operations",render:e=>{let{data:t}=e;return(0,r.jsx)(i.m2c,{variant:"value",size:"12",value:t.failedWrites,format:e=>e.toNumber().toLocaleString()})}}];var p=n(6391),m=n.n(p);let v=(0,a.createContext)({}),g=()=>(0,a.useContext)(v);function y(e){let{children:t}=e,n=function(){let{configurableColumns:e,enabledColumns:t,toggleColumnVisibility:n,setColumnsVisible:r,setColumnsHidden:l,toggleSort:u,setSortDirection:c,setSortField:d,sortField:f,sortDirection:p,resetDefaultColumnVisibility:v}=(0,i.oy6)("hostd/v0/volumes",{columns:h,columnsDefaultVisible:s}),g=(0,o.Fn)({config:{swr:{refreshInterval:e=>(null==e?void 0:e.find(e=>!["ready","unavailable"].includes(e.status)))?(0,i.XBW)(5):(0,i.XBW)(60)}}}),y=function(e){let{response:t}=e;return(0,a.useMemo)(()=>{var e;return t.data?(null===(e=t.data)||void 0===e?void 0:e.map(e=>({id:String(e.ID),ID:e.ID,localPath:e.localPath,usedSectors:e.usedSectors,usedBytes:new(m())(e.usedSectors).times((0,i.B$N)(4)).toNumber(),totalBytes:new(m())(e.totalSectors).times((0,i.B$N)(4)).toNumber(),totalSectors:e.totalSectors,status:e.status,readOnly:e.readOnly,available:e.available,failedReads:new(m())(e.failedReads),failedWrites:new(m())(e.failedWrites),successfulReads:new(m())(e.successfulReads),successfulWrites:new(m())(e.successfulWrites),errors:e.errors})))||[]:null},[t.data])}({response:g}),b=(0,a.useMemo)(()=>h.filter(e=>t.includes(e.id)),[t]),x=g.isValidating,w=g.error,E=(0,i.c2j)(y,x,w,[]);return{dataState:E,totalCount:(null==y?void 0:y.length)||0,isLoading:g.isValidating,columns:b,dataset:y,configurableColumns:e,enabledColumns:t,toggleColumnVisibility:n,setColumnsVisible:r,setColumnsHidden:l,toggleSort:u,setSortDirection:c,setSortField:d,sortField:f,sortDirection:p,resetDefaultColumnVisibility:v}}();return(0,r.jsx)(v.Provider,{value:n,children:t})}},734:function(e,t,n){"use strict";n.d(t,{O:function(){return u},Y:function(){return f}});var r=n(52322),i=n(52735),o=n(92838),a=n(63397),s=n(24511),l=n(22515);function u(e){return{id:"filterContractId",value:e,label:"contract ID is ".concat(e)}}let c={contractId:""},d=s.Ry().shape({contractId:s.Z_().required("Required")});function f(e){let{trigger:t,open:n,onOpenChange:s}=e,{closeDialog:f}=(0,l.Rh)(),{setFilter:h}=(0,o.G)(),p=(0,a.TA)({initialValues:c,validationSchema:d,onSubmit:e=>{h(u(e.contractId)),p.resetForm(),f()}});return(0,r.jsx)(i.VqE,{trigger:t,title:"Filter by contract ID",open:n,onOpenChange:e=>{e||p.resetForm(),s(e)},contentVariants:{className:"w-[400px]"},onSubmit:p.handleSubmit,children:(0,r.jsx)("div",{className:"flex flex-col gap-4",children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsx)(i.cB7,{formik:p,title:"Contract ID",name:"contractId",placeholder:"Exact match for contract ID",autoComplete:"off",type:"text",variants:{size:"medium"}}),(0,r.jsx)(i.IKw,{formik:p,size:"medium",children:"Filter"})]})})})}},25573:function(e,t,n){"use strict";n.d(t,{n:function(){return o}});var r=n(2850),i=n(27444);function o(){var e,t,n,o;let{isUnlocked:a}=(0,r.Hv)(),s=(0,i.d$)({config:{swr:{refreshInterval:e=>(null==e?void 0:e.synced)?6e4:1e4}}}),l=(0,i.nH)(),u=s.data?null===(e=s.data)||void 0===e?void 0:e.chainIndex.height:0,c=(0,i.Os)({config:{swr:{refreshInterval:e=>(null==e?void 0:e.scanHeight)>=u?6e4:1e4}}}),d=a&&u&&l?Number((100*Math.min(u/l,1)).toFixed(1)):0,f=a&&u&&c.data?Number((100*Math.min(c.data.scanHeight/l,1)).toFixed(1)):0;return{isSynced:null===(t=s.data)||void 0===t?void 0:t.synced,isWalletSynced:(null===(n=s.data)||void 0===n?void 0:n.synced)&&(null===(o=c.data)||void 0===o?void 0:o.scanHeight)>=u-1,nodeBlockHeight:u,estimatedBlockHeight:l,syncPercent:d,walletScanPercent:f,moreThan100BlocksToSync:!!u&&!!l&&l-u>100,firstTimeSyncing:!!u&&!!l&&l-u>5e4}}},94977:function(e,t,n){"use strict";n.d(t,{B1:function(){return m},K9:function(){return c},LP:function(){return v},SY:function(){return s},c5:function(){return h},co:function(){return l},dK:function(){return g},dz:function(){return a},nS:function(){return d},rZ:function(){return f},s2:function(){return p},sS:function(){return u}});var r=n(52735),i=n(6391),o=n.n(i);let a="/TB/month";function s(e){return new(o())(e).times((0,r.xf5)(1)).times((0,r.S5V)(1))}let l="/million";function u(e){return new(o())(e).times(1e7)}let c="/million";function d(e){return new(o())(e).times(1e7)}let f="/TB/month";function h(e){return new(o())(e).times((0,r.xf5)(1)).times((0,r.S5V)(1))}let p="/TB";function m(e){return new(o())(e).times((0,r.xf5)(1))}let v="/TB";function g(e){return new(o())(e).times((0,r.xf5)(1))}},76176:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return E}});var r=n(52322);n(37832);var i=n(52735),o=n(92838),a=n(5187),s=n(22515),l=n(78743),u=n(99957),c=n(41775),d=n(25573),f=n(71930),h=n(27444),p=n(6391),m=n.n(p),v=n(96206),g=n(2850),y=n(92762);function b(){var e,t;let{isUnlocked:n}=(0,g.Hv)(),{openDialog:o}=(0,s.Rh)(),{dataset:a}=(0,l.F)(),u=(0,h.rV)(),p=(0,h.Os)(),[b,w]=(0,y.Z)("v0/hostd/onboarding/maximized",{defaultValue:!0}),E=(0,d.n)();if(!n)return null;let k=new(m())((null===(e=p.data)||void 0===e?void 0:e.confirmed)||0),j=(0,v.qN)(5e3),_=p.data&&k.gte(j),S=(null==a?void 0:a.length)>0,O=null===(t=u.data)||void 0===t?void 0:t.acceptingContracts,C=E.isSynced,M=[_,S,O,C],A=M.length,P=M.filter(e=>e).length;return A===P?null:b?(0,r.jsx)("div",{className:"z-20 fixed bottom-5 left-1/2 -translate-x-1/2 flex justify-center",children:(0,r.jsx)(i.s_4,{className:"w-[400px] flex flex-col max-h-[600px]",children:(0,r.jsxs)(i.xrM,{children:[(0,r.jsxs)("div",{className:"flex justify-between items-center px-3 py-2 border-b border-gray-200 dark:border-graydark-300",children:[(0,r.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,r.jsx)(i.TRl,{}),(0,r.jsx)(i.xvT,{size:"20",weight:"semibold",children:"Welcome to Sia"})]}),(0,r.jsx)(i.zxk,{variant:"ghost",onClick:()=>w(!1),children:(0,r.jsx)(c.mli,{})})]}),(0,r.jsx)("div",{className:"flex justify-between items-center px-3 py-2 border-b border-gray-200 dark:border-graydark-300",children:(0,r.jsx)(i.xvT,{size:"14",children:"Get set up by completing the following steps. Once they are complete, your host is ready to store data."})}),(0,r.jsx)(x,{title:(0,r.jsx)(i.rUS,{href:f._.wallet.view,onClick:()=>o("addressDetails"),ellipsis:!0,size:"14",underline:"hover",children:"Step 1: Fund your wallet"}),description:"Fund your wallet with at least ".concat((0,v.Vz)(j)," siacoin to cover required contract collateral.").concat(E.isWalletSynced?"":" Balance will not be accurate until wallet is finished scanning."),action:_?(0,r.jsx)(i.xvT,{color:"green",children:(0,r.jsx)(c.Y3p,{})}):(0,r.jsxs)(r.Fragment,{children:[!E.isWalletSynced&&(0,r.jsx)(i.ua7,{content:"Wallet scanning progress ".concat(E.walletScanPercent,"%"),children:(0,r.jsxs)(i.xvT,{size:"14",children:[E.walletScanPercent,"%"]})}),(0,r.jsx)(i.rUS,{href:f._.wallet.view,onClick:()=>o("addressDetails"),children:(0,r.jsx)(c.V8Q,{})}),(0,r.jsx)(i.xvT,{color:"amber",children:(0,r.jsx)(c.Fs9,{})})]})}),(0,r.jsx)(x,{title:(0,r.jsx)(i.rUS,{href:f._.volumes.index,ellipsis:!0,size:"14",underline:"hover",children:"Step 2: Add a volume"}),description:"Add a system volume that will be used to store data.",action:S?(0,r.jsx)(i.xvT,{color:"green",children:(0,r.jsx)(c.Y3p,{})}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.rUS,{href:f._.volumes.index,children:(0,r.jsx)(c.V8Q,{})}),(0,r.jsx)(i.xvT,{color:"amber",children:(0,r.jsx)(c.Fs9,{})})]})}),(0,r.jsx)(x,{title:(0,r.jsx)(i.rUS,{href:f._.config.index,ellipsis:!0,size:"14",underline:"hover",children:"Step 3: Configure pricing and settings"}),description:"Configure your host's pricing and settings and start accepting contracts.",action:O?(0,r.jsx)(i.xvT,{color:"green",children:(0,r.jsx)(c.Y3p,{})}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.rUS,{href:f._.config.index,children:(0,r.jsx)(c.V8Q,{})}),(0,r.jsx)(i.xvT,{color:"amber",children:(0,r.jsx)(c.Fs9,{})})]})}),(0,r.jsx)(x,{title:(0,r.jsx)(i.rUS,{href:f._.node.index,underline:"hover",ellipsis:!0,size:"14",children:"Step 4: Wait for the blockchain to sync"}),description:"The blockchain will sync in the background, this takes some time. No user action required.",action:C?(0,r.jsx)(i.xvT,{color:"green",children:(0,r.jsx)(c.Y3p,{})}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(i.xvT,{ellipsis:!0,size:"14",children:[E.syncPercent,"%"]}),(0,r.jsx)(i.xvT,{color:"amber",children:(0,r.jsx)(c.hzZ,{})})]})})]})})}):(0,r.jsx)("div",{className:"z-30 fixed bottom-5 left-1/2 -translate-x-1/2 flex justify-center",children:(0,r.jsx)(i.zxk,{onClick:()=>w(!0),size:"large",className:"flex gap-3 !px-3",children:(0,r.jsxs)(i.xvT,{className:"flex items-center gap-1",children:[(0,r.jsx)(i.TRl,{}),"Setup: ",P,"/",A," steps complete"]})})})}function x(e){let{title:t,action:n,description:o}=e;return(0,r.jsx)("div",{className:"border-t first:border-t-0 border-gray-200 dark:border-graydark-300 px-3 py-2",children:(0,r.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,r.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,r.jsx)("div",{className:"flex-1 flex items-center",children:t}),n]}),(0,r.jsx)("div",{className:"pr-5",children:(0,r.jsx)(i.xvT,{size:"12",color:"subtle",children:o})})]})})}function w(e){let{children:t}=e;return(0,r.jsx)(s.Tu,{children:(0,r.jsx)(u.iV,{children:(0,r.jsx)(l.Y,{children:(0,r.jsx)(o.x,{children:(0,r.jsxs)(a.C,{children:[(0,r.jsx)(s.xQ,{}),(0,r.jsx)(b,{}),t]})})})})})}function E(e){let{Component:t,pageProps:n}=e;return(0,r.jsx)(i.PD$,{fallback:n.fallback,passwordProtectRequestHooks:!0,lockRoutes:f._,children:(0,r.jsx)(w,{children:(0,r.jsx)(t,{...n})})})}},52735:function(e,t,n){"use strict";let r,i,o,a;n.d(t,{hcY:function(){return _F},tU3:function(){return _N},zXq:function(){return _Q},juT:function(){return _o},Cts:function(){return lg},Z58:function(){return SM},WVB:function(){return cP},zxk:function(){return le},b0u:function(){return EL},EKh:function(){return lx},vRO:function(){return Oe},QHy:function(){return SQ},TaT:function(){return Sq},eQh:function(){return lE},HfT:function(){return S1},ncR:function(){return jq},A06:function(){return SR},Vy9:function(){return SD},VqE:function(){return l9},h_2:function(){return cL},Xiv:function(){return cF},Juw:function(){return cV},KpP:function(){return cI},XOF:function(){return jW},jIp:function(){return Ot},QBj:function(){return On},yEL:function(){return _Y},cB7:function(){return jQ},ZqQ:function(){return jX},IKw:function(){return j3},Hzd:function(){return Ov},WN2:function(){return Ow},X6q:function(){return cU},Yqd:function(){return fj},__J:function(){return cJ},rUS:function(){return c2},TRl:function(){return c3},YaL:function(){return Oy},kFS:function(){return cT},FzK:function(){return SG},Clw:function(){return cA},B$N:function(){return Oh},PD$:function(){return Os},Wxm:function(){return fC},uDJ:function(){return j8},s_4:function(){return tG},nvN:function(){return t$},u5Q:function(){return SA},j4H:function(){return f_},J2e:function(){return dg},kod:function(){return dP},xrM:function(){return l6},PhF:function(){return fO},Z0O:function(){return c_},DLL:function(){return Sb},KJW:function(){return _l},rsf:function(){return fU},D_D:function(){return Sd},xf5:function(){return Op},iA_:function(){return j5},t6k:function(){return S2},xvT:function(){return tq},nvn:function(){return d3},ua7:function(){return s7},mPE:function(){return Sf},XxW:function(){return jw},m2c:function(){return jj},YKL:function(){return jk},QUh:function(){return Sw},weF:function(){return _7},YNn:function(){return Sm},DmW:function(){return Sv},jrD:function(){return SI},E6f:function(){return SV},Uzc:function(){return Om},BTR:function(){return Og},O9T:function(){return m4},fVJ:function(){return SS},vQq:function(){return jf},NrH:function(){return EP},Y_Z:function(){return SE},EJC:function(){return OE},kOJ:function(){return S_},OQF:function(){return Sk},leQ:function(){return jv},ytg:function(){return EA},Vkc:function(){return cO},sWj:function(){return EM},S5V:function(){return SL},z$:function(){return tY},XBW:function(){return ET},x9T:function(){return Ob},bjP:function(){return Ox},I13:function(){return jp},cEb:function(){return d4},OHV:function(){return ju},OPV:function(){return jl},$Gg:function(){return jh},Y97:function(){return _T},c2j:function(){return _R},WsO:function(){return _$},Uu5:function(){return Of},oy6:function(){return Od}});var s,l,u,c,d,f,h,p,m,v,g,y,b=n(52322),x=n(2784),w=n.t(x,2),E=n(7896),k=n(34540),j=n(26215),_=n(99575);function S(e){let t=e+"CollectionProvider",[n,r]=(0,k.b)(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=e+"CollectionSlot",s=x.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=o(a,n),s=(0,j.e)(t,i.collectionRef);return x.createElement(_.g7,{ref:s},r)}),l=e+"CollectionItemSlot",u="data-radix-collection-item",c=x.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,a=x.useRef(null),s=(0,j.e)(t,a),c=o(l,n);return x.useEffect(()=>(c.itemMap.set(a,{ref:a,...i}),()=>void c.itemMap.delete(a))),x.createElement(_.g7,{[u]:"",ref:s},r)});return[{Provider:e=>{let{scope:t,children:n}=e,r=x.useRef(null),o=x.useRef(new Map).current;return x.createElement(i,{scope:t,itemMap:o,collectionRef:r},n)},Slot:s,ItemSlot:c},function(t){let n=o(e+"CollectionConsumer",t),r=x.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${u}]`)),r=Array.from(n.itemMap.values()),i=r.sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current));return i},[n.collectionRef,n.itemMap]);return r},r]}var O=n(41816),C=n(73597),M=n(72130),A=n(64680),P=n(28245),T=n(26074);let N="Collapsible",[R,D]=(0,k.b)(N),[L,F]=R(N),V=((e,t)=>{let{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:o,onOpenChange:a,...s}=e,[l=!1,u]=(0,C.T)({prop:r,defaultProp:i,onChange:a});return(0,x.createElement)(L,{scope:n,disabled:o,contentId:(0,T.M)(),open:l,onOpenToggle:(0,x.useCallback)(()=>u(e=>!e),[u])},(0,x.createElement)(M.WV.div,(0,E.Z)({"data-state":z(l),"data-disabled":o?"":void 0},s,{ref:t})))},"CollapsibleContent"),I=((e,t)=>{let{forceMount:n,...r}=e,i=F(V,e.__scopeCollapsible);return(0,x.createElement)(P.z,{present:n||i.open},({present:e})=>(0,x.createElement)(I,(0,E.Z)({},r,{ref:t,present:e})))},(0,x.forwardRef)((e,t)=>{let{__scopeCollapsible:n,present:r,children:i,...o}=e,a=F(V,n),[s,l]=(0,x.useState)(r),u=(0,x.useRef)(null),c=(0,j.e)(t,u),d=(0,x.useRef)(0),f=d.current,h=(0,x.useRef)(0),p=h.current,m=a.open||s,v=(0,x.useRef)(m),g=(0,x.useRef)();return(0,x.useEffect)(()=>{let e=requestAnimationFrame(()=>v.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,A.b)(()=>{let e=u.current;if(e){g.current=g.current||{transitionDuration:e.style.transitionDuration,animationDuration:e.style.animationDuration,animationFillMode:e.style.animationFillMode},e.style.transitionDuration="0s",e.style.animationDuration="0s",e.style.animationFillMode="none";let t=e.getBoundingClientRect();d.current=t.height,h.current=t.width,v.current||(e.style.transitionDuration=g.current.transitionDuration,e.style.animationDuration=g.current.animationDuration,e.style.animationFillMode=g.current.animationFillMode),l(r)}},[a.open,r]),(0,x.createElement)(M.WV.div,(0,E.Z)({"data-state":z(a.open),"data-disabled":a.disabled?"":void 0,id:a.contentId,hidden:!m},o,{ref:c,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":p?`${p}px`:void 0,...e.style}}),m&&i)}));function z(e){return e?"open":"closed"}let Z="Accordion",B=["Home","End","ArrowDown","ArrowUp"],[H,U,W]=S(Z),[q,$]=(0,k.b)(Z,[W,D]),Y=(D(),x.forwardRef((e,t)=>{let{type:n,...r}=e;return x.createElement(H.Provider,{scope:e.__scopeAccordion},"multiple"===n?x.createElement(ee,(0,E.Z)({},r,{ref:t})):x.createElement(J,(0,E.Z)({},r,{ref:t})))}));Y.propTypes={type(e){let t=e.value||e.defaultValue;return e.type&&!["single","multiple"].includes(e.type)?Error("Invalid prop `type` supplied to `Accordion`. Expected one of `single | multiple`."):"multiple"===e.type&&"string"==typeof t?Error("Invalid prop `type` supplied to `Accordion`. Expected `single` when `defaultValue` or `value` is type `string`."):"single"===e.type&&Array.isArray(t)?Error("Invalid prop `type` supplied to `Accordion`. Expected `multiple` when `defaultValue` or `value` is type `string[]`."):null}};let[G,K]=q(Z),[X,Q]=q(Z,{collapsible:!1}),J=x.forwardRef((e,t)=>{let{value:n,defaultValue:r,onValueChange:i=()=>{},collapsible:o=!1,...a}=e,[s,l]=(0,C.T)({prop:n,defaultProp:r,onChange:i});return x.createElement(G,{scope:e.__scopeAccordion,value:s?[s]:[],onItemOpen:l,onItemClose:x.useCallback(()=>o&&l(""),[o,l])},x.createElement(X,{scope:e.__scopeAccordion,collapsible:o},x.createElement(er,(0,E.Z)({},a,{ref:t}))))}),ee=x.forwardRef((e,t)=>{let{value:n,defaultValue:r,onValueChange:i=()=>{},...o}=e,[a=[],s]=(0,C.T)({prop:n,defaultProp:r,onChange:i}),l=x.useCallback(e=>s((t=[])=>[...t,e]),[s]),u=x.useCallback(e=>s((t=[])=>t.filter(t=>t!==e)),[s]);return x.createElement(G,{scope:e.__scopeAccordion,value:a,onItemOpen:l,onItemClose:u},x.createElement(X,{scope:e.__scopeAccordion,collapsible:!0},x.createElement(er,(0,E.Z)({},o,{ref:t}))))}),[et,en]=q(Z),er=x.forwardRef((e,t)=>{let{__scopeAccordion:n,disabled:r,...i}=e,o=x.useRef(null),a=(0,j.e)(o,t),s=U(n),l=(0,O.M)(e.onKeyDown,e=>{var t;if(!B.includes(e.key))return;let n=e.target,r=s().filter(e=>{var t;return!(null!==(t=e.ref.current)&&void 0!==t&&t.disabled)}),i=r.findIndex(e=>e.ref.current===n),o=r.length;if(-1===i)return;e.preventDefault();let a=i;switch(e.key){case"Home":a=0;break;case"End":a=o-1;break;case"ArrowDown":a=i+1;break;case"ArrowUp":(a=i-1)<0&&(a=o-1)}let l=a%o;null===(t=r[l].ref.current)||void 0===t||t.focus()});return x.createElement(et,{scope:n,disabled:r},x.createElement(H.Slot,{scope:n},x.createElement(M.WV.div,(0,E.Z)({},i,{ref:a,onKeyDown:r?void 0:l}))))}),[ei,eo]=q("AccordionItem");var ea=n(82851),es=n(83317);function el(e){return e.split("-")[0]}function eu(e){return e.split("-")[1]}function ec(e){return["top","bottom"].includes(el(e))?"x":"y"}function ed(e){return"y"===e?"height":"width"}function ef(e,t,n){let r,{reference:i,floating:o}=e,a=i.x+i.width/2-o.width/2,s=i.y+i.height/2-o.height/2,l=ec(t),u=ed(l),c=i[u]/2-o[u]/2,d="x"===l;switch(el(t)){case"top":r={x:a,y:i.y-o.height};break;case"bottom":r={x:a,y:i.y+i.height};break;case"right":r={x:i.x+i.width,y:s};break;case"left":r={x:i.x-o.width,y:s};break;default:r={x:i.x,y:i.y}}switch(eu(t)){case"start":r[l]-=c*(n&&d?-1:1);break;case"end":r[l]+=c*(n&&d?-1:1)}return r}let eh=async(e,t,n)=>{let{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,s=await (null==a.isRTL?void 0:a.isRTL(t)),l=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:c}=ef(l,r,s),d=r,f={},h=0;for(let n=0;n({name:"arrow",options:e,async fn(t){let{element:n,padding:r=0}=null!=e?e:{},{x:i,y:o,placement:a,rects:s,platform:l}=t;if(null==n)return{};let u=ep(r),c={x:i,y:o},d=ec(a),f=eu(a),h=ed(d),p=await l.getDimensions(n),m="y"===d?"top":"left",v="y"===d?"bottom":"right",g=s.reference[h]+s.reference[d]-c[d]-s.floating[h],y=c[d]-s.reference[d],b=await (null==l.getOffsetParent?void 0:l.getOffsetParent(n)),x=b?"y"===d?b.clientHeight||0:b.clientWidth||0:0;0===x&&(x=s.floating[h]);let w=u[m],E=x-p[h]-u[v],k=x/2-p[h]/2+(g/2-y/2),j=ey(w,eg(k,E)),_=("start"===f?u[m]:u[v])>0&&k!==j&&s.reference[h]<=s.floating[h];return{[d]:c[d]-(_?kex[e])}let eE={start:"end",end:"start"};function ek(e){return e.replace(/start|end/g,e=>eE[e])}let ej=["top","right","bottom","left"];ej.reduce((e,t)=>e.concat(t,t+"-start",t+"-end"),[]);let e_=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r,i,o;let{placement:a,middlewareData:s,rects:l,initialPlacement:u,platform:c,elements:d}=t,{mainAxis:f=!0,crossAxis:h=!0,fallbackPlacements:p,fallbackStrategy:m="bestFit",flipAlignment:v=!0,...g}=e,y=el(a),b=p||(y!==u&&v?function(e){let t=ew(e);return[ek(e),t,ek(t)]}(u):[ew(u)]),x=[u,...b],w=await ev(t,g),E=[],k=(null==(n=s.flip)?void 0:n.overflows)||[];if(f&&E.push(w[y]),h){let{main:e,cross:t}=function(e,t,n){void 0===n&&(n=!1);let r=eu(e),i=ec(e),o=ed(i),a="x"===i?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=ew(a)),{main:a,cross:ew(a)}}(a,l,await (null==c.isRTL?void 0:c.isRTL(d.floating)));E.push(w[e],w[t])}if(k=[...k,{placement:a,overflows:E}],!E.every(e=>e<=0)){let e=(null!=(r=null==(i=s.flip)?void 0:i.index)?r:0)+1,t=x[e];if(t)return{data:{index:e,overflows:k},reset:{placement:t}};let n="bottom";switch(m){case"bestFit":{let e=null==(o=k.map(e=>[e,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:o[0].placement;e&&(n=e);break}case"initialPlacement":n=u}if(a!==n)return{reset:{placement:n}}}return{}}}};function eS(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function eO(e){return ej.some(t=>e[t]>=0)}let eC=function(e){let{strategy:t="referenceHidden",...n}=void 0===e?{}:e;return{name:"hide",async fn(e){let{rects:r}=e;switch(t){case"referenceHidden":{let t=eS(await ev(e,{...n,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:t,referenceHidden:eO(t)}}}case"escaped":{let t=eS(await ev(e,{...n,altBoundary:!0}),r.floating);return{data:{escapedOffsets:t,escaped:eO(t)}}}default:return{}}}}},eM=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){let{x:n,y:r}=t,i=await async function(e,t){let{placement:n,platform:r,elements:i}=e,o=await (null==r.isRTL?void 0:r.isRTL(i.floating)),a=el(n),s=eu(n),l="x"===ec(n),u=["left","top"].includes(a)?-1:1,c=o&&l?-1:1,d="function"==typeof t?t(e):t,{mainAxis:f,crossAxis:h,alignmentAxis:p}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return s&&"number"==typeof p&&(h="end"===s?-1*p:p),l?{x:h*c,y:f*u}:{x:f*u,y:h*c}}(t,e);return{x:n+i.x,y:r+i.y,data:i}}}};function eA(e){return"x"===e?"y":"x"}let eP=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){let{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=e,u={x:n,y:r},c=await ev(t,l),d=ec(el(i)),f=eA(d),h=u[d],p=u[f];if(o){let e="y"===d?"bottom":"right";h=ey(h+c["y"===d?"top":"left"],eg(h,h-c[e]))}a&&(p=ey(p+c["y"===f?"top":"left"],eg(p,p-c["y"===f?"bottom":"right"])));let m=s.fn({...t,[d]:h,[f]:p});return{...m,data:{x:m.x-n,y:m.y-r}}}}},eT=function(e){return void 0===e&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:o,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:u=!0}=e,c={x:n,y:r},d=ec(i),f=eA(d),h=c[d],p=c[f],m="function"==typeof s?s({...o,placement:i}):s,v="number"==typeof m?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){let e="y"===d?"height":"width",t=o.reference[d]-o.floating[e]+v.mainAxis,n=o.reference[d]+o.reference[e]-v.mainAxis;hn&&(h=n)}if(u){var g,y,b,x;let e="y"===d?"width":"height",t=["top","left"].includes(el(i)),n=o.reference[f]-o.floating[e]+(t&&null!=(g=null==(y=a.offset)?void 0:y[f])?g:0)+(t?0:v.crossAxis),r=o.reference[f]+o.reference[e]+(t?0:null!=(b=null==(x=a.offset)?void 0:x[f])?b:0)-(t?v.crossAxis:0);pr&&(p=r)}return{[d]:h,[f]:p}}}};function eN(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function eR(e){if(null==e)return window;if(!eN(e)){let t=e.ownerDocument;return t&&t.defaultView||window}return e}function eD(e){return eR(e).getComputedStyle(e)}function eL(e){return eN(e)?"":e?(e.nodeName||"").toLowerCase():""}function eF(){let e=navigator.userAgentData;return null!=e&&e.brands?e.brands.map(e=>e.brand+"/"+e.version).join(" "):navigator.userAgent}function eV(e){return e instanceof eR(e).HTMLElement}function eI(e){return e instanceof eR(e).Element}function ez(e){return"undefined"!=typeof ShadowRoot&&(e instanceof eR(e).ShadowRoot||e instanceof ShadowRoot)}function eZ(e){let{overflow:t,overflowX:n,overflowY:r}=eD(e);return/auto|scroll|overlay|hidden/.test(t+r+n)}function eB(e){let t=/firefox/i.test(eF()),n=eD(e);return"none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||["transform","perspective"].includes(n.willChange)||t&&"filter"===n.willChange||t&&!!n.filter&&"none"!==n.filter}function eH(){return!/^((?!chrome|android).)*safari/i.test(eF())}let eU=Math.min,eW=Math.max,eq=Math.round;function e$(e,t,n){var r,i,o,a;void 0===t&&(t=!1),void 0===n&&(n=!1);let s=e.getBoundingClientRect(),l=1,u=1;t&&eV(e)&&(l=e.offsetWidth>0&&eq(s.width)/e.offsetWidth||1,u=e.offsetHeight>0&&eq(s.height)/e.offsetHeight||1);let c=eI(e)?eR(e):window,d=!eH()&&n,f=(s.left+(d&&null!=(r=null==(i=c.visualViewport)?void 0:i.offsetLeft)?r:0))/l,h=(s.top+(d&&null!=(o=null==(a=c.visualViewport)?void 0:a.offsetTop)?o:0))/u,p=s.width/l,m=s.height/u;return{width:p,height:m,top:h,right:f+p,bottom:h+m,left:f,x:f,y:h}}function eY(e){return((e instanceof eR(e).Node?e.ownerDocument:e.document)||window.document).documentElement}function eG(e){return eI(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function eK(e){return e$(eY(e)).left+eG(e).scrollLeft}function eX(e){return"html"===eL(e)?e:e.assignedSlot||e.parentNode||(ez(e)?e.host:null)||eY(e)}function eQ(e){return eV(e)&&"fixed"!==getComputedStyle(e).position?e.offsetParent:null}function eJ(e){let t=eR(e),n=eQ(e);for(;n&&["table","td","th"].includes(eL(n))&&"static"===getComputedStyle(n).position;)n=eQ(n);return n&&("html"===eL(n)||"body"===eL(n)&&"static"===getComputedStyle(n).position&&!eB(n))?t:n||function(e){let t=eX(e);for(ez(t)&&(t=t.host);eV(t)&&!["html","body"].includes(eL(t));){if(eB(t))return t;t=t.parentNode}return null}(e)||t}function e0(e){if(eV(e))return{width:e.offsetWidth,height:e.offsetHeight};let t=e$(e);return{width:t.width,height:t.height}}function e1(e,t){var n;void 0===t&&(t=[]);let r=function e(t){let n=eX(t);return["html","body","#document"].includes(eL(n))?t.ownerDocument.body:eV(n)&&eZ(n)?n:e(n)}(e),i=r===(null==(n=e.ownerDocument)?void 0:n.body),o=eR(r),a=i?[o].concat(o.visualViewport||[],eZ(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(e1(a))}function e2(e,t,n){return"viewport"===t?em(function(e,t){let n=eR(e),r=eY(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;let e=eH();(e||!e&&"fixed"===t)&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s,y:l}}(e,n)):eI(t)?function(e,t){let n=e$(e,!1,"fixed"===t),r=n.top+e.clientTop,i=n.left+e.clientLeft;return{top:r,left:i,x:i,y:r,right:i+e.clientWidth,bottom:r+e.clientHeight,width:e.clientWidth,height:e.clientHeight}}(t,n):em(function(e){var t;let n=eY(e),r=eG(e),i=null==(t=e.ownerDocument)?void 0:t.body,o=eW(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=eW(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+eK(e),l=-r.scrollTop;return"rtl"===eD(i||n).direction&&(s+=eW(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}(eY(e)))}let e4={getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,o=[..."clippingAncestors"===n?function(e){let t=e1(e),n=["absolute","fixed"].includes(eD(e).position)&&eV(e)?eJ(e):e;return eI(n)?t.filter(e=>eI(e)&&function(e,t){let n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&ez(n)){let n=t;do{if(n&&e===n)return!0;n=n.parentNode||n.host}while(n)}return!1}(e,n)&&"body"!==eL(e)):[]}(t):[].concat(n),r],a=o[0],s=o.reduce((e,n)=>{let r=e2(t,n,i);return e.top=eW(r.top,e.top),e.right=eU(r.right,e.right),e.bottom=eU(r.bottom,e.bottom),e.left=eW(r.left,e.left),e},e2(t,a,i));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:r}=e,i=eV(n),o=eY(n);if(n===o)return t;let a={scrollLeft:0,scrollTop:0},s={x:0,y:0};if((i||!i&&"fixed"!==r)&&(("body"!==eL(n)||eZ(o))&&(a=eG(n)),eV(n))){let e=e$(n,!0);s.x=e.x+n.clientLeft,s.y=e.y+n.clientTop}return{...t,x:t.x-a.scrollLeft+s.x,y:t.y-a.scrollTop+s.y}},isElement:eI,getDimensions:e0,getOffsetParent:eJ,getDocumentElement:eY,getElementRects:e=>{let{reference:t,floating:n,strategy:r}=e;return{reference:function(e,t,n){let r=eV(t),i=eY(t),o=e$(e,r&&function(e){let t=e$(e);return eq(t.width)!==e.offsetWidth||eq(t.height)!==e.offsetHeight}(t),"fixed"===n),a={scrollLeft:0,scrollTop:0},s={x:0,y:0};if(r||!r&&"fixed"!==n){if(("body"!==eL(t)||eZ(i))&&(a=eG(t)),eV(t)){let e=e$(t,!0);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else i&&(s.x=eK(i))}return{x:o.left+a.scrollLeft-s.x,y:o.top+a.scrollTop-s.y,width:o.width,height:o.height}}(t,eJ(n),r),floating:{...e0(n),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>"rtl"===eD(e).direction};function e3(e,t,n,r){void 0===r&&(r={});let{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=!0,animationFrame:s=!1}=r,l=i&&!s,u=o&&!s,c=l||u?[...eI(e)?e1(e):[],...e1(t)]:[];c.forEach(e=>{l&&e.addEventListener("scroll",n,{passive:!0}),u&&e.addEventListener("resize",n)});let d,f=null;if(a){let r=!0;f=new ResizeObserver(()=>{r||n(),r=!1}),eI(e)&&!s&&f.observe(e),f.observe(t)}let h=s?e$(e):null;return s&&function t(){let r=e$(e);h&&(r.x!==h.x||r.y!==h.y||r.width!==h.width||r.height!==h.height)&&n(),h=r,d=requestAnimationFrame(t)}(),n(),()=>{var e;c.forEach(e=>{l&&e.removeEventListener("scroll",n),u&&e.removeEventListener("resize",n)}),null==(e=f)||e.disconnect(),f=null,s&&cancelAnimationFrame(d)}}let e5=(e,t,n)=>eh(e,t,{platform:e4,...n});var e6=n(28316),e8="undefined"!=typeof document?x.useLayoutEffect:x.useEffect;function e7(e){let{middleware:t,placement:n="bottom",strategy:r="absolute",whileElementsMounted:i}=void 0===e?{}:e,o=x.useRef(null),a=x.useRef(null),s=function(e){let t=x.useRef(e);return e8(()=>{t.current=e}),t}(i),l=x.useRef(null),[u,c]=x.useState({x:null,y:null,strategy:r,placement:n,middlewareData:{}}),[d,f]=x.useState(t);!function e(t,n){let r,i,o;if(t===n)return!0;if(typeof t!=typeof n)return!1;if("function"==typeof t&&t.toString()===n.toString())return!0;if(t&&n&&"object"==typeof t){if(Array.isArray(t)){if((r=t.length)!=n.length)return!1;for(i=r;0!=i--;)if(!e(t[i],n[i]))return!1;return!0}if((r=(o=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(i=r;0!=i--;)if(!Object.prototype.hasOwnProperty.call(n,o[i]))return!1;for(i=r;0!=i--;){let r=o[i];if(("_owner"!==r||!t.$$typeof)&&!e(t[r],n[r]))return!1}return!0}return t!=t&&n!=n}(null==d?void 0:d.map(e=>{let{options:t}=e;return t}),null==t?void 0:t.map(e=>{let{options:t}=e;return t}))&&f(t);let h=x.useCallback(()=>{o.current&&a.current&&e5(o.current,a.current,{middleware:d,placement:n,strategy:r}).then(e=>{p.current&&e6.flushSync(()=>{c(e)})})},[d,n,r]);e8(()=>{p.current&&h()},[h]);let p=x.useRef(!1);e8(()=>(p.current=!0,()=>{p.current=!1}),[]);let m=x.useCallback(()=>{if("function"==typeof l.current&&(l.current(),l.current=null),o.current&&a.current){if(s.current){let e=s.current(o.current,a.current,h);l.current=e}else h()}},[h,s]),v=x.useCallback(e=>{o.current=e,m()},[m]),g=x.useCallback(e=>{a.current=e,m()},[m]),y=x.useMemo(()=>({reference:o,floating:a}),[]);return x.useMemo(()=>({...u,update:h,refs:y,reference:v,floating:g}),[u,h,y,v,g])}let e9=e=>{let{element:t,padding:n}=e;return{name:"arrow",options:e,fn(e){if(Object.prototype.hasOwnProperty.call(t,"current")){if(null!=t.current)return eb({element:t.current,padding:n}).fn(e)}else if(t)return eb({element:t,padding:n}).fn(e);return{}}}},te=(0,x.forwardRef)((e,t)=>{let{children:n,width:r=10,height:i=5,...o}=e;return(0,x.createElement)(M.WV.svg,(0,E.Z)({},o,{ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none"}),e.asChild?n:(0,x.createElement)("polygon",{points:"0,0 30,0 15,10"}))});function tt(e){let[t,n]=(0,x.useState)(void 0);return(0,A.b)(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{let r,i;if(!Array.isArray(t)||!t.length)return;let o=t[0];if("borderBoxSize"in o){let e=o.borderBoxSize,t=Array.isArray(e)?e[0]:e;r=t.inlineSize,i=t.blockSize}else r=e.offsetWidth,i=e.offsetHeight;n({width:r,height:i})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)},[e]),t}let tn="Popper",[tr,ti]=(0,k.b)(tn),[to,ta]=tr(tn),ts=(0,x.forwardRef)((e,t)=>{let{__scopePopper:n,virtualRef:r,...i}=e,o=ta("PopperAnchor",n),a=(0,x.useRef)(null),s=(0,j.e)(t,a);return(0,x.useEffect)(()=>{o.onAnchorChange((null==r?void 0:r.current)||a.current)}),r?null:(0,x.createElement)(M.WV.div,(0,E.Z)({},i,{ref:s}))}),tl="PopperContent",[tu,tc]=tr(tl),[td,tf]=tr(tl,{hasParent:!1,positionUpdateFns:new Set}),th=(0,x.forwardRef)((e,t)=>{var n,r,i,o,a,s,l,u;let{__scopePopper:c,side:d="bottom",sideOffset:f=0,align:h="center",alignOffset:p=0,arrowPadding:m=0,collisionBoundary:v=[],collisionPadding:g=0,sticky:y="partial",hideWhenDetached:b=!1,avoidCollisions:w=!0,...E}=e,k=ta(tl,c),[_,S]=(0,x.useState)(null),O=(0,j.e)(t,e=>S(e)),[C,P]=(0,x.useState)(null),T=tt(C),N=null!==(n=null==T?void 0:T.width)&&void 0!==n?n:0,R=null!==(r=null==T?void 0:T.height)&&void 0!==r?r:0,D="number"==typeof g?g:{top:0,right:0,bottom:0,left:0,...g},L=Array.isArray(v)?v:[v],F=L.length>0,V={padding:D,boundary:L.filter(tg),altBoundary:F},{reference:I,floating:z,strategy:Z,x:B,y:H,placement:U,middlewareData:W,update:q}=e7({strategy:"fixed",placement:d+("center"!==h?"-"+h:""),whileElementsMounted:e3,middleware:[eM({mainAxis:f+R,alignmentAxis:p}),w?eP({mainAxis:!0,crossAxis:!1,limiter:"partial"===y?eT():void 0,...V}):void 0,C?e9({element:C,padding:m}):void 0,w?e_({...V}):void 0,ty({arrowWidth:N,arrowHeight:R}),b?eC({strategy:"referenceHidden"}):void 0].filter(tv)});(0,A.b)(()=>{I(k.anchor)},[I,k.anchor]);let $=null!==B&&null!==H,[Y,G]=tb(U),K=null===(i=W.arrow)||void 0===i?void 0:i.x,X=null===(o=W.arrow)||void 0===o?void 0:o.y,Q=(null===(a=W.arrow)||void 0===a?void 0:a.centerOffset)!==0,[J,ee]=(0,x.useState)();(0,A.b)(()=>{_&&ee(window.getComputedStyle(_).zIndex)},[_]);let{hasParent:et,positionUpdateFns:en}=tf(tl,c),er=!et;(0,x.useLayoutEffect)(()=>{if(!er)return en.add(q),()=>{en.delete(q)}},[er,en,q]),(0,x.useLayoutEffect)(()=>{er&&$&&Array.from(en).reverse().forEach(e=>requestAnimationFrame(e))},[er,$,en]);let ei={"data-side":Y,"data-align":G,...E,ref:O,style:{...E.style,animation:$?void 0:"none",opacity:null!==(s=W.hide)&&void 0!==s&&s.referenceHidden?0:void 0}};return(0,x.createElement)("div",{ref:z,"data-radix-popper-content-wrapper":"",style:{position:Z,left:0,top:0,transform:$?`translate3d(${Math.round(B)}px, ${Math.round(H)}px, 0)`:"translate3d(0, -200%, 0)",minWidth:"max-content",zIndex:J,"--radix-popper-transform-origin":[null===(l=W.transformOrigin)||void 0===l?void 0:l.x,null===(u=W.transformOrigin)||void 0===u?void 0:u.y].join(" ")}},(0,x.createElement)(tu,{scope:c,placedSide:Y,onArrowChange:P,arrowX:K,arrowY:X,shouldHideArrow:Q},er?(0,x.createElement)(td,{scope:c,hasParent:!0,positionUpdateFns:en},(0,x.createElement)(M.WV.div,ei)):(0,x.createElement)(M.WV.div,ei)))}),tp={top:"bottom",right:"left",bottom:"top",left:"right"},tm=(0,x.forwardRef)(function(e,t){let{__scopePopper:n,...r}=e,i=tc("PopperArrow",n),o=tp[i.placedSide];return(0,x.createElement)("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0}},(0,x.createElement)(te,(0,E.Z)({},r,{ref:t,style:{...r.style,display:"block"}})))});function tv(e){return void 0!==e}function tg(e){return null!==e}let ty=e=>({name:"transformOrigin",options:e,fn(t){var n,r,i,o,a;let{placement:s,rects:l,middlewareData:u}=t,c=(null===(n=u.arrow)||void 0===n?void 0:n.centerOffset)!==0,d=c?0:e.arrowWidth,f=c?0:e.arrowHeight,[h,p]=tb(s),m={start:"0%",center:"50%",end:"100%"}[p],v=(null!==(r=null===(i=u.arrow)||void 0===i?void 0:i.x)&&void 0!==r?r:0)+d/2,g=(null!==(o=null===(a=u.arrow)||void 0===a?void 0:a.y)&&void 0!==o?o:0)+f/2,y="",b="";return"bottom"===h?(y=c?m:`${v}px`,b=`${-f}px`):"top"===h?(y=c?m:`${v}px`,b=`${l.floating.height+f}px`):"right"===h?(y=`${-f}px`,b=c?m:`${g}px`):"left"===h&&(y=`${l.floating.width+f}px`,b=c?m:`${g}px`),{data:{x:y,y:b}}}});function tb(e){let[t,n="center"]=e.split("-");return[t,n]}let tx=e=>{let{__scopePopper:t,children:n}=e,[r,i]=(0,x.useState)(null);return(0,x.createElement)(to,{scope:t,anchor:r,onAnchorChange:i},n)};var tw=n(6500);let tE=(0,x.forwardRef)((e,t)=>(0,x.createElement)(M.WV.span,(0,E.Z)({},e,{ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}))),[tk,tj]=(0,k.b)("Tooltip",[ti]),t_=ti(),tS="tooltip.open",[tO,tC]=tk("TooltipProvider"),tM="Tooltip",[tA,tP]=tk(tM),tT="TooltipTrigger",tN=(0,x.forwardRef)((e,t)=>{let{__scopeTooltip:n,...r}=e,i=tP(tT,n),o=tC(tT,n),a=t_(n),s=(0,x.useRef)(null),l=(0,j.e)(t,s,i.onTriggerChange),u=(0,x.useRef)(!1),c=(0,x.useRef)(!1),d=(0,x.useCallback)(()=>u.current=!1,[]);return(0,x.useEffect)(()=>()=>document.removeEventListener("pointerup",d),[d]),(0,x.createElement)(ts,(0,E.Z)({asChild:!0},a),(0,x.createElement)(M.WV.button,(0,E.Z)({"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute},r,{ref:l,onPointerMove:(0,O.M)(e.onPointerMove,e=>{"touch"===e.pointerType||c.current||o.isPointerInTransitRef.current||(i.onTriggerEnter(),c.current=!0)}),onPointerLeave:(0,O.M)(e.onPointerLeave,()=>{i.onTriggerLeave(),c.current=!1}),onPointerDown:(0,O.M)(e.onPointerDown,()=>{u.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:(0,O.M)(e.onFocus,()=>{u.current||i.onOpen()}),onBlur:(0,O.M)(e.onBlur,i.onClose),onClick:(0,O.M)(e.onClick,e=>{let t=0===e.detail;t&&i.onClose()})})))}),tR="TooltipPortal",[tD,tL]=tk(tR,{forceMount:void 0}),tF="TooltipContent",tV=(0,x.forwardRef)((e,t)=>{let n=tL(tF,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i="top",...o}=e,a=tP(tF,e.__scopeTooltip);return(0,x.createElement)(P.z,{present:r||a.open},a.disableHoverableContent?(0,x.createElement)(tB,(0,E.Z)({side:i},o,{ref:t})):(0,x.createElement)(tI,(0,E.Z)({side:i},o,{ref:t})))}),tI=(0,x.forwardRef)((e,t)=>{let n=tP(tF,e.__scopeTooltip),r=tC(tF,e.__scopeTooltip),i=(0,x.useRef)(null),o=(0,j.e)(t,i),[a,s]=(0,x.useState)(null),{trigger:l,onClose:u}=n,c=i.current,{onPointerInTransitChange:d}=r,f=(0,x.useCallback)(()=>{s(null),d(!1)},[d]),h=(0,x.useCallback)((e,t)=>{let n=e.currentTarget,r={x:e.clientX,y:e.clientY},i=function(e,t){let n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(n,r,i,o)){case o:return"left";case i:return"right";case n:return"top";case r:return"bottom";default:return null}}(r,n.getBoundingClientRect()),o="right"===i||"bottom"===i?-5:5,a="right"===i||"left"===i?{x:e.clientX+o,y:e.clientY}:{x:e.clientX,y:e.clientY+o},l=function(e){let{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}(t.getBoundingClientRect()),u=function(e){let t=e.slice();return t.sort((e,t)=>e.xt.x?1:e.yt.y?1:0),function(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n=2;){let e=t[t.length-1],n=t[t.length-2];if((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x))t.pop();else break}t.push(r)}t.pop();let n=[];for(let t=e.length-1;t>=0;t--){let r=e[t];for(;n.length>=2;){let e=n[n.length-1],t=n[n.length-2];if((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x))n.pop();else break}n.push(r)}return(n.pop(),1===t.length&&1===n.length&&t[0].x===n[0].x&&t[0].y===n[0].y)?t:t.concat(n)}(t)}([a,...l]);s(u),d(!0)},[d]);return(0,x.useEffect)(()=>()=>f(),[f]),(0,x.useEffect)(()=>{if(l&&c){let e=e=>h(e,c),t=e=>h(e,l);return l.addEventListener("pointerleave",e),c.addEventListener("pointerleave",t),()=>{l.removeEventListener("pointerleave",e),c.removeEventListener("pointerleave",t)}}},[l,c,h,f]),(0,x.useEffect)(()=>{if(a){let e=e=>{let t=e.target,n={x:e.clientX,y:e.clientY},r=(null==l?void 0:l.contains(t))||(null==c?void 0:c.contains(t)),i=!function(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,o=t.length-1;er!=u>r&&n<(l-a)*(r-s)/(u-s)+a;c&&(i=!i)}return i}(n,a);r?f():i&&(f(),u())};return document.addEventListener("pointermove",e),()=>document.removeEventListener("pointermove",e)}},[l,c,a,u,f]),(0,x.createElement)(tB,(0,E.Z)({},e,{ref:o}))}),[tz,tZ]=tk(tM,{isInside:!1}),tB=(0,x.forwardRef)((e,t)=>{let{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:o,onPointerDownOutside:a,...s}=e,l=tP(tF,n),u=t_(n),{onClose:c}=l;return(0,x.useEffect)(()=>(document.addEventListener(tS,c),()=>document.removeEventListener(tS,c)),[c]),(0,x.useEffect)(()=>{if(l.trigger){let e=e=>{let t=e.target;null!=t&&t.contains(l.trigger)&&c()};return window.addEventListener("scroll",e,{capture:!0}),()=>window.removeEventListener("scroll",e,{capture:!0})}},[l.trigger,c]),(0,x.createElement)(es.XB,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:e=>e.preventDefault(),onDismiss:c},(0,x.createElement)(th,(0,E.Z)({"data-state":l.stateAttribute},u,s,{ref:t,style:{...s.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)"}}),(0,x.createElement)(_.A4,null,r),(0,x.createElement)(tz,{scope:n,isInside:!0},(0,x.createElement)(tE,{id:l.contentId,role:"tooltip"},i||r))))}),tH=e=>{let{__scopeTooltip:t,children:n,open:r,defaultOpen:i=!1,onOpenChange:o,disableHoverableContent:a,delayDuration:s}=e,l=tC(tM,e.__scopeTooltip),u=t_(t),[c,d]=(0,x.useState)(null),f=(0,T.M)(),h=(0,x.useRef)(0),p=null!=a?a:l.disableHoverableContent,m=null!=s?s:l.delayDuration,v=(0,x.useRef)(!1),[g=!1,y]=(0,C.T)({prop:r,defaultProp:i,onChange:e=>{e?(l.onOpen(),document.dispatchEvent(new CustomEvent(tS))):l.onClose(),null==o||o(e)}}),b=(0,x.useMemo)(()=>g?v.current?"delayed-open":"instant-open":"closed",[g]),w=(0,x.useCallback)(()=>{window.clearTimeout(h.current),v.current=!1,y(!0)},[y]),E=(0,x.useCallback)(()=>{window.clearTimeout(h.current),y(!1)},[y]),k=(0,x.useCallback)(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{v.current=!0,y(!0)},m)},[m,y]);return(0,x.useEffect)(()=>()=>window.clearTimeout(h.current),[]),(0,x.createElement)(tx,u,(0,x.createElement)(tA,{scope:t,contentId:f,open:g,stateAttribute:b,trigger:c,onTriggerChange:d,onTriggerEnter:(0,x.useCallback)(()=>{l.isOpenDelayed?k():w()},[l.isOpenDelayed,k,w]),onTriggerLeave:(0,x.useCallback)(()=>{p?E():window.clearTimeout(h.current)},[E,p]),onOpen:w,onClose:E,disableHoverableContent:p},n))},tU=e=>{let{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,o=tP(tR,t);return(0,x.createElement)(tD,{scope:t,forceMount:n},(0,x.createElement)(P.z,{present:n||o.open},(0,x.createElement)(tw.h,{asChild:!0,container:i},r)))},tW=(0,ea.j)([],{variants:{display:{default:"inline-block",none:""},font:{mono:"font-mono",sans:"font-sans"},color:{verySubtle:"text-gray-700 dark:text-graydark-700",subtle:"text-gray-1000 dark:text-graydark-1000",contrast:"text-gray-1100 dark:text-white",lo:"text-white dark:text-graydark-50",accent:"text-accent-1100 dark:text-accentdark-1100",red:"text-red-700 dark:text-red-400",green:"text-emerald-700 dark:text-emerald-500",amber:"text-amber-600 dark:text-amber-500",none:""},weight:{extrabold:"font-extrabold",bold:"font-bold",medium:"font-medium",semibold:"font-semibold",regular:"font-normal",normal:"font-normal",light:"font-light",none:""},size:{10:"text-xxs",12:"text-xs",14:"text-sm",16:"text-base",18:"text-lg",20:"text-xl",24:"text-2xl",30:"text-3xl",36:"text-4xl",40:"text-5xl",48:"text-5xl",60:"text-6xl",64:"text-6xl"},scaleSize:{12:"text-xxs md:text-xs",14:"text-xs md:text-sm",16:"text-sm md:text-base",18:"text-base md:text-lg",20:"text-base md:text-xl",24:"text-xl md:text-2xl",30:"text-2xl md:text-3xl",36:"text-3xl md:text-4xl",40:"text-4xl md:text-5xl",48:"text-4xl md:text-5xl",60:"text-5xl md:text-6xl",64:"text-5xl md:text-6xl"},noWrap:{true:"whitespace-nowrap"},underline:{accent:"underline underline-offset-2 decoration-2 decoration-accent-900 dark:decoration-accentdark-900",show:"underline underline-offset-2 decoration-gray-1100 dark:decoration-gray-500",hover:"hover:underline underline-offset-2 decoration-gray-1100 dark:decoration-gray-500",none:""},ellipsis:{true:"overflow-hidden text-ellipsis whitespace-nowrap"},wrapEllipsis:{true:"overflow-hidden text-ellipsis"}},defaultVariants:{display:"default",weight:"regular",font:"sans",color:"contrast",underline:"none"}}),tq=x.forwardRef((e,t)=>{let{tag:n="span",className:r,font:i,color:o,weight:a,size:s,scaleSize:l,noWrap:u,underline:c,ellipsis:d,wrapEllipsis:f,...h}=e;return(0,b.jsx)(n,{ref:t,className:(0,ea.cx)(r,tW({font:i,color:o,weight:a,size:s,scaleSize:l,underline:c,noWrap:u,ellipsis:d,wrapEllipsis:f})),...h})}),t$=x.forwardRef((e,t)=>{let{size:n="18",...r}=e;return(0,b.jsx)(tq,{tag:"p",...r,ref:t,weight:"regular",scaleSize:n,color:"subtle",className:(0,ea.cx)("leading-relaxed md:leading-relaxed",e.className)})}),tY=(0,ea.j)(["bg-white dark:bg-graydark-200","transition-shadow ease-in-out duration-300","shadow-sm hover:shadow","rounded","border","border-gray-400 dark:border-graydark-400"]),tG=x.forwardRef((e,t)=>{let{className:n,...r}=e;return(0,b.jsx)("div",{ref:t,className:tY({className:n}),...r})});var tK=n(34406);let tX=(void 0===tK||tK.env,"production"),tQ=1/60*1e3,tJ="undefined"!=typeof performance?()=>performance.now():()=>Date.now(),t0="undefined"!=typeof window?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(tJ()),tQ),t1=!0,t2=!1,t4=!1,t3={delta:0,timestamp:0},t5=["read","update","preRender","render","postRender"],t6=t5.reduce((e,t)=>(e[t]=function(e){let t=[],n=[],r=0,i=!1,o=!1,a=new WeakSet,s={schedule:(e,o=!1,s=!1)=>{let l=s&&i,u=l?t:n;return o&&a.add(e),-1===u.indexOf(e)&&(u.push(e),l&&i&&(r=t.length)),e},cancel:e=>{let t=n.indexOf(e);-1!==t&&n.splice(t,1),a.delete(e)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length)for(let n=0;nt2=!0),e),{}),t8=t5.reduce((e,t)=>{let n=t6[t];return e[t]=(e,t=!1,r=!1)=>(t2||nn(),n.schedule(e,t,r)),e},{}),t7=t5.reduce((e,t)=>(e[t]=t6[t].cancel,e),{}),t9=t5.reduce((e,t)=>(e[t]=()=>t6[t].process(t3),e),{}),ne=e=>t6[e].process(t3),nt=e=>{t2=!1,t3.delta=t1?tQ:Math.max(Math.min(e-t3.timestamp,40),1),t3.timestamp=e,t4=!0,t5.forEach(ne),t4=!1,t2&&(t1=!1,t0(nt))},nn=()=>{t2=!0,t1=!0,t4||t0(nt)},nr=()=>t3,ni="undefined"!=typeof document,no=ni?x.useLayoutEffect:x.useEffect;function na(){let e=(0,x.useRef)(!1);return no(()=>(e.current=!0,()=>{e.current=!1}),[]),e}let ns=(0,x.createContext)(null);function nl(e){let t=(0,x.useRef)(null);return null===t.current&&(t.current=e()),t.current}class nu extends x.Component{getSnapshotBeforeUpdate(e){let t=this.props.childRef.current;if(t&&e.isPresent&&!this.props.isPresent){let e=this.props.sizeRef.current;e.height=t.offsetHeight||0,e.width=t.offsetWidth||0,e.top=t.offsetTop,e.left=t.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function nc({children:e,isPresent:t}){let n=(0,x.useId)(),r=(0,x.useRef)(null),i=(0,x.useRef)({width:0,height:0,top:0,left:0});return(0,x.useInsertionEffect)(()=>{let{width:e,height:o,top:a,left:s}=i.current;if(t||!r.current||!e||!o)return;r.current.dataset.motionPopId=n;let l=document.createElement("style");return document.head.appendChild(l),l.sheet&&l.sheet.insertRule(` [data-motion-pop-id="${n}"] { position: absolute !important; width: ${e}px !important; diff --git a/hostd/assets/config.html b/hostd/assets/config.html index a73d73d34..7a0df400b 100644 --- a/hostd/assets/config.html +++ b/hostd/assets/config.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/hostd/assets/contracts.html b/hostd/assets/contracts.html index e2517ff79..40fec595f 100644 --- a/hostd/assets/contracts.html +++ b/hostd/assets/contracts.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/hostd/assets/index.html b/hostd/assets/index.html index dabf5decd..0e7bf257d 100644 --- a/hostd/assets/index.html +++ b/hostd/assets/index.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/hostd/assets/login.html b/hostd/assets/login.html index ca849b942..ee60bddc8 100644 --- a/hostd/assets/login.html +++ b/hostd/assets/login.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/hostd/assets/node.html b/hostd/assets/node.html index 68d647f81..6776c1b01 100644 --- a/hostd/assets/node.html +++ b/hostd/assets/node.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/hostd/assets/volumes.html b/hostd/assets/volumes.html index cfd6eda3f..03092dcb2 100644 --- a/hostd/assets/volumes.html +++ b/hostd/assets/volumes.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/hostd/assets/wallet.html b/hostd/assets/wallet.html index ea883847f..48f2efccd 100644 --- a/hostd/assets/wallet.html +++ b/hostd/assets/wallet.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file