p.length-2?p.length-1:e.length-l;r>0;r--)if(void 0!==p[r])for(i=0;i0&&kr)s.push(e);else{for(;r>=i&&!c||c&&i1)throw new n.Exception("Uncaught Syntax error");return o[0].value>1e15?"Infinity":parseFloat(o[0].value.toFixed(15))},n.eval=function(e,t,r){return void 0===t?this.lex(e).toPostfix().postfixEval():void 0!==r?this.lex(e,t).toPostfix().postfixEval(r):void 0!==t.length?this.lex(e,t).toPostfix().postfixEval():this.lex(e).toPostfix().postfixEval(t)},e.exports=n},38617:function(e,t,r){"use strict";r.d(t,{F:function(){return u},f:function(){return c}});var n=r(2784);let i=["light","dark"],o="(prefers-color-scheme: dark)",a="undefined"==typeof window,s=(0,n.createContext)(void 0),l={setTheme:e=>{},themes:[]},u=()=>{var e;return null!==(e=(0,n.useContext)(s))&&void 0!==e?e:l},c=e=>(0,n.useContext)(s)?n.createElement(n.Fragment,null,e.children):n.createElement(f,e),d=["light","dark"],f=({forcedTheme:e,disableTransitionOnChange:t=!1,enableSystem:r=!0,enableColorScheme:a=!0,storageKey:l="theme",themes:u=d,defaultTheme:c=r?"system":"light",attribute:f="data-theme",value:g,children:y,nonce:x})=>{let[b,w]=(0,n.useState)(()=>p(l,c)),[j,E]=(0,n.useState)(()=>p(l)),k=g?Object.values(g):u,C=(0,n.useCallback)(e=>{let n=e;if(!n)return;"system"===e&&r&&(n=v());let o=g?g[n]:n,s=t?m():null,l=document.documentElement;if("class"===f?(l.classList.remove(...k),o&&l.classList.add(o)):o?l.setAttribute(f,o):l.removeAttribute(f),a){let e=i.includes(c)?c:null,t=i.includes(n)?n:e;l.style.colorScheme=t}null==s||s()},[]),S=(0,n.useCallback)(e=>{w(e);try{localStorage.setItem(l,e)}catch(e){}},[e]),O=(0,n.useCallback)(t=>{E(v(t)),"system"===b&&r&&!e&&C("system")},[b,e]);(0,n.useEffect)(()=>{let e=window.matchMedia(o);return e.addListener(O),O(e),()=>e.removeListener(O)},[O]),(0,n.useEffect)(()=>{let e=e=>{e.key===l&&S(e.newValue||c)};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)},[S]),(0,n.useEffect)(()=>{C(null!=e?e:b)},[e,b]);let _=(0,n.useMemo)(()=>({theme:b,setTheme:S,forcedTheme:e,resolvedTheme:"system"===b?j:b,themes:r?[...u,"system"]:u,systemTheme:r?j:void 0}),[b,S,e,j,r,u]);return n.createElement(s.Provider,{value:_},n.createElement(h,{forcedTheme:e,disableTransitionOnChange:t,enableSystem:r,enableColorScheme:a,storageKey:l,themes:u,defaultTheme:c,attribute:f,value:g,children:y,attrs:k,nonce:x}),y)},h=(0,n.memo)(({forcedTheme:e,storageKey:t,attribute:r,enableSystem:a,enableColorScheme:s,defaultTheme:l,value:u,attrs:c,nonce:d})=>{let f="system"===l,h="class"===r?`var d=document.documentElement,c=d.classList;c.remove(${c.map(e=>`'${e}'`).join(",")});`:`var d=document.documentElement,n='${r}',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,n=!0)=>{let o=u?u[e]:e,a=t?e+"|| ''":`'${o}'`,l="";return s&&n&&!t&&i.includes(e)&&(l+=`d.style.colorScheme = '${e}';`),"class"===r?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 n.createElement("script",{nonce:d,dangerouslySetInnerHTML:{__html:v}})},()=>!0),p=(e,t)=>{let r;if(!a){try{r=localStorage.getItem(e)||void 0}catch(e){}return r||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")},93542:function(e,t,r){"use strict";var n,i;e.exports=(null==(n=r.g.process)?void 0:n.env)&&"object"==typeof(null==(i=r.g.process)?void 0:i.env)?r.g.process:r(42351)},86570:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/_app",function(){return r(65047)}])},7513:function(e,t,r){"use strict";r.d(t,{Ul:function(){return s},WD:function(){return l},fu:function(){return c},o4:function(){return u}});var n=r(52322),i=r(14522),o=r(82851),a=r(65304);function s(e){let{currentPage:t,parentPage:r,commandPage:s,className:l,...u}=e,c=(0,a.U8)(e=>e.search);if((null==r?void 0:r.namespace)===(null==t?void 0:t.namespace)&&!c)return(0,n.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:r,className:s,...l}=e,u=(0,a.U8)(e=>e.search),c=r.namespace.startsWith((null==t?void 0:t.namespace)||"");if(u&&c||r.namespace===(null==t?void 0:t.namespace))return(0,n.jsx)(a.mY.Item,{className:(0,o.cx)((0,i.Vkc)(),"group",s),value:"".concat(r.label," ").concat(l.children.toString()),...l})}function u(e){let{currentPage:t,commandPage:r,className:s,...l}=e,u=(0,a.U8)(e=>e.search),c=r.namespace.startsWith((null==t?void 0:t.namespace)||"");if(u&&c||!t||r.namespace===(null==t?void 0:t.namespace))return(0,n.jsx)(a.mY.Item,{className:(0,o.cx)((0,i.Vkc)(),"group",s),value:"".concat(r.label," ").concat(l.children.toString()),...l})}function c(e){let{heading:t,currentPage:r,commandPage:o,...s}=e,l=(0,a.U8)(e=>e.search);return(0,n.jsx)(a.mY.Group,{heading:l&&(null==r?void 0:r.namespace)!==o.namespace&&(0,n.jsx)(i.__J,{className:"px-1",size:"12",children:o.label}),...s})}r(2784)},63328:function(e,t,r){"use strict";r.d(t,{F:function(){return y}});var n=r(52322),i=r(7513);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:r}=e;return(0,n.jsx)(i.fu,{currentPage:r,commandPage:o,children:a.map(e=>(0,n.jsx)(i.WD,{currentPage:r,commandPage:o,onSelect:()=>{t(e)},children:e.label},e.id+e.value))})}var l=r(54494),u=r(32088);let c={namespace:"contracts/filterAddress",label:"Contracts filter by ID"};function d(e){let{select:t,currentPage:r}=e,{openDialog:o}=(0,l.Rh)(),a=(0,u.O)("");return(0,n.jsx)(i.fu,{currentPage:r,commandPage:c,children:(0,n.jsx)(i.WD,{currentPage:r,commandPage:c,onSelect:()=>{t(),o("contractsFilterContractId")},children:a.label})})}function f(e){let{select:t,currentPage:r,parentPage:o,commandPage:a}=e,{openDialog:s}=(0,l.Rh)();return(0,n.jsx)(i.Ul,{currentPage:r,parentPage:o,commandPage:a,onSelect:()=>{t(),s("contractsFilterContractId")},children:c.label})}function h(e){let{currentPage:t,select:r}=e;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s,{currentPage:t,select:r}),(0,n.jsx)(d,{currentPage:t,select:r})]})}let p={namespace:"contracts",label:"Contracts"};function m(e){let{currentPage:t,parentPage:r,pushPage:a,select:s}=e;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(i.Ul,{currentPage:t,parentPage:r,commandPage:p,onSelect:()=>{a(o)},children:o.label}),(0,n.jsx)(f,{currentPage:t,parentPage:r,commandPage:p,select:s})]})}var v=r(65717),g=r(2784);function y(e){let{currentPage:t,parentPage:r,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,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(m,{parentPage:r,currentPage:t,pushPage:i,select:l}),(0,n.jsx)(h,{currentPage:t,select:l})]})}},4300:function(e,t,r){"use strict";r.d(t,{_:function(){return i},h:function(){return o}});var n=r(79338);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=n.ay},99634:function(e,t,r){"use strict";r.d(t,{h:function(){return n}});let n=(0,r(60381).XB)(15)},29703:function(e,t,r){"use strict";r.d(t,{iV:function(){return j},ZR:function(){return w}});var n=r(52322),i=r(2784),o=r(14522),a=r(60381),s=r(83906),l=r(6391),u=r.n(l);let c=[{value:"",label:"Off"},{value:"route53",label:"Route 53"},{value:"noip",label:"No-IP"},{value:"duckdns",label:"Duck DNS"},{value:"cloudflare",label:"Cloudflare"}],d={pinnedCurrency:"",pinnedThreshold:new(u())(0),shouldPinStoragePrice:!1,storagePricePinned:new(u())(0),shouldPinEgressPrice:!1,egressPricePinned:new(u())(0),shouldPinIngressPrice:!1,ingressPricePinned:new(u())(0),shouldPinMaxCollateral:!1,maxCollateralPinned:new(u())(0)},f={acceptingContracts:!1,netAddress:"",maxContractDuration:void 0,contractPrice:void 0,baseRPCPrice:void 0,sectorAccessPrice:void 0,storagePrice:void 0,egressPrice:void 0,ingressPrice:void 0,collateralMultiplier:void 0,maxCollateral:void 0,priceTableValidity: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:"",...d};function h(e){let{settings:t,settingsPinned:r}=e,n=null;return"duckdns"===t.ddns.provider&&(n={dnsDuckDnsToken:t.ddns.options.token}),"noip"===t.ddns.provider&&(n={dnsNoIpEmail:t.ddns.options.email,dnsNoIpPassword:t.ddns.options.password}),"route53"===t.ddns.provider&&(n={dnsAwsId:t.ddns.options.id,dnsAwsSecret:t.ddns.options.secret,dnsAwsZoneId:t.ddns.options.zoneID}),"cloudflare"===t.ddns.provider&&(n={dnsCloudflareToken:t.ddns.options.token,dnsCloudflareZoneId:t.ddns.options.zoneID}),{acceptingContracts:t.acceptingContracts,netAddress:t.netAddress,maxContractDuration:new(u())(t.maxContractDuration).div((0,a.S5)(1)),contractPrice:(0,a.ll)(t.contractPrice,6),baseRPCPrice:(0,a.ll)((0,s.sS)(t.baseRPCPrice),6),sectorAccessPrice:(0,a.ll)((0,s.nS)(t.sectorAccessPrice),6),collateralMultiplier:new(u())(t.collateralMultiplier),maxCollateral:(0,a.ll)(t.maxCollateral,6),storagePrice:(0,a.ll)((0,s.SY)(t.storagePrice),6),egressPrice:(0,a.ll)((0,s.B1)(t.egressPrice),6),ingressPrice:(0,a.ll)((0,s.dK)(t.ingressPrice),6),priceTableValidity:new(u())(t.priceTableValidity).div(1e9).div(60),accountExpiry:new(u())(t.accountExpiry).div(1e9).div(86400),maxAccountBalance:(0,a.ll)(t.maxAccountBalance,6),ingressLimit:(0,a.BT)(new(u())(t.ingressLimit)),egressLimit:(0,a.BT)(new(u())(t.egressLimit)),dnsProvider:t.ddns.provider,dnsIpv4:t.ddns.ipv4,dnsIpv6:t.ddns.ipv6,...n,...r?{pinnedCurrency:r.currency,pinnedThreshold:new(u())(r.threshold).times(100),shouldPinMaxCollateral:r.maxCollateral.pinned,maxCollateralPinned:new(u())(r.maxCollateral.value),shouldPinStoragePrice:r.storage.pinned,storagePricePinned:new(u())(r.storage.value),shouldPinEgressPrice:r.egress.pinned,egressPricePinned:new(u())(r.egress.value),shouldPinIngressPrice:r.ingress.pinned,ingressPricePinned:new(u())(r.ingress.value)}:d}}var p=r(63694),m=r(63955),v=r(36219);function g(e,t){return t?new(u())(new(u())(e).div(t).div(10).toFixed(0)).times(10):void 0}function y(e,t){return(r,n)=>!e.pinningEnabled||(t?t(r,n):!!r||"required")}var x=r(92762);let b=(0,i.createContext)({}),w=()=>(0,i.useContext)(b);function j(e){let{children:t}=e,r=function(){var e;let{settings:t,settingsPinned:r,dynDNSCheck:l}={settings:(0,p.rV)({config:{swr:{refreshInterval:(0,a.sW)(1)}}}),settingsPinned:(0,p.E5)({config:{swr:{refreshInterval:(0,a.sW)(1),errorRetryCount:0}}}),dynDNSCheck:(0,p.WT)({config:{swr:{revalidateOnFocus:!1,errorRetryCount:0}}})},{form:d,fields:b,configViewMode:w,setConfigViewMode:j}=function(){var e;let t=(0,m.cI)({mode:"all",defaultValues:f}),r=t.watch("storagePrice"),o=t.watch("collateralMultiplier"),[s,l]=(0,x.Z)("v0/config/mode",{defaultValue:"basic"});!function(e){let{form:t}=e,r=(0,i.useMemo)(()=>({}),[]);(0,i.useEffect)(()=>{for(let[e,n]of Object.entries(r))t.setValue(e,n,{shouldValidate:!0,shouldDirty:!0,shouldTouch:!0})},[t,r])}({form:t});let d=(0,v.J)({currency:"usd"}),h=(0,p.ER)(),b=null===(e=h.data)||void 0===e?void 0:e.explorer.enabled,w=(0,i.useRef)({pinningEnabled:b});return(0,i.useEffect)(()=>{w.current.pinningEnabled=b},[b]),{form:t,fields:(0,i.useMemo)(()=>{var e;return function(e){let{pinningEnabled:t,configViewMode:r,storageTBMonth:i,collateralMultiplier:o,exchangeRateUSD:s,validationContext:l}=e;return{acceptingContracts:{type:"boolean",category:"host",title:"Accepting contracts",description:(0,n.jsx)(n.Fragment,{children:"Whether or not the host is accepting contracts."}),validation:{}},netAddress:{type:"text",category:"host",title:"Address",description:(0,n.jsx)(n.Fragment,{children:"The network address of the host."}),placeholder:"my.host.com",validation:{required:"required",validate:{noProtocol:e=>!/^https?:\/\//.test(e||"")||"must not start with http:// or https://",noPort:e=>!/:\d+$/.test(e||"")||"must not include port"}}},maxContractDuration:{type:"number",category:"host",title:"Maximum contract duration",units:"months",decimalsLimit:2,suggestion:new(u())(6),suggestionTip:"The default maximum duration is 6 months.",description:(0,n.jsx)(n.Fragment,{children:"The maximum contract duration that the host will accept."}),hidden:"basic"===r,validation:{required:"required",validate:{min:e=>new(u())(e).gte((0,a.E6)(4320))||"must be at least 1 month"}}},pinnedCurrency:{title:"Pinned currency",description:"Currency to use for fields where price pinning is enabled.",type:"select",options:[...v.mV.map(e=>{let{id:t,label:r}=e;return{label:r,value:t}}),{label:"none",value:""}],hidden:!t,validation:{}},pinnedThreshold:{title:"Pinned currency change threshold",type:"number",suggestionTip:"A threshold of 2% is recommended.",suggestion:new(u())(2),units:"%",decimalsLimit:0,description:(0,n.jsx)(n.Fragment,{children:"Percentage that controls the minimum change in exchange rate that will trigger an update to pinned prices. This prevents the host from changing prices too often."}),hidden:!t||"basic"===r,validation:{validate:{required:y(l),max:y(l,e=>new(u())(e).lte(100)||"must be at most 100%"),min:y(l,e=>new(u())(e).gte(0)||"must be at least 0%")}}},shouldPinStoragePrice:{title:"Pin storage price",description:"",type:"boolean",category:"pricing",hidden:!t,validation:{}},storagePrice:{title:"Storage price",description:(0,n.jsx)(n.Fragment,{children:"The host's storage price per TB per month. Choose whether to set your storage price in siacoin per TB per month or to pin the siacoin price to a fixed fiat value per TB per month."}),type:"siacoin",category:"pricing",units:"SC/TB/month",decimalsLimitSc:6,suggestion:s?g(1,s):void 0,suggestionTip:"The suggested storage price in siacoins per TB per month.",validation:{required:"required"}},storagePricePinned:{title:"Pinned storage price",description:"",units:"/TB/month",type:"fiat",category:"pricing",hidden:!t,validation:{validate:{required:y(l),currency:y(l,(e,t)=>!!t.pinnedCurrency||"must select a pinned currency"),range:y(l,(e,t)=>!t.shouldPinStoragePrice||(null==e?void 0:e.gt(0))||"storage price must be greater than 0")}}},shouldPinEgressPrice:{title:"Pin egress price",description:"",type:"boolean",category:"pricing",hidden:!t,validation:{}},egressPrice:{title:"Egress price",description:(0,n.jsx)(n.Fragment,{children:"The host's egress price per TB per month. Egress means bandwidth usage by outgoing download traffic. Choose whether to set your egress price in siacoin per TB or to pin the siacoin price to a fixed fiat value per TB."}),type:"siacoin",category:"pricing",units:"SC/TB",decimalsLimitSc:6,suggestion:s?g(10,s):void 0,suggestionTip:"The suggested egress price in siacoins for egress per TB.",validation:{required:"required"}},egressPricePinned:{title:"Pinned egress price",description:"",type:"fiat",units:"/TB",category:"pricing",hidden:!t,validation:{validate:{required:y(l),currency:y(l,(e,t)=>!!t.pinnedCurrency||"must select a pinned currency"),range:y(l,(e,t)=>!t.shouldPinEgressPrice||(null==e?void 0:e.gt(0))||"egress price must be greater than 0")}}},shouldPinIngressPrice:{title:"Pin ingress price",description:"",type:"boolean",category:"pricing",hidden:!t,validation:{}},ingressPrice:{title:"Ingress price",description:(0,n.jsx)(n.Fragment,{children:"The host's ingress price per TB per month. Ingress means bandwidth usage by incoming upload traffic. Choose whether to set your ingress price in siacoin per TB or to pin the siacoin price to a fixed fiat value per TB."}),type:"siacoin",category:"pricing",units:"SC/TB",suggestion:s?g(.05,s):void 0,suggestionTip:"The suggested ingress price in siacoins per TB.",decimalsLimitSc:6,validation:{required:"required"}},ingressPricePinned:{title:"Pinned ingress price",description:"",type:"fiat",units:"/TB",category:"pricing",hidden:!t,validation:{validate:{required:y(l),currency:y(l,(e,t)=>!!t.pinnedCurrency||"must select a pinned currency"),range:y(l,(e,t)=>!t.shouldPinIngressPrice||(null==e?void 0:e.gt(0))||"ingress price must be greater than 0")}}},collateralMultiplier:{title:"Collateral multiplier",type:"number",category:"pricing",units:"* storage price",placeholder:"2",decimalsLimit:1,description:(0,n.jsx)(n.Fragment,{children:"The host's target collateral as a multiple of storage price."}),suggestion:new(u())(2),suggestionTip:"The default multiplier is 2x the storage price.",validation:{required:"required"}},shouldPinMaxCollateral:{title:"Pin max collateral",description:"",type:"boolean",category:"pricing",hidden:!t,validation:{}},maxCollateral:{title:"Max collateral",description:(0,n.jsx)(n.Fragment,{children:"The host's maximum collateral. Choose whether to set your max collateral price in siacoin or to pin the max collateral to a fixed fiat value."}),type:"siacoin",category:"pricing",decimalsLimitSc:6,suggestion:i&&o?!i||!o||(null==i?void 0:i.isZero())||(null==o?void 0:o.isZero())?new(u())(0):new(u())(12960).times(i).div((0,a.S5)(1)).times(o):void 0,suggestionTip:"The suggested maximum collateral, calculated based on the configured storage price and collateral multiplier.",validation:{required:"required"}},maxCollateralPinned:{title:"Pinned max collateral",description:"",type:"fiat",category:"pricing",hidden:!t||"basic"===r,validation:{validate:{required:y(l),currency:y(l,(e,t)=>!!t.pinnedCurrency||"must select a pinned currency"),range:y(l,(e,t)=>!t.shouldPinMaxCollateral||(null==e?void 0:e.gt(0))||"max collateral must be greater than 0")}}},contractPrice:{title:"Contract price",type:"siacoin",category:"pricing",decimalsLimitSc:6,suggestionTip:"The suggested contract price.",tipsDecimalsLimitSc:1,suggestion:new(u())(.2),description:(0,n.jsx)(n.Fragment,{children:"The host's contract price in siacoins."}),hidden:"basic"===r,validation:{required:"required"}},baseRPCPrice:{title:"Base RPC price",type:"siacoin",category:"pricing",units:"SC/million",suggestion:new(u())(1),suggestionTip:"The suggested base RPC price in siacoins per million calls.",decimalsLimitSc:6,description:(0,n.jsx)(n.Fragment,{children:"The host's base RPC price in siacoins per million calls."}),hidden:"basic"===r,validation:{required:"required"}},sectorAccessPrice:{title:"Sector access price",type:"siacoin",category:"pricing",units:"SC/million",decimalsLimitSc:6,suggestion:new(u())(1),suggestionTip:"The suggested sector access price in siacoins per million sectors.",description:(0,n.jsx)(n.Fragment,{children:"The host's sector access price in siacoins per million sectors."}),hidden:"basic"===r,validation:{required:"required"}},priceTableValidity:{title:"Price table validity",type:"number",category:"pricing",units:"minutes",suggestion:new(u())(30),suggestionTip:"The suggested price table validity.",description:(0,n.jsx)(n.Fragment,{children:"How long a renter's registered price table remains valid."}),hidden:"basic"===r,validation:{required:"required"}},accountExpiry:{title:"Expiry",type:"number",category:"RHP3",units:"days",suggestion:new(u())(30),suggestionTip:"The suggested account expiry.",description:(0,n.jsx)(n.Fragment,{children:"How long a renter's ephemeral accounts are inactive before the host prunes them and recovers the remaining funds."}),hidden:"basic"===r,validation:{required:"required",validate:{min:e=>new(u())(e).gte(7)||"must be at least 1 week"}}},maxAccountBalance:{title:"Maximum balance",type:"siacoin",category:"RHP3",suggestion:new(u())(10),suggestionTip:"The suggested maximum account balance.",description:(0,n.jsx)(n.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:"basic"===r,validation:{required:"required",validate:{min:e=>new(u())(e).gte(1)||"must be at least 1 SC"}}},ingressLimit:{title:"Ingress limit",type:"number",category:"bandwidth",units:"MB/second",description:(0,n.jsx)(n.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,n.jsx)(n.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:c,description:(0,n.jsx)(n.Fragment,{children:"Enable dynamic DNS with one of the supported providers."}),validation:{validate:e=>!!c.find(t=>t.value===e)||"must be one of supported providers"}},dnsIpv4:{title:"IPv4",type:"boolean",category:"DNS",description:(0,n.jsx)(n.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,n.jsx)(n.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,n.jsx)(n.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,n.jsx)(n.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,n.jsx)(n.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,n.jsx)(n.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,n.jsx)(n.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,n.jsx)(n.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,n.jsx)(n.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,n.jsx)(n.Fragment,{children:"Cloudflare zone ID."}),show:e=>"cloudflare"===e.dnsProvider,validation:{validate:(e,t)=>"cloudflare"!==t.dnsProvider||!!e||"required"}}}}({pinningEnabled:null===(e=h.data)||void 0===e?void 0:e.explorer.enabled,configViewMode:s,storageTBMonth:r,collateralMultiplier:o,exchangeRateUSD:d.rate,validationContext:w.current})},[s,r,o,d.rate,h.data]),storageTBMonth:r,collateralMultiplier:o,configViewMode:s,setConfigViewMode:l}}(),E=(0,i.useMemo)(()=>({settings:{data:t.data,error:t.error},settingsPinned:{data:r.data,error:r.error}}),[t.data,t.error,r.data,r.error]),k=(0,i.useMemo)(()=>!function(e){let{settings:t,settingsPinned:r}=e;return!!(t.data&&(r.data||r.error))}(E)?null:h({settings:E.settings.data,settingsPinned:E.settingsPinned.data}),[E]),C=(0,i.useMemo)(()=>(function(e){let{settings:t}=e;return!!t.error})(E),[E]),S=null===(e=(0,p.ER)().data)||void 0===e?void 0:e.explorer.enabled,O=(0,i.useCallback)(async()=>{let e=await t.mutate(),n=await r.mutate();if(e&&(!S||n))return await l.mutate(),d.reset(h({settings:e,settingsPinned:n}));(0,o.OHV)({title:"Error fetching settings"})},[d,t,r,l,S]);(0,o.u$d)({form:d,remoteValues:k}),(0,o.Z4p)({form:d,remoteValues:k});let{changeCount:_}=(0,o.mYE)({form:d}),M=function(e){let{resources:t,revalidateAndResetForm:r}=e,n=(0,p.ER)({config:{swr:{refreshInterval:(0,a.sW)(1)}}}),l=(0,p.Te)(),u=(0,p.Vp)();return(0,i.useCallback)(async e=>{if(t)try{var i,c,d,f;let h;let p=(f=t.settings.data,h=null,"duckdns"===e.dnsProvider&&(h={token:e.dnsDuckDnsToken}),"noip"===e.dnsProvider&&(h={email:e.dnsNoIpEmail,password:e.dnsNoIpPassword}),"route53"===e.dnsProvider&&(h={id:e.dnsAwsId,secret:e.dnsAwsSecret,zoneID:e.dnsAwsZoneId}),"cloudflare"===e.dnsProvider&&(h={token:e.dnsCloudflareToken,zoneID:e.dnsCloudflareZoneId}),{...f,acceptingContracts:e.acceptingContracts,netAddress:e.netAddress,maxContractDuration:Number(e.maxContractDuration.times((0,a.S5)(1)).toFixed(0)),contractPrice:(0,a.qN)(e.contractPrice).toString(),baseRPCPrice:e.baseRPCPrice.div((0,a.ll)((0,s.sS)(1))).toFixed(0),sectorAccessPrice:e.sectorAccessPrice.div((0,a.ll)((0,s.nS)(1))).toFixed(0),collateralMultiplier:e.collateralMultiplier.toNumber(),maxCollateral:(0,a.qN)(e.maxCollateral).toString(),storagePrice:e.storagePrice.div((0,a.ll)((0,s.SY)(1))).toFixed(0),egressPrice:e.egressPrice.div((0,a.ll)((0,s.B1)(1))).toFixed(0),ingressPrice:e.ingressPrice.div((0,a.ll)((0,s.dK)(1))).toFixed(0),priceTableValidity:Number(e.priceTableValidity.times(60).times(1e9).toFixed(0)),accountExpiry:Number(e.accountExpiry.times(86400).times(1e9).toFixed(0)),maxAccountBalance:(0,a.qN)(e.maxAccountBalance).toString(),ingressLimit:Number((0,a.Y)(e.ingressLimit).toFixed(0)),egressLimit:Number((0,a.Y)(e.egressLimit).toFixed(0)),ddns:{...null==f?void 0:f.ddns,provider:e.dnsProvider,ipv4:e.dnsIpv4,ipv6:e.dnsIpv6,options:h}}),m=await l.patch({payload:p});if(m.error)throw Error(m.error);if(null===(i=n.data)||void 0===i?void 0:i.explorer.enabled){let r=await u.put({payload:{...t.settingsPinned.data,currency:e.pinnedCurrency,threshold:e.pinnedThreshold.div(100).toNumber(),storage:{pinned:e.shouldPinStoragePrice,value:e.storagePricePinned.toNumber()},ingress:{pinned:e.shouldPinIngressPrice,value:e.ingressPricePinned.toNumber()},egress:{pinned:e.shouldPinEgressPrice,value:e.egressPricePinned.toNumber()},maxCollateral:{pinned:e.shouldPinMaxCollateral,value:e.maxCollateralPinned.toNumber()}}});if(r.error)throw Error(r.error)}(null===(d=n.data)||void 0===d?void 0:null===(c=d.lastAnnouncement)||void 0===c?void 0:c.address)!==e.netAddress?(0,o.OPV)({title:"Settings have been saved",body:"Address has changed, make sure to re-announce the host.",options:{duration:2e4}}):(0,o.OPV)({title:"Settings have been saved"}),await r()}catch(e){(0,o.OHV)({title:"Error updating settings",body:e.message}),console.log(e)}},[t,l,u,r,n.data])}({resources:E,revalidateAndResetForm:O}),A=(0,o.WsO)(b),P=(0,i.useMemo)(()=>d.handleSubmit(M,A),[d,M,A]),T=(0,i.useRef)();return{fields:b,settings:t,dynDNSCheck:l,changeCount:_,revalidateAndResetForm:O,form:d,onSubmit:P,setConfigViewMode:j,configViewMode:w,remoteError:C,takeScreenshot:(0,i.useCallback)(async e=>{(0,o.S5N)(T.current,e)},[]),configRef:T,pinningEnabled:S}}();return(0,n.jsx)(b.Provider,{value:r,children:t})}},65717:function(e,t,r){"use strict";r.d(t,{x:function(){return w},G:function(){return b}});var n=r(52322),i=r(14522),o=r(5632),a=r(63694),s=r(2784),l=r(46850),u=r(35138),c=r(60381),d=r(54494);function f(e){let{id:t,status:r,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)({title:"Error starting integrity check",body:e.error}):(0,i.OPV)({title:"Integrity check started",body:(0,n.jsxs)(n.Fragment,{children:["Depending on contract data size this operation can take a while. Check ",(0,n.jsx)(i.EKh,{children:"hostd"})," ",(0,n.jsx)(i.rUS,{onClick:()=>f("alerts"),children:"alerts"})," for status updates."]}),options:{duration:12e3}})},[t,c,f]),p=["active","pending"].includes(r);return(0,n.jsxs)(i.h_2,{trigger:(0,n.jsx)(i.zxk,{"aria-label":"contract context menu",icon:"hover",size:"none",...l,children:(0,n.jsx)(u.EMN,{})}),contentProps:{align:"start",...o},children:[(0,n.jsx)("div",{className:"px-1.5 py-1",children:(0,n.jsxs)(i.xvT,{size:"14",weight:"medium",color:"subtle",children:["Contract ",t.slice(0,24),"..."]})}),(0,n.jsx)(i.Juw,{children:"Actions"}),(0,n.jsx)(i.ua7,{content:p?"Trigger a data integrity check":"Data integrity check only available for active or pending contracts",children:(0,n.jsx)("div",{children:(0,n.jsxs)(i.Xiv,{disabled:!p,onSelect:()=>h(),children:[(0,n.jsx)(i.KpP,{children:(0,n.jsx)(u.dDl,{})}),"Integrity check"]})})})]})}let h=[{id:"actions",label:"",fixed:!0,contentClassName:"!pl-3 !pr-4",cellClassName:"w-[20px] !pl-0 !pr-0",heading:e=>{let{context:{multiSelect:t}}=e;return(0,n.jsx)(i.XZJ,{onClick:t.onSelectPage,checked:t.isPageAllSelected})},render:e=>{let{data:{id:t,status:r}}=e;return(0,n.jsx)(f,{id:t,status:r})}},{id:"contractId",label:"contract ID",category:"general",render:e=>{let{data:t,context:r}=e,{id:o,renewedFrom:a,isRenewedFrom:s,renewedTo:l,isRenewedTo:c}=t;return(0,n.jsxs)("div",{className:"flex flex-col gap-1 w-full",children:[(0,n.jsx)(i.XxW,{size:"12",value:(0,i.I13)(o),type:"contract",siascanUrl:r.siascanUrl}),s&&(0,n.jsx)(i.ua7,{content:"Renewed from",align:"start",children:(0,n.jsxs)("div",{className:"flex items-center",children:[(0,n.jsx)(i.xvT,{color:"subtle",children:(0,n.jsx)(u.L6f,{className:"scale-75"})}),(0,n.jsx)(i.XxW,{testId:"renewedFrom",color:"subtle",size:"10",type:"contract",value:(0,i.I13)(a),siascanUrl:r.siascanUrl})]})}),c&&(0,n.jsx)(i.ua7,{content:"Renewed to",align:"start",children:(0,n.jsxs)("div",{className:"flex items-center",children:[(0,n.jsx)(i.xvT,{color:"subtle",children:(0,n.jsx)(u.IRm,{className:"scale-75"})}),(0,n.jsx)(i.XxW,{testId:"renewedTo",color:"subtle",size:"10",value:(0,i.I13)(l),type:"contract",siascanUrl:r.siascanUrl})]})})]})}},{id:"status",label:"status",category:"general",render:e=>{let{data:{status:t}}=e;return(0,n.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:r,contractsTimeRange:o}}=e,{contractHeightStart:a,contractHeightEnd:s,revision:l,status:u}=t;return(0,n.jsx)("div",{className:"w-[400px]",children:(0,n.jsx)(i.TaT,{currentHeight:r,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:r}}=e;return(0,n.jsx)(i.xvT,{size:"12",children:(0,c.rN)((0,c.jr)(r,t))})}},{id:"contractHeightEnd",label:"expiration date",category:"time",contentClassName:"w-[120px] justify-end",render:e=>{let{data:{contractHeightEnd:t},context:{currentHeight:r}}=e;return(0,n.jsx)(i.xvT,{size:"12",children:(0,c.rN)((0,c.jr)(r,t))})}},{id:"payoutHeight",label:"payout date",category:"time",contentClassName:"w-[120px] justify-end",render:e=>{let{data:{payoutHeight:t},context:{currentHeight:r}}=e;return(0,n.jsx)(i.xvT,{size:"12",children:(0,c.rN)((0,c.jr)(r,t))})}},{id:"filesize",label:"data size",category:"general",contentClassName:"w-[120px] justify-end",render:e=>{let{data:{revision:{filesize:t}}}=e;return(0,n.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,n.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,n.jsx)(i.ho9,{displayBoth:!0,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,n.jsx)(i.ho9,{displayBoth:!0,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,n.jsx)(i.ho9,{displayBoth:!0,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,n.jsx)(i.ho9,{displayBoth:!0,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,n.jsx)(i.ho9,{displayBoth:!0,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,n.jsx)(i.ho9,{displayBoth:!0,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,n.jsx)(i.ho9,{displayBoth:!0,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,n.jsx)(i.ho9,{displayBoth:!0,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,n.jsx)(i.ho9,{displayBoth:!0,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,n.jsx)(i.ho9,{displayBoth:!0,size:"12",value:t.rpc})}}].map(e=>({...e,..."financial"===e.category?{icon:(0,n.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=r(6391),m=r.n(p),v=r(16211),g=r(66510),y=r(99634);let x=(0,s.createContext)({}),b=()=>(0,s.useContext)(x);function w(e){let{children:t}=e,r=function(){var e,t;let r=(0,o.useRouter)(),n=Number(r.query.limit||50),u=Number(r.query.offset||0),{filters:c,setFilter:d,removeFilter:f,removeLastFilter:p,resetFilters:x}=(0,i.Uu5)(),{configurableColumns:b,enabledColumns:w,sortableColumns:j,toggleColumnVisibility:E,setColumnsVisible:k,setColumnsHidden:C,toggleSort:S,setSortDirection:O,setSortField:_,sortField:M,sortDirection:A,resetDefaultColumnVisibility:P}=(0,i.oy6)("hostd/v0/contracts",{columns:h,columnsDefaultVisible:l.gd,sortOptions:l.Fo,defaultSortField:l.nw}),T=(0,a.GP)({payload:{limit:n,offset:u,sortField:null===(e=l.Fo.find(e=>e.id===M))||void 0===e?void 0:e.value,sortDesc:"desc"===A,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:y.h}}}),N=function(e){let{response:t}=e;return(0,s.useMemo)(()=>{var e;if(t.data)return(null===(e=t.data.contracts)||void 0===e?void 0:e.map(e=>(function(e){var t;let r=new(m())(e.usage.accountFunding||0),n=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=r.plus(n).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:r,egress:n,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:"0000000000000000000000000000000000000000000000000000000000000000"!==e.renewedFrom,isRenewedTo:"0000000000000000000000000000000000000000000000000000000000000000"!==e.renewedTo}})(e)))||[]},[t.data])}({response:T}),R=(0,s.useMemo)(()=>h.filter(e=>w.includes(e.id)),[w]),D=T.isValidating,L=T.error,F=(0,i.c2j)(N,D,L,c),{estimatedBlockHeight:Z,isSynced:V,nodeBlockHeight:z}=(0,v.n)(),I=V?z:Z,{range:B}=(0,s.useMemo)(()=>(0,i.EJC)(I,N||[]),[I,N]),H=(0,i.A7R)(N),U=(0,s.useMemo)(()=>{if(N)return N.map(e=>({...e,onClick:t=>H.onSelect(e.id,t),isSelected:!!H.selection[e.id]}))},[N,H]),W=(0,g.B)();return{dataState:F,offset:u,limit:n,cellContext:(0,s.useMemo)(()=>({contractsTimeRange:B,currentHeight:I,siascanUrl:W,multiSelect:H}),[B,I,W,H]),pageCount:(null==U?void 0:U.length)||0,totalCount:null===(t=T.data)||void 0===t?void 0:t.count,columns:R,datasetPage:U,configurableColumns:b,enabledColumns:w,sortableColumns:j,toggleColumnVisibility:E,setColumnsVisible:k,setColumnsHidden:C,toggleSort:S,setSortDirection:O,setSortField:_,sortField:M,sortDirection:A,resetDefaultColumnVisibility:P,filters:c,setFilter:d,removeFilter:f,removeLastFilter:p,resetFilters:x,multiSelect:H}}();return(0,n.jsx)(x.Provider,{value:r,children:t})}},46850:function(e,t,r){"use strict";r.d(t,{Fo:function(){return i},gd:function(){return n},nw:function(){return o}});let n=["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"},54494:function(e,t,r){"use strict";r.d(t,{Tu:function(){return ek},xQ:function(){return eC},Rh:function(){return eE}});var n=r(52322),i=r(2784),o=r(14522),a=r(63694),s=r(60381),l=r(6391),u=r.n(l),c=r(63955);function d(e,t,r){var n=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=!!(r=r||{}).leading,m=!("trailing"in r)||!!r.trailing,v="maxWait"in r,g=v?Math.max(+r.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,r=u.current;return l.current=u.current=null,a.current=e,c.current=d.current.apply(r,t)},r=function(e,t){h&&cancelAnimationFrame(s.current),s.current=h?requestAnimationFrame(e):setTimeout(e,t)},i=function(e){if(!f.current)return!1;var r=e-o.current;return!o.current||r>=t||r<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)},x=function e(){var n=Date.now();if(i(n))return y(n);if(f.current){var s=t-(n-o.current);r(e,v?Math.min(s,g-(n-a.current)):s)}},b=function(){var d=Date.now(),h=i(d);if(l.current=[].slice.call(arguments),u.current=n,o.current=d,h){if(!s.current&&f.current)return a.current=o.current,r(x,t),p?e(o.current):c.current;if(v)return r(x,t),e(o.current)}return s.current||r(x,t),c.current};return b.cancel=function(){s.current&&(h?cancelAnimationFrame(s.current):clearTimeout(s.current)),a.current=0,l.current=o.current=u.current=s.current=null},b.isPending=function(){return!!s.current},b.flush=function(){return s.current?y(Date.now()):c.current},b},[p,v,t,g,m,h])}function f(e){return"function"==typeof e?function(){return e}:e}var h=r(65304),p=r(7513),m=r(35138);function v(e){let{search:t}=e;return(0,n.jsxs)(o.xvT,{color:"verySubtle",className:"flex flex-col gap-2 justify-center items-center mt-5 mb-3",children:[(0,n.jsx)(o.xvT,{color:"verySubtle",className:"flex gap-2 justify-center items-center",children:(0,n.jsx)(m.Qbr,{})}),(0,n.jsx)(o.xvT,{size:"12",color:"verySubtle",className:"flex justify-center",children:t?"No matching directory.":"Select a directory to get started."})]})}function g(){var e;return(null===(e=(0,a.ER)({config:{swr:{revalidateOnFocus:!1,keepPreviousData:!0}}}).data)||void 0===e?void 0:e.os)==="windows"?"\\":"/"}var y=r(36556),x=r(90821),b=r(45904),w=function(e,t){for(var r=e.length;r--&&(0,b.Z)(t,e[r],0)>-1;);return r},j=r(51075),E=r(16601),k=r(62593),C=function(e,t,r){if((e=(0,E.Z)(e))&&(r||void 0===t))return e.slice(0,(0,k.Z)(e)+1);if(!e||!(t=(0,y.Z)(t)))return e;var n=(0,j.Z)(e),i=w(n,(0,j.Z)(t))+1;return(0,x.Z)(n,0,i).join("")},S=r(39982),O=function(e,t){for(var r=-1,n=e.length;++r-1;);return r},_=function(e,t,r){if((e=(0,E.Z)(e))&&(r||void 0===t))return(0,S.Z)(e);if(!e||!(t=(0,y.Z)(t)))return e;var n=(0,j.Z)(e),i=(0,j.Z)(t),o=O(n,i),a=w(n,i)+1;return(0,x.Z)(n,o,a).join("")};function M(e){let{currentPath:t,childPath:r,separator:n}=e;return"\\"===t&&r.endsWith(":")?r+n:A(t,r,n)}function A(e,t,r){e=e===r?e:C(e,r),t=_(t,r);let n="";return(n=e.length?t.length&&t!==r?e===r?r+t:e+r+t:e:t).endsWith(":")?n+r:n}function P(){return(0,n.jsxs)(o.xvT,{color:"verySubtle",className:"flex flex-col gap-2 justify-center items-center mt-5 mb-3",children:[(0,n.jsx)(o.xvT,{color:"verySubtle",className:"flex gap-2 justify-center items-center",children:(0,n.jsx)(m.Qbr,{})}),(0,n.jsx)(o.xvT,{size:"12",color:"verySubtle",className:"flex justify-center",children:"Error loading directory."})]})}function T(e){let{path:t,onCreate:r}=e,s=g(),l=(0,a.Kw)(),[u,c]=(0,i.useState)(""),d=(0,i.useCallback)(async()=>{let e=await l.put({payload:{path:M({currentPath:t,childPath:u,separator:s})}});e.error?(0,o.OHV)({title:"Error creating directory",body:e.error}):(r(u),c(""))},[l,u,r,t,s]);return(0,n.jsxs)("div",{className:"flex items-center gap-2 overflow-hidden w-full",children:[(0,n.jsx)(o.xvT,{color:"verySubtle",className:"group-data-[selected=true]:text-gray-1000 dark:group-data-[selected=true]:text-graydark-1000",children:(0,n.jsx)(m.L37,{})}),(0,n.jsx)("div",{className:"flex-1",children:(0,n.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 N(e){let{path:t,setPath:r,commandPage:i,currentPage:a,beforeSelect:s,afterSelect:l}=e,u=g();return(0,n.jsx)(p.WD,{commandPage:i,currentPage:a,onSelect:()=>{t&&(s&&s(),r(function(e,t){if(e.endsWith(":\\"))return t;let r="".concat(e.split(t).slice(0,-1).join(t));return""===r?t:r.endsWith(":")?r+t:r}(t,u)),l&&l())},value:"..",children:(0,n.jsxs)("div",{className:"flex items-center gap-2 overflow-hidden",children:[(0,n.jsx)(o.xvT,{color:"verySubtle",className:"group-data-[selected=true]:text-gray-1000 dark:group-data-[selected=true]:text-graydark-1000",children:(0,n.jsx)(m.ROc,{size:16})}),(0,n.jsx)(o.xvT,{ellipsis:!0,children:".."})]})},"..")}let R={namespace:"volumes/directorySelect",label:"Directory select"};function D(e){var t,r,i,a,s,l,u;let{path:c,dir:d,setPath:f,currentPage:y,beforeSelect:x,afterSelect:b}=e,w=g(),j=(null===(t=d.data)||void 0===t?void 0:t.path)===w,E=(null===(r=d.data)||void 0===r?void 0:r.path)==="\\";return(0,n.jsxs)(p.fu,{currentPage:y,commandPage:R,children:[d.isValidating||!d.data||d.error?null:j?null:(0,n.jsx)(N,{path:d.data.path,setPath:f,currentPage:y,commandPage:R,afterSelect:b,beforeSelect:x}),(0,n.jsxs)(h.mY.Empty,{children:[!d.isValidating&&d.error?(0,n.jsx)(P,{}):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,n.jsx)(v,{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,n.jsx)(p.WD,{commandPage:R,currentPage:y,onSelect:()=>{x&&x(),f(M({currentPath:d.data.path,childPath:e,separator:w})),b&&b()},value:e,children:(0,n.jsxs)("div",{className:"flex items-center gap-2 overflow-hidden",children:[(0,n.jsx)(o.xvT,{color:"verySubtle",className:"group-data-[selected=true]:text-gray-1000 dark:group-data-[selected=true]:text-graydark-1000",children:(0,n.jsx)(m.ROc,{size:16})}),(0,n.jsx)(o.xvT,{ellipsis:!0,children:e})]})},e)):null,!E&&!d.isValidating&&!d.error&&(0,n.jsx)(p.WD,{commandPage:R,currentPage:y,value:"create new directory",children:(0,n.jsx)(T,{path:null===(u=d.data)||void 0===u?void 0:u.path,onCreate:e=>{d.mutate(t=>{var r;return{...t,directories:(null==t?void 0:null===(r=t.directories)||void 0===r?void 0:r.concat(e))||[e]}})}})})]})}function L(e){let{path:t,dir:r,onChange:i}=e;return(0,n.jsx)(h.mY,{label:"Select volume",shouldFilter:!1,children:(0,n.jsx)(o.s_4,{className:"h-[200px] p-1 overflow-hidden",children:(0,n.jsx)(o.xrM,{keyToResetScrollbars:t,children:(0,n.jsx)(h.mY.List,{children:(0,n.jsx)(D,{path:t,dir:r,setPath:i,currentPage:R})})})})})}var F=r(82851);function Z(e){let{label:t,newSizeGB:r,currentSizeGB:i=0,maxSizeGB:a=0}=e,l=ir,c=r>a;return(0,n.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,n.jsxs)("div",{className:"relative w-full h-1 rounded-lg bg-gray-300 dark:bg-graydark-300 overflow-hidden",children:[(0,n.jsx)("div",{className:(0,F.cx)("absolute h-1 rounded-tl-lg rounded-bl-lg",void 0!==r&&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,n.jsx)("div",{className:(0,F.cx)("absolute h-1 rounded-tl-lg rounded-bl-lg",c?"bg-amber-500 dark:bg-amber-500":void 0!==r&&l?"bg-green-500 dark:bg-green-500":"bg-gray-700 dark:bg-graydark-800",u?"z-10":"z-0"),style:{width:a?"".concat(r/a*100,"%"):"0%"}})]}),(0,n.jsxs)("div",{className:"h-4 flex justify-between",children:[t||(0,n.jsx)("div",{}),void 0!==r&&a?(0,n.jsx)(o.xvT,{size:"12",color:"subtle",children:"".concat((r/a*100).toFixed(0),"% of ").concat((0,s.vW)((0,s.Hz)(a))," available")}):null]})]})}let V=new(u())(10),z={size:void 0,name:"",path:"~",immediatePath:"~"};function I(e){let{trigger:t,open:r,onOpenChange:l}=e,{closeDialog:f}=eE(),h=(0,a.HU)(),p=g(),m=(0,c.cI)({mode:"all",defaultValues:z}),v=m.watch("path"),y=m.watch("immediatePath"),x=m.watch("name"),b=m.watch("size"),w=d(()=>{v!==y&&m.setValue("path",y)},500);(0,i.useEffect)(()=>{w()},[y]),(0,i.useEffect)(()=>{v!==y&&m.setValue("immediatePath",v)},[v]);let j=(0,i.useCallback)(async e=>{let t=await h.post({payload:{localPath:A(v,x,p),maxSectors:(0,o.WN2)(e.size).toNumber()}});t.error?(0,o.OHV)({title:"Error creating volume",body:t.error}):((0,o.OPV)({title:"New volume created"}),m.reset(z),f())},[m,h,f,x,v,p]),E=(0,a.cM)({disabled:!r,params:{path:""===v?p:v},config:{swr:{shouldRetryOnError:!1}}});(0,i.useEffect)(()=>{E.error&&m.setError("immediatePath",{message:"Directory does not exist"})},[E.error]),(0,i.useEffect)(()=>{E.data&&E.data.path!==v&&m.setValue("path",E.data.path)},[E.data]);let k=(0,i.useMemo)(()=>b||new(u())(0),[b]),C=(0,i.useMemo)(()=>E.data?(0,s.Uz)(E.data.freeBytes):new(u())(0),[E.data]),S=(0,i.useMemo)(()=>{var e;return(0,s.Uz)((null===(e=E.data)||void 0===e?void 0:e.freeBytes)||new(u())(0))},[E.data]),O=(0,i.useMemo)(()=>{var e,t;return e=V.toNumber(),t=S.toNumber(),{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:r=>{let n="Must be between ".concat((0,s.vW)((0,s.Hz)(e))," and ").concat((0,s.vW)((0,s.Hz)(t),{fixed:3}));return r<=t&&r>=e||n},nospace:()=>t>e||"not enough space in directory"}}}}},[S]),_=(0,o.WsO)(O);return(0,i.useEffect)(()=>{m.register("path",O.path.validation)},[m,O.path.validation]),(0,n.jsx)(o.VqE,{title:"Create Volume",description:"Create a new volume. Select a system directory and specific the size of the volume.",trigger:t,open:r,onOpenChange:e=>{e||m.reset(z),l(e)},contentVariants:{className:"w-[400px]"},onSubmit:m.handleSubmit(j,_),controls:(0,n.jsx)("div",{className:"flex flex-col gap-1",children:(0,n.jsx)(o.ZqQ,{form:m,children:"Create"})}),children:(0,n.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,n.jsx)(o.yEL,{name:"name",form:m,fields:O}),(0,n.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,n.jsx)("div",{className:"flex flex-col gap-1",children:(0,n.jsx)(o.yEL,{name:"immediatePath",form:m,fields:O})}),(0,n.jsx)(L,{path:v,dir:E,onChange:e=>m.setValue("path",e,{shouldDirty:!0,shouldTouch:!0,shouldValidate:!0})})]}),(0,n.jsx)(o.jIp,{name:"size",form:m,fields:O}),(0,n.jsx)(Z,{newSizeGB:k.toNumber(),currentSizeGB:0,maxSizeGB:C.toNumber()})]})})}let B=new(u())(10);function H(e){var t,r;let{trigger:l,open:d,onOpenChange:f}=e,{id:h}=eE(),p=g(),m=(0,a.ST)({disabled:!d||!h,params:{id:h}}),v=(0,a.cM)({disabled:!d||!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)(),x={size:m.data?(0,o.bjP)(m.data.totalSectors):new(u())(0)},b=(0,c.cI)({mode:"all",defaultValues:x}),w=b.watch("size"),{closeAndReset:j,handleOpenChange:E}=(0,o.t0Y)({form:b,onOpenChange:f,defaultValues:x,initKey:[m.isLoading]}),k=(0,i.useCallback)(async e=>{let t=await y.put({params:{id:Number(h)},payload:{maxSectors:(0,o.WN2)(e.size).toNumber()}});t.error?(0,o.OHV)({title:"Error resizing volume",body:t.error}):((0,o.OPV)({title:"Volume resizing initiated"}),j())},[h,y,j]),C=(0,i.useMemo)(()=>w||new(u())(0),[w]),S=(0,i.useMemo)(()=>m.data?(0,o.bjP)(m.data.totalSectors):new(u())(0),[m.data]),O=(0,i.useMemo)(()=>v.data?(0,s.Uz)(v.data.freeBytes):new(u())(0),[v.data]),_=(0,i.useMemo)(()=>S.plus(O),[S,O]),M=S.lt(C),A=S.minus(C).abs().gte(1),P=(0,i.useMemo)(()=>{var e,t;return e=B.toNumber(),t=_.toNumber(),{size:{type:"number",title:"New size",decimalsLimit:0,units:"GB",placeholder:"1,000",validation:{required:"required",validate:{between:r=>{let n="Must be between ".concat((0,s.vW)((0,s.Hz)(e))," and ").concat((0,s.vW)((0,s.Hz)(t),{fixed:3}));return(null==r?void 0:r.lte(t))&&(null==r?void 0:r.gte(e))||n}}}}}},[_]),T=(0,o.WsO)(P);return(0,n.jsx)(o.VqE,{title:"Resize Volume",trigger:l,open:d,onOpenChange:E,contentVariants:{className:"max-w-[400px]"},onSubmit:b.handleSubmit(k,T),controls:(0,n.jsx)("div",{className:"flex flex-col gap-1",children:(0,n.jsx)(o.ZqQ,{form:b,children:"Resize"})}),children:(0,n.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,n.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,n.jsx)(o.EKh,{children:"hostd"})," is unable to migrate the data, an error will be returned and the operation will be stopped."]}),(0,n.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,n.jsx)(o.__J,{children:"Volume"}),(0,n.jsx)(o.xvT,{font:"mono",ellipsis:!0,children:null===(r=m.data)||void 0===r?void 0:r.localPath})]}),(0,n.jsx)(o.jIp,{name:"size",form:b,fields:P}),(0,n.jsx)(Z,{currentSizeGB:S.toNumber(),newSizeGB:C.toNumber(),maxSizeGB:_.toNumber(),label:A?(0,n.jsx)(o.xvT,{size:"12",color:"subtle",children:M?"Increase by ".concat((0,s.vW)((0,s.Hz)(C.minus(S)))):"Decrease by ".concat((0,s.vW)((0,s.Hz)(S.minus(C))))}):(0,n.jsx)(o.xvT,{size:"12",color:"subtle",children:"Current size is ".concat((0,s.vW)((0,s.Hz)(S)))})})]})})}let U={path:"",force:!1};function W(e){var t,r,l;let{trigger:u,open:d,onOpenChange:f}=e,{id:h,closeDialog:p}=eE(),m=(0,a.uq)(),v=(0,a.ST)({disabled:!d||!h,params:{id:h}}),g=(0,o.x9T)(null===(t=v.data)||void 0===t?void 0:t.totalSectors),y=(0,o.x9T)(null===(r=v.data)||void 0===r?void 0:r.usedSectors),x=null===(l=v.data)||void 0===l?void 0:l.localPath,b=(0,c.cI)({mode:"all",defaultValues:U}),w=(0,i.useCallback)(async e=>{var t;let r=await m.delete({params:{id:null===(t=v.data)||void 0===t?void 0:t.id,force:e.force}});r.error?(0,o.OHV)({title:"Error deleting volume",body:r.error}):((0,o.OPV)({title:"Volume is now being permanently deleted"}),b.reset(),p())},[b,v.data,m,p]),j=(0,i.useMemo)(()=>({path:{type:"text",title:"Path",placeholder:x,validation:{required:"required",validate:{equals:e=>e===x||"directory path does not match"}}},force:{type:"boolean",title:"Force",validation:{}}}),[x]),E=(0,o.WsO)(j);return(0,n.jsx)(o.VqE,{title:"Delete Volume",trigger:u,open:d,onOpenChange:e=>{e||b.reset(U),f(e)},contentVariants:{className:"w-[400px]"},onSubmit:b.handleSubmit(w,E),children:(0,n.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,n.jsx)(o.nvN,{size:"14",children:"Are you sure you would like to delete the volume?"}),(0,n.jsxs)(o.nvN,{size:"14",children:[(0,n.jsx)(o.EKh,{children:"hostd"})," will move"," ",(0,n.jsx)(o.xvT,{weight:"semibold",children:(0,s.vW)(y)})," of stored data and will lose ",(0,n.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,n.jsx)(o.nvN,{size:"14",children:"Enter the volume path to confirm the removal."}),(0,n.jsx)(o.yEL,{name:"path",form:b,fields:j}),(0,n.jsxs)("div",{className:"flex gap-1",children:[(0,n.jsx)(o.QBj,{name:"force",size:"medium",form:b,fields:j}),(0,n.jsx)(o.Yqd,{children:(0,n.jsx)("div",{className:"flex gap-1 max-w-[200px]",children:(0,n.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,n.jsx)(o.ZqQ,{variant:"red",form:b,children:"Delete"})]})})}function $(){let{dialog:e,onOpenChange:t}=eE(),r=(0,a.Os)(),s=(0,a.cj)(),l=(0,a.hV)(),c=(0,i.useMemo)(()=>l.data?new(u())(l.data).times(1200):void 0,[l.data]),d=(0,i.useCallback)(async e=>{let{address:t,hastings:r,includeFee:n}=e,i=await s.post({payload:{address:t,amount:r.toString(),subtractMinerFee:n}});return i.error?{error:i.error}:{transactionId:i.data}},[s]);return(0,n.jsx)(o.weF,{balance:r.data?new(u())(r.data.spendable):void 0,send:d,fee:c,open:"sendSiacoin"===e,onOpenChange:t})}var q=r(88022);function Y(){let{id:e,dialog:t,onOpenChange:r}=eE(),{dataset:a}=(0,q.n)(),s=(0,i.useMemo)(()=>null==a?void 0:a.find(t=>t.id===e),[a,e]);return(0,n.jsx)(o.mPE,{id:e,transaction:s,open:"transactionDetails"===t,onOpenChange:r})}var G=r(32088),K=r(36219),X=r(4300),J=r(5632);let Q={namespace:"wallet",label:"Wallet"};function ee(e){let{currentPage:t,parentPage:r,pushPage:i}=e,{openDialog:s,closeDialog:l}=eE(),u=(0,J.useRouter)(),c=(0,a.Os)({config:{swr:{revalidateOnFocus:!1,keepPreviousData:!0}}});return(0,n.jsxs)(p.fu,{currentPage:t,commandPage:Q,children:[(0,n.jsx)(p.Ul,{currentPage:t,parentPage:r,commandPage:Q,onSelect:()=>{i(Q)},children:Q.label}),(0,n.jsx)(p.WD,{currentPage:t,commandPage:Q,onSelect:()=>{u.push(X._.wallet.view),l()},children:"View wallet transactions"}),(0,n.jsx)(p.WD,{currentPage:t,commandPage:Q,onSelect:()=>{s("sendSiacoin")},children:"Send siacoin"}),(0,n.jsx)(p.WD,{currentPage:t,commandPage:Q,onSelect:()=>{s("addressDetails")},children:"Receive siacoin"}),(0,n.jsx)(p.WD,{currentPage:t,commandPage:Q,onSelect:()=>{s("addressDetails")},children:"View wallet address"}),(0,n.jsx)(p.WD,{currentPage:t,commandPage:Q,onSelect:()=>{var e;(0,o.vQq)(null===(e=c.data)||void 0===e?void 0:e.address,"wallet address"),l()},children:"Copy wallet address to clipboard"})]})}var et=r(38617);let er={namespace:"settings",label:"Settings"};function en(e){let{currentPage:t,parentPage:r}=e,{openDialog:i,closeDialog:o}=eE(),{setTheme:a}=(0,et.F)(),{settings:s,setExternalDataSettings:l,lock:u,currencyOptions:c,setCurrency:d}=(0,K.Hv)();return(0,n.jsxs)(p.fu,{currentPage:t,commandPage:er,children:[(0,n.jsx)(p.Ul,{currentPage:t,parentPage:r,commandPage:er,onSelect:()=>{i("settings")},children:"Open settings"}),(0,n.jsx)(p.WD,{currentPage:t,commandPage:er,onSelect:()=>{l({siaCentral:!s.siaCentral}),o()},children:(s.siaCentral?"Disable":"Enable")+" external API - Sia Central exchange rates"}),(0,n.jsx)(p.o4,{currentPage:t,commandPage:er,onSelect:()=>{u(),o()},children:"Lock hostd"}),(0,n.jsx)(p.WD,{currentPage:t,commandPage:er,onSelect:()=>{i("settings")},children:"Open interface theme menu"}),(0,n.jsx)(p.WD,{currentPage:t,commandPage:er,onSelect:()=>{a("system"),o()},children:"Set theme to system preference"}),(0,n.jsx)(p.WD,{currentPage:t,commandPage:er,onSelect:()=>{a("dark"),o()},children:"Set theme to dark"}),(0,n.jsx)(p.WD,{currentPage:t,commandPage:er,onSelect:()=>{a("light"),o()},children:"Set theme to light"}),(0,n.jsx)(p.WD,{currentPage:t,commandPage:er,onSelect:()=>{i("settings")},children:"Open currency settings menu"}),c.map(e=>{let{id:r,label:i}=e;return(0,n.jsx)(p.WD,{currentPage:t,commandPage:er,onSelect:()=>{d(r),o()},children:"Set currency to ".concat(i)},r)})]})}let ei={namespace:"node",label:"Blockchain node"};function eo(e){let{currentPage:t,parentPage:r,pushPage:i}=e,{openDialog:o,closeDialog:a}=eE(),s=(0,J.useRouter)();return(0,n.jsxs)(p.fu,{currentPage:t,commandPage:ei,children:[(0,n.jsx)(p.Ul,{currentPage:t,parentPage:r,commandPage:ei,onSelect:()=>{i(ei)},children:ei.label}),(0,n.jsx)(p.WD,{currentPage:t,commandPage:ei,onSelect:()=>{o("connectPeer")},children:"Connect to a peer"}),(0,n.jsx)(p.WD,{currentPage:t,commandPage:ei,onSelect:()=>{s.push(X._.node.index),a()},children:"View peers"})]})}var ea=r(29703);let es={namespace:"configuration",label:"Configuration"};function el(e){let{currentPage:t,parentPage:r,pushPage:i}=e,o=(0,J.useRouter)(),{configViewMode:a}=(0,ea.ZR)(),{closeDialog:s}=eE();return(0,n.jsxs)(p.fu,{currentPage:t,commandPage:es,children:[(0,n.jsx)(p.Ul,{currentPage:t,parentPage:r,commandPage:es,onSelect:()=>{i(es)},children:es.label}),(0,n.jsx)(p.WD,{currentPage:t,commandPage:es,onSelect:()=>{o.push(X._.config.index),s()},children:"Open configuration"}),(0,n.jsx)(p.WD,{currentPage:t,commandPage:es,onSelect:()=>{o.push(X._.config.host),s()},children:"Configure host"}),(0,n.jsx)(p.WD,{currentPage:t,commandPage:es,onSelect:()=>{o.push(X._.config.pricing),s()},children:"Configure pricing"}),(0,n.jsx)(p.WD,{currentPage:t,commandPage:es,onSelect:()=>{o.push(X._.config.dns),s()},children:"Configure DNS"}),(0,n.jsx)(p.WD,{currentPage:t,commandPage:es,onSelect:()=>{o.push(X._.config.bandwidth),s()},children:"Configure bandwidth"}),"advanced"===a&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(p.WD,{currentPage:t,commandPage:es,onSelect:()=>{o.push(X._.config.registry),s()},children:"Configure registry"}),(0,n.jsx)(p.WD,{currentPage:t,commandPage:es,onSelect:()=>{o.push(X._.config.accounts),s()},children:"Configure accounts"})]})]})}var eu=r(65717);function ec(e){let{search:t}=e;return(0,n.jsxs)(o.xvT,{color:"verySubtle",className:"flex flex-col gap-2 justify-center items-center mt-5 mb-3",children:[(0,n.jsx)(o.xvT,{color:"verySubtle",className:"flex gap-2 justify-center items-center",children:(0,n.jsx)(m.owP,{})}),(0,n.jsx)(o.xvT,{size:"12",color:"verySubtle",className:"flex justify-center",children:t?"No results matching query.":"Type a query to get started."})]})}var ed=r(63328);let ef={namespace:"contracts",label:"Contracts"};function eh(e){let{currentPage:t,parentPage:r,pushPage:i,beforeSelect:o,afterSelect:a}=e,s=(0,J.useRouter)(),{closeDialog:l}=eE();return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(p.Ul,{currentPage:t,parentPage:r,commandPage:r,onSelect:()=>{i(ef)},children:ef.label}),(0,n.jsx)(p.fu,{currentPage:t,commandPage:ef,children:(0,n.jsx)(p.WD,{currentPage:t,commandPage:ef,onSelect:()=>{s.push(X._.contracts.index),l()},children:"View contracts"})}),(0,n.jsx)(ed.F,{parentPage:ef,currentPage:t,beforeSelect:o,afterSelect:a,pushPage:i})]})}let ep={namespace:"volumes",label:"Volumes"};function em(e){let{currentPage:t,parentPage:r,pushPage:i}=e,o=(0,J.useRouter)(),{openDialog:a,closeDialog:s}=eE();return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(p.Ul,{currentPage:t,parentPage:r,commandPage:r,onSelect:()=>{i(ep)},children:ep.label}),(0,n.jsxs)(p.fu,{currentPage:t,commandPage:ep,children:[(0,n.jsx)(p.WD,{currentPage:t,commandPage:ep,onSelect:()=>{o.push(X._.volumes.index),s()},children:"View volumes"}),(0,n.jsx)(p.WD,{currentPage:t,commandPage:ep,onSelect:()=>{a("volumeCreate")},children:"Create volume"})]})]})}function ev(e){var t,r,a,s,l,u,c,p,m;let{panel:v}=e,g=(0,J.useRouter)(),{resetFilters:y}=(0,eu.G)(),{closeDialog:x}=eE(),[b,w]=(0,i.useState)(""),[j]=(l=(a=(r=(0,i.useState)(f(b)))[1],s=[r[0],(0,i.useCallback)(function(e){return a(f(e))},[])])[0],u=s[1],c=d((0,i.useCallback)(function(e){return u(e)},[u]),500,t),m=(p=(0,i.useRef)(b)).current,m===b||(c(b),p.current=b),[l,c]),[E,k]=(0,i.useState)([]),C=E[E.length-1],S=0===E.length,O=(0,i.useCallback)(e=>{k(t=>[...t,e])},[k]),_=(0,i.useCallback)(()=>{x()},[x]),M=(0,i.useCallback)(()=>{w("")},[w]),A=(null==C?void 0:C.empty)||ec;return(0,n.jsxs)(h.mY,{label:"Command Menu",loop:!0,className:(0,F.cx)(v&&(0,o.z$)()),onKeyDown:e=>{(E.length>0&&"Escape"===e.key||"Backspace"===e.key&&!b)&&(e.preventDefault(),k(e=>e.slice(0,-1)))},children:[C&&(0,n.jsx)(o.__J,{className:"px-2",children:C.label}),(0,n.jsx)(h.mY.Input,{value:b,onValueChange:w,className:(0,o.cEb)({variant:"ghost",focus:"none"}),placeholder:(null==C?void 0:C.prompt)||(S?"Search for commands, eg: theme, redundancy":"Search commands")}),(0,n.jsx)(o.Z0O,{className:"my-2"}),(0,n.jsxs)(h.mY.List,{children:[(0,n.jsx)(h.mY.Empty,{children:(0,n.jsx)(A,{search:b,debouncedSearch:j})}),(0,n.jsx)(en,{currentPage:C,pushPage:O}),(0,n.jsx)(ee,{currentPage:C,pushPage:O}),(0,n.jsx)(em,{currentPage:C,pushPage:O}),(0,n.jsx)(eh,{currentPage:C,pushPage:O,beforeSelect:()=>{_(),y()},afterSelect:()=>{g.pathname.startsWith(X._.contracts.index)||g.push(X._.contracts.index),M()}}),(0,n.jsx)(el,{currentPage:C,pushPage:O}),(0,n.jsx)(eo,{currentPage:C,pushPage:O})]})]})}function eg(e){let{open:t,onOpenChange:r,setOpen:a}=e,{isUnlockedAndAuthedRoute:s}=(0,K.Hv)(),{isConnected:l}=(0,o.Y97)({route:X.h});return(0,i.useEffect)(()=>{if(!s||!l)return;let e=e=>{"k"===e.key&&(e.metaKey||e.ctrlKey)&&a()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[s,l,a]),(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(o.VqE,{open:t,title:"Command palette",titleVisuallyHidden:!0,onOpenChange:r,contentVariants:{className:"!absolute !p-1 w-[450px] top-[200px]"},bodyClassName:"!px-1 !py-1",closeClassName:"hidden",children:(0,n.jsx)(ev,{})})})}var ey=r(99634);function ex(e){let{open:t,onOpenChange:r}=e,s=(0,a.Z7)({config:{swr:{refreshInterval:ey.h}}}),l=(0,a.Uy)(),u=(0,i.useCallback)(async e=>{let t=await l.post({payload:[e]});t.error?(0,o.OHV)({title:"Error dismissing alert",body:t.error}):(0,o.OPV)({title:"Alert has been dismissed"})},[l]),c=(0,i.useCallback)(async(e,t)=>{if(!s.data)return;let r=await l.post({payload:e});r.error?(0,o.OHV)({title:t?"Error dismissing all ".concat(t," alerts"):"Error dismissing all alerts",body:r.error}):(0,o.OPV)({title:t?"All ".concat(t," alerts have been dismissed"):"All alerts have been dismissed"})},[l,s]);return(0,n.jsx)(o.hcY,{open:t,onOpenChange:e=>{r(e)},alerts:s,dataFieldOrder:eb,dataFields:ew,dismissMany:c,dismissOne:u})}let eb=["error","contractID","blockHeight","resolution","volume","volumeID","elapsed","error","checked","missing","corrupt","total","oldSectors","currentSectors","targetSectors","migratedSectors","migrated","target","force"],ew={error:{render:e=>{let{value:t}=e;return(0,n.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,n.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"error"}),(0,n.jsx)(o.xvT,{color:"contrast",children:t})]})}},contractId:{render:e=>{let{value:t}=e;return(0,n.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,n.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"contract ID"}),(0,n.jsx)(o.XxW,{value:String(t)})]})}},blockHeight:{render:e=>{let{value:t}=e;return(0,n.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,n.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"block height"}),(0,n.jsx)(o.XxW,{value:String(t),type:"block"})]})}},resolution:{render:e=>{let{value:t}=e;return(0,n.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,n.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"resolution"}),(0,n.jsx)(o.XxW,{value:String(t)})]})}},volume:{render:e=>{let{value:t}=e;return(0,n.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,n.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"volume"}),(0,n.jsx)(o.XxW,{value:String(t)})]})}},volumeID:{render:e=>{let{value:t}=e;return(0,n.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,n.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"volume ID"}),(0,n.jsx)(o.XxW,{value:String(t)})]})}},elapsed:{render:e=>{let{value:t}=e;return(0,n.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,n.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"elapsed"}),(0,n.jsx)(o.xvT,{color:"contrast",ellipsis:!0,children:(0,s.bc)(Number(t))})]})}},checked:{render:e=>{let{value:t}=e;return(0,n.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,n.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"checked"}),(0,n.jsx)(o.xvT,{color:"contrast",ellipsis:!0,children:t.toLocaleString()})]})}},missing:{render:e=>{let{value:t}=e;return(0,n.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,n.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"missing"}),(0,n.jsx)(o.xvT,{color:"contrast",ellipsis:!0,children:t.toLocaleString()})]})}},corrupt:{render:e=>{let{value:t}=e;return(0,n.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,n.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"corrupt"}),(0,n.jsx)(o.xvT,{color:"contrast",ellipsis:!0,children:t.toLocaleString()})]})}},total:{render:e=>{let{value:t}=e;return(0,n.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,n.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"total"}),(0,n.jsx)(o.xvT,{color:"contrast",ellipsis:!0,children:t.toLocaleString()})]})}},oldSectors:{render:e=>{let{value:t}=e;return(0,n.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,n.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"old sectors"}),(0,n.jsx)(o.xvT,{color:"contrast",ellipsis:!0,children:t.toLocaleString()})]})}},currentSectors:{render:e=>{let{value:t}=e;return(0,n.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,n.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"current sectors"}),(0,n.jsx)(o.xvT,{color:"contrast",ellipsis:!0,children:t.toLocaleString()})]})}},targetSectors:{render:e=>{let{value:t}=e;return(0,n.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,n.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"target sectors"}),(0,n.jsx)(o.xvT,{color:"contrast",ellipsis:!0,children:t.toLocaleString()})]})}},migratedSectors:{render:e=>{let{value:t}=e;return(0,n.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,n.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"migrated sectors"}),(0,n.jsx)(o.xvT,{color:"contrast",ellipsis:!0,children:t.toLocaleString()})]})}},migrated:{render:e=>{let{value:t}=e;return(0,n.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,n.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"migrated"}),(0,n.jsx)(o.xvT,{color:"contrast",ellipsis:!0,children:t.toLocaleString()})]})}},target:{render:e=>{let{value:t}=e;return(0,n.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,n.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"target"}),(0,n.jsx)(o.xvT,{color:"contrast",ellipsis:!0,children:t.toLocaleString()})]})}},force:{render:e=>{let{value:t}=e;return(0,n.jsxs)("div",{className:"flex justify-between w-full gap-2",children:[(0,n.jsx)(o.xvT,{color:"subtle",ellipsis:!0,children:"force"}),(0,n.jsx)(o.xvT,{color:"contrast",ellipsis:!0,children:t?"true":"false"})]})}}},ej=(0,i.createContext)({}),eE=()=>(0,i.useContext)(ej);function ek(e){let{children:t}=e,r=function(){let[e,t]=(0,i.useState)(),[r,n]=(0,i.useState)(),o=(0,i.useCallback)((e,r)=>{t(e),n(r)},[t,n]),[a,s]=(0,i.useState)(),l=(0,i.useCallback)(e=>{t("confirm"),s(e)},[t,s]),u=(0,i.useCallback)(()=>{t(void 0),n(void 0),s(void 0)},[t,n,s]),c=(0,i.useCallback)(e=>{e||u()},[u]);return{dialog:e,id:r,openDialog:o,confirm:a,openConfirmDialog:l,closeDialog:u,onOpenChange:c}}();return(0,n.jsx)(ej.Provider,{value:r,children:t})}function eC(){var e;let{dialog:t,openDialog:r,openConfirmDialog:i,onOpenChange:s,closeDialog:l,confirm:u}=eE(),c=(0,a.Wl)(),d=(0,a.Os)();return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(eg,{open:"cmdk"===t,onOpenChange:s,setOpen:()=>r("cmdk")}),(0,n.jsx)(o.DLL,{open:"settings"===t,onOpenChange:s}),(0,n.jsx)(ex,{open:"alerts"===t,onOpenChange:s}),(0,n.jsx)($,{}),(0,n.jsx)(o.YNn,{open:"addressDetails"===t,address:null===(e=d.data)||void 0===e?void 0:e.address,isValidating:d.isValidating,onOpenChange:s}),(0,n.jsx)(Y,{}),(0,n.jsx)(o.D_D,{connect:e=>c.put({payload:{address:e}}),open:"connectPeer"===t,onOpenChange:s}),(0,n.jsx)(I,{open:"volumeCreate"===t,onOpenChange:s}),(0,n.jsx)(H,{open:"volumeResize"===t,onOpenChange:s}),(0,n.jsx)(W,{open:"volumeDelete"===t,onOpenChange:s}),(0,n.jsx)(G.Y,{open:"contractsFilterContractId"===t,onOpenChange:s}),(0,n.jsx)(o.QHy,{open:"confirm"===t,params:u,onOpenChange:e=>e?i(u):l()})]})}},68202:function(e,t,r){"use strict";r.d(t,{C:function(){return j},B:function(){return w}});var n=r(52322),i=r(2784),o=r(14522),a=r(60381);let s={active:{color:o.O9T.amber[600]},rejected:{color:o.O9T.red[600]},failed:{color:o.O9T.red[600]},renewed:{color:o.O9T.blue[600]},finalized:{color:o.O9T.yellow[600]},successful:{color:o.O9T.green[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=r(63694);function u(e,t,r){return{...e,category:t,pattern:r}}function c(e,t,r){return{...e,category:t,label:r}}var d=r(6391),f=r.n(d),h=r(71978),p=r(49435);function m(e,t){for(var r=Math.abs(e).toString();r.length"7"===e.value),b=(0,i.createContext)({}),w=()=>(0,i.useContext)(b);function j(e){let{children:t}=e,r=function(){let[e,t]=(0,y.Z)("v0/metrics/dataTimeSpan",{defaultValue:x.value}),[r,d]=(0,y.Z)("v0/metrics/dataInterval",{defaultValue:x.interval}),b=function(e){let[t,r]=(0,i.useState)(new Date().getTime());return(0,i.useEffect)(()=>{r(new Date().getTime());let t=(0,a.yt)(1),n=setInterval(()=>{r(new Date().getTime())},Math.min((0,h.uQ)(e),t));return()=>clearInterval(n)},[e]),t}(r),w=(0,i.useMemo)(()=>(0,o.OQF)(e,b),[e,b]),j=(0,i.useCallback)(e=>{let r=h.lv.find(t=>t.value===e);d(r.interval),t(r.value)},[t,d]),E=(0,i.useMemo)(()=>(0,o.kOJ)(r),[r]),k=(0,l.KU)({params:{interval:r,start:function(e,t){(0,v.Z)(1,arguments);var r=(0,p.Z)(e);if(isNaN(r.getTime()))throw RangeError("Invalid time value");var n=null!=t&&t.format?String(t.format):"extended",i=null!=t&&t.representation?String(t.representation):"complete";if("extended"!==n&&"basic"!==n)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"===n?"-":"";if("time"!==i){var l=m(r.getDate(),2),u=m(r.getMonth()+1,2),c=m(r.getFullYear(),4);o="".concat(c).concat(s).concat(u).concat(s).concat(l)}if("date"!==i){var d=r.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(r.getHours(),2),x=m(r.getMinutes(),2),b=m(r.getSeconds(),2),w=""===o?"":"T",j=[y,x,b].join("extended"===n?":":"");o="".concat(o).concat(w).concat(j).concat(a)}return o}(new Date(w.start-(0,h.uQ)(r)))},config:{swr:{revalidateOnFocus:!1,refreshInterval:(0,a.XB)(60)}}}),C=(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),rpcPotential:Number(e.revenue.potential.rpc),storage:Number(e.revenue.earned.storage),ingress:Number(e.revenue.earned.ingress),egress:Number(e.revenue.earned.egress),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.rpc).toNumber(),earned:new(f())(e.revenue.earned.storage).plus(e.revenue.earned.ingress).plus(e.revenue.earned.egress).plus(e.revenue.earned.rpc).toNumber(),timestamp:new Date(e.timestamp).getTime()})),"delta"),r=(0,o.fVJ)(t);return{data:t.map(e=>({storagePotential:Math.max(e.storagePotential,0),ingressPotential:Math.max(e.ingressPotential,0),egressPotential:Math.max(e.egressPotential,0),rpcPotential:Math.max(e.rpcPotential,0),storage:Math.max(e.storage,0),ingress:Math.max(e.ingress,0),egress:Math.max(e.egress,0),rpc:Math.max(e.rpc,0),timestamp:new Date(e.timestamp).getTime()})),stats:r,config:{enabledGraph:["storage","storagePotential","ingress","ingressPotential","egress","egressPotential","rpc","rpcPotential"],enabledTip:["storage","storagePotential","ingress","ingressPotential","egress","egressPotential","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")},formatComponent:function(e){let{value:t}=e;return(0,n.jsx)(o.ho9,{variant:"value",value:new(f())(t)})},formatTickY:e=>(0,a.Vz)(e,{fixed:0,dynamicUnits:!0}),formatTimestamp:E,disableAnimations:!0,chartType:"barstack",stackOffset:"diverging"},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=>({locked:Number(e.contracts.lockedCollateral),risked:Number(e.contracts.riskedCollateral),timestamp:new Date(e.timestamp).getTime()})).slice(1),"none"),r=(0,o.fVJ)(t);return{data:t,stats:r,config:{enabledGraph:["locked","risked"],enabledTip:["locked","risked"],data:{locked:s.locked,risked:s.risked},formatComponent:function(e){let{value:t}=e;return(0,n.jsx)(o.ho9,{variant:"value",value:new(f())(t)})},formatTimestamp:E,formatTickY:e=>(0,a.Vz)(e,{fixed:0,dynamicUnits:!0}),disableAnimations:!0,chartType:"area",curveType:"linear",stackOffset:"none"},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=>({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()})).slice(1),"none"),r=(0,o.fVJ)(t);return{data:t,stats:r,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},formatComponent:function(e){let{value:t}=e;return(0,n.jsx)(o.ho9,{variant:"value",value:new(f())(t)})},formatTimestamp:E,formatTickY:e=>(0,a.Vz)(e,{fixed:0,dynamicUnits:!0}),disableAnimations:!0,chartType:"line",curveType:"linear",stackOffset:"none"},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=>({active:e.contracts.active,rejected:e.contracts.rejected,failed:e.contracts.failed,renewed:e.contracts.renewed,finalized:e.contracts.finalized,successful:e.contracts.successful,timestamp:new Date(e.timestamp).getTime()})).slice(1),"none"),r=(0,o.fVJ)(t);return{data:t,stats:r,config:{enabledGraph:["active","rejected","failed","renewed","finalized","successful"],enabledTip:["active","rejected","failed","renewed","finalized","successful"],data:{active:s.active,rejected:s.rejected,failed:s.failed,renewed:s.renewed,finalized:s.finalized,successful:s.successful},format:e=>"".concat(e," contracts"),formatTimestamp:E,formatTickY:e=>(0,a.yF)(e),disableAnimations:!0,chartType:"areastack",curveType:"linear",stackOffset:"none"},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=>({maxSectors:(0,a.B$)(e.storage.totalSectors).times(4).toNumber(),tempSectors:(0,a.B$)(e.storage.tempSectors).times(4).toNumber(),physicalSectors:(0,a.B$)(e.storage.physicalSectors).times(4).toNumber(),contractSectors:(0,a.B$)(e.storage.contractSectors).times(4).toNumber(),timestamp:new Date(e.timestamp).getTime()})).slice(1),"none"),r=(0,o.fVJ)(t);return{data:t,stats:r,config:{enabledGraph:["contractSectors","physicalSectors","tempSectors","maxSectors"],enabledTip:["contractSectors","physicalSectors","tempSectors","maxSectors"],categories:["storage used","storage capacity"],data:{maxSectors:c(s.capacityStorage,"storage capacity","sectors"),physicalSectors:c(s.storagePhysical,"storage used","sectors physical"),tempSectors:c(s.sectorsTemp,"storage used","sectors temp"),contractSectors:c(s.storage,"storage used","sectors contract")},format:e=>(0,a.vW)(e),formatTimestamp:E,formatTickY:e=>(0,a.vW)(e,{fixed:0}),disableAnimations:!0,chartType:"line",curveType:"linear",stackOffset:"none"},isLoading:k.isValidating}},[k,E]);return{dataTimeSpan:e,setDataTimeSpan:j,timeRange:w,dataInterval:r,setDataInterval:d,operations:(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,timestamp:new Date(e.timestamp).getTime()})),"delta"),r=(0,o.fVJ)(t);return{data:t,stats:r,config:{enabledGraph:["storageReads","storageWrites"],enabledTip:["storageReads","storageWrites"],data:{storageReads:s.storageReads,storageWrites:s.storageWrites},format:e=>(0,a.yF)(e),formatTickY:e=>(0,a.yF)(e),formatTimestamp:E,disableAnimations:!0,chartType:"line",curveType:"linear",stackOffset:"none"},isLoading:k.isValidating}},[k,E]),revenue:C,collateral:S,contracts:_,storage:M,pricing:O,bandwidth:(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.rhp.egress,ingress:e.data.rhp.ingress,timestamp:new Date(e.timestamp).getTime()})),"delta"),r=(0,o.fVJ)(t);return{data:t,stats:r,config:{enabledGraph:["ingress","egress"],enabledTip:["ingress","egress"],data:{ingress:s.ingress,egress:s.egress},format:e=>(0,a.vW)(e),formatTimestamp:E,formatTickY:e=>(0,a.vW)(e,{fixed:0}),disableAnimations:!0,chartType:"line",curveType:"linear",stackOffset:"none"},isLoading:k.isValidating}},[k,E])}}();return(0,n.jsx)(b.Provider,{value:r,children:t})}},71978:function(e,t,r){"use strict";r.d(t,{lv:function(){return i},uQ:function(){return o}});var n=r(60381);let i=[{label:"1D",interval:"15m",value:"1"},{label:"7D",interval:"hourly",value:"7"},{label:"1M",interval:"daily",value:"30"},{label:"3M",interval:"daily",value:"90"},{label:"1Y",interval:"weekly",value:"365"},{label:"ALL",interval:"monthly",value:"all"}];function o(e){return"5m"===e?(0,n.sW)(5):"15m"===e?(0,n.sW)(15):"hourly"===e?(0,n.yt)(1):"daily"===e?(0,n.Nr)(1):"weekly"===e?(0,n.Nr)(7):"monthly"===e?(0,n.Nr)(30):"yearly"===e?(0,n.Nr)(365):0}},88022:function(e,t,r){"use strict";r.d(t,{v:function(){return y},n:function(){return g}});var n=r(52322),i=r(14522),o=r(63694),a=r(2784),s=r(5632),l=r(66510),u=r(99634),c=r(16211),d=r(60381),f=r(35138);let h=[{id:"transactionId",label:"transaction ID",category:"general",render:e=>{let{data:{id:t},context:r}=e;return t?(0,n.jsx)(i.XxW,{size:"12",value:t,label:"transaction ID",type:"transaction",siascanUrl:r.siascanUrl}):null}},{id:"type",label:"type",category:"general",fixed:!0,render:e=>{let{data:{txType:t}}=e;return(0,n.jsx)(i.Cts,{size:"small",children:(0,d.pX)(t)})}},{id:"height",label:"height",category:"general",contentClassName:"justify-end",render:e=>{let{data:{height:t,pending:r,maturityHeight:o,isMature:a}}=e;return r?(0,n.jsx)(i.xvT,{size:"12",ellipsis:!0,children:(0,n.jsx)(i.xgg,{})}):t?t&&o&&o>t?(0,n.jsx)(i.ua7,{content:a?"The maturity height has been reached.":"The maturity height has not been reached, therefore the output is still locked.",children:(0,n.jsxs)("div",{className:"flex flex-col gap-[5px]",children:[(0,n.jsx)("div",{className:"flex justify-end",children:(0,n.jsxs)(i.xvT,{size:"12",font:"mono",ellipsis:!0,color:a?"green":"red",className:"flex gap-1 items-center",children:[a?(0,n.jsx)(f.VmF,{}):(0,n.jsx)(f.Lur,{}),o.toLocaleString()]})}),(0,n.jsxs)("div",{className:"flex justify-between items-end gap-1",children:[(0,n.jsx)("div",{className:"pl-[8px] pb-[6px]",children:(0,n.jsx)("div",{className:"border-l border-b border-gray-800 dark:border-graydark-800 h-[20px] w-[7px]"})}),(0,n.jsx)(i.xvT,{size:"12",font:"mono",color:"subtle",ellipsis:!0,children:t.toLocaleString()})]})]})}):(0,n.jsx)(i.xvT,{size:"12",font:"mono",ellipsis:!0,children:t.toLocaleString()}):null}},{id:"timestamp",label:"timestamp",category:"general",contentClassName:"justify-end",render:e=>{let{data:{timestamp:t,pending:r}}=e;return r?(0,n.jsx)(i.xvT,{size:"12",ellipsis:!0,children:(0,n.jsx)(i.xgg,{})}):(0,n.jsx)(i.xvT,{size:"12",ellipsis:!0,children:(0,d.rN)(t,{timeStyle:"short"})})}},{id:"amount",label:"amount",category:"general",contentClassName:"w-[120px] justify-end",render:e=>{let{data:{amountSc:t,amountSf:r}}=e;return t?(0,n.jsxs)("div",{className:"flex flex-col gap-2 items-end",children:[!t.isZero()&&(0,n.jsx)(i.ho9,{displayBoth:!0,size:"12",value:t}),!!r&&(0,n.jsx)(i.Sby,{size:"12",value:r})]}):null}},{id:"fee",label:"fee",category:"general",contentClassName:"w-[120px] justify-end",render:e=>{let{data:{fee:t}}=e;return t?(0,n.jsx)(i.ho9,{displayBoth:!0,size:"12",variant:"value",value:t}):null}},{id:"contractId",label:"contract ID",category:"general",render:e=>{let{data:{contractId:t},context:r}=e;return t?(0,n.jsx)(i.XxW,{size:"12",value:t,label:"contract ID",siascanUrl:r.siascanUrl}):null}}],p=["transactionId","type","height","timestamp","amount","fee"],m=[],v=(0,a.createContext)({}),g=()=>(0,a.useContext)(v);function y(e){let{children:t}=e,r=function(){let e=(0,s.useRouter)(),t=Number(e.query.limit||50),r=Number(e.query.offset||0),n=(0,o.sG)({params:{limit:t,offset:r},config:{swr:{refreshInterval:u.h}}}),f=(0,o.a0)({config:{swr:{refreshInterval:u.h}}}),{filters:v,setFilter:g,removeFilter:y,removeLastFilter:x,resetFilters:b}=(0,i.Uu5)(),w=(0,c.n)(),j=(0,a.useMemo)(()=>{if(!n.data||!f.data)return null;let e=f.data.map(e=>{let t=(0,d.Jz)(e),r=(0,d.hq)(e);return{id:e.id,timestamp:0,pending:!0,type:e.type,txType:(0,d.uC)(e),isMature:!1,amountSc:t,fee:r}}),t=n.data.map(e=>{let t=(0,d.Jz)(e),r=(0,d.hq)(e),n=(0,d.hR)(e),i=e.maturityHeight<=w.nodeBlockHeight;return{id:e.id,type:e.type,txType:(0,d.uC)(e),timestamp:new Date(e.timestamp).getTime(),maturityHeight:e.maturityHeight,isMature:i,height:e.index.height,pending:!1,amountSc:t,fee:r,contractId:n}});return[...e.reverse(),...t]},[n.data,f.data,w.nodeBlockHeight]),{configurableColumns:E,enabledColumns:k,sortableColumns:C,toggleColumnVisibility:S,setColumnsVisible:O,setColumnsHidden:_,toggleSort:M,setSortDirection:A,setSortField:P,sortField:T,sortDirection:N,resetDefaultColumnVisibility:R}=(0,i.oy6)("hostd/v0/events",{columns:h,columnsDefaultVisible:p,sortOptions:m,defaultSortField:"id"}),D=(0,a.useMemo)(()=>h.filter(e=>e.fixed||k.includes(e.id)),[k]),L=n.isValidating||f.isValidating,F=n.error||f.error,Z=(0,i.c2j)(j,L,F,v),V=(0,l.B)(),z=(0,a.useMemo)(()=>({siascanUrl:V}),[V]),I=(0,a.useMemo)(()=>new Date(new Date().getTime()-(0,d.Nr)(30)).toISOString(),[]),B=(0,o.KU)({params:{interval:"daily",start:I}});return{balances:(0,a.useMemo)(()=>(B.data||[]).map(e=>({sc:Number(e.wallet.balance),timestamp:new Date(e.timestamp).getTime()})).sort((e,t)=>e.timestamp>=t.timestamp?1:-1),[B.data]),metrics:B,dataset:j,error:F,dataState:Z,offset:r,limit:t,pageCount:(null==j?void 0:j.length)||0,defaultPageSize:50,cellContext:z,configurableColumns:E,enabledColumns:k,sortableColumns:C,toggleColumnVisibility:S,setColumnsVisible:O,setColumnsHidden:_,toggleSort:M,setSortDirection:A,setSortField:P,sortField:T,sortDirection:N,resetDefaultColumnVisibility:R,filters:v,setFilter:g,removeFilter:y,removeLastFilter:x,resetFilters:b,filteredTableColumns:D,columns:h}}();return(0,n.jsx)(v.Provider,{value:r,children:t})}},18993:function(e,t,r){"use strict";r.d(t,{Y:function(){return b},F:function(){return x}});var n=r(52322),i=r(14522),o=r(63694),a=r(2784);let s=["actions","path","storage","available","readOnly","successfulReads","successfulWrites","failedReads","failedWrites"];var l=r(35138),u=r(60381),c=r(54494);function d(e){let{id:t,contentProps:r,buttonProps:o}=e;return(0,n.jsx)(i.h_2,{trigger:(0,n.jsx)(i.zxk,{variant:"ghost",icon:"hover","aria-label":"volume context menu",...o,children:(0,n.jsx)(l.EMN,{})}),contentProps:{align:"start",...r},children:(0,n.jsx)(f,{id:t})})}function f(e){var t,r;let{id:a}=e,{openDialog:s}=(0,c.Rh)(),u=(0,o.Rz)(),d=(0,o.ST)({params:{id:a}}),f=(0,o._3)(),p=d.data&&"ready"==d.data.status,m=d.data&&!["ready","unavailable"].includes(d.data.status);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"px-1.5 py-1",children:(0,n.jsxs)(i.xvT,{size:"14",weight:"medium",color:"subtle",children:["Volume ",d.data?(0,i.$Gg)(null===(t=d.data)||void 0===t?void 0:t.localPath,24):a]})}),(0,n.jsx)(i.Juw,{children:"Actions"}),m?(0,n.jsxs)(i.Xiv,{onSelect:async()=>{var e;let t=null===(e=d.data)||void 0===e?void 0:e.status;(await f.delete({params:{id:Number(a)}})).error?(0,i.OHV)({title:"Error canceling volume ".concat(h(t))}):(0,i.OPV)({title:"Canceled volume ".concat(h(t))})},children:[(0,n.jsx)(i.KpP,{children:(0,n.jsx)(l.PcV,{})}),"Cancel ".concat(h(null===(r=d.data)||void 0===r?void 0:r.status))]}):null,d.data?(0,n.jsxs)(i.Xiv,{disabled:!p,onSelect:async()=>{let e=!d.data.readOnly;(await u.put({params:{id:Number(a)},payload:{readOnly:e}})).error?(0,i.OHV)({title:e?"Error setting volume to read-only":"Error setting volume to read/write"}):(0,i.OPV)({title:e?"Volume set to read-only":"Volume set to read/write"})},children:[(0,n.jsx)(i.KpP,{children:d.data.readOnly?(0,n.jsx)(l.dr6,{}):(0,n.jsx)(l.Lur,{})}),d.data.readOnly?"Set to read/write":"Set to read-only"]}):null,(0,n.jsxs)(i.Xiv,{disabled:!p,onSelect:()=>s("volumeResize",a),children:[(0,n.jsx)(i.KpP,{children:(0,n.jsx)(l.BB5,{})}),"Resize"]}),(0,n.jsxs)(i.Xiv,{disabled:m,onSelect:()=>s("volumeDelete",a),children:[(0,n.jsx)(i.KpP,{children:(0,n.jsx)(l.Jrl,{})}),"Delete"]})]})}function h(e){return"resizing"===e?"resize":"creating"===e?"creation":"removing"===e?"removal":"operation"}let p=[{id:"actions",label:"",fixed:!0,cellClassName:"w-[50px] !pl-2 !pr-4 [&+*]:!pl-0",render:e=>{let{data:t}=e;return(0,n.jsx)(d,{id:t.id})}},{id:"path",label:"path",category:"general",render:e=>{let{data:t}=e;return(0,n.jsx)(i.xvT,{font:"mono",ellipsis:!0,children:t.localPath})}},{id:"available",label:"status",category:"general",render:e=>{var t;let{data:r}=e;return(0,n.jsx)(i.ua7,{side:"right",content:r.available?"available":(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(i.xvT,{size:"12",children:"unavailable"}),(0,n.jsx)("div",{className:"flex flex-col",children:null===(t=r.errors)||void 0===t?void 0:t.map(e=>(0,n.jsx)(i.xvT,{size:"10",noWrap:!0,children:e},e))})]}),children:(0,n.jsxs)("div",{className:"flex gap-2 items-center",children:[r.available&&"ready"===r.status&&(0,n.jsx)(i.xvT,{color:"green",children:(0,n.jsx)(l.DI$,{})}),r.available&&"ready"!==r.status&&(0,n.jsx)(i.xvT,{color:"amber",children:(0,n.jsx)(l.dsj,{})}),!r.available&&(0,n.jsx)(i.xvT,{color:"amber",children:(0,n.jsx)(l.SmH,{})}),(0,n.jsx)(i.xvT,{size:"12",className:"relative -top-px",children:r.status})]})})}},{id:"readOnly",label:"read/write",category:"general",render:e=>{let{data:t}=e;return t.readOnly?(0,n.jsx)(i.ua7,{content:"Read-only",children:(0,n.jsx)(i.xvT,{children:(0,n.jsx)(l.Lur,{})})}):(0,n.jsx)(i.ua7,{content:"Read and write enabled",children:(0,n.jsx)(i.xvT,{color:"subtle",children:(0,n.jsx)(l.dr6,{})})})}},{id:"storage",label:"storage",category:"general",render:e=>{let{data:t}=e;return(0,n.jsx)("div",{className:"flex gap-1 w-full max-w-[200px] pt-[10px]",children:(0,n.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,n.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,n.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,n.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,n.jsx)(i.m2c,{variant:"value",size:"12",value:t.failedWrites,format:e=>e.toNumber().toLocaleString()})}}];var m=r(6391),v=r.n(m),g=r(99634);let y=(0,a.createContext)({}),x=()=>(0,a.useContext)(y);function b(e){let{children:t}=e,r=function(){let{configurableColumns:e,enabledColumns:t,toggleColumnVisibility:r,setColumnsVisible:n,setColumnsHidden:l,toggleSort:c,setSortDirection:d,setSortField:f,sortField:h,sortDirection:m,resetDefaultColumnVisibility:y}=(0,i.oy6)("hostd/v0/volumes",{columns:p,columnsDefaultVisible:s}),x=(0,o.Fn)({config:{swr:{refreshInterval:e=>(null==e?void 0:e.find(e=>!["ready","unavailable"].includes(e.status)))?(0,u.XB)(5):g.h}}}),b=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),localPath:e.localPath,usedSectors:e.usedSectors,usedBytes:new(v())(e.usedSectors).times((0,u.B$)(4)).toNumber(),totalBytes:new(v())(e.totalSectors).times((0,u.B$)(4)).toNumber(),totalSectors:e.totalSectors,status:e.status,readOnly:e.readOnly,available:e.available,failedReads:new(v())(e.failedReads),failedWrites:new(v())(e.failedWrites),successfulReads:new(v())(e.successfulReads),successfulWrites:new(v())(e.successfulWrites),errors:e.errors})))||[]:null},[t.data])}({response:x}),w=(0,a.useMemo)(()=>p.filter(e=>t.includes(e.id)),[t]),j=x.isValidating,E=x.error;return{dataState:(0,i.c2j)(b,j,E,[]),totalCount:(null==b?void 0:b.length)||0,isLoading:x.isValidating,columns:w,dataset:b,configurableColumns:e,enabledColumns:t,toggleColumnVisibility:r,setColumnsVisible:n,setColumnsHidden:l,toggleSort:c,setSortDirection:d,setSortField:f,sortField:h,sortDirection:m,resetDefaultColumnVisibility:y}}();return(0,n.jsx)(y.Provider,{value:r,children:t})}},32088:function(e,t,r){"use strict";r.d(t,{O:function(){return u},Y:function(){return f}});var n=r(52322),i=r(14522),o=r(65717),a=r(92683),s=r(24511),l=r(54494);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:r,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,n.jsx)(i.VqE,{trigger:t,title:"Filter by contract ID",open:r,onOpenChange:e=>{e||p.resetForm(),s(e)},contentVariants:{className:"w-[400px]"},onSubmit:p.handleSubmit,children:(0,n.jsx)("div",{className:"flex flex-col gap-4",children:(0,n.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,n.jsx)(i.cB7,{formik:p,title:"Contract ID",name:"contractId",placeholder:"Exact match for contract ID",autoComplete:"off",type:"text",variants:{size:"medium"}}),(0,n.jsx)(i.IKw,{formik:p,size:"medium",children:"Filter"})]})})})}},66510:function(e,t,r){"use strict";r.d(t,{B:function(){return o}});var n=r(14522),i=r(63694);function o(){var e;return(null===(e=(0,i.gM)().data)||void 0===e?void 0:e.name)==="zen"?n.nNd.explore.testnetZen:n.nNd.explore.mainnet}},16211:function(e,t,r){"use strict";r.d(t,{n:function(){return a}});var n=r(36219),i=r(63694),o=r(60381);function a(){var e,t;let{isUnlockedAndAuthedRoute:r}=(0,n.Hv)(),o=(0,i.ek)({config:{swr:{refreshInterval:e=>s(e)?6e4:1e4}}}),a=s(o.data),l=(0,i.nH)(),u=o.data?null===(e=o.data)||void 0===e?void 0:e.index.height:0,c=(0,i.Gp)({config:{swr:{refreshInterval:e=>(null==e?void 0:e.height)>=u?6e4:1e4}}}),d=r&&u&&l?Number((100*Math.min(u/l,1)).toFixed(1)):0,f=r&&u&&c.data?Number((100*Math.min(c.data.height/l,1)).toFixed(1)):0;return{isSynced:a,isWalletSynced:a&&(null===(t=c.data)||void 0===t?void 0:t.height)>=u-1,nodeBlockHeight:u,estimatedBlockHeight:l,syncPercent:d,walletScanPercent:f,moreThan100BlocksToSync:!!u&&!!l&&l-u>100,firstTimeSyncing:!!u&&!!l&&l-u>5e4}}function s(e){return null!=e&&!!e.prevTimestamps[0]&&new Date(null==e?void 0:e.prevTimestamps[0]).getTime()>Date.now()-(0,o.yt)(12)}},83906:function(e,t,r){"use strict";r.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 n=r(60381),i=r(6391),o=r.n(i);let a="/TB/month";function s(e){return new(o())(e).times((0,n.xf)(1)).times((0,n.S5)(1))}let l="/million";function u(e){return new(o())(e).times(1e6)}let c="/million";function d(e){return new(o())(e).times(1e6)}let f="/TB/month";function h(e){return new(o())(e).times((0,n.xf)(1)).times((0,n.S5)(1))}let p="/TB";function m(e){return new(o())(e).times((0,n.xf)(1))}let v="/TB";function g(e){return new(o())(e).times((0,n.xf)(1))}},65047:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return x}});var n=r(52322);r(21962);var i=r(14522),o=r(65717),a=r(68202),s=r(54494),l=r(18993),u=r(29703),c=r(88022);function d(e){let{children:t}=e;return(0,n.jsx)(s.Tu,{children:(0,n.jsx)(u.iV,{children:(0,n.jsx)(c.v,{children:(0,n.jsx)(l.Y,{children:(0,n.jsx)(o.x,{children:(0,n.jsxs)(a.C,{children:[(0,n.jsx)(s.xQ,{}),t]})})})})})})}var f=r(4300),h=r(29773),p=r.n(h),m=r(17282),v=r.n(m);let g=(0,r(82851).cx)(p().variable,v().variable);var y=r(79338);function x(e){return(0,n.jsx)(i.PD$,{className:g,fallback:e.pageProps.fallback,daemonExplorerInfoRoute:y.ay,passwordProtectRequestHooks:!0,lockRoutes:f._,children:(0,n.jsx)(d,{children:(0,n.jsx)(b,{...e})})})}function b(e){let{Component:t,pageProps:r}=e,i=t.Layout,o=t.useLayoutProps(),{fallback:a,...s}=r;return(0,n.jsx)(i,{...o,children:(0,n.jsx)(t,{...s})})}},14522:function(e,t,r){"use strict";let n,i,o,a,s,l,u,c,d,f,h;r.d(t,{hcY:function(){return Di},tU3:function(){return De},$9_:function(){return D_},zXq:function(){return DO},juT:function(){return RD},Cts:function(){return uA},Z58:function(){return D7},WVB:function(){return vp},zxk:function(){return ua},b0u:function(){return A_},XZJ:function(){return u4},EKh:function(){return uN},npL:function(){return LU},vRO:function(){return LI},CN9:function(){return Lz},ckm:function(){return LP},QHy:function(){return Lk},TaT:function(){return Lc},eQh:function(){return uD},HfT:function(){return LO},ncR:function(){return TP},A06:function(){return Lr},Vy9:function(){return Ln},VqE:function(){return f_},h_2:function(){return vx},Xiv:function(){return vb},Juw:function(){return vw},KpP:function(){return vj},jIp:function(){return LT},QBj:function(){return DM},yEL:function(){return Dy},cB7:function(){return TF},ZqQ:function(){return TL},IKw:function(){return TH},WN2:function(){return Fs},X6q:function(){return vS},Yqd:function(){return yF},__J:function(){return vD},rUS:function(){return vZ},xgg:function(){return AS},TRl:function(){return vV},kFS:function(){return vm},FzK:function(){return Lw},Clw:function(){return vh},hv1:function(){return Fi},PD$:function(){return LK},Wxm:function(){return yI},uDJ:function(){return RO},wFK:function(){return R_},s_4:function(){return nr},M9k:function(){return Lj},VXA:function(){return LE},nvN:function(){return ne},u5Q:function(){return D9},j4H:function(){return yZ},J2e:function(){return gu},kod:function(){return gM},xrM:function(){return fC},PhF:function(){return yz},Z0O:function(){return vl},DLL:function(){return DJ},KJW:function(){return RZ},rsf:function(){return xr},D_D:function(){return DI},iA_:function(){return RS},t6k:function(){return L_},xvT:function(){return r9},nvn:function(){return yo},ua7:function(){return ui},mPE:function(){return DB},XxW:function(){return P6},m2c:function(){return Tn},ho9:function(){return Tr},Sby:function(){return P7},QUh:function(){return D0},weF:function(){return DF},YNn:function(){return D$},DmW:function(){return Dq},O9T:function(){return EE},fVJ:function(){return D5},vQq:function(){return P1},Y_Z:function(){return D1},EJC:function(){return Fl},kOJ:function(){return D3},OQF:function(){return D2},eKZ:function(){return F3},Vkc:function(){return vc},S5N:function(){return F4},z$:function(){return nt},x9T:function(){return Fo},bjP:function(){return Fa},f5n:function(){return Dg},I13:function(){return P3},cEb:function(){return yi},OHV:function(){return PJ},OPV:function(){return PX},$Gg:function(){return P4},Y97:function(){return R9},c2j:function(){return Dt},t0Y:function(){return DZ},mYE:function(){return L$},u$d:function(){return Lq},Z4p:function(){return LW},A7R:function(){return Fr},WsO:function(){return Dv},Uu5:function(){return L8},oy6:function(){return L6},nNd:function(){return DY}});var p,m,v,g,y,x,b,w,j,E,k,C,S,O,_,M,A,P,T,N,R,D,L,F,Z,V,z,I,B,H,U,W,$,q,Y,G,K,X,J,Q,ee,et,er,en,ei,eo,ea,es,el,eu,ec,ed,ef={};r.r(ef),r.d(ef,{useDropzone:function(){return ws}});var eh=r(52322),ep=r(2784),em=r.t(ep,2);function ev(...e){return t=>e.forEach(e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)})}function eg(...e){return ep.useCallback(ev(...e),e)}var ey=ep.forwardRef((e,t)=>{let{children:r,...n}=e,i=ep.Children.toArray(r),o=i.find(ew);if(o){let e=o.props.children,r=i.map(t=>t!==o?t:ep.Children.count(e)>1?ep.Children.only(null):ep.isValidElement(e)?e.props.children:null);return(0,eh.jsx)(ex,{...n,ref:t,children:ep.isValidElement(e)?ep.cloneElement(e,void 0,r):null})}return(0,eh.jsx)(ex,{...n,ref:t,children:r})});ey.displayName="Slot";var ex=ep.forwardRef((e,t)=>{let{children:r,...n}=e;if(ep.isValidElement(r)){let e,i;let o=(e=Object.getOwnPropertyDescriptor(r.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning?r.ref:(e=Object.getOwnPropertyDescriptor(r,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning?r.props.ref:r.props.ref||r.ref;return ep.cloneElement(r,{...function(e,t){let r={...t};for(let n in t){let i=e[n],o=t[n];/^on[A-Z]/.test(n)?i&&o?r[n]=(...e)=>{o(...e),i(...e)}:i&&(r[n]=i):"style"===n?r[n]={...i,...o}:"className"===n&&(r[n]=[i,o].filter(Boolean).join(" "))}return{...e,...r}}(n,r.props),ref:t?ev(t,o):o})}return ep.Children.count(r)>1?ep.Children.only(null):null});ex.displayName="SlotClone";var eb=({children:e})=>(0,eh.jsx)(eh.Fragment,{children:e});function ew(e){return ep.isValidElement(e)&&e.type===eb}function ej(e){let t=ep.useRef(e);return ep.useEffect(()=>{t.current=e}),ep.useMemo(()=>(...e)=>t.current?.(...e),[])}function eE({prop:e,defaultProp:t,onChange:r=()=>{}}){let[n,i]=function({defaultProp:e,onChange:t}){let r=ep.useState(e),[n]=r,i=ep.useRef(n),o=ej(t);return ep.useEffect(()=>{i.current!==n&&(o(n),i.current=n)},[n,i,o]),r}({defaultProp:t,onChange:r}),o=void 0!==e,a=o?e:n,s=ej(r);return[a,ep.useCallback(t=>{if(o){let r="function"==typeof t?t(e):t;r!==e&&s(r)}else i(t)},[o,e,i,s])]}var ek=r(28316),eC=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{let r=ep.forwardRef((e,r)=>{let{asChild:n,...i}=e,o=n?ey:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,eh.jsx)(o,{...i,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function eS(e){let t=ep.useRef(e);return ep.useEffect(()=>{t.current=e}),ep.useMemo(()=>(...e)=>t.current?.(...e),[])}var eO=globalThis?.document?ep.useLayoutEffect:()=>{};function e_(...e){return t=>e.forEach(e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)})}var eM=ep.forwardRef((e,t)=>{let{children:r,...n}=e,i=ep.Children.toArray(r),o=i.find(eT);if(o){let e=o.props.children,r=i.map(t=>t!==o?t:ep.Children.count(e)>1?ep.Children.only(null):ep.isValidElement(e)?e.props.children:null);return(0,eh.jsx)(eA,{...n,ref:t,children:ep.isValidElement(e)?ep.cloneElement(e,void 0,r):null})}return(0,eh.jsx)(eA,{...n,ref:t,children:r})});eM.displayName="Slot";var eA=ep.forwardRef((e,t)=>{let{children:r,...n}=e;if(ep.isValidElement(r)){let e,i;let o=(e=Object.getOwnPropertyDescriptor(r.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning?r.ref:(e=Object.getOwnPropertyDescriptor(r,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning?r.props.ref:r.props.ref||r.ref;return ep.cloneElement(r,{...function(e,t){let r={...t};for(let n in t){let i=e[n],o=t[n];/^on[A-Z]/.test(n)?i&&o?r[n]=(...e)=>{o(...e),i(...e)}:i&&(r[n]=i):"style"===n?r[n]={...i,...o}:"className"===n&&(r[n]=[i,o].filter(Boolean).join(" "))}return{...e,...r}}(n,r.props),ref:t?e_(t,o):o})}return ep.Children.count(r)>1?ep.Children.only(null):null});eA.displayName="SlotClone";var eP=({children:e})=>(0,eh.jsx)(eh.Fragment,{children:e});function eT(e){return ep.isValidElement(e)&&e.type===eP}var eN=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{let r=ep.forwardRef((e,r)=>{let{asChild:n,...i}=e,o=n?eM:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,eh.jsx)(o,{...i,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),eR=globalThis?.document?ep.useLayoutEffect:()=>{},eD=e=>{let t,r;let{present:n,children:i}=e,o=function(e){var t,r;let[n,i]=ep.useState(),o=ep.useRef({}),a=ep.useRef(e),s=ep.useRef("none"),[l,u]=(t=e?"mounted":"unmounted",r={mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}},ep.useReducer((e,t)=>r[e][t]??e,t));return ep.useEffect(()=>{let e=eL(o.current);s.current="mounted"===l?e:"none"},[l]),eR(()=>{let t=o.current,r=a.current;if(r!==e){let n=s.current,i=eL(t);e?u("MOUNT"):"none"===i||t?.display==="none"?u("UNMOUNT"):r&&n!==i?u("ANIMATION_OUT"):u("UNMOUNT"),a.current=e}},[e,u]),eR(()=>{if(n){let e;let t=n.ownerDocument.defaultView??window,r=r=>{let i=eL(o.current).includes(r.animationName);if(r.target===n&&i&&(u("ANIMATION_END"),!a.current)){let r=n.style.animationFillMode;n.style.animationFillMode="forwards",e=t.setTimeout(()=>{"forwards"===n.style.animationFillMode&&(n.style.animationFillMode=r)})}},i=e=>{e.target===n&&(s.current=eL(o.current))};return n.addEventListener("animationstart",i),n.addEventListener("animationcancel",r),n.addEventListener("animationend",r),()=>{t.clearTimeout(e),n.removeEventListener("animationstart",i),n.removeEventListener("animationcancel",r),n.removeEventListener("animationend",r)}}u("ANIMATION_END")},[n,u]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:ep.useCallback(e=>{e&&(o.current=getComputedStyle(e)),i(e)},[])}}(n),a="function"==typeof i?i({present:o.isPresent}):ep.Children.only(i),s=function(...e){return ep.useCallback(function(...e){return t=>e.forEach(e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)})}(...e),e)}(o.ref,(t=Object.getOwnPropertyDescriptor(a.props,"ref")?.get)&&"isReactWarning"in t&&t.isReactWarning?a.ref:(t=Object.getOwnPropertyDescriptor(a,"ref")?.get)&&"isReactWarning"in t&&t.isReactWarning?a.props.ref:a.props.ref||a.ref);return"function"==typeof i||o.isPresent?ep.cloneElement(a,{ref:s}):null};function eL(e){return e?.animationName||"none"}eD.displayName="Presence";var eF=globalThis?.document?ep.useLayoutEffect:()=>{},eZ=em["useId".toString()]||(()=>void 0),eV=0;function ez(e){let[t,r]=ep.useState(eZ());return eF(()=>{e||r(e=>e??String(eV++))},[e]),e||(t?`radix-${t}`:"")}var eI="Collapsible",[eB,eH]=function(e,t=[]){let r=[],n=()=>{let t=r.map(e=>ep.createContext(e));return function(r){let n=r?.[e]||t;return ep.useMemo(()=>({[`__scope${e}`]:{...r,[e]:n}}),[r,n])}};return n.scopeName=e,[function(t,n){let i=ep.createContext(n),o=r.length;r=[...r,n];let a=t=>{let{scope:r,children:n,...a}=t,s=r?.[e]?.[o]||i,l=ep.useMemo(()=>a,Object.values(a));return(0,eh.jsx)(s.Provider,{value:l,children:n})};return a.displayName=t+"Provider",[a,function(r,a){let s=a?.[e]?.[o]||i,l=ep.useContext(s);if(l)return l;if(void 0!==n)return n;throw Error(`\`${r}\` must be used within \`${t}\``)}]},function(...e){let t=e[0];if(1===e.length)return t;let r=()=>{let r=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let n=r.reduce((t,{useScope:r,scopeName:n})=>{let i=r(e)[`__scope${n}`];return{...t,...i}},{});return ep.useMemo(()=>({[`__scope${t.scopeName}`]:n}),[n])}};return r.scopeName=t.scopeName,r}(n,...t)]}(eI),[eU,eW]=eB(eI),e$=ep.forwardRef((e,t)=>{let{__scopeCollapsible:r,open:n,defaultOpen:i,disabled:o,onOpenChange:a,...s}=e,[l=!1,u]=function({prop:e,defaultProp:t,onChange:r=()=>{}}){let[n,i]=function({defaultProp:e,onChange:t}){let r=ep.useState(e),[n]=r,i=ep.useRef(n),o=eS(t);return ep.useEffect(()=>{i.current!==n&&(o(n),i.current=n)},[n,i,o]),r}({defaultProp:t,onChange:r}),o=void 0!==e,a=o?e:n,s=eS(r);return[a,ep.useCallback(t=>{if(o){let r="function"==typeof t?t(e):t;r!==e&&s(r)}else i(t)},[o,e,i,s])]}({prop:n,defaultProp:i,onChange:a});return(0,eh.jsx)(eU,{scope:r,disabled:o,contentId:ez(),open:l,onOpenToggle:ep.useCallback(()=>u(e=>!e),[u]),children:(0,eh.jsx)(eN.div,{"data-state":eJ(l),"data-disabled":o?"":void 0,...s,ref:t})})});e$.displayName=eI;var eq="CollapsibleTrigger",eY=ep.forwardRef((e,t)=>{let{__scopeCollapsible:r,...n}=e,i=eW(eq,r);return(0,eh.jsx)(eN.button,{type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":eJ(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled,...n,ref:t,onClick:function(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(e?.(n),!1===r||!n.defaultPrevented)return t?.(n)}}(e.onClick,i.onOpenToggle)})});eY.displayName=eq;var eG="CollapsibleContent",eK=ep.forwardRef((e,t)=>{let{forceMount:r,...n}=e,i=eW(eG,e.__scopeCollapsible);return(0,eh.jsx)(eD,{present:r||i.open,children:({present:e})=>(0,eh.jsx)(eX,{...n,ref:t,present:e})})});eK.displayName=eG;var eX=ep.forwardRef((e,t)=>{let{__scopeCollapsible:r,present:n,children:i,...o}=e,a=eW(eG,r),[s,l]=ep.useState(n),u=ep.useRef(null),c=function(...e){return ep.useCallback(e_(...e),e)}(t,u),d=ep.useRef(0),f=d.current,h=ep.useRef(0),p=h.current,m=a.open||s,v=ep.useRef(m),g=ep.useRef();return ep.useEffect(()=>{let e=requestAnimationFrame(()=>v.current=!1);return()=>cancelAnimationFrame(e)},[]),eO(()=>{let e=u.current;if(e){g.current=g.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration="0s",e.style.animationName="none";let t=e.getBoundingClientRect();d.current=t.height,h.current=t.width,v.current||(e.style.transitionDuration=g.current.transitionDuration,e.style.animationName=g.current.animationName),l(n)}},[a.open,n]),(0,eh.jsx)(eN.div,{"data-state":eJ(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},children:m&&i})});function eJ(e){return e?"open":"closed"}var eQ=ep.createContext(void 0),e0="Accordion",e1=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[e2,e4,e3]=function(e){let t=e+"CollectionProvider",[r,n]=function(e,t=[]){let r=[],n=()=>{let t=r.map(e=>ep.createContext(e));return function(r){let n=r?.[e]||t;return ep.useMemo(()=>({[`__scope${e}`]:{...r,[e]:n}}),[r,n])}};return n.scopeName=e,[function(t,n){let i=ep.createContext(n),o=r.length;function a(t){let{scope:r,children:n,...a}=t,s=r?.[e][o]||i,l=ep.useMemo(()=>a,Object.values(a));return(0,eh.jsx)(s.Provider,{value:l,children:n})}return r=[...r,n],a.displayName=t+"Provider",[a,function(r,a){let s=a?.[e][o]||i,l=ep.useContext(s);if(l)return l;if(void 0!==n)return n;throw Error(`\`${r}\` must be used within \`${t}\``)}]},function(...e){let t=e[0];if(1===e.length)return t;let r=()=>{let r=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let n=r.reduce((t,{useScope:r,scopeName:n})=>{let i=r(e)[`__scope${n}`];return{...t,...i}},{});return ep.useMemo(()=>({[`__scope${t.scopeName}`]:n}),[n])}};return r.scopeName=t.scopeName,r}(n,...t)]}(t),[i,o]=r(t,{collectionRef:{current:null},itemMap:new Map}),a=e=>{let{scope:t,children:r}=e,n=ep.useRef(null),o=ep.useRef(new Map).current;return(0,eh.jsx)(i,{scope:t,itemMap:o,collectionRef:n,children:r})};a.displayName=t;let s=e+"CollectionSlot",l=ep.forwardRef((e,t)=>{let{scope:r,children:n}=e,i=eg(t,o(s,r).collectionRef);return(0,eh.jsx)(ey,{ref:i,children:n})});l.displayName=s;let u=e+"CollectionItemSlot",c="data-radix-collection-item",d=ep.forwardRef((e,t)=>{let{scope:r,children:n,...i}=e,a=ep.useRef(null),s=eg(t,a),l=o(u,r);return ep.useEffect(()=>(l.itemMap.set(a,{ref:a,...i}),()=>void l.itemMap.delete(a))),(0,eh.jsx)(ey,{[c]:"",ref:s,children:n})});return d.displayName=u,[{Provider:a,Slot:l,ItemSlot:d},function(t){let r=o(e+"CollectionConsumer",t);return ep.useCallback(()=>{let e=r.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${c}]`));return Array.from(r.itemMap.values()).sort((e,r)=>t.indexOf(e.ref.current)-t.indexOf(r.ref.current))},[r.collectionRef,r.itemMap])},n]}(e0),[e5,e6]=function(e,t=[]){let r=[],n=()=>{let t=r.map(e=>ep.createContext(e));return function(r){let n=r?.[e]||t;return ep.useMemo(()=>({[`__scope${e}`]:{...r,[e]:n}}),[r,n])}};return n.scopeName=e,[function(t,n){let i=ep.createContext(n),o=r.length;r=[...r,n];let a=t=>{let{scope:r,children:n,...a}=t,s=r?.[e]?.[o]||i,l=ep.useMemo(()=>a,Object.values(a));return(0,eh.jsx)(s.Provider,{value:l,children:n})};return a.displayName=t+"Provider",[a,function(r,a){let s=a?.[e]?.[o]||i,l=ep.useContext(s);if(l)return l;if(void 0!==n)return n;throw Error(`\`${r}\` must be used within \`${t}\``)}]},function(...e){let t=e[0];if(1===e.length)return t;let r=()=>{let r=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let n=r.reduce((t,{useScope:r,scopeName:n})=>{let i=r(e)[`__scope${n}`];return{...t,...i}},{});return ep.useMemo(()=>({[`__scope${t.scopeName}`]:n}),[n])}};return r.scopeName=t.scopeName,r}(n,...t)]}(e0,[e3,eH]),e8=eH();ep.forwardRef((e,t)=>{let{type:r,...n}=e;return(0,eh.jsx)(e2.Provider,{scope:e.__scopeAccordion,children:"multiple"===r?(0,eh.jsx)(tn,{...n,ref:t}):(0,eh.jsx)(tr,{...n,ref:t})})}).displayName=e0;var[e7,e9]=e5(e0),[te,tt]=e5(e0,{collapsible:!1}),tr=ep.forwardRef((e,t)=>{let{value:r,defaultValue:n,onValueChange:i=()=>{},collapsible:o=!1,...a}=e,[s,l]=eE({prop:r,defaultProp:n,onChange:i});return(0,eh.jsx)(e7,{scope:e.__scopeAccordion,value:s?[s]:[],onItemOpen:l,onItemClose:ep.useCallback(()=>o&&l(""),[o,l]),children:(0,eh.jsx)(te,{scope:e.__scopeAccordion,collapsible:o,children:(0,eh.jsx)(ta,{...a,ref:t})})})}),tn=ep.forwardRef((e,t)=>{let{value:r,defaultValue:n,onValueChange:i=()=>{},...o}=e,[a=[],s]=eE({prop:r,defaultProp:n,onChange:i}),l=ep.useCallback(e=>s((t=[])=>[...t,e]),[s]),u=ep.useCallback(e=>s((t=[])=>t.filter(t=>t!==e)),[s]);return(0,eh.jsx)(e7,{scope:e.__scopeAccordion,value:a,onItemOpen:l,onItemClose:u,children:(0,eh.jsx)(te,{scope:e.__scopeAccordion,collapsible:!0,children:(0,eh.jsx)(ta,{...o,ref:t})})})}),[ti,to]=e5(e0),ta=ep.forwardRef((e,t)=>{let{__scopeAccordion:r,disabled:n,dir:i,orientation:o="vertical",...a}=e,s=eg(ep.useRef(null),t),l=e4(r),u="ltr"===function(e){let t=ep.useContext(eQ);return e||t||"ltr"}(i),c=function(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(e?.(n),!1===r||!n.defaultPrevented)return t?.(n)}}(e.onKeyDown,e=>{if(!e1.includes(e.key))return;let t=e.target,r=l().filter(e=>!e.ref.current?.disabled),n=r.findIndex(e=>e.ref.current===t),i=r.length;if(-1===n)return;e.preventDefault();let a=n,s=i-1,c=()=>{(a=n+1)>s&&(a=0)},d=()=>{(a=n-1)<0&&(a=s)};switch(e.key){case"Home":a=0;break;case"End":a=s;break;case"ArrowRight":"horizontal"===o&&(u?c():d());break;case"ArrowDown":"vertical"===o&&c();break;case"ArrowLeft":"horizontal"===o&&(u?d():c());break;case"ArrowUp":"vertical"===o&&d()}let f=a%i;r[f].ref.current?.focus()});return(0,eh.jsx)(ti,{scope:r,disabled:n,direction:i,orientation:o,children:(0,eh.jsx)(e2.Slot,{scope:r,children:(0,eh.jsx)(eC.div,{...a,"data-orientation":o,ref:s,onKeyDown:n?void 0:c})})})}),ts="AccordionItem",[tl,tu]=e5(ts);ep.forwardRef((e,t)=>{let{__scopeAccordion:r,value:n,...i}=e,o=to(ts,r),a=e9(ts,r),s=e8(r),l=ez(),u=n&&a.value.includes(n)||!1,c=o.disabled||e.disabled;return(0,eh.jsx)(tl,{scope:r,open:u,disabled:c,triggerId:l,children:(0,eh.jsx)(e$,{"data-orientation":o.orientation,"data-state":th(u),...s,...i,ref:t,disabled:c,open:u,onOpenChange:e=>{e?a.onItemOpen(n):a.onItemClose(n)}})})}).displayName=ts;var tc="AccordionHeader";ep.forwardRef((e,t)=>{let{__scopeAccordion:r,...n}=e,i=to(e0,r),o=tu(tc,r);return(0,eh.jsx)(eC.h3,{"data-orientation":i.orientation,"data-state":th(o.open),"data-disabled":o.disabled?"":void 0,...n,ref:t})}).displayName=tc;var td="AccordionTrigger";ep.forwardRef((e,t)=>{let{__scopeAccordion:r,...n}=e,i=to(e0,r),o=tu(td,r),a=tt(td,r),s=e8(r);return(0,eh.jsx)(e2.ItemSlot,{scope:r,children:(0,eh.jsx)(eY,{"aria-disabled":o.open&&!a.collapsible||void 0,"data-orientation":i.orientation,id:o.triggerId,...s,...n,ref:t})})}).displayName=td;var tf="AccordionContent";function th(e){return e?"open":"closed"}ep.forwardRef((e,t)=>{let{__scopeAccordion:r,...n}=e,i=to(e0,r),o=tu(tf,r),a=e8(r);return(0,eh.jsx)(eK,{role:"region","aria-labelledby":o.triggerId,"data-orientation":i.orientation,...a,...n,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})}).displayName=tf;var tp=r(82851),tm=r(7896),tv=r(41816),tg=r(26215),ty=r(34540),tx=r(72130),tb=r(86029);let tw="dismissableLayer.update",tj=(0,ep.createContext)({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),tE=(0,ep.forwardRef)((e,t)=>{let{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...u}=e,c=(0,ep.useContext)(tj),[d,f]=(0,ep.useState)(null),[,h]=(0,ep.useState)({}),p=(0,tg.e)(t,e=>f(e)),m=Array.from(c.layers),[v]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),g=m.indexOf(v),y=d?m.indexOf(d):-1,x=c.layersWithOutsidePointerEventsDisabled.size>0,b=y>=g,w=function(e){let t=(0,tb.W)(e),r=(0,ep.useRef)(!1),n=(0,ep.useRef)(()=>{});return(0,ep.useEffect)(()=>{let e=e=>{if(e.target&&!r.current){let r={originalEvent:e};function i(){tC("dismissableLayer.pointerDownOutside",t,r,{discrete:!0})}"touch"===e.pointerType?(document.removeEventListener("click",n.current),n.current=i,document.addEventListener("click",n.current,{once:!0})):i()}r.current=!1},i=window.setTimeout(()=>{document.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(i),document.removeEventListener("pointerdown",e),document.removeEventListener("click",n.current)}},[t]),{onPointerDownCapture:()=>r.current=!0}}(e=>{let t=e.target,r=[...c.branches].some(e=>e.contains(t));!b||r||(null==o||o(e),null==s||s(e),e.defaultPrevented||null==l||l())}),j=function(e){let t=(0,tb.W)(e),r=(0,ep.useRef)(!1);return(0,ep.useEffect)(()=>{let e=e=>{e.target&&!r.current&&tC("dismissableLayer.focusOutside",t,{originalEvent:e},{discrete:!1})};return document.addEventListener("focusin",e),()=>document.removeEventListener("focusin",e)},[t]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}(e=>{let t=e.target;[...c.branches].some(e=>e.contains(t))||(null==a||a(e),null==s||s(e),e.defaultPrevented||null==l||l())});return!function(e){let t=(0,tb.W)(e);(0,ep.useEffect)(()=>{let e=e=>{"Escape"===e.key&&t(e)};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[t])}(e=>{y!==c.layers.size-1||(null==i||i(e),!e.defaultPrevented&&l&&(e.preventDefault(),l()))}),(0,ep.useEffect)(()=>{if(d)return r&&(0===c.layersWithOutsidePointerEventsDisabled.size&&(n=document.body.style.pointerEvents,document.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),tk(),()=>{r&&1===c.layersWithOutsidePointerEventsDisabled.size&&(document.body.style.pointerEvents=n)}},[d,r,c]),(0,ep.useEffect)(()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),tk())},[d,c]),(0,ep.useEffect)(()=>{let e=()=>h({});return document.addEventListener(tw,e),()=>document.removeEventListener(tw,e)},[]),(0,ep.createElement)(tx.WV.div,(0,tm.Z)({},u,{ref:p,style:{pointerEvents:x?b?"auto":"none":void 0,...e.style},onFocusCapture:(0,tv.M)(e.onFocusCapture,j.onFocusCapture),onBlurCapture:(0,tv.M)(e.onBlurCapture,j.onBlurCapture),onPointerDownCapture:(0,tv.M)(e.onPointerDownCapture,w.onPointerDownCapture)}))});function tk(){let e=new CustomEvent(tw);document.dispatchEvent(e)}function tC(e,t,r,{discrete:n}){let i=r.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&i.addEventListener(e,t,{once:!0}),n?(0,tx.jH)(i,o):i.dispatchEvent(o)}var tS=r(64680);let tO=em["useId".toString()]||(()=>void 0),t_=0;function tM(e){return e.split("-")[0]}function tA(e){return e.split("-")[1]}function tP(e){return["top","bottom"].includes(tM(e))?"x":"y"}function tT(e){return"y"===e?"height":"width"}function tN(e,t,r){let n,{reference:i,floating:o}=e,a=i.x+i.width/2-o.width/2,s=i.y+i.height/2-o.height/2,l=tP(t),u=tT(l),c=i[u]/2-o[u]/2,d="x"===l;switch(tM(t)){case"top":n={x:a,y:i.y-o.height};break;case"bottom":n={x:a,y:i.y+i.height};break;case"right":n={x:i.x+i.width,y:s};break;case"left":n={x:i.x-o.width,y:s};break;default:n={x:i.x,y:i.y}}switch(tA(t)){case"start":n[l]-=c*(r&&d?-1:1);break;case"end":n[l]+=c*(r&&d?-1:1)}return n}let tR=async(e,t,r)=>{let{placement:n="bottom",strategy:i="absolute",middleware:o=[],platform:a}=r,s=await (null==a.isRTL?void 0:a.isRTL(t)),l=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:c}=tN(l,n,s),d=n,f={},h=0;for(let r=0;r({name:"arrow",options:e,async fn(t){let{element:r,padding:n=0}=null!=e?e:{},{x:i,y:o,placement:a,rects:s,platform:l}=t;if(null==r)return{};let u=tD(n),c={x:i,y:o},d=tP(a),f=tA(a),h=tT(d),p=await l.getDimensions(r),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],x=await (null==l.getOffsetParent?void 0:l.getOffsetParent(r)),b=x?"y"===d?x.clientHeight||0:x.clientWidth||0:0;0===b&&(b=s.floating[h]);let w=u[m],j=b-p[h]-u[v],E=b/2-p[h]/2+(g/2-y/2),k=tV(w,tZ(E,j)),C=("start"===f?u[m]:u[v])>0&&E!==k&&s.reference[h]<=s.floating[h];return{[d]:c[d]-(C?EtI[e])}let tH={start:"end",end:"start"};function tU(e){return e.replace(/start|end/g,e=>tH[e])}let tW=["top","right","bottom","left"];function t$(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function tq(e){return tW.some(t=>e[t]>=0)}tW.reduce((e,t)=>e.concat(t,t+"-start",t+"-end"),[]);let tY=function(e){let{strategy:t="referenceHidden",...r}=void 0===e?{}:e;return{name:"hide",async fn(e){let{rects:n}=e;switch(t){case"referenceHidden":{let t=t$(await tF(e,{...r,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:t,referenceHidden:tq(t)}}}case"escaped":{let t=t$(await tF(e,{...r,altBoundary:!0}),n.floating);return{data:{escapedOffsets:t,escaped:tq(t)}}}default:return{}}}}};function tG(e){return"x"===e?"y":"x"}function tK(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function tX(e){if(null==e)return window;if(!tK(e)){let t=e.ownerDocument;return t&&t.defaultView||window}return e}function tJ(e){return tX(e).getComputedStyle(e)}function tQ(e){return tK(e)?"":e?(e.nodeName||"").toLowerCase():""}function t0(){let e=navigator.userAgentData;return null!=e&&e.brands?e.brands.map(e=>e.brand+"/"+e.version).join(" "):navigator.userAgent}function t1(e){return e instanceof tX(e).HTMLElement}function t2(e){return e instanceof tX(e).Element}function t4(e){return"undefined"!=typeof ShadowRoot&&(e instanceof tX(e).ShadowRoot||e instanceof ShadowRoot)}function t3(e){let{overflow:t,overflowX:r,overflowY:n}=tJ(e);return/auto|scroll|overlay|hidden/.test(t+n+r)}function t5(e){let t=/firefox/i.test(t0()),r=tJ(e);return"none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||["transform","perspective"].includes(r.willChange)||t&&"filter"===r.willChange||t&&!!r.filter&&"none"!==r.filter}function t6(){return!/^((?!chrome|android).)*safari/i.test(t0())}let t8=Math.min,t7=Math.max,t9=Math.round;function re(e,t,r){var n,i,o,a;void 0===t&&(t=!1),void 0===r&&(r=!1);let s=e.getBoundingClientRect(),l=1,u=1;t&&t1(e)&&(l=e.offsetWidth>0&&t9(s.width)/e.offsetWidth||1,u=e.offsetHeight>0&&t9(s.height)/e.offsetHeight||1);let c=t2(e)?tX(e):window,d=!t6()&&r,f=(s.left+(d&&null!=(n=null==(i=c.visualViewport)?void 0:i.offsetLeft)?n: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 rt(e){return((e instanceof tX(e).Node?e.ownerDocument:e.document)||window.document).documentElement}function rr(e){return t2(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function rn(e){return re(rt(e)).left+rr(e).scrollLeft}function ri(e){return"html"===tQ(e)?e:e.assignedSlot||e.parentNode||(t4(e)?e.host:null)||rt(e)}function ro(e){return t1(e)&&"fixed"!==getComputedStyle(e).position?e.offsetParent:null}function ra(e){let t=tX(e),r=ro(e);for(;r&&["table","td","th"].includes(tQ(r))&&"static"===getComputedStyle(r).position;)r=ro(r);return r&&("html"===tQ(r)||"body"===tQ(r)&&"static"===getComputedStyle(r).position&&!t5(r))?t:r||function(e){let t=ri(e);for(t4(t)&&(t=t.host);t1(t)&&!["html","body"].includes(tQ(t));){if(t5(t))return t;t=t.parentNode}return null}(e)||t}function rs(e){if(t1(e))return{width:e.offsetWidth,height:e.offsetHeight};let t=re(e);return{width:t.width,height:t.height}}function rl(e,t){var r;void 0===t&&(t=[]);let n=function e(t){let r=ri(t);return["html","body","#document"].includes(tQ(r))?t.ownerDocument.body:t1(r)&&t3(r)?r:e(r)}(e),i=n===(null==(r=e.ownerDocument)?void 0:r.body),o=tX(n),a=i?[o].concat(o.visualViewport||[],t3(n)?n:[]):n,s=t.concat(a);return i?s:s.concat(rl(a))}function ru(e,t,r){return"viewport"===t?tL(function(e,t){let r=tX(e),n=rt(e),i=r.visualViewport,o=n.clientWidth,a=n.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;let e=t6();(e||!e&&"fixed"===t)&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s,y:l}}(e,r)):t2(t)?function(e,t){let r=re(e,!1,"fixed"===t),n=r.top+e.clientTop,i=r.left+e.clientLeft;return{top:n,left:i,x:i,y:n,right:i+e.clientWidth,bottom:n+e.clientHeight,width:e.clientWidth,height:e.clientHeight}}(t,r):tL(function(e){var t;let r=rt(e),n=rr(e),i=null==(t=e.ownerDocument)?void 0:t.body,o=t7(r.scrollWidth,r.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=t7(r.scrollHeight,r.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-n.scrollLeft+rn(e),l=-n.scrollTop;return"rtl"===tJ(i||r).direction&&(s+=t7(r.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}(rt(e)))}let rc={getClippingRect:function(e){let{element:t,boundary:r,rootBoundary:n,strategy:i}=e,o=[..."clippingAncestors"===r?function(e){let t=rl(e),r=["absolute","fixed"].includes(tJ(e).position)&&t1(e)?ra(e):e;return t2(r)?t.filter(e=>t2(e)&&function(e,t){let r=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(r&&t4(r)){let r=t;do{if(r&&e===r)return!0;r=r.parentNode||r.host}while(r)}return!1}(e,r)&&"body"!==tQ(e)):[]}(t):[].concat(r),n],a=o[0],s=o.reduce((e,r)=>{let n=ru(t,r,i);return e.top=t7(n.top,e.top),e.right=t8(n.right,e.right),e.bottom=t8(n.bottom,e.bottom),e.left=t7(n.left,e.left),e},ru(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:r,strategy:n}=e,i=t1(r),o=rt(r);if(r===o)return t;let a={scrollLeft:0,scrollTop:0},s={x:0,y:0};if((i||!i&&"fixed"!==n)&&(("body"!==tQ(r)||t3(o))&&(a=rr(r)),t1(r))){let e=re(r,!0);s.x=e.x+r.clientLeft,s.y=e.y+r.clientTop}return{...t,x:t.x-a.scrollLeft+s.x,y:t.y-a.scrollTop+s.y}},isElement:t2,getDimensions:rs,getOffsetParent:ra,getDocumentElement:rt,getElementRects:e=>{let{reference:t,floating:r,strategy:n}=e;return{reference:function(e,t,r){let n=t1(t),i=rt(t),o=re(e,n&&function(e){let t=re(e);return t9(t.width)!==e.offsetWidth||t9(t.height)!==e.offsetHeight}(t),"fixed"===r),a={scrollLeft:0,scrollTop:0},s={x:0,y:0};if(n||!n&&"fixed"!==r){if(("body"!==tQ(t)||t3(i))&&(a=rr(t)),t1(t)){let e=re(t,!0);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else i&&(s.x=rn(i))}return{x:o.left+a.scrollLeft-s.x,y:o.top+a.scrollTop-s.y,width:o.width,height:o.height}}(t,ra(r),n),floating:{...rs(r),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>"rtl"===tJ(e).direction};function rd(e,t,r,n){void 0===n&&(n={});let{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=!0,animationFrame:s=!1}=n,l=i&&!s,u=o&&!s,c=l||u?[...t2(e)?rl(e):[],...rl(t)]:[];c.forEach(e=>{l&&e.addEventListener("scroll",r,{passive:!0}),u&&e.addEventListener("resize",r)});let d,f=null;if(a){let n=!0;f=new ResizeObserver(()=>{n||r(),n=!1}),t2(e)&&!s&&f.observe(e),f.observe(t)}let h=s?re(e):null;return s&&function t(){let n=re(e);h&&(n.x!==h.x||n.y!==h.y||n.width!==h.width||n.height!==h.height)&&r(),h=n,d=requestAnimationFrame(t)}(),r(),()=>{var e;c.forEach(e=>{l&&e.removeEventListener("scroll",r),u&&e.removeEventListener("resize",r)}),null==(e=f)||e.disconnect(),f=null,s&&cancelAnimationFrame(d)}}let rf=(e,t,r)=>tR(e,t,{platform:rc,...r});var rh="undefined"!=typeof document?ep.useLayoutEffect:ep.useEffect;let rp=e=>{let{element:t,padding:r}=e;return{name:"arrow",options:e,fn(e){if(Object.prototype.hasOwnProperty.call(t,"current")){if(null!=t.current)return tz({element:t.current,padding:r}).fn(e)}else if(t)return tz({element:t,padding:r}).fn(e);return{}}}},rm=(0,ep.forwardRef)((e,t)=>{let{children:r,width:n=10,height:i=5,...o}=e;return(0,ep.createElement)(tx.WV.svg,(0,tm.Z)({},o,{ref:t,width:n,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none"}),e.asChild?r:(0,ep.createElement)("polygon",{points:"0,0 30,0 15,10"}))}),rv="Popper",[rg,ry]=(0,ty.b)(rv),[rx,rb]=rg(rv),rw=(0,ep.forwardRef)((e,t)=>{let{__scopePopper:r,virtualRef:n,...i}=e,o=rb("PopperAnchor",r),a=(0,ep.useRef)(null),s=(0,tg.e)(t,a);return(0,ep.useEffect)(()=>{o.onAnchorChange((null==n?void 0:n.current)||a.current)}),n?null:(0,ep.createElement)(tx.WV.div,(0,tm.Z)({},i,{ref:s}))}),rj="PopperContent",[rE,rk]=rg(rj),[rC,rS]=rg(rj,{hasParent:!1,positionUpdateFns:new Set}),rO=(0,ep.forwardRef)((e,t)=>{var r,n,i,o,a,s,l,u,c,d,f,h;let{__scopePopper:p,side:m="bottom",sideOffset:v=0,align:g="center",alignOffset:y=0,arrowPadding:x=0,collisionBoundary:b=[],collisionPadding:w=0,sticky:j="partial",hideWhenDetached:E=!1,avoidCollisions:k=!0,...C}=e,S=rb(rj,p),[O,_]=(0,ep.useState)(null),M=(0,tg.e)(t,e=>_(e)),[A,P]=(0,ep.useState)(null),T=function(e){let[t,r]=(0,ep.useState)(void 0);return(0,tS.b)(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{let n,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;n=t.inlineSize,i=t.blockSize}else n=e.offsetWidth,i=e.offsetHeight;r({width:n,height:i})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}r(void 0)},[e]),t}(A),N=null!==(r=null==T?void 0:T.width)&&void 0!==r?r:0,R=null!==(n=null==T?void 0:T.height)&&void 0!==n?n:0,D="number"==typeof w?w:{top:0,right:0,bottom:0,left:0,...w},L=Array.isArray(b)?b:[b],F=L.length>0,Z={padding:D,boundary:L.filter(rA),altBoundary:F},{reference:V,floating:z,strategy:I,x:B,y:H,placement:U,middlewareData:W,update:$}=function(e){let{middleware:t,placement:r="bottom",strategy:n="absolute",whileElementsMounted:i}=void 0===e?{}:e,o=ep.useRef(null),a=ep.useRef(null),s=function(e){let t=ep.useRef(e);return rh(()=>{t.current=e}),t}(i),l=ep.useRef(null),[u,c]=ep.useState({x:null,y:null,strategy:n,placement:r,middlewareData:{}}),[d,f]=ep.useState(t);!function e(t,r){let n,i,o;if(t===r)return!0;if(typeof t!=typeof r)return!1;if("function"==typeof t&&t.toString()===r.toString())return!0;if(t&&r&&"object"==typeof t){if(Array.isArray(t)){if((n=t.length)!=r.length)return!1;for(i=n;0!=i--;)if(!e(t[i],r[i]))return!1;return!0}if((n=(o=Object.keys(t)).length)!==Object.keys(r).length)return!1;for(i=n;0!=i--;)if(!Object.prototype.hasOwnProperty.call(r,o[i]))return!1;for(i=n;0!=i--;){let n=o[i];if(("_owner"!==n||!t.$$typeof)&&!e(t[n],r[n]))return!1}return!0}return t!=t&&r!=r}(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=ep.useCallback(()=>{o.current&&a.current&&rf(o.current,a.current,{middleware:d,placement:r,strategy:n}).then(e=>{p.current&&ek.flushSync(()=>{c(e)})})},[d,r,n]);rh(()=>{p.current&&h()},[h]);let p=ep.useRef(!1);rh(()=>(p.current=!0,()=>{p.current=!1}),[]);let m=ep.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=ep.useCallback(e=>{o.current=e,m()},[m]),g=ep.useCallback(e=>{a.current=e,m()},[m]),y=ep.useMemo(()=>({reference:o,floating:a}),[]);return ep.useMemo(()=>({...u,update:h,refs:y,reference:v,floating:g}),[u,h,y,v,g])}({strategy:"fixed",placement:m+("center"!==g?"-"+g:""),whileElementsMounted:rd,middleware:[{name:"offset",options:c={mainAxis:v+R,alignmentAxis:y},async fn(e){let{x:t,y:r}=e,n=await async function(e,t){let{placement:r,platform:n,elements:i}=e,o=await (null==n.isRTL?void 0:n.isRTL(i.floating)),a=tM(r),s=tA(r),l="x"===tP(r),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}}(e,c);return{x:t+n.x,y:r+n.y,data:n}}},k?{name:"shift",options:f={mainAxis:!0,crossAxis:!1,limiter:"partial"===j?(void 0===d&&(d={}),{options:d,fn(e){let{x:t,y:r,placement:n,rects:i,middlewareData:o}=e,{offset:a=0,mainAxis:s=!0,crossAxis:l=!0}=d,u={x:t,y:r},c=tP(n),f=tG(c),h=u[c],p=u[f],m="function"==typeof a?a({...i,placement:n}):a,v="number"==typeof m?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(s){let e="y"===c?"height":"width",t=i.reference[c]-i.floating[e]+v.mainAxis,r=i.reference[c]+i.reference[e]-v.mainAxis;hr&&(h=r)}if(l){var g,y,x,b;let e="y"===c?"width":"height",t=["top","left"].includes(tM(n)),r=i.reference[f]-i.floating[e]+(t&&null!=(g=null==(y=o.offset)?void 0:y[f])?g:0)+(t?0:v.crossAxis),a=i.reference[f]+i.reference[e]+(t?0:null!=(x=null==(b=o.offset)?void 0:b[f])?x:0)-(t?v.crossAxis:0);pa&&(p=a)}return{[c]:h,[f]:p}}}):void 0,...Z},async fn(e){let{x:t,y:r,placement:n}=e,{mainAxis:i=!0,crossAxis:o=!1,limiter:a={fn:e=>{let{x:t,y:r}=e;return{x:t,y:r}}},...s}=f,l={x:t,y:r},u=await tF(e,s),c=tP(tM(n)),d=tG(c),h=l[c],p=l[d];if(i){let e="y"===c?"bottom":"right";h=tV(h+u["y"===c?"top":"left"],tZ(h,h-u[e]))}if(o){let e="y"===d?"bottom":"right";p=tV(p+u["y"===d?"top":"left"],tZ(p,p-u[e]))}let m=a.fn({...e,[c]:h,[d]:p});return{...m,data:{x:m.x-t,y:m.y-r}}}}:void 0,A?rp({element:A,padding:x}):void 0,k?{name:"flip",options:h={...Z},async fn(e){var t,r,n,i;let{placement:o,middlewareData:a,rects:s,initialPlacement:l,platform:u,elements:c}=e,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:p,fallbackStrategy:m="bestFit",flipAlignment:v=!0,...g}=h,y=tM(o),x=p||(y!==l&&v?function(e){let t=tB(e);return[tU(e),t,tU(t)]}(l):[tB(l)]),b=[l,...x],w=await tF(e,g),j=[],E=(null==(t=a.flip)?void 0:t.overflows)||[];if(d&&j.push(w[y]),f){let{main:e,cross:t}=function(e,t,r){void 0===r&&(r=!1);let n=tA(e),i=tP(e),o=tT(i),a="x"===i?n===(r?"end":"start")?"right":"left":"start"===n?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=tB(a)),{main:a,cross:tB(a)}}(o,s,await (null==u.isRTL?void 0:u.isRTL(c.floating)));j.push(w[e],w[t])}if(E=[...E,{placement:o,overflows:j}],!j.every(e=>e<=0)){let e=(null!=(r=null==(n=a.flip)?void 0:n.index)?r:0)+1,t=b[e];if(t)return{data:{index:e,overflows:E},reset:{placement:t}};let s="bottom";switch(m){case"bestFit":{let e=null==(i=E.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:i[0].placement;e&&(s=e);break}case"initialPlacement":s=l}if(o!==s)return{reset:{placement:s}}}return{}}}:void 0,rP({arrowWidth:N,arrowHeight:R}),E?tY({strategy:"referenceHidden"}):void 0].filter(rM)});(0,tS.b)(()=>{V(S.anchor)},[V,S.anchor]);let q=null!==B&&null!==H,[Y,G]=rT(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,J=(null===(a=W.arrow)||void 0===a?void 0:a.centerOffset)!==0,[Q,ee]=(0,ep.useState)();(0,tS.b)(()=>{O&&ee(window.getComputedStyle(O).zIndex)},[O]);let{hasParent:et,positionUpdateFns:er}=rS(rj,p),en=!et;(0,ep.useLayoutEffect)(()=>{if(!en)return er.add($),()=>{er.delete($)}},[en,er,$]),(0,ep.useLayoutEffect)(()=>{en&&q&&Array.from(er).reverse().forEach(e=>requestAnimationFrame(e))},[en,q,er]);let ei={"data-side":Y,"data-align":G,...C,ref:M,style:{...C.style,animation:q?void 0:"none",opacity:null!==(s=W.hide)&&void 0!==s&&s.referenceHidden?0:void 0}};return(0,ep.createElement)("div",{ref:z,"data-radix-popper-content-wrapper":"",style:{position:I,left:0,top:0,transform:q?`translate3d(${Math.round(B)}px, ${Math.round(H)}px, 0)`:"translate3d(0, -200%, 0)",minWidth:"max-content",zIndex:Q,"--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,ep.createElement)(rE,{scope:p,placedSide:Y,onArrowChange:P,arrowX:K,arrowY:X,shouldHideArrow:J},en?(0,ep.createElement)(rC,{scope:p,hasParent:!0,positionUpdateFns:er},(0,ep.createElement)(tx.WV.div,ei)):(0,ep.createElement)(tx.WV.div,ei)))}),r_={top:"bottom",right:"left",bottom:"top",left:"right"};function rM(e){return void 0!==e}function rA(e){return null!==e}let rP=e=>({name:"transformOrigin",options:e,fn(t){var r,n,i,o,a;let{placement:s,rects:l,middlewareData:u}=t,c=(null===(r=u.arrow)||void 0===r?void 0:r.centerOffset)!==0,d=c?0:e.arrowWidth,f=c?0:e.arrowHeight,[h,p]=rT(s),m={start:"0%",center:"50%",end:"100%"}[p],v=(null!==(n=null===(i=u.arrow)||void 0===i?void 0:i.x)&&void 0!==n?n: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="",x="";return"bottom"===h?(y=c?m:`${v}px`,x=`${-f}px`):"top"===h?(y=c?m:`${v}px`,x=`${l.floating.height+f}px`):"right"===h?(y=`${-f}px`,x=c?m:`${g}px`):"left"===h&&(y=`${l.floating.width+f}px`,x=c?m:`${g}px`),{data:{x:y,y:x}}}});function rT(e){let[t,r="center"]=e.split("-");return[t,r]}let rN=e=>{let{__scopePopper:t,children:r}=e,[n,i]=(0,ep.useState)(null);return(0,ep.createElement)(rx,{scope:t,anchor:n,onAnchorChange:i},r)},rR=(0,ep.forwardRef)((e,t)=>{var r;let{container:n=null==globalThis?void 0:null===(r=globalThis.document)||void 0===r?void 0:r.body,...i}=e;return n?ek.createPortal((0,ep.createElement)(tx.WV.div,(0,tm.Z)({},i,{ref:t})),n):null}),rD=e=>{let{present:t,children:r}=e,n=function(e){var t,r;let[n,i]=(0,ep.useState)(),o=(0,ep.useRef)({}),a=(0,ep.useRef)(e),s=(0,ep.useRef)("none"),[l,u]=(t=e?"mounted":"unmounted",r={mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}},(0,ep.useReducer)((e,t)=>{let n=r[e][t];return null!=n?n:e},t));return(0,ep.useEffect)(()=>{let e=rL(o.current);s.current="mounted"===l?e:"none"},[l]),(0,tS.b)(()=>{let t=o.current,r=a.current;if(r!==e){let n=s.current,i=rL(t);e?u("MOUNT"):"none"===i||(null==t?void 0:t.display)==="none"?u("UNMOUNT"):r&&n!==i?u("ANIMATION_OUT"):u("UNMOUNT"),a.current=e}},[e,u]),(0,tS.b)(()=>{if(n){let e=e=>{let t=rL(o.current).includes(e.animationName);e.target===n&&t&&(0,ek.flushSync)(()=>u("ANIMATION_END"))},t=e=>{e.target===n&&(s.current=rL(o.current))};return n.addEventListener("animationstart",t),n.addEventListener("animationcancel",e),n.addEventListener("animationend",e),()=>{n.removeEventListener("animationstart",t),n.removeEventListener("animationcancel",e),n.removeEventListener("animationend",e)}}u("ANIMATION_END")},[n,u]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:(0,ep.useCallback)(e=>{e&&(o.current=getComputedStyle(e)),i(e)},[])}}(t),i="function"==typeof r?r({present:n.isPresent}):ep.Children.only(r),o=(0,tg.e)(n.ref,i.ref);return"function"==typeof r||n.isPresent?(0,ep.cloneElement)(i,{ref:o}):null};function rL(e){return(null==e?void 0:e.animationName)||"none"}rD.displayName="Presence";var rF=r(99575),rZ=r(73597);let rV=(0,ep.forwardRef)((e,t)=>(0,ep.createElement)(tx.WV.span,(0,tm.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}}))),[rz,rI]=(0,ty.b)("Tooltip",[ry]),rB=ry(),rH="tooltip.open",[rU,rW]=rz("TooltipProvider"),r$="Tooltip",[rq,rY]=rz(r$),rG="TooltipTrigger",rK=(0,ep.forwardRef)((e,t)=>{let{__scopeTooltip:r,...n}=e,i=rY(rG,r),o=rW(rG,r),a=rB(r),s=(0,ep.useRef)(null),l=(0,tg.e)(t,s,i.onTriggerChange),u=(0,ep.useRef)(!1),c=(0,ep.useRef)(!1),d=(0,ep.useCallback)(()=>u.current=!1,[]);return(0,ep.useEffect)(()=>()=>document.removeEventListener("pointerup",d),[d]),(0,ep.createElement)(rw,(0,tm.Z)({asChild:!0},a),(0,ep.createElement)(tx.WV.button,(0,tm.Z)({"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute},n,{ref:l,onPointerMove:(0,tv.M)(e.onPointerMove,e=>{"touch"===e.pointerType||c.current||o.isPointerInTransitRef.current||(i.onTriggerEnter(),c.current=!0)}),onPointerLeave:(0,tv.M)(e.onPointerLeave,()=>{i.onTriggerLeave(),c.current=!1}),onPointerDown:(0,tv.M)(e.onPointerDown,()=>{u.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:(0,tv.M)(e.onFocus,()=>{u.current||i.onOpen()}),onBlur:(0,tv.M)(e.onBlur,i.onClose),onClick:(0,tv.M)(e.onClick,e=>{0===e.detail&&i.onClose()})})))}),rX="TooltipPortal",[rJ,rQ]=rz(rX,{forceMount:void 0}),r0="TooltipContent",r1=(0,ep.forwardRef)((e,t)=>{let r=rQ(r0,e.__scopeTooltip),{forceMount:n=r.forceMount,side:i="top",...o}=e,a=rY(r0,e.__scopeTooltip);return(0,ep.createElement)(rD,{present:n||a.open},a.disableHoverableContent?(0,ep.createElement)(r5,(0,tm.Z)({side:i},o,{ref:t})):(0,ep.createElement)(r2,(0,tm.Z)({side:i},o,{ref:t})))}),r2=(0,ep.forwardRef)((e,t)=>{let r=rY(r0,e.__scopeTooltip),n=rW(r0,e.__scopeTooltip),i=(0,ep.useRef)(null),o=(0,tg.e)(t,i),[a,s]=(0,ep.useState)(null),{trigger:l,onClose:u}=r,c=i.current,{onPointerInTransitChange:d}=n,f=(0,ep.useCallback)(()=>{s(null),d(!1)},[d]),h=(0,ep.useCallback)((e,t)=>{let r=e.currentTarget,n=function(e,t){let r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(r,n,i,o)){case o:return"left";case i:return"right";case r:return"top";case n:return"bottom";default:return null}}({x:e.clientX,y:e.clientY},r.getBoundingClientRect()),i="right"===n||"bottom"===n?-5:5;s(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 r=0;r=2;){let e=t[t.length-1],r=t[t.length-2];if((e.x-r.x)*(n.y-r.y)>=(e.y-r.y)*(n.x-r.x))t.pop();else break}t.push(n)}t.pop();let r=[];for(let t=e.length-1;t>=0;t--){let n=e[t];for(;r.length>=2;){let e=r[r.length-1],t=r[r.length-2];if((e.x-t.x)*(n.y-t.y)>=(e.y-t.y)*(n.x-t.x))r.pop();else break}r.push(n)}return(r.pop(),1===t.length&&1===r.length&&t[0].x===r[0].x&&t[0].y===r[0].y)?t:t.concat(r)}(t)}(["right"===n||"left"===n?{x:e.clientX+i,y:e.clientY}:{x:e.clientX,y:e.clientY+i},...function(e){let{top:t,right:r,bottom:n,left:i}=e;return[{x:i,y:t},{x:r,y:t},{x:r,y:n},{x:i,y:n}]}(t.getBoundingClientRect())])),d(!0)},[d]);return(0,ep.useEffect)(()=>()=>f(),[f]),(0,ep.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,ep.useEffect)(()=>{if(a){let e=e=>{let t=e.target,r={x:e.clientX,y:e.clientY},n=(null==l?void 0:l.contains(t))||(null==c?void 0:c.contains(t)),i=!function(e,t){let{x:r,y:n}=e,i=!1;for(let e=0,o=t.length-1;en!=u>n&&r<(l-a)*(n-s)/(u-s)+a&&(i=!i)}return i}(r,a);n?f():i&&(f(),u())};return document.addEventListener("pointermove",e),()=>document.removeEventListener("pointermove",e)}},[l,c,a,u,f]),(0,ep.createElement)(r5,(0,tm.Z)({},e,{ref:o}))}),[r4,r3]=rz(r$,{isInside:!1}),r5=(0,ep.forwardRef)((e,t)=>{let{__scopeTooltip:r,children:n,"aria-label":i,onEscapeKeyDown:o,onPointerDownOutside:a,...s}=e,l=rY(r0,r),u=rB(r),{onClose:c}=l;return(0,ep.useEffect)(()=>(document.addEventListener(rH,c),()=>document.removeEventListener(rH,c)),[c]),(0,ep.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,ep.createElement)(tE,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:e=>e.preventDefault(),onDismiss:c},(0,ep.createElement)(rO,(0,tm.Z)({"data-state":l.stateAttribute},u,s,{ref:t,style:{...s.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)"}}),(0,ep.createElement)(rF.A4,null,n),(0,ep.createElement)(r4,{scope:r,isInside:!0},(0,ep.createElement)(rV,{id:l.contentId,role:"tooltip"},i||n))))}),r6=e=>{let{__scopeTooltip:t,children:r,open:n,defaultOpen:i=!1,onOpenChange:o,disableHoverableContent:a,delayDuration:s}=e,l=rW(r$,e.__scopeTooltip),u=rB(t),[c,d]=(0,ep.useState)(null),f=function(e){let[t,r]=ep.useState(tO());return(0,tS.b)(()=>{r(e=>null!=e?e:String(t_++))},[void 0]),t?`radix-${t}`:""}(),h=(0,ep.useRef)(0),p=null!=a?a:l.disableHoverableContent,m=null!=s?s:l.delayDuration,v=(0,ep.useRef)(!1),[g=!1,y]=(0,rZ.T)({prop:n,defaultProp:i,onChange:e=>{e?(l.onOpen(),document.dispatchEvent(new CustomEvent(rH))):l.onClose(),null==o||o(e)}}),x=(0,ep.useMemo)(()=>g?v.current?"delayed-open":"instant-open":"closed",[g]),b=(0,ep.useCallback)(()=>{window.clearTimeout(h.current),v.current=!1,y(!0)},[y]),w=(0,ep.useCallback)(()=>{window.clearTimeout(h.current),y(!1)},[y]),j=(0,ep.useCallback)(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{v.current=!0,y(!0)},m)},[m,y]);return(0,ep.useEffect)(()=>()=>window.clearTimeout(h.current),[]),(0,ep.createElement)(rN,u,(0,ep.createElement)(rq,{scope:t,contentId:f,open:g,stateAttribute:x,trigger:c,onTriggerChange:d,onTriggerEnter:(0,ep.useCallback)(()=>{l.isOpenDelayed?j():b()},[l.isOpenDelayed,j,b]),onTriggerLeave:(0,ep.useCallback)(()=>{p?w():window.clearTimeout(h.current)},[w,p]),onOpen:b,onClose:w,disableHoverableContent:p},r))},r8=e=>{let{__scopeTooltip:t,forceMount:r,children:n,container:i}=e,o=rY(rX,t);return(0,ep.createElement)(rJ,{scope:t,forceMount:r},(0,ep.createElement)(rD,{present:r||o.open},(0,ep.createElement)(rR,{asChild:!0,container:i},n)))},r7=(0,tp.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"}}),r9=ep.forwardRef((e,t)=>{let{tag:r="span",className:n,font:i,color:o,weight:a,size:s,scaleSize:l,noWrap:u,underline:c,ellipsis:d,wrapEllipsis:f,...h}=e;return(0,eh.jsx)(r,{ref:t,className:(0,tp.cx)(n,r7({font:i,color:o,weight:a,size:s,scaleSize:l,underline:c,noWrap:u,ellipsis:d,wrapEllipsis:f})),...h})}),ne=ep.forwardRef((e,t)=>{let{size:r="18",...n}=e;return(0,eh.jsx)(r9,{tag:"p",...n,ref:t,weight:"regular",scaleSize:r,color:"subtle",className:(0,tp.cx)("leading-relaxed md:leading-relaxed",e.className)})}),nt=(0,tp.j)(["transition-shadow ease-in-out duration-300","shadow-sm hover:shadow","rounded","border"],{variants:{color:{default:["bg-white dark:bg-graydark-200","border-gray-400 dark:border-graydark-400"],subtle:["border-gray-200 dark:border-graydark-200"]}},defaultVariants:{color:"default"}}),nr=ep.forwardRef((e,t)=>{let{className:r,color:n,...i}=e;return(0,eh.jsx)("div",{ref:t,className:nt({className:r,color:n}),...i})});var nn=r(93542);let ni=(void 0===nn||nn.env,"production"),no=1/60*1e3,na="undefined"!=typeof performance?()=>performance.now():()=>Date.now(),ns="undefined"!=typeof window?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(na()),no),nl=!0,nu=!1,nc=!1,nd={delta:0,timestamp:0},nf=["read","update","preRender","render","postRender"],nh=nf.reduce((e,t)=>(e[t]=function(e){let t=[],r=[],n=0,i=!1,o=!1,a=new WeakSet,s={schedule:(e,o=!1,s=!1)=>{let l=s&&i,u=l?t:r;return o&&a.add(e),-1===u.indexOf(e)&&(u.push(e),l&&i&&(n=t.length)),e},cancel:e=>{let t=r.indexOf(e);-1!==t&&r.splice(t,1),a.delete(e)},process:l=>{if(i){o=!0;return}if(i=!0,[t,r]=[r,t],r.length=0,n=t.length)for(let r=0;rnu=!0),e),{}),np=nf.reduce((e,t)=>{let r=nh[t];return e[t]=(e,t=!1,n=!1)=>(nu||nx(),r.schedule(e,t,n)),e},{}),nm=nf.reduce((e,t)=>(e[t]=nh[t].cancel,e),{}),nv=nf.reduce((e,t)=>(e[t]=()=>nh[t].process(nd),e),{}),ng=e=>nh[e].process(nd),ny=e=>{nu=!1,nd.delta=nl?no:Math.max(Math.min(e-nd.timestamp,40),1),nd.timestamp=e,nc=!0,nf.forEach(ng),nc=!1,nu&&(nl=!1,ns(ny))},nx=()=>{nu=!0,nl=!0,nc||ns(ny)},nb=()=>nd,nw="undefined"!=typeof document,nj=nw?ep.useLayoutEffect:ep.useEffect;function nE(){let e=(0,ep.useRef)(!1);return nj(()=>(e.current=!0,()=>{e.current=!1}),[]),e}let nk=(0,ep.createContext)(null);function nC(e){let t=(0,ep.useRef)(null);return null===t.current&&(t.current=e()),t.current}class nS extends ep.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 nO({children:e,isPresent:t}){let r=(0,ep.useId)(),n=(0,ep.useRef)(null),i=(0,ep.useRef)({width:0,height:0,top:0,left:0});return(0,ep.useInsertionEffect)(()=>{let{width:e,height:o,top:a,left:s}=i.current;if(t||!n.current||!e||!o)return;n.current.dataset.motionPopId=r;let l=document.createElement("style");return document.head.appendChild(l),l.sheet&&l.sheet.insertRule(`
+(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[888],{44711:function(e,t,r){"use strict";r.r(t),r.d(t,{ResizeObserver:function(){return $},ResizeObserverEntry:function(){return S},ResizeObserverSize:function(){return c}});var n,i,o,a=[],s="ResizeObserver loop completed with undelivered notifications.",l=function(){var e;"function"==typeof ErrorEvent?e=new ErrorEvent("error",{message:s}):((e=document.createEvent("Event")).initEvent("error",!1,!1),e.message=s),window.dispatchEvent(e)};(n=i||(i={})).BORDER_BOX="border-box",n.CONTENT_BOX="content-box",n.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box";var u=function(e){return Object.freeze(e)},c=function(e,t){this.inlineSize=e,this.blockSize=t,u(this)},d=function(){function e(e,t,r,n){return this.x=e,this.y=t,this.width=r,this.height=n,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,u(this)}return e.prototype.toJSON=function(){return{x:this.x,y:this.y,top:this.top,right:this.right,bottom:this.bottom,left:this.left,width:this.width,height:this.height}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e}(),f=function(e){return e instanceof SVGElement&&"getBBox"in e},h=function(e){if(f(e)){var t=e.getBBox(),r=t.width,n=t.height;return!r&&!n}var i=e.offsetWidth,o=e.offsetHeight;return!(i||o||e.getClientRects().length)},p=function(e){if(e instanceof Element)return!0;var t,r=null===(t=null==e?void 0:e.ownerDocument)||void 0===t?void 0:t.defaultView;return!!(r&&e instanceof r.Element)},m=function(e){switch(e.tagName){case"INPUT":if("image"!==e.type)break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},v="undefined"!=typeof window?window:{},g=new WeakMap,y=/auto|scroll/,x=/^tb|vertical/,b=/msie|trident/i.test(v.navigator&&v.navigator.userAgent),w=function(e){return parseFloat(e||"0")},j=function(e,t,r){return void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=!1),new c((r?t:e)||0,(r?e:t)||0)},E=u({devicePixelContentBoxSize:j(),borderBoxSize:j(),contentBoxSize:j(),contentRect:new d(0,0,0,0)}),k=function(e,t){if(void 0===t&&(t=!1),g.has(e)&&!t)return g.get(e);if(h(e))return g.set(e,E),E;var r=getComputedStyle(e),n=f(e)&&e.ownerSVGElement&&e.getBBox(),i=!b&&"border-box"===r.boxSizing,o=x.test(r.writingMode||""),a=!n&&y.test(r.overflowY||""),s=!n&&y.test(r.overflowX||""),l=n?0:w(r.paddingTop),c=n?0:w(r.paddingRight),p=n?0:w(r.paddingBottom),m=n?0:w(r.paddingLeft),v=n?0:w(r.borderTopWidth),k=n?0:w(r.borderRightWidth),C=n?0:w(r.borderBottomWidth),S=n?0:w(r.borderLeftWidth),O=m+c,_=l+p,M=S+k,A=v+C,P=s?e.offsetHeight-A-e.clientHeight:0,T=a?e.offsetWidth-M-e.clientWidth:0,N=n?n.width:w(r.width)-(i?O+M:0)-T,R=n?n.height:w(r.height)-(i?_+A:0)-P,D=N+O+T+M,L=R+_+P+A,F=u({devicePixelContentBoxSize:j(Math.round(N*devicePixelRatio),Math.round(R*devicePixelRatio),o),borderBoxSize:j(D,L,o),contentBoxSize:j(N,R,o),contentRect:new d(m,l,N,R)});return g.set(e,F),F},C=function(e,t,r){var n=k(e,r),o=n.borderBoxSize,a=n.contentBoxSize,s=n.devicePixelContentBoxSize;switch(t){case i.DEVICE_PIXEL_CONTENT_BOX:return s;case i.BORDER_BOX:return o;default:return a}},S=function(e){var t=k(e);this.target=e,this.contentRect=t.contentRect,this.borderBoxSize=u([t.borderBoxSize]),this.contentBoxSize=u([t.contentBoxSize]),this.devicePixelContentBoxSize=u([t.devicePixelContentBoxSize])},O=function(e){if(h(e))return 1/0;for(var t=0,r=e.parentNode;r;)t+=1,r=r.parentNode;return t},_=function(){var e=1/0,t=[];a.forEach(function(r){if(0!==r.activeTargets.length){var n=[];r.activeTargets.forEach(function(t){var r=new S(t.target),i=O(t.target);n.push(r),t.lastReportedSize=C(t.target,t.observedBox),ie?t.activeTargets.push(r):t.skippedTargets.push(r))})})},A=function(){var e=0;for(M(0);a.some(function(e){return e.activeTargets.length>0});)M(e=_());return a.some(function(e){return e.skippedTargets.length>0})&&l(),e>0},P=[],T=function(e){if(!o){var t=0,r=document.createTextNode("");new MutationObserver(function(){return P.splice(0).forEach(function(e){return e()})}).observe(r,{characterData:!0}),o=function(){r.textContent=""+(t?t--:t++)}}P.push(e),o()},N=function(e){T(function(){requestAnimationFrame(e)})},R=0,D={attributes:!0,characterData:!0,childList:!0,subtree:!0},L=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],F=function(e){return void 0===e&&(e=0),Date.now()+e},Z=!1,V=new(function(){function e(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return e.prototype.run=function(e){var t=this;if(void 0===e&&(e=250),!Z){Z=!0;var r=F(e);N(function(){var n=!1;try{n=A()}finally{if(Z=!1,e=r-F(),!R)return;n?t.run(1e3):e>0?t.run(e):t.start()}})}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var e=this,t=function(){return e.observer&&e.observer.observe(document.body,D)};document.body?t():v.addEventListener("DOMContentLoaded",t)},e.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),L.forEach(function(t){return v.addEventListener(t,e.listener,!0)}))},e.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),L.forEach(function(t){return v.removeEventListener(t,e.listener,!0)}),this.stopped=!0)},e}()),z=function(e){!R&&e>0&&V.start(),(R+=e)||V.stop()},I=function(){function e(e,t){this.target=e,this.observedBox=t||i.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var e,t=C(this.target,this.observedBox,!0);return f(e=this.target)||m(e)||"inline"!==getComputedStyle(e).display||(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e}(),B=function(e,t){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=t},H=new WeakMap,U=function(e,t){for(var r=0;rU(n.observationTargets,t)&&(i&&a.push(n),n.observationTargets.push(new I(t,r&&r.box)),z(1),V.schedule())},e.unobserve=function(e,t){var r=H.get(e),n=U(r.observationTargets,t),i=1===r.observationTargets.length;n>=0&&(i&&a.splice(a.indexOf(r),1),r.observationTargets.splice(n,1),z(-1))},e.disconnect=function(e){var t=this,r=H.get(e);r.observationTargets.slice().forEach(function(r){return t.unobserve(e,r.target)}),r.activeTargets.splice(0,r.activeTargets.length)},e}(),$=function(){function e(e){if(0==arguments.length)throw TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if("function"!=typeof e)throw TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");W.connect(this,e)}return e.prototype.observe=function(e,t){if(0==arguments.length)throw TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!p(e))throw TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");W.observe(this,e,t)},e.prototype.unobserve=function(e){if(0==arguments.length)throw TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!p(e))throw TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");W.unobserve(this,e)},e.prototype.disconnect=function(){W.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e}()},41816:function(e,t,r){"use strict";function n(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(null==e||e(n),!1===r||!n.defaultPrevented)return null==t?void 0:t(n)}}r.d(t,{M:function(){return n}})},26215:function(e,t,r){"use strict";r.d(t,{F:function(){return i},e:function(){return o}});var n=r(2784);function i(...e){return t=>e.forEach(e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)})}function o(...e){return(0,n.useCallback)(i(...e),e)}},34540:function(e,t,r){"use strict";r.d(t,{b:function(){return o},k:function(){return i}});var n=r(2784);function i(e,t){let r=(0,n.createContext)(t);function i(e){let{children:t,...i}=e,o=(0,n.useMemo)(()=>i,Object.values(i));return(0,n.createElement)(r.Provider,{value:o},t)}return i.displayName=e+"Provider",[i,function(i){let o=(0,n.useContext)(r);if(o)return o;if(void 0!==t)return t;throw Error(`\`${i}\` must be used within \`${e}\``)}]}function o(e,t=[]){let r=[],i=()=>{let t=r.map(e=>(0,n.createContext)(e));return function(r){let i=(null==r?void 0:r[e])||t;return(0,n.useMemo)(()=>({[`__scope${e}`]:{...r,[e]:i}}),[r,i])}};return i.scopeName=e,[function(t,i){let o=(0,n.createContext)(i),a=r.length;function s(t){let{scope:r,children:i,...s}=t,l=(null==r?void 0:r[e][a])||o,u=(0,n.useMemo)(()=>s,Object.values(s));return(0,n.createElement)(l.Provider,{value:u},i)}return r=[...r,i],s.displayName=t+"Provider",[s,function(r,s){let l=(null==s?void 0:s[e][a])||o,u=(0,n.useContext)(l);if(u)return u;if(void 0!==i)return i;throw Error(`\`${r}\` must be used within \`${t}\``)}]},function(...e){let t=e[0];if(1===e.length)return t;let r=()=>{let r=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let i=r.reduce((t,{useScope:r,scopeName:n})=>{let i=r(e)[`__scope${n}`];return{...t,...i}},{});return(0,n.useMemo)(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return r.scopeName=t.scopeName,r}(i,...t)]}},72130:function(e,t,r){"use strict";r.d(t,{WV:function(){return s},jH:function(){return l}});var n=r(7896),i=r(2784),o=r(28316),a=r(99575);let s=["a","button","div","h2","h3","img","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{let r=(0,i.forwardRef)((e,r)=>{let{asChild:o,...s}=e,l=o?a.g7:t;return(0,i.useEffect)(()=>{window[Symbol.for("radix-ui")]=!0},[]),(0,i.createElement)(l,(0,n.Z)({},s,{ref:r}))});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function l(e,t){e&&(0,o.flushSync)(()=>e.dispatchEvent(t))}},99575:function(e,t,r){"use strict";r.d(t,{A4:function(){return l},g7:function(){return a}});var n=r(7896),i=r(2784),o=r(26215);let a=(0,i.forwardRef)((e,t)=>{let{children:r,...o}=e,a=i.Children.toArray(r),l=a.find(u);if(l){let e=l.props.children,r=a.map(t=>t!==l?t:i.Children.count(e)>1?i.Children.only(null):(0,i.isValidElement)(e)?e.props.children:null);return(0,i.createElement)(s,(0,n.Z)({},o,{ref:t}),(0,i.isValidElement)(e)?(0,i.cloneElement)(e,void 0,r):null)}return(0,i.createElement)(s,(0,n.Z)({},o,{ref:t}),r)});a.displayName="Slot";let s=(0,i.forwardRef)((e,t)=>{let{children:r,...n}=e;return(0,i.isValidElement)(r)?(0,i.cloneElement)(r,{...function(e,t){let r={...t};for(let n in t){let i=e[n],o=t[n];/^on[A-Z]/.test(n)?r[n]=(...e)=>{null==o||o(...e),null==i||i(...e)}:"style"===n?r[n]={...i,...o}:"className"===n&&(r[n]=[i,o].filter(Boolean).join(" "))}return{...e,...r}}(n,r.props),ref:(0,o.F)(t,r.ref)}):i.Children.count(r)>1?i.Children.only(null):null});s.displayName="SlotClone";let l=({children:e})=>(0,i.createElement)(i.Fragment,null,e);function u(e){return(0,i.isValidElement)(e)&&e.type===l}},86029:function(e,t,r){"use strict";r.d(t,{W:function(){return i}});var n=r(2784);function i(e){let t=(0,n.useRef)(e);return(0,n.useEffect)(()=>{t.current=e}),(0,n.useMemo)(()=>(...e)=>{var r;return null===(r=t.current)||void 0===r?void 0:r.call(t,...e)},[])}},73597:function(e,t,r){"use strict";r.d(t,{T:function(){return o}});var n=r(2784),i=r(86029);function o({prop:e,defaultProp:t,onChange:r=()=>{}}){let[o,a]=function({defaultProp:e,onChange:t}){let r=(0,n.useState)(e),[o]=r,a=(0,n.useRef)(o),s=(0,i.W)(t);return(0,n.useEffect)(()=>{a.current!==o&&(s(o),a.current=o)},[o,a,s]),r}({defaultProp:t,onChange:r}),s=void 0!==e,l=s?e:o,u=(0,i.W)(r);return[l,(0,n.useCallback)(t=>{if(s){let r="function"==typeof t?t(e):t;r!==e&&u(r)}else a(t)},[s,e,a,u])]}},64680:function(e,t,r){"use strict";r.d(t,{b:function(){return i}});var n=r(2784);let i=(null==globalThis?void 0:globalThis.document)?n.useLayoutEffect:()=>{}},25447:function(e,t,r){"use strict";e.exports=r(44868)},99550:function(e,t,r){"use strict";e.exports=r(22360)},6901:function(e,t,r){"use strict";e.exports=r(78476)},8669:function(e,t,r){"use strict";e.exports=r(19455)},53609:function(e,t,r){"use strict";e.exports=r(96721)},81401:function(e,t,r){"use strict";t.__esModule=!0,t.default=function(e){var t=e.children,r=void 0===t?s.default:t,p=e.axisClassName,v=e.hideAxisLine,g=e.hideTicks,y=e.hideZero,x=void 0!==y&&y,b=e.left,w=e.numTicks,j=void 0===w?10:w,E=e.orientation,k=void 0===E?d.default.bottom:E,C=e.rangePadding,S=void 0===C?0:C,O=e.scale,_=e.tickFormat,M=e.tickLength,A=void 0===M?8:M,P=e.tickValues,T=e.top,N=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n=0||(i[r]=e[r]);return i}(e,h),R=null!=_?_:(0,u.default)(O),D=k===d.default.left,L=k===d.default.top,F=L||k===d.default.bottom,Z=(0,l.default)(O),V=D||L?-1:1,z=O.range(),I=(0,f.default)(S),B=(0,c.default)({x:Number(z[0])+.5-I.start,y:0},F),H=(0,c.default)({x:Number(z[z.length-1])+.5+I.end,y:0},F),U=(null!=P?P:(0,a.getTicks)(O,j)).filter(function(e){return!x||0!==e&&"0"!==e}).map(function(e,t){return{value:e,index:t}}),W=U.map(function(e){var t=e.value,r=e.index,n=(0,a.coerceNumber)(Z(t));return{value:t,index:r,from:(0,c.default)({x:n,y:0},F),to:(0,c.default)({x:n,y:A*V},F),formattedValue:R(t,r,U)}});return n.default.createElement(o.Group,{className:(0,i.default)("visx-axis",p),top:void 0===T?0:T,left:void 0===b?0:b},r(m({},N,{axisFromPoint:B,axisToPoint:H,hideAxisLine:void 0!==v&&v,hideTicks:void 0!==g&&g,hideZero:x,horizontal:F,numTicks:j,orientation:k,rangePadding:S,scale:O,tickFormat:R,tickLength:A,tickPosition:Z,tickSign:V,ticks:W})))},p(r(13980));var n=p(r(2784)),i=p(r(72779)),o=r(71602),a=r(63243),s=p(r(58052)),l=p(r(71387)),u=p(r(16882)),c=p(r(89591)),d=p(r(87209)),f=p(r(31863)),h=["children","axisClassName","hideAxisLine","hideTicks","hideZero","left","numTicks","orientation","rangePadding","scale","tickFormat","tickLength","tickValues","top"];function p(e){return e&&e.__esModule?e:{default:e}}function m(){return(m=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[r]=e[r]);return i}(e,s);return n.default.createElement(o.default,u({axisClassName:(0,i.default)("visx-axis-bottom",t),labelOffset:void 0===r?8:r,orientation:a.default.bottom,tickLabelProps:void 0===l?c:l,tickLength:void 0===d?8:d},f))};var n=l(r(2784)),i=l(r(72779)),o=l(r(81401)),a=l(r(87209)),s=["axisClassName","labelOffset","tickLabelProps","tickLength"];function l(e){return e&&e.__esModule?e:{default:e}}function u(){return(u=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[r]=e[r]);return i}(e,s);return n.default.createElement(o.default,u({axisClassName:(0,i.default)("visx-axis-left",t),labelOffset:void 0===r?36:r,orientation:a.default.left,tickLabelProps:void 0===l?c:l,tickLength:void 0===d?8:d},f))},t.leftTickLabelProps=void 0;var n=l(r(2784)),i=l(r(72779)),o=l(r(81401)),a=l(r(87209)),s=["axisClassName","labelOffset","tickLabelProps","tickLength"];function l(e){return e&&e.__esModule?e:{default:e}}function u(){return(u=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[r]=e[r]);return i}(e,s);return n.default.createElement(o.default,u({axisClassName:(0,i.default)("visx-axis-right",t),labelOffset:void 0===r?36:r,orientation:a.default.right,tickLabelProps:void 0===l?c:l,tickLength:void 0===d?8:d},f))},t.rightTickLabelProps=void 0;var n=l(r(2784)),i=l(r(72779)),o=l(r(81401)),a=l(r(87209)),s=["axisClassName","labelOffset","tickLabelProps","tickLength"];function l(e){return e&&e.__esModule?e:{default:e}}function u(){return(u=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[r]=e[r]);return i}(e,s);return n.default.createElement(o.default,u({axisClassName:(0,i.default)("visx-axis-top",t),labelOffset:void 0===r?8:r,orientation:a.default.top,tickLabelProps:void 0===l?c:l,tickLength:void 0===d?8:d},f))},t.topTickLabelProps=void 0;var n=l(r(2784)),i=l(r(72779)),o=l(r(81401)),a=l(r(87209)),s=["axisClassName","labelOffset","tickLabelProps","tickLength"];function l(e){return e&&e.__esModule?e:{default:e}}function u(){return(u=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);r=e.length?{done:!0}:{done:!1,value:e[i++]}}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(t);!(n=a()).done;){var s=n.value,l=Math.sqrt(Math.pow(s.x-e.x,2)+Math.pow(s.y-e.y,2));l0)?(0,i.default)(e,t):{x:(0,n.default)(e.x,null!=(o=r.xMin)?o:-1/0,null!=(a=r.xMax)?a:1/0),y:(0,n.default)(e.y,null!=(s=r.yMin)?s:-1/0,null!=(l=r.yMax)?l:1/0)}};var n=o(r(30968)),i=o(r(98929));function o(e){return e&&e.__esModule?e:{default:e}}},32722:function(e,t,r){"use strict";t.__esModule=!0,t.default=function(e){return(0,n.useMemo)(function(){if(!e)return[];var t=e.getCTM()||new DOMMatrix;return function(e,t,r){if(void 0===r&&(r=1),!e)return[];for(var n=[],i=e.getTotalLength(),o=0;o<=i;o+=r){var a=e.getPointAtLength(o).matrixTransform(t);n.push(a)}return n}(e,t)},[null==e?void 0:e.getTotalLength()])};var n=r(2784)},37016:function(e,t,r){"use strict";t.__esModule=!0,t.default=function(e){var t=(0,n.useState)(e),r=t[0],i=t[1],o=(0,n.useRef)(null),a=(0,n.useCallback)(function(e,t){o.current=t||null,i(e)},[i]);return(0,n.useLayoutEffect)(function(){o.current&&(o.current(r),o.current=null)},[r]),[r,a]};var n=r(2784)},65319:function(e,t,r){"use strict";r.r(t),r.d(t,{localPoint:function(){return n.Z},touchPoint:function(){return i.Z}});var n=r(91032),i=r(49833)},91032:function(e,t,r){"use strict";r.d(t,{Z:function(){return o}});var n=r(49833),i=r(44321);function o(e,t){if((0,i.kK)(e)&&t)return(0,n.Z)(e,t);if((0,i.cO)(e)){var r=e.target;if(r)return(0,n.Z)(r,e)}return null}},49833:function(e,t,r){"use strict";r.d(t,{Z:function(){return s}});var n=r(19067),i=r(44321);function o(){return(o=Object.assign?Object.assign.bind():function(e){for(var t=1;t0?{x:e.changedTouches[0].clientX,y:e.changedTouches[0].clientY}:o({},a);if((0,i.N5)(e))return{x:e.clientX,y:e.clientY};var t=null==e?void 0:e.target,r=t&&"getBoundingClientRect"in t?t.getBoundingClientRect():null;return r?{x:r.x+r.width/2,y:r.y+r.height/2}:o({},a)}(t),s=(0,i.vZ)(e)?e.ownerSVGElement:e,l=(0,i.DY)(s)?s.getScreenCTM():null;if((0,i.r4)(s)&&l){var u=s.createSVGPoint();return u.x=r.x,u.y=r.y,u=u.matrixTransform(l.inverse()),new n.Z({x:u.x,y:u.y})}var c=e.getBoundingClientRect();return new n.Z({x:r.x-c.left-e.clientLeft,y:r.y-c.top-e.clientTop})}},44321:function(e,t,r){"use strict";function n(e){return!!e&&e instanceof Element}function i(e){return!!e&&(e instanceof SVGElement||"ownerSVGElement"in e)}function o(e){return!!e&&"createSVGPoint"in e}function a(e){return!!e&&"getScreenCTM"in e}function s(e){return!!e&&"changedTouches"in e}function l(e){return!!e&&"clientX"in e}function u(e){return!!e&&(e instanceof Event||"nativeEvent"in e&&e.nativeEvent instanceof Event)}r.d(t,{DY:function(){return a},N5:function(){return l},cO:function(){return u},kK:function(){return n},r4:function(){return o},vZ:function(){return i},z6:function(){return s}})},21516:function(e,t,r){"use strict";t.__esModule=!0,t.default=p;var n=f(r(13980)),i=f(r(2784)),o=f(r(72779)),a=f(r(47440)),s=r(71602),l=r(61305),u=r(63243),c=f(r(12345)),d=["top","left","scale","height","stroke","strokeWidth","strokeDasharray","className","numTicks","lineStyle","offset","tickValues","children"];function f(e){return e&&e.__esModule?e:{default:e}}function h(){return(h=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[r]=e[r]);return i}(e,d),S=null!=E?E:(0,u.getTicks)(n,void 0===b?10:b),O=(null!=j?j:0)+(0,c.default)(n)/2,_=S.map(function(e,t){var r,i=(null!=(r=(0,u.coerceNumber)(n(e)))?r:0)+O;return{index:t,from:new l.Point({x:i,y:0}),to:new l.Point({x:i,y:f})}});return i.default.createElement(s.Group,{className:(0,o.default)("visx-columns",x),top:void 0===t?0:t,left:void 0===r?0:r},k?k({lines:_}):_.map(function(e){var t=e.from,r=e.to,n=e.index;return i.default.createElement(a.default,h({key:"column-line-"+n,from:t,to:r,stroke:m,strokeWidth:g,strokeDasharray:y,style:w},C))}))}p.propTypes={tickValues:n.default.array,height:n.default.number.isRequired}},34264:function(e,t,r){"use strict";t.__esModule=!0,t.default=p;var n=f(r(13980)),i=f(r(2784)),o=f(r(72779)),a=f(r(47440)),s=r(71602),l=r(61305),u=r(63243),c=f(r(12345)),d=["top","left","scale","width","stroke","strokeWidth","strokeDasharray","className","children","numTicks","lineStyle","offset","tickValues"];function f(e){return e&&e.__esModule?e:{default:e}}function h(){return(h=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[r]=e[r]);return i}(e,d),S=null!=k?k:(0,u.getTicks)(n,void 0===w?10:w),O=(null!=E?E:0)+(0,c.default)(n)/2,_=S.map(function(e,t){var r,i=(null!=(r=(0,u.coerceNumber)(n(e)))?r:0)+O;return{index:t,from:new l.Point({x:0,y:i}),to:new l.Point({x:f,y:i})}});return i.default.createElement(s.Group,{className:(0,o.default)("visx-rows",x),top:void 0===t?0:t,left:void 0===r?0:r},b?b({lines:_}):_.map(function(e){var t=e.from,r=e.to,n=e.index;return i.default.createElement(a.default,h({key:"row-line-"+n,from:t,to:r,stroke:m,strokeWidth:g,strokeDasharray:y,style:j},C))}))}p.propTypes={tickValues:n.default.array,width:n.default.number.isRequired}},12345:function(e,t){"use strict";t.__esModule=!0,t.default=function(e){return"bandwidth"in e?e.bandwidth():0}},59309:function(e,t,r){"use strict";r.d(t,{Z:function(){return c}});var n=r(13980),i=r.n(n),o=r(2784),a=r(72779),s=r.n(a),l=["top","left","transform","className","children","innerRef"];function u(){return(u=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[r]=e[r]);return i}(e,l);return o.createElement("g",u({ref:c,className:s()("visx-group",i),transform:n||"translate("+(void 0===r?0:r)+", "+(void 0===t?0:t)+")"},d),a)}c.propTypes={top:i().number,left:i().number,transform:i().string,className:i().string,children:i().node,innerRef:i().oneOfType([i().string,i().func,i().object])}},71602:function(e,t,r){"use strict";r.r(t),r.d(t,{Group:function(){return n.Z}});var n=r(59309)},19067:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});var n=function(){function e(e){var t=e.x,r=e.y;this.x=0,this.y=0,this.x=void 0===t?0:t,this.y=void 0===r?0:r}var t=e.prototype;return t.value=function(){return{x:this.x,y:this.y}},t.toArray=function(){return[this.x,this.y]},e}()},61305:function(e,t,r){"use strict";r.r(t),r.d(t,{Point:function(){return n.Z},subtractPoints:function(){return o},sumPoints:function(){return i}});var n=r(19067);function i(e,t){return new n.Z({x:e.x+t.x,y:e.y+t.y})}function o(e,t){return new n.Z({x:e.x-t.x,y:e.y-t.y})}},93125:function(e,t,r){"use strict";t.Z=function(e){var t=e.animationTrajectory,r=e.tickComponent,s=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n=0||(i[r]=e[r]);return i}(e,a),l=(0,n.useMemo)(function(){return function(e){return n.default.createElement(o.default,u({},e,{tickComponent:r,animationTrajectory:t}))}},[t,r]);return n.default.createElement(i.default,u({},s,{ticksComponent:l}))},l(r(13980));var n=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=s(void 0);if(r&&r.has(e))return r.get(e);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}return n.default=e,r&&r.set(e,n),n}(r(2784)),i=l(r(81401)),o=l(r(65154)),a=["animationTrajectory","tickComponent"];function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(s=function(e){return e?r:t})(e)}function l(e){return e&&e.__esModule?e:{default:e}}function u(){return(u=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[r]=e[r]);return i}(e,a);return n.default.createElement(i.default,{scale:t,height:r,numTicks:s,tickValues:u,className:c,top:f,left:h},function(e){var r=e.lines;return n.default.createElement(o.default,l({scale:t,lines:r,animationTrajectory:d,animateXOrY:"x",lineKey:function(e){var t,r;return"column-"+(null!=(t=null==e?void 0:null==(r=e.from)?void 0:r.x)?t:"")+"-"+e.index}},p))})};var n=s(r(2784)),i=s(r(21516)),o=s(r(55727)),a=["scale","height","numTicks","tickValues","offset","className","animationTrajectory","top","left"];function s(e){return e&&e.__esModule?e:{default:e}}function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[r]=e[r]);return i}(e,s),h=(0,o.useTransition)(r,u({},(0,a.default)({scale:t,animateXOrY:l,animationTrajectory:n}),{key:c}));return i.default.createElement(i.default.Fragment,null,h(function(e,t,r){var n=e.fromX,a=e.toX,s=e.fromY,l=e.toY,c=e.opacity,h=r.key;return i.default.createElement(o.animated.line,u({key:h,x1:n,x2:a,y1:s,y2:l,strokeOpacity:c,style:d},f))}))}c.propTypes={lineKey:n.default.func.isRequired}},93353:function(e,t,r){"use strict";t.Z=function(e){var t=e.scale,r=e.width,s=e.numTicks,u=e.tickValues,c=(e.offset,e.className),d=e.animationTrajectory,f=e.top,h=e.left,p=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n=0||(i[r]=e[r]);return i}(e,a);return n.default.createElement(i.default,{scale:t,width:r,numTicks:s,tickValues:u,className:c,top:f,left:h},function(e){var r=e.lines;return n.default.createElement(o.default,l({scale:t,lines:r,animationTrajectory:d,animateXOrY:"y",lineKey:function(e){var t,r;return"row-"+(null!=(t=null==e?void 0:null==(r=e.from)?void 0:r.y)?t:"")+"-"+e.index}},p))})};var n=s(r(2784)),i=s(r(34264)),o=s(r(55727)),a=["scale","width","numTicks","tickValues","offset","className","animationTrajectory","top","left"];function s(e){return e&&e.__esModule?e:{default:e}}function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[r]=e[r]);return i}(e,s),g=(0,o.useRef)(null),y=(0,o.useRef)(0),x=(0,o.useState)({width:0,height:0,top:0,left:0}),b=x[0],w=x[1],j=(0,o.useMemo)(function(){var e=Array.isArray(f)?f:[f];return(0,i.default)(function(t){w(function(r){return Object.keys(r).filter(function(e){return r[e]!==t[e]}).every(function(t){return e.includes(t)})?r:t})},l,{leading:m})},[l,m,f]);return(0,o.useEffect)(function(){var e=new a.ResizeObserver(function(e){void 0===e&&(e=[]),e.forEach(function(e){var t=e.contentRect,r=t.left,n=t.top,i=t.width,o=t.height;y.current=window.requestAnimationFrame(function(){j({width:i,height:o,top:n,left:r})})})});return g.current&&e.observe(g.current),function(){window.cancelAnimationFrame(y.current),e.disconnect(),null!=j&&j.cancel&&j.cancel()}},[j]),o.default.createElement("div",c({style:void 0===h?{width:"100%",height:"100%"}:h,ref:g,className:t},v),r(c({},b,{ref:g.current,resize:j})))}f.propTypes={className:n.default.string,debounceTime:n.default.number,enableDebounceLeadingCall:n.default.bool,ignoreDimensions:n.default.oneOfType([n.default.any,n.default.arrayOf(n.default.any)]),children:n.default.func.isRequired}},2663:function(e,t,r){"use strict";var n=r(8597),i=r(12430),o=r(70590),a=r(50630),s=r(34278),l=r(64183),u=r(61662),c=r(43634),d=r(73335),f=r(54229),h=r(30558),p=r(71646),m=r(26587);t.Z=function(e){if(void 0!==e&&"type"in e)switch(e.type){case"linear":break;case"log":return(0,i.Z)(e);case"pow":return(0,o.Z)(e);case"sqrt":return(0,a.Z)(e);case"symlog":return(0,s.Z)(e);case"time":return(0,l.Z)(e);case"utc":return(0,u.Z)(e);case"quantile":return(0,c.Z)(e);case"quantize":return(0,d.Z)(e);case"threshold":return(0,f.Z)(e);case"ordinal":return(0,h.Z)(e);case"point":return(0,p.Z)(e);case"band":return(0,m.Z)(e)}return(0,n.Z)(e)}},63243:function(e,t,r){"use strict";r.r(t),r.d(t,{coerceNumber:function(){return C.Z},createScale:function(){return b.Z},getTicks:function(){return S.Z},inferScaleType:function(){return k},scaleBand:function(){return n.Z},scaleCanBeZeroed:function(){return _.Z},scaleLinear:function(){return o.Z},scaleLog:function(){return f.Z},scaleOrdinal:function(){return p.Z},scalePoint:function(){return i.Z},scalePower:function(){return h.Z},scaleQuantile:function(){return v.Z},scaleQuantize:function(){return m.Z},scaleRadial:function(){return u},scaleSqrt:function(){return x.Z},scaleSymlog:function(){return g.Z},scaleThreshold:function(){return y.Z},scaleTime:function(){return c.Z},scaleUtc:function(){return d.Z},toString:function(){return O.Z},updateScale:function(){return j}});var n=r(26587),i=r(71646),o=r(8597),a=r(19637),s=r(25176),l=(0,s.Z)("domain","range","clamp","nice","round","unknown");function u(e){return l((0,a.Z)(),e)}var c=r(64183),d=r(61662),f=r(12430),h=r(70590),p=r(30558),m=r(73335),v=r(43634),g=r(34278),y=r(54229),x=r(50630),b=r(2663),w=s.Z.apply(void 0,s.a),j=function(e,t){return w(e.copy(),t)},E=r(40668);function k(e){return"paddingInner"in e?"band":"padding"in e?"point":"quantiles"in e?"quantile":"base"in e?"log":"exponent"in e?.5===e.exponent()?"sqrt":"pow":"constant"in e?"symlog":"clamp"in e?e.ticks()[0]instanceof Date?(0,E.Z)(e)?"utc":"time":"linear":"nice"in e?"quantize":"invertExtent"in e?"threshold":"ordinal"}var C=r(28142),S=r(71220),O=r(51519),_=r(34636)},25176:function(e,t,r){"use strict";r.d(t,{a:function(){return S},Z:function(){return _}});var n=r(88751),i=r(87286),o=r(43780),a=r(77636),s=r(78978),l={lab:n.Z,hcl:i.Z,"hcl-long":i.b,hsl:o.Z,"hsl-long":o.q,cubehelix:a.Z,"cubehelix-long":a.B,rgb:s.ZP},u=r(68603),c=r(54076),d=r(18450),f=r(50690),h=r(52546),p=r(76231),m=r(97344),v=r(12370),g=r(28239),y=r(52004),x=r(94758),b=r(97631),w=r(2908),j=r(40668),E={day:u.Z,hour:c.Z,minute:d.Z,month:f.Z,second:h.Z,week:p.OM,year:m.Z},k={day:v.Z,hour:g.Z,minute:y.Z,month:x.Z,second:h.Z,week:b.Ox,year:w.Z},C=r(74672),S=["domain","nice","zero","interpolate","round","range","reverse","align","base","clamp","constant","exponent","padding","unknown"],O={domain:function(e,t){t.domain&&e.domain(t.domain)},nice:function(e,t){if("nice"in t&&void 0!==t.nice&&"nice"in e){var r=t.nice;if("boolean"==typeof r)r&&e.nice();else if("number"==typeof r)e.nice(r);else{var n=(0,j.Z)(e);if("string"==typeof r)e.nice(n?k[r]:E[r]);else{var i=r.interval,o=r.step,a=(n?k[i]:E[i]).every(o);null!=a&&e.nice(a)}}}},zero:function(e,t){if("zero"in t&&!0===t.zero){var r=e.domain(),n=r[0],i=r[1],o=i=0||(i[r]=e[r]);return i}(e,s),y=(0,a.Nb)({innerRadius:i,outerRadius:u,cornerRadius:c,startAngle:d,endAngle:f,padAngle:h,padRadius:p});return m?n.createElement(n.Fragment,null,m({path:y})):r||null!=d&&null!=f&&null!=i&&null!=u?n.createElement("path",l({ref:v,className:o()("visx-arc",t),d:y(r)||""},g)):(console.warn("[@visx/shape/Arc]: expected data because one of startAngle, endAngle, innerRadius, outerRadius is undefined. Bailing."),null)}var c=r(59309),d=["className","top","left","data","centroid","innerRadius","outerRadius","cornerRadius","startAngle","endAngle","padAngle","padRadius","pieSort","pieSortValues","pieValue","children","fill"];function f(){return(f=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[r]=e[r]);return i}(e,d),S=(0,a.Nb)({innerRadius:void 0===u?0:u,outerRadius:h,cornerRadius:p,padRadius:y}),O=(0,a.ve)({startAngle:m,endAngle:v,padAngle:g,value:w,sort:x,sortValues:b}),_=O(void 0===s?[]:s);return j?n.createElement(n.Fragment,null,j({arcs:_,path:S,pie:O})):n.createElement(c.Z,{className:"visx-pie-arcs-group",top:r,left:i},_.map(function(e,r){return n.createElement("g",{key:"pie-arc-"+r},n.createElement("path",f({className:o()("visx-pie-arc",t),d:S(e)||"",fill:null==k||"string"==typeof k?k:k(e)},C)),null==l?void 0:l(S.centroid(e),e))}))}var p=r(63739),m=r(27079),v=["className","angle","radius","defined","curve","data","innerRef","children","fill"];function g(){return(g=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[r]=e[r]);return i}(e,v),p=(0,a.aJ)({angle:r,radius:i,defined:s,curve:l});return d?n.createElement(n.Fragment,null,d({path:p})):n.createElement("path",g({ref:c,className:o()("visx-line-radial",t),d:p(void 0===u?[]:u)||"",fill:void 0===f?"transparent":f},h))}var x=["children","x","x0","x1","y","y0","y1","data","defined","className","curve","innerRef"];function b(){return(b=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[r]=e[r]);return i}(e,x),g=(0,a.SO)({x:r,x0:i,x1:s,y:l,y0:u,y1:c,defined:void 0===f?function(){return!0}:f,curve:p});return t?n.createElement(n.Fragment,null,t({path:g})):n.createElement("path",b({ref:m,className:o()("visx-area",h),d:g(void 0===d?[]:d)||""},v))}var j=r(55746),E=["className","top","left","keys","data","curve","defined","x","x0","x1","y0","y1","value","order","offset","color","children"];function k(){return(k=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[r]=e[r]);return i}(e,E),C=(0,a.kn)({keys:s,value:g,order:y,offset:x}),S=(0,a.SO)({x:f,x0:h,x1:p,y0:m,y1:v,curve:u,defined:d}),O=C(l);return w?n.createElement(n.Fragment,null,w({stacks:O,path:S,stack:C})):n.createElement(c.Z,{top:r,left:i},O.map(function(e,r){return n.createElement("path",k({className:o()("visx-stack",t),key:"stack-"+r+"-"+(e.key||""),d:S(e)||"",fill:null==b?void 0:b(e.key,r)},j))}))}var S=["className","top","left","keys","data","curve","defined","x","x0","x1","y0","y1","value","order","offset","color","children"];function O(){return(O=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[r]=e[r]);return i}(e,S);return n.createElement(C,O({className:t,top:r,left:i,keys:a,data:s,curve:l,defined:u,x:c,x0:d,x1:f,y0:h,y1:p,value:m,order:v,offset:g,color:y},b),x||function(e){var r=e.stacks,i=e.path;return r.map(function(e,r){return n.createElement("path",O({className:o()("visx-area-stack",t),key:"area-stack-"+r+"-"+(e.key||""),d:i(e)||"",fill:null==y?void 0:y(e.key,r)},b))})})}var M=r(14582),A=r(10897);function P(e){if("bandwidth"in e)return e.bandwidth();var t=e.range(),r=e.domain();return Math.abs(t[t.length-1]-t[0])/r.length}var T=["data","className","top","left","x0","x0Scale","x1Scale","yScale","color","keys","height","children"];function N(){return(N=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[r]=e[r]);return i}(e,T),g=P(u),y=t.map(function(e,t){return{index:t,x0:l(s(e)),bars:h.map(function(t,r){var n=e[t];return{index:r,key:t,value:n,width:g,x:u(t)||0,y:d(n)||0,color:f(t,r),height:p-(d(n)||0)}})}});return m?n.createElement(n.Fragment,null,m(y)):n.createElement(c.Z,{className:o()("visx-bar-group",r),top:i,left:a},y.map(function(e){return n.createElement(c.Z,{key:"bar-group-"+e.index+"-"+e.x0,left:e.x0},e.bars.map(function(t){return n.createElement(M.Z,N({key:"bar-group-bar-"+e.index+"-"+t.index+"-"+t.value+"-"+t.key,x:t.x,y:t.y,width:t.width,height:t.height,fill:t.color},v))}))}))}var D=["data","className","top","left","x","y0","y0Scale","y1Scale","xScale","color","keys","width","children"];function L(){return(L=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[r]=e[r]);return i}(e,D),y=P(f),x=t.map(function(e,t){return{index:t,y0:d(u(e))||0,bars:m.map(function(t,r){var n=e[t];return{index:r,key:t,value:n,height:y,x:l(n)||0,y:f(t)||0,color:p(t,r),width:h(n)||0}})}});return v?n.createElement(n.Fragment,null,v(x)):n.createElement(c.Z,{className:o()("visx-bar-group-horizontal",r),top:i,left:a},x.map(function(e){return n.createElement(c.Z,{key:"bar-group-"+e.index+"-"+e.y0,top:e.y0},e.bars.map(function(t){return n.createElement(M.Z,L({key:"bar-group-bar-"+e.index+"-"+t.index+"-"+t.value+"-"+t.key,x:t.x,y:t.y,width:t.width,height:t.height,fill:t.color},g))}))}))}var Z=r(98926);function V(e){return"number"==typeof(null==e?void 0:e.x)?null==e?void 0:e.x:0}function z(e){return"number"==typeof(null==e?void 0:e.y)?null==e?void 0:e.y:0}function I(e){return null==e?void 0:e.source}function B(e){return null==e?void 0:e.target}function H(e){return null==e?void 0:e[0]}function U(e){return null==e?void 0:e[1]}var W=r(26078),$=r(44081),q=r(30382),Y=["data","className","top","left","x","y0","y1","xScale","yScale","color","keys","value","order","offset","children"];function G(){return(G=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[r]=e[r]);return i}(e,Y),j=(0,Z.Z)();v&&j.keys(v),g&&(0,W.Z)(j.value,g),y&&j.order((0,$.ZP)(y)),x&&j.offset((0,q.ZP)(x));var E=j(t),k=P(h),C=E.map(function(e,t){var r=e.key;return{index:t,key:r,bars:e.map(function(t,n){var i=(p(u(t))||0)-(p(f(t))||0),o=p(f(t)),a="bandwidth"in h?h(s(t.data)):Math.max((h(s(t.data))||0)-k/2);return{bar:t,key:r,index:n,height:i,width:k,x:a||0,y:o||0,color:m(e.key,n)}})}});return b?n.createElement(n.Fragment,null,b(C)):n.createElement(c.Z,{className:o()("visx-bar-stack",r),top:i,left:a},C.map(function(e){return e.bars.map(function(t){return n.createElement(M.Z,G({key:"bar-stack-"+e.index+"-"+t.index,x:t.x,y:t.y,height:t.height,width:t.width,fill:t.color},w))})}))}var X=["data","className","top","left","y","x0","x1","xScale","yScale","color","keys","value","order","offset","children"];function J(){return(J=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[r]=e[r]);return i}(e,X),j=(0,Z.Z)();v&&j.keys(v),g&&(0,W.Z)(j.value,g),y&&j.order((0,$.ZP)(y)),x&&j.offset((0,q.ZP)(x));var E=j(t),k=P(p),C=E.map(function(e,t){var r=e.key;return{index:t,key:r,bars:e.map(function(t,n){var i=(h(f(t))||0)-(h(u(t))||0),o=h(u(t)),a="bandwidth"in p?p(s(t.data)):Math.max((p(s(t.data))||0)-i/2);return{bar:t,key:r,index:n,height:k,width:i,x:o||0,y:a||0,color:m(e.key,n)}})}});return b?n.createElement(n.Fragment,null,b(C)):n.createElement(c.Z,{className:o()("visx-bar-stack-horizontal",r),top:i,left:a},C.map(function(e){return e.bars.map(function(t){return n.createElement(M.Z,J({key:"bar-stack-"+e.index+"-"+t.index,x:t.x,y:t.y,height:t.height,width:t.width,fill:t.color},w))})}))}var ee=function(e){return Math.PI/180*e},et=r(72215),er=["className","children","data","innerRef","path","x","y","source","target"];function en(){return(en=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[r]=e[r]);return i}(e,er),h=s||ei({source:void 0===c?I:c,target:void 0===d?B:d,x:void 0===l?z:l,y:void 0===u?V:u});return r?n.createElement(n.Fragment,null,r({path:h})):n.createElement("path",en({ref:a,className:o()("visx-link visx-link-horizontal-diagonal",t),d:h(i)||""},f))}var ea=["className","children","data","innerRef","path","x","y","source","target"];function es(){return(es=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[r]=e[r]);return i}(e,ea),h=s||el({source:void 0===c?I:c,target:void 0===d?B:d,x:void 0===l?V:l,y:void 0===u?z:u});return r?n.createElement(n.Fragment,null,r({path:h})):n.createElement("path",es({ref:a,className:o()("visx-link visx-link-vertical-diagonal",t),d:h(i)||""},f))}var ec=["className","children","data","innerRef","path","angle","radius","source","target"];function ed(){return(ed=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[r]=e[r]);return i}(e,ec),h=s||ef({source:void 0===c?I:c,target:void 0===d?B:d,angle:void 0===l?V:l,radius:void 0===u?z:u});return r?n.createElement(n.Fragment,null,r({path:h})):n.createElement("path",ed({ref:a,className:o()("visx-link visx-link-radial-diagonal",t),d:h(i)||""},f))}var ep=r(91672),em=["className","children","data","innerRef","path","percent","x","y","source","target"];function ev(){return(ev=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[r]=e[r]);return i}(e,em),p=s||eg({source:void 0===d?I:d,target:void 0===f?B:f,x:void 0===u?z:u,y:void 0===c?V:c,percent:void 0===l?.2:l});return r?n.createElement(n.Fragment,null,r({path:p})):n.createElement("path",ev({ref:a,className:o()("visx-link visx-link-horizontal-curve",t),d:p(i)||""},h))}var ex=["className","children","data","innerRef","path","percent","x","y","source","target"];function eb(){return(eb=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[r]=e[r]);return i}(e,ex),p=s||ew({source:void 0===d?I:d,target:void 0===f?B:f,x:void 0===u?V:u,y:void 0===c?z:c,percent:void 0===l?.2:l});return r?n.createElement(n.Fragment,null,r({path:p})):n.createElement("path",eb({ref:a,className:o()("visx-link visx-link-vertical-curve",t),d:p(i)||""},h))}var eE=["className","children","data","innerRef","path","percent","x","y","source","target"];function ek(){return(ek=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[r]=e[r]);return i}(e,eE),p=s||eC({source:void 0===d?I:d,target:void 0===f?B:f,x:void 0===u?V:u,y:void 0===c?z:c,percent:void 0===l?.2:l});return r?n.createElement(n.Fragment,null,r({path:p})):n.createElement("path",ek({ref:a,className:o()("visx-link visx-link-radial-curve",t),d:p(i)||""},h))}var eO=["className","children","innerRef","data","path","x","y","source","target"];function e_(){return(e_=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[r]=e[r]);return i}(e,eO),h=s||eM({source:void 0===c?I:c,target:void 0===d?B:d,x:void 0===l?z:l,y:void 0===u?V:u});return r?n.createElement(n.Fragment,null,r({path:h})):n.createElement("path",e_({ref:i,className:o()("visx-link visx-link-horizontal-line",t),d:h(a)||""},f))}var eP=["className","innerRef","data","path","x","y","source","target","children"];function eT(){return(eT=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[r]=e[r]);return i}(e,eP),h=a||eN({source:void 0===u?I:u,target:void 0===c?B:c,x:void 0===s?V:s,y:void 0===l?z:l});return d?n.createElement(n.Fragment,null,d({path:h})):n.createElement("path",eT({ref:r,className:o()("visx-link visx-link-vertical-line",t),d:h(i)||""},f))}var eD=["className","innerRef","data","path","x","y","source","target","children"];function eL(){return(eL=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[r]=e[r]);return i}(e,eD),h=a||eF({source:void 0===u?I:u,target:void 0===c?B:c,x:void 0===s?V:s,y:void 0===l?z:l});return d?n.createElement(n.Fragment,null,d({path:h})):n.createElement("path",eL({ref:r,className:o()("visx-link visx-link-radial-line",t),d:h(i)||""},f))}var eV=["className","innerRef","data","path","percent","x","y","source","target","children"];function ez(){return(ez=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[r]=e[r]);return i}(e,eV),p=a||eI({source:void 0===c?I:c,target:void 0===d?B:d,x:void 0===l?z:l,y:void 0===u?V:u,percent:void 0===s?.5:s});return f?n.createElement(n.Fragment,null,f({path:p})):n.createElement("path",ez({ref:r,className:o()("visx-link visx-link-horizontal-step",t),d:p(i)||""},h))}var eH=["className","innerRef","data","path","percent","x","y","source","target","children"];function eU(){return(eU=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[r]=e[r]);return i}(e,eH),p=a||eW({source:void 0===c?I:c,target:void 0===d?B:d,x:void 0===l?V:l,y:void 0===u?z:u,percent:void 0===s?.5:s});return f?n.createElement(n.Fragment,null,f({path:p})):n.createElement("path",eU({ref:r,className:o()("visx-link visx-link-vertical-step",t),d:p(i)||""},h))}var eq=["className","innerRef","data","path","x","y","source","target","children"];function eY(){return(eY=Object.assign?Object.assign.bind():function(e){for(var t=1;tMath.PI?f<=d:f>d)?1:0)+","+l*h+","+l*p+"\n L"+c*h+","+c*p+"\n "}}function eK(e){var t=e.className,r=e.innerRef,i=e.data,a=e.path,s=e.x,l=e.y,u=e.source,c=e.target,d=e.children,f=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n=0||(i[r]=e[r]);return i}(e,eq),h=a||eG({source:void 0===u?I:u,target:void 0===c?B:c,x:void 0===s?V:s,y:void 0===l?z:l});return d?n.createElement(n.Fragment,null,d({path:h})):n.createElement("path",eY({ref:r,className:o()("visx-link visx-link-radial-step",t),d:h(i)||""},f))}var eX=["sides","size","center","rotate","className","children","innerRef","points"];function eJ(){return(eJ=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[r]=e[r]);return i}(e,eX),f=c||e1({sides:void 0===t?4:t,size:void 0===r?25:r,center:void 0===i?eQ:i,rotate:void 0===a?0:a}).map(function(e){return[e.x,e.y]});return l?n.createElement(n.Fragment,null,l({points:f})):n.createElement("polygon",eJ({ref:u,className:o()("visx-polygon",s),points:f.join(" ")},d))}var e4=["className","innerRef"];function e3(){return(e3=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[r]=e[r]);return i}(e,e4);return n.createElement("circle",e3({ref:r,className:o()("visx-circle",t)},i))}var e6=r(13980),e8=r.n(e6),e7="http://www.w3.org/2000/svg",e9=function(){return!0};function te(){return(te=Object.assign?Object.assign.bind():function(e){for(var t=1;tf[i]?d.map(function(e){return void 0===e?e9:function(t){return t>=e}}):d.map(function(e){return void 0===e?e9:function(t){return t<=e}}),p=0,m=0;m<=l;m+=a){for(var v=s.getPointAtLength(m),g=v[i];p=w[k+1];)k+=1;c[k].push(S)}}return c}catch(e){return[]}}({path:p,segmentation:s,pointsInSegments:h,sampleRate:l})},[p,s,h,l]);return n.createElement("g",null,v.map(function(e,i){return t?n.createElement(n.Fragment,{key:i},t({index:i,segment:e,styles:f[i]||f[i%f.length]})):n.createElement(m.Z,te({key:i,className:r,data:e,x:tt,y:tr},f[i]||f[i%f.length]))}))}tn.propTypes={segments:e8().arrayOf(e8().array).isRequired,styles:e8().array.isRequired,children:e8().func,className:e8().string}},55746:function(e,t,r){"use strict";r.d(t,{Z:function(){return c}});var n=r(2784),i=r(72779),o=r.n(i),a=r(26078),s=r(52511),l=["x","x0","x1","y","y1","y0","yScale","data","defined","className","curve","innerRef","children"];function u(){return(u=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[r]=e[r]);return i}(e,l),w=(0,s.SO)({x:t,x0:r,x1:i,defined:void 0===m?function(){return!0}:m,curve:g});return(null==f?w.y0(h.range()[0]):(0,a.Z)(w.y0,f),c&&!d&&(0,a.Z)(w.y1,c),d&&!c&&(0,a.Z)(w.y1,d),x)?n.createElement(n.Fragment,null,x({path:w})):n.createElement("path",u({ref:y,className:o()("visx-area-closed",v),d:w(void 0===p?[]:p)||""},b))}},14582:function(e,t,r){"use strict";r.d(t,{Z:function(){return l}});var n=r(2784),i=r(72779),o=r.n(i),a=["className","innerRef"];function s(){return(s=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[r]=e[r]);return i}(e,a);return n.createElement("rect",s({ref:r,className:o()("visx-bar",t)},i))}},10897:function(e,t,r){"use strict";r.d(t,{Z:function(){return l}});var n=r(2784),i=r(72779),o=r.n(i),a=["children","className","innerRef","x","y","width","height","radius","all","top","bottom","left","right","topLeft","topRight","bottomLeft","bottomRight"];function s(){return(s=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[r]=e[r]);return i}(e,a),V=(r=(t={x:k,y:C,width:S,height:O,radius:_,all:void 0!==M&&M,top:void 0!==A&&A,bottom:void 0!==P&&P,left:void 0!==T&&T,right:void 0!==N&&N,topLeft:void 0!==R&&R,topRight:void 0!==D&&D,bottomLeft:void 0!==L&&L,bottomRight:void 0!==F&&F}).all,i=t.bottom,l=t.bottomLeft,u=t.bottomRight,c=t.height,d=t.left,f=t.radius,h=t.right,p=t.top,m=t.topLeft,v=t.topRight,g=t.width,y=t.x,x=t.y,v=r||p||h||v,u=r||i||h||u,l=r||i||d||l,m=r||p||d||m,b=2*(f=Math.max(1,Math.min(f,Math.min(g,c)/2))),("M"+(y+f)+","+x+" h"+(g-b)+"\n "+(v?"a"+f+","+f+" 0 0 1 "+f+","+f:"h"+f+"v"+f)+"\n v"+(c-b)+"\n "+(u?"a"+f+","+f+" 0 0 1 "+-f+","+f:"v"+f+"h"+-f)+"\n h"+(b-g)+"\n "+(l?"a"+f+","+f+" 0 0 1 "+-f+","+-f:"h"+-f+"v"+-f)+"\n v"+(b-c)+"\n "+(m?"a"+f+","+f+" 0 0 1 "+f+","+-f:"v"+-f+"h"+f)+"\nz").split("\n").join(""));return w?n.createElement(n.Fragment,null,w({path:V})):n.createElement("path",s({ref:E,className:o()("visx-bar-rounded",j),d:V},Z))}},63739:function(e,t,r){"use strict";r.d(t,{Z:function(){return l}});var n=r(2784),i=r(72779),o=r.n(i),a=["from","to","fill","className","innerRef"];function s(){return(s=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[r]=e[r]);return i}(e,a),h=r.x===l.x||r.y===l.y;return n.createElement("line",s({ref:d,className:o()("visx-line",c),x1:r.x,y1:r.y,x2:l.x,y2:l.y,fill:void 0===u?"transparent":u,shapeRendering:h?"crispEdges":"auto"},f))}},27079:function(e,t,r){"use strict";r.d(t,{Z:function(){return u}});var n=r(2784),i=r(72779),o=r.n(i),a=r(52511),s=["children","data","x","y","fill","className","curve","innerRef","defined"];function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[r]=e[r]);return i}(e,s),v=(0,a.jv)({x:i,y:u,defined:void 0===p?function(){return!0}:p,curve:f});return t?n.createElement(n.Fragment,null,t({path:v})):n.createElement("path",l({ref:h,className:o()("visx-linepath",d),d:v(void 0===r?[]:r)||"",fill:void 0===c?"transparent":c,strokeLinecap:"round"},m))}},52511:function(e,t,r){"use strict";r.d(t,{Nb:function(){return f},SO:function(){return h},aJ:function(){return v},jv:function(){return p},kn:function(){return g},ve:function(){return m}});var n=r(38764),i=r(79493),o=r(79767),a=r(69619),s=r(8329),l=r(98926),u=r(26078),c=r(44081),d=r(30382);function f(e){var t=void 0===e?{}:e,r=t.innerRadius,i=t.outerRadius,o=t.cornerRadius,a=t.startAngle,s=t.endAngle,l=t.padAngle,c=t.padRadius,d=(0,n.Z)();return null!=r&&(0,u.Z)(d.innerRadius,r),null!=i&&(0,u.Z)(d.outerRadius,i),null!=o&&(0,u.Z)(d.cornerRadius,o),null!=a&&(0,u.Z)(d.startAngle,a),null!=s&&(0,u.Z)(d.endAngle,s),null!=l&&(0,u.Z)(d.padAngle,l),null!=c&&(0,u.Z)(d.padRadius,c),d}function h(e){var t=void 0===e?{}:e,r=t.x,n=t.x0,o=t.x1,a=t.y,s=t.y0,l=t.y1,c=t.defined,d=t.curve,f=(0,i.Z)();return r&&(0,u.Z)(f.x,r),n&&(0,u.Z)(f.x0,n),o&&(0,u.Z)(f.x1,o),a&&(0,u.Z)(f.y,a),s&&(0,u.Z)(f.y0,s),l&&(0,u.Z)(f.y1,l),c&&f.defined(c),d&&f.curve(d),f}function p(e){var t=void 0===e?{}:e,r=t.x,n=t.y,i=t.defined,a=t.curve,s=(0,o.Z)();return r&&(0,u.Z)(s.x,r),n&&(0,u.Z)(s.y,n),i&&s.defined(i),a&&s.curve(a),s}function m(e){var t=void 0===e?{}:e,r=t.startAngle,n=t.endAngle,i=t.padAngle,o=t.value,s=t.sort,l=t.sortValues,c=(0,a.Z)();return null===s?c.sort(s):null!=s&&c.sort(s),null===l?c.sortValues(l):null!=l&&c.sortValues(l),null!=o&&c.value(o),null!=i&&(0,u.Z)(c.padAngle,i),null!=r&&(0,u.Z)(c.startAngle,r),null!=n&&(0,u.Z)(c.endAngle,n),c}function v(e){var t=void 0===e?{}:e,r=t.angle,n=t.radius,i=t.defined,o=t.curve,a=(0,s.Z)();return r&&(0,u.Z)(a.angle,r),n&&(0,u.Z)(a.radius,n),i&&a.defined(i),o&&a.curve(o),a}function g(e){var t=e.keys,r=e.value,n=e.order,i=e.offset,o=(0,l.Z)();return t&&o.keys(t),r&&(0,u.Z)(o.value,r),n&&o.order((0,c.ZP)(n)),i&&o.offset((0,d.ZP)(i)),o}},26078:function(e,t,r){"use strict";function n(e,t){e(t)}r.d(t,{Z:function(){return n}})},30382:function(e,t,r){"use strict";r.d(t,{ZP:function(){return c},ed:function(){return u},nW:function(){return l}});var n=r(22254),i=r(76751),o=r(90541),a=r(36538),s=r(34928),l={expand:n.Z,diverging:i.Z,none:o.Z,silhouette:a.Z,wiggle:s.Z},u=Object.keys(l);function c(e){return e&&l[e]||l.none}},44081:function(e,t,r){"use strict";r.d(t,{ZP:function(){return c},s2:function(){return u},un:function(){return l}});var n=r(19721),i=r(82564),o=r(12197),a=r(81182),s=r(40277),l={ascending:n.Z,descending:i.Z,insideout:o.Z,none:a.Z,reverse:s.Z},u=Object.keys(l);function c(e){return e&&l[e]||l.none}},12935:function(e,t,r){"use strict";t.Z=function(e){var t=e.children,r=e.x,s=e.x0,u=e.x1,c=e.y,d=e.y0,f=e.y1,h=e.data,p=e.defined,m=e.className,v=e.curve,g=e.innerRef,y=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n=0||(i[r]=e[r]);return i}(e,a),x=(0,o.area)({x:r,x0:s,x1:u,y:c,y0:d,y1:f,defined:void 0===p?function(){return!0}:p,curve:v});return t?n.default.createElement(n.default.Fragment,null,t({path:x})):n.default.createElement("path",l({ref:g,className:(0,i.default)("visx-area",m),d:x(void 0===h?[]:h)||""},y))};var n=s(r(2784)),i=s(r(72779)),o=r(15601),a=["children","x","x0","x1","y","y0","y1","data","defined","className","curve","innerRef"];function s(e){return e&&e.__esModule?e:{default:e}}function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[r]=e[r]);return i}(e,o),h=r.x===l.x||r.y===l.y;return n.default.createElement("line",s({ref:d,className:(0,i.default)("visx-line",c),x1:r.x,y1:r.y,x2:l.x,y2:l.y,fill:void 0===u?"transparent":u,shapeRendering:h?"crispEdges":"auto"},f))};var n=a(r(2784)),i=a(r(72779)),o=["from","to","fill","className","innerRef"];function a(e){return e&&e.__esModule?e:{default:e}}function s(){return(s=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[r]=e[r]);return i}(e,a),v=(0,o.line)({x:s,y:u,defined:void 0===p?function(){return!0}:p,curve:f});return t?n.default.createElement(n.default.Fragment,null,t({path:v})):n.default.createElement("path",l({ref:h,className:(0,i.default)("visx-linepath",d),d:v(void 0===r?[]:r)||"",fill:void 0===c?"transparent":c,strokeLinecap:"round"},m))};var n=s(r(2784)),i=s(r(72779)),o=r(15601),a=["children","data","x","y","fill","className","curve","innerRef","defined"];function s(e){return e&&e.__esModule?e:{default:e}}function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t