@ehfuse/mui-virtual-data-table 1.7.3 → 1.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -154,6 +154,9 @@ function App() {
154
154
  colorMode={"light" | "dark"} // notion colors independent of the MUI palette mode
155
155
  mobile={boolean | { query?, renderRow? }} // 1.6.0 card list on narrow screens (see "Mobile list")
156
156
  scrollParent={HTMLElement | null} // 1.7.0 virtualize against an outer (page) scroller
157
+ columnResize={boolean | { minWidth? }} // 1.8.0 drag the header's right edge to resize a column (see "Column resize")
158
+ columnWidths={Record<string, number>} // 1.8.0 resized widths by column id (you store them)
159
+ onColumnWidthsChange={(widths) => void} // 1.8.0 fired once on release / on double-click reset
157
160
 
158
161
  // Optional - 1.4.0 header context menu (right-click on th never shows the browser menu)
159
162
  onSortClear={() => void} // adds "정렬 풀기" to the header menu (and re-picking the active direction clears)
@@ -243,6 +246,29 @@ string `emptyMessage` = one light grey line under the header, footer cells use t
243
246
  and grows with the page, so things bound to the page scroller (collapsing app bar, scroll-to-top, pull-to-refresh) keep working.
244
247
  Pass `null` while the element is not known yet (nothing is drawn until then). Works with `mobile` and `onEndReached`.
245
248
 
249
+ ### Column resize (1.8.0)
250
+
251
+ `columnResize` puts a grip on each header cell's right edge (`col-resize` cursor, a thin line on hover). Drag it to resize that column,
252
+ double-click it to go back to the column's own `width`. The table does not store anything — keep the widths where you like
253
+ (account settings, localStorage …) and pass them back with `columnWidths`. Without `columnWidths` the table only remembers them until it remounts.
254
+
255
+ ```tsx
256
+ const [widths, setWidths] = useAccountSetting("customer.list"); // Record<columnId, px>
257
+ <VirtualDataTable
258
+ columnResize // or { minWidth: 60 } — default minimum 48px (a column's own minWidth wins)
259
+ columnWidths={isPhone ? undefined : widths}
260
+ onColumnWidthsChange={setWidths} // once on release; double-click → the key is removed
261
+ ...
262
+ />
263
+ ```
264
+
265
+ - While dragging only CSS variables on the table box change — rows are not re-rendered, virtualization and horizontal scroll stay as they are.
266
+ - The click that follows a drag is swallowed, so releasing over a header never sorts / opens the header menu.
267
+ - A flexible column (no `width`) keeps a minimum of its `minWidth` (or the resize minimum) once anything was resized; when every column ends up
268
+ with a pixel width the table is as wide as their sum (no stretching that would make drawn widths differ from the dragged ones).
269
+ - Works with `pinned: "left"` (sticky offsets follow), `autoHeight`, `framed`, `tableLayout`, `variant="notion"`, `pinnedRows`, footer.
270
+ In the `mobile` card list there is no grip and `columnWidths` is ignored.
271
+
246
272
  ### Mobile list (1.6.0)
247
273
 
248
274
  `mobile` turns the table into a card list on narrow screens (default query `(max-width:599.95px)`): no header row, one card per row,
package/dist/index.d.ts CHANGED
@@ -8,4 +8,4 @@
8
8
  export { VirtualDataTable } from "./VirtualDataTable";
9
9
  export { HeaderMenu, HeaderMenuItem, HeaderMenuDivider, HeaderMenuIcon, HeaderFilterIcon, headerMenuAnchor, HEADER_MENU_ICON_PATHS, HEADER_MENU_ITEM_SX, HEADER_MENU_FONT_SIZE, HEADER_MENU_ICON_SIZE, HEADER_MENU_ITEM_HEIGHT, } from "./HeaderMenu";
10
10
  export type { HeaderMenuProps, HeaderMenuItemProps, HeaderMenuOption, HeaderMenuSortConfig, HeaderMenuFilterConfig, HeaderMenuSortDirection, } from "./HeaderMenu";
11
- export type { DataColumn, SortDirection, SortableFilter, VirtualDataTableProps, VDTMobileConfig, VDTMobileSlot, } from "./types";
11
+ export type { DataColumn, SortDirection, SortableFilter, VirtualDataTableProps, VDTMobileConfig, VDTMobileSlot, VDTColumnResizeConfig, VDTColumnWidths, } from "./types";
package/dist/index.esm.js CHANGED
@@ -1,7 +1,7 @@
1
- import{forwardRef as Oe,useCallback as P,useMemo as ne,useRef as T,useEffect as G,memo as Gn,useState as Ae}from"react";import{Box as y,Table as Zn,TableBody as Qt,TableCell as re,TableContainer as Qn,TableHead as Jn,TableFooter as er,TableRow as Pe,TableSortLabel as Mt,Paper as tr,Typography as nr,useTheme as rr,useMediaQuery as or}from"@mui/material";import{TableVirtuoso as ar}from"react-virtuoso";import{jsx as gt}from"react/jsx-runtime";import{useRef as jt,useState as Pn,useEffect as Nn}from"react";import{Box as On,CircularProgress as zn}from"@mui/material";var Ie=function(){return Ie=Object.assign||function(c){for(var i,C=1,g=arguments.length;C<g;C++){i=arguments[C];for(var d in i)Object.prototype.hasOwnProperty.call(i,d)&&(c[d]=i[d])}return c},Ie.apply(this,arguments)};function Kt(a){var c=a.visible,i=a.onComplete,C=a.fadeoutDuration,g=C===void 0?200:C,d=a.exitDelay,N=d===void 0?0:d,j=a.size,oe=j===void 0?40:j,Z=a.className,Q=a.style,L=a.sx,O=a.indicator,B=a.background,A=B===void 0?{show:!0,color:"255, 255, 255",opacity:.9}:B,M=jt(void 0),k=jt(null),ae=Pn(c),F=ae[0],v=ae[1],ie=A.show,u=ie===void 0?!0:ie,R=A.color,E=R===void 0?"255, 255, 255":R,K=A.opacity,J=K===void 0?.9:K;if(Nn(function(){var xe=M.current;if(xe===!0&&c===!1&&k.current){var ze=k.current;ze.style.opacity="0",setTimeout(function(){v(!1),i?.()},g+N)}else c===!0&&(v(!0),k.current&&(k.current.style.opacity="1"));M.current=c},[c,i,g,N]),!F)return null;var Ge=function(){return typeof O=="string"?gt("img",{src:O,alt:"Loading",style:{width:oe,height:oe}}):O||gt(zn,{size:oe})},ee=function(){return u?E.startsWith("rgba")?{backgroundColor:E}:/^\d+,\s*\d+,\s*\d+$/.test(E)?{backgroundColor:"rgba(".concat(E,", ").concat(J,")")}:J!==1?{backgroundColor:E,"&::before":{content:'""',position:"absolute",top:0,left:0,right:0,bottom:0,backgroundColor:E,opacity:J,zIndex:-1}}:{backgroundColor:E}:{backgroundColor:"transparent"}};return gt(On,{ref:k,className:Z,style:Ie({},Q),sx:Ie(Ie({position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e3,opacity:c?1:0,transition:"opacity ".concat(g,"ms ease-out")},ee()),L),children:Ge()})}import{Fragment as Wn,jsx as qt,jsxs as Fn}from"react/jsx-runtime";var _n=`
1
+ import{forwardRef as Ve,useCallback as k,useMemo as oe,useRef as M,useEffect as Q,memo as xr,useState as Me}from"react";import{Box as w,Table as yr,TableBody as xn,TableCell as de,TableContainer as vr,TableHead as Cr,TableFooter as Mr,TableRow as _e,TableSortLabel as Pt,Paper as wr,Typography as Sr,useTheme as Tr,useMediaQuery as Rr}from"@mui/material";import{TableVirtuoso as Hr}from"react-virtuoso";import{jsx as Ht}from"react/jsx-runtime";import{useRef as fn,useState as rr,useEffect as or}from"react";import{Box as ar,CircularProgress as ir}from"@mui/material";var Oe=function(){return Oe=Object.assign||function(c){for(var l,g=1,h=arguments.length;g<h;g++){l=arguments[g];for(var u in l)Object.prototype.hasOwnProperty.call(l,u)&&(c[u]=l[u])}return c},Oe.apply(this,arguments)};function hn(o){var c=o.visible,l=o.onComplete,g=o.fadeoutDuration,h=g===void 0?200:g,u=o.exitDelay,W=u===void 0?0:u,J=o.size,ce=J===void 0?40:J,ae=o.className,ie=o.style,P=o.sx,_=o.indicator,A=o.background,z=A===void 0?{show:!0,color:"255, 255, 255",opacity:.9}:A,S=fn(void 0),D=fn(null),ue=rr(c),X=ue[0],T=ue[1],pe=z.show,f=pe===void 0?!0:pe,E=z.color,I=E===void 0?"255, 255, 255":E,ee=z.opacity,le=ee===void 0?.9:ee;if(or(function(){var we=S.current;if(we===!0&&c===!1&&D.current){var $e=D.current;$e.style.opacity="0",setTimeout(function(){T(!1),l?.()},h+W)}else c===!0&&(T(!0),D.current&&(D.current.style.opacity="1"));S.current=c},[c,l,h,W]),!X)return null;var it=function(){return typeof _=="string"?Ht("img",{src:_,alt:"Loading",style:{width:ce,height:ce}}):_||Ht(ir,{size:ce})},se=function(){return f?I.startsWith("rgba")?{backgroundColor:I}:/^\d+,\s*\d+,\s*\d+$/.test(I)?{backgroundColor:"rgba(".concat(I,", ").concat(le,")")}:le!==1?{backgroundColor:I,"&::before":{content:'""',position:"absolute",top:0,left:0,right:0,bottom:0,backgroundColor:I,opacity:le,zIndex:-1}}:{backgroundColor:I}:{backgroundColor:"transparent"}};return Ht(ar,{ref:D,className:ae,style:Oe({},ie),sx:Oe(Oe({position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e3,opacity:c?1:0,transition:"opacity ".concat(h,"ms ease-out")},se()),P),children:it()})}import{Fragment as sr,jsx as gn,jsxs as dr}from"react/jsx-runtime";var lr=`
2
2
  .vdt-css-spinner{box-sizing:border-box;border-radius:50%;border:4px solid rgba(28,64,125,0.14);border-top-color:#1c407d;animation:vdt-css-spinner-spin .75s linear infinite}
3
3
  @keyframes vdt-css-spinner-spin{to{transform:rotate(360deg)}}
4
- `;function Gt({size:a=54}){return Fn(Wn,{children:[qt("style",{children:_n}),qt("span",{className:"vdt-css-spinner",role:"progressbar","aria-label":"loading",style:{display:"inline-block",width:a,height:a}})]})}import je,{useMemo as Vn,useState as $n}from"react";import{Box as Be,Divider as Xn,InputBase as Yn,Menu as Un,MenuItem as jn,SvgIcon as Kn}from"@mui/material";import{jsx as h,jsxs as qe}from"react/jsx-runtime";var bt=14,mt=18,xt=34,U={asc:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z",desc:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z",checked:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z",unchecked:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z",radioOn:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm0-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z",radioOff:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z",filter:"M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z",search:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"};function me({d:a,size:c=mt,color:i}){return h(Kn,{sx:{fontSize:c,flexShrink:0,color:i},children:h("path",{d:a})})}function yt({size:a=14,active:c,color:i}){let C={stroke:"currentColor",strokeWidth:1.8,strokeMiterlimit:10,strokeLinecap:"round",strokeLinejoin:"round"};return qe(Be,{component:"svg",viewBox:"0 0 24 24",fill:"none","aria-hidden":!0,sx:{width:a,height:a,flexShrink:0,color:c?"primary.main":i??"currentColor",verticalAlign:"middle"},children:[h("path",{d:"M2 17.5H7",...C}),h("path",{d:"M22 6.5H17",...C}),h("path",{d:"M13 17.5H22",...C}),h("path",{d:"M11 6.5H2",...C}),h("path",{d:"M10 20.3999C8.34315 20.3999 7 19.0568 7 17.3999C7 15.743 8.34315 14.3999 10 14.3999C11.6569 14.3999 13 15.743 13 17.3999C13 19.0568 11.6569 20.3999 10 20.3999Z",...C}),h("path",{d:"M14 9.3999C15.6569 9.3999 17 8.05676 17 6.3999C17 4.74305 15.6569 3.3999 14 3.3999C12.3431 3.3999 11 4.74305 11 6.3999C11 8.05676 12.3431 9.3999 14 9.3999Z",...C})]})}var Zt={gap:1,fontSize:bt,lineHeight:"20px",minHeight:xt,py:"7px",px:1.5};function q({icon:a,iconSpace:c,selected:i,disabled:C,muted:g,onClick:d,sx:N,children:j}){return qe(jn,{selected:i,disabled:C,onClick:d,sx:[Zt,g?{color:"text.secondary"}:{},...Array.isArray(N)?N:N?[N]:[]],children:[a??(c?h(Be,{component:"span",sx:{width:mt,flexShrink:0}}):null),j]})}function Ke(){return h(Xn,{sx:{my:"4px !important"}})}function qn(a,c){let i=a.getBoundingClientRect();return{left:c??i.left,top:i.bottom}}function Ct({open:a,anchorPosition:c,anchorEl:i,onClose:C,sort:g,filter:d,header:N,children:j,minWidth:oe=180,maxHeight:Z=420}){let[Q,L]=$n(""),O=d?.multiple!==!1,B=d?.value??[],A=Vn(()=>{if(!d)return[];let u=d.options;return d.emptyLabel&&!u.some(R=>R.value==="")?[...u,{value:"",label:d.emptyLabel}]:u},[d]),M=!!d&&(d?.searchable??A.length>10),k=Q.trim().toLowerCase(),ae=k?A.filter(u=>u.label.toLowerCase().includes(k)):A,F=()=>{L(""),C()},v=[];if(N&&v.push(...je.Children.toArray(N).map((u,R)=>je.isValidElement(u)?je.cloneElement(u,{key:`h${R}`}):u)),g){let u=R=>{F(),g.onChange(g.active===R&&g.clearable!==!1?null:R)};v.push(h(q,{selected:g.active==="asc",onClick:()=>u("asc"),icon:h(me,{d:U.asc,color:"text.secondary"}),children:"\uC624\uB984\uCC28\uC21C \uC815\uB82C"},"sort-asc"),h(q,{selected:g.active==="desc",onClick:()=>u("desc"),icon:h(me,{d:U.desc,color:"text.secondary"}),children:"\uB0B4\uB9BC\uCC28\uC21C \uC815\uB82C"},"sort-desc")),g.active&&g.clearable!==!1&&v.push(h(q,{muted:!0,iconSpace:!0,onClick:()=>{F(),g.onChange(null)},children:"\uC815\uB82C \uD480\uAE30"},"sort-clear"))}return g&&d&&v.push(h(Ke,{},"div-sort")),d&&(M&&v.push(qe(Be,{onKeyDown:u=>u.stopPropagation(),sx:{display:"flex",alignItems:"center",gap:1,px:1.5,pb:.5,minHeight:xt},children:[h(me,{d:U.search,color:"text.secondary"}),h(Yn,{autoFocus:!0,value:Q,onChange:u=>L(u.target.value),placeholder:d.searchPlaceholder??"\uCC3E\uAE30",sx:{flex:1,fontSize:bt}})]},"search")),!O&&d.allLabel&&v.push(h(q,{selected:B.length===0,onClick:()=>{F(),d.onChange([])},icon:h(me,{d:B.length===0?U.radioOn:U.radioOff,color:B.length===0?"primary.main":"text.disabled"}),children:d.allLabel},"f-all")),A.length===0&&v.push(h(q,{disabled:!0,iconSpace:!0,children:d.emptyText??"\uACE0\uB97C \uAC12\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."},"f-none")),ae.forEach(u=>{let R=B.includes(u.value),E=()=>{if(O){d.onChange(R?B.filter(J=>J!==u.value):[...B,u.value]);return}F(),d.onChange(R?[]:[u.value])},K=O?R?U.checked:U.unchecked:R?U.radioOn:U.radioOff;v.push(qe(q,{selected:!O&&R,onClick:E,icon:h(me,{d:K,color:R?"primary.main":"text.disabled"}),children:[u.icon,h(Be,{component:"span",sx:{flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:u.render??u.label}),typeof u.count=="number"?h(Be,{component:"span",sx:{color:"text.secondary",ml:1,fontVariantNumeric:"tabular-nums"},children:u.count}):null]},`f:${u.value||"(empty)"}`))}),M&&k&&ae.length===0&&v.push(h(q,{disabled:!0,iconSpace:!0,children:"\uCC3E\uB294 \uAC12\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."},"f-nohit")),B.length>0&&v.push(h(Ke,{},"div-filter"),h(q,{muted:!0,iconSpace:!0,onClick:()=>{F(),d.onChange([])},children:d.clearLabel??"\uAC70\uB974\uAE30 \uD480\uAE30"},"f-clear"))),j&&(v.length>0&&v.push(h(Ke,{},"div-children")),v.push(...je.Children.toArray(j))),h(Un,{open:a&&(!!c||!!i),...!c&&!!i?{anchorEl:i}:{anchorReference:"anchorPosition",anchorPosition:c??void 0},onClose:F,transitionDuration:0,disableAutoFocusItem:M,onContextMenu:u=>u.preventDefault(),onClick:u=>u.stopPropagation(),slotProps:{paper:{sx:{maxHeight:Z,minWidth:oe}},list:{sx:{py:.5}}},children:v})}import ir from"@ehfuse/overlay-scrollbar";import{Fragment as Ne,jsx as o,jsxs as I}from"react/jsx-runtime";var lr={alignment:"default",margin:0,radius:0},vt=5,sr={bg:"#ffffff",border:"#e6e6e3",borderStrong:"#dedddb",headerColor:"#787774",hoverBg:"#f8f8f7",emptyColor:"#9b9a97",selectedBg:"#dbeafe",selectedBar:"#3b82f6"},Jt="12px",dr={bg:"#1e1e1e",border:"#2c333c",borderStrong:"#3b434e",headerColor:"#a3adbb",hoverBg:"#272d36",emptyColor:"#7d8590",selectedBg:"rgba(59, 130, 246, 0.22)",selectedBar:"#60a5fa"},en=Oe((a,c)=>o("div",{...a,ref:c}));en.displayName="VdtPlainScroller";var cr="(max-width:599.95px)";function wt(a){return!!(a.filterOptions&&a.onFilterChange)}function ur({data:a,loading:c=!1,columns:i,onRowClick:C,getRowId:g,selectedRowId:d,selectedRowSx:N,rowHeight:j,columnHeight:oe,striped:Z,rowDivider:Q=!0,onSort:L,onSortClear:O,onHeaderContextMenu:B,onLoadMore:A,sortBy:M,sortDirection:k,showPaper:ae=!0,paddingX:F,paddingTop:v=0,paddingBottom:ie=0,rowHoverColor:u,rowHoverOpacity:R,viewportBuffer:E,overscan:K,initialItemCount:J,scrollbars:Ge,emptyMessage:ee="NO DATA",autoHeight:xe=!1,LoadingComponent:ze,showFooter:tn,footerHeight:ye,footerSx:Ce,variant:nn="default",framed:fe=!0,headerTopBorder:rn=!1,rowHeightMode:on="fixed",tableLayout:_e="fixed",renderFullWidthRow:Ze,fullWidthRowSx:Me,onRowContextMenu:St,pinnedRows:ve,pinnedRowsMaxHeight:Qe,pinnedRowsSx:we,resetScrollOnDataChange:Tt=!0,rowKeyFromId:an=!1,onEndReached:Rt,colorMode:ln,mobile:Ht,scrollParent:Je}){let x=nn==="notion",et=rr(),b=(ln??et.palette.mode)==="dark"?dr:sr,kt=(ve?.length??0)>0,le=oe??(x?40:56),V=j??(x?48:50),We=fe?F??(x?"12px":"1rem"):0,Se=Ht===!0?{}:Ht||null,sn=or(Se?.query??cr,{noSsr:!0}),$=!!Se&&sn,Te=!!Je,se=xe||Te,tt=on==="auto"||$,nt=u??(x?b.hoverBg:void 0),Et=R??(x?1:void 0),dn=Math.max(V*12,480),cn=Math.max(V*12,480),un=typeof E=="number"?E:E?.top??dn,pn=typeof E=="number"?E:E?.bottom??cn,fn=Math.max(V*8,420),hn=Math.max(V*10,520),gn=typeof K=="number"?K:{main:K?.main??fn,reverse:K?.reverse??hn},Re=V+(Q?1:0),bn=ne(()=>x?{backgroundColor:b.selectedBg,"& > td:first-of-type":{boxShadow:`inset 3px 0 0 ${b.selectedBar}`},"& > td[data-vdt-pinned]":{backgroundColor:b.selectedBg}}:void 0,[x,b]),X=N??bn,Fe=!X||typeof X!="function",mn=ne(()=>!Fe||d===null||d===void 0||!X?null:{[`& tbody tr[data-row-id="${String(d).replace(/["\\]/g,"\\$&")}"]`]:X},[Fe,d,X]),fr=typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"),[w]=Ae(()=>typeof window>"u"?!1:window.localStorage.getItem("vdt-perf-debug")==="1"),m=T({wheelEvents:0,wheelInputPx:0,wheelHandlerMs:0,wheelRafFlushes:0,wheelRafMs:0,rangeChangedCalls:0,rangeChangedMs:0,rowContentCalls:0,rowContentMs:0,rowContentMaxMs:0,cellRenderCalls:0,cellRenderMs:0,cellRenderMaxMs:0}),rt=P(t=>{if(!w)return;let e=m.current;if(!(e.wheelEvents>0||e.rangeChangedCalls>0||e.rowContentCalls>0||e.cellRenderCalls>0))return;let s=e.rowContentCalls>0?e.rowContentMs/e.rowContentCalls:0,f=e.cellRenderCalls>0?e.cellRenderMs/e.cellRenderCalls:0;console.log("[VDT perf]",{reason:t,wheel:{events:e.wheelEvents,inputPx:Math.round(e.wheelInputPx),handlerMs:Number(e.wheelHandlerMs.toFixed(2)),rafFlushes:e.wheelRafFlushes,rafMs:Number(e.wheelRafMs.toFixed(2))},rangeChanged:{calls:e.rangeChangedCalls,totalMs:Number(e.rangeChangedMs.toFixed(2))},rowContent:{calls:e.rowContentCalls,totalMs:Number(e.rowContentMs.toFixed(2)),avgMs:Number(s.toFixed(3)),maxMs:Number(e.rowContentMaxMs.toFixed(3))},cellRender:{calls:e.cellRenderCalls,totalMs:Number(e.cellRenderMs.toFixed(2)),avgMs:Number(f.toFixed(3)),maxMs:Number(e.cellRenderMaxMs.toFixed(3))}}),m.current={wheelEvents:0,wheelInputPx:0,wheelHandlerMs:0,wheelRafFlushes:0,wheelRafMs:0,rangeChangedCalls:0,rangeChangedMs:0,rowContentCalls:0,rowContentMs:0,rowContentMaxMs:0,cellRenderCalls:0,cellRenderMs:0,cellRenderMaxMs:0}},[w]);G(()=>{if(!w||typeof window>"u")return;console.log("[VDT perf] enabled (localStorage vdt-perf-debug=1)");let t=window.setInterval(()=>{rt("interval")},1500);return()=>{window.clearInterval(t),rt("cleanup")}},[rt,w]);let Lt=ne(()=>Oe((t,e)=>{let r=T(null),s=T(0),f=T(null);return G(()=>{let n=r.current;if(!n)return;let l=H=>{let p=w?performance.now():0;if(H.shiftKey||Math.abs(H.deltaX)>Math.abs(H.deltaY))return;let D=H.target?.closest?.("[data-vdt-inner-scroll]");if(D&&n.contains(D)&&(H.deltaY<0?D.scrollTop>0:D.scrollTop+D.clientHeight<D.scrollHeight-1))return;H.preventDefault();let te=H.deltaY;H.deltaMode===1?te*=40:H.deltaMode===2&&(te*=n.clientHeight),w&&(m.current.wheelEvents+=1,m.current.wheelInputPx+=te),s.current+=te,f.current===null&&(f.current=requestAnimationFrame(()=>{let ge=w?performance.now():0,S=Math.max(n.clientHeight*.4,160),_=Math.max(-S,Math.min(S,s.current));s.current=0,f.current=null,_!==0&&(n.scrollTop+=_),w&&(m.current.wheelRafFlushes+=1,m.current.wheelRafMs+=performance.now()-ge)}),w&&(m.current.wheelHandlerMs+=performance.now()-p))};return n.addEventListener("wheel",l,{passive:!1}),()=>{n.removeEventListener("wheel",l),f.current!==null&&(cancelAnimationFrame(f.current),f.current=null),s.current=0}},[]),o(ir,{detectInnerScroll:!0,track:lr,...Ge,children:o(Qn,{component:y,...t,ref:n=>{r.current=n,typeof e=="function"?e(n):e&&(e.current=n)},sx:{userSelect:"auto",WebkitUserSelect:"auto",position:"relative",width:"100%",height:"100%",overflow:"auto",display:"flex",flexDirection:"column",scrollbarWidth:"none",msOverflowStyle:"none",transform:"translateZ(0)",backfaceVisibility:"hidden",willChange:"scroll-position","&::-webkit-scrollbar":{display:"none"},"& .MuiTable-root":{paddingRight:x?0:We,paddingTop:typeof v=="number"?`${v}px`:v,paddingBottom:typeof ie=="number"?`${ie}px`:ie}}})})}),[]),ot=ne(()=>{if(Z===!0)return"#f5f5f5";if(typeof Z=="string")return Z},[Z]),[xn,Dt]=Ae(c),[yn,Cn]=Ae(0);G(()=>{c&&Dt(!0)},[c]);let It=P(()=>{Dt(!1)},[]),Mn=xn,hr=c&&a.length>0,at=T(!1),it=T(-1),lt=T(null),st=T(null),[vn,wn]=Ae(!1),Ve=P(()=>{let t=st.current;t&&wn(t.scrollHeight>t.clientHeight+1)},[]);G(()=>{let t=st.current;if(!t||typeof ResizeObserver>"u")return;let e=new ResizeObserver(()=>Ve());return e.observe(t),()=>e.disconnect()},[Ve,xe]);let dt=T(C);dt.current=C;let He=T(g);He.current=g;let ct=T(St);ct.current=St;let Bt=T(Rt);Bt.current=Rt;let At=T(null),$e=ne(()=>{let t=new Map,e=0;return i.forEach(r=>{r.pinned==="left"&&(t.set(String(r.id),e),e+=typeof r.width=="number"?r.width:0)}),t},[i]),ut=ne(()=>{if(i.some(t=>typeof t.minWidth=="number"))return i.reduce((t,e)=>t+(typeof e.width=="number"?e.width:typeof e.minWidth=="number"?e.minWidth:0),0)},[i]),he=P((t,e)=>{let r=$e.get(String(t.id));return r===void 0?{}:{position:"sticky",left:r,zIndex:e?3:1}},[$e]),Xe=!!C,ke=T(!1),de=T({x:0,y:0});G(()=>{let t=e=>{let r=e.clientX-de.current.x,s=e.clientY-de.current.y;Math.sqrt(r*r+s*s)>vt&&(ke.current=!0)};return document.addEventListener("mousemove",t),()=>{document.removeEventListener("mousemove",t)}},[]),G(()=>{let t=document.querySelector('[data-testid="virtuoso-scroller"]');t&&t.querySelectorAll(".MuiTableSortLabel-root").forEach(r=>{let s=new MouseEvent("mouseleave",{bubbles:!0,cancelable:!0});r.dispatchEvent(s)})},[M]);let Ye=P(t=>{if(!L)return;L(t,M===t&&k==="asc"?"desc":"asc")},[L,M,k]),[Ee,Pt]=Ae(null),Nt=T(B);Nt.current=B;let Ot=T(L);Ot.current=L;let Le=P((t,e)=>{if(!t){e.preventDefault();return}t.headerProps?.onContextMenu?.(e);let r=e.defaultPrevented;if(r||(r=Nt.current?.(t,e)===!0||e.defaultPrevented),e.preventDefault(),r||t.headerMenu===!1||!!!((t.sortMenu??t.sortable)&&Ot.current)&&!wt(t))return;let f=e.currentTarget.getBoundingClientRect();Pt({colId:String(t.id),x:e.clientX,y:f.bottom})},[]),ce=P(t=>{if(!wt(t))return t.text;let e=!!(t.filterValues&&t.filterValues.length>0);return I(y,{component:"span",sx:{display:"inline-flex",alignItems:"center",gap:.5,maxWidth:"100%",color:e?"primary.main":void 0,fontWeight:e?600:void 0,verticalAlign:"middle"},children:[o(y,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:t.text}),o(yt,{active:e})]})},[]),Sn=P(t=>{let e=w?performance.now():0;if(Bt.current?.(),!A){w&&(m.current.rangeChangedCalls+=1,m.current.rangeChangedMs+=performance.now()-e);return}if(c&&a.length===0){w&&(m.current.rangeChangedCalls+=1,m.current.rangeChangedMs+=performance.now()-e);return}let r=a.length>=30,s=t>=a.length-1,f=it.current===a.length;if(s&&r&&!at.current&&!f){at.current=!0,it.current=a.length;let n=a.length;A(n,50)}w&&(m.current.rangeChangedCalls+=1,m.current.rangeChangedMs+=performance.now()-e)},[a.length,c,A,w]);G(()=>{c||(at.current=!1)},[c]),G(()=>{a.length===0&&Cn(t=>t+1)},[a.length]);let zt=T(Tt);zt.current=Tt;let pt=T(a.length),ft=T(void 0);G(()=>{let t=pt.current,e=a.length,r=e>0?He.current?He.current(a[0],0):a[0]:void 0,s=ft.current;if(e>t&&t>0){pt.current=e,ft.current=r;return}let f=e<t||t>0&&r!==s;f&&(it.current=-1),lt.current&&e>0&&f&&zt.current&&lt.current.scrollToIndex({index:0,align:"start",behavior:"auto"}),pt.current=e,ft.current=r},[a]);let _t=P(()=>{let t={},e=[];if(i.forEach(n=>{n.group?(t[n.group]||(t[n.group]=[]),t[n.group].push(n)):e.push(n)}),!(Object.keys(t).length>0))return o(Pe,{children:i.map(n=>o(re,{align:n.align||"left",title:typeof n.text=="string"?n.text:void 0,...n.headerProps,onContextMenu:l=>Le(n,l),style:{width:n.width,minWidth:n.width??n.minWidth,...n.style,fontWeight:"bold",position:"sticky",top:0,zIndex:2,padding:"16px",...he(n,!0),...n.headerProps?.style},children:n.sortable?o("div",{style:{display:"flex",alignItems:"center",justifyContent:n.align==="center"?"center":n.align==="right"?"flex-end":"flex-start",position:"relative",width:"100%"},children:I(y,{className:"vdt-sort-box",sx:{position:"relative",cursor:"default","&:hover .MuiTableSortLabel-root":{opacity:"1 !important","& .MuiSvgIcon-root":{color:"#000",opacity:"1 !important"}}},onClick:()=>Ye(String(n.id)),children:[ce(n),o(Mt,{active:M===n.id,direction:M===n.id?k:"desc",sx:{position:"absolute",left:"100%",top:"50%",transform:"translateY(-50%)",marginLeft:"4px",minWidth:"auto",width:"16px",height:"16px",cursor:"default",opacity:M===n.id?1:0,transition:"opacity 0.2s ease","& .MuiTableSortLabel-icon":{position:"relative",marginLeft:0,marginRight:0,opacity:1,transition:"color 0.2s ease"},"& .MuiTableSortLabel-iconDirectionAsc":{transform:"rotate(180deg)"},"& .MuiTableSortLabel-iconDirectionDesc":{transform:"rotate(0deg)"}}})]})}):ce(n)},String(n.id)))});let s=[...e.map(n=>o(re,{rowSpan:2,align:n.align||"left",title:typeof n.text=="string"?n.text:void 0,...n.headerProps,onContextMenu:l=>Le(n,l),style:{width:n.width,minWidth:n.width,...n.style,fontWeight:"bold",position:"sticky",top:0,zIndex:2,padding:"16px",...he(n,!0),...n.headerProps?.style},children:n.sortable&&L?o("div",{style:{display:"flex",alignItems:"center",justifyContent:n.align==="center"?"center":n.align==="right"?"flex-end":"flex-start",position:"relative",width:"100%"},children:I(y,{className:"vdt-sort-box",sx:{position:"relative",cursor:"default","&:hover .MuiTableSortLabel-root":{opacity:"1 !important","& .MuiSvgIcon-root":{color:"#000",opacity:"1 !important"}}},onClick:()=>Ye(String(n.id)),children:[ce(n),o(Mt,{active:M===n.id,direction:M===n.id?k:"desc",sx:{position:"absolute",left:"100%",top:"50%",transform:"translateY(-50%)",marginLeft:"4px",minWidth:"auto",width:"16px",height:"16px",cursor:"default",opacity:M===n.id?1:0,transition:"opacity 0.2s ease","&:hover":{opacity:"1 !important","& .MuiSvgIcon-root":{color:"#000",opacity:"1 !important"}},"& .MuiTableSortLabel-icon":{position:"relative",marginLeft:0,marginRight:0,opacity:1,transition:"color 0.2s ease"},"& .MuiTableSortLabel-iconDirectionAsc":{transform:"rotate(180deg)"},"& .MuiTableSortLabel-iconDirectionDesc":{transform:"rotate(0deg)"}}})]})}):ce(n)},String(n.id))),...Object.entries(t).map(([n,l])=>o(re,{align:"center",colSpan:l.length,onContextMenu:H=>Le(null,H),style:{fontWeight:"bold",position:"sticky",top:0,zIndex:2,padding:"16px"},children:n},n))],f=[...Object.values(t).flat().map(n=>o(re,{align:n.align||"left",title:typeof n.text=="string"?n.text:void 0,...n.headerProps,onContextMenu:l=>Le(n,l),style:{width:n.width,minWidth:n.width,...n.style,fontWeight:"bold",position:"sticky",top:0,zIndex:2,padding:"16px",...he(n,!0),...n.headerProps?.style},children:n.sortable&&L?o("div",{style:{display:"flex",alignItems:"center",justifyContent:n.align==="center"?"center":n.align==="right"?"flex-end":"flex-start",position:"relative",width:"100%"},children:I(y,{className:"vdt-sort-box",sx:{position:"relative",cursor:"default","&:hover .MuiTableSortLabel-root":{opacity:"1 !important","& .MuiSvgIcon-root":{color:"#000",opacity:"1 !important"}}},onClick:()=>Ye(String(n.id)),children:[ce(n),o(Mt,{active:M===n.id,direction:M===n.id?k:"desc",sx:{position:"absolute",left:"100%",top:"50%",transform:"translateY(-50%)",marginLeft:"4px",minWidth:"auto",width:"16px",height:"16px",cursor:"default",opacity:M===n.id?1:0,transition:"opacity 0.2s ease","&:hover":{opacity:"1 !important","& .MuiSvgIcon-root":{color:"#000",opacity:"1 !important"}},"& .MuiTableSortLabel-icon":{position:"relative",marginLeft:0,marginRight:0,opacity:1,transition:"color 0.2s ease"},"& .MuiTableSortLabel-iconDirectionAsc":{transform:"rotate(0deg)"},"& .MuiTableSortLabel-iconDirectionDesc":{transform:"rotate(180deg)"}}})]})}):ce(n)},String(n.id)))];return I(Ne,{children:[o(Pe,{children:s}),o(Pe,{children:f})]})},[i,M,k,Ye,L,le,he,Le,ce]),Wt=ne(()=>{let t=i.filter(r=>r.mobile!==!1),e=t.find(r=>r.mobile==="title")??t.find(r=>!r.mobile);return{title:e,thumb:t.filter(r=>r.mobile==="thumb"),badge:t.filter(r=>r.mobile==="badge"),sub:t.filter(r=>r.mobile==="sub"),meta:t.filter(r=>r!==e&&(!r.mobile||r.mobile==="meta"))}},[i]),Ft=P((t,e)=>{if(Se?.renderRow)return Se.renderRow(t,e);let r=p=>p.render?p.render(t,e):String(t[p.id]??""),{title:s,thumb:f,badge:n,sub:l,meta:H}=Wt;return I(y,{sx:{display:"flex",gap:"12px",alignItems:"flex-start",py:"12px",px:"14px",minWidth:0},children:[f.map(p=>o(y,{sx:{flexShrink:0},children:r(p)},String(p.id))),I(y,{sx:{flex:1,minWidth:0,display:"flex",flexDirection:"column",gap:"4px"},children:[(s||n.length>0)&&I(y,{sx:{display:"flex",alignItems:"flex-start",gap:"8px",minWidth:0},children:[o(y,{sx:{flex:1,minWidth:0,fontSize:15,fontWeight:500,overflowWrap:"anywhere"},children:s?r(s):null}),n.map(p=>o(y,{sx:{flexShrink:0},children:r(p)},String(p.id)))]}),l.map(p=>o(y,{sx:{fontSize:13,color:b.headerColor,minWidth:0},children:r(p)},String(p.id))),H.length>0&&o(y,{sx:{display:"flex",flexWrap:"wrap",gap:"2px 12px",fontSize:13,minWidth:0},children:H.map(p=>{let D=p.mobileLabel===!1?null:p.mobileLabel??(typeof p.text=="string"?p.text:null);return I(y,{sx:{display:"inline-flex",alignItems:"center",gap:"4px",minWidth:0,maxWidth:"100%"},children:[D?o(y,{component:"span",sx:{color:b.headerColor,flexShrink:0},children:D}):null,o(y,{component:"span",sx:{minWidth:0,"& > *":{width:"auto !important",textAlign:"left !important"}},children:r(p)})]},String(p.id))})})]})]})},[Se,Wt,b]),Ue=P((t,e)=>{let r=w?performance.now():0;if(!e){if(w){m.current.rowContentCalls+=1;let l=performance.now()-r;m.current.rowContentMs+=l,m.current.rowContentMaxMs=Math.max(m.current.rowContentMaxMs,l)}return null}if($)return o(re,{colSpan:i.length,"data-vdt-pad":"",sx:{padding:0},children:Ft(e,t)});let s=Ze?Ze(e,t):null;if(s!=null)return o(re,{colSpan:i.length,"data-vdt-pad":"",sx:[{padding:x?"0 14px":"8px 16px"},...Array.isArray(Me)?Me:Me?[Me]:[]],children:s});let f=0,n=i.map((l,H)=>{if(f>0)return f-=1,null;let p=l.colSpan?Math.max(1,Math.min(l.colSpan(e,t),i.length-H)):1;f=p-1;let D=w?performance.now():0,te=l.render?l.render(e,t):String(e[l.id]||"");if(w){let W=performance.now()-D;m.current.cellRenderCalls+=1,m.current.cellRenderMs+=W,m.current.cellRenderMaxMs=Math.max(m.current.cellRenderMaxMs,W)}let ge=$e.has(String(l.id)),S=l.cellPadding!==void 0,_=l.rowSpan?l.rowSpan(e,t):1;if(_<=0)return null;let ue=l.onCellClick;return o(re,{align:l.align||"left",rowSpan:_>1?_:void 0,colSpan:p>1?p:void 0,"data-vdt-pad":S?"":void 0,"data-vdt-pinned":ge?"":void 0,"data-vdt-cell-click":ue?"":void 0,onClick:ue?W=>{let be=W.clientX-de.current.x,pe=W.clientY-de.current.y;W.stopPropagation(),!(Math.sqrt(be*be+pe*pe)>vt)&&ue(e,t,W)}:void 0,style:{...p>1?{}:{width:l.width,minWidth:l.width??l.minWidth},...l.primary?{fontSize:15}:{},...l.style,...l.cellStyle?l.cellStyle(e,t):{},padding:S?l.cellPadding:"8px 16px",...he(l,!1)},children:te},String(l.id))});if(w){m.current.rowContentCalls+=1;let l=performance.now()-r;m.current.rowContentMs+=l,m.current.rowContentMaxMs=Math.max(m.current.rowContentMaxMs,l)}return o(Ne,{children:n})},[i,w,Ze,Me,x,$e,he,$,Ft]),Vt=P(()=>{let t=_t();if(!ve||ve.length===0)return t;let e=At.current;return I(Ne,{children:[t,o("tr",{"data-vdt-pinned-area":"",children:o("td",{colSpan:i.length,style:{padding:0,border:0},children:o(y,{"data-vdt-inner-scroll":"",sx:[{maxHeight:Qe,overflowY:Qe?"auto":"visible",overflowX:"hidden",scrollbarWidth:"thin",borderBottom:`1px solid ${x?b.borderStrong:"rgba(224, 224, 224, 1)"}`,"& tbody tr:last-of-type > td":{borderBottom:"none"}},...Array.isArray(we)?we:we?[we]:[]],children:I("table",{style:{width:"100%",tableLayout:_e,borderCollapse:"separate",borderSpacing:0},children:[o("colgroup",{children:i.map(r=>o("col",{style:{width:r.width,minWidth:r.width??r.minWidth}},String(r.id)))}),o(Qt,{children:ve.map((r,s)=>e?o(e,{item:r,"data-index":s,"data-vdt-pinned-row":"",children:Ue(s,r)},g?String(g(r,s)):`p${s}`):null)})]})})})})]})},[_t,ve,Qe,we,i,Ue,_e,g,x,b]),Y=tn??i.some(t=>typeof t.footer=="function"),$t=P(()=>{if(!Y)return null;let t=[];for(let e=0;e<i.length;e+=1){let r=i[e],s=r.footerColSpan&&r.footerColSpan>1?Math.min(r.footerColSpan,i.length-e):1;t.push(o(re,{align:r.align||"left",colSpan:s>1?s:void 0,style:{...s>1?{}:{width:r.width,minWidth:r.width},...r.style,fontWeight:"bold",padding:x?"0 14px":"16px"},children:r.footer?r.footer(a):null},String(r.id))),e+=s-1}return o(Pe,{children:t})},[Y,i,a,x]),ht=ne(()=>({Scroller:Te?en:Lt,Table:t=>o(Zn,{...t,sx:{borderCollapse:"separate",tableLayout:_e,...ut&&!$?{minWidth:ut}:{},marginRight:fe?"16px":0,...Y?{height:"100%"}:{}}}),TableHead:Oe((t,e)=>o(Jn,{...t,ref:e,sx:{userSelect:"none","& > tr":{height:le,"& > th":{padding:"16px",position:"sticky",top:0,zIndex:2,fontWeight:"bold"}}}})),TableRow:t=>{let{item:e,selected:r,"aria-selected":s,className:f,...n}=t,l=n["data-index"]??0,H=l%2===1,p=e&&He.current?He.current(e,l):l,D=!Fe&&d!==null&&d!==void 0&&p===d,te=D&&X?typeof X=="function"?X(e,l):X:void 0,ge=String(f??"").split(/\s+/).filter(S=>S!=="Mui-selected"&&S!=="Mui-focusVisible").join(" ");return o(Pe,{...n,"data-row-id":p!=null?String(p):void 0,className:ge||void 0,selected:D,onMouseDown:S=>{ke.current=!1,de.current={x:S.clientX,y:S.clientY}},onContextMenu:S=>{e&&ct.current&&ct.current(e,l,S)},onClick:S=>{let _=S.clientX-de.current.x,ue=S.clientY-de.current.y;if(Math.sqrt(_*_+ue*ue)>vt||ke.current){S.preventDefault(),S.stopPropagation(),ke.current=!1;return}e&&dt.current&&dt.current(e,l),ke.current=!1},sx:[{userSelect:"none",...tt?{"& > td":{height:Re}}:{height:Re,maxHeight:Re},boxSizing:"border-box",backgroundColor:H&&ot?ot:"transparent","& td:not([data-vdt-pad])":{padding:"8px 16px"},"& td":{boxSizing:"border-box",borderBottom:Q?"1px solid rgba(224, 224, 224, 1)":"none"},"& th":{padding:"8px 16px",borderBottom:"none"},"&:hover":Xe&&!D?{backgroundColor:S=>{let _=S.palette.mode==="dark",W=nt??"#000000",be=Et??.06;if(!nt)return _?`rgba(255, 255, 255, ${be})`:`rgba(0, 0, 0, ${be})`;let pe=W.replace("#","").trim();if(pe.length!==6)return W;let In=parseInt(pe.substring(0,2),16),Bn=parseInt(pe.substring(2,4),16),An=parseInt(pe.substring(4,6),16);return`rgba(${In}, ${Bn}, ${An}, ${be})`}}:void 0,cursor:Xe?"pointer":void 0},te]})},TableBody:Oe((t,e)=>{let{children:r,...s}=t;return I(Qt,{...s,ref:e,sx:Y?{height:"100%"}:void 0,children:[r,Y&&o("tr",{"aria-hidden":!0,style:{height:"100%"},children:o("td",{colSpan:i.length,style:{padding:0,border:0}})})]})}),TableFoot:Oe((t,e)=>o(er,{...t,ref:e,sx:[{"& tr":{height:ye??V,maxHeight:ye??V,boxSizing:"border-box"},"& td":{height:ye??V,boxSizing:"border-box",backgroundColor:r=>r.palette.mode==="dark"?"#1e1e1e":"#ffffff",padding:"0 16px",color:"inherit",fontSize:"0.875rem",border:"none",boxShadow:`inset 0 1px 0 0 ${x?b.borderStrong:"#000000"}`}},...Array.isArray(Ce)?Ce:Ce?[Ce]:[]]}))}),[Xe,Fe?null:d,X,V,ot,Q,le,nt,Et,Lt,ye,Ce,Y,x,b,i,_e,fe,tt,ut,$,Te]);At.current=ht.TableRow;let Tn=ht,De=ht,Rn=De.Table,Hn=De.TableHead,kn=De.TableBody,En=De.TableRow,Ln=De.TableFoot,z=Ee?i.find(t=>String(t.id)===Ee.colId):void 0,Dn=()=>Pt(null),Xt=null;if(Ee&&z){let t=String(z.id),e=!!((z.sortMenu??z.sortable)&&L),r=wt(z),s=M===t?k:void 0;Xt=o(Ct,{open:!0,anchorPosition:{left:Ee.x,top:Ee.y},onClose:Dn,sort:e?{active:s??null,clearable:!!O,onChange:f=>{f?L?.(t,f):O?.()}}:void 0,filter:r?{options:z.filterOptions??[],value:z.filterValues??[],onChange:f=>z.onFilterChange?.(f),multiple:z.filterMultiple!==!1,emptyLabel:z.filterEmptyLabel,searchable:z.filterSearchable}:void 0})}let Yt=I(y,{sx:{position:"relative",height:se?"auto":"100%",width:"100%","& .MuiTableHead-root":{backgroundColor:t=>x?`${b.bg} !important`:t.palette.mode==="dark"?"#1e1e1e !important":"#ffffff !important"},...mn??{},"& tbody td[data-vdt-pinned]":{backgroundColor:x?b.bg:et.palette.background.paper},"& tbody td[data-vdt-cell-click]":{cursor:"pointer"},"& tbody td[data-vdt-cell-click]:hover":{backgroundColor:x?b.hoverBg:et.palette.mode==="dark"?"rgba(255, 255, 255, 0.06)":"rgba(0, 0, 0, 0.04)"},...x&&Xe?{"& tbody tr:hover td[data-vdt-pinned]":{backgroundColor:b.hoverBg}}:{},...x?{...fe?{border:`1px solid ${b.borderStrong}`,borderRadius:"4px"}:{"& table":{backgroundColor:b.bg}},overflow:"hidden","& thead tr th > *":{verticalAlign:"middle"},"& thead > tr > th":{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},"& thead > tr > th > *":{maxWidth:"100%"},"& thead .vdt-sort-box":{paddingRight:"20px"},"& thead .vdt-sort-box > .MuiTableSortLabel-root":{left:"auto !important",right:0,marginLeft:"0 !important"},"& thead tr th":{height:le,boxSizing:"border-box",padding:"0 14px !important",fontSize:13,fontWeight:"500 !important",color:b.headerColor,backgroundColor:`${b.bg} !important`,borderTop:!fe&&rn?`1px solid ${b.borderStrong}`:"none",borderBottom:`1px solid ${b.borderStrong}`,borderRight:`1px solid ${b.border}`,"&:last-of-type":{borderRight:"none"}},"& tbody tr td:not([data-vdt-pad])":{padding:"0 14px !important"},"& tbody tr td":{fontSize:14,borderBottom:`1px solid ${b.border}`},...a.length>0&&(se||vn||Y)?{[`& tbody tr[data-index="${a.length-1}"]:not([data-vdt-pinned-row]) td`]:{borderBottom:"none"}}:{}}:{}},children:[xe?o(y,{sx:{overflowX:"auto",width:"100%"},children:I(Rn,{children:[$?null:o(Hn,{children:Vt()}),o(kn,{children:a.map((t,e)=>o(En,{item:t,"data-index":e,children:Ue(e,t)},g?String(g(t,e)):e))}),Y&&!$?o(Ln,{children:$t()}):null]})}):Je===null?null:o(ar,{ref:lt,data:a,totalCount:A?a.length+1:a.length,defaultItemHeight:Re,fixedItemHeight:tt?void 0:Re,fixedHeaderContent:$?void 0:Vt,fixedFooterContent:Y&&!$?$t:void 0,itemContent:Ue,...an&&g?{computeItemKey:(t,e)=>e?g(e,t):`vdt-${t}`}:{},endReached:Sn,scrollerRef:t=>{st.current=t instanceof HTMLElement?t:null,Ve()},totalListHeightChanged:Ve,style:Te?void 0:{height:"100%"},...Te?{customScrollParent:Je}:{},increaseViewportBy:{top:un,bottom:pn},overscan:gn,...J&&a.length>0?{initialItemCount:Math.min(J,a.length)}:{},followOutput:!1,components:Tn},yn),a.length===0&&!c&&!kt&&x&&typeof ee=="string"&&o(y,{sx:{position:se?"static":"absolute",top:$?0:le,left:0,right:0,py:6,px:2,textAlign:"center",fontSize:14,color:b.emptyColor,pointerEvents:"none"},children:ee}),a.length===0&&!c&&!kt&&!(x&&typeof ee=="string")&&o(y,{sx:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:2,px:2,textAlign:"center",pointerEvents:"none","& > *":{pointerEvents:"auto"}},children:typeof ee=="string"?I(Ne,{children:[o(y,{sx:{width:48,height:48,display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"50%",backgroundColor:"#f5f5f5",color:"#999"},children:"\u{1F4C4}"}),o(nr,{variant:"body1",sx:{color:"text.secondary"},children:ee})]}):ee}),Xt,Mn&&o(Ne,{children:ze?o(ze,{visible:c,onComplete:It}):o(Kt,{visible:c,onComplete:It,size:40,indicator:o(Gt,{}),sx:{top:`${i.some(t=>t.group)?le*2:le}px`,bottom:`${Y?ye??V:0}px`},background:{show:a.length===0,opacity:.8}})})]}),Ut=x&&fe?{paddingRight:We,paddingTop:Jt,paddingBottom:Jt}:{};return ae?o(tr,{className:"grow",elevation:1,sx:{padding:0,paddingLeft:We,...Ut,boxSizing:"border-box",height:se?"auto":"100%",minHeight:0,flex:se?"none":1,display:"flex",flexDirection:"column"},children:Yt}):o(y,{className:"grow",style:{padding:0,paddingLeft:We,...Ut,boxSizing:"border-box",height:se?"auto":"100%",minHeight:0,flex:se?"none":1,display:"flex",flexDirection:"column"},children:Yt})}var pr=Gn(ur);export{bt as HEADER_MENU_FONT_SIZE,U as HEADER_MENU_ICON_PATHS,mt as HEADER_MENU_ICON_SIZE,xt as HEADER_MENU_ITEM_HEIGHT,Zt as HEADER_MENU_ITEM_SX,yt as HeaderFilterIcon,Ct as HeaderMenu,Ke as HeaderMenuDivider,me as HeaderMenuIcon,q as HeaderMenuItem,pr as VirtualDataTable,qn as headerMenuAnchor};
4
+ `;function mn({size:o=54}){return dr(sr,{children:[gn("style",{children:lr}),gn("span",{className:"vdt-css-spinner",role:"progressbar","aria-label":"loading",style:{display:"inline-block",width:o,height:o}})]})}import rt,{useMemo as cr,useState as ur}from"react";import{Box as We,Divider as pr,InputBase as fr,Menu as hr,MenuItem as gr,SvgIcon as mr}from"@mui/material";import{jsx as m,jsxs as at}from"react/jsx-runtime";var Et=14,kt=18,Lt=34,Z={asc:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z",desc:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z",checked:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z",unchecked:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z",radioOn:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm0-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z",radioOff:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z",filter:"M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z",search:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"};function Ce({d:o,size:c=kt,color:l}){return m(mr,{sx:{fontSize:c,flexShrink:0,color:l},children:m("path",{d:o})})}function Dt({size:o=14,active:c,color:l}){let g={stroke:"currentColor",strokeWidth:1.8,strokeMiterlimit:10,strokeLinecap:"round",strokeLinejoin:"round"};return at(We,{component:"svg",viewBox:"0 0 24 24",fill:"none","aria-hidden":!0,sx:{width:o,height:o,flexShrink:0,color:c?"primary.main":l??"currentColor",verticalAlign:"middle"},children:[m("path",{d:"M2 17.5H7",...g}),m("path",{d:"M22 6.5H17",...g}),m("path",{d:"M13 17.5H22",...g}),m("path",{d:"M11 6.5H2",...g}),m("path",{d:"M10 20.3999C8.34315 20.3999 7 19.0568 7 17.3999C7 15.743 8.34315 14.3999 10 14.3999C11.6569 14.3999 13 15.743 13 17.3999C13 19.0568 11.6569 20.3999 10 20.3999Z",...g}),m("path",{d:"M14 9.3999C15.6569 9.3999 17 8.05676 17 6.3999C17 4.74305 15.6569 3.3999 14 3.3999C12.3431 3.3999 11 4.74305 11 6.3999C11 8.05676 12.3431 9.3999 14 9.3999Z",...g})]})}var bn={gap:1,fontSize:Et,lineHeight:"20px",minHeight:Lt,py:"7px",px:1.5};function re({icon:o,iconSpace:c,selected:l,disabled:g,muted:h,onClick:u,sx:W,children:J}){return at(gr,{selected:l,disabled:g,onClick:u,sx:[bn,h?{color:"text.secondary"}:{},...Array.isArray(W)?W:W?[W]:[]],children:[o??(c?m(We,{component:"span",sx:{width:kt,flexShrink:0}}):null),J]})}function ot(){return m(pr,{sx:{my:"4px !important"}})}function br(o,c){let l=o.getBoundingClientRect();return{left:c??l.left,top:l.bottom}}function It({open:o,anchorPosition:c,anchorEl:l,onClose:g,sort:h,filter:u,header:W,children:J,minWidth:ce=180,maxHeight:ae=420}){let[ie,P]=ur(""),_=u?.multiple!==!1,A=u?.value??[],z=cr(()=>{if(!u)return[];let f=u.options;return u.emptyLabel&&!f.some(E=>E.value==="")?[...f,{value:"",label:u.emptyLabel}]:f},[u]),S=!!u&&(u?.searchable??z.length>10),D=ie.trim().toLowerCase(),ue=D?z.filter(f=>f.label.toLowerCase().includes(D)):z,X=()=>{P(""),g()},T=[];if(W&&T.push(...rt.Children.toArray(W).map((f,E)=>rt.isValidElement(f)?rt.cloneElement(f,{key:`h${E}`}):f)),h){let f=E=>{X(),h.onChange(h.active===E&&h.clearable!==!1?null:E)};T.push(m(re,{selected:h.active==="asc",onClick:()=>f("asc"),icon:m(Ce,{d:Z.asc,color:"text.secondary"}),children:"\uC624\uB984\uCC28\uC21C \uC815\uB82C"},"sort-asc"),m(re,{selected:h.active==="desc",onClick:()=>f("desc"),icon:m(Ce,{d:Z.desc,color:"text.secondary"}),children:"\uB0B4\uB9BC\uCC28\uC21C \uC815\uB82C"},"sort-desc")),h.active&&h.clearable!==!1&&T.push(m(re,{muted:!0,iconSpace:!0,onClick:()=>{X(),h.onChange(null)},children:"\uC815\uB82C \uD480\uAE30"},"sort-clear"))}return h&&u&&T.push(m(ot,{},"div-sort")),u&&(S&&T.push(at(We,{onKeyDown:f=>f.stopPropagation(),sx:{display:"flex",alignItems:"center",gap:1,px:1.5,pb:.5,minHeight:Lt},children:[m(Ce,{d:Z.search,color:"text.secondary"}),m(fr,{autoFocus:!0,value:ie,onChange:f=>P(f.target.value),placeholder:u.searchPlaceholder??"\uCC3E\uAE30",sx:{flex:1,fontSize:Et}})]},"search")),!_&&u.allLabel&&T.push(m(re,{selected:A.length===0,onClick:()=>{X(),u.onChange([])},icon:m(Ce,{d:A.length===0?Z.radioOn:Z.radioOff,color:A.length===0?"primary.main":"text.disabled"}),children:u.allLabel},"f-all")),z.length===0&&T.push(m(re,{disabled:!0,iconSpace:!0,children:u.emptyText??"\uACE0\uB97C \uAC12\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."},"f-none")),ue.forEach(f=>{let E=A.includes(f.value),I=()=>{if(_){u.onChange(E?A.filter(le=>le!==f.value):[...A,f.value]);return}X(),u.onChange(E?[]:[f.value])},ee=_?E?Z.checked:Z.unchecked:E?Z.radioOn:Z.radioOff;T.push(at(re,{selected:!_&&E,onClick:I,icon:m(Ce,{d:ee,color:E?"primary.main":"text.disabled"}),children:[f.icon,m(We,{component:"span",sx:{flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:f.render??f.label}),typeof f.count=="number"?m(We,{component:"span",sx:{color:"text.secondary",ml:1,fontVariantNumeric:"tabular-nums"},children:f.count}):null]},`f:${f.value||"(empty)"}`))}),S&&D&&ue.length===0&&T.push(m(re,{disabled:!0,iconSpace:!0,children:"\uCC3E\uB294 \uAC12\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."},"f-nohit")),A.length>0&&T.push(m(ot,{},"div-filter"),m(re,{muted:!0,iconSpace:!0,onClick:()=>{X(),u.onChange([])},children:u.clearLabel??"\uAC70\uB974\uAE30 \uD480\uAE30"},"f-clear"))),J&&(T.length>0&&T.push(m(ot,{},"div-children")),T.push(...rt.Children.toArray(J))),m(hr,{open:o&&(!!c||!!l),...!c&&!!l?{anchorEl:l}:{anchorReference:"anchorPosition",anchorPosition:c??void 0},onClose:X,transitionDuration:0,disableAutoFocusItem:S,onContextMenu:f=>f.preventDefault(),onClick:f=>f.stopPropagation(),slotProps:{paper:{sx:{maxHeight:ae,minWidth:ce}},list:{sx:{py:.5}}},children:T})}import Er from"@ehfuse/overlay-scrollbar";import{Fragment as Fe,jsx as i,jsxs as L}from"react/jsx-runtime";var kr={alignment:"default",margin:0,radius:0},Bt=5,yn={},Lr=3;function vn(o){return typeof o=="number"?`${o}px`:o}function Cn(o,c){let l=[];for(let g=0;g<o.style.length;g+=1){let h=o.style[g];h.startsWith("--vdt-")&&!(h in c)&&l.push(h)}l.forEach(g=>o.style.removeProperty(g)),Object.entries(c).forEach(([g,h])=>o.style.setProperty(g,h))}var Dr={bg:"#ffffff",border:"#e6e6e3",borderStrong:"#dedddb",headerColor:"#787774",hoverBg:"#f8f8f7",emptyColor:"#9b9a97",selectedBg:"#dbeafe",selectedBar:"#3b82f6"},Mn="12px",Ir={bg:"#1e1e1e",border:"#2c333c",borderStrong:"#3b434e",headerColor:"#a3adbb",hoverBg:"#272d36",emptyColor:"#7d8590",selectedBg:"rgba(59, 130, 246, 0.22)",selectedBar:"#60a5fa"},wn=Ve((o,c)=>i("div",{...o,ref:c}));wn.displayName="VdtPlainScroller";var Pr="(max-width:599.95px)";function At(o){return!!(o.filterOptions&&o.onFilterChange)}function Br({data:o,loading:c=!1,columns:l,onRowClick:g,getRowId:h,selectedRowId:u,selectedRowSx:W,rowHeight:J,columnHeight:ce,striped:ae,rowDivider:ie=!0,onSort:P,onSortClear:_,onHeaderContextMenu:A,onLoadMore:z,sortBy:S,sortDirection:D,showPaper:ue=!0,paddingX:X,paddingTop:T=0,paddingBottom:pe=0,rowHoverColor:f,rowHoverOpacity:E,viewportBuffer:I,overscan:ee,initialItemCount:le,scrollbars:it,emptyMessage:se="NO DATA",autoHeight:we=!1,LoadingComponent:$e,showFooter:Sn,footerHeight:Se,footerSx:Te,variant:Tn="default",framed:xe=!0,headerTopBorder:Rn=!1,rowHeightMode:Hn="fixed",tableLayout:Xe="fixed",renderFullWidthRow:lt,fullWidthRowSx:Re,onRowContextMenu:zt,pinnedRows:He,pinnedRowsMaxHeight:st,pinnedRowsSx:Ee,resetScrollOnDataChange:Nt=!0,rowKeyFromId:En=!1,onEndReached:Ot,colorMode:kn,mobile:Wt,scrollParent:dt,columnResize:_t,columnWidths:Ft,onColumnWidthsChange:Vt}){let y=Tn==="notion",Ye=Tr(),b=(kn??Ye.palette.mode)==="dark"?Ir:Dr,$t=(He?.length??0)>0,fe=ce??(y?40:56),Y=J??(y?48:50),je=xe?X??(y?"12px":"1rem"):0,ke=Wt===!0?{}:Wt||null,Ln=Rr(ke?.query??Pr,{noSsr:!0}),V=!!ke&&Ln,Le=!!dt,he=we||Le,ct=Hn==="auto"||V,ut=f??(y?b.hoverBg:void 0),Xt=E??(y?1:void 0),Dn=Math.max(Y*12,480),In=Math.max(Y*12,480),Pn=typeof I=="number"?I:I?.top??Dn,Bn=typeof I=="number"?I:I?.bottom??In,An=Math.max(Y*8,420),zn=Math.max(Y*10,520),Nn=typeof ee=="number"?ee:{main:ee?.main??An,reverse:ee?.reverse??zn},De=Y+(ie?1:0),On=oe(()=>y?{backgroundColor:b.selectedBg,"& > td:first-of-type":{boxShadow:`inset 3px 0 0 ${b.selectedBar}`},"& > td[data-vdt-pinned]":{backgroundColor:b.selectedBg}}:void 0,[y,b]),j=W??On,Ue=!j||typeof j!="function",Wn=oe(()=>!Ue||u===null||u===void 0||!j?null:{[`& tbody tr[data-row-id="${String(u).replace(/["\\]/g,"\\$&")}"]`]:j},[Ue,u,j]),zr=typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"),[H]=Me(()=>typeof window>"u"?!1:window.localStorage.getItem("vdt-perf-debug")==="1"),v=M({wheelEvents:0,wheelInputPx:0,wheelHandlerMs:0,wheelRafFlushes:0,wheelRafMs:0,rangeChangedCalls:0,rangeChangedMs:0,rowContentCalls:0,rowContentMs:0,rowContentMaxMs:0,cellRenderCalls:0,cellRenderMs:0,cellRenderMaxMs:0}),pt=k(t=>{if(!H)return;let e=v.current;if(!(e.wheelEvents>0||e.rangeChangedCalls>0||e.rowContentCalls>0||e.cellRenderCalls>0))return;let a=e.rowContentCalls>0?e.rowContentMs/e.rowContentCalls:0,d=e.cellRenderCalls>0?e.cellRenderMs/e.cellRenderCalls:0;console.log("[VDT perf]",{reason:t,wheel:{events:e.wheelEvents,inputPx:Math.round(e.wheelInputPx),handlerMs:Number(e.wheelHandlerMs.toFixed(2)),rafFlushes:e.wheelRafFlushes,rafMs:Number(e.wheelRafMs.toFixed(2))},rangeChanged:{calls:e.rangeChangedCalls,totalMs:Number(e.rangeChangedMs.toFixed(2))},rowContent:{calls:e.rowContentCalls,totalMs:Number(e.rowContentMs.toFixed(2)),avgMs:Number(a.toFixed(3)),maxMs:Number(e.rowContentMaxMs.toFixed(3))},cellRender:{calls:e.cellRenderCalls,totalMs:Number(e.cellRenderMs.toFixed(2)),avgMs:Number(d.toFixed(3)),maxMs:Number(e.cellRenderMaxMs.toFixed(3))}}),v.current={wheelEvents:0,wheelInputPx:0,wheelHandlerMs:0,wheelRafFlushes:0,wheelRafMs:0,rangeChangedCalls:0,rangeChangedMs:0,rowContentCalls:0,rowContentMs:0,rowContentMaxMs:0,cellRenderCalls:0,cellRenderMs:0,cellRenderMaxMs:0}},[H]);Q(()=>{if(!H||typeof window>"u")return;console.log("[VDT perf] enabled (localStorage vdt-perf-debug=1)");let t=window.setInterval(()=>{pt("interval")},1500);return()=>{window.clearInterval(t),pt("cleanup")}},[pt,H]);let Yt=oe(()=>Ve((t,e)=>{let r=M(null),a=M(0),d=M(null);return Q(()=>{let n=r.current;if(!n)return;let s=C=>{let p=H?performance.now():0;if(C.shiftKey||Math.abs(C.deltaX)>Math.abs(C.deltaY))return;let R=C.target?.closest?.("[data-vdt-inner-scroll]");if(R&&n.contains(R)&&(C.deltaY<0?R.scrollTop>0:R.scrollTop+R.clientHeight<R.scrollHeight-1))return;C.preventDefault();let q=C.deltaY;C.deltaMode===1?q*=40:C.deltaMode===2&&(q*=n.clientHeight),H&&(v.current.wheelEvents+=1,v.current.wheelInputPx+=q),a.current+=q,d.current===null&&(d.current=requestAnimationFrame(()=>{let te=H?performance.now():0,x=Math.max(n.clientHeight*.4,160),B=Math.max(-x,Math.min(x,a.current));a.current=0,d.current=null,B!==0&&(n.scrollTop+=B),H&&(v.current.wheelRafFlushes+=1,v.current.wheelRafMs+=performance.now()-te)}),H&&(v.current.wheelHandlerMs+=performance.now()-p))};return n.addEventListener("wheel",s,{passive:!1}),()=>{n.removeEventListener("wheel",s),d.current!==null&&(cancelAnimationFrame(d.current),d.current=null),a.current=0}},[]),i(Er,{detectInnerScroll:!0,track:kr,...it,children:i(vr,{component:w,...t,ref:n=>{r.current=n,typeof e=="function"?e(n):e&&(e.current=n)},sx:{userSelect:"auto",WebkitUserSelect:"auto",position:"relative",width:"100%",height:"100%",overflow:"auto",display:"flex",flexDirection:"column",scrollbarWidth:"none",msOverflowStyle:"none",transform:"translateZ(0)",backfaceVisibility:"hidden",willChange:"scroll-position","&::-webkit-scrollbar":{display:"none"},"& .MuiTable-root":{paddingRight:y?0:je,paddingTop:typeof T=="number"?`${T}px`:T,paddingBottom:typeof pe=="number"?`${pe}px`:pe}}})})}),[]),ft=oe(()=>{if(ae===!0)return"#f5f5f5";if(typeof ae=="string")return ae},[ae]),[_n,jt]=Me(c),[Fn,Vn]=Me(0);Q(()=>{c&&jt(!0)},[c]);let Ut=k(()=>{jt(!1)},[]),$n=_n,Nr=c&&o.length>0,ht=M(!1),gt=M(-1),mt=M(null),bt=M(null),[Xn,Yn]=Me(!1),Ke=k(()=>{let t=bt.current;t&&Yn(t.scrollHeight>t.clientHeight+1)},[]);Q(()=>{let t=bt.current;if(!t||typeof ResizeObserver>"u")return;let e=new ResizeObserver(()=>Ke());return e.observe(t),()=>e.disconnect()},[Ke,we]);let xt=M(g);xt.current=g;let Ie=M(h);Ie.current=h;let yt=M(zt);yt.current=zt;let Kt=M(Ot);Kt.current=Ot;let qt=M(null),Gt=_t===!0?{}:_t||null,F=!!Gt&&!V,Pe=Gt?.minWidth??48,[jn,vt]=Me(null);Q(()=>{vt(null)},[Ft]);let qe=F?jn??Ft??yn:yn,Ct=M(qe);Ct.current=qe;let Mt=M(Vt);Mt.current=Vt;let Zt=M(null),Ge=k(t=>{let e={},r=!1,a=!0,d=0,n=0;return l.forEach((s,C)=>{let p=t[String(s.id)];if(typeof p=="number"&&Number.isFinite(p)&&p>0){let R=Math.max(s.minWidth??Pe,Math.round(p));e[`--vdt-cw-${C}`]=`${R}px`,r=!0,d+=R,n+=R}else typeof s.width=="number"?(d+=s.width,n+=s.width):(a=!1,d+=s.minWidth??Pe)}),r&&(e["--vdt-tmin"]=`${d}px`,a&&(e["--vdt-tw"]=`${n}px`)),e},[l,Pe]),wt=M(Ge);wt.current=Ge;let Un=oe(()=>F?Ge(qe):null,[F,Ge,qe]),U=k((t,e,r)=>{if(!F)return{width:t.width,minWidth:r};let a=`--vdt-cw-${e}`,d=vn(t.width),n=vn(r);return{width:d!==void 0?`var(${a}, ${d})`:`var(${a})`,minWidth:n!==void 0?`var(${a}, ${n})`:`var(${a})`}},[F]),Ze=oe(()=>{let t=new Map,e=0,r=[];return l.forEach((a,d)=>{if(a.pinned!=="left")return;t.set(String(a.id),F&&r.length>0?`calc(${r.join(" + ")})`:e);let n=typeof a.width=="number"?a.width:0;e+=n,r.push(`var(--vdt-cw-${d}, ${n}px)`)}),t},[l,F]),Qe=oe(()=>{if(l.some(t=>typeof t.minWidth=="number"))return l.reduce((t,e)=>t+(typeof e.width=="number"?e.width:typeof e.minWidth=="number"?e.minWidth:0),0)},[l]),ye=k((t,e)=>{let r=Ze.get(String(t.id));return r===void 0?{}:{position:"sticky",left:r,zIndex:e?3:1}},[Ze]),Je=!!g,Be=M(!1),ge=M({x:0,y:0});Q(()=>{let t=e=>{let r=e.clientX-ge.current.x,a=e.clientY-ge.current.y;Math.sqrt(r*r+a*a)>Bt&&(Be.current=!0)};return document.addEventListener("mousemove",t),()=>{document.removeEventListener("mousemove",t)}},[]),Q(()=>{let t=document.querySelector('[data-testid="virtuoso-scroller"]');t&&t.querySelectorAll(".MuiTableSortLabel-root").forEach(r=>{let a=new MouseEvent("mouseleave",{bubbles:!0,cancelable:!0});r.dispatchEvent(a)})},[S]);let et=k(t=>{if(!P)return;P(t,S===t&&D==="asc"?"desc":"asc")},[P,S,D]),[Ae,Qt]=Me(null),Jt=M(A);Jt.current=A;let en=M(P);en.current=P;let ze=k((t,e)=>{if(!t){e.preventDefault();return}t.headerProps?.onContextMenu?.(e);let r=e.defaultPrevented;if(r||(r=Jt.current?.(t,e)===!0||e.defaultPrevented),e.preventDefault(),r||t.headerMenu===!1||!!!((t.sortMenu??t.sortable)&&en.current)&&!At(t))return;let d=e.currentTarget.getBoundingClientRect();Qt({colId:String(t.id),x:e.clientX,y:d.bottom})},[]),tn=k((t,e)=>{if(e.button!==0)return;e.preventDefault(),e.stopPropagation();let r=e.currentTarget,a=r.closest("th"),d=Zt.current;if(!a||!d)return;let n=window.getComputedStyle(a),s=n.boxSizing==="border-box"?0:(parseFloat(n.paddingLeft)||0)+(parseFloat(n.paddingRight)||0)+(parseFloat(n.borderLeftWidth)||0)+(parseFloat(n.borderRightWidth)||0),C=a.getBoundingClientRect().width-s,p=e.clientX,R=String(t.id),q=t.minWidth??Pe,te=Ct.current,x=te,B=!1,N=0;r.setAttribute("data-active","");let O=document.body.style.cursor;document.body.style.cursor="col-resize";let ne=ve=>{let be=ve.clientX-p;!B&&Math.abs(be)<Lr||(B=!0,x={...te,[R]:Math.max(q,Math.round(C+be))},N||(N=requestAnimationFrame(()=>{N=0,Cn(d,wt.current(x))})))},G=()=>{if(document.removeEventListener("mousemove",ne),document.removeEventListener("mouseup",G),N&&cancelAnimationFrame(N),r.removeAttribute("data-active"),document.body.style.cursor=O,!B)return;Cn(d,wt.current(x));let ve=be=>{be.stopPropagation(),be.preventDefault()};window.addEventListener("click",ve,!0),window.setTimeout(()=>window.removeEventListener("click",ve,!0),0),vt(x),Mt.current?.(x)};document.addEventListener("mousemove",ne),document.addEventListener("mouseup",G)},[Pe]),nn=k((t,e)=>{e.preventDefault(),e.stopPropagation();let r=String(t.id),a=Ct.current;if(!(r in a))return;let d={...a};delete d[r],vt(d),Mt.current?.(d)},[]),tt=k(t=>F?i("span",{"data-vdt-resize":"","aria-hidden":!0,onMouseDown:e=>tn(t,e),onDoubleClick:e=>nn(t,e),onClick:e=>e.stopPropagation()}):null,[F,tn,nn]),me=k(t=>{if(!At(t))return t.text;let e=!!(t.filterValues&&t.filterValues.length>0);return L(w,{component:"span",sx:{display:"inline-flex",alignItems:"center",gap:.5,maxWidth:"100%",color:e?"primary.main":void 0,fontWeight:e?600:void 0,verticalAlign:"middle"},children:[i(w,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:t.text}),i(Dt,{active:e})]})},[]),Kn=k(t=>{let e=H?performance.now():0;if(Kt.current?.(),!z){H&&(v.current.rangeChangedCalls+=1,v.current.rangeChangedMs+=performance.now()-e);return}if(c&&o.length===0){H&&(v.current.rangeChangedCalls+=1,v.current.rangeChangedMs+=performance.now()-e);return}let r=o.length>=30,a=t>=o.length-1,d=gt.current===o.length;if(a&&r&&!ht.current&&!d){ht.current=!0,gt.current=o.length;let n=o.length;z(n,50)}H&&(v.current.rangeChangedCalls+=1,v.current.rangeChangedMs+=performance.now()-e)},[o.length,c,z,H]);Q(()=>{c||(ht.current=!1)},[c]),Q(()=>{o.length===0&&Vn(t=>t+1)},[o.length]);let rn=M(Nt);rn.current=Nt;let St=M(o.length),Tt=M(void 0);Q(()=>{let t=St.current,e=o.length,r=e>0?Ie.current?Ie.current(o[0],0):o[0]:void 0,a=Tt.current;if(e>t&&t>0){St.current=e,Tt.current=r;return}let d=e<t||t>0&&r!==a;d&&(gt.current=-1),mt.current&&e>0&&d&&rn.current&&mt.current.scrollToIndex({index:0,align:"start",behavior:"auto"}),St.current=e,Tt.current=r},[o]);let on=k(()=>{let t={},e=[];if(l.forEach(n=>{n.group?(t[n.group]||(t[n.group]=[]),t[n.group].push(n)):e.push(n)}),!(Object.keys(t).length>0))return i(_e,{children:l.map((n,s)=>L(de,{align:n.align||"left",title:typeof n.text=="string"?n.text:void 0,...n.headerProps,onContextMenu:C=>ze(n,C),style:{...U(n,s,n.width??n.minWidth),...n.style,fontWeight:"bold",position:"sticky",top:0,zIndex:2,padding:"16px",...ye(n,!0),...n.headerProps?.style},children:[n.sortable?i("div",{style:{display:"flex",alignItems:"center",justifyContent:n.align==="center"?"center":n.align==="right"?"flex-end":"flex-start",position:"relative",width:"100%"},children:L(w,{className:"vdt-sort-box",sx:{position:"relative",cursor:"default","&:hover .MuiTableSortLabel-root":{opacity:"1 !important","& .MuiSvgIcon-root":{color:"#000",opacity:"1 !important"}}},onClick:()=>et(String(n.id)),children:[me(n),i(Pt,{active:S===n.id,direction:S===n.id?D:"desc",sx:{position:"absolute",left:"100%",top:"50%",transform:"translateY(-50%)",marginLeft:"4px",minWidth:"auto",width:"16px",height:"16px",cursor:"default",opacity:S===n.id?1:0,transition:"opacity 0.2s ease","& .MuiTableSortLabel-icon":{position:"relative",marginLeft:0,marginRight:0,opacity:1,transition:"color 0.2s ease"},"& .MuiTableSortLabel-iconDirectionAsc":{transform:"rotate(180deg)"},"& .MuiTableSortLabel-iconDirectionDesc":{transform:"rotate(0deg)"}}})]})}):me(n),tt(n)]},String(n.id)))});let a=[...e.map(n=>L(de,{rowSpan:2,align:n.align||"left",title:typeof n.text=="string"?n.text:void 0,...n.headerProps,onContextMenu:s=>ze(n,s),style:{...U(n,l.indexOf(n),n.width),...n.style,fontWeight:"bold",position:"sticky",top:0,zIndex:2,padding:"16px",...ye(n,!0),...n.headerProps?.style},children:[n.sortable&&P?i("div",{style:{display:"flex",alignItems:"center",justifyContent:n.align==="center"?"center":n.align==="right"?"flex-end":"flex-start",position:"relative",width:"100%"},children:L(w,{className:"vdt-sort-box",sx:{position:"relative",cursor:"default","&:hover .MuiTableSortLabel-root":{opacity:"1 !important","& .MuiSvgIcon-root":{color:"#000",opacity:"1 !important"}}},onClick:()=>et(String(n.id)),children:[me(n),i(Pt,{active:S===n.id,direction:S===n.id?D:"desc",sx:{position:"absolute",left:"100%",top:"50%",transform:"translateY(-50%)",marginLeft:"4px",minWidth:"auto",width:"16px",height:"16px",cursor:"default",opacity:S===n.id?1:0,transition:"opacity 0.2s ease","&:hover":{opacity:"1 !important","& .MuiSvgIcon-root":{color:"#000",opacity:"1 !important"}},"& .MuiTableSortLabel-icon":{position:"relative",marginLeft:0,marginRight:0,opacity:1,transition:"color 0.2s ease"},"& .MuiTableSortLabel-iconDirectionAsc":{transform:"rotate(180deg)"},"& .MuiTableSortLabel-iconDirectionDesc":{transform:"rotate(0deg)"}}})]})}):me(n),tt(n)]},String(n.id))),...Object.entries(t).map(([n,s])=>i(de,{align:"center",colSpan:s.length,onContextMenu:C=>ze(null,C),style:{fontWeight:"bold",position:"sticky",top:0,zIndex:2,padding:"16px"},children:n},n))],d=[...Object.values(t).flat().map(n=>L(de,{align:n.align||"left",title:typeof n.text=="string"?n.text:void 0,...n.headerProps,onContextMenu:s=>ze(n,s),style:{...U(n,l.indexOf(n),n.width),...n.style,fontWeight:"bold",position:"sticky",top:0,zIndex:2,padding:"16px",...ye(n,!0),...n.headerProps?.style},children:[n.sortable&&P?i("div",{style:{display:"flex",alignItems:"center",justifyContent:n.align==="center"?"center":n.align==="right"?"flex-end":"flex-start",position:"relative",width:"100%"},children:L(w,{className:"vdt-sort-box",sx:{position:"relative",cursor:"default","&:hover .MuiTableSortLabel-root":{opacity:"1 !important","& .MuiSvgIcon-root":{color:"#000",opacity:"1 !important"}}},onClick:()=>et(String(n.id)),children:[me(n),i(Pt,{active:S===n.id,direction:S===n.id?D:"desc",sx:{position:"absolute",left:"100%",top:"50%",transform:"translateY(-50%)",marginLeft:"4px",minWidth:"auto",width:"16px",height:"16px",cursor:"default",opacity:S===n.id?1:0,transition:"opacity 0.2s ease","&:hover":{opacity:"1 !important","& .MuiSvgIcon-root":{color:"#000",opacity:"1 !important"}},"& .MuiTableSortLabel-icon":{position:"relative",marginLeft:0,marginRight:0,opacity:1,transition:"color 0.2s ease"},"& .MuiTableSortLabel-iconDirectionAsc":{transform:"rotate(0deg)"},"& .MuiTableSortLabel-iconDirectionDesc":{transform:"rotate(180deg)"}}})]})}):me(n),tt(n)]},String(n.id)))];return L(Fe,{children:[i(_e,{children:a}),i(_e,{children:d})]})},[l,S,D,et,P,fe,ye,ze,me,U,tt]),an=oe(()=>{let t=l.filter(r=>r.mobile!==!1),e=t.find(r=>r.mobile==="title")??t.find(r=>!r.mobile);return{title:e,thumb:t.filter(r=>r.mobile==="thumb"),badge:t.filter(r=>r.mobile==="badge"),sub:t.filter(r=>r.mobile==="sub"),meta:t.filter(r=>r!==e&&(!r.mobile||r.mobile==="meta"))}},[l]),ln=k((t,e)=>{if(ke?.renderRow)return ke.renderRow(t,e);let r=p=>p.render?p.render(t,e):String(t[p.id]??""),{title:a,thumb:d,badge:n,sub:s,meta:C}=an;return L(w,{sx:{display:"flex",gap:"12px",alignItems:"flex-start",py:"12px",px:"14px",minWidth:0},children:[d.map(p=>i(w,{sx:{flexShrink:0},children:r(p)},String(p.id))),L(w,{sx:{flex:1,minWidth:0,display:"flex",flexDirection:"column",gap:"4px"},children:[(a||n.length>0)&&L(w,{sx:{display:"flex",alignItems:"flex-start",gap:"8px",minWidth:0},children:[i(w,{sx:{flex:1,minWidth:0,fontSize:15,fontWeight:500,overflowWrap:"anywhere"},children:a?r(a):null}),n.map(p=>i(w,{sx:{flexShrink:0},children:r(p)},String(p.id)))]}),s.map(p=>i(w,{sx:{fontSize:13,color:b.headerColor,minWidth:0},children:r(p)},String(p.id))),C.length>0&&i(w,{sx:{display:"flex",flexWrap:"wrap",gap:"2px 12px",fontSize:13,minWidth:0},children:C.map(p=>{let R=p.mobileLabel===!1?null:p.mobileLabel??(typeof p.text=="string"?p.text:null);return L(w,{sx:{display:"inline-flex",alignItems:"center",gap:"4px",minWidth:0,maxWidth:"100%"},children:[R?i(w,{component:"span",sx:{color:b.headerColor,flexShrink:0},children:R}):null,i(w,{component:"span",sx:{minWidth:0,"& > *":{width:"auto !important",textAlign:"left !important"}},children:r(p)})]},String(p.id))})})]})]})},[ke,an,b]),nt=k((t,e)=>{let r=H?performance.now():0;if(!e){if(H){v.current.rowContentCalls+=1;let s=performance.now()-r;v.current.rowContentMs+=s,v.current.rowContentMaxMs=Math.max(v.current.rowContentMaxMs,s)}return null}if(V)return i(de,{colSpan:l.length,"data-vdt-pad":"",sx:{padding:0},children:ln(e,t)});let a=lt?lt(e,t):null;if(a!=null)return i(de,{colSpan:l.length,"data-vdt-pad":"",sx:[{padding:y?"0 14px":"8px 16px"},...Array.isArray(Re)?Re:Re?[Re]:[]],children:a});let d=0,n=l.map((s,C)=>{if(d>0)return d-=1,null;let p=s.colSpan?Math.max(1,Math.min(s.colSpan(e,t),l.length-C)):1;d=p-1;let R=H?performance.now():0,q=s.render?s.render(e,t):String(e[s.id]||"");if(H){let O=performance.now()-R;v.current.cellRenderCalls+=1,v.current.cellRenderMs+=O,v.current.cellRenderMaxMs=Math.max(v.current.cellRenderMaxMs,O)}let te=Ze.has(String(s.id)),x=s.cellPadding!==void 0,B=s.rowSpan?s.rowSpan(e,t):1;if(B<=0)return null;let N=s.onCellClick;return i(de,{align:s.align||"left",rowSpan:B>1?B:void 0,colSpan:p>1?p:void 0,"data-vdt-pad":x?"":void 0,"data-vdt-pinned":te?"":void 0,"data-vdt-cell-click":N?"":void 0,onClick:N?O=>{let ne=O.clientX-ge.current.x,G=O.clientY-ge.current.y;O.stopPropagation(),!(Math.sqrt(ne*ne+G*G)>Bt)&&N(e,t,O)}:void 0,style:{...p>1?{}:U(s,C,s.width??s.minWidth),...s.primary?{fontSize:15}:{},...s.style,...s.cellStyle?s.cellStyle(e,t):{},padding:x?s.cellPadding:"8px 16px",...ye(s,!1)},children:q},String(s.id))});if(H){v.current.rowContentCalls+=1;let s=performance.now()-r;v.current.rowContentMs+=s,v.current.rowContentMaxMs=Math.max(v.current.rowContentMaxMs,s)}return i(Fe,{children:n})},[l,H,lt,Re,y,Ze,ye,V,ln,U]),sn=k(()=>{let t=on();if(!He||He.length===0)return t;let e=qt.current;return L(Fe,{children:[t,i("tr",{"data-vdt-pinned-area":"",children:i("td",{colSpan:l.length,style:{padding:0,border:0},children:i(w,{"data-vdt-inner-scroll":"",sx:[{maxHeight:st,overflowY:st?"auto":"visible",overflowX:"hidden",scrollbarWidth:"thin",borderBottom:`1px solid ${y?b.borderStrong:"rgba(224, 224, 224, 1)"}`,"& tbody tr:last-of-type > td":{borderBottom:"none"}},...Array.isArray(Ee)?Ee:Ee?[Ee]:[]],children:L("table",{style:{width:"100%",tableLayout:Xe,borderCollapse:"separate",borderSpacing:0},children:[i("colgroup",{children:l.map((r,a)=>i("col",{style:U(r,a,r.width??r.minWidth)},String(r.id)))}),i(xn,{children:He.map((r,a)=>e?i(e,{item:r,"data-index":a,"data-vdt-pinned-row":"",children:nt(a,r)},h?String(h(r,a)):`p${a}`):null)})]})})})})]})},[on,He,st,Ee,l,nt,Xe,h,y,b,U]),K=Sn??l.some(t=>typeof t.footer=="function"),dn=k(()=>{if(!K)return null;let t=[];for(let e=0;e<l.length;e+=1){let r=l[e],a=r.footerColSpan&&r.footerColSpan>1?Math.min(r.footerColSpan,l.length-e):1;t.push(i(de,{align:r.align||"left",colSpan:a>1?a:void 0,style:{...a>1?{}:U(r,e,r.width),...r.style,fontWeight:"bold",padding:y?"0 14px":"16px"},children:r.footer?r.footer(o):null},String(r.id))),e+=a-1}return i(_e,{children:t})},[K,l,o,y,U]),Rt=oe(()=>({Scroller:Le?wn:Yt,Table:t=>i(yr,{...t,sx:{borderCollapse:"separate",tableLayout:Xe,...F?{width:"var(--vdt-tw, 100%)",minWidth:`var(--vdt-tmin, ${Qe??0}px)`}:Qe&&!V?{minWidth:Qe}:{},marginRight:xe?"16px":0,...K?{height:"100%"}:{}}}),TableHead:Ve((t,e)=>i(Cr,{...t,ref:e,sx:{userSelect:"none","& > tr":{height:fe,"& > th":{padding:"16px",position:"sticky",top:0,zIndex:2,fontWeight:"bold"}}}})),TableRow:t=>{let{item:e,selected:r,"aria-selected":a,className:d,...n}=t,s=n["data-index"]??0,C=s%2===1,p=e&&Ie.current?Ie.current(e,s):s,R=!Ue&&u!==null&&u!==void 0&&p===u,q=R&&j?typeof j=="function"?j(e,s):j:void 0,te=String(d??"").split(/\s+/).filter(x=>x!=="Mui-selected"&&x!=="Mui-focusVisible").join(" ");return i(_e,{...n,"data-row-id":p!=null?String(p):void 0,className:te||void 0,selected:R,onMouseDown:x=>{Be.current=!1,ge.current={x:x.clientX,y:x.clientY}},onContextMenu:x=>{e&&yt.current&&yt.current(e,s,x)},onClick:x=>{let B=x.clientX-ge.current.x,N=x.clientY-ge.current.y;if(Math.sqrt(B*B+N*N)>Bt||Be.current){x.preventDefault(),x.stopPropagation(),Be.current=!1;return}e&&xt.current&&xt.current(e,s),Be.current=!1},sx:[{userSelect:"none",...ct?{"& > td":{height:De}}:{height:De,maxHeight:De},boxSizing:"border-box",backgroundColor:C&&ft?ft:"transparent","& td:not([data-vdt-pad])":{padding:"8px 16px"},"& td":{boxSizing:"border-box",borderBottom:ie?"1px solid rgba(224, 224, 224, 1)":"none"},"& th":{padding:"8px 16px",borderBottom:"none"},"&:hover":Je&&!R?{backgroundColor:x=>{let B=x.palette.mode==="dark",O=ut??"#000000",ne=Xt??.06;if(!ut)return B?`rgba(255, 255, 255, ${ne})`:`rgba(0, 0, 0, ${ne})`;let G=O.replace("#","").trim();if(G.length!==6)return O;let ve=parseInt(G.substring(0,2),16),be=parseInt(G.substring(2,4),16),nr=parseInt(G.substring(4,6),16);return`rgba(${ve}, ${be}, ${nr}, ${ne})`}}:void 0,cursor:Je?"pointer":void 0},q]})},TableBody:Ve((t,e)=>{let{children:r,...a}=t;return L(xn,{...a,ref:e,sx:K?{height:"100%"}:void 0,children:[r,K&&i("tr",{"aria-hidden":!0,style:{height:"100%"},children:i("td",{colSpan:l.length,style:{padding:0,border:0}})})]})}),TableFoot:Ve((t,e)=>i(Mr,{...t,ref:e,sx:[{"& tr":{height:Se??Y,maxHeight:Se??Y,boxSizing:"border-box"},"& td":{height:Se??Y,boxSizing:"border-box",backgroundColor:r=>r.palette.mode==="dark"?"#1e1e1e":"#ffffff",padding:"0 16px",color:"inherit",fontSize:"0.875rem",border:"none",boxShadow:`inset 0 1px 0 0 ${y?b.borderStrong:"#000000"}`}},...Array.isArray(Te)?Te:Te?[Te]:[]]}))}),[Je,Ue?null:u,j,Y,ft,ie,fe,ut,Xt,Yt,Se,Te,K,y,b,l,Xe,xe,ct,Qe,V,Le,F]);qt.current=Rt.TableRow;let qn=Rt,Ne=Rt,Gn=Ne.Table,Zn=Ne.TableHead,Qn=Ne.TableBody,Jn=Ne.TableRow,er=Ne.TableFoot,$=Ae?l.find(t=>String(t.id)===Ae.colId):void 0,tr=()=>Qt(null),cn=null;if(Ae&&$){let t=String($.id),e=!!(($.sortMenu??$.sortable)&&P),r=At($),a=S===t?D:void 0;cn=i(It,{open:!0,anchorPosition:{left:Ae.x,top:Ae.y},onClose:tr,sort:e?{active:a??null,clearable:!!_,onChange:d=>{d?P?.(t,d):_?.()}}:void 0,filter:r?{options:$.filterOptions??[],value:$.filterValues??[],onChange:d=>$.onFilterChange?.(d),multiple:$.filterMultiple!==!1,emptyLabel:$.filterEmptyLabel,searchable:$.filterSearchable}:void 0})}let un=L(w,{ref:Zt,style:Un??void 0,sx:{position:"relative",height:he?"auto":"100%",width:"100%","& .MuiTableHead-root":{backgroundColor:t=>y?`${b.bg} !important`:t.palette.mode==="dark"?"#1e1e1e !important":"#ffffff !important"},...Wn??{},...F?{"& thead th [data-vdt-resize]":{position:"absolute",top:0,right:0,bottom:0,width:"7px",cursor:"col-resize",zIndex:1,"&::after":{content:'""',position:"absolute",top:0,bottom:0,right:0,width:"2px",backgroundColor:y?b.selectedBar:Ye.palette.primary.main,opacity:0,transition:"opacity 0.12s ease"},"&:hover::after, &[data-active]::after":{opacity:1}}}:{},"& tbody td[data-vdt-pinned]":{backgroundColor:y?b.bg:Ye.palette.background.paper},"& tbody td[data-vdt-cell-click]":{cursor:"pointer"},"& tbody td[data-vdt-cell-click]:hover":{backgroundColor:y?b.hoverBg:Ye.palette.mode==="dark"?"rgba(255, 255, 255, 0.06)":"rgba(0, 0, 0, 0.04)"},...y&&Je?{"& tbody tr:hover td[data-vdt-pinned]":{backgroundColor:b.hoverBg}}:{},...y?{...xe?{border:`1px solid ${b.borderStrong}`,borderRadius:"4px"}:{"& table":{backgroundColor:b.bg}},overflow:"hidden","& thead tr th > *":{verticalAlign:"middle"},"& thead > tr > th":{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},"& thead > tr > th > *":{maxWidth:"100%"},"& thead .vdt-sort-box":{paddingRight:"20px"},"& thead .vdt-sort-box > .MuiTableSortLabel-root":{left:"auto !important",right:0,marginLeft:"0 !important"},"& thead tr th":{height:fe,boxSizing:"border-box",padding:"0 14px !important",fontSize:13,fontWeight:"500 !important",color:b.headerColor,backgroundColor:`${b.bg} !important`,borderTop:!xe&&Rn?`1px solid ${b.borderStrong}`:"none",borderBottom:`1px solid ${b.borderStrong}`,borderRight:`1px solid ${b.border}`,"&:last-of-type":{borderRight:"none"}},"& tbody tr td:not([data-vdt-pad])":{padding:"0 14px !important"},"& tbody tr td":{fontSize:14,borderBottom:`1px solid ${b.border}`},...o.length>0&&(he||Xn||K)?{[`& tbody tr[data-index="${o.length-1}"]:not([data-vdt-pinned-row]) td`]:{borderBottom:"none"}}:{}}:{}},children:[we?i(w,{sx:{overflowX:"auto",width:"100%"},children:L(Gn,{children:[V?null:i(Zn,{children:sn()}),i(Qn,{children:o.map((t,e)=>i(Jn,{item:t,"data-index":e,children:nt(e,t)},h?String(h(t,e)):e))}),K&&!V?i(er,{children:dn()}):null]})}):dt===null?null:i(Hr,{ref:mt,data:o,totalCount:z?o.length+1:o.length,defaultItemHeight:De,fixedItemHeight:ct?void 0:De,fixedHeaderContent:V?void 0:sn,fixedFooterContent:K&&!V?dn:void 0,itemContent:nt,...En&&h?{computeItemKey:(t,e)=>e?h(e,t):`vdt-${t}`}:{},endReached:Kn,scrollerRef:t=>{bt.current=t instanceof HTMLElement?t:null,Ke()},totalListHeightChanged:Ke,style:Le?void 0:{height:"100%"},...Le?{customScrollParent:dt}:{},increaseViewportBy:{top:Pn,bottom:Bn},overscan:Nn,...le&&o.length>0?{initialItemCount:Math.min(le,o.length)}:{},followOutput:!1,components:qn},Fn),o.length===0&&!c&&!$t&&y&&typeof se=="string"&&i(w,{sx:{position:he?"static":"absolute",top:V?0:fe,left:0,right:0,py:6,px:2,textAlign:"center",fontSize:14,color:b.emptyColor,pointerEvents:"none"},children:se}),o.length===0&&!c&&!$t&&!(y&&typeof se=="string")&&i(w,{sx:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:2,px:2,textAlign:"center",pointerEvents:"none","& > *":{pointerEvents:"auto"}},children:typeof se=="string"?L(Fe,{children:[i(w,{sx:{width:48,height:48,display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"50%",backgroundColor:"#f5f5f5",color:"#999"},children:"\u{1F4C4}"}),i(Sr,{variant:"body1",sx:{color:"text.secondary"},children:se})]}):se}),cn,$n&&i(Fe,{children:$e?i($e,{visible:c,onComplete:Ut}):i(hn,{visible:c,onComplete:Ut,size:40,indicator:i(mn,{}),sx:{top:`${l.some(t=>t.group)?fe*2:fe}px`,bottom:`${K?Se??Y:0}px`},background:{show:o.length===0,opacity:.8}})})]}),pn=y&&xe?{paddingRight:je,paddingTop:Mn,paddingBottom:Mn}:{};return ue?i(wr,{className:"grow",elevation:1,sx:{padding:0,paddingLeft:je,...pn,boxSizing:"border-box",height:he?"auto":"100%",minHeight:0,flex:he?"none":1,display:"flex",flexDirection:"column"},children:un}):i(w,{className:"grow",style:{padding:0,paddingLeft:je,...pn,boxSizing:"border-box",height:he?"auto":"100%",minHeight:0,flex:he?"none":1,display:"flex",flexDirection:"column"},children:un})}var Ar=xr(Br);export{Et as HEADER_MENU_FONT_SIZE,Z as HEADER_MENU_ICON_PATHS,kt as HEADER_MENU_ICON_SIZE,Lt as HEADER_MENU_ITEM_HEIGHT,bn as HEADER_MENU_ITEM_SX,Dt as HeaderFilterIcon,It as HeaderMenu,ot as HeaderMenuDivider,Ce as HeaderMenuIcon,re as HeaderMenuItem,Ar as VirtualDataTable,br as headerMenuAnchor};
5
5
  /**
6
6
  * Virtual Data Table - A high-performance virtual data table component for React
7
7
  *