mirror of
https://github.com/pyMC-dev/pyMC_Repeater.git
synced 2026-07-06 01:42:41 +02:00
1 line
121 KiB
JavaScript
1 line
121 KiB
JavaScript
import{A as e,C as t,D as n,E as r,H as i,N as a,P as o,T as s,U as c,X as l,Y as u,_t as d,c as f,f as p,gt as m,h,ht as g,i as _,j as v,k as y,l as b,m as x,o as S,p as C,r as w,s as T,u as E,v as D,w as O,x as k,y as A}from"./runtime-core.esm-bundler-CINEgm0a.js";import{a as j,l as M,n as N,o as P,t as F}from"./runtime-dom.esm-bundler-B3VeUO8l.js";import{_ as I,a as L,g as R,h as z,i as B,l as ee,r as V,s as H,t as U,u as te,y as W}from"./api-DSaJA91r.js";import{t as ne}from"./packets-DVGync2A.js";import{t as re}from"./system-BwYDm56e.js";import{n as ie,r as G,t as K}from"./dataService-5Ok9aIVh.js";import{t as q}from"./createLucideIcon-D-_sbJKW.js";import{t as ae}from"./useTheme-vbCn9P26.js";import{t as J}from"./Spinner-CMJUE3iy.js";import{n as oe,r as se,t as ce}from"./constants-C3rXUIAq.js";import{t as le}from"./websocket-Do9cZLld.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var ue=`/assets/meshcore-DQNtEl5I.svg`,de=Symbol(`navActionHandlers`),Y=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n},X={},Z={width:`23`,height:`25`,viewBox:`0 0 23 25`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`};function fe(e,t){return s(),E(`svg`,Z,[...t[0]||=[T(`path`,{d:`M2.84279 2.25795C2.90709 1.12053 3.17879 0.625914 3.95795 0.228723C4.79631 -0.198778 6.11858 0.000168182 7.67449 0.788054C8.34465 1.12757 8.41289 1.13448 9.58736 0.983905C11.1485 0.783681 13.1582 0.784388 14.5991 0.985738C15.6887 1.13801 15.7603 1.1304 16.4321 0.790174C18.6406 -0.328212 20.3842 -0.255036 21.0156 0.982491C21.3308 1.6002 21.3893 3.20304 21.1449 4.52503C21.0094 5.25793 21.0238 5.34943 21.3502 5.83037C23.6466 9.21443 21.9919 14.6998 18.0569 16.7469C17.7558 16.9036 17.502 17.0005 17.2952 17.0795C16.6602 17.3219 16.4674 17.3956 16.7008 18.5117C16.8132 19.0486 16.9486 20.3833 17.0018 21.478C17.098 23.4567 17.0966 23.4705 16.7495 23.8742C16.2772 24.4233 15.5963 24.4326 15.135 23.8962C14.8341 23.5464 14.8047 23.3812 14.8047 22.0315C14.8047 20.037 14.5861 18.7113 14.0695 17.5753C13.4553 16.2235 13.9106 15.7194 15.3154 15.4173C17.268 14.9973 18.793 13.7923 19.643 11.9978C20.4511 10.2921 20.5729 7.93485 19.1119 6.50124C18.6964 6.00746 18.6674 5.56022 18.9641 4.21159C19.075 3.70754 19.168 3.05725 19.1707 2.76637C19.1749 2.30701 19.1331 2.23764 18.8509 2.23764C18.6724 2.23764 17.9902 2.49736 17.3352 2.81474L16.2897 3.32145C16.1947 3.36751 16.0883 3.38522 15.9834 3.37318C13.3251 3.06805 10.7991 3.06334 8.12774 3.37438C8.02244 3.38663 7.91563 3.36892 7.82025 3.32263L6.77535 2.81559C6.12027 2.49764 5.43813 2.23764 5.25963 2.23764C4.84693 2.23764 4.84072 2.54233 5.2169 4.35258C5.44669 5.45816 5.60133 5.70451 4.93703 6.58851C3.94131 7.91359 3.69258 9.55902 4.22654 11.2878C4.89952 13.4664 6.54749 14.9382 8.86436 15.4292C10.261 15.7253 10.6261 16.1115 10.0928 17.713C9.67293 18.9734 9.40748 19.2982 8.79738 19.2982C7.97649 19.2982 7.46228 18.5871 7.74527 17.843C7.86991 17.5151 7.83283 17.4801 7.06383 17.1996C4.71637 16.3437 2.9209 14.4254 2.10002 11.8959C1.46553 9.94098 1.74471 7.39642 2.76257 5.85843C3.10914 5.33477 3.1145 5.29036 2.95277 4.28787C2.86126 3.72037 2.81177 2.80699 2.84279 2.25795Z`,fill:`currentColor`},null,-1),T(`path`,{d:`M2.02306 16.5589C1.68479 16.0516 0.999227 15.9144 0.491814 16.2527C-0.0155884 16.591 -0.152708 17.2765 0.185564 17.7839C0.435301 18.1586 0.734065 18.4663 0.987777 18.72C1.03455 18.7668 1.08 18.8119 1.12438 18.856C1.3369 19.0671 1.52455 19.2535 1.71302 19.4748C2.12986 19.964 2.54572 20.623 2.78206 21.8047C2.88733 22.3311 3.26569 22.6147 3.47533 22.7386C3.70269 22.8728 3.9511 22.952 4.15552 23.0036C4.57369 23.109 5.08133 23.1638 5.56309 23.1957C6.09196 23.2308 6.665 23.2422 7.17743 23.2453C7.1778 23.8547 7.67202 24.3487 8.28162 24.3487C8.89146 24.3487 9.38582 23.8543 9.38582 23.2445V22.1403C9.38582 21.5305 8.89146 21.0361 8.28162 21.0361C8.17753 21.0361 8.06491 21.0364 7.94562 21.0369C7.29761 21.0389 6.45295 21.0414 5.70905 20.9922C5.35033 20.9684 5.05544 20.9347 4.8392 20.8936C4.50619 19.5863 3.96821 18.7165 3.39415 18.0426C3.14038 17.7448 2.87761 17.4842 2.66387 17.2722C2.62385 17.2326 2.58556 17.1946 2.54935 17.1584C2.30273 16.9118 2.1414 16.7365 2.02306 16.5589Z`,fill:`currentColor`},null,-1)]])}var pe=Y(X,[[`render`,fe]]),me={},he={viewBox:`0 0 24 24`,fill:`currentColor`,xmlns:`http://www.w3.org/2000/svg`};function ge(e,t){return s(),E(`svg`,he,[...t[0]||=[T(`path`,{d:`M20.317 4.369a19.791 19.791 0 0 0-4.885-1.515.074.074 0 0 0-.078.037c-.211.375-.444.864-.608 1.249a18.27 18.27 0 0 0-5.487 0 12.64 12.64 0 0 0-.617-1.249.077.077 0 0 0-.078-.037 19.736 19.736 0 0 0-4.885 1.515.07.07 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 0 0 .031.056 19.9 19.9 0 0 0 5.993 3.03.078.078 0 0 0 .084-.027 14.16 14.16 0 0 0 1.226-1.994.076.076 0 0 0-.041-.106 13.107 13.107 0 0 1-1.872-.892.077.077 0 0 1-.008-.128 10.2 10.2 0 0 0 .372-.292.074.074 0 0 1 .077-.01c3.927 1.793 8.18 1.793 12.061 0a.074.074 0 0 1 .078.009c.12.098.246.196.373.293a.077.077 0 0 1-.006.127 12.299 12.299 0 0 1-1.873.892.077.077 0 0 0-.04.107c.36.698.769 1.361 1.225 1.994a.076.076 0 0 0 .084.028 19.876 19.876 0 0 0 6.002-3.03.077.077 0 0 0 .031-.055c.5-5.177-.838-9.674-3.548-13.66a.061.061 0 0 0-.031-.028ZM8.02 15.331c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.211 0 2.166 1.095 2.157 2.419 0 1.334-.955 2.419-2.157 2.419Zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.211 0 2.166 1.095 2.157 2.419 0 1.334-.946 2.419-2.157 2.419Z`},null,-1)]])}var _e=Y(me,[[`render`,ge]]),ve={},ye={width:`17`,height:`24`,viewBox:`0 0 17 24`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`};function be(e,t){return s(),E(`svg`,ye,[...t[0]||=[p(`<path d="M14.8437 5.58302L14.8272 5.57333L14.7891 5.56171C14.8044 5.57465 14.8236 5.58214 14.8437 5.58302Z" fill="currentColor"></path><path d="M14.8529 5.57989C14.8504 5.57957 14.8479 5.57897 14.8455 5.57812C14.8453 5.57976 14.8453 5.58142 14.8455 5.58307C14.8481 5.58271 14.8507 5.58162 14.8529 5.57989Z" fill="currentColor"></path><path d="M15.0703 7.29725L15.0981 7.28141L15.1084 7.27564L15.1178 7.26562C15.1002 7.27319 15.0841 7.28393 15.0703 7.29725Z" fill="currentColor"></path><path d="M14.8955 5.61866L14.8684 5.59283L14.85 5.58282C14.8599 5.60027 14.8762 5.61314 14.8955 5.61866Z" fill="currentColor"></path><path d="M8.07083 22.2586C8.04917 22.268 8.03015 22.2826 8.01562 22.3012L8.03273 22.2902C8.04437 22.2795 8.06081 22.2669 8.07083 22.2586Z" fill="currentColor"></path><path d="M12.0329 21.4816C12.0329 21.4571 12.021 21.4616 12.0239 21.5488C12.0239 21.5417 12.0268 21.5346 12.0281 21.5278C12.0297 21.5123 12.031 21.4971 12.0329 21.4816Z" fill="currentColor"></path><path d="M11.624 22.2586C11.6023 22.268 11.5833 22.2826 11.5687 22.3012L11.5859 22.2902C11.5975 22.2795 11.614 22.2669 11.624 22.2586Z" fill="currentColor"></path><path d="M5.28005 22.4428C5.2636 22.4284 5.24346 22.4191 5.22192 22.4156C5.23937 22.424 5.2568 22.4324 5.26842 22.4389L5.28005 22.4428Z" fill="currentColor"></path><path d="M4.64951 21.8411C4.64694 21.8157 4.63913 21.7911 4.62659 21.7687C4.63547 21.792 4.64291 21.8157 4.64886 21.8398L4.64951 21.8411Z" fill="currentColor"></path><path d="M8.86811 11.0897C8.00609 11.4588 7.02779 11.8772 5.75984 11.8772C5.22942 11.8761 4.70159 11.8034 4.19067 11.6609L5.06759 20.6642C5.09864 21.0405 5.27006 21.3914 5.54784 21.6472C5.82562 21.9029 6.18941 22.0449 6.56705 22.0448C6.56705 22.0448 7.81043 22.1094 8.22527 22.1094C8.67185 22.1094 10.0108 22.0448 10.0108 22.0448C10.3883 22.0448 10.752 21.9028 11.0297 21.6471C11.3075 21.3913 11.4788 21.0405 11.5099 20.6642L12.4491 10.7152C12.0294 10.5718 11.6058 10.4766 11.1282 10.4766C10.3023 10.4763 9.63689 10.7607 8.86811 11.0897Z" fill="currentColor"></path><path d="M1.47656 7.24689L1.49141 7.26081L1.5011 7.26663C1.49364 7.25919 1.48541 7.25259 1.47656 7.24689Z" fill="currentColor"></path><path d="M16.5048 6.41466L16.3727 5.74859C16.2542 5.15095 15.9853 4.58625 15.3718 4.37024C15.1752 4.30115 14.9521 4.27145 14.8013 4.12841C14.6505 3.98538 14.606 3.76324 14.5711 3.55725C14.5065 3.17917 14.4458 2.80076 14.3796 2.42332C14.3225 2.09884 14.2773 1.73431 14.1284 1.43662C13.9347 1.0369 13.5328 0.803142 13.133 0.648486C12.9282 0.572029 12.7192 0.507349 12.5069 0.454765C11.5083 0.1913 10.4584 0.0944382 9.43098 0.0392269C8.1978 -0.0288182 6.96138 -0.00831713 5.73115 0.100573C4.81548 0.183874 3.85106 0.284611 2.98091 0.60135C2.66288 0.717258 2.33517 0.856416 2.09334 1.10212C1.79662 1.40401 1.69976 1.87088 1.91641 2.24735C2.07041 2.5147 2.33129 2.70358 2.608 2.82853C2.96842 2.98952 3.34482 3.11204 3.73095 3.19402C4.80612 3.43165 5.91971 3.52496 7.01814 3.56468C8.23554 3.61381 9.45498 3.57399 10.6666 3.44554C10.9662 3.4126 11.2653 3.3731 11.5639 3.32704C11.9155 3.27312 12.1411 2.81335 12.0375 2.49306C11.9135 2.11013 11.5803 1.96161 11.2035 2.01941C11.148 2.02813 11.0928 2.0362 11.0372 2.04427L10.9972 2.05008C10.8695 2.06623 10.7419 2.08129 10.6143 2.09528C10.3506 2.12369 10.0863 2.14694 9.82128 2.16502C9.22788 2.20635 8.6328 2.2254 8.03808 2.22637C7.45368 2.22637 6.86898 2.2099 6.28584 2.17148C6.0198 2.15404 5.7544 2.13187 5.48964 2.10497C5.36921 2.09237 5.2491 2.07914 5.12899 2.06429L5.01469 2.04976L4.98983 2.0462L4.87134 2.02909C4.62919 1.99261 4.38703 1.95064 4.14746 1.89994C4.12328 1.89458 4.10166 1.88113 4.08616 1.86182C4.07066 1.8425 4.06222 1.81848 4.06222 1.79372C4.06222 1.76896 4.07066 1.74493 4.08616 1.72562C4.10166 1.7063 4.12328 1.69286 4.14746 1.68749H4.15198C4.35959 1.64326 4.56881 1.60549 4.77868 1.57255C4.84863 1.56157 4.9188 1.55081 4.98919 1.54027H4.99112C5.12254 1.53155 5.25459 1.50797 5.38535 1.49248C6.52302 1.37414 7.66752 1.33379 8.8107 1.37173C9.36576 1.38787 9.9204 1.42048 10.4729 1.47666C10.5917 1.48892 10.7099 1.50184 10.828 1.51637C10.8732 1.52186 10.9187 1.52831 10.9643 1.5338L11.056 1.54705C11.3233 1.58686 11.5892 1.63519 11.8538 1.69201C12.2458 1.77725 12.7491 1.80502 12.9235 2.23444C12.979 2.37069 13.0042 2.52212 13.0349 2.66515L13.0739 2.84758C13.075 2.85085 13.0757 2.85419 13.0762 2.85758C13.1686 3.28808 13.261 3.71858 13.3535 4.14908C13.3603 4.18088 13.3605 4.21374 13.354 4.24561C13.3475 4.27747 13.3346 4.30766 13.3159 4.33429C13.2973 4.36092 13.2733 4.38342 13.2455 4.40038C13.2178 4.41734 13.1869 4.42841 13.1546 4.43288H13.1521L13.0955 4.44063L13.0397 4.44806C12.8628 4.47109 12.6856 4.49261 12.5083 4.51263C12.1589 4.55245 11.809 4.58689 11.4586 4.61595C10.7623 4.67386 10.0645 4.71185 9.3654 4.72993C9.00918 4.7394 8.65302 4.74381 8.29704 4.74316C6.87996 4.74205 5.46407 4.65968 4.05641 4.49649C3.90401 4.47841 3.75161 4.45904 3.59922 4.43934C3.71739 4.45451 3.51334 4.42772 3.47201 4.4219C3.37514 4.40834 3.27829 4.39424 3.18142 4.37961C2.85629 4.33085 2.53309 4.2708 2.20861 4.21817C1.81631 4.1536 1.44113 4.18589 1.0863 4.37961C0.79503 4.53899 0.559289 4.78341 0.410525 5.08024C0.257483 5.39666 0.211958 5.74117 0.143509 6.08118C0.0750606 6.42114 -0.0314881 6.78696 0.008871 7.13598C0.095724 7.88922 0.622332 8.5014 1.37979 8.63832C2.09237 8.76744 2.80883 8.87208 3.52722 8.96118C6.3492 9.30678 9.20022 9.34812 12.031 9.08454C12.2616 9.063 12.4918 9.03954 12.7217 9.0141C12.7935 9.00624 12.8662 9.01452 12.9343 9.03834C13.0025 9.06216 13.0645 9.10092 13.1158 9.15186C13.1671 9.20274 13.2063 9.26442 13.2306 9.33246C13.2549 9.4005 13.2637 9.4731 13.2563 9.54492L13.1847 10.2417C13.0402 11.6497 12.8958 13.0574 12.7514 14.4652C12.6007 15.9435 12.449 17.4217 12.2965 18.8999C12.2534 19.3162 12.2104 19.7323 12.1673 20.1484C12.126 20.5582 12.1202 20.9808 12.0424 21.3857C11.9197 22.0223 11.4886 22.4134 10.8596 22.5564C10.2835 22.6875 9.6948 22.7564 9.10386 22.7617C8.44878 22.7653 7.794 22.7362 7.13886 22.7398C6.43956 22.7437 5.58295 22.6791 5.04311 22.1586C4.56881 21.7014 4.50326 20.9856 4.43869 20.3666C4.35259 19.5472 4.26724 18.7279 4.18265 17.9086L3.70803 13.3532L3.40097 10.4057C3.39581 10.357 3.39064 10.3088 3.3858 10.2598C3.349 9.90816 3.10006 9.564 2.70777 9.58176C2.37198 9.59658 1.99034 9.882 2.02973 10.2598L2.25736 12.445L2.72811 16.9652C2.86221 18.2492 2.99599 19.5334 3.12944 20.8177C3.15527 21.0638 3.17948 21.3104 3.2066 21.5564C3.35416 22.9009 4.38089 23.6254 5.65237 23.8295C6.39498 23.9489 7.15566 23.9735 7.90926 23.9857C8.87526 24.0013 9.85098 24.0384 10.8012 23.8634C12.2093 23.6051 13.2657 22.6649 13.4165 21.2065C13.4596 20.7854 13.5026 20.3643 13.5457 19.943C13.6888 18.55 13.8317 17.1568 13.9744 15.7634L14.4413 11.2109L14.6554 9.12456C14.666 9.02112 14.7097 8.9238 14.78 8.84712C14.8502 8.77044 14.9433 8.71836 15.0454 8.69868C15.448 8.6202 15.8329 8.48622 16.1192 8.1798C16.5752 7.69194 16.6659 7.05588 16.5048 6.41466ZM1.35913 6.86478C1.36526 6.86184 1.35396 6.91446 1.34912 6.939C1.34815 6.90192 1.35008 6.86898 1.35913 6.86478ZM1.39819 7.167C1.40143 7.16472 1.41111 7.17762 1.42112 7.1931C1.40594 7.17894 1.39658 7.16826 1.39819 7.167ZM1.43662 7.21764C1.4505 7.24122 1.45793 7.2561 1.43662 7.21764V7.21764ZM1.51378 7.28028H1.51572C1.51572 7.28256 1.51927 7.28484 1.52056 7.28706C1.51842 7.2846 1.51637 7.28232 1.51378 7.28028ZM15.0266 7.18668C14.882 7.3242 14.6641 7.38816 14.4487 7.42008C12.0337 7.77852 9.58332 7.95996 7.1418 7.87986C5.39439 7.82016 3.66541 7.62612 1.93546 7.38168C1.76594 7.3578 1.58223 7.32678 1.46567 7.20186C1.24612 6.96612 1.35396 6.49152 1.41111 6.20676C1.46341 5.94587 1.5635 5.59813 1.87379 5.561C2.3581 5.50418 2.92054 5.70856 3.39968 5.7812C3.97655 5.86924 4.55557 5.93973 5.13674 5.99268C7.61706 6.2187 10.139 6.18348 12.6083 5.85288C13.0584 5.79239 13.5069 5.72212 13.9538 5.64204C14.3519 5.57069 14.7932 5.4367 15.0338 5.849C15.1988 6.1299 15.2207 6.50574 15.1952 6.82314C15.1873 6.96138 15.1273 7.09146 15.0266 7.18668Z" fill="currentColor"></path>`,12)]])}var xe=Y(ve,[[`render`,be]]),Se={},Ce={width:`800px`,height:`800px`,viewBox:`0 -1.5 20 20`,version:`1.1`,xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,class:`w-full h-full`};function we(e,t){return s(),E(`svg`,Ce,[...t[0]||=[T(`g`,{id:`Page-1`,stroke:`none`,"stroke-width":`1`,fill:`none`,"fill-rule":`evenodd`},[T(`g`,{transform:`translate(-420.000000, -3641.000000)`,fill:`currentColor`},[T(`g`,{id:`icons`,transform:`translate(56.000000, 160.000000)`},[T(`path`,{d:`M378.195439,3483.828 L376.781439,3485.242 C378.195439,3486.656 378.294439,3489.588 376.880439,3491.002 L378.294439,3492.417 C380.415439,3490.295 380.316439,3485.949 378.195439,3483.828 M381.023439,3481 L379.609439,3482.414 C382.438439,3485.242 382.537439,3491.002 379.708439,3493.831 L381.122439,3495.245 C385.365439,3491.002 384.559439,3484.535 381.023439,3481 M375.432439,3486.737 C375.409439,3486.711 375.392439,3486.682 375.367439,3486.656 L375.363439,3486.66 C374.582439,3485.879 373.243439,3485.952 372.536439,3486.659 C371.829439,3487.366 371.831439,3488.778 372.538439,3489.485 C372.547439,3489.494 372.558439,3489.499 372.567439,3489.508 C372.590439,3489.534 372.607439,3489.563 372.632439,3489.588 L372.636439,3489.585 C373.201439,3490.15 373.000439,3488.284 373.000439,3498 L375.000439,3498 C375.000439,3488.058 374.753439,3490.296 375.463439,3489.586 C376.170439,3488.879 376.168439,3487.467 375.461439,3486.76 C375.452439,3486.751 375.441439,3486.746 375.432439,3486.737 M371.119439,3485.242 L369.705439,3483.828 C367.584439,3485.949 367.683439,3490.295 369.804439,3492.417 L371.218439,3491.002 C369.804439,3489.588 369.705439,3486.656 371.119439,3485.242 M368.390439,3493.831 L366.976439,3495.245 C363.440439,3491.709 362.634439,3485.242 366.877439,3481 L368.291439,3482.414 C365.462439,3485.242 365.561439,3491.002 368.390439,3493.831`,id:`radio_tower-[#1019]`})])])],-1)]])}var Te=Y(Se,[[`render`,we]]),Ee={class:`text-center`},De={class:`relative flex items-center justify-center mb-8`},Oe={class:`relative w-32 h-32`},ke={class:`absolute left-1/2 top-1/2 transform -translate-x-1/2 -translate-y-1/2`},Ae={key:0,class:`absolute inset-0 flex items-center justify-center`},Q={key:1,class:`absolute inset-0 flex items-center justify-center`},$={key:2,class:`absolute inset-0`},je={class:`mb-6`},Me={key:0,class:`text-content-primary dark:text-content-primary text-lg`},Ne={key:1,class:`text-accent-green text-lg font-medium`},Pe={key:2,class:`text-secondary text-lg`},Fe={key:3,class:`text-accent-red text-lg`},Ie={key:4,class:`text-content-secondary dark:text-content-muted`},Le={key:5,class:`mt-3`},Re={key:0,class:`text-secondary text-sm`},ze={key:1,class:`text-accent-red text-sm`},Be={key:0,class:`flex gap-3`},Ve={key:1,class:`text-content-muted text-sm`},He=Y(h({name:`AdvertModal`,__name:`AdvertModal`,props:{isOpen:{type:Boolean},isLoading:{type:Boolean},isSuccess:{type:Boolean},error:{default:null}},emits:[`close`,`send`],setup(e,{emit:t}){let n=e,r=t,i=c(!1),a=c(!1),o=c(!1);v(()=>n.isOpen,e=>{e?(i.value=!0,setTimeout(()=>{a.value=!0},50)):(a.value=!1,o.value=!1,setTimeout(()=>{i.value=!1},300))},{immediate:!0}),v(()=>n.isLoading,e=>{e||setTimeout(()=>{o.value=!1},1e3)});let l=()=>{n.isLoading||r(`close`)},u=()=>{n.isLoading||(o.value=!0,r(`send`))},p=e=>e?.includes(`Network error - no response received`)||e?.includes(`timeout`);return(t,n)=>(s(),f(_,{to:`body`},[i.value?(s(),E(`div`,{key:0,class:`fixed inset-0 z-[300] flex items-center justify-center p-4`,onClick:M(l,[`self`])},[T(`div`,{class:g([`absolute inset-0 bg-black/60 backdrop-blur-sm transition-opacity duration-300`,a.value?`opacity-100`:`opacity-0`])},null,2),T(`div`,{class:g([`relative bg-white dark:bg-surface-elevated backdrop-blur-xl rounded-[20px] p-8 max-w-md w-full transform transition-all duration-300 border border-stroke-subtle dark:border-white/10`,a.value?`scale-100 opacity-100`:`scale-95 opacity-0`])},[e.isLoading?b(``,!0):(s(),E(`button`,{key:0,onClick:l,class:`absolute top-4 right-4 text-content-secondary dark:text-content-muted hover:text-content-primary dark:hover:text-content-primary transition-colors p-2`},[...n[0]||=[T(`svg`,{class:`w-5 h-5`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`},[T(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M6 18L18 6M6 6l12 12`})],-1)]])),T(`div`,Ee,[n[6]||=T(`h2`,{class:`text-content-primary dark:text-content-primary text-xl font-semibold mb-6`},` Send Advertisement `,-1),T(`div`,De,[T(`div`,Oe,[T(`div`,ke,[x(Te,{class:g([`w-16 h-16 transition-all duration-500`,[e.isLoading?`animate-pulse`:``,e.isSuccess?`text-accent-green`:e.error&&!p(e.error)?`text-accent-red`:`text-primary`]]),style:m({filter:e.isLoading?`drop-shadow(0 0 8px currentColor)`:e.isSuccess?`drop-shadow(0 0 8px var(--color-accent-green))`:e.error&&!p(e.error)?`drop-shadow(0 0 8px var(--color-accent-red))`:`drop-shadow(0 0 4px var(--color-primary))`})},null,8,[`class`,`style`])]),e.isLoading||e.isSuccess?(s(),E(`div`,Ae,[T(`div`,{class:g([`absolute w-16 h-16 rounded-full border-2 animate-ping`,[e.isSuccess?`border-accent-green/60`:`border-primary/60`]]),style:{"animation-duration":`1.5s`}},null,2),T(`div`,{class:g([`absolute w-24 h-24 rounded-full border-2 animate-ping`,[e.isSuccess?`border-accent-green/40`:`border-primary/40`]]),style:{"animation-duration":`2s`,"animation-delay":`0.3s`}},null,2),T(`div`,{class:g([`absolute w-32 h-32 rounded-full border-2 animate-ping`,[e.isSuccess?`border-accent-green/20`:`border-primary/20`]]),style:{"animation-duration":`2.5s`,"animation-delay":`0.6s`}},null,2)])):b(``,!0),o.value?(s(),E(`div`,Q,[...n[1]||=[T(`div`,{class:`absolute w-8 h-8 rounded-full border-4 border-secondary animate-ping-fast`},null,-1),T(`div`,{class:`absolute w-16 h-16 rounded-full border-3 border-secondary/70 animate-ping-fast`,style:{"animation-delay":`0.1s`}},null,-1),T(`div`,{class:`absolute w-24 h-24 rounded-full border-2 border-secondary/50 animate-ping-fast`,style:{"animation-delay":`0.2s`}},null,-1),T(`div`,{class:`absolute w-32 h-32 rounded-full border-2 border-secondary/30 animate-ping-fast`,style:{"animation-delay":`0.3s`}},null,-1)]])):b(``,!0),e.isLoading||e.isSuccess?(s(),E(`div`,$,[T(`div`,{class:g([`absolute top-2 right-2 w-4 h-4 rounded-full transition-all duration-500 animate-pulse`,[e.isSuccess?`bg-accent-green shadow-lg shadow-accent-green/50`:`bg-primary/70 shadow-lg shadow-primary/30`]]),style:{"animation-delay":`0.5s`}},[...n[2]||=[T(`div`,{class:`w-2 h-2 bg-white rounded-full mx-auto mt-1`},null,-1)]],2),T(`div`,{class:g([`absolute bottom-2 left-2 w-4 h-4 rounded-full transition-all duration-500 animate-pulse`,[e.isSuccess?`bg-accent-green shadow-lg shadow-accent-green/50`:`bg-primary/70 shadow-lg shadow-primary/30`]]),style:{"animation-delay":`1s`}},[...n[3]||=[T(`div`,{class:`w-2 h-2 bg-white rounded-full mx-auto mt-1`},null,-1)]],2),T(`div`,{class:g([`absolute top-1/2 right-1 w-4 h-4 rounded-full transition-all duration-500 animate-pulse`,[e.isSuccess?`bg-accent-green shadow-lg shadow-accent-green/50`:`bg-primary/70 shadow-lg shadow-primary/30`]]),style:{"animation-delay":`1.5s`,transform:`translateY(-50%)`}},[...n[4]||=[T(`div`,{class:`w-2 h-2 bg-white rounded-full mx-auto mt-1`},null,-1)]],2),T(`div`,{class:g([`absolute top-3 left-3 w-4 h-4 rounded-full transition-all duration-500 animate-pulse`,[e.isSuccess?`bg-accent-green shadow-lg shadow-accent-green/50`:`bg-primary/70 shadow-lg shadow-primary/30`]]),style:{"animation-delay":`2s`}},[...n[5]||=[T(`div`,{class:`w-2 h-2 bg-white rounded-full mx-auto mt-1`},null,-1)]],2)])):b(``,!0)])]),T(`div`,je,[e.isLoading?(s(),E(`p`,Me,` Broadcasting advertisement... `)):e.isSuccess?(s(),E(`p`,Ne,` Advertisement sent successfully! `)):e.error&&p(e.error)?(s(),E(`p`,Pe,` Advertisement likely sent `)):e.error?(s(),E(`p`,Fe,`Failed to send advertisement`)):(s(),E(`p`,Ie,` This will broadcast your node's presence to nearby nodes. `)),e.error?(s(),E(`div`,Le,[p(e.error)?(s(),E(`p`,Re,` Network timeout occurred, but the advertisement may have been successfully transmitted to nearby nodes. `)):(s(),E(`p`,ze,d(e.error),1))])):b(``,!0)]),!e.isLoading&&!e.isSuccess?(s(),E(`div`,Be,[T(`button`,{onClick:l,class:`flex-1 bg-background-mute dark:bg-white/5 border border-stroke-subtle dark:border-stroke/10 hover:border-primary rounded-[10px] px-6 py-3 text-content-primary dark:text-content-primary hover:bg-stroke-subtle dark:hover:bg-white/10 transition-all duration-200`},` Cancel `),T(`button`,{onClick:u,class:g([`flex-1 rounded-[10px] px-6 py-3 font-medium transition-all duration-200 shadow-lg`,[e.error&&p(e.error)?`bg-secondary hover:bg-secondary/90 text-background hover:shadow-secondary/20`:`bg-primary hover:bg-primary/90 text-background hover:shadow-primary/20`]])},d(e.error&&p(e.error)?`Try Again`:`Send Advertisement`),3)])):b(``,!0),e.isSuccess?(s(),E(`div`,Ve,`Closing automatically...`)):b(``,!0)])],2)])):b(``,!0)]))}}),[[`__scopeId`,`data-v-db9cb8aa`]]),Ue=`pymc_pref_`;function We(e,t){try{let n=localStorage.getItem(Ue+e);return n===null?t:JSON.parse(n)}catch(n){return console.warn(`Failed to get preference ${e}:`,n),t}}function Ge(e,t){try{localStorage.setItem(Ue+e,JSON.stringify(t))}catch(t){console.warn(`Failed to set preference ${e}:`,t)}}function Ke(e){try{localStorage.removeItem(Ue+e)}catch(t){console.warn(`Failed to remove preference ${e}:`,t)}}var qe=`sidebar-pin-enabled`,Je=`sidebar-fold-state`,Ye=c(We(qe,!1)),Xe=c(Ye.value?We(Je,{}):{});function Ze(){Ye.value=!Ye.value,Ge(qe,Ye.value),Ye.value||(Xe.value={},Ke(Je))}function Qe(e,t){Ye.value&&(Xe.value={...Xe.value,[e]:t},Ge(Je,Xe.value))}function $e(e){if(!Ye.value)return null;let t=Xe.value[e];return t===void 0?null:t}function et(){return{isPinned:i(Ye),togglePin:Ze,recordFold:Qe,getRestoredFold:$e}}var tt=q(`activity`,[[`path`,{d:`M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2`,key:`169zse`}]]),nt=q(`antenna`,[[`path`,{d:`M2 12 7 2`,key:`117k30`}],[`path`,{d:`m7 12 5-10`,key:`1tvx22`}],[`path`,{d:`m12 12 5-10`,key:`ev1o1a`}],[`path`,{d:`m17 12 5-10`,key:`1e4ti3`}],[`path`,{d:`M4.5 7h15`,key:`vlsxkz`}],[`path`,{d:`M12 16v6`,key:`c8a4gj`}]]),rt=q(`bot`,[[`path`,{d:`M12 8V4H8`,key:`hb8ula`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`,key:`enze0r`}],[`path`,{d:`M2 14h2`,key:`vft8re`}],[`path`,{d:`M20 14h2`,key:`4cs60a`}],[`path`,{d:`M15 13v2`,key:`1xurst`}],[`path`,{d:`M9 13v2`,key:`rq6x2g`}]]),it=q(`building-2`,[[`path`,{d:`M10 12h4`,key:`a56b0p`}],[`path`,{d:`M10 8h4`,key:`1sr2af`}],[`path`,{d:`M14 21v-3a2 2 0 0 0-4 0v3`,key:`1rgiei`}],[`path`,{d:`M6 10H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2`,key:`secmi2`}],[`path`,{d:`M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16`,key:`16ra0t`}]]),at=q(`cable`,[[`path`,{d:`M17 19a1 1 0 0 1-1-1v-2a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2a1 1 0 0 1-1 1z`,key:`trhst0`}],[`path`,{d:`M17 21v-2`,key:`ds4u3f`}],[`path`,{d:`M19 14V6.5a1 1 0 0 0-7 0v11a1 1 0 0 1-7 0V10`,key:`1mo9zo`}],[`path`,{d:`M21 21v-2`,key:`eo0ou`}],[`path`,{d:`M3 5V3`,key:`1k5hjh`}],[`path`,{d:`M4 10a2 2 0 0 1-2-2V6a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v2a2 2 0 0 1-2 2z`,key:`1dd30t`}],[`path`,{d:`M7 5V3`,key:`1t1388`}]]),ot=q(`chart-no-axes-column`,[[`path`,{d:`M5 21v-6`,key:`1hz6c0`}],[`path`,{d:`M12 21V3`,key:`1lcnhd`}],[`path`,{d:`M19 21V9`,key:`unv183`}]]),st=q(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),ct=q(`circle-question-mark`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`,key:`1u773s`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),lt=q(`cpu`,[[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M17 20v2`,key:`1rnc9c`}],[`path`,{d:`M17 2v2`,key:`11trls`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M2 17h2`,key:`7oei6x`}],[`path`,{d:`M2 7h2`,key:`asdhe0`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`M20 17h2`,key:`1fpfkl`}],[`path`,{d:`M20 7h2`,key:`1o8tra`}],[`path`,{d:`M7 20v2`,key:`4gnj0m`}],[`path`,{d:`M7 2v2`,key:`1i4yhu`}],[`rect`,{x:`4`,y:`4`,width:`16`,height:`16`,rx:`2`,key:`1vbyd7`}],[`rect`,{x:`8`,y:`8`,width:`8`,height:`8`,rx:`1`,key:`z9xiuo`}]]),ut=q(`database-backup`,[[`ellipse`,{cx:`12`,cy:`5`,rx:`9`,ry:`3`,key:`msslwz`}],[`path`,{d:`M3 12a9 3 0 0 0 5 2.69`,key:`1ui2ym`}],[`path`,{d:`M21 9.3V5`,key:`6k6cib`}],[`path`,{d:`M3 5v14a9 3 0 0 0 6.47 2.88`,key:`i62tjy`}],[`path`,{d:`M12 12v4h4`,key:`1bxaet`}],[`path`,{d:`M13 20a5 5 0 0 0 9-3 4.5 4.5 0 0 0-4.5-4.5c-1.33 0-2.54.54-3.41 1.41L12 16`,key:`1f4ei9`}]]),dt=q(`database`,[[`ellipse`,{cx:`12`,cy:`5`,rx:`9`,ry:`3`,key:`msslwz`}],[`path`,{d:`M3 5V19A9 3 0 0 0 21 19V5`,key:`1wlel7`}],[`path`,{d:`M3 12A9 3 0 0 0 21 12`,key:`mv7ke4`}]]),ft=q(`eye`,[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),pt=q(`gauge`,[[`path`,{d:`m12 14 4-4`,key:`9kzdfg`}],[`path`,{d:`M3.34 19a10 10 0 1 1 17.32 0`,key:`19p75a`}]]),mt=q(`globe`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,key:`13o1zl`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}]]),ht=q(`key-round`,[[`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`,key:`1s6t7t`}],[`circle`,{cx:`16.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`w0ekpg`}]]),gt=q(`layout-dashboard`,[[`rect`,{width:`7`,height:`9`,x:`3`,y:`3`,rx:`1`,key:`10lvy0`}],[`rect`,{width:`7`,height:`5`,x:`14`,y:`3`,rx:`1`,key:`16une8`}],[`rect`,{width:`7`,height:`9`,x:`14`,y:`12`,rx:`1`,key:`1hutg5`}],[`rect`,{width:`7`,height:`5`,x:`3`,y:`16`,rx:`1`,key:`ldoo1y`}]]),_t=q(`map-pin`,[[`path`,{d:`M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0`,key:`1r0f0z`}],[`circle`,{cx:`12`,cy:`10`,r:`3`,key:`ilqhr7`}]]),vt=q(`megaphone`,[[`path`,{d:`M11 6a13 13 0 0 0 8.4-2.8A1 1 0 0 1 21 4v12a1 1 0 0 1-1.6.8A13 13 0 0 0 11 14H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2z`,key:`q8bfy3`}],[`path`,{d:`M6 14a12 12 0 0 0 2.4 7.2 2 2 0 0 0 3.2-2.4A8 8 0 0 1 10 14`,key:`1853fq`}],[`path`,{d:`M8 6v8`,key:`15ugcq`}]]),yt=q(`memory-stick`,[[`path`,{d:`M12 12v-2`,key:`fwoke6`}],[`path`,{d:`M12 18v-2`,key:`qj6yno`}],[`path`,{d:`M16 12v-2`,key:`heuere`}],[`path`,{d:`M16 18v-2`,key:`s1ct0w`}],[`path`,{d:`M2 11h1.5`,key:`15p63e`}],[`path`,{d:`M20 18v-2`,key:`12ehxp`}],[`path`,{d:`M20.5 11H22`,key:`khsy7a`}],[`path`,{d:`M4 18v-2`,key:`1c3oqr`}],[`path`,{d:`M8 12v-2`,key:`1mwtfd`}],[`path`,{d:`M8 18v-2`,key:`qcmpov`}],[`rect`,{x:`2`,y:`6`,width:`20`,height:`10`,rx:`2`,key:`1qcswk`}]]),bt=q(`percent`,[[`line`,{x1:`19`,x2:`5`,y1:`5`,y2:`19`,key:`1x9vlm`}],[`circle`,{cx:`6.5`,cy:`6.5`,r:`2.5`,key:`4mh3h7`}],[`circle`,{cx:`17.5`,cy:`17.5`,r:`2.5`,key:`1mdrzq`}]]),xt=q(`pin`,[[`path`,{d:`M12 17v5`,key:`bb1du9`}],[`path`,{d:`M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z`,key:`1nkz8b`}]]),St=q(`radio`,[[`path`,{d:`M16.247 7.761a6 6 0 0 1 0 8.478`,key:`1fwjs5`}],[`path`,{d:`M19.075 4.933a10 10 0 0 1 0 14.134`,key:`ehdyv1`}],[`path`,{d:`M4.925 19.067a10 10 0 0 1 0-14.134`,key:`1q22gi`}],[`path`,{d:`M7.753 16.239a6 6 0 0 1 0-8.478`,key:`r2q7qm`}],[`circle`,{cx:`12`,cy:`12`,r:`2`,key:`1c9p78`}]]),Ct=q(`repeat-2`,[[`path`,{d:`m2 9 3-3 3 3`,key:`1ltn5i`}],[`path`,{d:`M13 18H7a2 2 0 0 1-2-2V6`,key:`1r6tfw`}],[`path`,{d:`m22 15-3 3-3-3`,key:`4rnwn2`}],[`path`,{d:`M11 6h6a2 2 0 0 1 2 2v10`,key:`2f72bc`}]]),wt=q(`scale`,[[`path`,{d:`M12 3v18`,key:`108xh3`}],[`path`,{d:`m19 8 3 8a5 5 0 0 1-6 0zV7`,key:`zcdpyk`}],[`path`,{d:`M3 7h1a17 17 0 0 0 8-2 17 17 0 0 0 8 2h1`,key:`1yorad`}],[`path`,{d:`m5 8 3 8a5 5 0 0 1-6 0zV7`,key:`eua70x`}],[`path`,{d:`M7 21h10`,key:`1b0cd5`}]]),Tt=q(`scroll-text`,[[`path`,{d:`M15 12h-5`,key:`r7krc0`}],[`path`,{d:`M15 8h-5`,key:`1khuty`}],[`path`,{d:`M19 17V5a2 2 0 0 0-2-2H4`,key:`zz82l3`}],[`path`,{d:`M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3`,key:`1ph1d7`}]]),Et=q(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),Dt=q(`server`,[[`rect`,{width:`20`,height:`8`,x:`2`,y:`2`,rx:`2`,ry:`2`,key:`ngkwjq`}],[`rect`,{width:`20`,height:`8`,x:`2`,y:`14`,rx:`2`,ry:`2`,key:`iecqi9`}],[`line`,{x1:`6`,x2:`6.01`,y1:`6`,y2:`6`,key:`16zg32`}],[`line`,{x1:`6`,x2:`6.01`,y1:`18`,y2:`18`,key:`nzw8ys`}]]),Ot=q(`settings`,[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),kt=q(`shield-check`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),At=q(`terminal`,[[`path`,{d:`M12 19h8`,key:`baeox8`}],[`path`,{d:`m4 17 6-6-6-6`,key:`1yngyt`}]]),jt=q(`timer`,[[`line`,{x1:`10`,x2:`14`,y1:`2`,y2:`2`,key:`14vaq8`}],[`line`,{x1:`12`,x2:`15`,y1:`14`,y2:`11`,key:`17fdiu`}],[`circle`,{cx:`12`,cy:`14`,r:`8`,key:`1e1u0o`}]]),Mt=q(`users-round`,[[`path`,{d:`M18 21a8 8 0 0 0-16 0`,key:`3ypg7q`}],[`circle`,{cx:`10`,cy:`8`,r:`5`,key:`o932ke`}],[`path`,{d:`M22 20c0-3.37-2-6.5-4-8a5 5 0 0 0-.45-8.3`,key:`10s06x`}]]),Nt=q(`wrench`,[[`path`,{d:`M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z`,key:`1ngwbx`}]]),Pt=q(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),Ft={key:0,class:`nav-tick`,"aria-hidden":`true`},It={class:`nav-label flex-1 text-left`},Lt=Y(h({name:`NavItem`,__name:`NavItem`,props:{item:{},depth:{},precedesActive:{type:Boolean},searchActive:{type:Boolean}},setup(t){let r=t,i=z(),o=R(),u=S(()=>r.depth??0),p=D(de,{});function m(e,t,n){let r=e.activeOn??(e.route?[e.route]:[]);return r.length===0||!r.some(e=>t===e||t.startsWith(e+`/`))?!1:e.params&&!e.children?Object.entries(e.params).every(([e,t])=>n[e]===t):!0}function h(e,t,n){return e.some(e=>e.children?h(e.children,t,n):m(e,t,n))}let _=S(()=>r.item.children?!1:m(r.item,i.path,i.query)),C=S(()=>!!r.item.children&&h(r.item.children,i.path,i.query)),O=S(()=>r.item.children?r.item.children.findIndex(e=>e.children?h(e.children,i.path,i.query):m(e,i.path,i.query)):-1),k=S(()=>!!r.item.children?.length),{getRestoredFold:A,recordFold:j}=et(),M=k.value?A(r.item.id):null,N=c(M===null?!1:M),P=S(()=>r.searchActive&&k.value||N.value);v(C,e=>{e&&(N.value=!0)},{immediate:!0}),v(N,e=>{k.value&&j(r.item.id,e)});function I(){N.value=!N.value}function L(){if(!r.item.route)return;let e=r.item.params?{...r.item.params}:void 0;o.push({path:r.item.route,query:e})}function B(){k.value?I():r.item.action?p[r.item.action]?.():L()}let ee=S(()=>u.value>0),V=S(()=>{let e=`w-full rounded-[10px] ${ee.value?`py-2`:`py-3`} flex items-center gap-2 text-sm font-medium transition-all duration-200`,t=ee.value?`pl-2 pr-2`:`pl-4 pr-2`;return _.value?`${e} ${t} text-primary font-semibold border border-transparent`:`${e} ${t} text-content-primary dark:text-content-primary hover:text-primary border border-transparent`}),H=S(()=>_.value?`w-3.5 h-3.5 flex-shrink-0 text-primary`:`w-3.5 h-3.5 flex-shrink-0 text-content-muted`);return(i,o)=>{let c=y(`NavItem`,!0);return s(),E(`div`,{class:g({"nav-item-active":_.value,"nav-has-active":C.value,"nav-precedes-active":r.precedesActive})},[ee.value?(s(),E(`span`,Ft)):b(``,!0),T(`button`,{class:g(V.value),onClick:B},[t.item.icon?(s(),f(e(t.item.icon),{key:0,class:g(H.value)},null,8,[`class`])):b(``,!0),T(`span`,It,d(t.item.label),1),k.value?(s(),f(l(st),{key:1,class:g([`w-3 h-3 flex-shrink-0 transition-transform duration-200 text-content-muted`,P.value?`rotate-180`:``])},null,8,[`class`])):b(``,!0)],2),x(F,{name:`nav-expand`},{default:a(()=>[k.value&&P.value?(s(),E(`div`,{key:0,class:g([`nav-children mt-0 space-y-0`,u.value===0?`nav-root-children ml-[23px]`:`nav-nested-children ml-[15px]`])},[(s(!0),E(w,null,n(t.item.children,(e,n)=>(s(),f(c,{key:e.id,item:e,depth:u.value+1,"precedes-active":O.value>=0&&n<O.value,"search-active":t.searchActive},null,8,[`item`,`depth`,`precedes-active`,`search-active`]))),128))],2)):b(``,!0)]),_:1})],2)}}}),[[`__scopeId`,`data-v-1ece3eb2`]]),Rt=[`viewBox`],zt=[`points`],Bt=[`cx`,`cy`],Vt={class:`font-medium`},Ht=240,Ut=2,Wt=h({name:`InteractiveSparkline`,__name:`InteractiveSparkline`,props:{data:{},height:{default:28},unit:{default:``}},setup(e,{expose:t}){let n=e,r=S(()=>{let e=n.data;if(e.length<2)return[];let t=e.map(e=>e.value),r=Math.min(...t),i=Math.max(...t)-r||1,a=n.height;return e.map((t,n)=>({x:Ut+n/(e.length-1)*(Ht-Ut*2),y:a-Ut-(t.value-r)/i*(a-Ut*2),value:t.value,timestamp:t.timestamp}))}),i=S(()=>r.value.map(e=>`${e.x.toFixed(1)},${e.y.toFixed(1)}`).join(` `)),a=S(()=>r.value.length>=2),o=c(null),l=c(null),u=c(0),p=c(0),h=S(()=>l.value===null?null:r.value[l.value]??null),g=S(()=>h.value?new Date(h.value.timestamp*1e3).toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`,hour12:!1}):``),v=c(!1),y=S(()=>({position:`fixed`,top:`${p.value+12}px`,left:v.value?`${u.value-110}px`:`${u.value+12}px`,zIndex:9999})),x=S(()=>h.value?(h.value.x-Ut)/(Ht-Ut*2)*100:0);function w(e){if(!o.value||r.value.length<2)return;let t=o.value.getBoundingClientRect(),n=Ut+Math.max(0,Math.min(1,(e.clientX-t.left)/t.width))*(Ht-Ut*2),i=0,a=1/0;r.value.forEach((e,t)=>{let r=Math.abs(e.x-n);r<a&&(a=r,i=t)}),l.value=i,u.value=e.clientX,p.value=e.clientY,v.value=e.clientX>window.innerWidth-120}function D(){l.value=null}return t({hoveredPoint:h}),(t,n)=>a.value?(s(),E(`div`,{key:0,ref_key:`wrapperRef`,ref:o,class:`relative cursor-crosshair`,onMousemove:w,onMouseleave:D},[(s(),E(`svg`,{viewBox:`0 0 ${Ht} ${e.height}`,class:`w-full text-secondary`,style:m({height:`${e.height}px`}),fill:`none`,xmlns:`http://www.w3.org/2000/svg`},[T(`polyline`,{points:i.value,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linejoin":`round`,"stroke-linecap":`round`,fill:`none`,opacity:`0.7`},null,8,zt),h.value?(s(),E(`circle`,{key:0,cx:h.value.x,cy:h.value.y,r:`2.5`,fill:`currentColor`,opacity:`0.9`},null,8,Bt)):b(``,!0)],12,Rt)),h.value?(s(),E(`div`,{key:0,class:`absolute top-0 bottom-0 w-px bg-secondary opacity-40 pointer-events-none`,style:m({left:`${x.value}%`})},null,4)):b(``,!0),(s(),f(_,{to:`body`},[h.value?(s(),E(`div`,{key:0,class:`pointer-events-none px-2.5 py-2 rounded text-sm leading-snug bg-surface-elevated dark:bg-surface-elevated border border-stroke-subtle dark:border-white/20 text-content-primary dark:text-content-primary whitespace-nowrap shadow-lg`,style:m(y.value)},[C(d(g.value)+`: `,1),T(`span`,Vt,d(h.value.value)+d(e.unit?` ${e.unit}`:``),1)],4)):b(``,!0)]))],544)):b(``,!0)}}),Gt={key:0,class:`mt-2 pt-2 border-t border-stroke-subtle dark:border-white/10`},Kt={class:`flex items-center justify-between text-[10px] text-content-muted dark:text-content-muted uppercase tracking-wide mb-1`},qt={class:`text-content-primary dark:text-content-primary normal-case tracking-normal font-medium`},Jt=h({name:`NoiseFloorSparkline`,__name:`NoiseFloorSparkline`,setup(e){let t=ne(),n=re();v(()=>n.noiseFloorDbm,e=>{e!==null&&t.appendNoiseFloorReading(e)});let r=S(()=>n.noiseFloorDbm||t.currentNoiseFloor),i=S(()=>{if(!t.noiseFloorHistory?.length)return[];let e=Date.now()/1e3-3600;return t.noiseFloorHistory.filter(t=>t.noise_floor_dbm!==0&&t.timestamp>=e).map(e=>({value:e.noise_floor_dbm,timestamp:e.timestamp}))});return(e,t)=>r.value===null?b(``,!0):(s(),E(`div`,Gt,[T(`div`,Kt,[t[0]||=T(`span`,null,`Noise Floor`,-1),T(`span`,qt,d(r.value)+` dBm `,1)]),x(Wt,{data:i.value,unit:`dBm`},null,8,[`data`])]))}}),Yt=[{id:`dashboard`,label:`Dashboard`,icon:gt,route:`/`},{id:`send-advert`,label:`Send Advert`,icon:vt,action:`sendAdvert`},{id:`monitoring`,label:`Monitoring`,icon:tt,children:[{id:`neighbors`,label:`Neighbors`,icon:Mt,route:`/neighbors`},{id:`sessions`,label:`Sessions`,icon:at,route:`/sessions`},{id:`gps`,label:`GPS`,icon:_t,route:`/gps`,enabledWhen:`gps`},{id:`sensors`,label:`Sensors`,icon:pt,route:`/sensors`,enabledWhen:`sensors`}]},{id:`analytics`,label:`Analytics`,icon:ot,children:[{id:`statistics`,label:`Statistics`,icon:ot,route:`/statistics`},{id:`rf-health-correlation`,label:`RF Health Correlation`,icon:ot,route:`/rf-health-correlation`},{id:`logs`,label:`Logs`,icon:Tt,route:`/logs`}]},{id:`system`,label:`System`,icon:Dt,children:[{id:`configuration`,label:`Configuration`,icon:Ot,activeOn:[`/configuration`,`/cad-calibration`],children:[{id:`config-radio`,label:`Radio`,icon:nt,activeOn:[`/configuration`],children:[{id:`config-radio-settings`,label:`Radio Settings`,icon:St,route:`/configuration`,params:{tab:`radio`},activeOn:[`/configuration`]},{id:`config-radio-hardware`,label:`Radio Hardware`,icon:nt,route:`/configuration`,params:{tab:`radio-hardware`},activeOn:[`/configuration`]},{id:`config-repeater`,label:`Repeater`,icon:Ct,route:`/configuration`,params:{tab:`repeater`},activeOn:[`/configuration`]},{id:`config-duty`,label:`Duty Cycle`,icon:bt,route:`/configuration`,params:{tab:`duty`},activeOn:[`/configuration`]},{id:`config-delays`,label:`TX Delays`,icon:jt,route:`/configuration`,params:{tab:`delays`},activeOn:[`/configuration`]}]},{id:`config-access`,label:`Access`,icon:kt,activeOn:[`/configuration`],children:[{id:`config-advert`,label:`Advert Limits`,icon:vt,route:`/configuration`,params:{tab:`advert`},activeOn:[`/configuration`]},{id:`config-transport`,label:`Regions/Keys`,icon:mt,route:`/configuration`,params:{tab:`transport`},activeOn:[`/configuration`]},{id:`config-api-tokens`,label:`API Tokens`,icon:ht,route:`/configuration`,params:{tab:`api-tokens`},activeOn:[`/configuration`]},{id:`config-web`,label:`Web Options`,icon:mt,route:`/configuration`,params:{tab:`web`},activeOn:[`/configuration`]},{id:`config-observer`,label:`Observer`,icon:ft,route:`/configuration`,params:{tab:`observer`},activeOn:[`/configuration`]},{id:`config-policy-engine`,label:`Policies`,icon:wt,route:`/configuration`,params:{tab:`policy-engine`},activeOn:[`/configuration`]}]},{id:`config-maintenance`,label:`Maintenance`,icon:Nt,activeOn:[`/configuration`],children:[{id:`config-backup`,label:`Backup`,icon:ut,route:`/configuration`,params:{tab:`backup`},activeOn:[`/configuration`]},{id:`config-database`,label:`Database`,icon:dt,route:`/configuration`,params:{tab:`database`},activeOn:[`/configuration`]},{id:`config-memory`,label:`Memory`,icon:yt,route:`/configuration`,params:{tab:`memory`},activeOn:[`/configuration`]}]}]},{id:`system-stats`,label:`System Stats`,icon:lt,route:`/system-stats`},{id:`terminal`,label:`Terminal`,icon:At,route:`/terminal`}]},{id:`room`,label:`Rooms, Companions`,icon:Mt,children:[{id:`room-servers`,label:`Room Servers`,icon:it,route:`/room-servers`},{id:`companions`,label:`Companions`,icon:rt,route:`/companions`}]},{id:`help`,label:`Help`,icon:ct,route:`/help`}],Xt=`/assets/openhop_transparent_trim-CtPcFr1r.png`,Zt=[`src`],Qt={class:`text-content-secondary dark:text-content-muted text-sm`},$t=[`title`],en={class:`text-content-secondary dark:text-content-muted text-sm mt-1`},tn={class:`mt-3 rounded-[10px] border border-stroke-subtle dark:border-white/10 bg-white dark:bg-white/5 overflow-hidden`},nn={class:`p-2`},rn={class:`flex items-center justify-between`},an={class:`flex items-center gap-3 mt-1.5 text-[10px] text-content-muted dark:text-content-muted`},on={class:`text-primary`},sn={class:`text-accent-red`},cn={key:0,class:`text-secondary`},ln={key:0,class:`mt-2 pt-2 border-t border-stroke-subtle dark:border-white/10`},un={class:`flex items-center justify-between text-[10px] text-content-muted dark:text-content-muted mb-1`},dn={class:`text-content-primary dark:text-content-primary`},fn={class:`w-full h-1 bg-white/10 rounded-full overflow-hidden`},pn={class:`flex border-t border-stroke-subtle dark:border-white/10`},mn=[`title`,`disabled`,`onClick`],hn={class:`relative mb-8 space-y-2`},gn={class:`absolute top-[6px] right-0 z-10 flex items-center gap-1`},_n=[`title`],vn=[`title`],yn={key:0,class:`pr-16`},bn={class:`relative`},xn={key:1,class:`text-xs text-content-muted px-1`},Sn={class:`mb-4`},Cn={key:0,class:`mb-2 glass-card px-3 py-2 rounded-lg border border-blue-500/30 dark:border-blue-400/50 bg-blue-500/10 dark:bg-blue-400/20`},wn={class:`flex items-center gap-2`},Tn={key:0,class:`mt-2 glass-card px-3 py-2 rounded-lg border border-stroke-subtle dark:border-stroke/30 space-y-2 text-xs animate-fade-in`},En={class:`space-y-1`},Dn={class:`flex items-center justify-between`},On={class:`text-content-primary font-mono`},kn={key:0,class:`pl-2 space-y-0.5 text-[10px] text-content-secondary dark:text-content-muted`},An={key:0,class:`flex items-center gap-1`},jn={class:`bg-white/5 dark:bg-black/20 px-1 py-0.5 rounded`},Mn={class:`space-y-1`},Nn={class:`flex items-center justify-between`},Pn={class:`text-content-primary font-mono`},Fn={key:0,class:`pl-2 space-y-0.5 text-[10px] text-content-secondary dark:text-content-muted`},In={key:0,class:`flex items-center gap-1`},Ln={class:`bg-white/5 dark:bg-black/20 px-1 py-0.5 rounded`},Rn={class:`flex items-center gap-2 text-content-secondary dark:text-content-muted text-xs mb-3`},zn={class:`flex items-center justify-center gap-3`},Bn={href:`https://discord.gg/qreAsnmJ`,target:`_blank`,rel:`noopener noreferrer`,class:`inline-flex items-center justify-center w-9 h-9 rounded-xl bg-content-primary dark:bg-white/10 border border-stroke-subtle dark:border-stroke/20 hover:bg-indigo-50 dark:hover:bg-indigo-500/20 hover:border-indigo-500/50 transition-all duration-300 hover:scale-110 group backdrop-blur-sm`,title:`Discord`},Vn={href:`https://github.com/pyMC-dev/pyMC_Repeater`,target:`_blank`,rel:`noopener noreferrer`,class:`inline-flex items-center justify-center w-9 h-9 rounded-xl bg-content-primary dark:bg-white/10 border border-stroke-subtle dark:border-stroke/20 hover:bg-primary/20 dark:hover:bg-primary/30 hover:border-primary/50 transition-all duration-300 hover:scale-110 group backdrop-blur-sm`,title:`GitHub`},Hn={href:`https://buymeacoffee.com/rightup`,target:`_blank`,rel:`noopener noreferrer`,class:`inline-flex items-center justify-center w-9 h-9 rounded-xl bg-content-primary dark:bg-white/10 border border-stroke-subtle dark:border-stroke/20 hover:bg-yellow-50 dark:hover:bg-yellow-500/20 hover:border-yellow-500/50 transition-all duration-300 hover:scale-110 group backdrop-blur-sm`,title:`Buy Me a Coffee`},Un=Y(h({name:`SidebarNav`,__name:`Sidebar`,props:{mobileOpen:{type:Boolean}},emits:[`close`],setup(e,{emit:i}){let u=i,p=z(),h=R(),y=re(),D=K(),k=ne(),{theme:j}=ae(),M=S(()=>Xt),{isPinned:N,togglePin:I}=et(),L=S(()=>N.value?`w-3 h-3`:`w-3 h-3 rotate-45`),B=S(()=>N.value?`w-6 h-6 rounded-md flex items-center justify-center transition-all duration-200 text-primary opacity-100`:`w-6 h-6 rounded-md flex items-center justify-center transition-all duration-200 text-content-muted hover:text-content-primary`),ee=S(()=>Z.value?`w-6 h-6 rounded-md flex items-center justify-center transition-all duration-200 text-primary`:`w-6 h-6 rounded-md flex items-center justify-center transition-all duration-200 text-content-muted hover:text-content-primary`),V=c(!1),U=null,te=e=>{V.value=e.matches};t(()=>{U=window.matchMedia(`(max-width: 1023px)`),V.value=U.matches,U.addEventListener(`change`,te)}),O(()=>{U?.removeEventListener(`change`,te)}),v(()=>p.fullPath,()=>{V.value&&u(`close`)});let W=()=>{H(),h.push(`/login`),u(`close`)},ie=c(!1),G=c(!1),q=c(!1),J=c(!1),oe=c(null);r(de,{sendAdvert:()=>{q.value=!0}});let se=async()=>{ie.value=!0,oe.value=null;try{await y.sendAdvert(),J.value=!0,setTimeout(()=>ce(),2e3)}catch(e){oe.value=e instanceof Error?e.message:`Unknown error occurred`,console.error(`Failed to send advert:`,e)}finally{ie.value=!1}},ce=()=>{q.value=!1,J.value=!1,oe.value=null,ie.value=!1},le=async e=>{if(!(G.value||y.currentMode===e)){G.value=!0;try{await y.setMode(e)}catch(e){console.error(`Failed to set mode:`,e)}finally{G.value=!1}}},ue=S(()=>{let e=y.stats;return{gps:e?.gps?.enabled===!0||e?.config?.gps?.enabled===!0,sensors:e?.sensors?.enabled===!0||e?.config?.sensors?.enabled===!0}});function Y(e){return e.filter(e=>!e.enabledWhen||ue.value[e.enabledWhen]===!0).map(e=>e.children?{...e,children:Y(e.children)}:e)}let X=c(``),Z=c(!1),fe=c(null);function me(){if(Z.value=!Z.value,!Z.value){X.value=``;return}A(()=>fe.value?.focus())}function he(){X.value=``,A(()=>fe.value?.focus())}function ge(e,t){let n=t.trim().toLowerCase();return n?e.reduce((e,t)=>{let r=t.label.toLowerCase().includes(n)||t.id.toLowerCase().includes(n)||(t.route?.toLowerCase().includes(n)??!1);if(!t.children?.length)return r&&e.push(t),e;let i=ge(t.children,n);return r?(e.push(t),e):(i.length>0&&e.push({...t,children:i}),e)},[]):e}let ve=S(()=>Y(Yt)),ye=S(()=>ge(ve.value,X.value)),be=S(()=>D.advertTier.currentTier),Se=S(()=>D.advertTier.advertsAllowed),Ce=S(()=>D.advertTier.advertsDropped),we=S(()=>D.advertTier.activePenalties),Te=S(()=>{switch(be.value){case`quiet`:return`bg-primary/20 text-primary border-primary/50`;case`normal`:return`bg-primary/20 text-primary border-primary/50`;case`busy`:return`bg-secondary/20 text-secondary border-secondary/50`;case`congested`:return`bg-accent-red/20 text-accent-red border-accent-red/50`;default:return`bg-surface-elevated text-content-muted border-stroke-subtle`}}),Ee=[{id:`forward`,label:`Repeater`,title:`Repeats packets and Room Server and Companion identities can TX.`},{id:`monitor`,label:`Monitor`,title:`Does not repeat packets, can Advert, Room Server and Companion identities can TX.`},{id:`no_tx`,label:`No TX`,title:`No packets transmitted.`}],De=S(()=>{let e=y.dutyCyclePercentage;return{width:e===0?`2px`:`${Math.max(e,2)}%`,backgroundColor:e>90?`var(--color-accent-red)`:e>70?`var(--color-secondary)`:`var(--color-primary)`}}),Oe=c(!1),ke=S(()=>y.version.includes(`dev`)||y.coreVersion.includes(`dev`)),Ae=e=>{let t=e.match(/^([\d.]+)(\.dev(\d+))?((\+g)([a-f0-9]+))?$/);return t?{base:t[1],isDev:!!t[2],devNumber:t[3]||null,commit:t[6]||null}:{base:e,isDev:!1,devNumber:null,commit:null}},Q=S(()=>Ae(y.version)),$=S(()=>Ae(y.coreVersion)),je=S(()=>{let e=[y.lastUpdated,k.lastUpdated].filter(Boolean);return e.length===0?`Never`:e.reduce((e,t)=>e>t?e:t).toLocaleTimeString()});return(t,r)=>(s(),E(w,null,[(s(),f(_,{to:`body`},[x(F,{name:`backdrop`},{default:a(()=>[V.value&&e.mobileOpen?(s(),E(`div`,{key:0,class:`fixed inset-0 z-[249] bg-black/30 backdrop-blur-sm`,onClick:r[0]||=e=>u(`close`)})):b(``,!0)]),_:1})])),T(`aside`,{class:g([V.value?[`fixed left-0 top-0 bottom-0 w-72 p-4 z-[250] transition-transform duration-300`,e.mobileOpen?`translate-x-0`:`-translate-x-full`]:`w-[285px] flex-shrink-0 p-[15px] h-full`])},[T(`div`,{class:g([`h-full p-6 overflow-y-auto overscroll-contain scrollbar-hide`,V.value?`bg-white/95 dark:bg-black/20 backdrop-blur-xl border border-stroke dark:border-white/10 rounded-2xl shadow-2xl`:`glass-card`])},[T(`div`,{class:g([`mb-4`,V.value?`flex items-start justify-between`:``])},[T(`div`,null,[T(`div`,{class:g([`flex`,V.value?`mb-0`:`mb-0 justify-center`])},[T(`img`,{src:M.value,alt:`openHop`,class:g([`logo-image`,V.value?`h-[130px]`:`h-[154px]`])},null,10,Zt)],2),r[7]||=T(`h2`,{class:`text-content-primary dark:text-content-primary text-center text-lg sm:text-xl font-heading font-bold mb-3`},` Repeater `,-1),T(`p`,Qt,[C(d(l(y).nodeName)+` `,1),T(`span`,{class:g([`inline-block w-2 h-2 rounded-full ml-2`,l(y).statusBadge.text===`Active`?`bg-primary`:l(y).statusBadge.text===`Monitor Mode`?`bg-secondary`:`bg-accent-red`]),title:l(y).statusBadge.title},null,10,$t)]),T(`p`,en,` <`+d(l(y).pubKey)+`> `,1),T(`div`,tn,[T(`div`,nn,[T(`div`,rn,[r[5]||=T(`span`,{class:`text-content-muted dark:text-content-muted text-[10px] uppercase tracking-wide`},`Adaptive`,-1),T(`div`,{class:g([`inline-flex items-center px-2 py-0.5 rounded-full border text-[10px] font-semibold`,Te.value])},d(be.value.toUpperCase()),3)]),T(`div`,an,[T(`span`,on,`OK: `+d(Se.value),1),T(`span`,sn,`Drop: `+d(Ce.value),1),we.value>0?(s(),E(`span`,cn,`Pen: `+d(we.value),1)):b(``,!0)]),l(y).dutyCycleEnabled?(s(),E(`div`,ln,[T(`div`,un,[r[6]||=T(`span`,null,`Duty Cycle`,-1),T(`span`,dn,d(l(y).dutyCycleUtilization.toFixed(1))+`% / `+d(l(y).dutyCycleMax.toFixed(1))+`% `,1)]),T(`div`,fn,[T(`div`,{class:`h-full rounded-full transition-all duration-300`,style:m(De.value)},null,4)])])):b(``,!0),x(Jt)]),T(`div`,pn,[(s(),E(w,null,n(Ee,e=>T(`button`,{key:e.id,type:`button`,title:e.title,disabled:G.value,onClick:t=>le(e.id),class:g([`flex-1 py-2 text-xs font-medium transition-all duration-200 border-r border-stroke-subtle dark:border-white/10 last:border-r-0`,G.value?`opacity-60 cursor-not-allowed`:`cursor-pointer`,l(y).currentMode===e.id?e.id===`forward`?`bg-mode-segment-forward text-primary`:e.id===`monitor`?`bg-secondary/20 text-secondary`:`bg-mode-segment-no-tx text-accent-red`:`text-content-primary dark:text-content-primary hover:bg-white/5 dark:hover:bg-white/5`])},d(G.value&&l(y).currentMode!==e.id?`…`:e.label),11,mn)),64))])])]),V.value?(s(),E(`button`,{key:0,onClick:r[1]||=e=>u(`close`),class:`ml-3 flex-shrink-0 text-content-primary dark:text-content-muted hover:text-content-heading dark:hover:text-white transition-colors`},`✕`)):b(``,!0)],2),T(`div`,hn,[T(`div`,gn,[T(`button`,{onClick:me,title:Z.value?`Hide menu search`:`Search menu items`,class:g(ee.value)},[x(l(Et),{class:`w-3.5 h-3.5`})],10,_n),T(`button`,{onClick:r[2]||=(...e)=>l(I)&&l(I)(...e),title:l(N)?`Unpin menu layout`:`Pin menu layout`,class:g(B.value)},[x(l(xt),{class:g(L.value)},null,8,[`class`])],10,vn)]),Z.value?(s(),E(`div`,yn,[T(`div`,bn,[o(T(`input`,{ref_key:`navSearchInput`,ref:fe,"onUpdate:modelValue":r[3]||=e=>X.value=e,type:`text`,placeholder:`Search menu...`,class:`w-full h-8 rounded-[10px] border border-stroke-subtle dark:border-stroke/30 bg-white/70 dark:bg-white/5 px-3 pr-8 text-xs text-content-primary dark:text-content-primary placeholder:text-content-muted focus:outline-none focus:ring-1 focus:ring-primary/50`},null,512),[[P,X.value]]),X.value?(s(),E(`button`,{key:0,type:`button`,class:`absolute right-1 top-1/2 -translate-y-1/2 w-6 h-6 inline-flex items-center justify-center text-content-muted hover:text-content-primary transition-colors`,title:`Clear search`,onClick:he},[x(l(Pt),{class:`w-3.5 h-3.5`})])):b(``,!0)])])):b(``,!0),Z.value&&X.value.trim().length>0&&ye.value.length===0?(s(),E(`p`,xn,` No menu items match "`+d(X.value)+`" `,1)):b(``,!0),(s(!0),E(w,null,n(ye.value,e=>(s(),f(Lt,{key:e.id,item:e,depth:0,"search-active":Z.value&&X.value.trim().length>0},null,8,[`item`,`search-active`]))),128))]),V.value?(s(),E(`button`,{key:0,onClick:W,class:`w-full glass-card-orange hover:bg-accent-red/10 rounded-[10px] py-3 px-4 flex items-center justify-center gap-2 text-sm font-medium text-content-primary dark:text-white transition-all mb-6`},[...r[8]||=[T(`svg`,{class:`w-4 h-4`,viewBox:`0 0 20 20`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.5`,xmlns:`http://www.w3.org/2000/svg`},[T(`path`,{d:`M13 3H15C16.1046 3 17 3.89543 17 5V15C17 16.1046 16.1046 17 15 17H13M8 7L4 10.5M4 10.5L8 14M4 10.5H13`,"stroke-linecap":`round`,"stroke-linejoin":`round`})],-1),C(` Logout `,-1)]])):b(``,!0),T(`div`,Sn,[ke.value?(s(),E(`div`,Cn,[...r[9]||=[T(`div`,{class:`flex items-center justify-center gap-2`},[T(`svg`,{class:`w-4 h-4 text-blue-500 dark:text-blue-400 flex-shrink-0`,viewBox:`0 0 20 20`,fill:`currentColor`},[T(`path`,{"fill-rule":`evenodd`,d:`M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z`,"clip-rule":`evenodd`})]),T(`span`,{class:`text-blue-500 dark:text-blue-400 text-xs font-semibold`},`Development Build`)],-1)]])):b(``,!0),T(`div`,{onClick:r[4]||=e=>Oe.value=!Oe.value,class:`cursor-pointer transition-all duration-200 hover:scale-[1.02]`},[T(`div`,wn,[T(`span`,{class:g([`glass-card px-2 py-1 text-xs font-medium rounded border transition-colors`,Q.value.isDev?`text-yellow-600 dark:text-yellow-400 border-yellow-500/30`:`text-content-secondary dark:text-content-muted border-stroke-subtle dark:border-stroke`])},` R:v`+d(Q.value.base)+d(Q.value.isDev?`-dev`+Q.value.devNumber:``),3),T(`span`,{class:g([`glass-card px-2 py-1 text-xs font-medium rounded border transition-colors`,$.value.isDev?`text-yellow-600 dark:text-yellow-400 border-yellow-500/30`:`text-content-secondary dark:text-content-muted border-stroke-subtle dark:border-stroke`])},` Core:v`+d($.value.base)+d($.value.isDev?`-dev`+$.value.devNumber:``),3),(s(),E(`svg`,{class:g([`w-3 h-3 text-content-muted transition-transform duration-200`,Oe.value?`rotate-180`:``]),fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`},[...r[10]||=[T(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M19 9l-7 7-7-7`},null,-1)]],2))]),Oe.value?(s(),E(`div`,Tn,[T(`div`,En,[T(`div`,Dn,[r[11]||=T(`span`,{class:`text-content-muted font-medium`},`Repeater:`,-1),T(`span`,On,`v`+d(Q.value.base),1)]),Q.value.isDev?(s(),E(`div`,kn,[T(`div`,null,`Dev Build: `+d(Q.value.devNumber),1),Q.value.commit?(s(),E(`div`,An,[r[12]||=T(`span`,null,`Commit:`,-1),T(`code`,jn,d(Q.value.commit),1)])):b(``,!0)])):b(``,!0)]),r[15]||=T(`div`,{class:`border-t border-stroke-subtle dark:border-stroke/20`},null,-1),T(`div`,Mn,[T(`div`,Nn,[r[13]||=T(`span`,{class:`text-content-muted font-medium`},`Core:`,-1),T(`span`,Pn,`v`+d($.value.base),1)]),$.value.isDev?(s(),E(`div`,Fn,[T(`div`,null,`Dev Build: `+d($.value.devNumber),1),$.value.commit?(s(),E(`div`,In,[r[14]||=T(`span`,null,`Commit:`,-1),T(`code`,Ln,d($.value.commit),1)])):b(``,!0)])):b(``,!0)])])):b(``,!0)])]),r[18]||=T(`div`,{class:`border-t border-stroke-subtle dark:border-stroke mb-4`},null,-1),T(`div`,Rn,[r[16]||=T(`svg`,{class:`w-3 h-3`,viewBox:`0 0 13 13`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},[T(`path`,{d:`M6.5 13C5.59722 13 4.75174 12.8286 3.96355 12.4858C3.17537 12.143 2.48926 11.6795 1.90522 11.0955C1.32119 10.5115 0.85776 9.82535 0.514945 9.03717C0.172131 8.24898 0.000482491 7.40326 1.0101e-06 6.5C-0.000480471 5.59674 0.171168 4.75126 0.514945 3.96356C0.858723 3.17585 1.32191 2.48974 1.9045 1.90522C2.48709 1.3207 3.1732 0.857278 3.96283 0.514944C4.75246 0.172611 5.59818 0.000962963 6.5 0C7.48703 0 8.42303 0.210648 9.30799 0.631944C10.193 1.05324 10.9421 1.64907 11.5555 2.41944V1.44444C11.5555 1.23981 11.6249 1.06841 11.7635 0.930222C11.9022 0.792037 12.0736 0.722704 12.2778 0.722222C12.4819 0.721741 12.6536 0.791074 12.7927 0.930222C12.9319 1.06937 13.001 1.24078 13 1.44444V4.33333C13 4.53796 12.9307 4.70961 12.792 4.84828C12.6533 4.98694 12.4819 5.05604 12.2778 5.05556H9.38888C9.18425 5.05556 9.01285 4.98622 8.87466 4.84756C8.73647 4.70889 8.66714 4.53748 8.66666 4.33333C8.66618 4.12919 8.73551 3.95778 8.87466 3.81911C9.01381 3.68044 9.18521 3.61111 9.38888 3.61111H10.6528C10.1593 2.93704 9.55138 2.40741 8.82916 2.02222C8.10694 1.63704 7.33055 1.44444 6.5 1.44444C5.09166 1.44444 3.89711 1.93507 2.91633 2.91633C1.93555 3.89759 1.44493 5.09215 1.44444 6.5C1.44396 7.90785 1.93459 9.10265 2.91633 10.0844C3.89807 11.0661 5.09263 11.5565 6.5 11.5556C7.64351 11.5556 8.66666 11.2125 9.56944 10.5264C10.4722 9.84028 11.068 8.95555 11.3569 7.87222C11.4171 7.67963 11.5255 7.53519 11.6819 7.43889C11.8384 7.34259 12.013 7.30648 12.2055 7.33055C12.4102 7.35463 12.5727 7.44178 12.693 7.592C12.8134 7.74222 12.8495 7.90785 12.8014 8.08889C12.4523 9.5213 11.694 10.698 10.5264 11.6191C9.35879 12.5402 8.01666 13.0005 6.5 13ZM7.22222 6.21111L9.02777 8.01667C9.16018 8.14907 9.22638 8.31759 9.22638 8.52222C9.22638 8.72685 9.16018 8.89537 9.02777 9.02778C8.89536 9.16018 8.72685 9.22639 8.52222 9.22639C8.31759 9.22639 8.14907 9.16018 8.01666 9.02778L5.99444 7.00556C5.92222 6.93333 5.86805 6.8522 5.83194 6.76217C5.79583 6.67213 5.77777 6.57872 5.77777 6.48194V3.61111C5.77777 3.40648 5.84711 3.23507 5.98577 3.09689C6.12444 2.9587 6.29585 2.88937 6.5 2.88889C6.70414 2.88841 6.87579 2.95774 7.01494 3.09689C7.15409 3.23604 7.22318 3.40744 7.22222 3.61111V6.21111Z`,fill:`currentColor`})],-1),C(` Last Updated: `+d(je.value),1)]),r[19]||=T(`div`,{class:`flex flex-col items-center justify-center mb-4`},[T(`p`,{class:`text-content-muted dark:text-content-muted text-[10px] mb-1 tracking-wide uppercase opacity-70`},`Powered by`),T(`a`,{href:`https://meshcore.io`,target:`_blank`,rel:`noopener noreferrer`,title:`MeshCore`},[T(`img`,{src:`/assets/meshcore-DQNtEl5I.svg`,alt:`MeshCore`,class:`h-4 opacity-70 dark:invert-0 invert`})])],-1),T(`div`,zn,[T(`a`,Bn,[x(_e,{class:`w-5 h-5 text-white group-hover:text-indigo-500 transition-colors`})]),r[17]||=T(`a`,{href:`https://pymc.dev`,target:`_blank`,rel:`noopener noreferrer`,class:`inline-flex items-center justify-center w-9 h-9 rounded-xl bg-content-primary dark:bg-white/10 border border-stroke-subtle dark:border-stroke/20 hover:bg-primary/20 dark:hover:bg-primary/30 hover:border-primary/50 transition-all duration-300 hover:scale-110 group backdrop-blur-sm`,title:`pyMC Website`},[T(`svg`,{class:`w-5 h-5 text-white group-hover:text-primary transition-colors`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`},[T(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`1.75`,d:`M12 21a9.004 9.004 0 008.716-6M12 21a9.004 9.004 0 01-8.716-6M12 21c1.656 0 3-4.03 3-9s-1.344-9-3-9m0 18c-1.656 0-3-4.03-3-9s1.344-9 3-9m0 0a9.004 9.004 0 018.716 6M12 3a9.004 9.004 0 00-8.716 6M3.284 9h17.432M3.284 15h17.432`})])],-1),T(`a`,Vn,[x(pe,{class:`w-5 h-5 text-white group-hover:text-primary transition-colors`})]),T(`a`,Hn,[x(xe,{class:`w-5 h-5 text-white group-hover:text-yellow-500 transition-colors`})])])],2)],2),x(He,{isOpen:q.value,isLoading:ie.value,isSuccess:J.value,error:oe.value,onClose:ce,onSend:se},null,8,[`isOpen`,`isLoading`,`isSuccess`,`error`])],64))}}),[[`__scopeId`,`data-v-c4233c9b`]]);function Wn(){let e=c(null),n=c(null),r=c(null),i=c(!1),a=c({top:`0px`,right:`0px`}),o=()=>document.querySelector(`main`);function s(){if(!e.value)return;let t=e.value.getBoundingClientRect();window.innerWidth<640?a.value={top:`${t.bottom+4}px`,left:`50%`,right:`auto`,transform:`translateX(-50%)`}:a.value={top:`${t.bottom+4}px`,right:`${window.innerWidth-t.right}px`,left:`auto`,transform:`none`}}function l(){o()?.addEventListener(`scroll`,s,{passive:!0}),s(),i.value=!0}function u(){o()?.removeEventListener(`scroll`,s),i.value=!1}function d(){i.value?u():l()}function f(e){let t=e.target,i=n.value?.contains(t)??!1,a=r.value?.contains(t)??!1;!i&&!a&&u()}return t(()=>document.addEventListener(`click`,f)),O(()=>{document.removeEventListener(`click`,f),o()?.removeEventListener(`scroll`,s)}),{triggerRef:e,wrapperRef:n,panelRef:r,isOpen:i,panelStyle:a,open:l,close:u,toggle:d}}var Gn=[`aria-label`,`title`],Kn={key:0,xmlns:`http://www.w3.org/2000/svg`,class:`w-5 h-5 text-yellow-600 dark:text-yellow-400`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,"stroke-width":`2`},qn={key:1,xmlns:`http://www.w3.org/2000/svg`,class:`w-5 h-5 text-content-secondary dark:text-content`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,"stroke-width":`2`},Jn=h({__name:`ThemeToggle`,setup(e){let{theme:t,toggleTheme:n}=ae();return(e,r)=>(s(),E(`button`,{onClick:r[0]||=(...e)=>l(n)&&l(n)(...e),class:`w-[35px] h-[35px] rounded bg-background-mute dark:bg-surface-elevated flex items-center justify-center hover:bg-stroke-subtle dark:hover:bg-stroke/30 transition-colors`,"aria-label":l(t)===`dark`?`Switch to light mode`:`Switch to dark mode`,title:l(t)===`dark`?`Switch to light mode`:`Switch to dark mode`},[l(t)===`dark`?(s(),E(`svg`,Kn,[...r[1]||=[T(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z`},null,-1)]])):(s(),E(`svg`,qn,[...r[2]||=[T(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M20.354 15.354A9 9 0 018.646 3.646 9.003 9.003 0 0012 21a9.003 9.003 0 008.354-5.646z`},null,-1)]]))],8,Gn))}}),Yn={class:`flex items-center justify-between p-6 pb-0 shrink-0`},Xn={class:`p-6 space-y-5 overflow-y-auto flex-1`},Zn={class:`grid grid-cols-2 gap-3`},Qn={class:`bg-background-mute dark:bg-background-mute rounded-xl p-3 border border-stroke-subtle dark:border-stroke/10`},$n={class:`text-sm font-mono font-medium text-content-primary dark:text-content-primary`},er={key:0,class:`flex items-center gap-1.5 mt-1`},tr={key:0,class:`flex items-start gap-3 bg-amber-50 dark:bg-amber-500/10 border border-amber-200 dark:border-amber-500/30 rounded-xl p-3`},nr={class:`text-xs text-amber-800 dark:text-amber-300`},rr={class:`font-mono font-semibold`},ir={key:1,class:`flex items-center gap-2 bg-green-50 dark:bg-surface border border-green-200 dark:border-accent-green/30 border-l-2 border-l-green-600 dark:border-l-accent-green rounded-xl p-3 text-sm text-green-800 dark:text-content-primary`},ar={key:2,class:`space-y-1`},or={class:`flex items-center gap-1`},sr={key:1,class:`text-content-muted`},cr={key:0,class:`bg-background-mute dark:bg-black/30 rounded-xl border border-stroke-subtle dark:border-stroke/10 overflow-hidden`},lr={class:`max-h-52 overflow-y-auto divide-y divide-stroke-subtle dark:divide-stroke/10`},ur=[`href`],dr={class:`font-mono text-[10px] text-content-muted shrink-0 mt-0.5 pt-px`},fr={class:`min-w-0 flex-1`},pr={class:`text-xs text-content-primary truncate group-hover:text-primary transition-colors`},mr={class:`text-[10px] text-content-muted mt-0.5`},hr={class:`space-y-2`},gr={class:`flex gap-2`},_r=[`disabled`],vr=[`value`],yr=[`disabled`],br={key:0,class:`text-xs text-accent-green`},xr={key:1,class:`text-xs text-accent-red`},Sr={key:3,class:`space-y-2`},Cr={class:`flex items-center justify-between`},wr={key:0,class:`flex items-center gap-1 text-xs text-primary`},Tr={key:1,class:`flex items-center gap-1 text-xs text-primary`},Er={key:2,class:`flex items-center gap-1 text-xs text-yellow-500`},Dr={key:3,class:`text-xs text-accent-green font-medium`},Or={key:4,class:`text-xs text-accent-red font-medium`},kr={key:0,class:`w-2 h-4 bg-green-400 animate-pulse inline-block ml-1`},Ar={key:1,class:`flex items-center gap-2 mt-2 text-primary`},jr={key:2,class:`flex items-center gap-2 mt-2 text-yellow-400`},Mr={key:3,class:`text-content-muted animate-pulse`},Nr={key:0,class:`text-xs text-accent-red`},Pr={key:4,class:`flex items-center gap-3 bg-primary/5 dark:bg-primary/10 border border-primary/20 rounded-xl p-3 text-sm text-primary`},Fr={key:5},Ir={class:`flex items-center gap-3 bg-yellow-50 dark:bg-yellow-500/10 border border-yellow-200 dark:border-yellow-500/30 rounded-xl p-3 text-sm text-yellow-800 dark:text-yellow-400`},Lr={class:`font-medium`},Rr={class:`text-xs opacity-70 mt-0.5`},zr={key:6,class:`bg-green-50 dark:bg-surface-elevated border border-green-200 dark:border-accent-green/40 rounded-xl p-4`},Br={class:`flex items-center gap-3`},Vr={class:`text-xs text-content-muted mt-0.5`},Hr={class:`font-mono font-semibold`},Ur={key:7,class:`bg-red-50 dark:bg-accent-red/10 border border-accent-red/40 rounded-xl p-4 space-y-3`},Wr={class:`flex items-center gap-3`},Gr={class:`flex-1 min-w-0`},Kr={class:`text-xs text-accent-red/80 mt-0.5`},qr={key:0,class:`grid grid-cols-2 gap-2 text-xs`},Jr={class:`bg-white/50 dark:bg-black/20 rounded-lg px-3 py-2`},Yr={class:`font-mono font-semibold text-content-primary`},Xr={class:`bg-white/50 dark:bg-black/20 rounded-lg px-3 py-2`},Zr={class:`font-mono font-semibold text-accent-red`},Qr={class:`p-6 pt-0 flex items-center gap-3 shrink-0`},$r=[`disabled`],ei={key:0,class:`flex items-center justify-center gap-2`},ti={key:1,class:`flex items-center justify-center gap-2`},ni={key:2},ri=h({__name:`UpdateModal`,props:{show:{type:Boolean},currentVersion:{default:``},latestVersion:{default:``},hasUpdate:{type:Boolean,default:!1},rateLimitUntil:{default:null}},emits:[`close`,`installed`,`version-updated`],setup(e,{emit:t}){let r=e,i=t,a=c(r.currentVersion),l=c(r.latestVersion),u=c(r.hasUpdate);v(()=>r.currentVersion,e=>{a.value=e}),v(()=>r.latestVersion,e=>{l.value=e}),v(()=>r.hasUpdate,e=>{u.value=e});let p=c([`main`]),m=c(`main`),h=c(``),y=c(``),D=c(!1),k=c(!1),A=c([]),N=c(!1),P=c(!0),F=c(`idle`),I=c(null),L=c([]),R=c(null),z=c(!1),B=c(null),V=c(null),H=null,te=c(!1),W=null,ne=S(()=>F.value===`idle`||F.value===`error`||F.value===`verify-failed`),re=S(()=>{switch(F.value){case`installing`:return`Installing…`;case`restarting`:return`Restarting…`;case`verified`:return`Installed ✓`;case`verify-failed`:return`Retry Install`;case`complete`:return`Installed ✓`;case`error`:return`Retry Install`;default:return u.value?`Install Update`:`Force Reinstall`}});function ie(){R.value&&(R.value.scrollTop=R.value.scrollHeight)}function G(e){L.value.push(e),L.value.length>500&&L.value.splice(0,L.value.length-500),setTimeout(ie,20)}function K(){H&&=(H.close(),null)}async function q(){N.value=!0,A.value=[];try{let e=await U.get(`/update/changelog`);e.success&&Array.isArray(e.commits)&&(A.value=e.commits)}catch{}finally{N.value=!1}}async function ae(){D.value=!0,y.value=``;try{let e=await U.get(`/update/channels`);e.success&&Array.isArray(e.channels)&&(p.value=e.channels,m.value=e.current_channel??`main`)}catch{p.value=[`main`],y.value=`Could not load channels from GitHub`}finally{D.value=!1}}async function oe(){if(m.value){h.value=``,y.value=``;try{let e=await U.post(`/update/set_channel`,{channel:m.value});if(!e.success){y.value=e.error??`Failed to set channel`;return}h.value=`Switched to '${m.value}' — checking version…`,F.value=`idle`,I.value=null,L.value=[],k.value=!0,l.value=``,u.value=!1;try{await U.post(`/update/check`);for(let e=0;e<24;e++){let e=await U.get(`/update/status`);if(e.success&&e.state!==`checking`){a.value=e.current_version??a.value,l.value=e.latest_version??``,u.value=!!e.has_update,h.value=`Switched to '${m.value}'`,i(`version-updated`,{currentVersion:a.value,latestVersion:l.value,hasUpdate:u.value}),q();break}await new Promise(e=>setTimeout(e,500))}}catch{h.value=`Switched to '${m.value}' (version check failed)`}finally{k.value=!1}}catch(e){y.value=e?.message??`Failed to set channel`}}}async function se(){if(!ne.value)return;F.value=`installing`,I.value=null,L.value=[];try{let e=await U.post(`/update/install`,{force:!u.value});if(!e.success){F.value=`error`,I.value=e.error??`Failed to start install`;return}}catch(e){F.value=`error`,I.value=e?.message??`Network error`;return}K();let e=ee(),t=e?`/api/update/progress?token=${encodeURIComponent(e)}`:`/api/update/progress`;H=new EventSource(t),H.onmessage=e=>{try{let t=JSON.parse(e.data);switch(t.type){case`line`:{let e=t.line??``;G(e),e.includes(`Restarting service`)&&(te.value=!0,W||=setTimeout(()=>{W=null,(F.value===`installing`||F.value===`complete`)&&(K(),F.value=`restarting`,G(`[pyMC updater] Service is restarting — waiting for it to come back…`),ce())},8e3));break}case`status`:t.state===`error`?F.value=`error`:t.state===`complete`&&(te.value=!0,F.value=`complete`);break;case`done`:K(),W&&=(clearTimeout(W),null),t.state===`complete`?(F.value=`restarting`,ce()):(F.value=`error`,t.error&&(I.value=t.error));break}}catch{}},H.onerror=()=>{if(K(),W&&=(clearTimeout(W),null),te.value&&F.value!==`error`){F.value=`restarting`,G(`[pyMC updater] Connection lost — waiting for service restart…`),ce();return}F.value===`installing`&&(F.value=`error`,I.value=`Progress stream disconnected`)}}async function ce(){let e=l.value;V.value=`going-down`;let t=Date.now()+2e4,n=!1;for(;Date.now()<t;){await new Promise(e=>setTimeout(e,1e3));try{await U.get(`/update/status`)}catch{n=!0;break}}n||G(`[pyMC updater] Service did not appear to stop — assuming fast restart`),V.value=`coming-up`;let r=Date.now()+6e4;for(;Date.now()<r;){await new Promise(e=>setTimeout(e,2e3));try{let t=await U.get(`/update/status`);if(!t?.success)continue;V.value=`verifying`,await new Promise(e=>setTimeout(e,1200));let n=t.current_version??``;B.value=n,a.value=n||a.value,i(`version-updated`,{currentVersion:a.value,latestVersion:l.value,hasUpdate:!!t.has_update}),n&&e&&n===e?(F.value=`verified`,u.value=!1,V.value=null,i(`installed`)):(F.value=`verify-failed`,V.value=null);return}catch{}}F.value=`verify-failed`,V.value=null,I.value=`Service did not respond after restart — check logs`}v(()=>r.show,e=>{e?(F.value=`idle`,I.value=null,L.value=[],z.value=!1,B.value=null,V.value=null,te.value=!1,W&&=(clearTimeout(W),null),h.value=``,y.value=``,a.value=r.currentVersion,l.value=r.latestVersion,u.value=r.hasUpdate,ae(),q()):K()}),O(()=>{K(),W&&=(clearTimeout(W),null)});function le(e){e.target===e.currentTarget&&F.value!==`installing`&&F.value!==`restarting`&&F.value!==`verified`&&i(`close`)}function ue(){window.location.reload()}return(e,t)=>(s(),f(_,{to:`body`},[r.show?(s(),E(`div`,{key:0,class:`modal-backdrop`,onClick:le},[T(`div`,{class:`bg-white dark:bg-surface-elevated rounded-[20px] w-full max-w-lg border border-stroke-subtle dark:border-white/10 shadow-2xl flex flex-col max-h-[90vh]`,onClick:t[5]||=M(()=>{},[`stop`])},[T(`div`,Yn,[t[7]||=T(`div`,{class:`flex items-center gap-3`},[T(`div`,{class:`w-10 h-10 rounded-xl bg-primary/10 flex items-center justify-center`},[T(`svg`,{class:`w-5 h-5 text-primary`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`},[T(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12`})])]),T(`div`,null,[T(`h3`,{class:`text-lg font-semibold text-content-primary dark:text-content-primary`},` OTA Update `),T(`p`,{class:`text-xs text-content-muted dark:text-content-muted`},` Update over the air from GitHub `)])],-1),F.value!==`installing`&&F.value!==`restarting`&&F.value!==`verified`?(s(),E(`button`,{key:0,onClick:t[0]||=e=>i(`close`),class:`text-content-secondary hover:text-content-primary transition-colors`},[...t[6]||=[T(`svg`,{class:`w-6 h-6`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`},[T(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M6 18L18 6M6 6l12 12`})],-1)]])):b(``,!0)]),T(`div`,Xn,[T(`div`,Zn,[T(`div`,Qn,[t[8]||=T(`p`,{class:`text-xs text-content-muted mb-1`},`Installed`,-1),T(`p`,$n,d(a.value||`—`),1)]),T(`div`,{class:g([`bg-background-mute dark:bg-background-mute rounded-xl p-3 border border-stroke-subtle dark:border-stroke/10`,u.value?`border-l-2 border-l-accent-red`:`border-l-2 border-l-accent-green`])},[t[10]||=T(`p`,{class:`text-xs text-content-muted mb-1`},`On GitHub`,-1),k.value?(s(),E(`div`,er,[x(J,{size:`xs`,class:`inline-block`}),t[9]||=T(`span`,{class:`text-xs text-content-muted`},`Checking…`,-1)])):(s(),E(`p`,{key:1,class:g([`text-sm font-mono font-medium`,u.value?`text-accent-red`:`text-accent-green`])},d(l.value||`—`),3))],2)]),r.rateLimitUntil?(s(),E(`div`,tr,[t[14]||=T(`svg`,{class:`w-4 h-4 shrink-0 mt-0.5 text-amber-600 dark:text-amber-400`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`},[T(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M12 9v2m0 4h.01M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z`})],-1),T(`div`,nr,[t[13]||=T(`p`,{class:`font-semibold mb-0.5`},`GitHub API rate limit reached`,-1),T(`p`,null,[t[11]||=C(` Version checks are paused until `,-1),T(`span`,rr,d(new Date(r.rateLimitUntil).toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`})),1),t[12]||=C(`. This is a GitHub limit, not a software issue. You can still install or switch channels manually. `,-1)])])])):b(``,!0),!u.value&&a.value&&!k.value?(s(),E(`div`,ir,[...t[15]||=[T(`svg`,{class:`w-4 h-4 shrink-0`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`},[T(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M5 13l4 4L19 7`})],-1),C(` You are up to date. Use `,-1),T(`em`,{class:`mx-1`},`Force Reinstall`,-1),C(` to reinstall anyway. `,-1)]])):b(``,!0),A.value.length>0||N.value?(s(),E(`div`,ar,[T(`button`,{onClick:t[1]||=e=>P.value=!P.value,class:`flex items-center justify-between w-full text-xs font-medium text-content-secondary dark:text-content-secondary uppercase tracking-wide py-1 hover:text-content-primary transition-colors`},[t[17]||=T(`span`,null,`What's New`,-1),T(`span`,or,[N.value?(s(),f(J,{key:0,size:`xs`,class:`inline-block`})):(s(),E(`span`,sr,d(A.value.length)+` commit`+d(A.value.length===1?``:`s`),1)),(s(),E(`svg`,{class:g([`w-3.5 h-3.5 text-content-muted transition-transform`,P.value?`rotate-180`:``]),viewBox:`0 0 20 20`,fill:`currentColor`},[...t[16]||=[T(`path`,{"fill-rule":`evenodd`,d:`M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z`,"clip-rule":`evenodd`},null,-1)]],2))])]),P.value?(s(),E(`div`,cr,[T(`div`,lr,[(s(!0),E(w,null,n(A.value,e=>(s(),E(`a`,{key:e.sha,href:e.url,target:`_blank`,class:`flex gap-3 px-3 py-2.5 hover:bg-background-soft dark:hover:bg-surface/50 transition-colors group`},[T(`span`,dr,d(e.short_sha),1),T(`div`,fr,[T(`p`,pr,d(e.title),1),T(`p`,mr,d(e.author)+` · `+d(e.date?new Date(e.date).toLocaleDateString():``),1)]),t[18]||=T(`svg`,{class:`w-3 h-3 text-content-muted shrink-0 mt-1 opacity-0 group-hover:opacity-100 transition-opacity`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`},[T(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14`})],-1)],8,ur))),128))])])):b(``,!0)])):b(``,!0),T(`div`,hr,[t[19]||=T(`label`,{class:`text-xs font-medium text-content-secondary dark:text-content-secondary uppercase tracking-wide`},` Release Channel `,-1),T(`div`,gr,[o(T(`select`,{"onUpdate:modelValue":t[2]||=e=>m.value=e,disabled:D.value||F.value===`installing`||F.value===`verified`||k.value,class:`flex-1 bg-background-mute dark:bg-surface border border-stroke-subtle dark:border-stroke/20 rounded-xl px-3 py-2 text-sm text-content-primary dark:text-content-primary disabled:opacity-50 focus:outline-none focus:ring-1 focus:ring-primary`},[(s(!0),E(w,null,n(p.value,e=>(s(),E(`option`,{key:e,value:e},d(e),9,vr))),128))],8,_r),[[j,m.value]]),T(`button`,{onClick:oe,disabled:D.value||F.value===`installing`||F.value===`verified`||k.value,class:`px-4 py-2 bg-primary/10 hover:bg-primary/20 text-primary rounded-xl text-sm font-medium disabled:opacity-50 transition-colors`},d(D.value||k.value?`…`:`Apply`),9,yr)]),h.value?(s(),E(`p`,br,d(h.value),1)):b(``,!0),y.value?(s(),E(`p`,xr,d(y.value),1)):b(``,!0),t[20]||=T(`p`,{class:`text-xs text-content-muted`},[T(`em`,null,`main`),C(` = stable releases \xA0|\xA0 `),T(`em`,null,`dev`),C(` = latest commits (may be unstable) `)],-1)]),F.value===`installing`||F.value===`restarting`||L.value.length>0&&(z.value||F.value===`error`)?(s(),E(`div`,Sr,[T(`div`,Cr,[t[24]||=T(`label`,{class:`text-xs font-medium text-content-secondary uppercase tracking-wide`},`Install Log`,-1),F.value===`installing`?(s(),E(`span`,wr,[...t[21]||=[T(`span`,{class:`inline-block w-2 h-2 rounded-full bg-primary animate-pulse`},null,-1),C(` Running… `,-1)]])):F.value===`restarting`&&V.value===`verifying`?(s(),E(`span`,Tr,[...t[22]||=[T(`span`,{class:`inline-block w-2 h-2 rounded-full bg-primary animate-pulse`},null,-1),C(` Checking version… `,-1)]])):F.value===`restarting`?(s(),E(`span`,Er,[t[23]||=T(`span`,{class:`inline-block w-2 h-2 rounded-full bg-yellow-500 animate-pulse`},null,-1),C(` `+d(V.value===`going-down`?`Stopping service…`:`Waiting for service…`),1)])):F.value===`verified`?(s(),E(`span`,Dr,`Complete ✓`)):F.value===`verify-failed`||F.value===`error`?(s(),E(`span`,Or,`Failed ✗`)):b(``,!0)]),T(`div`,{ref_key:`logContainer`,ref:R,class:`bg-zinc-900 dark:bg-black/60 rounded-xl p-3 h-52 overflow-y-auto font-mono text-xs text-green-400 leading-relaxed border border-stroke/20`},[(s(!0),E(w,null,n(L.value,(e,t)=>(s(),E(`div`,{key:t,class:g([`whitespace-pre-wrap break-all`,{"text-accent-red":e.includes(`✗`)||e.includes(`error`)||e.includes(`ERROR`)||e.includes(`Failed`),"text-yellow-400":e.includes(`WARNING`)||e.includes(`⚠`),"text-accent-green":e.includes(`✓`)||e.includes(`Successfully`),"text-content-muted/60":e.includes(`keepalive`)}])},d(e),3))),128)),F.value===`installing`?(s(),E(`div`,kr)):b(``,!0),F.value===`restarting`&&V.value===`verifying`?(s(),E(`div`,Ar,[x(J,{size:`xs`,class:`inline-block`}),t[25]||=C(` Service is back — verifying version… `,-1)])):F.value===`restarting`?(s(),E(`div`,jr,[x(J,{size:`xs`,class:`inline-block`}),C(` `+d(V.value===`going-down`?`Waiting for service to stop…`:`Waiting for service to come back up…`),1)])):b(``,!0),L.value.length===0&&F.value===`installing`?(s(),E(`div`,Mr,` Waiting for output… `)):b(``,!0)],512),I.value?(s(),E(`p`,Nr,d(I.value),1)):b(``,!0)])):b(``,!0),F.value===`restarting`&&V.value===`verifying`?(s(),E(`div`,Pr,[x(J,{size:`sm`,class:`shrink-0`}),t[26]||=T(`div`,null,[T(`p`,{class:`font-medium`},`Checking version…`),T(`p`,{class:`text-xs opacity-70 mt-0.5`},` Confirming the installed version matches the target `)],-1)])):F.value===`restarting`&&L.value.length===0?(s(),E(`div`,Fr,[T(`div`,Ir,[x(J,{size:`sm`,class:`shrink-0`}),T(`div`,null,[T(`p`,Lr,d(V.value===`going-down`?`Stopping service…`:`Starting service…`),1),T(`p`,Rr,d(V.value===`going-down`?`Waiting for the old process to exit`:`Waiting for the service to become healthy`),1)])])])):b(``,!0),F.value===`verified`?(s(),E(`div`,zr,[T(`div`,Br,[t[29]||=T(`div`,{class:`w-9 h-9 rounded-full bg-accent-green flex items-center justify-center shrink-0`},[T(`svg`,{class:`w-5 h-5 text-white`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`},[T(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2.5`,d:`M5 13l4 4L19 7`})])],-1),T(`div`,null,[t[28]||=T(`p`,{class:`font-semibold text-content-primary`},` Installed successfully! `,-1),T(`p`,Vr,[t[27]||=C(` Running version `,-1),T(`span`,Hr,d(B.value),1)])])]),T(`button`,{onClick:ue,class:`modal-btn-primary w-full mt-3 text-sm font-semibold`},` Refresh Page to Load New Version `)])):b(``,!0),F.value===`verify-failed`?(s(),E(`div`,Ur,[T(`div`,Wr,[t[31]||=T(`div`,{class:`w-9 h-9 rounded-full bg-accent-red/15 flex items-center justify-center shrink-0`},[T(`svg`,{class:`w-5 h-5 text-accent-red`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`},[T(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2.5`,d:`M6 18L18 6M6 6l12 12`})])],-1),T(`div`,Gr,[t[30]||=T(`p`,{class:`font-semibold text-accent-red`},`Installation may have failed`,-1),T(`p`,Kr,d(I.value||`Version mismatch after restart`),1)])]),B.value||l.value?(s(),E(`div`,qr,[T(`div`,Jr,[t[32]||=T(`p`,{class:`text-content-muted mb-0.5`},`Expected`,-1),T(`p`,Yr,d(l.value||`—`),1)]),T(`div`,Xr,[t[33]||=T(`p`,{class:`text-content-muted mb-0.5`},`Reported`,-1),T(`p`,Zr,d(B.value||`unknown`),1)])])):b(``,!0),L.value.length>0?(s(),E(`button`,{key:1,onClick:t[3]||=e=>z.value=!z.value,class:`w-full text-xs text-accent-red/70 hover:text-accent-red underline underline-offset-2 hover:no-underline transition-all`},d(z.value?`Hide install log`:`View install log`),1)):b(``,!0)])):b(``,!0)]),T(`div`,Qr,[T(`button`,{onClick:se,disabled:!ne.value,class:g([`flex-1 py-3 rounded-xl font-semibold text-sm transition-colors disabled:opacity-50 disabled:cursor-not-allowed`,F.value===`verified`||F.value===`complete`?`bg-accent-green/20 text-accent-green border border-accent-green/50 cursor-default`:F.value===`error`||F.value===`verify-failed`?`bg-accent-red/20 hover:bg-accent-red/30 text-accent-red border border-accent-red/50`:F.value===`restarting`?`bg-yellow-500/20 text-yellow-600 cursor-default`:`bg-primary/20 hover:bg-primary/30 text-primary border border-primary/50`])},[F.value===`installing`?(s(),E(`span`,ei,[x(J,{size:`sm`,color:`white`}),t[34]||=C(` Installing… `,-1)])):F.value===`restarting`?(s(),E(`span`,ti,[x(J,{size:`sm`}),t[35]||=C(` Restarting service… `,-1)])):(s(),E(`span`,ni,d(re.value),1))],10,$r),F.value!==`installing`&&F.value!==`restarting`&&F.value!==`verified`?(s(),E(`button`,{key:0,onClick:t[4]||=e=>i(`close`),class:`px-6 py-3 rounded-xl border border-stroke-subtle dark:border-stroke/20 text-content-secondary hover:text-content-primary hover:bg-background-mute transition-colors text-sm`},` Close `)):b(``,!0)])])])):b(``,!0)]))}}),ii={class:`modal-card max-w-md shadow-xl`},ai={key:0,class:`flex flex-col items-center gap-5 py-2`},oi={key:1,class:`flex flex-col items-center gap-5 py-2`},si={class:`flex items-start gap-3 mb-4`},ci={class:`mt-1 text-sm text-content-secondary dark:text-content-muted`},li={class:`flex items-start gap-3 mb-4`},ui={class:`text-base font-semibold text-content-primary dark:text-content-primary`},di={class:`mt-1 text-sm text-content-secondary dark:text-content-muted`},fi={class:`flex items-start gap-2`},pi={key:0,class:`w-5 h-5 text-emerald-600 dark:text-emerald-400 mt-0.5`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`},mi={key:1,class:`w-5 h-5 text-amber-600 dark:text-amber-400 mt-0.5`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`},hi={key:2,class:`w-5 h-5 text-red-600 dark:text-red-400 mt-0.5`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`},gi={class:`min-w-0`},_i={class:`text-sm font-semibold text-content-primary dark:text-content-primary`},vi={class:`text-xs text-content-secondary dark:text-content-muted mt-1`},yi={key:0,class:`mt-3 max-h-44 overflow-auto rounded border border-red-200/70 dark:border-red-800/60 bg-white/60 dark:bg-black/10`},bi={class:`text-xs divide-y divide-red-100/70 dark:divide-red-800/40`},xi={class:`font-semibold text-red-700 dark:text-red-300`},Si={class:`text-red-700/90 dark:text-red-200`},Ci={key:1,class:`mt-3 max-h-32 overflow-auto rounded border border-amber-200/70 dark:border-amber-800/60 bg-white/60 dark:bg-black/10`},wi={class:`text-xs divide-y divide-amber-100/70 dark:divide-amber-800/40`},Ti={class:`font-semibold text-amber-700 dark:text-amber-300`},Ei={class:`text-amber-700/90 dark:text-amber-200`},Di={class:`modal-actions`},Oi=[`disabled`],ki=h({__name:`RestartModal`,props:{modelValue:{type:Boolean},message:{},title:{default:`Service Restart Required`},startImmediately:{type:Boolean,default:!1}},emits:[`update:modelValue`],setup(e,{emit:t}){let r=e,i=t,o=c(!1),l=c(!1),u=c(!1),p=c(``),m=c(!1),h=c(!1),y=c(``),S=c([]),C=c([]),D=c(!1),O=null,A=0,j=0;function N(){l.value=!1,m.value=!1,h.value=!1,y.value=``,S.value=[],C.value=[],D.value=!1}function P(){(o.value||l.value)&&!u.value||(o.value=!1,l.value=!1,u.value=!1,p.value=``,N(),O&&=(clearTimeout(O),null),A=0,j=0,i(`update:modelValue`,!1))}async function I(){l.value=!0,m.value=!1,h.value=!1,y.value=``,S.value=[],C.value=[],D.value=!1;try{let e=(await U.get(`/validate_config`)).data||{},t=Array.isArray(e.errors)?e.errors:[],n=Array.isArray(e.warnings)?e.warnings:[],r=e.blocked_restart===!0,i=e.valid===!0&&!r&&t.length===0;return S.value=t,C.value=n,h.value=i,m.value=!0,i?(n.length>0?(y.value=e.message||`Configuration is valid but has warnings. Review them before continuing.`,D.value=!0):y.value=e.message||`Configuration preflight passed.`,!0):(y.value=e.message||(t.length>0?`Configuration preflight failed. Fix the errors below before restarting.`:`Configuration preflight blocked restart.`),!1)}catch(e){let t=e;if(t.response){let e=t.response.status,n=t.response.data?.error||t.response.data?.message;e===403||e===401?p.value=`Permission denied. Config preflight could not be completed.`:p.value=n?`Config preflight failed: ${n}`:`Config preflight failed (HTTP ${e}).`}else p.value=`Config preflight failed due to a network or server error.`;return u.value=!0,!1}finally{l.value=!1}}async function L(){if(u.value=!1,p.value=``,h.value&&D.value)D.value=!1;else if(!await I()||D.value)return;o.value=!0;try{let e=await U.post(`/restart_service`,{});if(!e.success){o.value=!1,u.value=!0,p.value=e.error||`Restart failed.`;return}}catch(e){let t=e;if(t.response){o.value=!1,u.value=!0;let e=t.response.status,n=t.response.data?.error||t.response.data?.message;e===403||e===401?p.value=`Permission denied. The service could not be restarted. Check polkit configuration.`:p.value=n?`Restart failed: ${n}`:`Restart failed (HTTP ${e}).`;return}}A=0,j=0,O=setTimeout(z,ce)}function R(){o.value=!0,l.value=!1,u.value=!1,A=0,j=0,O=setTimeout(z,ce)}function z(){A++,fetch(oe,{method:`GET`}).then(e=>{e.ok?(j++,j>=5?window.location.reload():O=setTimeout(z,se)):(j=0,B())}).catch(()=>{j=0,B()})}function B(){A<50?O=setTimeout(z,se):(o.value=!1,u.value=!0)}return v(()=>r.modelValue,e=>{e?r.startImmediately&&R():(o.value=!1,l.value=!1,u.value=!1,p.value=``,N(),O&&=(clearTimeout(O),null),A=0,j=0)}),k(()=>{O&&clearTimeout(O)}),(t,r)=>(s(),f(_,{to:`body`},[x(F,{"enter-active-class":`transition-opacity duration-200`,"enter-from-class":`opacity-0`,"leave-active-class":`transition-opacity duration-200`,"leave-to-class":`opacity-0`},{default:a(()=>[e.modelValue?(s(),E(`div`,{key:0,class:`fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm`,onClick:M(P,[`self`])},[T(`div`,ii,[o.value?(s(),E(`div`,ai,[x(J,{size:`lg`}),r[0]||=T(`div`,{class:`text-center`},[T(`h3`,{class:`text-base font-semibold text-content-primary dark:text-content-primary`},` Restarting… `),T(`p`,{class:`mt-1 text-sm text-content-secondary dark:text-content-muted`},` Please wait while the service restarts. This may take up to a minute. `)],-1)])):l.value?(s(),E(`div`,oi,[x(J,{size:`lg`}),r[1]||=T(`div`,{class:`text-center`},[T(`h3`,{class:`text-base font-semibold text-content-primary dark:text-content-primary`},` Validating Configuration… `),T(`p`,{class:`mt-1 text-sm text-content-secondary dark:text-content-muted`},` Running preflight checks on config.yaml before restarting. `)],-1)])):u.value?(s(),E(w,{key:2},[T(`div`,si,[r[3]||=T(`div`,{class:`shrink-0 w-10 h-10 rounded-full bg-red-100 dark:bg-red-900/30 flex items-center justify-center`},[T(`svg`,{class:`w-5 h-5 text-red-600 dark:text-red-400`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`},[T(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M12 9v2m0 4h.01M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z`})])],-1),T(`div`,null,[r[2]||=T(`h3`,{class:`text-base font-semibold text-content-primary dark:text-content-primary`},` Service Did Not Restart `,-1),T(`p`,ci,d(p.value||`The service did not respond after 60 seconds. Please log into the device and check the system logs.`),1)])]),T(`div`,{class:`modal-actions`},[T(`button`,{onClick:P,class:`modal-btn-cancel`},`Dismiss`)])],64)):(s(),E(w,{key:3},[T(`div`,li,[r[4]||=T(`div`,{class:`shrink-0 w-10 h-10 rounded-full bg-amber-100 dark:bg-amber-900/30 flex items-center justify-center`},[T(`svg`,{class:`w-5 h-5 text-amber-600 dark:text-amber-400`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`},[T(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M12 9v2m0 4h.01M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z`})])],-1),T(`div`,null,[T(`h3`,ui,d(e.title),1),T(`p`,di,d(e.message),1)])]),m.value?(s(),E(`div`,{key:0,class:g([`mb-4 rounded-lg border px-3 py-3`,h.value?C.value.length?`border-amber-300/80 bg-amber-50 dark:bg-amber-900/20 dark:border-amber-700/60`:`border-emerald-300/80 bg-emerald-50 dark:bg-emerald-900/20 dark:border-emerald-700/60`:`border-red-300/80 bg-red-50 dark:bg-red-900/20 dark:border-red-700/60`])},[T(`div`,fi,[h.value&&!C.value.length?(s(),E(`svg`,pi,[...r[5]||=[T(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M5 13l4 4L19 7`},null,-1)]])):h.value&&C.value.length?(s(),E(`svg`,mi,[...r[6]||=[T(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M12 9v2m0 4h.01M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z`},null,-1)]])):(s(),E(`svg`,hi,[...r[7]||=[T(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M12 9v2m0 4h.01M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z`},null,-1)]])),T(`div`,gi,[T(`h4`,_i,d(h.value?C.value.length?`Preflight Warning`:`Preflight Passed`:`Preflight Failed`),1),T(`p`,vi,d(y.value),1)])]),!h.value&&S.value.length?(s(),E(`div`,yi,[T(`ul`,bi,[(s(!0),E(w,null,n(S.value,(e,t)=>(s(),E(`li`,{key:`err-${t}-${e.path}-${e.message}`,class:`px-2 py-2`},[T(`p`,xi,d(e.path||`config`),1),T(`p`,Si,d(e.message),1)]))),128))])])):b(``,!0),C.value.length?(s(),E(`div`,Ci,[T(`ul`,wi,[(s(!0),E(w,null,n(C.value,(e,t)=>(s(),E(`li`,{key:`warn-${t}-${e.path}-${e.message}`,class:`px-2 py-2`},[T(`p`,Ti,d(e.path||`config`),1),T(`p`,Ei,d(e.message),1)]))),128))])])):b(``,!0)],2)):b(``,!0),T(`div`,Di,[T(`button`,{onClick:P,class:`modal-btn-cancel`},`Cancel`),T(`button`,{onClick:L,class:`modal-btn-primary`,disabled:l.value||o.value},d(D.value?`Restart Anyway`:h.value?`Restart`:`Validate & Restart`),9,Oi)])],64))])])):b(``,!0)]),_:1})]))}}),Ai={class:`modal-card max-w-md shadow-xl`},ji={class:`text-content-secondary dark:text-content-muted text-sm mb-6`},Mi={key:0,class:`bg-accent-red/10 border border-accent-red/30 rounded-lg p-3`},Ni={class:`text-accent-red text-sm`},Pi={key:1,class:`bg-accent-green/10 border border-accent-green/30 rounded-lg p-3`},Fi={class:`text-accent-green text-sm`},Ii={class:`flex justify-end gap-3 mt-6`},Li=[`disabled`],Ri=[`disabled`],zi=h({name:`ChangePasswordModal`,__name:`ChangePasswordModal`,props:{isOpen:{type:Boolean},canSkip:{type:Boolean,default:!0}},emits:[`close`,`success`],setup(e,{emit:t}){let n=t,r=c(``),i=c(``),a=c(``),l=c(!1),u=c(``),p=c(``),m=()=>{l.value||n(`close`)},h=()=>{n(`close`)},g=async()=>{if(u.value=``,p.value=``,i.value.length<8){u.value=`New password must be at least 8 characters long`;return}if(i.value!==a.value){u.value=`Passwords do not match`;return}if(i.value===r.value){u.value=`New password must be different from current password`;return}l.value=!0;try{let e=(await V.post(`/auth/change_password`,{current_password:r.value,new_password:i.value})).data;e&&e.success?(p.value=e.message||`Password changed successfully!`,setTimeout(()=>{n(`success`),n(`close`)},1500)):u.value=e?.error||`Failed to change password`}catch(e){console.error(`Password change error:`,e),u.value=e.response?.data?.error||`Failed to change password. Please try again.`}finally{l.value=!1}};return(t,n)=>(s(),f(_,{to:`body`},[e.isOpen?(s(),E(`div`,{key:0,class:`fixed inset-0 z-50 flex items-center justify-center p-4 bg-black/60 backdrop-blur-sm`,onClick:M(m,[`self`])},[T(`div`,Ai,[n[6]||=T(`h3`,{class:`text-xl font-semibold text-content-primary dark:text-content-primary mb-2`},` Change Password `,-1),T(`p`,ji,d(e.canSkip?`You're using the default password. Please change it to secure your account.`:`Enter your current password and choose a new one.`),1),T(`form`,{onSubmit:M(g,[`prevent`]),class:`space-y-4`},[T(`div`,null,[n[3]||=T(`label`,{class:`block text-sm font-medium text-content-secondary dark:text-content-primary/70 mb-2`},`Current Password`,-1),o(T(`input`,{"onUpdate:modelValue":n[0]||=e=>r.value=e,type:`password`,required:``,class:`modal-input`,placeholder:`Enter current password`},null,512),[[P,r.value]])]),T(`div`,null,[n[4]||=T(`label`,{class:`block text-sm font-medium text-content-secondary dark:text-content-primary/70 mb-2`},`New Password`,-1),o(T(`input`,{"onUpdate:modelValue":n[1]||=e=>i.value=e,type:`password`,required:``,minlength:`8`,class:`modal-input`,placeholder:`Enter new password (min 8 characters)`},null,512),[[P,i.value]])]),T(`div`,null,[n[5]||=T(`label`,{class:`block text-sm font-medium text-content-secondary dark:text-content-primary/70 mb-2`},`Confirm New Password`,-1),o(T(`input`,{"onUpdate:modelValue":n[2]||=e=>a.value=e,type:`password`,required:``,minlength:`8`,class:`modal-input`,placeholder:`Confirm new password`},null,512),[[P,a.value]])]),u.value?(s(),E(`div`,Mi,[T(`p`,Ni,d(u.value),1)])):b(``,!0),p.value?(s(),E(`div`,Pi,[T(`p`,Fi,d(p.value),1)])):b(``,!0),T(`div`,Ii,[T(`button`,{type:`button`,onClick:h,disabled:l.value,class:`px-4 py-2 bg-background-mute dark:bg-white/5 hover:bg-stroke-subtle dark:hover:bg-white/10 text-content-primary dark:text-content-primary rounded-lg border border-stroke-subtle dark:border-stroke/10 transition-colors disabled:opacity-50`},d(e.canSkip?`Skip for Now`:`Cancel`),9,Li),T(`button`,{type:`submit`,disabled:l.value,class:`btn-primary flex items-center gap-2`},[l.value?(s(),f(J,{key:0,size:`sm`,color:`current`})):b(``,!0),C(` `+d(l.value?`Changing...`:`Change Password`),1)],8,Ri)])],32)])])):b(``,!0)]))}});function Bi(e,t){let n=B(),r=null,i=null,a=S(()=>(t.enabled===void 0?!0:u(t.enabled))&&n.canMaintainConnections),o=async()=>i||(i=Promise.resolve(e()).finally(()=>{i=null}),i),s=()=>{r!==null&&(clearInterval(r),r=null)},c=async()=>{s(),a.value&&(t.immediate!==!1&&await o(),r=window.setInterval(()=>{o()},t.intervalMs))};return v(a,e=>{e?c():s()},{immediate:!0}),k(()=>{s()}),{start:c,stop:s,runNow:o}}var Vi={class:`glass-card p-3 sm:p-6 mb-5 rounded-[20px] relative z-10`},Hi={class:`flex justify-between items-center`},Ui={class:`flex items-center gap-3`},Wi={class:`hidden sm:block`},Gi={class:`text-content-primary dark:text-content-primary text-2xl lg:text-[35px] font-bold mb-1 sm:mb-2`},Ki={class:`flex items-center gap-3 sm:gap-4 relative`},qi={class:`text-right min-w-[120px] sm:min-w-[180px]`},Ji={key:0,class:`flex items-center gap-2 justify-end`},Yi={key:1,class:`space-y-1`},Xi={class:`text-content-secondary dark:text-content-muted text-xs sm:text-sm`},Zi={class:`text-primary font-medium`},Qi={key:0,class:`text-xs text-content-muted dark:text-content-muted/80`,style:{"min-height":`16px`}},$i={key:0},ea={key:2},ta={key:0,class:`text-xs text-content-muted dark:text-content-muted/60 hidden sm:block`,style:{"min-height":`16px`}},na={class:`flex items-center justify-between mb-3`},ra={class:`flex items-center gap-2`},ia=[`disabled`],aa=[`disabled`],oa={class:`space-y-3 text-sm`},sa={key:0,class:`bg-red-50 dark:bg-background-mute p-3 rounded-lg border border-accent-red/30 border-l-2 border-l-accent-red`},ca={class:`flex items-center justify-between`},la={class:`text-accent-red font-bold`},ua={class:`text-xs text-content-muted dark:text-content-muted mt-1`},da={class:`mt-2 flex items-center gap-2`},fa=[`disabled`],pa={key:1,class:`flex items-start gap-2 bg-amber-50 dark:bg-amber-500/10 border border-amber-200 dark:border-amber-500/30 border-l-2 border-l-amber-500 rounded-lg p-3 text-xs text-amber-800 dark:text-amber-300`},ma={key:2,class:`bg-green-50 dark:bg-background-mute p-3 rounded-lg border border-stroke-subtle dark:border-stroke/10 border-l-2 border-l-accent-green`},ha={class:`flex items-center justify-between`},ga={class:`text-accent-green font-bold`},_a={key:0,class:`text-xs text-content-muted dark:text-content-muted mt-1`},va={class:`mt-2 flex items-center gap-2`},ya=[`disabled`],ba={key:3,class:`bg-background-mute dark:bg-background-mute p-3 rounded-lg border border-stroke-subtle dark:border-stroke/10`},xa={class:`flex items-center justify-center gap-2`},Sa={key:4,class:`bg-red-50 dark:bg-background-mute p-3 rounded-lg border border-accent-red/30 border-l-2 border-l-accent-red`},Ca={class:`text-xs text-content-secondary dark:text-content-muted`},wa={class:`bg-background-mute dark:bg-background-mute p-3 rounded-lg border border-stroke-subtle dark:border-stroke/10 border-l-2 border-l-primary`},Ta={class:`flex items-center justify-between`},Ea={class:`text-primary font-bold`},Da={key:0,class:`text-xs text-content-muted dark:text-content-muted mt-1`},Oa={class:`flex items-center justify-between`},ka={class:`text-content-primary dark:text-content-primary font-medium`},Aa={key:0,class:`mt-2`},ja={class:`text-xs text-content-muted dark:text-content-muted`},Ma={class:`text-content-secondary dark:text-content-secondary`},Na={key:5,class:`bg-background-mute dark:bg-background-mute p-4 rounded-lg border border-stroke-subtle dark:border-stroke/10 text-center`},Pa={key:6,class:`bg-background-mute dark:bg-background-mute p-3 rounded-lg border border-stroke-subtle dark:border-stroke/10 text-center`},Fa={class:`flex items-center justify-center gap-2`},Ia={key:0,class:`mt-4 rounded-xl border border-amber-500/40 bg-amber-500/10 px-4 py-3 text-amber-800 dark:text-amber-200`,role:`alert`},La={class:`flex items-start gap-3`},Ra={class:`font-semibold`},za={class:`text-sm opacity-90`},Ba=Y(h({name:`TopBar`,__name:`TopBar`,emits:[`toggleMobileSidebar`],setup(e,{emit:r}){let i=r;R();let a=re(),o=G(),u=B(),h=Wn(),v=Wn(),y=c(!1),D=c(!1),O=c(!1),k=c({hasUpdate:!1,currentVersion:``,latestVersion:``,isChecking:!1,lastChecked:null,error:null,rateLimitUntil:null}),A=c(te()||`User`),j=[`Chat Node`,`Repeater`,`Room Server`],M=Object.fromEntries(Object.entries(ie).map(([e,t])=>[t,e])),N=S(()=>{let e={};for(let t of j){let n=M[t];e[t]=o.advertsByType[n]||[]}return e}),P=S(()=>o.isLoading),F=S(()=>o.lastFetched?new Date(o.lastFetched):null),I=async(e=!1)=>{if(!k.value.isChecking)try{k.value.isChecking=!0,k.value.error=null,await U.post(`/update/check`,e?{force:!0}:{});for(let e=0;e<20;e++){let e=await U.get(`/update/status`);if(e.success&&e.state!==`checking`){k.value.currentVersion=e.current_version??``,k.value.latestVersion=e.latest_version??``,k.value.hasUpdate=!!e.has_update,k.value.lastChecked=new Date,k.value.error=e.error??null,k.value.rateLimitUntil=e.rate_limit_until??null;return}await new Promise(e=>setTimeout(e,500))}k.value.error=`Version check timed out`}catch(e){console.error(`Error checking for updates:`,e),k.value.error=e instanceof Error?e.message:`Failed to check for updates`}finally{k.value.isChecking=!1}},L=()=>{h.close(),I(),a.fetchStats()},z=e=>{k.value.currentVersion=e.currentVersion,k.value.latestVersion=e.latestVersion,k.value.hasUpdate=e.hasUpdate,k.value.lastChecked=new Date},ee=()=>{u.stopSession(`logout`)},V=S(()=>Object.values(N.value).reduce((e,t)=>e+t.length,0)),H=S(()=>j.map(e=>({type:e,count:N.value[e]?.length||0})).filter(e=>e.count>0)),W=S(()=>!0),ne=S(()=>{if(String(a.stats?.radio_status??``).toLowerCase()!==`degraded`)return null;let e=a.stats?.config?.radio_type??`configured radio`,t=a.stats?.radio_error||`Radio initialization failed`;return{title:`Radio degraded (${e})`,details:t}}),K=e=>({"Chat Node":`text-blue-600 dark:text-blue-400`,Repeater:`text-accent-green`,"Room Server":`text-accent-purple`})[e]||`text-gray-400`,q=e=>{let t=N.value[e]||[];return t.length===0?`None`:t.reduce((e,t)=>t.last_seen>e.last_seen?t:e,t[0]).node_name||`Unknown Node`};t(()=>{I()}),Bi(()=>I(),{intervalMs:6e5,enabled:!0,immediate:!1});let ae=()=>{i(`toggleMobileSidebar`)};return(e,t)=>(s(),E(w,null,[T(`div`,Vi,[T(`div`,Hi,[T(`div`,Ui,[T(`button`,{onClick:ae,class:`lg:hidden topbar-icon-btn`},[...t[14]||=[T(`svg`,{class:`w-5 h-5 text-content-secondary dark:text-content-primary`,viewBox:`0 0 20 20`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},[T(`path`,{d:`M3 6h14M3 10h14M3 14h14`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`})],-1)]]),T(`div`,Wi,[T(`h1`,Gi,` Hi `+d(A.value)+`👋 `,1)])]),T(`div`,Ki,[T(`div`,qi,[P.value?(s(),E(`div`,Ji,[x(J,{size:`xs`}),t[15]||=T(`p`,{class:`text-content-secondary dark:text-content-muted text-xs sm:text-sm`},` Loading... `,-1)])):V.value>0?(s(),E(`div`,Yi,[T(`p`,Xi,[t[16]||=C(` Tracking: `,-1),T(`span`,Zi,d(V.value)+` node`+d(V.value===1?``:`s`),1)]),H.value.length>0?(s(),E(`div`,Qi,[(s(!0),E(w,null,n(H.value,(e,t)=>(s(),E(`span`,{key:e.type,class:`inline`},[C(d(e.count)+` `+d(e.type)+d(e.count===1?``:`s`),1),t<H.value.length-1?(s(),E(`span`,$i,`, `)):b(``,!0)]))),128))])):b(``,!0)])):(s(),E(`div`,ea,[t[17]||=T(`p`,{class:`text-content-secondary dark:text-content-muted text-xs sm:text-sm`},[C(` Tracking: `),T(`span`,{class:`text-content-muted`},`0 nodes`)],-1),F.value?(s(),E(`div`,ta,` Last checked `+d(F.value.toLocaleTimeString()),1)):b(``,!0)]))]),t[38]||=p(`<a href="https://github.com/rightup/pyMC_Repeater/issues/new" target="_blank" rel="noopener noreferrer" class="topbar-icon-btn hidden sm:flex" title="Report a bug" data-v-9efa903f><svg class="w-5 h-5 text-content-secondary dark:text-content-primary" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.5" xmlns="http://www.w3.org/2000/svg" data-v-9efa903f><ellipse cx="10" cy="11" rx="4" ry="6" data-v-9efa903f></ellipse><circle cx="10" cy="5.5" r="2.5" data-v-9efa903f></circle><path d="M8.5 4L7 2.5" data-v-9efa903f></path><path d="M8 3L6 1.5" data-v-9efa903f></path><path d="M11.5 4L13 2.5" data-v-9efa903f></path><path d="M12 3L14 1.5" data-v-9efa903f></path><path d="M6.5 8L4 7" data-v-9efa903f></path><path d="M6 10.5L3.5 10" data-v-9efa903f></path><path d="M6.5 13L4 14" data-v-9efa903f></path><path d="M13.5 8L16 7" data-v-9efa903f></path><path d="M14 10.5L16.5 10" data-v-9efa903f></path><path d="M13.5 13L16 14" data-v-9efa903f></path><path d="M6.5 9L13.5 9" data-v-9efa903f></path><path d="M6.5 11.5L13.5 11.5" data-v-9efa903f></path><path d="M6.5 14L13.5 14" data-v-9efa903f></path></svg></a><a href="/doc" target="_blank" rel="noopener noreferrer" class="topbar-icon-btn hidden sm:flex" title="API Documentation" data-v-9efa903f><svg class="w-5 h-5 text-content-secondary dark:text-content-primary" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.5" xmlns="http://www.w3.org/2000/svg" data-v-9efa903f><path d="M7 5L3 10L7 15" stroke-linecap="round" stroke-linejoin="round" data-v-9efa903f></path><path d="M13 5L17 10L13 15" stroke-linecap="round" stroke-linejoin="round" data-v-9efa903f></path><path d="M11 3L9 17" stroke-linecap="round" stroke-linejoin="round" data-v-9efa903f></path></svg></a>`,2),T(`div`,{ref:l(h).wrapperRef},[T(`button`,{ref:l(h).triggerRef,onClick:t[0]||=e=>l(h).toggle(),class:`topbar-icon-btn relative`},[t[18]||=T(`svg`,{class:`w-5 h-5 text-content-secondary dark:text-content-primary`,viewBox:`0 0 20 20`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},[T(`path`,{d:`M12.5 14.1667V15C12.5 16.3807 11.3807 17.5 9.99998 17.5C8.61927 17.5 7.49998 16.3807 7.49998 15V14.1667M12.5 14.1667L7.49998 14.1667M12.5 14.1667H15.8333C16.2936 14.1667 16.6666 13.7936 16.6666 13.3333V12.845C16.6666 12.624 16.5788 12.4122 16.4225 12.2559L15.9969 11.8302C15.8921 11.7255 15.8333 11.5833 15.8333 11.4351V8.33333C15.8333 8.1863 15.828 8.04045 15.817 7.89674M7.49998 14.1667L4.16665 14.1668C3.70641 14.1668 3.33331 13.7934 3.33331 13.3332V12.8451C3.33331 12.6241 3.42118 12.4124 3.57745 12.2561L4.00307 11.8299C4.10781 11.7251 4.16665 11.5835 4.16665 11.4353V8.33331C4.16665 5.11167 6.77831 2.5 9.99998 2.5C10.593 2.5 11.1653 2.58848 11.7045 2.75297M15.817 7.89674C16.8223 7.32275 17.5 6.24051 17.5 5C17.5 3.15905 16.0076 1.66666 14.1666 1.66666C13.1914 1.66666 12.3141 2.08544 11.7045 2.75297M15.817 7.89674C15.3304 8.17457 14.7671 8.33333 14.1666 8.33333C12.3257 8.33333 10.8333 6.84095 10.8333 5C10.8333 4.13425 11.1634 3.34558 11.7045 2.75297M15.817 7.89674C15.817 7.89674 15.817 7.89675 15.817 7.89674ZM11.7045 2.75297C11.7049 2.75309 11.7053 2.75321 11.7057 2.75333`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`})],-1),W.value?(s(),E(`span`,{key:0,class:g([`absolute top-2 right-2 w-2 h-2 rounded-full`,k.value.hasUpdate?`bg-accent-red animate-pulse`:k.value.isChecking?`bg-secondary animate-pulse`:k.value.currentVersion?`bg-accent-green`:`bg-content-muted/50`])},null,2)):b(``,!0)],512),(s(),f(_,{to:`body`},[l(h).isOpen.value?(s(),E(`div`,{key:0,ref:l(h).panelRef,style:m(l(h).panelStyle.value),class:`fixed z-[250] w-80 bg-surface dark:bg-surface-elevated border border-stroke-subtle dark:border-stroke/20 rounded-[15px] p-4 shadow-2xl backdrop-blur-sm overflow-y-auto max-h-[calc(100vh-4rem)]`},[T(`div`,na,[t[20]||=T(`p`,{class:`text-content-primary dark:text-content-primary font-semibold`},` System Status `,-1),T(`div`,ra,[T(`button`,{onClick:t[1]||=()=>I(),disabled:k.value.isChecking,class:`text-xs text-primary hover:text-primary/80 disabled:opacity-50`,title:`Check for updates`},d(k.value.isChecking?`Checking...`:`Check Updates`),9,ia),t[19]||=T(`span`,{class:`text-content-muted text-xs`},`•`,-1),T(`button`,{onClick:t[2]||=()=>l(o).fetchAll(),disabled:P.value,class:`text-xs text-primary hover:text-primary/80 disabled:opacity-50`},d(P.value?`Updating...`:`Refresh`),9,aa)])]),T(`div`,oa,[k.value.hasUpdate?(s(),E(`div`,sa,[T(`div`,ca,[t[21]||=T(`span`,{class:`text-content-primary dark:text-content-primary font-medium`},`Update Available`,-1),T(`span`,la,d(k.value.latestVersion),1)]),T(`div`,ua,` Current: `+d(k.value.currentVersion),1),T(`div`,da,[T(`button`,{onClick:t[3]||=e=>{y.value=!0,l(h).close()},class:`text-xs px-3 py-1.5 rounded-lg font-medium transition-colors bg-accent-red/20 hover:bg-accent-red/30 border border-accent-red/50 text-accent-red`},` Install Update `),t[22]||=T(`a`,{href:`https://github.com/rightup/pyMC_Repeater`,target:`_blank`,class:`text-xs text-content-muted hover:text-content-secondary underline`},` View on GitHub `,-1),T(`button`,{onClick:t[4]||=e=>I(!0),disabled:k.value.isChecking,class:`text-xs text-content-muted hover:text-content-secondary disabled:opacity-50 transition-colors ml-auto`},d(k.value.isChecking?`Checking…`:`Re-check`),9,fa)])])):b(``,!0),k.value.rateLimitUntil&&!k.value.isChecking?(s(),E(`div`,pa,[t[23]||=T(`svg`,{class:`w-3.5 h-3.5 shrink-0 mt-0.5`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`},[T(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M12 9v2m0 4h.01M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z`})],-1),T(`span`,null,`GitHub API rate limit reached. Version check paused until `+d(new Date(k.value.rateLimitUntil).toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`}))+`.`,1)])):k.value.currentVersion&&!k.value.isChecking?(s(),E(`div`,ma,[T(`div`,ha,[t[24]||=T(`span`,{class:`text-content-primary dark:text-content-primary font-medium`},`Up to Date`,-1),T(`span`,ga,d(k.value.currentVersion),1)]),k.value.lastChecked?(s(),E(`div`,_a,` Last checked: `+d(k.value.lastChecked.toLocaleTimeString()),1)):b(``,!0),T(`div`,va,[T(`button`,{onClick:t[5]||=e=>{y.value=!0,l(h).close()},class:`text-xs bg-primary/10 hover:bg-primary/20 text-primary px-3 py-1.5 rounded-lg font-medium transition-colors`},` Manage / Switch Branch `),T(`button`,{onClick:t[6]||=e=>I(!0),disabled:k.value.isChecking,class:`text-xs text-content-muted hover:text-content-secondary disabled:opacity-50 transition-colors`},d(k.value.isChecking?`Checking…`:`Check Now`),9,ya)])])):k.value.isChecking?(s(),E(`div`,ba,[T(`div`,xa,[x(J,{size:`sm`}),t[25]||=T(`span`,{class:`text-content-secondary dark:text-content-secondary`},`Checking for updates...`,-1)])])):k.value.error?(s(),E(`div`,Sa,[t[26]||=T(`div`,{class:`text-content-primary dark:text-content-primary font-medium mb-1`},` Update Check Failed `,-1),T(`div`,Ca,d(k.value.error),1)])):b(``,!0),t[31]||=T(`div`,{class:`border-t border-stroke-subtle dark:border-stroke/10`},null,-1),t[32]||=T(`div`,{class:`text-content-primary dark:text-content-primary font-medium text-sm mb-2`},` Mesh Network Status `,-1),T(`div`,wa,[T(`div`,Ta,[t[27]||=T(`span`,{class:`text-content-primary dark:text-content-primary font-medium`},`Total Tracked Nodes`,-1),T(`span`,Ea,d(V.value),1)]),F.value?(s(),E(`div`,Da,` Last updated: `+d(F.value.toLocaleString()),1)):b(``,!0)]),(s(!0),E(w,null,n(H.value,e=>(s(),E(`div`,{key:e.type,class:`bg-background-mute dark:bg-background-mute p-3 rounded-lg border border-stroke-subtle dark:border-stroke/10`},[T(`div`,Oa,[T(`span`,ka,d(e.type)+d(e.count===1?``:`s`),1),T(`span`,{class:g([K(e.type),`font-bold`])},d(e.count),3)]),N.value[e.type]?.length>0?(s(),E(`div`,Aa,[T(`div`,ja,[t[28]||=C(` Latest: `,-1),T(`span`,Ma,d(q(e.type)),1)])])):b(``,!0)]))),128)),V.value===0&&!P.value?(s(),E(`div`,Na,[...t[29]||=[T(`div`,{class:`text-content-secondary dark:text-content-muted`},[T(`svg`,{class:`w-8 h-8 mx-auto mb-2 opacity-50`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`},[T(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M9.172 16.172a4 4 0 015.656 0M9 12h6m-6-4h6m2 5.291A7.962 7.962 0 0112 15c-2.034 0-3.9.785-5.291 2.09M15 12a3 3 0 11-6 0 3 3 0 016 0z`})]),T(`span`,null,`No mesh nodes detected`)],-1)]])):b(``,!0),P.value?(s(),E(`div`,Pa,[T(`div`,Fa,[x(J,{size:`sm`}),t[30]||=T(`span`,{class:`text-content-secondary dark:text-content-secondary`},`Scanning mesh network...`,-1)])])):b(``,!0)])],4)):b(``,!0)]))],512),x(Jn),T(`div`,{ref:l(v).wrapperRef},[T(`button`,{ref:l(v).triggerRef,onClick:t[7]||=e=>l(v).toggle(),class:`topbar-icon-btn`,title:`User menu`},[...t[33]||=[T(`svg`,{class:`w-5 h-5 text-content-secondary dark:text-content-primary`,viewBox:`0 0 20 20`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.5`,xmlns:`http://www.w3.org/2000/svg`},[T(`path`,{d:`M13 3H15C16.1046 3 17 3.89543 17 5V15C17 16.1046 16.1046 17 15 17H13M8 7L4 10.5M4 10.5L8 14M4 10.5H13`,"stroke-linecap":`round`,"stroke-linejoin":`round`})],-1)]],512),(s(),f(_,{to:`body`},[l(v).isOpen.value?(s(),E(`div`,{key:0,ref:l(v).panelRef,style:m(l(v).panelStyle.value),class:`fixed z-[250] w-48 bg-surface dark:bg-surface-elevated border border-stroke-subtle dark:border-stroke/20 rounded-xl shadow-2xl p-1`},[T(`button`,{onClick:t[8]||=e=>{O.value=!0,l(v).close()},class:`user-menu-item w-full flex items-center gap-2.5 px-3 py-2.5 text-sm text-content-primary dark:text-content-primary rounded-lg transition-colors`},[...t[34]||=[T(`svg`,{class:`w-4 h-4 text-content-secondary`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[T(`rect`,{x:`3`,y:`11`,width:`18`,height:`11`,rx:`2`,ry:`2`}),T(`path`,{d:`M7 11V7a5 5 0 0 1 10 0v4`})],-1),T(`span`,null,`Change Password`,-1)]]),t[37]||=T(`div`,{class:`border-t border-stroke-subtle dark:border-stroke/40 my-1 mx-2`},null,-1),T(`button`,{onClick:t[9]||=e=>{D.value=!0,l(v).close()},class:`user-menu-item w-full flex items-center gap-2.5 px-3 py-2.5 text-sm text-content-primary dark:text-content-primary rounded-lg transition-colors`},[...t[35]||=[T(`svg`,{class:`w-4 h-4 text-content-secondary`,viewBox:`0 0 20 20`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.5`,xmlns:`http://www.w3.org/2000/svg`},[T(`path`,{d:`M3.5 2.5V7H8`,"stroke-linecap":`round`,"stroke-linejoin":`round`}),T(`path`,{d:`M4.5 12.5A6.5 6.5 0 1 0 5 6L3.5 7`,"stroke-linecap":`round`,"stroke-linejoin":`round`})],-1),T(`span`,null,`Restart Service`,-1)]]),T(`button`,{onClick:ee,class:`user-menu-item w-full flex items-center gap-2.5 px-3 py-2.5 text-sm text-accent-red rounded-lg transition-colors`},[...t[36]||=[T(`svg`,{class:`w-4 h-4`,viewBox:`0 0 20 20`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.5`,xmlns:`http://www.w3.org/2000/svg`},[T(`path`,{d:`M13 3H15C16.1046 3 17 3.89543 17 5V15C17 16.1046 16.1046 17 15 17H13M8 7L4 10.5M4 10.5L8 14M4 10.5H13`,"stroke-linecap":`round`,"stroke-linejoin":`round`})],-1),T(`span`,null,`Logout`,-1)]])],4)):b(``,!0)]))],512)])]),ne.value?(s(),E(`div`,Ia,[T(`div`,La,[t[39]||=T(`svg`,{class:`w-5 h-5 mt-0.5 text-amber-600 dark:text-amber-300 shrink-0`,viewBox:`0 0 20 20`,fill:`currentColor`,"aria-hidden":`true`},[T(`path`,{"fill-rule":`evenodd`,d:`M10 18a8 8 0 100-16 8 8 0 000 16zm.75-11.25a.75.75 0 00-1.5 0v4.5a.75.75 0 001.5 0v-4.5zM10 14a1 1 0 100 2 1 1 0 000-2z`,"clip-rule":`evenodd`})],-1),T(`div`,null,[T(`p`,Ra,d(ne.value.title),1),T(`p`,za,d(ne.value.details),1)])])])):b(``,!0)]),x(ki,{modelValue:D.value,"onUpdate:modelValue":t[10]||=e=>D.value=e,title:`Restart Service`,message:`The service will restart. You will be automatically returned to the dashboard when it comes back online.`},null,8,[`modelValue`]),x(zi,{"is-open":O.value,"can-skip":!1,onClose:t[11]||=e=>O.value=!1,onSuccess:t[12]||=e=>O.value=!1},null,8,[`is-open`]),x(ri,{show:y.value,"current-version":k.value.currentVersion,"latest-version":k.value.latestVersion,"has-update":k.value.hasUpdate,"rate-limit-until":k.value.rateLimitUntil,onClose:t[13]||=e=>y.value=!1,onInstalled:L,onVersionUpdated:z},null,8,[`show`,`current-version`,`latest-version`,`has-update`,`rate-limit-until`])],64))}}),[[`__scopeId`,`data-v-9efa903f`]]),Va={class:`h-screen bg-background dark:bg-background overflow-hidden relative font-sans`},Ha={class:`relative flex h-full`},Ua={class:`flex-1 p-4 lg:p-[15px] overflow-y-auto overscroll-contain h-full`},Wa=h({name:`DashboardLayout`,__name:`DashboardLayout`,setup(e){let t=c(!1),n=K(),r=S(()=>!Object.values(n.loadProgress).every(e=>e===`pending`)&&!n.isBootstrapping),i=()=>{t.value=!t.value},a=()=>{t.value=!1};return(e,n)=>{let o=y(`router-view`);return s(),E(`div`,Va,[n[0]||=p(`<div class="hidden lg:block dark:hidden absolute rounded-full -rotate-[24.22deg] w-[705px] h-[512px] bg-gradient-to-b from-blue-200/30 to-blue-100/20 blur-[120px] opacity-70 -top-[79px] left-[575px] mix-blend-normal pointer-events-none"></div><div class="hidden lg:block dark:hidden absolute rounded-full -rotate-[24.22deg] w-[705px] h-[512px] bg-gradient-to-b from-purple-200/25 to-purple-100/15 blur-[120px] opacity-60 -top-[94px] -left-[92px] mix-blend-normal pointer-events-none"></div><div class="hidden lg:block dark:hidden absolute rounded-full -rotate-[24.22deg] w-[705px] h-[512px] bg-gradient-to-b from-indigo-200/25 to-blue-100/15 blur-[120px] opacity-65 top-[373px] left-[246px] mix-blend-normal pointer-events-none"></div><div class="hidden lg:dark:block absolute rounded-full -rotate-[24.22deg] w-[705px] h-[512px] bg-gradient-to-b from-blue-400/15 to-blue-300/5 blur-[120px] opacity-80 -top-[79px] left-[575px] mix-blend-screen pointer-events-none"></div><div class="hidden lg:dark:block absolute rounded-full -rotate-[24.22deg] w-[705px] h-[512px] bg-gradient-to-b from-purple-400/15 to-purple-300/5 blur-[120px] opacity-75 -top-[94px] -left-[92px] mix-blend-screen pointer-events-none"></div><div class="hidden lg:dark:block absolute rounded-full -rotate-[24.22deg] w-[705px] h-[512px] bg-gradient-to-b from-indigo-400/15 to-indigo-300/5 blur-[120px] opacity-80 top-[373px] left-[246px] mix-blend-screen pointer-events-none"></div>`,6),T(`div`,Ha,[x(Un,{"mobile-open":t.value,onClose:a},null,8,[`mobile-open`]),T(`main`,Ua,[x(Ba,{onToggleMobileSidebar:i}),r.value?(s(),f(o,{key:0})):b(``,!0)])])])}}});function Ga(){let e=B(),n=le(),r=K(),i=()=>{let t=document.visibilityState===`visible`;e.setDocumentVisible(t)},a=()=>{e.setOnline(!0)},o=()=>{e.setOnline(!1)};t(()=>{e.syncAuthState(),i(),a(),document.addEventListener(`visibilitychange`,i),window.addEventListener(`online`,a),window.addEventListener(`offline`,o)}),v(()=>e.canMaintainConnections,async t=>{t?(await r.bootstrap(),n.allowReconnect(),n.connect()):e.isOnline?e.isDocumentVisible?n.pause(`lifecycle`):n.pause(`hidden`):n.pause(`offline`)},{immediate:!0}),k(()=>{document.removeEventListener(`visibilitychange`,i),window.removeEventListener(`online`,a),window.removeEventListener(`offline`,o)})}var Ka={class:`text-sm font-medium`},qa=h({name:`ConnectionSnackbar`,__name:`ConnectionSnackbar`,setup(e){let{snackbar:t}=W(le()),n={info:`border-cyan-500/30 bg-cyan-500/10 text-cyan-700 dark:text-cyan-300`,success:`border-green-500/30 bg-green-500/10 text-green-700 dark:text-green-300`,error:`border-red-500/30 bg-red-500/10 text-red-700 dark:text-red-300`};return(e,r)=>(s(),f(F,{"enter-active-class":`transition duration-200 ease-out`,"enter-from-class":`translate-y-3 opacity-0`,"enter-to-class":`translate-y-0 opacity-100`,"leave-active-class":`transition duration-150 ease-in`,"leave-from-class":`translate-y-0 opacity-100`,"leave-to-class":`translate-y-3 opacity-0`},{default:a(()=>[l(t).visible?(s(),E(`div`,{key:0,class:g([`fixed bottom-5 right-5 z-[150] max-w-sm rounded-xl border px-4 py-3 shadow-2xl backdrop-blur-xl`,n[l(t).variant]])},[T(`p`,Ka,d(l(t).message),1)],2)):b(``,!0)]),_:1}))}}),Ja={key:0,class:`fixed inset-0 z-[500] bg-black/70 backdrop-blur-md flex items-center justify-center p-4`},Ya={class:`modal-card max-w-sm w-full`},Xa={class:`space-y-2.5 mb-5`},Za={class:`flex-shrink-0 w-5 h-5 flex items-center justify-center`},Qa={key:1,class:`w-4 h-4 text-accent-green`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`},$a={key:2,class:`w-4 h-4 text-accent-red`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`},eo={key:3,class:`w-3 h-3 rounded-full border border-stroke-subtle dark:border-white/20`},to={key:0,class:`text-xs font-normal text-content-muted dark:text-content-muted/60`},no={class:`flex items-center gap-3`},ro={class:`flex-shrink-0 w-5 h-5 flex items-center justify-center`},io={key:1,class:`w-4 h-4 text-accent-green`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`},ao={key:2,class:`w-3 h-3 rounded-full border border-stroke-subtle dark:border-white/20`},oo=h({__name:`BootstrapModal`,setup(e){let t=K(),r=le();function i(){return r.isConnected?`closed`:Object.values(t.loadProgress).every(e=>e===`pending`)||t.isBootstrapping?`loading`:`connecting`}let o=c(i()),u=null,p=S(()=>o.value!==`closed`),m=[{key:`stats`,label:`System configuration`},{key:`packetStats`,label:`Packet statistics`},{key:`noiseFloor`,label:`Signal history`},{key:`recentPackets`,label:`Recent activity`},{key:`sparklines`,label:`Performance charts`},{key:`advertTier`,label:`Adaptive rate limits`},{key:`neighbors`,label:`Mesh neighbours`}];return v(()=>t.isBootstrapping,e=>{!e&&o.value===`loading`&&(r.isConnected?(o.value=`connected`,u=window.setTimeout(()=>{o.value=`closed`},2e3)):o.value=`connecting`)}),v(()=>r.connectionState,e=>{e===`open`&&o.value===`connecting`&&(o.value=`connected`,u=window.setTimeout(()=>{o.value=`closed`},2e3))}),O(()=>{u!==null&&clearTimeout(u)}),(e,r)=>(s(),f(_,{to:`body`},[x(F,{"enter-active-class":`transition-opacity duration-300`,"enter-from-class":`opacity-0`,"leave-active-class":`transition-opacity duration-500`,"leave-to-class":`opacity-0`},{default:a(()=>[p.value?(s(),E(`div`,Ja,[T(`div`,Ya,[r[3]||=T(`div`,{class:`mb-6 text-center`},[T(`h2`,{class:`text-lg font-semibold text-content-primary dark:text-content-primary`},` Starting up `),T(`p`,{class:`text-xs text-content-secondary dark:text-content-muted mt-1`},` Loading data before opening the live connection `)],-1),T(`ul`,Xa,[(s(),E(w,null,n(m,e=>T(`li`,{key:e.key,class:`flex items-center gap-3`},[T(`span`,Za,[l(t).loadProgress[e.key]===`loading`?(s(),f(J,{key:0,size:`sm`})):l(t).loadProgress[e.key]===`done`?(s(),E(`svg`,Qa,[...r[0]||=[T(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2.5`,d:`M5 13l4 4L19 7`},null,-1)]])):l(t).loadProgress[e.key]===`error`?(s(),E(`svg`,$a,[...r[1]||=[T(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M6 18L18 6M6 6l12 12`},null,-1)]])):(s(),E(`span`,eo))]),T(`span`,{class:g([`text-sm transition-colors flex items-baseline gap-2`,l(t).loadProgress[e.key]===`done`?`text-content-primary dark:text-content-primary`:l(t).loadProgress[e.key]===`loading`?`text-content-primary dark:text-content-primary font-medium`:l(t).loadProgress[e.key]===`error`?`text-accent-red`:`text-content-muted dark:text-content-muted/60`])},[C(d(e.label)+` `,1),e.key===`stats`&&l(t).statsSubStatus!==null?(s(),E(`span`,to,d(l(t).statsSubStatus===`reading`?`Receiving data`:`Requesting`),1)):b(``,!0)],2)])),64))]),r[4]||=T(`div`,{class:`border-t border-stroke-subtle dark:border-white/10 mb-5`},null,-1),T(`div`,no,[T(`span`,ro,[o.value===`connecting`?(s(),f(J,{key:0,size:`sm`})):o.value===`connected`?(s(),E(`svg`,io,[...r[2]||=[T(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2.5`,d:`M5 13l4 4L19 7`},null,-1)]])):(s(),E(`span`,ao))]),T(`span`,{class:g([`text-sm transition-colors`,o.value===`connected`?`text-accent-green font-medium`:o.value===`connecting`?`text-content-primary dark:text-content-primary font-medium`:`text-content-muted dark:text-content-muted/60`])},d(o.value===`connected`?`Real-time connection established`:`Opening real-time data connection...`),3)])])])):b(``,!0)]),_:1})]))}}),so=N(h({__name:`App`,setup(e){let t=z(),n=B(),{theme:r}=ae();Ga(),v(()=>t.fullPath,()=>{n.syncAuthState()},{immediate:!0});let i=S(()=>n.isAuthenticated&&t.path!==`/login`&&t.path!==`/setup`);return(e,t)=>{let n=y(`router-view`);return s(),E(w,null,[i.value?(s(),f(Wa,{key:0})):(s(),f(n,{key:1})),x(qa),i.value?(s(),f(oo,{key:2})):b(``,!0)],64)}}}));so.use(I()),so.use(L),so.mount(`#app`);export{Xt as a,Ge as c,Y as d,ue as f,Jn as i,xe as l,zi as n,lt as o,ki as r,We as s,Bi as t,pe as u}; |