import{u as O,d as e,ab as V,i as t,ac as I,ad as q,F as x,ae as H,af as Z,ag as d,ah as Q,ai as X,g as C,aj as W,ak as Y,al as J,Q as K,t as h,b as U,y as ee,A as z,am as te,T as re,Y as F,D as ae,B as j,a0 as le,_ as A,a1 as se,Z as G,a7 as ne,a9 as ie,l as oe}from"./index-Csmv4Fkv.js";import{c as ce,I as de,a as ue,f as P,b as ge,d as he,g as ve,e as me,j as fe,r as be}from"./index-CBBLUqwt.js";import{D as pe}from"./DocumentTitle-DG90V81t.js";var _e=h('
'),Ce=h(""),we=h(''),Le=h("
'),ye=h('
");const N=(v,l,n,o)=>{const c=be(v.getValue(l),n);return o({itemRank:c}),c.passed},Me=()=>{const v=U();if(!ee())return v("/setup",{replace:!0}),null;let l;const[n]=O(),[o,c]=z(""),{logs:_,paused:f,setPaused:w}=te(),[b,r]=re(z([]),{name:"logsTableSorting",storage:localStorage}),s=[{header:n("sequence"),accessorFn:i=>i.seq},{header:n("type"),accessorFn:i=>i.type,cell:({row:i})=>{const p=i.original.type;let u="";switch(p){case d.Error:u="text-error";break;case d.Warning:u="text-warning";break;case d.Info:u="text-info";break;case d.Debug:u="text-success";break}return(()=>{var $=Se();return F($,u),t($,()=>`[${i.original.type}]`),$})()}},{header:n("payload"),accessorFn:i=>i.payload}],M=ce({filterFns:{fuzzy:N},state:{get globalFilter(){return o()},get sorting(){return b()}},get data(){return _()},sortDescFirst:!0,columns:s,onGlobalFilterChange:c,onSortingChange:r,globalFilterFn:N,getFilteredRowModel:ve(),getSortedRowModel:me(),getCoreRowModel:fe()});return[e(pe,{get children(){return n("logs")}}),(()=>{var i=xe(),p=i.firstChild,u=p.firstChild,$=p.nextSibling,D=$.firstChild,R=D.firstChild,B=R.nextSibling;return u.$$input=a=>c(a.target.value),t(p,e(j,{class:"btn-primary join-item btn-sm",onClick:()=>w(a=>!a),get icon(){return ae(()=>!!f())()?e(de,{}):e(ue,{})}}),null),t(p,e(j,{class:"btn-primary join-item btn-sm",onClick:()=>l==null?void 0:l.showModal(),get icon(){return e(le,{})}}),null),t(R,e(A,{get each(){return M.getHeaderGroups()},children:a=>{const m=a();return(()=>{var g=Ce();return t(g,e(A,{get each(){return m.headers},children:y=>{const S=y();return(()=>{var E=we(),T=E.firstChild,L=T.firstChild;return se(L,"click",S.column.getToggleSortingHandler(),!0),t(L,()=>P(S.column.columnDef.header,S.getContext())),t(T,()=>({asc:e(ge,{}),desc:e(he,{})})[S.column.getIsSorted()]??null,null),C(()=>F(L,G(S.column.getCanSort()&&"cursor-pointer select-none","flex-1"))),E})()}})),g})()}})),t(B,e(x,{get each(){return M.getRowModel().rows},children:a=>(()=>{var m=ye();return t(m,e(x,{get each(){return a.getVisibleCells()},children:g=>(()=>{var y=Le();return t(y,()=>P(g.column.columnDef.cell,g.getContext())),y})()})),m})()})),t(i,e($e,{ref:a=>l=a}),null),C(a=>{var m=n("search"),g=G(ne(W()),"table relative rounded-none");return m!==a.e&&ie(u,"placeholder",a.e=m),g!==a.t&&F(D,a.t=g),a},{e:void 0,t:void 0}),i})()]};oe(["input","click"]);export{Me as default};