mirror of
https://github.com/pyMC-dev/pyMC_Repeater.git
synced 2026-11-06 05:12:27 +01:00
1 line
41 KiB
JavaScript
1 line
41 KiB
JavaScript
import{E as e,F as t,M as n,O as r,S as i,W as a,Z as o,c as s,g as ee,gt as c,h as te,l,m as u,o as d,p as ne,r as f,s as p,u as m,vt as h,w as re}from"./runtime-core.esm-bundler-DkFx5553.js";import{a as g,l as ie,o as ae}from"./runtime-dom.esm-bundler-BZZ5jbwZ.js";import{t as oe}from"./packets-Dq29eRhi.js";import{t as se}from"./dataService-1BM9o1du.js";import{t as ce}from"./Spinner-Dq7t2KK9.js";import{g as _,h as v,y}from"./index-B_XJkaY-.js";import{n as le,t as ue}from"./SignalBars-EamZc4E0.js";import{t as de}from"./PacketDetailsModal-IfYcCgk5.js";var b={},x={viewBox:`0 0 20 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`};function fe(t,n){return e(),m(`svg`,x,[...n[0]||=[ne(`<ellipse cx="3" cy="12" rx="1.5" ry="2.5" fill="currentColor"></ellipse><ellipse cx="9" cy="9" rx="4" ry="3" fill="currentColor"></ellipse><circle cx="13" cy="7" r="3" fill="currentColor"></circle><ellipse cx="12" cy="2" rx="1.5" ry="3" fill="currentColor"></ellipse><ellipse cx="14" cy="2" rx="1.5" ry="3" fill="currentColor"></ellipse><ellipse cx="16" cy="11" rx="1.5" ry="2" fill="currentColor"></ellipse><circle cx="5" cy="8" r="2" fill="currentColor" opacity="0.8"></circle>`,7)]])}var S=y(b,[[`render`,fe]]),pe=y(ee({__name:`HopConnector`,props:{status:{default:`received`}},setup(t){return(n,r)=>(e(),m(`span`,{class:c([`hop-connector`,`hop-connector-${t.status}`]),title:`Rabbit hop`},[te(S,{class:`hop-rabbit`})],2))}}),[[`__scopeId`,`data-v-5fc98e84`]]),me={class:`glass-card w-full max-w-none rounded-[20px] p-6`},he={class:`flex items-center gap-2 header-info relative`},ge={class:`text-content-primary text-xl font-semibold`},_e={class:`text-content-secondary dark:text-content-muted text-sm packet-count`},ve=[`title`],ye={class:`hidden sm:inline`},be=[`title`],xe={key:2,class:`text-accent-red text-sm error-indicator`},Se={key:0,class:`archive-controls`},Ce={class:`flex flex-col archive-search-control`},we={class:`relative`},Te={class:`archive-meta-controls`},Ee={class:`flex flex-col archive-range-control`},De={class:`archive-range-buttons`},Oe=[`onClick`],ke={class:`flex flex-col`},Ae={class:`flex flex-col`},je={class:`flex flex-col`},Me={class:`flex flex-col`},Ne=[`value`],Pe={class:`flex flex-col`},Fe=[`value`],Ie={key:0,class:`flex flex-col`},Le=[`value`],Re={key:1,class:`flex flex-col`},ze=[`disabled`],Be={class:`space-y-4 w-full`},Ve=[`onClick`],He={key:0,class:`duplicate-group-banner mb-2 flex items-center justify-between gap-2 rounded-[8px] px-2 py-1`},Ue={class:`text-[10px] text-content-secondary dark:text-content-muted`},We={class:`hidden lg:block w-full space-y-2`},Ge={class:`grid w-full grid-cols-11 gap-2 items-center`},Ke={class:`col-span-1 text-content-primary text-sm`},qe={class:`col-span-1 flex items-center gap-2`},Je={class:`flex flex-col`},Ye={class:`text-content-primary text-xs`},Xe=[`title`],Ze={class:`whitespace-normal break-words`},Qe={class:`col-span-2`},$e={class:`col-span-1 text-content-primary text-xs`},et={class:`col-span-1 text-content-primary text-xs`},tt={class:`col-span-1 text-content-primary text-xs flex items-center gap-1`},nt={class:`col-span-1 text-content-primary text-xs`},rt={class:`col-span-1 text-content-primary text-xs`},it={key:0,class:`flex items-center gap-1`},at={class:`col-span-2`},ot={class:`flex items-center gap-1`},st={key:0,class:`inline-flex items-center text-[10px] font-medium text-accent-amber`,title:`Policy blocked`},ct={key:0,class:`mt-1 flex items-center gap-2`},lt=[`onClick`],ut={key:1,class:`mt-1 text-[10px] text-content-secondary dark:text-content-muted`},dt={class:`mt-1 text-[10px] text-content-secondary dark:text-content-muted font-mono`},ft={key:2,class:`text-accent-red text-[8px] italic truncate`},pt={class:`grid w-full grid-cols-11 gap-2 items-start`},mt={class:`col-span-11`},ht={class:`space-y-1`},gt={class:`flex items-center gap-2`},_t={class:`text-[9px] text-content-muted`},vt={class:`flex items-center gap-0.5 flex-wrap`},yt=[`title`],bt={key:1,class:`flex items-center gap-1`},xt={class:`inline-block px-2 py-0.5 rounded bg-badge-cyan-bg text-badge-cyan-text text-xs font-mono`},St={class:`lg:hidden space-y-2`},Ct={class:`mobile-packet-card space-y-3 rounded-[16px] p-4`},wt={class:`flex items-start justify-between gap-3`},Tt={class:`flex items-start gap-3 min-w-0`},Et={class:`min-w-0`},Dt={class:`flex items-center gap-2 flex-wrap`},Ot={class:`text-content-primary text-xl font-semibold tracking-wide`},kt={key:0,class:`text-content-secondary dark:text-content-muted text-[10px] font-medium leading-tight`},At=[`title`],jt={class:`whitespace-normal break-words`},Mt={class:`flex items-start gap-2 flex-shrink-0`},Nt={class:`flex flex-col items-end`},Pt={class:`text-content-secondary dark:text-content-muted text-xs`},Ft={class:`mt-1 flex items-center gap-1 justify-end`},It={key:0,class:`inline-flex items-center text-[10px] font-medium text-accent-amber`,title:`Policy blocked`},Lt=[`title`,`aria-label`,`onClick`],Rt={class:`absolute -top-1 -right-1 min-w-[18px] h-[18px] px-1 rounded-full bg-surface dark:bg-surface-elevated border border-primary/opacity-heavy text-[10px] leading-none font-semibold text-primary flex items-center justify-center`},zt={class:`space-y-2`},Bt={class:`flex items-center gap-2`},Vt={class:`text-content-muted text-xs`},Ht={key:0,class:`flex flex-wrap items-center gap-1.5`},Ut=[`title`],Wt={key:1,class:`flex items-center gap-1`},Gt={class:`inline-block px-2 py-0.5 rounded bg-badge-cyan-bg text-badge-cyan-text text-xs font-mono font-semibold`},Kt={class:`pt-3 border-t border-stroke-subtle/70 dark:border-stroke/opacity-heavy`},qt={class:`mobile-metrics-grid grid gap-0`},Jt={class:`mobile-metric-cell`},Yt={class:`text-content-primary text-base font-semibold`},Xt={class:`mobile-metric-cell`},Zt={class:`text-content-primary text-base font-semibold`},Qt={class:`mobile-metric-cell`},$t={class:`flex items-center gap-1 min-w-0`},en={class:`text-content-primary text-[11px] font-medium leading-tight`},tn={class:`mobile-metric-cell`},nn={class:`flex items-center gap-1`},rn={class:`text-content-primary text-base font-semibold`},an={class:`text-content-secondary dark:text-content-muted text-xs font-mono`},on={key:0,class:`text-accent-red text-xs italic`},sn={key:0,class:`flex justify-between items-center mt-6 pt-4 border-t border-stroke-subtle dark:border-stroke pagination-container`},cn={class:`flex items-center gap-4 pagination-info`},ln={class:`text-content-secondary dark:text-content-muted text-sm`},un={class:`text-xs`},dn={key:0,class:`flex items-center gap-2 load-more-section`},fn=[`disabled`],pn={class:`text-content-secondary dark:text-content-muted text-xs load-more-count`},mn={class:`flex items-center gap-2 pagination-controls`},hn=[`disabled`],gn={class:`flex items-center gap-1 page-numbers`},_n={key:1,class:`text-content-secondary dark:text-content-muted text-sm px-2 ellipsis`},vn=[`onClick`],yn={key:2,class:`text-content-secondary dark:text-content-muted text-sm px-2 ellipsis`},bn=[`disabled`],xn={key:1,class:`flex justify-center mt-6 pt-4 border-t border-stroke-subtle dark:border-stroke`},Sn={class:`flex items-center gap-4`},Cn={class:`text-content-secondary dark:text-content-muted text-sm`},wn={class:`text-content-secondary dark:text-content-muted text-xs`},Tn={key:2,class:`flex justify-center mt-6 pt-4 border-t border-stroke-subtle dark:border-stroke`},En={class:`flex items-center gap-2`},C=10,w=1e3,Dn=`__none__`,T=y(ee({name:`PacketTable`,__name:`PacketTable`,props:{mode:{default:`dashboard`},title:{default:`Recent Packets`},defaultHours:{default:24}},setup(ee){let y=ee,b=oe(),{getSignalQualityFromSNR:x}=le(),fe=se(),S=a(1),T=a(Math.floor((Date.now()-y.defaultHours*60*60*1e3)/1e3)),E=a(Math.floor(Date.now()/1e3)),D=a(``),On=[{label:`1h`,hours:1},{label:`6h`,hours:6},{label:`24h`,hours:24},{label:`7d`,hours:168},{label:`30d`,hours:720}],O=a(v(`packetArchive_autoUpdateEnabled`,!0)),kn=a([]),An=e=>{let t=new Date(e*1e3),n=e=>String(e).padStart(2,`0`);return`${t.getFullYear()}-${n(t.getMonth()+1)}-${n(t.getDate())}T${n(t.getHours())}:${n(t.getMinutes())}`},jn=d({get:()=>An(T.value),set:e=>{if(!e)return;let t=new Date(e);Number.isNaN(t.getTime())||(T.value=Math.floor(t.getTime()/1e3))}}),Mn=d({get:()=>An(E.value),set:e=>{if(!e)return;let t=new Date(e);Number.isNaN(t.getTime())||(E.value=Math.floor(t.getTime()/1e3))}}),k=a(100),A=a(!1),Nn=a(!1),j=null;n(()=>b.isLoading,e=>{e?(j&&=(clearTimeout(j),null),Nn.value=!0):j=window.setTimeout(()=>{Nn.value=!1,j=null},600)});let M=a(null),N=a(!1),P=a(null),Pn=a(0),F=(e,t)=>!e||!t?!1:e.packet_hash===t.packet_hash&&e.timestamp===t.timestamp&&e.type===t.type&&e.route===t.route&&e.src_hash===t.src_hash&&e.dst_hash===t.dst_hash&&e.length===t.length,Fn=async(e,t)=>{if((e.id||e.packet_hash)&&(!e.header||!e.raw_packet)){let n=++Pn.value;try{let r=e.id==null?await b.getPacketByHash(e.packet_hash):await b.getPacketById(e.id);r&&Pn.value===n&&M.value&&F(M.value,e)&&P.value===t&&(M.value={...M.value,...r})}catch{}}},In=async e=>{let t=G.value.findIndex(t=>F(t,e));P.value=t>=0?t:null,M.value=e,N.value=!0,await Fn(e,P.value)},Ln=async e=>{let t=G.value[e];t&&(P.value=e,M.value=t,N.value=!0,await Fn(t,e))},Rn=async()=>{P.value==null||P.value<=0||await Ln(P.value-1)},zn=async()=>{P.value==null||P.value>=G.value.length-1||await Ln(P.value+1)},Bn=()=>{N.value=!1,M.value=null,P.value=null,Pn.value+=1},I=a(v(`packetTable_selectedType`,`all`)),L=a(v(`packetTable_selectedRoute`,`all`)),R=a(v(`packetArchive_selectedDropReason`,`all`)),z=a(!1),B=a(null),Vn=[`all`,`0`,`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`,`10`,`11`],Hn=[{value:`all`,label:`All Routes`},{value:`0`,label:`flood_transport`},{value:`1`,label:`flood`},{value:`2`,label:`direct`},{value:`3`,label:`direct_transport`}],V=a(new Set);n(I,e=>{_(`packetTable_selectedType`,e),S.value=1,y.mode===`archive`&&$()}),n(L,e=>{_(`packetTable_selectedRoute`,e),S.value=1,y.mode===`archive`&&$()}),n(R,e=>{_(`packetArchive_selectedDropReason`,e),S.value=1}),n(z,()=>{S.value=1}),n([T,E],()=>{S.value=1,y.mode===`archive`&&$()},{flush:`post`}),n(D,()=>{S.value=1}),n(O,e=>{if(_(`packetArchive_autoUpdateEnabled`,e),y.mode===`archive`){if(e){$();return}kn.value=[...b.recentPackets]}});let Un=d(()=>y.mode===`archive`&&!O.value?kn.value:b.recentPackets);function H(e){return e?e.trim().toLowerCase():``}let Wn=d(()=>{let e=new Map;for(let t of Un.value){let n=H(t.drop_reason);!n||e.has(n)||e.set(n,t.drop_reason.trim())}let t=[{value:`all`,label:`All Drop Reasons`},{value:Dn,label:`No drop reason`}];for(let[n,r]of e.entries())t.push({value:n,label:r});return t}),Gn=e=>{let t=Math.floor(Date.now()/1e3);E.value=t,T.value=Math.floor(t-e*60*60)},Kn=d(()=>{if(E.value<=T.value)return`Custom range`;let e=new Date(T.value*1e3),t=new Date(E.value*1e3);return`${e.toLocaleDateString(void 0,{month:`short`,day:`numeric`})} ${e.toLocaleTimeString(void 0,{hour:`numeric`,minute:`2-digit`})} → ${t.toLocaleDateString(void 0,{month:`short`,day:`numeric`})} ${t.toLocaleTimeString(void 0,{hour:`numeric`,minute:`2-digit`})}`}),U=d(()=>{let e=Un.value;if(I.value!==`all`){let t=parseInt(I.value);e=e.filter(e=>e.type===t)}if(L.value!==`all`&&(e=e.filter(e=>pr(e.route)===L.value)),y.mode===`archive`&&R.value!==`all`&&(e=R.value===Dn?e.filter(e=>!H(e.drop_reason)):e.filter(e=>H(e.drop_reason)===R.value)),y.mode===`archive`&&D.value.trim()){let t=D.value.trim().toLowerCase();e=e.filter(e=>[e.packet_hash,e.src_hash,e.dst_hash,e.rx_radio_id,e.tx_radio_id,e.drop_reason,Y(e.type),mr(e.route),e.payload,e.header,e.raw_packet].filter(Boolean).join(` `).toLowerCase().includes(t))}return z.value&&B.value!==null&&(e=e.filter(e=>e.timestamp>=B.value)),e}),W=d(()=>{let e=new Map,t=[];return U.value.forEach((n,r)=>{let i=n.packet_hash?.trim(),a=i?`hash:${i}`:`nohash:${n.timestamp}:${r}`,o=e.get(a);if(o){o.packets.push(n);return}let s={key:a,packetHash:i??``,packets:[n],primary:n,duplicates:[],duplicateCount:0,hasDuplicates:!1};e.set(a,s),t.push(s)}),t.map(e=>{let t=e.packets.findIndex(e=>e.transmitted&&!e.drop_reason),n=t>=0?t:e.packets.findIndex(e=>e.transmitted),r=n>=0?n:e.packets.findIndex(e=>!e.is_duplicate),i=r>=0?r:0,a=e.packets[i],o=e.packets.filter((e,t)=>t!==i);return{...e,primary:a,duplicates:o,duplicateCount:o.length,hasDuplicates:o.length>0}})}),qn=d(()=>{let e=(S.value-1)*C,t=e+C;return W.value.slice(e,t)}),G=d(()=>W.value.flatMap(e=>[e.primary,...e.duplicates])),Jn=d(()=>{let e=M.value;return e?W.value.find(t=>t.packets.some(t=>F(t,e)))?.packets??[]:[]}),Yn=d(()=>P.value!=null&&P.value>0),Xn=d(()=>P.value!=null&&P.value<G.value.length-1),Zn=d(()=>{let e=new Map;for(let t of qn.value)e.set(t.primary,{group:t,isPrimary:!0,duplicateIndex:0}),t.duplicates.forEach((n,r)=>{e.set(n,{group:t,isPrimary:!1,duplicateIndex:r+1})});return e}),K=d(()=>Math.ceil(W.value.length/C));n(W,e=>{let t=new Set(e.filter(e=>e.hasDuplicates).map(e=>e.key)),n=new Set([...V.value].filter(e=>t.has(e)));n.size!==V.value.size&&(V.value=n),K.value>0&&S.value>K.value&&(S.value=K.value)},{immediate:!0}),n([G,M,N],([e,t,n])=>{if(!n||!t)return;let r=e.findIndex(e=>F(e,t));P.value=r>=0?r:null},{immediate:!0});let Qn=d(()=>S.value===K.value),$n=d(()=>b.recentPackets.length>=k.value&&k.value<w),er=d(()=>Qn.value&&$n.value&&!A.value),q=e=>Zn.value.get(e),tr=e=>q(e)?.isPrimary??!0,nr=e=>!tr(e),rr=e=>ir(e)&&J(e),ir=e=>{let t=q(e);return!!(t?.isPrimary&&t.group.hasDuplicates)},ar=e=>{let t=q(e);return t?.isPrimary?t.group.duplicateCount:0},or=e=>{let t=ar(e);return`${J(e)?`Hide`:`Show`} ${t} duplicate${t===1?``:`s`}`},J=e=>{let t=q(e);return t?.isPrimary?V.value.has(t.group.key):!1},sr=e=>{let t=q(e);return!t||t.isPrimary?0:t.duplicateIndex},cr=e=>q(e)?.group.packets.length??1,lr=e=>sr(e)===1,ur=e=>e.hasDuplicates&&V.value.has(e.key)?[e.primary,...e.duplicates]:[e.primary],dr=e=>{let t=q(e);if(!t?.isPrimary||!t.group.hasDuplicates)return;let n=new Set(V.value);n.has(t.group.key)?n.delete(t.group.key):n.add(t.group.key),V.value=n},fr=e=>new Date(e*1e3).toLocaleTimeString(void 0,{hour12:!0}),Y=e=>({0:`REQ`,1:`RESPONSE`,2:`TXT_MSG`,3:`ACK`,4:`ADVERT`,5:`GRP_TXT`,6:`GRP_DATA`,7:`ANON_REQ`,8:`PATH`,9:`TRACE`,10:`MULTI_PART`,11:`CONTROL`})[e]||`TYPE_${e}`;function pr(e){if(e==null)return``;if(typeof e==`number`&&Number.isFinite(e))return String(e);let t=String(e).trim().toLowerCase(),n={flood_transport:`0`,transport_flood:`0`,"t-flood":`0`,flood:`1`,direct:`2`,direct_transport:`3`,transport_direct:`3`,"t-direct":`3`};return t in n?n[t]:t}function mr(e){return{0:`flood_transport`,1:`flood`,2:`direct`,3:`direct_transport`}[pr(e)]||`Route ${e}`}let hr=e=>{let t=e.packets.filter(e=>e.transmitted&&!e.drop_reason).length,n=e.packets.filter(e=>!!e.drop_reason).length;return t>0&&n>0?{label:`Forwarded — ${n} duplicate${n===1?``:`s`} dropped`,className:`text-accent-green`,forwardedCount:t,droppedCount:n}:t>0?{label:`Forwarded`,className:`text-accent-green`,forwardedCount:t,droppedCount:n}:n>0?{label:`Dropped — ${n} ${n===1?`copy`:`copies`} rejected`,className:`text-accent-red`,forwardedCount:t,droppedCount:n}:{label:`Received`,className:`text-primary`,forwardedCount:t,droppedCount:n}},gr=e=>{let t=q(e)?.group;return t&&q(e)?.isPrimary?hr(t).className:e.transmitted?`text-accent-green`:`text-primary`},_r=e=>{let t=q(e);return t?.isPrimary&&t.group.hasDuplicates?hr(t.group).label:e.drop_reason?`Dropped`:e.transmitted?`Forward`:`Received`},vr=e=>{let t=e.drop_reason?.toLowerCase();return!!(t&&t.includes(`policy blocked`))},yr=e=>(vr(e),``);function br(e){let t=pr(e);return t===`0`||t===`1`?`bg-badge-cyan-bg text-badge-cyan-text`:`bg-badge-neutral-bg text-badge-neutral-text`}let xr=e=>({0:`bg-primary`,1:`bg-accent-green`,2:`bg-secondary`,3:`bg-accent-purple`,4:`bg-accent-red`,5:`bg-accent-cyan`,6:`bg-primary`,7:`bg-accent-purple`,8:`bg-accent-green`,9:`bg-secondary`})[e]||`bg-background-mute`,Sr=e=>({0:`border-l-primary`,1:`border-l-accent-green`,2:`border-l-accent-amber`,3:`border-l-accent-purple`,4:`border-l-accent-red`,5:`border-l-accent-cyan`,6:`border-l-primary`,7:`border-l-accent-purple`,8:`border-l-accent-green`,9:`border-l-accent-amber`})[e]||`border-l-gray-500`,Cr=e=>!e.transmitted||!e.lbt_attempts||e.lbt_attempts===0?`status-dot-green`:e.lbt_attempts===1?`status-dot-muted`:e.lbt_attempts===2?`status-dot-amber`:`status-dot-red`,wr=e=>e>=1e3?(e/1e3).toFixed(2)+`s`:e.toFixed(1)+`ms`,X=e=>{if(typeof e!=`string`)return`N/A`;let t=e.trim();return t.length>0?t:`N/A`},Tr=e=>{if(!e)return[];if(Array.isArray(e))return e;if(typeof e==`string`)try{let t=JSON.parse(e);return typeof t==`string`?JSON.parse(t):Array.isArray(t)?t:[]}catch{return[]}return[]},Z=e=>{let t=Tr(e.original_path),n=Tr(e.forwarded_path),r=e.transmitted&&n.length>0?n:t.length>0?t:n;return r.length===0?null:{hops:r.length-1,nodes:r.map(e=>e.toUpperCase())}},Er=e=>e<=0?`Direct`:`${e} hop${e>1?`s`:``}`,Q=e=>{if(e.type!==4||!e.payload)return null;try{let t=e.payload.replace(/\s+/g,``).toUpperCase(),n=t,r=0;if(t.length/2>=100)if(t.length>200)n=t.slice(200),r=0;else return null;if(n.length>=2){let e=parseInt(n.slice(0,2),16);r+=2;let t=!!(e&16),i=!!(e&32),a=!!(e&64);if(!(e&128))return null;if(t&&n.length>=r+16&&(r+=16),i&&n.length>=r+4&&(r+=4),a&&n.length>=r+4&&(r+=4),n.length>r){let e=(n.slice(r).match(/.{2}/g)||[]).map(e=>{let t=parseInt(e,16);return t>=32&&t<=126?String.fromCharCode(t):`.`}).join(``).replace(/\.*$/,``);return e.length>0?e:null}}}catch(e){console.error(`Error parsing ADVERT node name:`,e)}return null},Dr=()=>{I.value=`all`,L.value=`all`,y.mode===`archive`&&(R.value=`all`),z.value=!1,B.value=null,S.value=1},Or=()=>{z.value?(z.value=!1,B.value=null):(z.value=!0,B.value=Date.now()/1e3),S.value=1},kr=d(()=>B.value?new Date(B.value*1e3).toLocaleTimeString(void 0,{hour12:!0}):``),$=async e=>{try{let t=e??k.value;if(y.mode===`archive`){let e=I.value===`all`?void 0:Number(I.value),n=L.value===`all`?void 0:Number(L.value),r=await b.fetchFilteredPackets({type:e,route:n,start_timestamp:T.value,end_timestamp:E.value,limit:t});r&&(kn.value=[...r]);return}await b.fetchRecentPackets({limit:t})}catch(e){console.error(`Error fetching packet data:`,e)}},Ar=async()=>{if(!(A.value||k.value>=w)){A.value=!0;try{let e=Math.min(k.value+200,w);k.value=e,await $(e)}catch(e){console.error(`Error loading more records:`,e)}finally{A.value=!1}}};return re(()=>{if(y.mode===`archive`){$();return}fe.ensure(`recentPackets`)}),i(()=>{j&&clearTimeout(j)}),(n,i)=>(e(),m(f,null,[p(`div`,me,[p(`div`,{class:c([`flex flex-col mb-6 gap-4 filter-container`,{"lg:flex-row lg:justify-between lg:items-center":y.mode!==`archive`}])},[p(`div`,he,[p(`h3`,ge,h(y.title),1),p(`span`,_e,` (`+h(U.value.length)+` of `+h(o(b).recentPackets.length)+`) `,1),z.value&&y.mode!==`archive`?(e(),m(`span`,{key:0,class:`text-primary text-xs sm:text-sm bg-primary/opacity-light px-2 py-1 rounded-md border border-primary/opacity-medium live-mode-badge whitespace-nowrap`,title:`Filter activated at ${kr.value}`},[p(`span`,ye,`Live Mode (since `+h(kr.value)+`)`,1),i[12]||=p(`span`,{class:`sm:hidden`},`Live`,-1)],8,ve)):l(``,!0),y.mode===`archive`?(e(),m(`span`,{key:1,class:`text-primary text-xs sm:text-sm bg-primary/opacity-light px-2 py-1 rounded-md border border-primary/opacity-medium live-mode-badge whitespace-nowrap`,title:Kn.value},h(Kn.value),9,be)):l(``,!0),o(b).error?(e(),m(`span`,xe,h(o(b).error),1)):l(``,!0)]),p(`div`,{class:c([`filter-controls w-full`,{"archive-filter-controls":y.mode===`archive`}])},[y.mode===`archive`?(e(),m(`div`,Se,[p(`div`,Ce,[i[13]||=p(`label`,{class:`text-content-secondary dark:text-content-muted text-xs mb-1`},`Search`,-1),p(`div`,we,[t(p(`input`,{"onUpdate:modelValue":i[0]||=e=>D.value=e,type:`search`,placeholder:`hash, src, dst, payload...`,class:`glass-card border border-stroke-subtle dark:border-stroke rounded-[10px] px-3 py-2 pr-9 text-content-primary text-sm focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary/opacity-medium transition-all duration-200 archive-search-input`},null,512),[[ae,D.value]]),D.value?(e(),m(`button`,{key:0,type:`button`,class:`absolute right-2 top-1/2 -translate-y-1/2 text-content-muted hover:text-content-primary`,"aria-label":`Clear search`,onClick:i[1]||=e=>D.value=``},` × `)):l(``,!0)])]),p(`div`,Te,[p(`div`,Ee,[i[14]||=p(`label`,{class:`text-content-secondary dark:text-content-muted text-xs mb-1`},`Range`,-1),p(`div`,De,[(e(),m(f,null,r(On,e=>p(`button`,{key:e.label,type:`button`,class:c([`glass-card border rounded-[10px] px-2.5 py-2 text-xs transition-all duration-200 focus:outline-none focus:ring-1 focus:ring-primary/opacity-medium`,{"border-primary bg-primary/opacity-light text-primary":Math.abs(E.value-T.value-e.hours*60*60)<120,"border-stroke-subtle dark:border-stroke text-content-secondary dark:text-content-muted hover:border-primary dark:hover:border-primary hover:text-content-primary dark:hover:text-content-primary":Math.abs(E.value-T.value-e.hours*60*60)>=120}]),onClick:t=>Gn(e.hours)},h(e.label),11,Oe)),64))])]),p(`div`,ke,[i[15]||=p(`label`,{class:`text-content-secondary dark:text-content-muted text-xs mb-1`},`Start`,-1),t(p(`input`,{"onUpdate:modelValue":i[2]||=e=>jn.value=e,type:`datetime-local`,class:`glass-card border border-stroke-subtle dark:border-stroke rounded-[10px] px-3 py-2 text-content-primary text-sm focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary/opacity-medium transition-all duration-200 w-full`},null,512),[[ae,jn.value]])]),p(`div`,Ae,[i[16]||=p(`label`,{class:`text-content-secondary dark:text-content-muted text-xs mb-1`},`End`,-1),t(p(`input`,{"onUpdate:modelValue":i[3]||=e=>Mn.value=e,type:`datetime-local`,class:`glass-card border border-stroke-subtle dark:border-stroke rounded-[10px] px-3 py-2 text-content-primary text-sm focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary/opacity-medium transition-all duration-200 w-full`},null,512),[[ae,Mn.value]])]),p(`div`,je,[i[17]||=p(`label`,{class:`text-content-secondary dark:text-content-muted text-xs mb-1`},`Updates`,-1),p(`button`,{type:`button`,class:c([`glass-card border rounded-[10px] px-3 py-2 text-sm transition-all duration-200 focus:outline-none focus:ring-1 focus:ring-primary/opacity-medium w-full`,{"border-primary bg-primary/opacity-light text-primary":O.value,"border-stroke-subtle dark:border-stroke text-content-secondary dark:text-content-muted hover:border-primary dark:hover:border-primary hover:text-content-primary dark:hover:text-content-primary":!O.value}]),onClick:i[4]||=e=>O.value=!O.value},h(O.value?`Auto Update: On`:`Auto Update: Off`),3)])])])):l(``,!0),p(`div`,{class:c([`common-filter-controls`,{"archive-common-filter-controls":y.mode===`archive`}])},[p(`div`,Me,[i[18]||=p(`label`,{class:`text-content-secondary dark:text-content-muted text-xs mb-1`},`Type`,-1),t(p(`select`,{"onUpdate:modelValue":i[5]||=e=>I.value=e,class:`glass-card border border-stroke-subtle dark:border-stroke rounded-[10px] px-3 py-2 text-content-primary text-sm focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary/opacity-medium transition-all duration-200 min-w-[120px] cursor-pointer hover:border-primary/opacity-heavy dark:hover:border-primary/opacity-heavy`},[(e(),m(f,null,r(Vn,e=>p(`option`,{key:e,value:e,class:`bg-surface dark:bg-surface-elevated text-content-primary`},h(e===`all`?`All Types`:`Type ${e} (${Y(parseInt(e))})`),9,Ne)),64))],512),[[g,I.value]])]),p(`div`,Pe,[i[19]||=p(`label`,{class:`text-content-secondary dark:text-content-muted text-xs mb-1`},`Route`,-1),t(p(`select`,{"onUpdate:modelValue":i[6]||=e=>L.value=e,class:`glass-card border border-stroke-subtle dark:border-stroke rounded-[10px] px-3 py-2 text-content-primary text-sm focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary/opacity-medium transition-all duration-200 min-w-[120px] cursor-pointer hover:border-primary/opacity-heavy dark:hover:border-primary/opacity-heavy`},[(e(),m(f,null,r(Hn,e=>p(`option`,{key:e.value,value:e.value,class:`bg-surface dark:bg-surface-elevated text-content-primary`},h(e.label),9,Fe)),64))],512),[[g,L.value]])]),y.mode===`archive`?(e(),m(`div`,Ie,[i[20]||=p(`label`,{class:`text-content-secondary dark:text-content-muted text-xs mb-1`},`Drop`,-1),t(p(`select`,{"onUpdate:modelValue":i[7]||=e=>R.value=e,class:`glass-card border border-stroke-subtle dark:border-stroke rounded-[10px] px-3 py-2 text-content-primary text-sm focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary/opacity-medium transition-all duration-200 min-w-[170px] cursor-pointer hover:border-primary/opacity-heavy dark:hover:border-primary/opacity-heavy`},[(e(!0),m(f,null,r(Wn.value,t=>(e(),m(`option`,{key:t.value,value:t.value,class:`bg-surface dark:bg-surface-elevated text-content-primary`},h(t.label),9,Le))),128))],512),[[g,R.value]])])):l(``,!0),y.mode===`archive`?l(``,!0):(e(),m(`div`,Re,[i[21]||=p(`label`,{class:`text-content-secondary dark:text-content-muted text-xs mb-1`},`Filter`,-1),p(`button`,{onClick:Or,class:c([`glass-card border rounded-[10px] px-4 py-2 text-sm transition-all duration-200 focus:outline-none focus:ring-1 focus:ring-primary/opacity-medium min-w-[120px]`,{"border-primary bg-primary/opacity-light text-primary":z.value,"border-stroke-subtle dark:border-stroke text-content-secondary dark:text-content-muted hover:border-primary dark:hover:border-primary hover:text-content-primary dark:hover:text-content-primary hover:bg-primary/opacity-light":!z.value}])},h(z.value?`New Only`:`Show New`),3)])),p(`div`,{class:c([`flex flex-col reset-container`,{"archive-reset-container":y.mode===`archive`}])},[i[22]||=p(`label`,{class:`text-transparent text-xs mb-1`},`.`,-1),p(`button`,{onClick:Dr,class:c([`glass-card border border-stroke-subtle dark:border-stroke hover:border-primary dark:hover:border-primary rounded-[10px] px-4 py-2 text-content-secondary dark:text-content-muted hover:text-content-primary dark:hover:text-content-primary text-sm transition-all duration-200 focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary/opacity-medium`,{"opacity-50 cursor-not-allowed hover:border-stroke-subtle dark:hover:border-stroke hover:text-content-secondary dark:hover:text-content-muted":I.value===`all`&&L.value===`all`&&(y.mode!==`archive`||R.value===`all`)&&!z.value,"hover:bg-primary/opacity-light":I.value!==`all`||L.value!==`all`||y.mode===`archive`&&R.value!==`all`||z.value}]),disabled:I.value===`all`&&L.value===`all`&&(y.mode!==`archive`||R.value===`all`)&&!z.value},` Reset `,10,ze)],2)],2)],2)],2),i[45]||=ne(`<div class="hidden lg:block w-full pb-3 border-b border-stroke-subtle dark:border-stroke text-content-secondary dark:text-content-muted text-xs uppercase mb-4" data-v-7be58559><div class="grid w-full grid-cols-11 gap-2" data-v-7be58559><div class="col-span-1" data-v-7be58559>Time</div><div class="col-span-1" data-v-7be58559>Type</div><div class="col-span-2" data-v-7be58559>Route</div><div class="col-span-1" data-v-7be58559>LEN</div><div class="col-span-1" data-v-7be58559>RSSI</div><div class="col-span-1" data-v-7be58559>SNR</div><div class="col-span-1" data-v-7be58559>Score</div><div class="col-span-1" data-v-7be58559>TX Delay</div><div class="col-span-2" data-v-7be58559>Status</div></div><div class="grid w-full grid-cols-11 gap-2 mt-2 pt-2 border-t border-stroke-subtle/70 dark:border-stroke/opacity-heavy" data-v-7be58559><div class="col-span-11" data-v-7be58559>Path/Hashes</div></div></div>`,1),p(`div`,Be,[(e(!0),m(f,null,r(qn.value,t=>(e(),m(`div`,{key:t.key,class:c([`space-y-2 w-full`,t.hasDuplicates?`duplicate-group-container rounded-[12px] overflow-hidden`:``])},[(e(!0),m(f,null,r(ur(t),(n,a)=>(e(),m(`div`,{key:`${t.key}_${n.packet_hash}_${n.timestamp}_${a}`,class:c([`packet-row w-full border-b border-stroke-subtle dark:border-dark-border/50 pb-4 hover:bg-background-mute dark:hover:bg-stroke/opacity-subtle transition-colors duration-150 cursor-pointer rounded-[10px] p-2 border-l-4`,[Sr(n.type),yr(n),nr(n)?`duplicate-packet-row`:``,rr(n)?`duplicate-group-expanded-row`:``]]),onClick:e=>In(n)},[lr(n)?(e(),m(`div`,He,[i[23]||=p(`span`,{class:`text-[10px] font-semibold uppercase tracking-wide text-primary`},`Duplicate Group`,-1),p(`span`,Ue,h(cr(n)-1)+` duplicate`+h(cr(n)-1==1?``:`s`),1)])):l(``,!0),p(`div`,We,[p(`div`,Ge,[p(`div`,Ke,h(fr(n.timestamp)),1),p(`div`,qe,[p(`div`,{class:c([`w-2 h-2 rounded-full`,xr(n.type)])},null,2),p(`div`,Je,[p(`span`,Ye,h(Y(n.type)),1),n.type===4&&Q(n)?(e(),m(`span`,{key:0,class:`inline-flex items-start gap-1 px-2 py-1 rounded-md bg-accent-red/opacity-light text-content-primary dark:text-content-primary border border-accent-red/opacity-heavy text-[10px] font-semibold whitespace-normal break-words leading-tight`,title:Q(n)||void 0},[i[24]||=p(`span`,{class:`inline-block w-1.5 h-1.5 rounded-full bg-accent-red mt-1 shrink-0`},null,-1),p(`span`,Ze,h(Q(n)),1)],8,Xe)):l(``,!0)])]),p(`div`,Qe,[p(`span`,{class:c([`inline-block px-2 py-1 rounded text-xs font-medium`,br(n.route)])},h(mr(n.route)),3)]),p(`div`,$e,h(n.length)+`B `,1),p(`div`,et,h(n.rssi==null?`N/A`:n.rssi.toFixed(0)+` dBm`),1),p(`div`,tt,[n.rssi==null?l(``,!0):(e(),s(ue,{key:0,bars:o(x)(n.snr).bars,color:o(x)(n.snr).color},null,8,[`bars`,`color`])),u(` `+h(n.snr==null?`N/A`:n.snr.toFixed(1)+`dB`),1)]),p(`div`,nt,h(n.score==null?`N/A`:n.score.toFixed(2)),1),p(`div`,rt,[Number(n.tx_delay_ms)>0?(e(),m(`div`,it,[n.transmitted?(e(),m(`div`,{key:0,class:c([`w-1.5 h-1.5 rounded-full flex-shrink-0`,Cr(n)])},null,2)):l(``,!0),p(`span`,null,h(wr(Number(n.tx_delay_ms))),1)])):l(``,!0)]),p(`div`,at,[p(`div`,null,[p(`div`,ot,[p(`span`,{class:c([`text-xs font-medium`,gr(n)])},h(_r(n)),3),vr(n)?(e(),m(`span`,st,[...i[25]||=[p(`svg`,{class:`w-3 h-3`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`,"aria-hidden":`true`},[p(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M12 3l7 4v5c0 5-3.5 8-7 9-3.5-1-7-4-7-9V7l7-4z`}),p(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M8 8l8 8`})],-1)]])):l(``,!0)]),ir(n)?(e(),m(`div`,ct,[p(`button`,{type:`button`,class:`inline-flex items-center gap-1 rounded-md px-2 py-1 text-[10px] font-semibold transition-all duration-200 border bg-primary/opacity-medium hover:bg-primary/opacity-medium border-primary/opacity-heavy text-primary`,onClick:ie(e=>dr(n),[`stop`])},[(e(),m(`svg`,{class:c([`w-2.5 h-2.5 transition-transform duration-200`,{"rotate-180":J(n)}]),fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`},[...i[26]||=[p(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2.5`,d:`M19 9l-7 7-7-7`},null,-1)]],2)),u(` `+h(J(n)?`Hide`:`Show`)+` details `,1)],8,lt)])):nr(n)?(e(),m(`div`,ut,` Duplicate #`+h(q(n)?.duplicateIndex),1)):l(``,!0),p(`p`,dt,[u(` RX `+h(X(n.rx_radio_id))+` `,1),i[27]||=p(`span`,{class:`mx-1`},`•`,-1),u(` TX `+h(n.transmitted?X(n.tx_radio_id):`-`),1)]),n.drop_reason?(e(),m(`p`,ft,h(n.drop_reason),1)):l(``,!0)])])]),p(`div`,pt,[p(`div`,mt,[p(`div`,ht,[Z(n)?(e(),m(f,{key:0},[p(`div`,gt,[i[28]||=p(`span`,{class:`text-[9px] uppercase tracking-wide text-content-muted font-semibold`},` Path `,-1),p(`span`,_t,h(Er(Z(n).hops)),1)]),p(`div`,vt,[(e(!0),m(f,null,r(Z(n).nodes,(t,r)=>(e(),m(f,{key:r},[p(`span`,{class:c([`inline-block max-w-full truncate px-1.5 py-0.5 rounded text-[9px] font-mono font-semibold leading-tight tracking-tight`,r===0?`bg-badge-cyan-bg text-badge-cyan-text`:`bg-background-mute/opacity-medium text-content-muted`]),title:t},h(t),11,yt),r<Z(n).nodes.length-1?(e(),s(pe,{key:0,status:n.drop_reason?`drop`:n.transmitted?`forward`:`received`},null,8,[`status`])):l(``,!0)],64))),128))])],64)):(e(),m(`div`,bt,[p(`span`,xt,h(n.src_hash?.slice(-4).toUpperCase()||`????`),1),i[29]||=p(`svg`,{class:`w-3 h-3 text-content-muted/opacity-heavy`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`},[p(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2.5`,d:`M9 5l7 7-7 7`})],-1),p(`span`,{class:c([`inline-block px-2 py-0.5 rounded text-xs font-mono`,n.dst_hash?`bg-badge-cyan-bg text-badge-cyan-text`:`bg-accent-amber/opacity-medium text-accent-amber`])},h(n.dst_hash?n.dst_hash.slice(-4).toUpperCase():`BCAST`),3)]))])])])]),p(`div`,St,[p(`div`,Ct,[p(`div`,wt,[p(`div`,Tt,[p(`div`,{class:c([`w-2 h-2 rounded-full flex-shrink-0 mt-2`,xr(n.type)])},null,2),p(`div`,Et,[p(`div`,Dt,[p(`span`,Ot,h(Y(n.type)),1),p(`span`,{class:c([`inline-block px-2.5 py-1 rounded text-xs font-medium`,br(n.route)])},h(mr(n.route)),3)]),nr(n)?(e(),m(`span`,kt,` Duplicate #`+h(q(n)?.duplicateIndex),1)):l(``,!0),n.type===4&&Q(n)?(e(),m(`span`,{key:1,class:`inline-flex items-start gap-1 px-2 py-1 rounded-md bg-accent-red/opacity-light text-content-primary dark:text-content-primary border border-accent-red/opacity-heavy text-[10px] font-semibold whitespace-normal break-words leading-tight mt-1`,title:Q(n)||void 0},[i[30]||=p(`span`,{class:`inline-block w-1.5 h-1.5 rounded-full bg-accent-red mt-1 shrink-0`},null,-1),p(`span`,jt,h(Q(n)),1)],8,At)):l(``,!0)])]),p(`div`,Mt,[p(`div`,Nt,[p(`span`,Pt,h(fr(n.timestamp)),1),p(`div`,Ft,[p(`span`,{class:c([`text-sm font-medium`,gr(n)])},h(_r(n)),3),vr(n)?(e(),m(`span`,It,[...i[31]||=[p(`svg`,{class:`w-3 h-3`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`,"aria-hidden":`true`},[p(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M12 3l7 4v5c0 5-3.5 8-7 9-3.5-1-7-4-7-9V7l7-4z`}),p(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M8 8l8 8`})],-1)]])):l(``,!0)])]),ir(n)?(e(),m(`button`,{key:0,type:`button`,class:c([`mobile-duplicate-icon-btn relative inline-flex h-11 w-11 items-center justify-center rounded-xl border border-primary/opacity-heavy bg-primary/opacity-medium text-primary transition-colors duration-200 hover:bg-primary/opacity-medium focus:outline-none focus:ring-1 focus:ring-primary/opacity-medium`,{"border-primary text-primary":J(n)}]),title:or(n),"aria-label":or(n),onClick:ie(e=>dr(n),[`stop`])},[i[32]||=p(`svg`,{class:`w-5 h-5`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`,"aria-hidden":`true`},[p(`rect`,{x:`9`,y:`9`,width:`11`,height:`11`,rx:`2`,ry:`2`,"stroke-width":`2`}),p(`path`,{d:`M6 15H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v1`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`})],-1),p(`span`,Rt,h(ar(n)),1)],10,Lt)):l(``,!0)])]),p(`div`,zt,[p(`div`,Bt,[i[33]||=p(`span`,{class:`text-primary text-xs font-semibold uppercase tracking-wide`},`Path`,-1),p(`span`,Vt,h(Z(n)?Er(Z(n).hops):`Unknown`),1)]),Z(n)?(e(),m(`div`,Ht,[(e(!0),m(f,null,r(Z(n).nodes,(t,r)=>(e(),m(f,{key:`mobile-path-${r}`},[p(`span`,{class:c([`mobile-path-chip inline-flex items-center px-2 py-1 rounded-lg text-xs font-mono font-semibold leading-tight`,r===0?`bg-badge-cyan-bg text-badge-cyan-text`:`text-content-secondary dark:text-content-muted`]),title:t},h(t),11,Ut),r<Z(n).nodes.length-1?(e(),s(pe,{key:0,status:n.drop_reason?`drop`:n.transmitted?`forward`:`received`},null,8,[`status`])):l(``,!0)],64))),128))])):(e(),m(`div`,Wt,[p(`span`,Gt,h(n.src_hash?.slice(-4)||`????`),1),i[34]||=p(`svg`,{class:`w-3 h-3 text-content-muted/opacity-heavy`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`},[p(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2.5`,d:`M9 5l7 7-7 7`})],-1),p(`span`,{class:c([`inline-block px-2 py-0.5 rounded text-xs font-mono font-semibold`,n.dst_hash?`bg-badge-cyan-bg text-badge-cyan-text`:`bg-accent-amber/opacity-medium text-accent-amber`])},h(n.dst_hash?n.dst_hash.slice(-4).toUpperCase():`BCAST`),3)]))]),p(`div`,Kt,[p(`div`,qt,[p(`div`,Jt,[i[35]||=p(`div`,{class:`text-content-muted uppercase tracking-wide text-[10px] mb-1`},`Size`,-1),p(`div`,Yt,h(n.length)+`B`,1)]),p(`div`,Xt,[i[36]||=p(`div`,{class:`text-content-muted uppercase tracking-wide text-[10px] mb-1`},`SNR`,-1),p(`div`,Zt,h(n.snr==null?`N/A`:n.snr.toFixed(1)+` dB`),1)]),p(`div`,Qt,[i[37]||=p(`div`,{class:`text-content-muted uppercase tracking-wide text-[10px] mb-1`},`RSSI`,-1),p(`div`,$t,[n.rssi==null?l(``,!0):(e(),s(ue,{key:0,bars:o(x)(n.snr).bars,color:o(x)(n.snr).color},null,8,[`bars`,`color`])),p(`span`,en,h(n.rssi==null?`TX`:n.rssi.toFixed(0)+` dBm`),1)])]),p(`div`,tn,[i[38]||=p(`div`,{class:`text-content-muted uppercase tracking-wide text-[10px] mb-1`},`Latency`,-1),p(`div`,nn,[Number(n.tx_delay_ms)>0&&n.transmitted?(e(),m(`div`,{key:0,class:c([`w-1.5 h-1.5 rounded-full flex-shrink-0`,Cr(n)])},null,2)):l(``,!0),p(`span`,rn,h(Number(n.tx_delay_ms)>0?wr(Number(n.tx_delay_ms)):`--`),1)])])])]),p(`div`,an,[u(` RX `+h(X(n.rx_radio_id))+` `,1),i[39]||=p(`span`,{class:`mx-1`},`•`,-1),u(` TX `+h(n.transmitted?X(n.tx_radio_id):`-`),1)]),n.drop_reason?(e(),m(`div`,on,h(n.drop_reason),1)):l(``,!0)])])],10,Ve))),128))],2))),128))]),K.value>1?(e(),m(`div`,sn,[p(`div`,cn,[p(`span`,ln,[u(` Showing `+h((S.value-1)*C+1)+` - `+h(Math.min(S.value*C,W.value.length))+` of `+h(W.value.length)+` hash groups `,1),p(`span`,un,`(`+h(U.value.length)+` packets)`,1)]),er.value?(e(),m(`div`,dn,[i[40]||=p(`span`,{class:`text-content-secondary dark:text-content-muted text-xs`},`•`,-1),p(`button`,{onClick:Ar,disabled:A.value,class:c([`glass-card border border-primary rounded-[8px] px-3 py-1.5 text-xs transition-all duration-200 focus:outline-none focus:ring-1 focus:ring-primary/opacity-medium hover:bg-primary/opacity-light`,{"text-primary border-primary cursor-pointer":!A.value,"text-content-secondary dark:text-content-muted border-stroke-subtle dark:border-stroke cursor-not-allowed opacity-50":A.value}])},h(A.value?`Loading...`:`Load ${Math.min(200,w-k.value)} more`),11,fn),p(`span`,pn,`(`+h(k.value)+`/`+h(w)+` max)`,1)])):l(``,!0)]),p(`div`,mn,[p(`button`,{onClick:i[8]||=e=>--S.value,disabled:S.value<=1,class:c([`glass-card border rounded-[10px] px-3 py-2 text-sm transition-all duration-200 focus:outline-none focus:ring-1 focus:ring-primary/opacity-medium prev-next-btn`,{"border-stroke-subtle dark:border-stroke text-content-muted cursor-not-allowed opacity-50":S.value<=1,"border-stroke-subtle dark:border-stroke text-content-primary hover:border-primary dark:hover:border-primary hover:text-primary hover:bg-primary/opacity-light":S.value>1}])},[...i[41]||=[p(`span`,{class:`hidden sm:inline`},`Previous`,-1),p(`span`,{class:`sm:hidden`},`‹`,-1)]],10,hn),p(`div`,gn,[S.value>3?(e(),m(`button`,{key:0,onClick:i[9]||=e=>S.value=1,class:`glass-card border border-stroke-subtle dark:border-stroke hover:border-primary dark:hover:border-primary rounded-[8px] px-3 py-2 text-sm text-content-primary hover:text-primary hover:bg-primary/opacity-light transition-all duration-200 focus:outline-none focus:ring-1 focus:ring-primary/opacity-medium`},` 1 `)):l(``,!0),S.value>4?(e(),m(`span`,_n,`...`)):l(``,!0),(e(!0),m(f,null,r(Array.from({length:Math.min(5,K.value)},(e,t)=>Math.max(1,Math.min(S.value-2,K.value-4))+t).filter(e=>e<=K.value),t=>(e(),m(`button`,{key:t,onClick:e=>S.value=t,class:c([`glass-card border rounded-[8px] px-3 py-2 text-sm transition-all duration-200 focus:outline-none focus:ring-1 focus:ring-primary/opacity-medium page-number`,{"border-primary bg-primary/opacity-light text-primary":S.value===t,"border-stroke-subtle dark:border-stroke text-content-primary hover:border-primary dark:hover:border-primary hover:text-primary hover:bg-primary/opacity-light":S.value!==t}])},h(t),11,vn))),128)),S.value<K.value-3?(e(),m(`span`,yn,`...`)):l(``,!0),S.value<K.value-2?(e(),m(`button`,{key:3,onClick:i[10]||=e=>S.value=K.value,class:`glass-card border border-stroke-subtle dark:border-stroke hover:border-primary dark:hover:border-primary rounded-[8px] px-3 py-2 text-sm text-content-primary hover:text-primary hover:bg-primary/opacity-light transition-all duration-200 focus:outline-none focus:ring-1 focus:ring-primary/opacity-medium`},h(K.value),1)):l(``,!0)]),p(`button`,{onClick:i[11]||=e=>S.value+=1,disabled:S.value>=K.value,class:c([`glass-card border rounded-[10px] px-3 py-2 text-sm transition-all duration-200 focus:outline-none focus:ring-1 focus:ring-primary/opacity-medium prev-next-btn`,{"border-stroke-subtle dark:border-stroke text-content-muted cursor-not-allowed opacity-50":S.value>=K.value,"border-stroke-subtle dark:border-stroke text-content-primary hover:border-primary dark:hover:border-primary hover:text-primary hover:bg-primary/opacity-light":S.value<K.value}])},[...i[42]||=[p(`span`,{class:`hidden sm:inline`},`Next`,-1),p(`span`,{class:`sm:inline`},`›`,-1)]],10,bn)])])):$n.value&&!A.value?(e(),m(`div`,xn,[p(`div`,Sn,[p(`span`,Cn,` Showing `+h(U.value.length)+` packets `,1),i[43]||=p(`span`,{class:`text-content-secondary dark:text-content-muted text-xs`},`•`,-1),p(`button`,{onClick:Ar,class:`glass-card border border-primary rounded-[8px] px-4 py-2 text-sm text-primary hover:bg-primary/opacity-light transition-all duration-200 focus:outline-none focus:ring-1 focus:ring-primary/opacity-medium`},` Load `+h(Math.min(200,w-k.value))+` more records `,1),p(`span`,wn,`(`+h(k.value)+`/`+h(w)+` max)`,1)])])):A.value?(e(),m(`div`,Tn,[p(`div`,En,[te(ce,{size:`sm`}),i[44]||=p(`span`,{class:`text-primary text-sm`},`Loading more records...`,-1)])])):l(``,!0)]),te(de,{packet:M.value,packets:G.value,linkedDuplicatePackets:Jn.value,currentIndex:P.value,canGoPrevious:Yn.value,canGoNext:Xn.value,isOpen:N.value,onPrevious:Rn,onNext:zn,onClose:Bn},null,8,[`packet`,`packets`,`linkedDuplicatePackets`,`currentIndex`,`canGoPrevious`,`canGoNext`,`isOpen`])],64))}}),[[`__scopeId`,`data-v-7be58559`]]);export{T as t}; |