import{c as e,bn as t}from"./index-nE6cslhy.js";import{r as a,j as s}from"./vendor-react-Co0R0q1H.js";import{A as n}from"./index-CjfJc1Om.js";import{c as o,p as l}from"./vendor-core-B_fdKJ1g.js";const r=e("house",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]]),i=e("zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);function d({value:e,format:o,prefix:l,className:r,style:i}){const[d,g]=a.useState("waiting");if(a.useEffect(()=>{const e=setTimeout(()=>g("mounted"),400);return()=>clearTimeout(e)},[]),a.useEffect(()=>{if("mounted"===d){const e=requestAnimationFrame(()=>g("animating"));return()=>cancelAnimationFrame(e)}},[d]),"waiting"===d){const e=(0).toLocaleString(void 0,o);return s.jsxs("span",{className:r,style:i,children:[l,e]})}return s.jsx(n,{className:r,style:i,format:o,prefix:l,transition:t.numberReveal,children:"animating"===d?e:0})}const g=["repeater","companion","room_server","hubs","direct"],m={showTopology:!1,showNeighborLines:!0,show3DTerrain:!1,showMinCut:!1,showLinkQuality:!1,nodeFilters:[...g]},c=o()(l(e=>({viewState:null,setViewState:t=>e({viewState:t,lastSavedAt:Date.now()}),toggles:m,setToggle:(t,a)=>e(e=>({toggles:{...e.toggles,[t]:a},lastSavedAt:Date.now()})),setToggles:t=>e(e=>({toggles:{...e.toggles,...t},lastSavedAt:Date.now()})),hasAnalyzed:!1,setHasAnalyzed:t=>e({hasAnalyzed:t,lastSavedAt:Date.now()}),modalMapOpen:!1,setModalMapOpen:t=>e({modalMapOpen:t}),lastSavedAt:null,reset:()=>e({viewState:null,toggles:m,hasAnalyzed:!1,lastSavedAt:null})}),{name:"pymc-map-view",version:2,migrate:(e,t)=>{const a=e,s=a.toggles??{};if(0===t){const e=s.nodeFilter;let t=[...g];return"hubs"===e?t=["hubs"]:"direct"===e&&(t=["direct"]),{...a,toggles:{...s,nodeFilters:t,nodeFilter:void 0}}}if(1===t){const e=s.nodeFilters,t=e&&e.length>0?e:[...g];return{...a,toggles:{...s,nodeFilters:t}}}return e},partialize:e=>({viewState:e.viewState,toggles:e.toggles,hasAnalyzed:e.hasAnalyzed,lastSavedAt:e.lastSavedAt})}));export{g as A,d as D,r as H,i as Z,c as u};
