@ehfuse/mui-virtual-data-table 1.12.0 → 1.13.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 +1 -0
- package/dist/index.esm.js +2 -2
- package/dist/index.esm.js.map +2 -2
- package/dist/index.js +2 -2
- package/dist/index.js.map +2 -2
- package/dist/types.d.ts +5 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -267,6 +267,7 @@ const [widths, setWidths] = useAccountSetting("customer.list"); // Record<column
|
|
|
267
267
|
/>
|
|
268
268
|
```
|
|
269
269
|
|
|
270
|
+
- A column with `resizable: false` (1.13.0) gets no grip and ignores any width for it in `columnWidths` — it always uses its own `width` (row numbers, checkboxes).
|
|
270
271
|
- While dragging only CSS variables on the table box change — rows are not re-rendered, virtualization and horizontal scroll stay as they are.
|
|
271
272
|
- The click that follows a drag is swallowed, so releasing over a header never sorts / opens the header menu.
|
|
272
273
|
- A flexible column (no `width`) keeps a minimum of its `minWidth` (or the resize minimum) once anything was resized; when every column ends up
|
package/dist/index.esm.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import Go,{forwardRef as ct,useCallback as j,useMemo as ce,useRef as A,useEffect as de,memo as Zo,useState as ke}from"react";import{Box as V,Table as Qo,TableBody as Sr,TableCell as Re,TableContainer as Jo,TableHead as ea,TableFooter as ta,TableRow as lt,TableSortLabel as gn,Paper as na,Typography as ra,useTheme as oa,useMediaQuery as aa}from"@mui/material";import{TableVirtuoso as ia}from"react-virtuoso";import{useCallback as He,useEffect as To,useMemo as So,useRef as rt}from"react";import{useCallback as yo,useSyncExternalStore as xo}from"react";var cr={clearFilter:"\uAC70\uB974\uAE30 \uD480\uAE30",clearSort:"\uC815\uB82C \uD480\uAE30",noMatches:"\uCC3E\uB294 \uAC12\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.",noOptions:"\uACE0\uB97C \uAC12\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.",reorderHandle:"\uC21C\uC11C \uC62E\uAE30\uAE30",search:"\uCC3E\uAE30",sortAscending:"\uC624\uB984\uCC28\uC21C \uC815\uB82C",sortDescending:"\uB0B4\uB9BC\uCC28\uC21C \uC815\uB82C"};var dr={clearFilter:"Clear filter",clearSort:"Clear sort",noMatches:"No matching values.",noOptions:"No values to choose from.",reorderHandle:"Drag to reorder",search:"Search",sortAscending:"Sort ascending",sortDescending:"Sort descending"};var ur={clearFilter:"\u30D5\u30A3\u30EB\u30BF\u30FC\u89E3\u9664",clearSort:"\u4E26\u3079\u66FF\u3048\u89E3\u9664",noMatches:"\u4E00\u81F4\u3059\u308B\u9805\u76EE\u304C\u3042\u308A\u307E\u305B\u3093\u3002",noOptions:"\u9078\u629E\u53EF\u80FD\u306A\u9805\u76EE\u304C\u3042\u308A\u307E\u305B\u3093\u3002",reorderHandle:"\u30C9\u30E9\u30C3\u30B0\u3057\u3066\u4E26\u3079\u66FF\u3048",search:"\u691C\u7D22",sortAscending:"\u6607\u9806\u3067\u4E26\u3079\u66FF\u3048",sortDescending:"\u964D\u9806\u3067\u4E26\u3079\u66FF\u3048"};var pr={clearFilter:"\u6E05\u9664\u7B5B\u9009",clearSort:"\u6E05\u9664\u6392\u5E8F",noMatches:"\u672A\u627E\u5230\u5339\u914D\u9879\u3002",noOptions:"\u6682\u65E0\u53EF\u9009\u5185\u5BB9\u3002",reorderHandle:"\u62D6\u52A8\u8C03\u6574\u987A\u5E8F",search:"\u641C\u7D22",sortAscending:"\u5347\u5E8F\u6392\u5E8F",sortDescending:"\u964D\u5E8F\u6392\u5E8F"};var fr={clearFilter:"Filter zur\xFCcksetzen",clearSort:"Sortierung zur\xFCcksetzen",noMatches:"Keine passenden Werte.",noOptions:"Keine Werte zur Auswahl.",reorderHandle:"Ziehen zum Neuanordnen",search:"Suchen",sortAscending:"Aufsteigend sortieren",sortDescending:"Absteigend sortieren"};var gr={clearFilter:"Effacer le filtre",clearSort:"Effacer le tri",noMatches:"Aucune valeur correspondante.",noOptions:"Aucune option disponible.",reorderHandle:"Glisser pour r\xE9organiser",search:"Rechercher",sortAscending:"Tri croissant",sortDescending:"Tri d\xE9croissant"};var mr={clearFilter:"Cancella filtro",clearSort:"Annulla ordinamento",noMatches:"Nessun valore corrispondente.",noOptions:"Nessuna opzione disponibile.",reorderHandle:"Trascina per riordinare",search:"Cerca",sortAscending:"Ordina in ordine crescente",sortDescending:"Ordina in ordine decrescente"};var hr={clearFilter:"X\xF3a b\u1ED9 l\u1ECDc",clearSort:"B\u1ECF s\u1EAFp x\u1EBFp",noMatches:"Kh\xF4ng t\xECm th\u1EA5y gi\xE1 tr\u1ECB ph\xF9 h\u1EE3p.",noOptions:"Kh\xF4ng c\xF3 gi\xE1 tr\u1ECB \u0111\u1EC3 ch\u1ECDn.",reorderHandle:"K\xE9o \u0111\u1EC3 \u0111\u1ED5i th\u1EE9 t\u1EF1",search:"T\xECm ki\u1EBFm",sortAscending:"S\u1EAFp x\u1EBFp t\u0103ng d\u1EA7n",sortDescending:"S\u1EAFp x\u1EBFp gi\u1EA3m d\u1EA7n"};var St={ko:cr,en:dr,ja:ur,zh:pr,de:fr,fr:gr,it:mr,vi:hr},vo={ko:"ko-KR",en:"en-US",ja:"ja-JP",zh:"zh-CN",de:"de-DE",fr:"fr-FR",it:"it-IT",vi:"vi-VN"},Rt="ko",en=new Set;function nn(r){let a=String(r??"").toLowerCase().split(/[-_]/)[0];return a in St?a:"en"}function Co(r){let a=nn(r);a!==Rt&&(Rt=a,en.forEach(s=>s()))}function tn(){return Rt}function Mo(r){return en.add(r),()=>{en.delete(r)}}function wo(r,a,s){let v=s?nn(s):Rt,y=St[v][r]??St.en[r]??St.ko[r]??r;return a?y.replace(/\{\{\s*(\w+)\s*\}\}/g,(b,E)=>a[E]==null?b:String(a[E])):y}function Et(r){let a=xo(Mo,tn,tn),s=r?nn(r):a;return{t:yo((y,b)=>wo(y,b,s),[s]),lang:s,intlTag:vo[s]}}import{jsx as Lt}from"react/jsx-runtime";var ot="__vdt_reorder",ze=40,br=14,Ro=Lt("svg",{width:"18",height:"18",viewBox:"0 0 24 24","aria-hidden":!0,focusable:"false",children:Lt("path",{fill:"currentColor",d:"M11 18c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2zm-2-8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm6 4c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"})}),Eo=r=>Array.from(r.querySelectorAll("tbody tr[data-index]:not([data-vdt-pinned-row])"));function Lo(r){for(let a=r;a;a=a.parentElement){let{overflowY:s}=getComputedStyle(a);if((s==="auto"||s==="scroll")&&a.scrollHeight>a.clientHeight)return a}return null}function yr({config:r,tableBoxRef:a,getScroller:s,dataLengthRef:v,anyPinned:y}){let{t:b}=Et(),E=rt(r);E.current=r;let z=!!r,T=rt(null),P=rt(0),$=rt(null),B=rt(null),Z=()=>{$.current&&($.current.style.display="none")},q=He(()=>{let l=T.current,d=a.current;if(!l||!d)return;let x=Eo(d);if(x.length===0)return;let m=document.elementFromPoint(l.x,l.y)?.closest("tr[data-index]"),M=m&&d.contains(m)&&!m.hasAttribute("data-vdt-pinned-row")?m:null,K;if(M){let Se=M.getBoundingClientRect();K=l.y<Se.top+Se.height/2?"before":"after"}else{let Se=x[0].getBoundingClientRect(),It=x[x.length-1].getBoundingClientRect();if(l.y<Se.top)M=x[0],K="before";else if(l.y>It.bottom)M=x[x.length-1],K="after";else return}let O=Number(M.dataset.index),ae=K==="before"?O:O+1,Te=ae>l.from?ae-1:ae;l.to=Te;let Ae=$.current;if(!Ae)return;if(Te===l.from){Ae.style.display="none";return}let Ie=M.getBoundingClientRect(),pe=d.getBoundingClientRect(),At=(K==="before"?Ie.top:Ie.bottom)-pe.top;Ae.style.top=`${Math.max(0,Math.min(pe.height-2,Math.round(At)-1))}px`,Ae.style.display="block"},[a]),X=He(()=>{cancelAnimationFrame(P.current);let l=()=>{let d=T.current;if(!d)return;let x=s()??Lo(a.current)??null,m=x??document.scrollingElement;if(!m)return;let M=x?x.getBoundingClientRect().top:0,K=x?x.getBoundingClientRect().bottom:window.innerHeight,O=0;d.y<M+ze?O=-Math.ceil((M+ze-d.y)/ze*br):d.y>K-ze&&(O=Math.ceil((d.y-(K-ze))/ze*br)),O!==0&&(m.scrollTop+=O,q(),P.current=requestAnimationFrame(l))};P.current=requestAnimationFrame(l)},[s,a,q]),S=He(l=>{let d=T.current;d&&(T.current=null,cancelAnimationFrame(P.current),Z(),d.tr?.removeAttribute("data-vdt-dragging"),document.body.style.cursor="",document.body.style.userSelect="",l&&d.to!==null&&d.to!==d.from&&E.current?.onReorder(d.from,d.to,d.item))},[]);To(()=>{if(!z)return;let l=m=>{let M=T.current;!M||m.pointerId!==M.pointerId||(M.x=m.clientX,M.y=m.clientY,q(),X())},d=m=>{let M=T.current;!M||m.pointerId!==M.pointerId||S(m.type==="pointerup")},x=m=>{m.key==="Escape"&&T.current&&S(!1)};return window.addEventListener("pointermove",l),window.addEventListener("pointerup",d),window.addEventListener("pointercancel",d),window.addEventListener("keydown",x),()=>{window.removeEventListener("pointermove",l),window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",d),window.removeEventListener("keydown",x),S(!1)}},[z,q,X,S]);let _=He(l=>{let d=a.current;if(!d||(d.querySelectorAll("tbody tr[data-vdt-dragging]").forEach(m=>m.removeAttribute("data-vdt-dragging")),d.querySelectorAll('.vdt-reorder-handle[aria-pressed="true"]').forEach(m=>m.setAttribute("aria-pressed","false")),l===null))return;let x=d.querySelector(`tbody tr[data-index="${l}"]:not([data-vdt-pinned-row])`);x?.setAttribute("data-vdt-dragging",""),x?.querySelector(".vdt-reorder-handle")?.setAttribute("aria-pressed","true")},[a]),J=He((l,d,x)=>{if(l.stopPropagation(),l.button!==0&&l.pointerType==="mouse"||E.current?.disabledReason)return;let m=l.currentTarget.closest("tr");if(!m?.hasAttribute("data-vdt-pinned-row")){l.preventDefault(),B.current!==null&&(B.current=null,_(null));try{l.currentTarget.setPointerCapture(l.pointerId)}catch{}T.current={from:d,item:x,pointerId:l.pointerId,x:l.clientX,y:l.clientY,to:null,tr:m},m?.setAttribute("data-vdt-dragging",""),document.body.style.cursor="grabbing",document.body.style.userSelect="none"}},[_]),ue=He((l,d,x)=>{let m=E.current;if(!m||m.disabledReason)return;let M=B.current;if(l.key===" "||l.key==="Enter"){l.preventDefault(),l.stopPropagation(),B.current=M===null?d:null,_(B.current);return}if(l.key==="Escape"&&M!==null){l.preventDefault(),B.current=null,_(null);return}if((l.key==="ArrowUp"||l.key==="ArrowDown")&&M!==null){l.preventDefault(),l.stopPropagation();let K=Math.max(0,Math.min((v.current??1)-1,d+(l.key==="ArrowUp"?-1:1)));if(K===d)return;m.onReorder(d,K,x),B.current=K,requestAnimationFrame(()=>requestAnimationFrame(()=>{a.current?.querySelector(`tbody tr[data-index="${K}"]:not([data-vdt-pinned-row]) .vdt-reorder-handle`)?.focus({preventScroll:!1}),_(K)}))}},[v,_,a]),w=He((l,d)=>{let x=E.current;if(!x||x.canDrag&&!x.canDrag(l,d))return null;let m=x.handleLabel??b("reorderHandle");return Lt("button",{type:"button",className:"vdt-reorder-handle","aria-label":m,title:x.disabledReason??m,disabled:!!x.disabledReason,onPointerDown:M=>J(M,d,l),onKeyDown:M=>ue(M,d,l),onMouseDown:M=>M.stopPropagation(),onClick:M=>{M.preventDefault(),M.stopPropagation()},onContextMenu:M=>M.stopPropagation(),children:Ro})},[J,ue,b]),u=r?.handleWidth??36,D=r?.disabledReason,c=So(()=>z?{id:ot,text:"",width:u,align:"center",cellPadding:0,headerMenu:!1,mobile:!1,...y?{pinned:"left"}:{},render:w}:null,[z,u,y,w,D]);return{on:z,handleColumn:c,renderHandle:w,indicator:z?Lt("div",{ref:$,"data-vdt-drop-indicator":"","aria-hidden":!0,style:{position:"absolute",left:0,right:0,height:2,display:"none",zIndex:4,pointerEvents:"none"}}):null}}import{useCallback as Be,useEffect as Do,useRef as _e}from"react";import{jsx as Po}from"react/jsx-runtime";var Ho=400,ko=6,Fe=40,xr=14,Ao=400,rn=r=>String(r.id);function vr(r){return r.id!==ot&&r.pinned!=="left"&&r.reorderable!==!1}function on(r,a){if(!a||a.length===0)return r;let s=new Map;a.forEach((E,z)=>{s.has(E)||s.set(E,z)});let v=r.slice(),y=new Map;r.forEach((E,z)=>{if(!vr(E)||!s.has(rn(E)))return;let T=E.group??"",P=y.get(T);P?P.push(z):y.set(T,[z])});let b=!1;return y.forEach(E=>{let z=E.map(T=>r[T]).sort((T,P)=>s.get(rn(T))-s.get(rn(P)));E.forEach((T,P)=>{v[T]!==z[P]&&(b=!0),v[T]=z[P]})}),b?v:r}function Io(r){for(let a=r;a;a=a.parentElement){let{overflowX:s}=getComputedStyle(a);if((s==="auto"||s==="scroll")&&a.scrollWidth>a.clientWidth)return a}return null}function Cr({on:r,config:a,tableBoxRef:s,columnsRef:v,onCommit:y}){let b=a?.holdMs??Ho,E=_e(b);E.current=b;let z=_e(y);z.current=y;let T=_e(null),P=_e(null),$=_e(0),B=_e(null),Z=Be(w=>{let u=s.current;return u?Array.from(u.querySelectorAll("thead th[data-vdt-colkey]")).filter(D=>(D.getAttribute("data-vdt-colgroup")??"")===w).map(D=>({key:D.getAttribute("data-vdt-colkey"),th:D,rect:D.getBoundingClientRect()})).sort((D,c)=>D.rect.left-c.rect.left):[]},[s]),q=Be(()=>{let w=T.current,u=s.current,D=P.current;if(!w||!w.dragging||!u)return;let c=Z(w.group);if(c.length===0)return;let i=c.findIndex(m=>w.x<m.rect.left+m.rect.width/2);i<0&&(i=c.length),w.before=i<c.length?c[i].key:null,w.afterLast=c[c.length-1].key;let l=c.findIndex(m=>m.key===w.key);if(!D)return;if(i===l||i===l+1){D.style.display="none";return}let d=u.getBoundingClientRect(),x=i<c.length?c[i].rect.left:c[c.length-1].rect.right;D.style.left=`${Math.max(0,Math.min(d.width-2,Math.round(x-d.left)-1))}px`,D.style.display="block"},[s,Z]),X=Be(()=>{cancelAnimationFrame($.current);let w=()=>{let u=T.current;if(!u||!u.dragging)return;let D=Io(u.th);if(!D)return;let c=D.getBoundingClientRect(),i=0;if(u.x<c.left+Fe?i=-Math.ceil((c.left+Fe-u.x)/Fe*xr):u.x>c.right-Fe&&(i=Math.ceil((u.x-(c.right-Fe))/Fe*xr)),i===0)return;let l=D.scrollLeft;D.scrollLeft+=i,D.scrollLeft!==l&&(q(),$.current=requestAnimationFrame(w))};$.current=requestAnimationFrame(w)},[q]),S=Be(w=>{let u=T.current;if(u&&(T.current=null,window.clearTimeout(u.timer),cancelAnimationFrame($.current),B.current?.(),B.current=null,P.current&&(P.current.style.display="none"),u.th.removeAttribute("data-vdt-col-dragging"),s.current?.removeAttribute("data-vdt-col-reordering"),!!u.dragging&&(document.body.style.userSelect="",w))){let D=m=>{m.stopPropagation(),m.preventDefault(),window.removeEventListener("click",D,!0)};window.addEventListener("click",D,!0),window.setTimeout(()=>window.removeEventListener("click",D,!0),Ao);let c=u.before??null;if(c===u.key)return;let i=(v.current??[]).map(m=>String(m.id)),l=i.indexOf(u.key);if(l<0)return;let d=i.slice();if(d.splice(l,1),c!==null){let m=d.indexOf(c);if(m<0)return;d.splice(m,0,u.key)}else{let m=u.afterLast?d.indexOf(u.afterLast):-1;if(m<0)return;d.splice(m+1,0,u.key)}let x=on(v.current??[],d).map(m=>String(m.id));if(x.join("\0")===i.join("\0"))return;z.current(x)}},[s,v]);Do(()=>(r||S(!1),()=>S(!1)),[r,S]);let _=Be((w,u)=>{if(T.current&&S(!1),u.pointerType==="mouse"&&u.button!==0||u.defaultPrevented||u.target?.closest?.("[data-vdt-resize], input, textarea, select, [contenteditable='true']"))return;let c=u.currentTarget,i={key:String(w.id),group:w.group??"",th:c,pointerId:u.pointerId,startX:u.clientX,startY:u.clientY,x:u.clientX,dragging:!1,cancelled:!1,before:null,afterLast:null,timer:0};T.current=i;let l=O=>{if(!(O.pointerId!==i.pointerId||T.current!==i)){if(!i.dragging){Math.hypot(O.clientX-i.startX,O.clientY-i.startY)>ko&&S(!1);return}i.cancelled||(i.x=O.clientX,q(),X())}},d=O=>{O.pointerId!==i.pointerId||T.current!==i||(i.cancelled&&(i.before=i.key),S(O.type==="pointerup"))},x=O=>{if(!(O.key!=="Escape"||T.current!==i)){if(!i.dragging){S(!1);return}O.preventDefault(),i.cancelled=!0,P.current&&(P.current.style.display="none"),i.th.removeAttribute("data-vdt-col-dragging"),s.current?.removeAttribute("data-vdt-col-reordering"),cancelAnimationFrame($.current)}},m=O=>{T.current===i&&(i.dragging||u.pointerType!=="mouse")&&(O.preventDefault(),O.stopPropagation())},M=O=>{T.current===i&&i.dragging&&O.preventDefault()},K=O=>{T.current===i&&i.dragging&&O.preventDefault()};window.addEventListener("pointermove",l),window.addEventListener("pointerup",d),window.addEventListener("pointercancel",d),window.addEventListener("keydown",x,!0),window.addEventListener("contextmenu",m,!0),window.addEventListener("touchmove",M,{passive:!1}),document.addEventListener("selectstart",K),B.current=()=>{window.removeEventListener("pointermove",l),window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",d),window.removeEventListener("keydown",x,!0),window.removeEventListener("contextmenu",m,!0),window.removeEventListener("touchmove",M),document.removeEventListener("selectstart",K)},i.timer=window.setTimeout(()=>{if(T.current===i){i.dragging=!0,c.setAttribute("data-vdt-col-dragging",""),s.current?.setAttribute("data-vdt-col-reordering",""),document.body.style.userSelect="none";try{window.getSelection()?.removeAllRanges()}catch{}q()}},E.current)},[S,q,X,s]),J=Be(w=>{if(!r||!vr(w))return{};let u=w.headerProps?.onPointerDown;return{"data-vdt-colkey":String(w.id),"data-vdt-colgroup":w.group??"",onPointerDown:D=>{u?.(D),_(w,D)}}},[r,_]);return{on:r,headerCellProps:J,indicator:r?Po("div",{ref:P,"data-vdt-col-drop-indicator":"","aria-hidden":!0,style:{position:"absolute",top:0,bottom:0,width:2,display:"none",zIndex:5,pointerEvents:"none"}}):null}}import{jsx as an}from"react/jsx-runtime";import{useRef as Mr,useState as Oo,useEffect as No}from"react";import{Box as zo,CircularProgress as Bo}from"@mui/material";var at=function(){return at=Object.assign||function(a){for(var s,v=1,y=arguments.length;v<y;v++){s=arguments[v];for(var b in s)Object.prototype.hasOwnProperty.call(s,b)&&(a[b]=s[b])}return a},at.apply(this,arguments)};function ln(r){var a=r.visible,s=r.onComplete,v=r.fadeoutDuration,y=v===void 0?200:v,b=r.exitDelay,E=b===void 0?0:b,z=r.size,T=z===void 0?40:z,P=r.className,$=r.style,B=r.sx,Z=r.indicator,q=r.background,X=q===void 0?{show:!0,color:"255, 255, 255",opacity:.9}:q,S=Mr(void 0),_=Mr(null),J=Oo(a),ue=J[0],w=J[1],u=X.show,D=u===void 0?!0:u,c=X.color,i=c===void 0?"255, 255, 255":c,l=X.opacity,d=l===void 0?.9:l;if(No(function(){var M=S.current;if(M===!0&&a===!1&&_.current){var K=_.current;K.style.opacity="0",setTimeout(function(){w(!1),s?.()},y+E)}else a===!0&&(w(!0),_.current&&(_.current.style.opacity="1"));S.current=a},[a,s,y,E]),!ue)return null;var x=function(){return typeof Z=="string"?an("img",{src:Z,alt:"Loading",style:{width:T,height:T}}):Z||an(Bo,{size:T})},m=function(){return D?i.startsWith("rgba")?{backgroundColor:i}:/^\d+,\s*\d+,\s*\d+$/.test(i)?{backgroundColor:"rgba(".concat(i,", ").concat(d,")")}:d!==1?{backgroundColor:i,"&::before":{content:'""',position:"absolute",top:0,left:0,right:0,bottom:0,backgroundColor:i,opacity:d,zIndex:-1}}:{backgroundColor:i}:{backgroundColor:"transparent"}};return an(zo,{ref:_,className:P,style:at({},$),sx:at(at({position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e3,opacity:a?1:0,transition:"opacity ".concat(y,"ms ease-out")},m()),B),children:x()})}import{Fragment as Fo,jsx as wr,jsxs as Vo}from"react/jsx-runtime";var _o=`
|
|
1
|
+
import Go,{forwardRef as ct,useCallback as j,useMemo as ce,useRef as A,useEffect as de,memo as Zo,useState as ke}from"react";import{Box as V,Table as Qo,TableBody as Sr,TableCell as Re,TableContainer as Jo,TableHead as ea,TableFooter as ta,TableRow as lt,TableSortLabel as gn,Paper as na,Typography as ra,useTheme as oa,useMediaQuery as aa}from"@mui/material";import{TableVirtuoso as ia}from"react-virtuoso";import{useCallback as He,useEffect as To,useMemo as So,useRef as rt}from"react";import{useCallback as yo,useSyncExternalStore as xo}from"react";var cr={clearFilter:"\uAC70\uB974\uAE30 \uD480\uAE30",clearSort:"\uC815\uB82C \uD480\uAE30",noMatches:"\uCC3E\uB294 \uAC12\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.",noOptions:"\uACE0\uB97C \uAC12\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.",reorderHandle:"\uC21C\uC11C \uC62E\uAE30\uAE30",search:"\uCC3E\uAE30",sortAscending:"\uC624\uB984\uCC28\uC21C \uC815\uB82C",sortDescending:"\uB0B4\uB9BC\uCC28\uC21C \uC815\uB82C"};var dr={clearFilter:"Clear filter",clearSort:"Clear sort",noMatches:"No matching values.",noOptions:"No values to choose from.",reorderHandle:"Drag to reorder",search:"Search",sortAscending:"Sort ascending",sortDescending:"Sort descending"};var ur={clearFilter:"\u30D5\u30A3\u30EB\u30BF\u30FC\u89E3\u9664",clearSort:"\u4E26\u3079\u66FF\u3048\u89E3\u9664",noMatches:"\u4E00\u81F4\u3059\u308B\u9805\u76EE\u304C\u3042\u308A\u307E\u305B\u3093\u3002",noOptions:"\u9078\u629E\u53EF\u80FD\u306A\u9805\u76EE\u304C\u3042\u308A\u307E\u305B\u3093\u3002",reorderHandle:"\u30C9\u30E9\u30C3\u30B0\u3057\u3066\u4E26\u3079\u66FF\u3048",search:"\u691C\u7D22",sortAscending:"\u6607\u9806\u3067\u4E26\u3079\u66FF\u3048",sortDescending:"\u964D\u9806\u3067\u4E26\u3079\u66FF\u3048"};var pr={clearFilter:"\u6E05\u9664\u7B5B\u9009",clearSort:"\u6E05\u9664\u6392\u5E8F",noMatches:"\u672A\u627E\u5230\u5339\u914D\u9879\u3002",noOptions:"\u6682\u65E0\u53EF\u9009\u5185\u5BB9\u3002",reorderHandle:"\u62D6\u52A8\u8C03\u6574\u987A\u5E8F",search:"\u641C\u7D22",sortAscending:"\u5347\u5E8F\u6392\u5E8F",sortDescending:"\u964D\u5E8F\u6392\u5E8F"};var fr={clearFilter:"Filter zur\xFCcksetzen",clearSort:"Sortierung zur\xFCcksetzen",noMatches:"Keine passenden Werte.",noOptions:"Keine Werte zur Auswahl.",reorderHandle:"Ziehen zum Neuanordnen",search:"Suchen",sortAscending:"Aufsteigend sortieren",sortDescending:"Absteigend sortieren"};var gr={clearFilter:"Effacer le filtre",clearSort:"Effacer le tri",noMatches:"Aucune valeur correspondante.",noOptions:"Aucune option disponible.",reorderHandle:"Glisser pour r\xE9organiser",search:"Rechercher",sortAscending:"Tri croissant",sortDescending:"Tri d\xE9croissant"};var mr={clearFilter:"Cancella filtro",clearSort:"Annulla ordinamento",noMatches:"Nessun valore corrispondente.",noOptions:"Nessuna opzione disponibile.",reorderHandle:"Trascina per riordinare",search:"Cerca",sortAscending:"Ordina in ordine crescente",sortDescending:"Ordina in ordine decrescente"};var hr={clearFilter:"X\xF3a b\u1ED9 l\u1ECDc",clearSort:"B\u1ECF s\u1EAFp x\u1EBFp",noMatches:"Kh\xF4ng t\xECm th\u1EA5y gi\xE1 tr\u1ECB ph\xF9 h\u1EE3p.",noOptions:"Kh\xF4ng c\xF3 gi\xE1 tr\u1ECB \u0111\u1EC3 ch\u1ECDn.",reorderHandle:"K\xE9o \u0111\u1EC3 \u0111\u1ED5i th\u1EE9 t\u1EF1",search:"T\xECm ki\u1EBFm",sortAscending:"S\u1EAFp x\u1EBFp t\u0103ng d\u1EA7n",sortDescending:"S\u1EAFp x\u1EBFp gi\u1EA3m d\u1EA7n"};var St={ko:cr,en:dr,ja:ur,zh:pr,de:fr,fr:gr,it:mr,vi:hr},vo={ko:"ko-KR",en:"en-US",ja:"ja-JP",zh:"zh-CN",de:"de-DE",fr:"fr-FR",it:"it-IT",vi:"vi-VN"},Rt="ko",en=new Set;function nn(r){let a=String(r??"").toLowerCase().split(/[-_]/)[0];return a in St?a:"en"}function Co(r){let a=nn(r);a!==Rt&&(Rt=a,en.forEach(s=>s()))}function tn(){return Rt}function Mo(r){return en.add(r),()=>{en.delete(r)}}function wo(r,a,s){let v=s?nn(s):Rt,y=St[v][r]??St.en[r]??St.ko[r]??r;return a?y.replace(/\{\{\s*(\w+)\s*\}\}/g,(b,E)=>a[E]==null?b:String(a[E])):y}function Et(r){let a=xo(Mo,tn,tn),s=r?nn(r):a;return{t:yo((y,b)=>wo(y,b,s),[s]),lang:s,intlTag:vo[s]}}import{jsx as Lt}from"react/jsx-runtime";var ot="__vdt_reorder",ze=40,br=14,Ro=Lt("svg",{width:"18",height:"18",viewBox:"0 0 24 24","aria-hidden":!0,focusable:"false",children:Lt("path",{fill:"currentColor",d:"M11 18c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2zm-2-8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm6 4c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"})}),Eo=r=>Array.from(r.querySelectorAll("tbody tr[data-index]:not([data-vdt-pinned-row])"));function Lo(r){for(let a=r;a;a=a.parentElement){let{overflowY:s}=getComputedStyle(a);if((s==="auto"||s==="scroll")&&a.scrollHeight>a.clientHeight)return a}return null}function yr({config:r,tableBoxRef:a,getScroller:s,dataLengthRef:v,anyPinned:y}){let{t:b}=Et(),E=rt(r);E.current=r;let z=!!r,T=rt(null),P=rt(0),$=rt(null),B=rt(null),Z=()=>{$.current&&($.current.style.display="none")},q=He(()=>{let l=T.current,d=a.current;if(!l||!d)return;let x=Eo(d);if(x.length===0)return;let m=document.elementFromPoint(l.x,l.y)?.closest("tr[data-index]"),M=m&&d.contains(m)&&!m.hasAttribute("data-vdt-pinned-row")?m:null,K;if(M){let Se=M.getBoundingClientRect();K=l.y<Se.top+Se.height/2?"before":"after"}else{let Se=x[0].getBoundingClientRect(),It=x[x.length-1].getBoundingClientRect();if(l.y<Se.top)M=x[0],K="before";else if(l.y>It.bottom)M=x[x.length-1],K="after";else return}let O=Number(M.dataset.index),ae=K==="before"?O:O+1,Te=ae>l.from?ae-1:ae;l.to=Te;let Ae=$.current;if(!Ae)return;if(Te===l.from){Ae.style.display="none";return}let Ie=M.getBoundingClientRect(),pe=d.getBoundingClientRect(),At=(K==="before"?Ie.top:Ie.bottom)-pe.top;Ae.style.top=`${Math.max(0,Math.min(pe.height-2,Math.round(At)-1))}px`,Ae.style.display="block"},[a]),X=He(()=>{cancelAnimationFrame(P.current);let l=()=>{let d=T.current;if(!d)return;let x=s()??Lo(a.current)??null,m=x??document.scrollingElement;if(!m)return;let M=x?x.getBoundingClientRect().top:0,K=x?x.getBoundingClientRect().bottom:window.innerHeight,O=0;d.y<M+ze?O=-Math.ceil((M+ze-d.y)/ze*br):d.y>K-ze&&(O=Math.ceil((d.y-(K-ze))/ze*br)),O!==0&&(m.scrollTop+=O,q(),P.current=requestAnimationFrame(l))};P.current=requestAnimationFrame(l)},[s,a,q]),S=He(l=>{let d=T.current;d&&(T.current=null,cancelAnimationFrame(P.current),Z(),d.tr?.removeAttribute("data-vdt-dragging"),document.body.style.cursor="",document.body.style.userSelect="",l&&d.to!==null&&d.to!==d.from&&E.current?.onReorder(d.from,d.to,d.item))},[]);To(()=>{if(!z)return;let l=m=>{let M=T.current;!M||m.pointerId!==M.pointerId||(M.x=m.clientX,M.y=m.clientY,q(),X())},d=m=>{let M=T.current;!M||m.pointerId!==M.pointerId||S(m.type==="pointerup")},x=m=>{m.key==="Escape"&&T.current&&S(!1)};return window.addEventListener("pointermove",l),window.addEventListener("pointerup",d),window.addEventListener("pointercancel",d),window.addEventListener("keydown",x),()=>{window.removeEventListener("pointermove",l),window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",d),window.removeEventListener("keydown",x),S(!1)}},[z,q,X,S]);let _=He(l=>{let d=a.current;if(!d||(d.querySelectorAll("tbody tr[data-vdt-dragging]").forEach(m=>m.removeAttribute("data-vdt-dragging")),d.querySelectorAll('.vdt-reorder-handle[aria-pressed="true"]').forEach(m=>m.setAttribute("aria-pressed","false")),l===null))return;let x=d.querySelector(`tbody tr[data-index="${l}"]:not([data-vdt-pinned-row])`);x?.setAttribute("data-vdt-dragging",""),x?.querySelector(".vdt-reorder-handle")?.setAttribute("aria-pressed","true")},[a]),J=He((l,d,x)=>{if(l.stopPropagation(),l.button!==0&&l.pointerType==="mouse"||E.current?.disabledReason)return;let m=l.currentTarget.closest("tr");if(!m?.hasAttribute("data-vdt-pinned-row")){l.preventDefault(),B.current!==null&&(B.current=null,_(null));try{l.currentTarget.setPointerCapture(l.pointerId)}catch{}T.current={from:d,item:x,pointerId:l.pointerId,x:l.clientX,y:l.clientY,to:null,tr:m},m?.setAttribute("data-vdt-dragging",""),document.body.style.cursor="grabbing",document.body.style.userSelect="none"}},[_]),ue=He((l,d,x)=>{let m=E.current;if(!m||m.disabledReason)return;let M=B.current;if(l.key===" "||l.key==="Enter"){l.preventDefault(),l.stopPropagation(),B.current=M===null?d:null,_(B.current);return}if(l.key==="Escape"&&M!==null){l.preventDefault(),B.current=null,_(null);return}if((l.key==="ArrowUp"||l.key==="ArrowDown")&&M!==null){l.preventDefault(),l.stopPropagation();let K=Math.max(0,Math.min((v.current??1)-1,d+(l.key==="ArrowUp"?-1:1)));if(K===d)return;m.onReorder(d,K,x),B.current=K,requestAnimationFrame(()=>requestAnimationFrame(()=>{a.current?.querySelector(`tbody tr[data-index="${K}"]:not([data-vdt-pinned-row]) .vdt-reorder-handle`)?.focus({preventScroll:!1}),_(K)}))}},[v,_,a]),w=He((l,d)=>{let x=E.current;if(!x||x.canDrag&&!x.canDrag(l,d))return null;let m=x.handleLabel??b("reorderHandle");return Lt("button",{type:"button",className:"vdt-reorder-handle","aria-label":m,title:x.disabledReason??m,disabled:!!x.disabledReason,onPointerDown:M=>J(M,d,l),onKeyDown:M=>ue(M,d,l),onMouseDown:M=>M.stopPropagation(),onClick:M=>{M.preventDefault(),M.stopPropagation()},onContextMenu:M=>M.stopPropagation(),children:Ro})},[J,ue,b]),p=r?.handleWidth??36,D=r?.disabledReason,c=So(()=>z?{id:ot,text:"",width:p,align:"center",cellPadding:0,headerMenu:!1,mobile:!1,...y?{pinned:"left"}:{},render:w}:null,[z,p,y,w,D]);return{on:z,handleColumn:c,renderHandle:w,indicator:z?Lt("div",{ref:$,"data-vdt-drop-indicator":"","aria-hidden":!0,style:{position:"absolute",left:0,right:0,height:2,display:"none",zIndex:4,pointerEvents:"none"}}):null}}import{useCallback as Be,useEffect as Do,useRef as _e}from"react";import{jsx as Po}from"react/jsx-runtime";var Ho=400,ko=6,Fe=40,xr=14,Ao=400,rn=r=>String(r.id);function vr(r){return r.id!==ot&&r.pinned!=="left"&&r.reorderable!==!1}function on(r,a){if(!a||a.length===0)return r;let s=new Map;a.forEach((E,z)=>{s.has(E)||s.set(E,z)});let v=r.slice(),y=new Map;r.forEach((E,z)=>{if(!vr(E)||!s.has(rn(E)))return;let T=E.group??"",P=y.get(T);P?P.push(z):y.set(T,[z])});let b=!1;return y.forEach(E=>{let z=E.map(T=>r[T]).sort((T,P)=>s.get(rn(T))-s.get(rn(P)));E.forEach((T,P)=>{v[T]!==z[P]&&(b=!0),v[T]=z[P]})}),b?v:r}function Io(r){for(let a=r;a;a=a.parentElement){let{overflowX:s}=getComputedStyle(a);if((s==="auto"||s==="scroll")&&a.scrollWidth>a.clientWidth)return a}return null}function Cr({on:r,config:a,tableBoxRef:s,columnsRef:v,onCommit:y}){let b=a?.holdMs??Ho,E=_e(b);E.current=b;let z=_e(y);z.current=y;let T=_e(null),P=_e(null),$=_e(0),B=_e(null),Z=Be(w=>{let p=s.current;return p?Array.from(p.querySelectorAll("thead th[data-vdt-colkey]")).filter(D=>(D.getAttribute("data-vdt-colgroup")??"")===w).map(D=>({key:D.getAttribute("data-vdt-colkey"),th:D,rect:D.getBoundingClientRect()})).sort((D,c)=>D.rect.left-c.rect.left):[]},[s]),q=Be(()=>{let w=T.current,p=s.current,D=P.current;if(!w||!w.dragging||!p)return;let c=Z(w.group);if(c.length===0)return;let i=c.findIndex(m=>w.x<m.rect.left+m.rect.width/2);i<0&&(i=c.length),w.before=i<c.length?c[i].key:null,w.afterLast=c[c.length-1].key;let l=c.findIndex(m=>m.key===w.key);if(!D)return;if(i===l||i===l+1){D.style.display="none";return}let d=p.getBoundingClientRect(),x=i<c.length?c[i].rect.left:c[c.length-1].rect.right;D.style.left=`${Math.max(0,Math.min(d.width-2,Math.round(x-d.left)-1))}px`,D.style.display="block"},[s,Z]),X=Be(()=>{cancelAnimationFrame($.current);let w=()=>{let p=T.current;if(!p||!p.dragging)return;let D=Io(p.th);if(!D)return;let c=D.getBoundingClientRect(),i=0;if(p.x<c.left+Fe?i=-Math.ceil((c.left+Fe-p.x)/Fe*xr):p.x>c.right-Fe&&(i=Math.ceil((p.x-(c.right-Fe))/Fe*xr)),i===0)return;let l=D.scrollLeft;D.scrollLeft+=i,D.scrollLeft!==l&&(q(),$.current=requestAnimationFrame(w))};$.current=requestAnimationFrame(w)},[q]),S=Be(w=>{let p=T.current;if(p&&(T.current=null,window.clearTimeout(p.timer),cancelAnimationFrame($.current),B.current?.(),B.current=null,P.current&&(P.current.style.display="none"),p.th.removeAttribute("data-vdt-col-dragging"),s.current?.removeAttribute("data-vdt-col-reordering"),!!p.dragging&&(document.body.style.userSelect="",w))){let D=m=>{m.stopPropagation(),m.preventDefault(),window.removeEventListener("click",D,!0)};window.addEventListener("click",D,!0),window.setTimeout(()=>window.removeEventListener("click",D,!0),Ao);let c=p.before??null;if(c===p.key)return;let i=(v.current??[]).map(m=>String(m.id)),l=i.indexOf(p.key);if(l<0)return;let d=i.slice();if(d.splice(l,1),c!==null){let m=d.indexOf(c);if(m<0)return;d.splice(m,0,p.key)}else{let m=p.afterLast?d.indexOf(p.afterLast):-1;if(m<0)return;d.splice(m+1,0,p.key)}let x=on(v.current??[],d).map(m=>String(m.id));if(x.join("\0")===i.join("\0"))return;z.current(x)}},[s,v]);Do(()=>(r||S(!1),()=>S(!1)),[r,S]);let _=Be((w,p)=>{if(T.current&&S(!1),p.pointerType==="mouse"&&p.button!==0||p.defaultPrevented||p.target?.closest?.("[data-vdt-resize], input, textarea, select, [contenteditable='true']"))return;let c=p.currentTarget,i={key:String(w.id),group:w.group??"",th:c,pointerId:p.pointerId,startX:p.clientX,startY:p.clientY,x:p.clientX,dragging:!1,cancelled:!1,before:null,afterLast:null,timer:0};T.current=i;let l=O=>{if(!(O.pointerId!==i.pointerId||T.current!==i)){if(!i.dragging){Math.hypot(O.clientX-i.startX,O.clientY-i.startY)>ko&&S(!1);return}i.cancelled||(i.x=O.clientX,q(),X())}},d=O=>{O.pointerId!==i.pointerId||T.current!==i||(i.cancelled&&(i.before=i.key),S(O.type==="pointerup"))},x=O=>{if(!(O.key!=="Escape"||T.current!==i)){if(!i.dragging){S(!1);return}O.preventDefault(),i.cancelled=!0,P.current&&(P.current.style.display="none"),i.th.removeAttribute("data-vdt-col-dragging"),s.current?.removeAttribute("data-vdt-col-reordering"),cancelAnimationFrame($.current)}},m=O=>{T.current===i&&(i.dragging||p.pointerType!=="mouse")&&(O.preventDefault(),O.stopPropagation())},M=O=>{T.current===i&&i.dragging&&O.preventDefault()},K=O=>{T.current===i&&i.dragging&&O.preventDefault()};window.addEventListener("pointermove",l),window.addEventListener("pointerup",d),window.addEventListener("pointercancel",d),window.addEventListener("keydown",x,!0),window.addEventListener("contextmenu",m,!0),window.addEventListener("touchmove",M,{passive:!1}),document.addEventListener("selectstart",K),B.current=()=>{window.removeEventListener("pointermove",l),window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",d),window.removeEventListener("keydown",x,!0),window.removeEventListener("contextmenu",m,!0),window.removeEventListener("touchmove",M),document.removeEventListener("selectstart",K)},i.timer=window.setTimeout(()=>{if(T.current===i){i.dragging=!0,c.setAttribute("data-vdt-col-dragging",""),s.current?.setAttribute("data-vdt-col-reordering",""),document.body.style.userSelect="none";try{window.getSelection()?.removeAllRanges()}catch{}q()}},E.current)},[S,q,X,s]),J=Be(w=>{if(!r||!vr(w))return{};let p=w.headerProps?.onPointerDown;return{"data-vdt-colkey":String(w.id),"data-vdt-colgroup":w.group??"",onPointerDown:D=>{p?.(D),_(w,D)}}},[r,_]);return{on:r,headerCellProps:J,indicator:r?Po("div",{ref:P,"data-vdt-col-drop-indicator":"","aria-hidden":!0,style:{position:"absolute",top:0,bottom:0,width:2,display:"none",zIndex:5,pointerEvents:"none"}}):null}}import{jsx as an}from"react/jsx-runtime";import{useRef as Mr,useState as Oo,useEffect as No}from"react";import{Box as zo,CircularProgress as Bo}from"@mui/material";var at=function(){return at=Object.assign||function(a){for(var s,v=1,y=arguments.length;v<y;v++){s=arguments[v];for(var b in s)Object.prototype.hasOwnProperty.call(s,b)&&(a[b]=s[b])}return a},at.apply(this,arguments)};function ln(r){var a=r.visible,s=r.onComplete,v=r.fadeoutDuration,y=v===void 0?200:v,b=r.exitDelay,E=b===void 0?0:b,z=r.size,T=z===void 0?40:z,P=r.className,$=r.style,B=r.sx,Z=r.indicator,q=r.background,X=q===void 0?{show:!0,color:"255, 255, 255",opacity:.9}:q,S=Mr(void 0),_=Mr(null),J=Oo(a),ue=J[0],w=J[1],p=X.show,D=p===void 0?!0:p,c=X.color,i=c===void 0?"255, 255, 255":c,l=X.opacity,d=l===void 0?.9:l;if(No(function(){var M=S.current;if(M===!0&&a===!1&&_.current){var K=_.current;K.style.opacity="0",setTimeout(function(){w(!1),s?.()},y+E)}else a===!0&&(w(!0),_.current&&(_.current.style.opacity="1"));S.current=a},[a,s,y,E]),!ue)return null;var x=function(){return typeof Z=="string"?an("img",{src:Z,alt:"Loading",style:{width:T,height:T}}):Z||an(Bo,{size:T})},m=function(){return D?i.startsWith("rgba")?{backgroundColor:i}:/^\d+,\s*\d+,\s*\d+$/.test(i)?{backgroundColor:"rgba(".concat(i,", ").concat(d,")")}:d!==1?{backgroundColor:i,"&::before":{content:'""',position:"absolute",top:0,left:0,right:0,bottom:0,backgroundColor:i,opacity:d,zIndex:-1}}:{backgroundColor:i}:{backgroundColor:"transparent"}};return an(zo,{ref:_,className:P,style:at({},$),sx:at(at({position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e3,opacity:a?1:0,transition:"opacity ".concat(y,"ms ease-out")},m()),B),children:x()})}import{Fragment as Fo,jsx as wr,jsxs as Vo}from"react/jsx-runtime";var _o=`
|
|
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 sn({size:r=54}){return Vo(Fo,{children:[wr("style",{children:_o}),wr("span",{className:"vdt-css-spinner",role:"progressbar","aria-label":"loading",style:{display:"inline-block",width:r,height:r}})]})}import Dt,{useMemo as Wo,useState as $o}from"react";import{Box as it,Divider as Xo,InputBase as Ko,Menu as qo,MenuItem as Uo,SvgIcon as jo}from"@mui/material";import{jsx as I,jsxs as kt}from"react/jsx-runtime";var cn=14,dn=18,un=34,ye={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 Ve({d:r,size:a=dn,color:s}){return I(jo,{sx:{fontSize:a,flexShrink:0,color:s},children:I("path",{d:r})})}function pn({size:r=14,active:a,color:s}){let v={stroke:"currentColor",strokeWidth:1.8,strokeMiterlimit:10,strokeLinecap:"round",strokeLinejoin:"round"};return kt(it,{component:"svg",viewBox:"0 0 24 24",fill:"none","aria-hidden":!0,sx:{width:r,height:r,flexShrink:0,color:a?"primary.main":s??"currentColor",verticalAlign:"middle"},children:[I("path",{d:"M2 17.5H7",...v}),I("path",{d:"M22 6.5H17",...v}),I("path",{d:"M13 17.5H22",...v}),I("path",{d:"M11 6.5H2",...v}),I("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",...v}),I("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",...v})]})}var Tr={gap:1,fontSize:cn,lineHeight:"20px",minHeight:un,py:"7px",px:1.5};function we({icon:r,iconSpace:a,selected:s,disabled:v,muted:y,onClick:b,sx:E,children:z}){return kt(Uo,{selected:s,disabled:v,onClick:b,sx:[Tr,y?{color:"text.secondary"}:{},...Array.isArray(E)?E:E?[E]:[]],children:[r??(a?I(it,{component:"span",sx:{width:dn,flexShrink:0}}):null),z]})}function Ht(){return I(Xo,{sx:{my:"4px !important"}})}function Yo(r,a){let s=r.getBoundingClientRect();return{left:a??s.left,top:s.bottom}}function fn({open:r,anchorPosition:a,anchorEl:s,onClose:v,sort:y,filter:b,header:E,children:z,minWidth:T=180,maxHeight:P=420}){let{t:$}=Et(),[B,Z]=$o(""),q=b?.multiple!==!1,X=b?.value??[],S=Wo(()=>{if(!b)return[];let c=b.options;return b.emptyLabel&&!c.some(i=>i.value==="")?[...c,{value:"",label:b.emptyLabel}]:c},[b]),_=!!b&&(b?.searchable??S.length>10),J=B.trim().toLowerCase(),ue=J?S.filter(c=>c.label.toLowerCase().includes(J)):S,w=()=>{Z(""),v()},u=[];if(E&&u.push(...Dt.Children.toArray(E).map((c,i)=>Dt.isValidElement(c)?Dt.cloneElement(c,{key:`h${i}`}):c)),y){let c=i=>{w(),y.onChange(y.active===i&&y.clearable!==!1?null:i)};u.push(I(we,{selected:y.active==="asc",onClick:()=>c("asc"),icon:I(Ve,{d:ye.asc,color:"text.secondary"}),children:$("sortAscending")},"sort-asc"),I(we,{selected:y.active==="desc",onClick:()=>c("desc"),icon:I(Ve,{d:ye.desc,color:"text.secondary"}),children:$("sortDescending")},"sort-desc")),y.active&&y.clearable!==!1&&u.push(I(we,{muted:!0,iconSpace:!0,onClick:()=>{w(),y.onChange(null)},children:$("clearSort")},"sort-clear"))}return y&&b&&u.push(I(Ht,{},"div-sort")),b&&(_&&u.push(kt(it,{onKeyDown:c=>c.stopPropagation(),sx:{display:"flex",alignItems:"center",gap:1,px:1.5,pb:.5,minHeight:un},children:[I(Ve,{d:ye.search,color:"text.secondary"}),I(Ko,{autoFocus:!0,value:B,onChange:c=>Z(c.target.value),placeholder:b.searchPlaceholder??$("search"),sx:{flex:1,fontSize:cn}})]},"search")),!q&&b.allLabel&&u.push(I(we,{selected:X.length===0,onClick:()=>{w(),b.onChange([])},icon:I(Ve,{d:X.length===0?ye.radioOn:ye.radioOff,color:X.length===0?"primary.main":"text.disabled"}),children:b.allLabel},"f-all")),S.length===0&&u.push(I(we,{disabled:!0,iconSpace:!0,children:b.emptyText??$("noOptions")},"f-none")),ue.forEach(c=>{let i=X.includes(c.value),l=()=>{if(q){b.onChange(i?X.filter(x=>x!==c.value):[...X,c.value]);return}w(),b.onChange(i?[]:[c.value])},d=q?i?ye.checked:ye.unchecked:i?ye.radioOn:ye.radioOff;u.push(kt(we,{selected:!q&&i,onClick:l,icon:I(Ve,{d,color:i?"primary.main":"text.disabled"}),children:[c.icon,I(it,{component:"span",sx:{flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:c.render??c.label}),typeof c.count=="number"?I(it,{component:"span",sx:{color:"text.secondary",ml:1,fontVariantNumeric:"tabular-nums"},children:c.count}):null]},`f:${c.value||"(empty)"}`))}),_&&J&&ue.length===0&&u.push(I(we,{disabled:!0,iconSpace:!0,children:$("noMatches")},"f-nohit")),X.length>0&&u.push(I(Ht,{},"div-filter"),I(we,{muted:!0,iconSpace:!0,onClick:()=>{w(),b.onChange([])},children:b.clearLabel??$("clearFilter")},"f-clear"))),z&&(u.length>0&&u.push(I(Ht,{},"div-children")),u.push(...Dt.Children.toArray(z))),I(qo,{open:r&&(!!a||!!s),...!a&&!!s?{anchorEl:s}:{anchorReference:"anchorPosition",anchorPosition:a??void 0},onClose:w,transitionDuration:0,disableAutoFocusItem:_,onContextMenu:c=>c.preventDefault(),onClick:c=>c.stopPropagation(),slotProps:{paper:{sx:{maxHeight:P,minWidth:T}},list:{sx:{py:.5}}},children:u})}import la from"@ehfuse/overlay-scrollbar";import{Fragment as st,jsx as f,jsxs as Y}from"react/jsx-runtime";var sa={alignment:"default",margin:0,radius:0},mn=5,Rr={},ca=3;function Er(r){return typeof r=="number"?`${r}px`:r}function Lr(r){let a=window.getComputedStyle(r),s=a.boxSizing==="border-box"?0:(parseFloat(a.paddingLeft)||0)+(parseFloat(a.paddingRight)||0)+(parseFloat(a.borderLeftWidth)||0)+(parseFloat(a.borderRightWidth)||0);return r.getBoundingClientRect().width-s}function Dr(r,a){let s=[];for(let v=0;v<r.style.length;v+=1){let y=r.style[v];y.startsWith("--vdt-")&&!(y in a)&&s.push(y)}s.forEach(v=>r.style.removeProperty(v)),Object.entries(a).forEach(([v,y])=>r.style.setProperty(v,y))}var hn="#d9d8d5",bn="#3b434e",da={bg:"#ffffff",border:hn,borderStrong:hn,headerColor:"#787774",hoverBg:"#f8f8f7",emptyColor:"#9b9a97",selectedBg:"#dbeafe",selectedBar:"#3b82f6"},Hr="12px",ua={bg:"#1e1e1e",border:bn,borderStrong:bn,headerColor:"#a3adbb",hoverBg:"#272d36",emptyColor:"#7d8590",selectedBg:"rgba(59, 130, 246, 0.22)",selectedBar:"#60a5fa"},kr=ct((r,a)=>f("div",{...r,ref:a}));kr.displayName="VdtPlainScroller";var pa="(max-width:599.95px)";function We(r){return!!(r.filterOptions&&r.onFilterChange)}function $e(r){return r==="right"?{box:{paddingLeft:"20px"},label:{left:0,marginLeft:0}}:r==="center"?{box:{},label:{left:"100%",marginLeft:"4px"}}:{box:{paddingRight:"20px"},label:{left:"auto",right:0,marginLeft:0}}}function fa({data:r,loading:a=!1,columns:s,onRowClick:v,getRowId:y,selectedRowId:b,selectedRowSx:E,rowHeight:z,columnHeight:T,striped:P,rowDivider:$=!0,onSort:B,onSortClear:Z,onHeaderContextMenu:q,onLoadMore:X,sortBy:S,sortDirection:_,showPaper:J=!0,paddingX:ue,paddingTop:w=0,paddingBottom:u=0,rowHoverColor:D,rowHoverOpacity:c,viewportBuffer:i,overscan:l,initialItemCount:d,scrollbars:x,emptyMessage:m="NO DATA",autoHeight:M=!1,LoadingComponent:K,showFooter:O,footerHeight:ae,footerSx:Te,variant:Ae="default",borderColor:Ie,framed:pe=!0,headerTopBorder:At=!1,scrollbarGutter:Se=!1,rowHeightMode:It="fixed",tableLayout:dt="fixed",renderFullWidthRow:Pt,fullWidthRowSx:Xe,onRowContextMenu:xn,pinnedRows:Ke,pinnedRowsMaxHeight:Ot,pinnedRowsSx:qe,resetScrollOnDataChange:vn=!0,rowKeyFromId:Ar=!1,onEndReached:Cn,colorMode:Ir,mobile:Mn,scrollParent:ut,columnResize:wn,columnWidths:Tn,onColumnWidthsChange:Sn,rowReorder:Pr,columnReorder:Rn,columnOrder:En,onColumnOrderChange:Ln}){let H=Ae==="notion",xe=oa(),Dn=(Ir??xe.palette.mode)==="dark"?ua:da,k=Ie?{...Dn,border:Ie,borderStrong:Ie}:Dn,Hn=(Ke?.length??0)>0,ve=T??(H?40:56),ie=z??(H?48:50),pt=pe?ue??(H?"12px":"1rem"):0,Ue=Mn===!0?{}:Mn||null,Or=aa(Ue?.query??pa,{noSsr:!0}),re=!!Ue&&Or,kn=A(null),An=A(()=>null),In=A(r.length);In.current=r.length;let Ce=yr({config:Pr,tableBoxRef:kn,getScroller:()=>An.current(),dataLengthRef:In,anyPinned:s.some(e=>e.pinned==="left")}),Pn=Rn===!0?{}:Rn||null,On=!!Pn&&!re,[Nr,Nn]=ke(null);de(()=>{Nn(null)},[En]);let zn=On?Nr??En??null:null,je=ce(()=>on(s,zn),[s,zn]),Bn=A(je);Bn.current=je;let _n=A(Ln);_n.current=Ln;let Fn=A(null),Pe=Cr({on:On,config:Pn,tableBoxRef:Fn,columnsRef:Bn,onCommit:j(e=>{Nn(e),_n.current?.(e)},[])}),R=ce(()=>Ce.handleColumn?[Ce.handleColumn,...je]:je,[Ce.handleColumn,je]),Oe=!!ut,Ee=M||Oe,Nt=It==="auto"||re,Vn=typeof Se=="number"?Se:Se?(Number(x?.thumb?.width)||8)+8:0,zr=Vn>0?{"& thead tr th:last-of-type, & tbody tr td:last-of-type:not([data-vdt-pad])":{paddingRight:`${(H?14:16)+Vn}px !important`}}:{},zt=D??(H?k.hoverBg:void 0),Wn=c??(H?1:void 0),Br=Math.max(ie*12,480),_r=Math.max(ie*12,480),Fr=typeof i=="number"?i:i?.top??Br,Vr=typeof i=="number"?i:i?.bottom??_r,Wr=Math.max(ie*8,420),$r=Math.max(ie*10,520),Xr=typeof l=="number"?l:{main:l?.main??Wr,reverse:l?.reverse??$r},Ye=ie+($?1:0),Kr=ce(()=>H?{backgroundColor:k.selectedBg,"& > td:first-of-type":{boxShadow:`inset 3px 0 0 ${k.selectedBar}`},"& > td[data-vdt-pinned]":{backgroundColor:k.selectedBg}}:void 0,[H,k]),fe=E??Kr,ft=!fe||typeof fe!="function",qr=ce(()=>!ft||b===null||b===void 0||!fe?null:{[`& tbody tr[data-row-id="${String(b).replace(/["\\]/g,"\\$&")}"]`]:fe},[ft,b,fe]),ha=typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"),[U]=ke(()=>typeof window>"u"?!1:window.localStorage.getItem("vdt-perf-debug")==="1"),W=A({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}),Bt=j(e=>{if(!U)return;let t=W.current;if(!(t.wheelEvents>0||t.rangeChangedCalls>0||t.rowContentCalls>0||t.cellRenderCalls>0))return;let g=t.rowContentCalls>0?t.rowContentMs/t.rowContentCalls:0,h=t.cellRenderCalls>0?t.cellRenderMs/t.cellRenderCalls:0;console.log("[VDT perf]",{reason:e,wheel:{events:t.wheelEvents,inputPx:Math.round(t.wheelInputPx),handlerMs:Number(t.wheelHandlerMs.toFixed(2)),rafFlushes:t.wheelRafFlushes,rafMs:Number(t.wheelRafMs.toFixed(2))},rangeChanged:{calls:t.rangeChangedCalls,totalMs:Number(t.rangeChangedMs.toFixed(2))},rowContent:{calls:t.rowContentCalls,totalMs:Number(t.rowContentMs.toFixed(2)),avgMs:Number(g.toFixed(3)),maxMs:Number(t.rowContentMaxMs.toFixed(3))},cellRender:{calls:t.cellRenderCalls,totalMs:Number(t.cellRenderMs.toFixed(2)),avgMs:Number(h.toFixed(3)),maxMs:Number(t.cellRenderMaxMs.toFixed(3))}}),W.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}},[U]);de(()=>{if(!U||typeof window>"u")return;console.log("[VDT perf] enabled (localStorage vdt-perf-debug=1)");let e=window.setInterval(()=>{Bt("interval")},1500);return()=>{window.clearInterval(e),Bt("cleanup")}},[Bt,U]);let $n=ce(()=>ct((e,t)=>{let o=A(null),g=A(0),h=A(null);return de(()=>{let n=o.current;if(!n)return;let p=N=>{let C=U?performance.now():0;if(N.shiftKey||Math.abs(N.deltaX)>Math.abs(N.deltaY))return;let F=N.target?.closest?.("[data-vdt-inner-scroll]");if(F&&n.contains(F)&&(N.deltaY<0?F.scrollTop>0:F.scrollTop+F.clientHeight<F.scrollHeight-1))return;N.preventDefault();let Q=N.deltaY;N.deltaMode===1?Q*=40:N.deltaMode===2&&(Q*=n.clientHeight),U&&(W.current.wheelEvents+=1,W.current.wheelInputPx+=Q),g.current+=Q,h.current===null&&(h.current=requestAnimationFrame(()=>{let me=U?performance.now():0,L=Math.max(n.clientHeight*.4,160),G=Math.max(-L,Math.min(L,g.current));g.current=0,h.current=null,G!==0&&(n.scrollTop+=G),U&&(W.current.wheelRafFlushes+=1,W.current.wheelRafMs+=performance.now()-me)}),U&&(W.current.wheelHandlerMs+=performance.now()-C))};return n.addEventListener("wheel",p,{passive:!1}),()=>{n.removeEventListener("wheel",p),h.current!==null&&(cancelAnimationFrame(h.current),h.current=null),g.current=0}},[]),f(la,{detectInnerScroll:!0,track:sa,...x,children:f(Jo,{component:V,...e,ref:n=>{o.current=n,typeof t=="function"?t(n):t&&(t.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:H?0:pt,paddingTop:typeof w=="number"?`${w}px`:w,paddingBottom:typeof u=="number"?`${u}px`:u}}})})}),[]),_t=ce(()=>{if(P===!0)return"#f5f5f5";if(typeof P=="string")return P},[P]),[Ur,Xn]=ke(a),[jr,Yr]=ke(0);de(()=>{a&&Xn(!0)},[a]);let gt=j(()=>{Xn(!1)},[]),Gr=Ur,ba=a&&r.length>0,Ft=A(!1),Vt=A(-1),Wt=A(null),mt=A(null),[Zr,Qr]=ke(!1),ht=j(()=>{let e=mt.current;e&&Qr(e.scrollHeight>e.clientHeight+1)},[]);de(()=>{let e=mt.current;if(!e||typeof ResizeObserver>"u")return;let t=new ResizeObserver(()=>ht());return t.observe(e),()=>t.disconnect()},[ht,M]);let $t=A(v);$t.current=v;let Ge=A(y);Ge.current=y;let Xt=A(xn);Xt.current=xn;let Kn=A(Cn);Kn.current=Cn;let qn=A(null),Un=wn===!0?{}:wn||null,oe=!!Un&&!re,Ze=Un?.minWidth??48,[Jr,Kt]=ke(null);de(()=>{Kt(null)},[Tn]);let bt=oe?Jr??Tn??Rr:Rr,qt=A(bt);qt.current=bt;let Ut=A(Sn);Ut.current=Sn;let jt=A(R);jt.current=R;let Yt=A(null);An.current=()=>Oe?ut:M?null:mt.current;let yt=j(e=>{let t={},o=!1,g=!0,h=0,n=0;return R.forEach((p,N)=>{let C=e[String(p.id)];if(typeof C=="number"&&Number.isFinite(C)&&C>0){let F=Math.max(p.minWidth??Ze,Math.round(C));t[`--vdt-cw-${N}`]=`${F}px`,o=!0,h+=F,n+=F}else typeof p.width=="number"?(h+=p.width,n+=p.width):(g=!1,h+=p.minWidth??Ze)}),o&&(t["--vdt-tmin"]=`${h}px`,g&&(t["--vdt-tw"]=`${n}px`)),t},[R,Ze]),Gt=A(yt);Gt.current=yt;let eo=ce(()=>oe?yt(bt):null,[oe,yt,bt]),ge=j((e,t,o)=>{if(!oe)return{width:e.width,minWidth:o};let g=`--vdt-cw-${t}`,h=Er(e.width),n=Er(o);return{width:h!==void 0?`var(${g}, ${h})`:`var(${g})`,minWidth:n!==void 0?`var(${g}, ${n})`:`var(${g})`}},[oe]),xt=ce(()=>{let e=new Map,t=0,o=[];return R.forEach((g,h)=>{if(g.pinned!=="left")return;e.set(String(g.id),oe&&o.length>0?`calc(${o.join(" + ")})`:t);let n=typeof g.width=="number"?g.width:0;t+=n,o.push(`var(--vdt-cw-${h}, ${n}px)`)}),e},[R,oe]),vt=ce(()=>{if(R.some(e=>typeof e.minWidth=="number"))return R.reduce((e,t)=>e+(typeof t.width=="number"?t.width:typeof t.minWidth=="number"?t.minWidth:0),0)},[R]),Ne=j((e,t)=>{let o=xt.get(String(e.id));return o===void 0?{}:{position:"sticky",left:o,zIndex:t?3:1}},[xt]),Ct=!!v,Qe=A(!1),Le=A({x:0,y:0});de(()=>{let e=t=>{let o=t.clientX-Le.current.x,g=t.clientY-Le.current.y;Math.sqrt(o*o+g*g)>mn&&(Qe.current=!0)};return document.addEventListener("mousemove",e),()=>{document.removeEventListener("mousemove",e)}},[]),de(()=>{let e=document.querySelector('[data-testid="virtuoso-scroller"]');e&&e.querySelectorAll(".MuiTableSortLabel-root").forEach(o=>{let g=new MouseEvent("mouseleave",{bubbles:!0,cancelable:!0});o.dispatchEvent(g)})},[S]);let Mt=j(e=>{if(!B)return;B(e,S===e&&_==="asc"?"desc":"asc")},[B,S,_]),[Je,jn]=ke(null),Yn=A(q);Yn.current=q;let Gn=A(B);Gn.current=B;let et=j((e,t)=>{if(!e){t.preventDefault();return}e.headerProps?.onContextMenu?.(t);let o=t.defaultPrevented;if(o||(o=Yn.current?.(e,t)===!0||t.defaultPrevented),t.preventDefault(),o||e.headerMenu===!1||!!!((e.sortMenu??e.sortable)&&Gn.current)&&!We(e))return;let h=t.currentTarget.getBoundingClientRect();jn({colId:String(e.id),x:t.clientX,y:h.bottom})},[]),Zn=j((e,t)=>{if(t.button!==0)return;t.preventDefault(),t.stopPropagation();let o=t.currentTarget,g=o.closest("th"),h=Yt.current;if(!g||!h)return;let n=Lr(g),p=t.clientX,N=String(e.id),C=e.minWidth??Ze,F=qt.current,Q=jt.current;if(!Q.some(ne=>!(String(ne.id)in F)&&typeof ne.width!="number")){let ne={...F};h.querySelectorAll("thead th [data-vdt-col]").forEach(be=>{let nt=Q[Number(be.getAttribute("data-vdt-col"))],sr=be.closest("th");!nt||!sr||String(nt.id)in ne||(ne[String(nt.id)]=Math.round(Lr(sr)))}),F=ne}let L=F,G=!1,ee=0;o.setAttribute("data-active","");let te=document.body.style.cursor;document.body.style.cursor="col-resize";let Me=ne=>{let be=ne.clientX-p;!G&&Math.abs(be)<ca||(G=!0,L={...F,[N]:Math.max(C,Math.round(n+be))},ee||(ee=requestAnimationFrame(()=>{ee=0,Dr(h,Gt.current(L))})))},he=()=>{if(document.removeEventListener("mousemove",Me),document.removeEventListener("mouseup",he),ee&&cancelAnimationFrame(ee),o.removeAttribute("data-active"),document.body.style.cursor=te,!G)return;Dr(h,Gt.current(L));let ne=be=>{be.stopPropagation(),be.preventDefault()};window.addEventListener("click",ne,!0),window.setTimeout(()=>window.removeEventListener("click",ne,!0),0),Kt(L),Ut.current?.(L)};document.addEventListener("mousemove",Me),document.addEventListener("mouseup",he)},[Ze]),Qn=j((e,t)=>{t.preventDefault(),t.stopPropagation();let o=String(e.id),g=qt.current;if(!(o in g))return;let h={...g};delete h[o];let n=jt.current,p=Yt.current?.querySelector("table"),N=p?.parentElement;if(p&&N&&n.every(C=>typeof C.width=="number")){let C=n.reduce((L,G)=>L+G.width,0),F=N.clientWidth,Q=C>0?Math.max(1,F/C):1,me=L=>Math.round(L.width*Q);Q>1&&(h[o]=me(e)),n.every(L=>!(String(L.id)in h)||Math.abs(h[String(L.id)]-me(L))<=1)&&(h={})}Kt(h),Ut.current?.(h)},[]),wt=j(e=>oe&&e.id!==ot?f("span",{"data-vdt-resize":"","data-vdt-col":R.indexOf(e),"aria-hidden":!0,onMouseDown:t=>Zn(e,t),onDoubleClick:t=>Qn(e,t),onClick:t=>t.stopPropagation()}):null,[oe,Zn,Qn,R]),De=j(e=>{if(!We(e))return e.text;let t=!!(e.filterValues&&e.filterValues.length>0);return Y(V,{component:"span",sx:{display:"inline-flex",alignItems:"center",gap:.5,maxWidth:"100%",color:t?"primary.main":void 0,fontWeight:t?600:void 0,verticalAlign:"middle"},children:[f(V,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.text}),f(pn,{active:t})]})},[]),to=j(e=>{let t=U?performance.now():0;if(Kn.current?.(),!X){U&&(W.current.rangeChangedCalls+=1,W.current.rangeChangedMs+=performance.now()-t);return}if(a&&r.length===0){U&&(W.current.rangeChangedCalls+=1,W.current.rangeChangedMs+=performance.now()-t);return}let o=r.length>=30,g=e>=r.length-1,h=Vt.current===r.length;if(g&&o&&!Ft.current&&!h){Ft.current=!0,Vt.current=r.length;let n=r.length;X(n,50)}U&&(W.current.rangeChangedCalls+=1,W.current.rangeChangedMs+=performance.now()-t)},[r.length,a,X,U]);de(()=>{a||(Ft.current=!1)},[a]),de(()=>{r.length===0&&Yr(e=>e+1)},[r.length]);let Jn=A(vn);Jn.current=vn;let Zt=A(r.length),Qt=A(void 0);de(()=>{let e=Zt.current,t=r.length,o=t>0?Ge.current?Ge.current(r[0],0):r[0]:void 0,g=Qt.current;if(t>e&&e>0){Zt.current=t,Qt.current=o;return}let h=t<e||e>0&&o!==g;h&&(Vt.current=-1),Wt.current&&t>0&&h&&Jn.current&&Wt.current.scrollToIndex({index:0,align:"start",behavior:"auto"}),Zt.current=t,Qt.current=o},[r]);let er=j(()=>{let e={},t=[];if(R.forEach(n=>{n.group?(e[n.group]||(e[n.group]=[]),e[n.group].push(n)):t.push(n)}),!(Object.keys(e).length>0))return f(lt,{children:R.map((n,p)=>Y(Re,{align:n.align||"left",title:typeof n.text=="string"?n.text:void 0,...n.headerProps,onContextMenu:N=>et(n,N),...Pe.headerCellProps(n),style:{...ge(n,p,n.width??n.minWidth),...n.style,fontWeight:"bold",position:"sticky",top:0,zIndex:2,padding:"16px",...Ne(n,!0),...n.headerProps?.style},children:[n.sortable?f("div",{style:{display:"flex",alignItems:"center",justifyContent:n.align==="center"?"center":n.align==="right"?"flex-end":"flex-start",position:"relative",width:"100%"},children:Y(V,{className:"vdt-sort-box","data-align":n.align||"left","data-filter":We(n)?"1":void 0,sx:{position:"relative",...$e(n.align).box,cursor:"default","&:hover .MuiTableSortLabel-root":{opacity:"1 !important","& .MuiSvgIcon-root":{color:"#000",opacity:"1 !important"}}},onClick:()=>Mt(String(n.id)),children:[De(n),f(gn,{active:S===n.id,direction:S===n.id?_:"desc",sx:{position:"absolute",top:"50%",transform:"translateY(-50%)",...$e(n.align).label,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)"}}})]})}):De(n),wt(n)]},String(n.id)))});let g=[...t.map(n=>Y(Re,{rowSpan:2,align:n.align||"left",title:typeof n.text=="string"?n.text:void 0,...n.headerProps,onContextMenu:p=>et(n,p),...Pe.headerCellProps(n),style:{...ge(n,R.indexOf(n),n.width),...n.style,fontWeight:"bold",position:"sticky",top:0,zIndex:2,padding:"16px",...Ne(n,!0),...n.headerProps?.style},children:[n.sortable&&B?f("div",{style:{display:"flex",alignItems:"center",justifyContent:n.align==="center"?"center":n.align==="right"?"flex-end":"flex-start",position:"relative",width:"100%"},children:Y(V,{className:"vdt-sort-box","data-align":n.align||"left","data-filter":We(n)?"1":void 0,sx:{position:"relative",...$e(n.align).box,cursor:"default","&:hover .MuiTableSortLabel-root":{opacity:"1 !important","& .MuiSvgIcon-root":{color:"#000",opacity:"1 !important"}}},onClick:()=>Mt(String(n.id)),children:[De(n),f(gn,{active:S===n.id,direction:S===n.id?_:"desc",sx:{position:"absolute",top:"50%",transform:"translateY(-50%)",...$e(n.align).label,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)"}}})]})}):De(n),wt(n)]},String(n.id))),...Object.entries(e).map(([n,p])=>f(Re,{align:"center",colSpan:p.length,onContextMenu:N=>et(null,N),style:{fontWeight:"bold",position:"sticky",top:0,zIndex:2,padding:"16px"},children:n},n))],h=[...Object.values(e).flat().map(n=>Y(Re,{align:n.align||"left",title:typeof n.text=="string"?n.text:void 0,...n.headerProps,onContextMenu:p=>et(n,p),...Pe.headerCellProps(n),style:{...ge(n,R.indexOf(n),n.width),...n.style,fontWeight:"bold",position:"sticky",top:0,zIndex:2,padding:"16px",...Ne(n,!0),...n.headerProps?.style},children:[n.sortable&&B?f("div",{style:{display:"flex",alignItems:"center",justifyContent:n.align==="center"?"center":n.align==="right"?"flex-end":"flex-start",position:"relative",width:"100%"},children:Y(V,{className:"vdt-sort-box","data-align":n.align||"left","data-filter":We(n)?"1":void 0,sx:{position:"relative",...$e(n.align).box,cursor:"default","&:hover .MuiTableSortLabel-root":{opacity:"1 !important","& .MuiSvgIcon-root":{color:"#000",opacity:"1 !important"}}},onClick:()=>Mt(String(n.id)),children:[De(n),f(gn,{active:S===n.id,direction:S===n.id?_:"desc",sx:{position:"absolute",top:"50%",transform:"translateY(-50%)",...$e(n.align).label,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)"}}})]})}):De(n),wt(n)]},String(n.id)))];return Y(st,{children:[f(lt,{children:g}),f(lt,{children:h})]})},[R,S,_,Mt,B,ve,Ne,et,De,ge,wt,Pe.headerCellProps]),tr=ce(()=>{let e=R.filter(o=>o.mobile!==!1),t=e.find(o=>o.mobile==="title")??e.find(o=>!o.mobile);return{title:t,thumb:e.filter(o=>o.mobile==="thumb"),badge:e.filter(o=>o.mobile==="badge"),sub:e.filter(o=>o.mobile==="sub"),meta:e.filter(o=>o!==t&&(!o.mobile||o.mobile==="meta"))}},[R]),nr=j((e,t)=>{if(Ue?.renderRow)return Ue.renderRow(e,t);let o=C=>C.render?C.render(e,t):String(e[C.id]??""),{title:g,thumb:h,badge:n,sub:p,meta:N}=tr;return Y(V,{sx:{display:"flex",gap:"12px",alignItems:"flex-start",py:"12px",px:"14px",minWidth:0},children:[h.map(C=>f(V,{sx:{flexShrink:0},children:o(C)},String(C.id))),Y(V,{sx:{flex:1,minWidth:0,display:"flex",flexDirection:"column",gap:"4px"},children:[(g||n.length>0)&&Y(V,{sx:{display:"flex",alignItems:"flex-start",gap:"8px",minWidth:0},children:[f(V,{sx:{flex:1,minWidth:0,fontSize:15,fontWeight:500,overflowWrap:"anywhere"},children:g?o(g):null}),n.map(C=>f(V,{sx:{flexShrink:0},children:o(C)},String(C.id)))]}),p.map(C=>f(V,{sx:{fontSize:13,color:k.headerColor,minWidth:0},children:o(C)},String(C.id))),N.length>0&&f(V,{sx:{display:"flex",flexWrap:"wrap",gap:"2px 12px",fontSize:13,minWidth:0},children:N.map(C=>{let F=C.mobileLabel===!1?null:C.mobileLabel??(typeof C.text=="string"?C.text:null);return Y(V,{sx:{display:"inline-flex",alignItems:"center",gap:"4px",minWidth:0,maxWidth:"100%"},children:[F?f(V,{component:"span",sx:{color:k.headerColor,flexShrink:0},children:F}):null,f(V,{component:"span",sx:{minWidth:0,"& > *":{width:"auto !important",textAlign:"left !important"}},children:o(C)})]},String(C.id))})})]})]})},[Ue,tr,k]),Tt=j((e,t)=>{let o=U?performance.now():0;if(!t){if(U){W.current.rowContentCalls+=1;let p=performance.now()-o;W.current.rowContentMs+=p,W.current.rowContentMaxMs=Math.max(W.current.rowContentMaxMs,p)}return null}if(re){let p=nr(t,e);return f(Re,{colSpan:R.length,"data-vdt-pad":"",sx:{padding:0},children:Ce.on?Y(V,{sx:{display:"flex",alignItems:"stretch",minWidth:0},children:[f(V,{sx:{display:"flex",alignItems:"center",pl:"6px",flexShrink:0},children:Ce.renderHandle(t,e)}),f(V,{sx:{flex:1,minWidth:0},children:p})]}):p})}let g=Pt?Pt(t,e):null;if(g!=null)return f(Re,{colSpan:R.length,"data-vdt-pad":"",sx:[{padding:H?"0 14px":"8px 16px"},...Array.isArray(Xe)?Xe:Xe?[Xe]:[]],children:g});let h=0,n=R.map((p,N)=>{if(h>0)return h-=1,null;let C=p.colSpan?Math.max(1,Math.min(p.colSpan(t,e),R.length-N)):1;h=C-1;let F=U?performance.now():0,Q=p.render?p.render(t,e):String(t[p.id]||"");if(U){let te=performance.now()-F;W.current.cellRenderCalls+=1,W.current.cellRenderMs+=te,W.current.cellRenderMaxMs=Math.max(W.current.cellRenderMaxMs,te)}let me=xt.has(String(p.id)),L=p.cellPadding!==void 0,G=p.rowSpan?p.rowSpan(t,e):1;if(G<=0)return null;let ee=p.onCellClick;return f(Re,{align:p.align||"left",rowSpan:G>1?G:void 0,colSpan:C>1?C:void 0,"data-vdt-pad":L?"":void 0,"data-vdt-pinned":me?"":void 0,"data-vdt-cell-click":ee?"":void 0,onClick:ee?te=>{let Me=te.clientX-Le.current.x,he=te.clientY-Le.current.y;te.stopPropagation(),!(Math.sqrt(Me*Me+he*he)>mn)&&ee(t,e,te)}:void 0,style:{...C>1?{}:ge(p,N,p.width??p.minWidth),...p.primary?{fontSize:15}:{},...p.style,...p.cellStyle?p.cellStyle(t,e):{},padding:L?p.cellPadding:"8px 16px",...Ne(p,!1)},children:Q},String(p.id))});if(U){W.current.rowContentCalls+=1;let p=performance.now()-o;W.current.rowContentMs+=p,W.current.rowContentMaxMs=Math.max(W.current.rowContentMaxMs,p)}return f(st,{children:n})},[R,U,Pt,Xe,H,xt,Ne,re,nr,ge,Ce.on,Ce.renderHandle]),rr=j(()=>{let e=er();if(!Ke||Ke.length===0)return e;let t=qn.current;return Y(st,{children:[e,f("tr",{"data-vdt-pinned-area":"",children:f("td",{colSpan:R.length,style:{padding:0,border:0},children:f(V,{"data-vdt-inner-scroll":"",sx:[{maxHeight:Ot,overflowY:Ot?"auto":"visible",overflowX:"hidden",scrollbarWidth:"thin",borderBottom:`1px solid ${H?k.borderStrong:"rgba(224, 224, 224, 1)"}`,"& tbody tr:last-of-type > td":{borderBottom:"none"}},...Array.isArray(qe)?qe:qe?[qe]:[]],children:Y("table",{style:{width:"100%",tableLayout:dt,borderCollapse:"separate",borderSpacing:0},children:[f("colgroup",{children:R.map((o,g)=>f("col",{style:ge(o,g,o.width??o.minWidth)},String(o.id)))}),f(Sr,{children:Ke.map((o,g)=>t?f(t,{item:o,"data-index":g,"data-vdt-pinned-row":"",children:Tt(g,o)},y?String(y(o,g)):`p${g}`):null)})]})})})})]})},[er,Ke,Ot,qe,R,Tt,dt,y,H,k,ge]),le=O??R.some(e=>typeof e.footer=="function"),or=j(()=>{if(!le)return null;let e=[];for(let t=0;t<R.length;t+=1){let o=R[t],g=o.footerColSpan&&o.footerColSpan>1?Math.min(o.footerColSpan,R.length-t):1;e.push(f(Re,{align:o.align||"left",colSpan:g>1?g:void 0,style:{...g>1?{}:ge(o,t,o.width),...o.style,fontWeight:"bold",padding:H?"0 14px":"16px"},children:o.footer?o.footer(r):null},String(o.id))),t+=g-1}return f(lt,{children:e})},[le,R,r,H,ge]),Jt=ce(()=>({Scroller:Oe?kr:$n,Table:e=>f(Qo,{...e,sx:{borderCollapse:"separate",tableLayout:dt,...oe?{width:"var(--vdt-tw, 100%)",minWidth:`var(--vdt-tmin, ${vt??0}px)`}:vt&&!re?{minWidth:vt}:{},marginRight:pe?"16px":0,...le?{height:"100%"}:{}}}),TableHead:ct((e,t)=>f(ea,{...e,ref:t,sx:{userSelect:"none","& > tr":{height:ve,"& > th":{padding:"16px",position:"sticky",top:0,zIndex:2,fontWeight:"bold"}}}})),TableRow:e=>{let{item:t,selected:o,"aria-selected":g,className:h,...n}=e,p=n["data-index"]??0,N=p%2===1,C=t&&Ge.current?Ge.current(t,p):p,F=!ft&&b!==null&&b!==void 0&&C===b,Q=F&&fe?typeof fe=="function"?fe(t,p):fe:void 0,me=String(h??"").split(/\s+/).filter(L=>L!=="Mui-selected"&&L!=="Mui-focusVisible").join(" ");return f(lt,{...n,"data-row-id":C!=null?String(C):void 0,className:me||void 0,selected:F,onMouseDown:L=>{Qe.current=!1,Le.current={x:L.clientX,y:L.clientY}},onContextMenu:L=>{t&&Xt.current&&Xt.current(t,p,L)},onClick:L=>{let G=L.clientX-Le.current.x,ee=L.clientY-Le.current.y;if(Math.sqrt(G*G+ee*ee)>mn||Qe.current){L.preventDefault(),L.stopPropagation(),Qe.current=!1;return}t&&$t.current&&$t.current(t,p),Qe.current=!1},sx:[{userSelect:"none",...Nt?{"& > td":{height:Ye}}:{height:Ye,maxHeight:Ye},boxSizing:"border-box",backgroundColor:N&&_t?_t:"transparent","& td:not([data-vdt-pad])":{padding:"8px 16px"},"& td":{boxSizing:"border-box",borderBottom:$?"1px solid rgba(224, 224, 224, 1)":"none"},"& th":{padding:"8px 16px",borderBottom:"none"},"&:hover":Ct&&!F?{backgroundColor:L=>{let G=L.palette.mode==="dark",te=zt??"#000000",Me=Wn??.06;if(!zt)return G?`rgba(255, 255, 255, ${Me})`:`rgba(0, 0, 0, ${Me})`;let he=te.replace("#","").trim();if(he.length!==6)return te;let ne=parseInt(he.substring(0,2),16),be=parseInt(he.substring(2,4),16),nt=parseInt(he.substring(4,6),16);return`rgba(${ne}, ${be}, ${nt}, ${Me})`}}:void 0,cursor:Ct?"pointer":void 0},Q]})},TableBody:ct((e,t)=>{let{children:o,...g}=e;return Y(Sr,{...g,ref:t,sx:le?{height:"100%"}:void 0,children:[o,le&&f("tr",{"aria-hidden":!0,style:{height:"100%"},children:f("td",{colSpan:R.length,style:{padding:0,border:0}})})]})}),TableFoot:ct((e,t)=>f(ta,{...e,ref:t,sx:[{"& tr":{height:ae??ie,maxHeight:ae??ie,boxSizing:"border-box"},"& td":{height:ae??ie,boxSizing:"border-box",backgroundColor:o=>o.palette.mode==="dark"?"#1e1e1e":"#ffffff",padding:"0 16px",color:"inherit",fontSize:"0.875rem",border:"none",boxShadow:`inset 0 1px 0 0 ${H?k.borderStrong:"#000000"}`}},...Array.isArray(Te)?Te:Te?[Te]:[]]}))}),[Ct,ft?null:b,fe,ie,_t,$,ve,zt,Wn,$n,ae,Te,le,H,k,R,dt,pe,Nt,vt,re,Oe,oe]);qn.current=Jt.TableRow;let no=Jt,tt=Jt,ro=tt.Table,oo=tt.TableHead,ao=tt.TableBody,io=tt.TableRow,lo=tt.TableFoot,se=Je?R.find(e=>String(e.id)===Je.colId):void 0,so=()=>jn(null),ar=null;if(Je&&se){let e=String(se.id),t=!!((se.sortMenu??se.sortable)&&B),o=We(se),g=S===e?_:void 0;ar=f(fn,{open:!0,anchorPosition:{left:Je.x,top:Je.y},onClose:so,sort:t?{active:g??null,clearable:!!Z,onChange:h=>{h?B?.(e,h):Z?.()}}:void 0,filter:o?{options:se.filterOptions??[],value:se.filterValues??[],onChange:h=>se.onFilterChange?.(h),multiple:se.filterMultiple!==!1,emptyLabel:se.filterEmptyLabel,searchable:se.filterSearchable}:void 0})}let ir=Y(V,{ref:e=>{Yt.current=e,kn.current=e,Fn.current=e},style:eo??void 0,sx:{position:"relative",height:Ee?"auto":"100%",width:"100%",...Ce.on?{"& .vdt-reorder-handle":{display:"inline-flex",alignItems:"center",justifyContent:"center",width:28,height:28,padding:0,border:0,borderRadius:"4px",background:"none",color:H?k.headerColor:xe.palette.text.secondary,cursor:"grab",touchAction:"none","&:hover":{color:xe.palette.text.primary,backgroundColor:H?k.hoverBg:"rgba(0,0,0,.06)"},"&:disabled":{opacity:.35,cursor:"not-allowed"},'&[aria-pressed="true"]':{color:H?k.selectedBar:xe.palette.primary.main,backgroundColor:H?k.selectedBg:"rgba(0,0,0,.06)"}},"& thead tr[data-vdt-pinned-row] .vdt-reorder-handle":{visibility:"hidden"},"& tbody tr[data-vdt-dragging] > td":{opacity:.45},"& [data-vdt-drop-indicator]":{backgroundColor:H?k.selectedBar:xe.palette.primary.main}}:{},...Pe.on?{"& thead th[data-vdt-colkey]":{WebkitTouchCallout:"none"},"& thead th[data-vdt-col-dragging]":{opacity:.45},"& [data-vdt-col-drop-indicator]":{backgroundColor:H?k.selectedBar:xe.palette.primary.main},"&[data-vdt-col-reordering], &[data-vdt-col-reordering] *":{cursor:"grabbing !important"}}:{},"& .MuiTableHead-root":{backgroundColor:e=>H?`${k.bg} !important`:e.palette.mode==="dark"?"#1e1e1e !important":"#ffffff !important"},...qr??{},...oe?{"& 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:H?k.selectedBar:xe.palette.primary.main,opacity:0,transition:"opacity 0.12s ease"},"&:hover::after, &[data-active]::after":{opacity:1}}}:{},"& tbody td[data-vdt-pinned]":{backgroundColor:H?k.bg:xe.palette.background.paper},"& tbody td[data-vdt-cell-click]":{cursor:"pointer"},"& tbody td[data-vdt-cell-click]:hover":{backgroundColor:H?k.hoverBg:xe.palette.mode==="dark"?"rgba(255, 255, 255, 0.06)":"rgba(0, 0, 0, 0.04)"},...H&&Ct?{"& tbody tr:hover td[data-vdt-pinned]":{backgroundColor:k.hoverBg}}:{},...H?{...pe?{border:`1px solid ${k.borderStrong}`,borderRadius:"4px"}:{"& table":{backgroundColor:k.bg}},overflow:"hidden","& thead tr th > *":{verticalAlign:"middle"},"& thead > tr > th":{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},"& thead > tr > th > *":{maxWidth:"100%"},"& thead tr th":{height:ve,boxSizing:"border-box",padding:"0 14px !important",fontSize:13,fontWeight:"500 !important",color:k.headerColor,backgroundColor:`${k.bg} !important`,borderTop:!pe&&At?`1px solid ${k.borderStrong}`:"none",borderBottom:`1px solid ${k.borderStrong}`,borderRight:`1px solid ${k.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 ${k.border}`},...r.length>0&&(Ee&&pe||Zr||le)?{[`& tbody tr[data-index="${r.length-1}"]:not([data-vdt-pinned-row]) td`]:{borderBottom:"none"}}:{}}:{},...zr},children:[Ce.indicator,Pe.indicator,M?f(V,{sx:{overflowX:"auto",width:"100%","& > .MuiTable-root":{marginRight:0}},children:Y(ro,{children:[re?null:f(oo,{children:rr()}),f(ao,{children:r.map((e,t)=>f(io,{item:e,"data-index":t,children:Tt(t,e)},y?String(y(e,t)):t))}),le&&!re?f(lo,{children:or()}):null]})}):ut===null?null:f(ia,{ref:Wt,data:r,totalCount:X?r.length+1:r.length,defaultItemHeight:Ye,fixedItemHeight:Nt?void 0:Ye,fixedHeaderContent:re?void 0:rr,fixedFooterContent:le&&!re?or:void 0,itemContent:Tt,...Ar&&y?{computeItemKey:(e,t)=>t?y(t,e):`vdt-${e}`}:{},endReached:to,scrollerRef:e=>{mt.current=e instanceof HTMLElement?e:null,ht()},totalListHeightChanged:ht,style:Oe?void 0:{height:"100%"},...Oe?{customScrollParent:ut}:{},increaseViewportBy:{top:Fr,bottom:Vr},overscan:Xr,...d&&r.length>0?{initialItemCount:Math.min(d,r.length)}:{},followOutput:!1,components:no},jr),r.length===0&&!a&&!Hn&&H&&typeof m=="string"&&f(V,{sx:{position:Ee?"static":"absolute",top:re?0:ve,left:0,right:0,py:6,px:2,textAlign:"center",fontSize:14,color:k.emptyColor,pointerEvents:"none"},children:m}),r.length===0&&!a&&!Hn&&!(H&&typeof m=="string")&&f(V,{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 m=="string"?Y(st,{children:[f(V,{sx:{width:48,height:48,display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"50%",backgroundColor:"#f5f5f5",color:"#999"},children:"\u{1F4C4}"}),f(ra,{variant:"body1",sx:{color:"text.secondary"},children:m})]}):m}),ar,Gr&&f(st,{children:K?f(K,{visible:a,onComplete:gt}):yn?Go.createElement(yn,{visible:!!a,onComplete:gt,fallback:f(ln,{visible:a,onComplete:gt,size:40,indicator:f(sn,{}),sx:{top:`${R.some(e=>e.group)?ve*2:ve}px`,bottom:`${le?ae??ie:0}px`},background:{show:r.length===0,opacity:.8}})}):f(ln,{visible:a,onComplete:gt,size:40,indicator:f(sn,{}),sx:{top:`${R.some(e=>e.group)?ve*2:ve}px`,bottom:`${le?ae??ie:0}px`},background:{show:r.length===0,opacity:.8}})})]}),lr=H&&pe?{paddingRight:pt,paddingTop:Hr,paddingBottom:Hr}:{};return J?f(na,{className:"grow",elevation:1,sx:{padding:0,paddingLeft:pt,...lr,boxSizing:"border-box",height:Ee?"auto":"100%",minHeight:0,flex:Ee?"none":1,display:"flex",flexDirection:"column"},children:ir}):f(V,{className:"grow",style:{padding:0,paddingLeft:pt,...lr,boxSizing:"border-box",height:Ee?"auto":"100%",minHeight:0,flex:Ee?"none":1,display:"flex",flexDirection:"column"},children:ir})}var yn=null;function ga(r){yn=r}var ma=Zo(fa);export{cn as HEADER_MENU_FONT_SIZE,ye as HEADER_MENU_ICON_PATHS,dn as HEADER_MENU_ICON_SIZE,un as HEADER_MENU_ITEM_HEIGHT,Tr as HEADER_MENU_ITEM_SX,pn as HeaderFilterIcon,fn as HeaderMenu,Ht as HeaderMenuDivider,Ve as HeaderMenuIcon,we as HeaderMenuItem,hn as NOTION_LINE_COLOR,bn as NOTION_LINE_COLOR_DARK,ma as VirtualDataTable,tn as getMuiVirtualDataTableLocale,Yo as headerMenuAnchor,Co as setMuiVirtualDataTableLocale,ga as setVirtualDataTableLoadingGate};
|
|
4
|
+
`;function sn({size:r=54}){return Vo(Fo,{children:[wr("style",{children:_o}),wr("span",{className:"vdt-css-spinner",role:"progressbar","aria-label":"loading",style:{display:"inline-block",width:r,height:r}})]})}import Dt,{useMemo as Wo,useState as $o}from"react";import{Box as it,Divider as Xo,InputBase as Ko,Menu as qo,MenuItem as Uo,SvgIcon as jo}from"@mui/material";import{jsx as I,jsxs as kt}from"react/jsx-runtime";var cn=14,dn=18,un=34,ye={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 Ve({d:r,size:a=dn,color:s}){return I(jo,{sx:{fontSize:a,flexShrink:0,color:s},children:I("path",{d:r})})}function pn({size:r=14,active:a,color:s}){let v={stroke:"currentColor",strokeWidth:1.8,strokeMiterlimit:10,strokeLinecap:"round",strokeLinejoin:"round"};return kt(it,{component:"svg",viewBox:"0 0 24 24",fill:"none","aria-hidden":!0,sx:{width:r,height:r,flexShrink:0,color:a?"primary.main":s??"currentColor",verticalAlign:"middle"},children:[I("path",{d:"M2 17.5H7",...v}),I("path",{d:"M22 6.5H17",...v}),I("path",{d:"M13 17.5H22",...v}),I("path",{d:"M11 6.5H2",...v}),I("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",...v}),I("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",...v})]})}var Tr={gap:1,fontSize:cn,lineHeight:"20px",minHeight:un,py:"7px",px:1.5};function we({icon:r,iconSpace:a,selected:s,disabled:v,muted:y,onClick:b,sx:E,children:z}){return kt(Uo,{selected:s,disabled:v,onClick:b,sx:[Tr,y?{color:"text.secondary"}:{},...Array.isArray(E)?E:E?[E]:[]],children:[r??(a?I(it,{component:"span",sx:{width:dn,flexShrink:0}}):null),z]})}function Ht(){return I(Xo,{sx:{my:"4px !important"}})}function Yo(r,a){let s=r.getBoundingClientRect();return{left:a??s.left,top:s.bottom}}function fn({open:r,anchorPosition:a,anchorEl:s,onClose:v,sort:y,filter:b,header:E,children:z,minWidth:T=180,maxHeight:P=420}){let{t:$}=Et(),[B,Z]=$o(""),q=b?.multiple!==!1,X=b?.value??[],S=Wo(()=>{if(!b)return[];let c=b.options;return b.emptyLabel&&!c.some(i=>i.value==="")?[...c,{value:"",label:b.emptyLabel}]:c},[b]),_=!!b&&(b?.searchable??S.length>10),J=B.trim().toLowerCase(),ue=J?S.filter(c=>c.label.toLowerCase().includes(J)):S,w=()=>{Z(""),v()},p=[];if(E&&p.push(...Dt.Children.toArray(E).map((c,i)=>Dt.isValidElement(c)?Dt.cloneElement(c,{key:`h${i}`}):c)),y){let c=i=>{w(),y.onChange(y.active===i&&y.clearable!==!1?null:i)};p.push(I(we,{selected:y.active==="asc",onClick:()=>c("asc"),icon:I(Ve,{d:ye.asc,color:"text.secondary"}),children:$("sortAscending")},"sort-asc"),I(we,{selected:y.active==="desc",onClick:()=>c("desc"),icon:I(Ve,{d:ye.desc,color:"text.secondary"}),children:$("sortDescending")},"sort-desc")),y.active&&y.clearable!==!1&&p.push(I(we,{muted:!0,iconSpace:!0,onClick:()=>{w(),y.onChange(null)},children:$("clearSort")},"sort-clear"))}return y&&b&&p.push(I(Ht,{},"div-sort")),b&&(_&&p.push(kt(it,{onKeyDown:c=>c.stopPropagation(),sx:{display:"flex",alignItems:"center",gap:1,px:1.5,pb:.5,minHeight:un},children:[I(Ve,{d:ye.search,color:"text.secondary"}),I(Ko,{autoFocus:!0,value:B,onChange:c=>Z(c.target.value),placeholder:b.searchPlaceholder??$("search"),sx:{flex:1,fontSize:cn}})]},"search")),!q&&b.allLabel&&p.push(I(we,{selected:X.length===0,onClick:()=>{w(),b.onChange([])},icon:I(Ve,{d:X.length===0?ye.radioOn:ye.radioOff,color:X.length===0?"primary.main":"text.disabled"}),children:b.allLabel},"f-all")),S.length===0&&p.push(I(we,{disabled:!0,iconSpace:!0,children:b.emptyText??$("noOptions")},"f-none")),ue.forEach(c=>{let i=X.includes(c.value),l=()=>{if(q){b.onChange(i?X.filter(x=>x!==c.value):[...X,c.value]);return}w(),b.onChange(i?[]:[c.value])},d=q?i?ye.checked:ye.unchecked:i?ye.radioOn:ye.radioOff;p.push(kt(we,{selected:!q&&i,onClick:l,icon:I(Ve,{d,color:i?"primary.main":"text.disabled"}),children:[c.icon,I(it,{component:"span",sx:{flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:c.render??c.label}),typeof c.count=="number"?I(it,{component:"span",sx:{color:"text.secondary",ml:1,fontVariantNumeric:"tabular-nums"},children:c.count}):null]},`f:${c.value||"(empty)"}`))}),_&&J&&ue.length===0&&p.push(I(we,{disabled:!0,iconSpace:!0,children:$("noMatches")},"f-nohit")),X.length>0&&p.push(I(Ht,{},"div-filter"),I(we,{muted:!0,iconSpace:!0,onClick:()=>{w(),b.onChange([])},children:b.clearLabel??$("clearFilter")},"f-clear"))),z&&(p.length>0&&p.push(I(Ht,{},"div-children")),p.push(...Dt.Children.toArray(z))),I(qo,{open:r&&(!!a||!!s),...!a&&!!s?{anchorEl:s}:{anchorReference:"anchorPosition",anchorPosition:a??void 0},onClose:w,transitionDuration:0,disableAutoFocusItem:_,onContextMenu:c=>c.preventDefault(),onClick:c=>c.stopPropagation(),slotProps:{paper:{sx:{maxHeight:P,minWidth:T}},list:{sx:{py:.5}}},children:p})}import la from"@ehfuse/overlay-scrollbar";import{Fragment as st,jsx as f,jsxs as Y}from"react/jsx-runtime";var sa={alignment:"default",margin:0,radius:0},mn=5,Rr={},ca=3;function Er(r){return typeof r=="number"?`${r}px`:r}function Lr(r){let a=window.getComputedStyle(r),s=a.boxSizing==="border-box"?0:(parseFloat(a.paddingLeft)||0)+(parseFloat(a.paddingRight)||0)+(parseFloat(a.borderLeftWidth)||0)+(parseFloat(a.borderRightWidth)||0);return r.getBoundingClientRect().width-s}function Dr(r,a){let s=[];for(let v=0;v<r.style.length;v+=1){let y=r.style[v];y.startsWith("--vdt-")&&!(y in a)&&s.push(y)}s.forEach(v=>r.style.removeProperty(v)),Object.entries(a).forEach(([v,y])=>r.style.setProperty(v,y))}var hn="#d9d8d5",bn="#3b434e",da={bg:"#ffffff",border:hn,borderStrong:hn,headerColor:"#787774",hoverBg:"#f8f8f7",emptyColor:"#9b9a97",selectedBg:"#dbeafe",selectedBar:"#3b82f6"},Hr="12px",ua={bg:"#1e1e1e",border:bn,borderStrong:bn,headerColor:"#a3adbb",hoverBg:"#272d36",emptyColor:"#7d8590",selectedBg:"rgba(59, 130, 246, 0.22)",selectedBar:"#60a5fa"},kr=ct((r,a)=>f("div",{...r,ref:a}));kr.displayName="VdtPlainScroller";var pa="(max-width:599.95px)";function We(r){return!!(r.filterOptions&&r.onFilterChange)}function $e(r){return r==="right"?{box:{paddingLeft:"20px"},label:{left:0,marginLeft:0}}:r==="center"?{box:{},label:{left:"100%",marginLeft:"4px"}}:{box:{paddingRight:"20px"},label:{left:"auto",right:0,marginLeft:0}}}function fa({data:r,loading:a=!1,columns:s,onRowClick:v,getRowId:y,selectedRowId:b,selectedRowSx:E,rowHeight:z,columnHeight:T,striped:P,rowDivider:$=!0,onSort:B,onSortClear:Z,onHeaderContextMenu:q,onLoadMore:X,sortBy:S,sortDirection:_,showPaper:J=!0,paddingX:ue,paddingTop:w=0,paddingBottom:p=0,rowHoverColor:D,rowHoverOpacity:c,viewportBuffer:i,overscan:l,initialItemCount:d,scrollbars:x,emptyMessage:m="NO DATA",autoHeight:M=!1,LoadingComponent:K,showFooter:O,footerHeight:ae,footerSx:Te,variant:Ae="default",borderColor:Ie,framed:pe=!0,headerTopBorder:At=!1,scrollbarGutter:Se=!1,rowHeightMode:It="fixed",tableLayout:dt="fixed",renderFullWidthRow:Pt,fullWidthRowSx:Xe,onRowContextMenu:xn,pinnedRows:Ke,pinnedRowsMaxHeight:Ot,pinnedRowsSx:qe,resetScrollOnDataChange:vn=!0,rowKeyFromId:Ar=!1,onEndReached:Cn,colorMode:Ir,mobile:Mn,scrollParent:ut,columnResize:wn,columnWidths:Tn,onColumnWidthsChange:Sn,rowReorder:Pr,columnReorder:Rn,columnOrder:En,onColumnOrderChange:Ln}){let H=Ae==="notion",xe=oa(),Dn=(Ir??xe.palette.mode)==="dark"?ua:da,k=Ie?{...Dn,border:Ie,borderStrong:Ie}:Dn,Hn=(Ke?.length??0)>0,ve=T??(H?40:56),ie=z??(H?48:50),pt=pe?ue??(H?"12px":"1rem"):0,Ue=Mn===!0?{}:Mn||null,Or=aa(Ue?.query??pa,{noSsr:!0}),re=!!Ue&&Or,kn=A(null),An=A(()=>null),In=A(r.length);In.current=r.length;let Ce=yr({config:Pr,tableBoxRef:kn,getScroller:()=>An.current(),dataLengthRef:In,anyPinned:s.some(e=>e.pinned==="left")}),Pn=Rn===!0?{}:Rn||null,On=!!Pn&&!re,[Nr,Nn]=ke(null);de(()=>{Nn(null)},[En]);let zn=On?Nr??En??null:null,je=ce(()=>on(s,zn),[s,zn]),Bn=A(je);Bn.current=je;let _n=A(Ln);_n.current=Ln;let Fn=A(null),Pe=Cr({on:On,config:Pn,tableBoxRef:Fn,columnsRef:Bn,onCommit:j(e=>{Nn(e),_n.current?.(e)},[])}),R=ce(()=>Ce.handleColumn?[Ce.handleColumn,...je]:je,[Ce.handleColumn,je]),Oe=!!ut,Ee=M||Oe,Nt=It==="auto"||re,Vn=typeof Se=="number"?Se:Se?(Number(x?.thumb?.width)||8)+8:0,zr=Vn>0?{"& thead tr th:last-of-type, & tbody tr td:last-of-type:not([data-vdt-pad])":{paddingRight:`${(H?14:16)+Vn}px !important`}}:{},zt=D??(H?k.hoverBg:void 0),Wn=c??(H?1:void 0),Br=Math.max(ie*12,480),_r=Math.max(ie*12,480),Fr=typeof i=="number"?i:i?.top??Br,Vr=typeof i=="number"?i:i?.bottom??_r,Wr=Math.max(ie*8,420),$r=Math.max(ie*10,520),Xr=typeof l=="number"?l:{main:l?.main??Wr,reverse:l?.reverse??$r},Ye=ie+($?1:0),Kr=ce(()=>H?{backgroundColor:k.selectedBg,"& > td:first-of-type":{boxShadow:`inset 3px 0 0 ${k.selectedBar}`},"& > td[data-vdt-pinned]":{backgroundColor:k.selectedBg}}:void 0,[H,k]),fe=E??Kr,ft=!fe||typeof fe!="function",qr=ce(()=>!ft||b===null||b===void 0||!fe?null:{[`& tbody tr[data-row-id="${String(b).replace(/["\\]/g,"\\$&")}"]`]:fe},[ft,b,fe]),ha=typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"),[U]=ke(()=>typeof window>"u"?!1:window.localStorage.getItem("vdt-perf-debug")==="1"),W=A({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}),Bt=j(e=>{if(!U)return;let t=W.current;if(!(t.wheelEvents>0||t.rangeChangedCalls>0||t.rowContentCalls>0||t.cellRenderCalls>0))return;let g=t.rowContentCalls>0?t.rowContentMs/t.rowContentCalls:0,h=t.cellRenderCalls>0?t.cellRenderMs/t.cellRenderCalls:0;console.log("[VDT perf]",{reason:e,wheel:{events:t.wheelEvents,inputPx:Math.round(t.wheelInputPx),handlerMs:Number(t.wheelHandlerMs.toFixed(2)),rafFlushes:t.wheelRafFlushes,rafMs:Number(t.wheelRafMs.toFixed(2))},rangeChanged:{calls:t.rangeChangedCalls,totalMs:Number(t.rangeChangedMs.toFixed(2))},rowContent:{calls:t.rowContentCalls,totalMs:Number(t.rowContentMs.toFixed(2)),avgMs:Number(g.toFixed(3)),maxMs:Number(t.rowContentMaxMs.toFixed(3))},cellRender:{calls:t.cellRenderCalls,totalMs:Number(t.cellRenderMs.toFixed(2)),avgMs:Number(h.toFixed(3)),maxMs:Number(t.cellRenderMaxMs.toFixed(3))}}),W.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}},[U]);de(()=>{if(!U||typeof window>"u")return;console.log("[VDT perf] enabled (localStorage vdt-perf-debug=1)");let e=window.setInterval(()=>{Bt("interval")},1500);return()=>{window.clearInterval(e),Bt("cleanup")}},[Bt,U]);let $n=ce(()=>ct((e,t)=>{let o=A(null),g=A(0),h=A(null);return de(()=>{let n=o.current;if(!n)return;let u=N=>{let C=U?performance.now():0;if(N.shiftKey||Math.abs(N.deltaX)>Math.abs(N.deltaY))return;let F=N.target?.closest?.("[data-vdt-inner-scroll]");if(F&&n.contains(F)&&(N.deltaY<0?F.scrollTop>0:F.scrollTop+F.clientHeight<F.scrollHeight-1))return;N.preventDefault();let Q=N.deltaY;N.deltaMode===1?Q*=40:N.deltaMode===2&&(Q*=n.clientHeight),U&&(W.current.wheelEvents+=1,W.current.wheelInputPx+=Q),g.current+=Q,h.current===null&&(h.current=requestAnimationFrame(()=>{let me=U?performance.now():0,L=Math.max(n.clientHeight*.4,160),G=Math.max(-L,Math.min(L,g.current));g.current=0,h.current=null,G!==0&&(n.scrollTop+=G),U&&(W.current.wheelRafFlushes+=1,W.current.wheelRafMs+=performance.now()-me)}),U&&(W.current.wheelHandlerMs+=performance.now()-C))};return n.addEventListener("wheel",u,{passive:!1}),()=>{n.removeEventListener("wheel",u),h.current!==null&&(cancelAnimationFrame(h.current),h.current=null),g.current=0}},[]),f(la,{detectInnerScroll:!0,track:sa,...x,children:f(Jo,{component:V,...e,ref:n=>{o.current=n,typeof t=="function"?t(n):t&&(t.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:H?0:pt,paddingTop:typeof w=="number"?`${w}px`:w,paddingBottom:typeof p=="number"?`${p}px`:p}}})})}),[]),_t=ce(()=>{if(P===!0)return"#f5f5f5";if(typeof P=="string")return P},[P]),[Ur,Xn]=ke(a),[jr,Yr]=ke(0);de(()=>{a&&Xn(!0)},[a]);let gt=j(()=>{Xn(!1)},[]),Gr=Ur,ba=a&&r.length>0,Ft=A(!1),Vt=A(-1),Wt=A(null),mt=A(null),[Zr,Qr]=ke(!1),ht=j(()=>{let e=mt.current;e&&Qr(e.scrollHeight>e.clientHeight+1)},[]);de(()=>{let e=mt.current;if(!e||typeof ResizeObserver>"u")return;let t=new ResizeObserver(()=>ht());return t.observe(e),()=>t.disconnect()},[ht,M]);let $t=A(v);$t.current=v;let Ge=A(y);Ge.current=y;let Xt=A(xn);Xt.current=xn;let Kn=A(Cn);Kn.current=Cn;let qn=A(null),Un=wn===!0?{}:wn||null,oe=!!Un&&!re,Ze=Un?.minWidth??48,[Jr,Kt]=ke(null);de(()=>{Kt(null)},[Tn]);let bt=oe?Jr??Tn??Rr:Rr,qt=A(bt);qt.current=bt;let Ut=A(Sn);Ut.current=Sn;let jt=A(R);jt.current=R;let Yt=A(null);An.current=()=>Oe?ut:M?null:mt.current;let yt=j(e=>{let t={},o=!1,g=!0,h=0,n=0;return R.forEach((u,N)=>{let C=u.resizable===!1?void 0:e[String(u.id)];if(typeof C=="number"&&Number.isFinite(C)&&C>0){let F=Math.max(u.minWidth??Ze,Math.round(C));t[`--vdt-cw-${N}`]=`${F}px`,o=!0,h+=F,n+=F}else typeof u.width=="number"?(h+=u.width,n+=u.width):(g=!1,h+=u.minWidth??Ze)}),o&&(t["--vdt-tmin"]=`${h}px`,g&&(t["--vdt-tw"]=`${n}px`)),t},[R,Ze]),Gt=A(yt);Gt.current=yt;let eo=ce(()=>oe?yt(bt):null,[oe,yt,bt]),ge=j((e,t,o)=>{if(!oe)return{width:e.width,minWidth:o};let g=`--vdt-cw-${t}`,h=Er(e.width),n=Er(o);return{width:h!==void 0?`var(${g}, ${h})`:`var(${g})`,minWidth:n!==void 0?`var(${g}, ${n})`:`var(${g})`}},[oe]),xt=ce(()=>{let e=new Map,t=0,o=[];return R.forEach((g,h)=>{if(g.pinned!=="left")return;e.set(String(g.id),oe&&o.length>0?`calc(${o.join(" + ")})`:t);let n=typeof g.width=="number"?g.width:0;t+=n,o.push(`var(--vdt-cw-${h}, ${n}px)`)}),e},[R,oe]),vt=ce(()=>{if(R.some(e=>typeof e.minWidth=="number"))return R.reduce((e,t)=>e+(typeof t.width=="number"?t.width:typeof t.minWidth=="number"?t.minWidth:0),0)},[R]),Ne=j((e,t)=>{let o=xt.get(String(e.id));return o===void 0?{}:{position:"sticky",left:o,zIndex:t?3:1}},[xt]),Ct=!!v,Qe=A(!1),Le=A({x:0,y:0});de(()=>{let e=t=>{let o=t.clientX-Le.current.x,g=t.clientY-Le.current.y;Math.sqrt(o*o+g*g)>mn&&(Qe.current=!0)};return document.addEventListener("mousemove",e),()=>{document.removeEventListener("mousemove",e)}},[]),de(()=>{let e=document.querySelector('[data-testid="virtuoso-scroller"]');e&&e.querySelectorAll(".MuiTableSortLabel-root").forEach(o=>{let g=new MouseEvent("mouseleave",{bubbles:!0,cancelable:!0});o.dispatchEvent(g)})},[S]);let Mt=j(e=>{if(!B)return;B(e,S===e&&_==="asc"?"desc":"asc")},[B,S,_]),[Je,jn]=ke(null),Yn=A(q);Yn.current=q;let Gn=A(B);Gn.current=B;let et=j((e,t)=>{if(!e){t.preventDefault();return}e.headerProps?.onContextMenu?.(t);let o=t.defaultPrevented;if(o||(o=Yn.current?.(e,t)===!0||t.defaultPrevented),t.preventDefault(),o||e.headerMenu===!1||!!!((e.sortMenu??e.sortable)&&Gn.current)&&!We(e))return;let h=t.currentTarget.getBoundingClientRect();jn({colId:String(e.id),x:t.clientX,y:h.bottom})},[]),Zn=j((e,t)=>{if(t.button!==0)return;t.preventDefault(),t.stopPropagation();let o=t.currentTarget,g=o.closest("th"),h=Yt.current;if(!g||!h)return;let n=Lr(g),u=t.clientX,N=String(e.id),C=e.minWidth??Ze,F=qt.current,Q=jt.current;if(!Q.some(ne=>!(String(ne.id)in F)&&typeof ne.width!="number")){let ne={...F};h.querySelectorAll("thead th [data-vdt-col]").forEach(be=>{let nt=Q[Number(be.getAttribute("data-vdt-col"))],sr=be.closest("th");!nt||!sr||String(nt.id)in ne||(ne[String(nt.id)]=Math.round(Lr(sr)))}),F=ne}let L=F,G=!1,ee=0;o.setAttribute("data-active","");let te=document.body.style.cursor;document.body.style.cursor="col-resize";let Me=ne=>{let be=ne.clientX-u;!G&&Math.abs(be)<ca||(G=!0,L={...F,[N]:Math.max(C,Math.round(n+be))},ee||(ee=requestAnimationFrame(()=>{ee=0,Dr(h,Gt.current(L))})))},he=()=>{if(document.removeEventListener("mousemove",Me),document.removeEventListener("mouseup",he),ee&&cancelAnimationFrame(ee),o.removeAttribute("data-active"),document.body.style.cursor=te,!G)return;Dr(h,Gt.current(L));let ne=be=>{be.stopPropagation(),be.preventDefault()};window.addEventListener("click",ne,!0),window.setTimeout(()=>window.removeEventListener("click",ne,!0),0),Kt(L),Ut.current?.(L)};document.addEventListener("mousemove",Me),document.addEventListener("mouseup",he)},[Ze]),Qn=j((e,t)=>{t.preventDefault(),t.stopPropagation();let o=String(e.id),g=qt.current;if(!(o in g))return;let h={...g};delete h[o];let n=jt.current,u=Yt.current?.querySelector("table"),N=u?.parentElement;if(u&&N&&n.every(C=>typeof C.width=="number")){let C=n.reduce((L,G)=>L+G.width,0),F=N.clientWidth,Q=C>0?Math.max(1,F/C):1,me=L=>Math.round(L.width*Q);Q>1&&(h[o]=me(e)),n.every(L=>!(String(L.id)in h)||Math.abs(h[String(L.id)]-me(L))<=1)&&(h={})}Kt(h),Ut.current?.(h)},[]),wt=j(e=>oe&&e.id!==ot&&e.resizable!==!1?f("span",{"data-vdt-resize":"","data-vdt-col":R.indexOf(e),"aria-hidden":!0,onMouseDown:t=>Zn(e,t),onDoubleClick:t=>Qn(e,t),onClick:t=>t.stopPropagation()}):null,[oe,Zn,Qn,R]),De=j(e=>{if(!We(e))return e.text;let t=!!(e.filterValues&&e.filterValues.length>0);return Y(V,{component:"span",sx:{display:"inline-flex",alignItems:"center",gap:.5,maxWidth:"100%",color:t?"primary.main":void 0,fontWeight:t?600:void 0,verticalAlign:"middle"},children:[f(V,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.text}),f(pn,{active:t})]})},[]),to=j(e=>{let t=U?performance.now():0;if(Kn.current?.(),!X){U&&(W.current.rangeChangedCalls+=1,W.current.rangeChangedMs+=performance.now()-t);return}if(a&&r.length===0){U&&(W.current.rangeChangedCalls+=1,W.current.rangeChangedMs+=performance.now()-t);return}let o=r.length>=30,g=e>=r.length-1,h=Vt.current===r.length;if(g&&o&&!Ft.current&&!h){Ft.current=!0,Vt.current=r.length;let n=r.length;X(n,50)}U&&(W.current.rangeChangedCalls+=1,W.current.rangeChangedMs+=performance.now()-t)},[r.length,a,X,U]);de(()=>{a||(Ft.current=!1)},[a]),de(()=>{r.length===0&&Yr(e=>e+1)},[r.length]);let Jn=A(vn);Jn.current=vn;let Zt=A(r.length),Qt=A(void 0);de(()=>{let e=Zt.current,t=r.length,o=t>0?Ge.current?Ge.current(r[0],0):r[0]:void 0,g=Qt.current;if(t>e&&e>0){Zt.current=t,Qt.current=o;return}let h=t<e||e>0&&o!==g;h&&(Vt.current=-1),Wt.current&&t>0&&h&&Jn.current&&Wt.current.scrollToIndex({index:0,align:"start",behavior:"auto"}),Zt.current=t,Qt.current=o},[r]);let er=j(()=>{let e={},t=[];if(R.forEach(n=>{n.group?(e[n.group]||(e[n.group]=[]),e[n.group].push(n)):t.push(n)}),!(Object.keys(e).length>0))return f(lt,{children:R.map((n,u)=>Y(Re,{align:n.align||"left",title:typeof n.text=="string"?n.text:void 0,...n.headerProps,onContextMenu:N=>et(n,N),...Pe.headerCellProps(n),style:{...ge(n,u,n.width??n.minWidth),...n.style,fontWeight:"bold",position:"sticky",top:0,zIndex:2,padding:"16px",...Ne(n,!0),...n.headerProps?.style},children:[n.sortable?f("div",{style:{display:"flex",alignItems:"center",justifyContent:n.align==="center"?"center":n.align==="right"?"flex-end":"flex-start",position:"relative",width:"100%"},children:Y(V,{className:"vdt-sort-box","data-align":n.align||"left","data-filter":We(n)?"1":void 0,sx:{position:"relative",...$e(n.align).box,cursor:"default","&:hover .MuiTableSortLabel-root":{opacity:"1 !important","& .MuiSvgIcon-root":{color:"#000",opacity:"1 !important"}}},onClick:()=>Mt(String(n.id)),children:[De(n),f(gn,{active:S===n.id,direction:S===n.id?_:"desc",sx:{position:"absolute",top:"50%",transform:"translateY(-50%)",...$e(n.align).label,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)"}}})]})}):De(n),wt(n)]},String(n.id)))});let g=[...t.map(n=>Y(Re,{rowSpan:2,align:n.align||"left",title:typeof n.text=="string"?n.text:void 0,...n.headerProps,onContextMenu:u=>et(n,u),...Pe.headerCellProps(n),style:{...ge(n,R.indexOf(n),n.width),...n.style,fontWeight:"bold",position:"sticky",top:0,zIndex:2,padding:"16px",...Ne(n,!0),...n.headerProps?.style},children:[n.sortable&&B?f("div",{style:{display:"flex",alignItems:"center",justifyContent:n.align==="center"?"center":n.align==="right"?"flex-end":"flex-start",position:"relative",width:"100%"},children:Y(V,{className:"vdt-sort-box","data-align":n.align||"left","data-filter":We(n)?"1":void 0,sx:{position:"relative",...$e(n.align).box,cursor:"default","&:hover .MuiTableSortLabel-root":{opacity:"1 !important","& .MuiSvgIcon-root":{color:"#000",opacity:"1 !important"}}},onClick:()=>Mt(String(n.id)),children:[De(n),f(gn,{active:S===n.id,direction:S===n.id?_:"desc",sx:{position:"absolute",top:"50%",transform:"translateY(-50%)",...$e(n.align).label,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)"}}})]})}):De(n),wt(n)]},String(n.id))),...Object.entries(e).map(([n,u])=>f(Re,{align:"center",colSpan:u.length,onContextMenu:N=>et(null,N),style:{fontWeight:"bold",position:"sticky",top:0,zIndex:2,padding:"16px"},children:n},n))],h=[...Object.values(e).flat().map(n=>Y(Re,{align:n.align||"left",title:typeof n.text=="string"?n.text:void 0,...n.headerProps,onContextMenu:u=>et(n,u),...Pe.headerCellProps(n),style:{...ge(n,R.indexOf(n),n.width),...n.style,fontWeight:"bold",position:"sticky",top:0,zIndex:2,padding:"16px",...Ne(n,!0),...n.headerProps?.style},children:[n.sortable&&B?f("div",{style:{display:"flex",alignItems:"center",justifyContent:n.align==="center"?"center":n.align==="right"?"flex-end":"flex-start",position:"relative",width:"100%"},children:Y(V,{className:"vdt-sort-box","data-align":n.align||"left","data-filter":We(n)?"1":void 0,sx:{position:"relative",...$e(n.align).box,cursor:"default","&:hover .MuiTableSortLabel-root":{opacity:"1 !important","& .MuiSvgIcon-root":{color:"#000",opacity:"1 !important"}}},onClick:()=>Mt(String(n.id)),children:[De(n),f(gn,{active:S===n.id,direction:S===n.id?_:"desc",sx:{position:"absolute",top:"50%",transform:"translateY(-50%)",...$e(n.align).label,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)"}}})]})}):De(n),wt(n)]},String(n.id)))];return Y(st,{children:[f(lt,{children:g}),f(lt,{children:h})]})},[R,S,_,Mt,B,ve,Ne,et,De,ge,wt,Pe.headerCellProps]),tr=ce(()=>{let e=R.filter(o=>o.mobile!==!1),t=e.find(o=>o.mobile==="title")??e.find(o=>!o.mobile);return{title:t,thumb:e.filter(o=>o.mobile==="thumb"),badge:e.filter(o=>o.mobile==="badge"),sub:e.filter(o=>o.mobile==="sub"),meta:e.filter(o=>o!==t&&(!o.mobile||o.mobile==="meta"))}},[R]),nr=j((e,t)=>{if(Ue?.renderRow)return Ue.renderRow(e,t);let o=C=>C.render?C.render(e,t):String(e[C.id]??""),{title:g,thumb:h,badge:n,sub:u,meta:N}=tr;return Y(V,{sx:{display:"flex",gap:"12px",alignItems:"flex-start",py:"12px",px:"14px",minWidth:0},children:[h.map(C=>f(V,{sx:{flexShrink:0},children:o(C)},String(C.id))),Y(V,{sx:{flex:1,minWidth:0,display:"flex",flexDirection:"column",gap:"4px"},children:[(g||n.length>0)&&Y(V,{sx:{display:"flex",alignItems:"flex-start",gap:"8px",minWidth:0},children:[f(V,{sx:{flex:1,minWidth:0,fontSize:15,fontWeight:500,overflowWrap:"anywhere"},children:g?o(g):null}),n.map(C=>f(V,{sx:{flexShrink:0},children:o(C)},String(C.id)))]}),u.map(C=>f(V,{sx:{fontSize:13,color:k.headerColor,minWidth:0},children:o(C)},String(C.id))),N.length>0&&f(V,{sx:{display:"flex",flexWrap:"wrap",gap:"2px 12px",fontSize:13,minWidth:0},children:N.map(C=>{let F=C.mobileLabel===!1?null:C.mobileLabel??(typeof C.text=="string"?C.text:null);return Y(V,{sx:{display:"inline-flex",alignItems:"center",gap:"4px",minWidth:0,maxWidth:"100%"},children:[F?f(V,{component:"span",sx:{color:k.headerColor,flexShrink:0},children:F}):null,f(V,{component:"span",sx:{minWidth:0,"& > *":{width:"auto !important",textAlign:"left !important"}},children:o(C)})]},String(C.id))})})]})]})},[Ue,tr,k]),Tt=j((e,t)=>{let o=U?performance.now():0;if(!t){if(U){W.current.rowContentCalls+=1;let u=performance.now()-o;W.current.rowContentMs+=u,W.current.rowContentMaxMs=Math.max(W.current.rowContentMaxMs,u)}return null}if(re){let u=nr(t,e);return f(Re,{colSpan:R.length,"data-vdt-pad":"",sx:{padding:0},children:Ce.on?Y(V,{sx:{display:"flex",alignItems:"stretch",minWidth:0},children:[f(V,{sx:{display:"flex",alignItems:"center",pl:"6px",flexShrink:0},children:Ce.renderHandle(t,e)}),f(V,{sx:{flex:1,minWidth:0},children:u})]}):u})}let g=Pt?Pt(t,e):null;if(g!=null)return f(Re,{colSpan:R.length,"data-vdt-pad":"",sx:[{padding:H?"0 14px":"8px 16px"},...Array.isArray(Xe)?Xe:Xe?[Xe]:[]],children:g});let h=0,n=R.map((u,N)=>{if(h>0)return h-=1,null;let C=u.colSpan?Math.max(1,Math.min(u.colSpan(t,e),R.length-N)):1;h=C-1;let F=U?performance.now():0,Q=u.render?u.render(t,e):String(t[u.id]||"");if(U){let te=performance.now()-F;W.current.cellRenderCalls+=1,W.current.cellRenderMs+=te,W.current.cellRenderMaxMs=Math.max(W.current.cellRenderMaxMs,te)}let me=xt.has(String(u.id)),L=u.cellPadding!==void 0,G=u.rowSpan?u.rowSpan(t,e):1;if(G<=0)return null;let ee=u.onCellClick;return f(Re,{align:u.align||"left",rowSpan:G>1?G:void 0,colSpan:C>1?C:void 0,"data-vdt-pad":L?"":void 0,"data-vdt-pinned":me?"":void 0,"data-vdt-cell-click":ee?"":void 0,onClick:ee?te=>{let Me=te.clientX-Le.current.x,he=te.clientY-Le.current.y;te.stopPropagation(),!(Math.sqrt(Me*Me+he*he)>mn)&&ee(t,e,te)}:void 0,style:{...C>1?{}:ge(u,N,u.width??u.minWidth),...u.primary?{fontSize:15}:{},...u.style,...u.cellStyle?u.cellStyle(t,e):{},padding:L?u.cellPadding:"8px 16px",...Ne(u,!1)},children:Q},String(u.id))});if(U){W.current.rowContentCalls+=1;let u=performance.now()-o;W.current.rowContentMs+=u,W.current.rowContentMaxMs=Math.max(W.current.rowContentMaxMs,u)}return f(st,{children:n})},[R,U,Pt,Xe,H,xt,Ne,re,nr,ge,Ce.on,Ce.renderHandle]),rr=j(()=>{let e=er();if(!Ke||Ke.length===0)return e;let t=qn.current;return Y(st,{children:[e,f("tr",{"data-vdt-pinned-area":"",children:f("td",{colSpan:R.length,style:{padding:0,border:0},children:f(V,{"data-vdt-inner-scroll":"",sx:[{maxHeight:Ot,overflowY:Ot?"auto":"visible",overflowX:"hidden",scrollbarWidth:"thin",borderBottom:`1px solid ${H?k.borderStrong:"rgba(224, 224, 224, 1)"}`,"& tbody tr:last-of-type > td":{borderBottom:"none"}},...Array.isArray(qe)?qe:qe?[qe]:[]],children:Y("table",{style:{width:"100%",tableLayout:dt,borderCollapse:"separate",borderSpacing:0},children:[f("colgroup",{children:R.map((o,g)=>f("col",{style:ge(o,g,o.width??o.minWidth)},String(o.id)))}),f(Sr,{children:Ke.map((o,g)=>t?f(t,{item:o,"data-index":g,"data-vdt-pinned-row":"",children:Tt(g,o)},y?String(y(o,g)):`p${g}`):null)})]})})})})]})},[er,Ke,Ot,qe,R,Tt,dt,y,H,k,ge]),le=O??R.some(e=>typeof e.footer=="function"),or=j(()=>{if(!le)return null;let e=[];for(let t=0;t<R.length;t+=1){let o=R[t],g=o.footerColSpan&&o.footerColSpan>1?Math.min(o.footerColSpan,R.length-t):1;e.push(f(Re,{align:o.align||"left",colSpan:g>1?g:void 0,style:{...g>1?{}:ge(o,t,o.width),...o.style,fontWeight:"bold",padding:H?"0 14px":"16px"},children:o.footer?o.footer(r):null},String(o.id))),t+=g-1}return f(lt,{children:e})},[le,R,r,H,ge]),Jt=ce(()=>({Scroller:Oe?kr:$n,Table:e=>f(Qo,{...e,sx:{borderCollapse:"separate",tableLayout:dt,...oe?{width:"var(--vdt-tw, 100%)",minWidth:`var(--vdt-tmin, ${vt??0}px)`}:vt&&!re?{minWidth:vt}:{},marginRight:pe?"16px":0,...le?{height:"100%"}:{}}}),TableHead:ct((e,t)=>f(ea,{...e,ref:t,sx:{userSelect:"none","& > tr":{height:ve,"& > th":{padding:"16px",position:"sticky",top:0,zIndex:2,fontWeight:"bold"}}}})),TableRow:e=>{let{item:t,selected:o,"aria-selected":g,className:h,...n}=e,u=n["data-index"]??0,N=u%2===1,C=t&&Ge.current?Ge.current(t,u):u,F=!ft&&b!==null&&b!==void 0&&C===b,Q=F&&fe?typeof fe=="function"?fe(t,u):fe:void 0,me=String(h??"").split(/\s+/).filter(L=>L!=="Mui-selected"&&L!=="Mui-focusVisible").join(" ");return f(lt,{...n,"data-row-id":C!=null?String(C):void 0,className:me||void 0,selected:F,onMouseDown:L=>{Qe.current=!1,Le.current={x:L.clientX,y:L.clientY}},onContextMenu:L=>{t&&Xt.current&&Xt.current(t,u,L)},onClick:L=>{let G=L.clientX-Le.current.x,ee=L.clientY-Le.current.y;if(Math.sqrt(G*G+ee*ee)>mn||Qe.current){L.preventDefault(),L.stopPropagation(),Qe.current=!1;return}t&&$t.current&&$t.current(t,u),Qe.current=!1},sx:[{userSelect:"none",...Nt?{"& > td":{height:Ye}}:{height:Ye,maxHeight:Ye},boxSizing:"border-box",backgroundColor:N&&_t?_t:"transparent","& td:not([data-vdt-pad])":{padding:"8px 16px"},"& td":{boxSizing:"border-box",borderBottom:$?"1px solid rgba(224, 224, 224, 1)":"none"},"& th":{padding:"8px 16px",borderBottom:"none"},"&:hover":Ct&&!F?{backgroundColor:L=>{let G=L.palette.mode==="dark",te=zt??"#000000",Me=Wn??.06;if(!zt)return G?`rgba(255, 255, 255, ${Me})`:`rgba(0, 0, 0, ${Me})`;let he=te.replace("#","").trim();if(he.length!==6)return te;let ne=parseInt(he.substring(0,2),16),be=parseInt(he.substring(2,4),16),nt=parseInt(he.substring(4,6),16);return`rgba(${ne}, ${be}, ${nt}, ${Me})`}}:void 0,cursor:Ct?"pointer":void 0},Q]})},TableBody:ct((e,t)=>{let{children:o,...g}=e;return Y(Sr,{...g,ref:t,sx:le?{height:"100%"}:void 0,children:[o,le&&f("tr",{"aria-hidden":!0,style:{height:"100%"},children:f("td",{colSpan:R.length,style:{padding:0,border:0}})})]})}),TableFoot:ct((e,t)=>f(ta,{...e,ref:t,sx:[{"& tr":{height:ae??ie,maxHeight:ae??ie,boxSizing:"border-box"},"& td":{height:ae??ie,boxSizing:"border-box",backgroundColor:o=>o.palette.mode==="dark"?"#1e1e1e":"#ffffff",padding:"0 16px",color:"inherit",fontSize:"0.875rem",border:"none",boxShadow:`inset 0 1px 0 0 ${H?k.borderStrong:"#000000"}`}},...Array.isArray(Te)?Te:Te?[Te]:[]]}))}),[Ct,ft?null:b,fe,ie,_t,$,ve,zt,Wn,$n,ae,Te,le,H,k,R,dt,pe,Nt,vt,re,Oe,oe]);qn.current=Jt.TableRow;let no=Jt,tt=Jt,ro=tt.Table,oo=tt.TableHead,ao=tt.TableBody,io=tt.TableRow,lo=tt.TableFoot,se=Je?R.find(e=>String(e.id)===Je.colId):void 0,so=()=>jn(null),ar=null;if(Je&&se){let e=String(se.id),t=!!((se.sortMenu??se.sortable)&&B),o=We(se),g=S===e?_:void 0;ar=f(fn,{open:!0,anchorPosition:{left:Je.x,top:Je.y},onClose:so,sort:t?{active:g??null,clearable:!!Z,onChange:h=>{h?B?.(e,h):Z?.()}}:void 0,filter:o?{options:se.filterOptions??[],value:se.filterValues??[],onChange:h=>se.onFilterChange?.(h),multiple:se.filterMultiple!==!1,emptyLabel:se.filterEmptyLabel,searchable:se.filterSearchable}:void 0})}let ir=Y(V,{ref:e=>{Yt.current=e,kn.current=e,Fn.current=e},style:eo??void 0,sx:{position:"relative",height:Ee?"auto":"100%",width:"100%",...Ce.on?{"& .vdt-reorder-handle":{display:"inline-flex",alignItems:"center",justifyContent:"center",width:28,height:28,padding:0,border:0,borderRadius:"4px",background:"none",color:H?k.headerColor:xe.palette.text.secondary,cursor:"grab",touchAction:"none","&:hover":{color:xe.palette.text.primary,backgroundColor:H?k.hoverBg:"rgba(0,0,0,.06)"},"&:disabled":{opacity:.35,cursor:"not-allowed"},'&[aria-pressed="true"]':{color:H?k.selectedBar:xe.palette.primary.main,backgroundColor:H?k.selectedBg:"rgba(0,0,0,.06)"}},"& thead tr[data-vdt-pinned-row] .vdt-reorder-handle":{visibility:"hidden"},"& tbody tr[data-vdt-dragging] > td":{opacity:.45},"& [data-vdt-drop-indicator]":{backgroundColor:H?k.selectedBar:xe.palette.primary.main}}:{},...Pe.on?{"& thead th[data-vdt-colkey]":{WebkitTouchCallout:"none"},"& thead th[data-vdt-col-dragging]":{opacity:.45},"& [data-vdt-col-drop-indicator]":{backgroundColor:H?k.selectedBar:xe.palette.primary.main},"&[data-vdt-col-reordering], &[data-vdt-col-reordering] *":{cursor:"grabbing !important"}}:{},"& .MuiTableHead-root":{backgroundColor:e=>H?`${k.bg} !important`:e.palette.mode==="dark"?"#1e1e1e !important":"#ffffff !important"},...qr??{},...oe?{"& 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:H?k.selectedBar:xe.palette.primary.main,opacity:0,transition:"opacity 0.12s ease"},"&:hover::after, &[data-active]::after":{opacity:1}}}:{},"& tbody td[data-vdt-pinned]":{backgroundColor:H?k.bg:xe.palette.background.paper},"& tbody td[data-vdt-cell-click]":{cursor:"pointer"},"& tbody td[data-vdt-cell-click]:hover":{backgroundColor:H?k.hoverBg:xe.palette.mode==="dark"?"rgba(255, 255, 255, 0.06)":"rgba(0, 0, 0, 0.04)"},...H&&Ct?{"& tbody tr:hover td[data-vdt-pinned]":{backgroundColor:k.hoverBg}}:{},...H?{...pe?{border:`1px solid ${k.borderStrong}`,borderRadius:"4px"}:{"& table":{backgroundColor:k.bg}},overflow:"hidden","& thead tr th > *":{verticalAlign:"middle"},"& thead > tr > th":{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},"& thead > tr > th > *":{maxWidth:"100%"},"& thead tr th":{height:ve,boxSizing:"border-box",padding:"0 14px !important",fontSize:13,fontWeight:"500 !important",color:k.headerColor,backgroundColor:`${k.bg} !important`,borderTop:!pe&&At?`1px solid ${k.borderStrong}`:"none",borderBottom:`1px solid ${k.borderStrong}`,borderRight:`1px solid ${k.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 ${k.border}`},...r.length>0&&(Ee&&pe||Zr||le)?{[`& tbody tr[data-index="${r.length-1}"]:not([data-vdt-pinned-row]) td`]:{borderBottom:"none"}}:{}}:{},...zr},children:[Ce.indicator,Pe.indicator,M?f(V,{sx:{overflowX:"auto",width:"100%","& > .MuiTable-root":{marginRight:0}},children:Y(ro,{children:[re?null:f(oo,{children:rr()}),f(ao,{children:r.map((e,t)=>f(io,{item:e,"data-index":t,children:Tt(t,e)},y?String(y(e,t)):t))}),le&&!re?f(lo,{children:or()}):null]})}):ut===null?null:f(ia,{ref:Wt,data:r,totalCount:X?r.length+1:r.length,defaultItemHeight:Ye,fixedItemHeight:Nt?void 0:Ye,fixedHeaderContent:re?void 0:rr,fixedFooterContent:le&&!re?or:void 0,itemContent:Tt,...Ar&&y?{computeItemKey:(e,t)=>t?y(t,e):`vdt-${e}`}:{},endReached:to,scrollerRef:e=>{mt.current=e instanceof HTMLElement?e:null,ht()},totalListHeightChanged:ht,style:Oe?void 0:{height:"100%"},...Oe?{customScrollParent:ut}:{},increaseViewportBy:{top:Fr,bottom:Vr},overscan:Xr,...d&&r.length>0?{initialItemCount:Math.min(d,r.length)}:{},followOutput:!1,components:no},jr),r.length===0&&!a&&!Hn&&H&&typeof m=="string"&&f(V,{sx:{position:Ee?"static":"absolute",top:re?0:ve,left:0,right:0,py:6,px:2,textAlign:"center",fontSize:14,color:k.emptyColor,pointerEvents:"none"},children:m}),r.length===0&&!a&&!Hn&&!(H&&typeof m=="string")&&f(V,{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 m=="string"?Y(st,{children:[f(V,{sx:{width:48,height:48,display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"50%",backgroundColor:"#f5f5f5",color:"#999"},children:"\u{1F4C4}"}),f(ra,{variant:"body1",sx:{color:"text.secondary"},children:m})]}):m}),ar,Gr&&f(st,{children:K?f(K,{visible:a,onComplete:gt}):yn?Go.createElement(yn,{visible:!!a,onComplete:gt,fallback:f(ln,{visible:a,onComplete:gt,size:40,indicator:f(sn,{}),sx:{top:`${R.some(e=>e.group)?ve*2:ve}px`,bottom:`${le?ae??ie:0}px`},background:{show:r.length===0,opacity:.8}})}):f(ln,{visible:a,onComplete:gt,size:40,indicator:f(sn,{}),sx:{top:`${R.some(e=>e.group)?ve*2:ve}px`,bottom:`${le?ae??ie:0}px`},background:{show:r.length===0,opacity:.8}})})]}),lr=H&&pe?{paddingRight:pt,paddingTop:Hr,paddingBottom:Hr}:{};return J?f(na,{className:"grow",elevation:1,sx:{padding:0,paddingLeft:pt,...lr,boxSizing:"border-box",height:Ee?"auto":"100%",minHeight:0,flex:Ee?"none":1,display:"flex",flexDirection:"column"},children:ir}):f(V,{className:"grow",style:{padding:0,paddingLeft:pt,...lr,boxSizing:"border-box",height:Ee?"auto":"100%",minHeight:0,flex:Ee?"none":1,display:"flex",flexDirection:"column"},children:ir})}var yn=null;function ga(r){yn=r}var ma=Zo(fa);export{cn as HEADER_MENU_FONT_SIZE,ye as HEADER_MENU_ICON_PATHS,dn as HEADER_MENU_ICON_SIZE,un as HEADER_MENU_ITEM_HEIGHT,Tr as HEADER_MENU_ITEM_SX,pn as HeaderFilterIcon,fn as HeaderMenu,Ht as HeaderMenuDivider,Ve as HeaderMenuIcon,we as HeaderMenuItem,hn as NOTION_LINE_COLOR,bn as NOTION_LINE_COLOR_DARK,ma as VirtualDataTable,tn as getMuiVirtualDataTableLocale,Yo as headerMenuAnchor,Co as setMuiVirtualDataTableLocale,ga as setVirtualDataTableLoadingGate};
|
|
5
5
|
/**
|
|
6
6
|
* Virtual Data Table - A high-performance virtual data table component for React
|
|
7
7
|
*
|