@ehfuse/mui-virtual-data-table 1.1.6 → 1.1.8

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/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";var Ue=Object.defineProperty;var rt=Object.getOwnPropertyDescriptor;var nt=Object.getOwnPropertyNames;var ot=Object.prototype.hasOwnProperty;var it=(l,p)=>{for(var g in p)Ue(l,g,{get:p[g],enumerable:!0})},lt=(l,p,g,b)=>{if(p&&typeof p=="object"||typeof p=="function")for(let h of nt(p))!ot.call(l,h)&&h!==g&&Ue(l,h,{get:()=>p[h],enumerable:!(b=rt(p,h))||b.enumerable});return l};var at=l=>lt(Ue({},"__esModule",{value:!0}),l);var yt={};it(yt,{VirtualDataTable:()=>et});module.exports=at(yt);var i=require("react"),Ze=require("react-dom"),f=require("@mui/material"),Qe=require("react-virtuoso");var Ae=require("react/jsx-runtime"),we=require("react"),We=require("@mui/material"),Be=function(){return Be=Object.assign||function(p){for(var g,b=1,h=arguments.length;b<h;b++){g=arguments[b];for(var $ in g)Object.prototype.hasOwnProperty.call(g,$)&&(p[$]=g[$])}return p},Be.apply(this,arguments)};function Xe(l){var p=l.visible,g=l.onComplete,b=l.fadeoutDuration,h=b===void 0?200:b,$=l.exitDelay,y=$===void 0?0:$,j=l.size,E=j===void 0?40:j,Y=l.className,ee=l.style,A=l.sx,q=l.indicator,H=l.background,V=H===void 0?{show:!0,color:"255, 255, 255",opacity:.9}:H,ue=(0,we.useRef)(void 0),u=(0,we.useRef)(null),F=(0,we.useState)(p),de=F[0],ge=F[1],B=V.show,be=B===void 0?!0:B,L=V.color,I=L===void 0?"255, 255, 255":L,pe=V.opacity,te=pe===void 0?.9:pe;if((0,we.useEffect)(function(){var ie=ue.current;if(ie===!0&&p===!1&&u.current){var W=u.current;W.style.opacity="0",setTimeout(function(){ge(!1),g?.()},h+y)}else p===!0&&(ge(!0),u.current&&(u.current.style.opacity="1"));ue.current=p},[p,g,h,y]),!de)return null;var Se=function(){return typeof q=="string"?(0,Ae.jsx)("img",{src:q,alt:"Loading",style:{width:E,height:E}}):q||(0,Ae.jsx)(We.CircularProgress,{size:E})},fe=function(){return be?I.startsWith("rgba")?{backgroundColor:I}:/^\d+,\s*\d+,\s*\d+$/.test(I)?{backgroundColor:"rgba(".concat(I,", ").concat(te,")")}:te!==1?{backgroundColor:I,"&::before":{content:'""',position:"absolute",top:0,left:0,right:0,bottom:0,backgroundColor:I,opacity:te,zIndex:-1}}:{backgroundColor:I}:{backgroundColor:"transparent"}};return(0,Ae.jsx)(We.Box,{ref:u,className:Y,style:Be({},ee),sx:Be(Be({position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e3,opacity:p?1:0,transition:"opacity ".concat(h,"ms ease-out")},fe()),A),children:Se()})}var r=require("react"),oe=require("react/jsx-runtime"),st=["editor","textarea","input","select","textfield","form-control","contenteditable","MuiInputBase-input","MuiSelect-select","MuiOutlinedInput-input","MuiFilledInput-input","MuiInput-input","MuiFormControl-root","MuiTextField-root","MuiSelect-root","MuiOutlinedInput-root","MuiFilledInput-root","MuiInput-root","MuiAutocomplete-input","MuiDatePicker-input","MuiSlider-thumb","MuiSlider-rail","MuiSlider-track","MuiSlider-mark","MuiSlider-markLabel","MuiSlider-root","MuiSlider-colorPrimary","MuiSlider-sizeMedium","MuiIconButton-root","MuiButton-root","MuiButtonBase-root","MuiTouchRipple-root","MuiCheckbox-root","MuiRadio-root","MuiSwitch-root","PrivateSwitchBase-root","ant-input","ant-input-affix-wrapper","ant-input-group-addon","ant-input-number","ant-input-number-handler","ant-select","ant-select-selector","ant-select-selection-search","ant-select-dropdown","ant-cascader","ant-cascader-input","ant-picker","ant-picker-input","ant-time-picker","ant-calendar-picker","ant-slider","ant-slider-track","ant-slider-handle","ant-switch","ant-checkbox","ant-checkbox-wrapper","ant-radio","ant-radio-wrapper","ant-rate","ant-upload","ant-upload-drag","ant-form-item","ant-form-item-control","ant-btn","ant-dropdown","ant-dropdown-trigger","ant-menu","ant-menu-item","ant-tooltip","ant-popover","ant-modal","ant-drawer","ant-tree-select","ant-auto-complete","ant-mentions","ant-transfer","ui-input","ui-textarea","ui-select","ui-select-trigger","ui-select-content","ui-select-item","ui-button","ui-checkbox","ui-radio-group","ui-switch","ui-slider","ui-range-slider","ui-calendar","ui-date-picker","ui-combobox","ui-command","ui-command-input","ui-popover","ui-dialog","ui-sheet","ui-dropdown-menu","ui-context-menu","ui-menubar","ui-navigation-menu","ui-form","ui-form-control","ui-form-item","ui-form-field","ui-label","radix-ui","radix-select","radix-dropdown","radix-dialog","radix-popover","radix-accordion","radix-tabs","radix-slider","radix-switch","radix-checkbox","radix-radio","ql-editor","ql-container","ql-toolbar","ql-picker","ql-picker-label","ql-picker-options","ql-formats","ql-snow","ql-bubble","quill","quilleditor","monaco-editor","monaco-editor-background","view-lines","decorationsOverviewRuler","monaco-scrollable-element","CodeMirror","CodeMirror-code","CodeMirror-lines","CodeMirror-scroll","CodeMirror-sizer","cm-editor","cm-focused","cm-content","tox-editor-container","tox-editor-header","tox-edit-area","tox-tinymce","mce-content-body","ck-editor","ck-content","ck-toolbar","ck-editor__editable","ck-widget","slate-editor","slate-content","DraftEditor-root","DraftEditor-editorContainer","public-DraftEditor-content","ehfuse-editor","ehfuse-editor-wrapper","ehfuse-editor-content","ehfuse-toolbar","ehfuse-toolbar-group","ehfuse-cursor","text-editor","rich-text-editor","wysiwyg","ace_editor","ace_content"],Ke=(l,p)=>{let g=l.tagName.toLowerCase(),b=["text","password","email","number","search","tel","url","checkbox","radio"];if(g==="input"){let h=l.type;return b.includes(h)}if(["textarea","select","button"].includes(g)||["svg","path","circle","rect","line","polygon","polyline"].includes(g)||l.getAttribute("contenteditable")==="true")return!0;if(p?.excludeSelectors){for(let h of p.excludeSelectors)if(l.matches(h))return!0}return ct(l,p)},ct=(l,p)=>{let g=[...st,...p?.excludeClasses||[]],b=l,h=0,$=5;for(;b&&h<=$;){if(g.some(y=>b.classList.contains(y)))return!0;if(b.classList.contains("MuiDialogContent-root"))break;b=b.parentElement,h++}return!1},ut={},dt={},pt={},ft={},mt={},ht=(0,r.forwardRef)(({className:l="",style:p={},containerStyle:g={},contentStyle:b={},children:h,onScroll:$,thumb:y=ut,track:j=dt,arrows:E=pt,dragScroll:Y=ft,autoHide:ee=mt,showScrollbar:A=!0,detectInnerScroll:q=!1},H)=>{let V=(0,r.useRef)({});(0,r.useEffect)(()=>{V.current={children:h,onScroll:$,showScrollbar:A,thumb:y,track:j,arrows:E,dragScroll:Y,autoHide:ee}});let ue=(0,r.useRef)(null),u=(0,r.useRef)(null),F=(0,r.useRef)(null),de=(0,r.useRef)(null),ge=(0,r.useRef)(null),B=(0,r.useRef)(null),[be,L]=(0,r.useState)(!1),[I,pe]=(0,r.useState)(!1),[te,Se]=(0,r.useState)(!1),[fe,ie]=(0,r.useState)({y:0,scrollTop:0}),[W,Pe]=(0,r.useState)(0),[Ye,Re]=(0,r.useState)(0),[Ce,Ne]=(0,r.useState)(!1),[ke,Le]=(0,r.useState)(!1),[me,X]=(0,r.useState)({x:0,y:0,scrollTop:0,scrollLeft:0}),[ye,qe]=(0,r.useState)(null),[ve,xe]=(0,r.useState)(null),[He,De]=(0,r.useState)(!1),le=(0,r.useRef)(null),[Ve,je]=(0,r.useState)(!1),ae=(0,r.useRef)(null),se=(0,r.useRef)(null),_=(0,r.useRef)(null),P=(0,r.useMemo)(()=>{let t=y.color??"#606060";return{width:y.width??8,minHeight:y.minHeight??50,radius:y.radius??(y.width??8)/2,color:t,opacity:y.opacity??.6,hoverColor:y.hoverColor??t,hoverOpacity:y.hoverOpacity??1}},[y]),T=(0,r.useMemo)(()=>({width:j.width??16,color:j.color??"rgba(128, 128, 128, 0.1)",visible:j.visible??!0,alignment:j.alignment??"center",radius:j.radius??P.radius??4,margin:j.margin??4}),[j,P.radius]),G=(0,r.useMemo)(()=>{let t=E.color??"#808080";return{visible:E.visible??!1,step:E.step??50,color:t,opacity:E.opacity??.6,hoverColor:E.hoverColor??t,hoverOpacity:E.hoverOpacity??1}},[E]),Ie=(0,r.useMemo)(()=>({enabled:Y.enabled??!0,excludeClasses:Y.excludeClasses??[],excludeSelectors:Y.excludeSelectors??[]}),[Y]),M=(0,r.useMemo)(()=>({enabled:ee.enabled??!0,delay:ee.delay??1500,delayOnWheel:ee.delayOnWheel??700}),[ee]),D=P.width,a=T.width,s=P.minHeight,v=G.visible,S=G.step,O=(0,r.useCallback)(()=>{if(!u.current)return;let t=document.activeElement;t&&u.current.contains(t)&&t!==u.current||u.current.focus()},[]);(0,r.useImperativeHandle)(H,()=>({getScrollContainer:()=>u.current,scrollTo:t=>{u.current&&u.current.scrollTo(t)},get scrollTop(){return u.current?.scrollTop||0},get scrollHeight(){return u.current?.scrollHeight||0},get clientHeight(){return u.current?.clientHeight||0}}),[]);let e=(0,r.useCallback)(()=>{if(B.current){let o=B.current;if(document.contains(o)&&o.scrollHeight>o.clientHeight+2)return o;B.current=null}if(!u.current)return null;if(F.current&&F.current.scrollHeight>u.current.clientHeight+2)return B.current=u.current,u.current;if(!q)return null;let t=u.current.querySelectorAll('[data-virtuoso-scroller], [style*="overflow"], .virtuoso-scroller, [style*="overflow: auto"], [style*="overflow:auto"]');for(let o of t){let n=o;if(n!==u.current&&n.classList.contains("overlay-scrollbar-container"))continue;let d=n.parentElement,m=!1;for(;d&&d!==u.current;){if(d.classList.contains("overlay-scrollbar-container")&&d!==u.current){m=!0;break}d=d.parentElement}if(!m&&n.scrollHeight>n.clientHeight+2)return B.current=n,n}return null},[]),z=(0,r.useCallback)(()=>e()!==null,[e]),C=(0,r.useCallback)(()=>{ae.current&&(clearTimeout(ae.current),ae.current=null)},[]),Fe=(0,r.useCallback)(()=>{se.current&&(clearTimeout(se.current),se.current=null)},[]),U=(0,r.useCallback)(()=>{_.current&&(clearTimeout(_.current),_.current=null)},[]),w=(0,r.useCallback)(t=>{M.enabled&&(C(),ae.current=setTimeout(()=>{L(!1),ae.current=null},t))},[C,M.enabled]),x=(0,r.useCallback)(()=>{let t=e();if(!t){L(!1),Ne(!1),C();return}if(Ne(!0),!de.current)return;M.enabled||(L(!0),C());let o=t.clientHeight,n=t.scrollHeight,d=t.scrollTop,m=0;if(ue.current){let ze=window.getComputedStyle(ue.current),Ge=parseFloat(ze.paddingTop)||0,tt=parseFloat(ze.paddingBottom)||0;m=Ge+tt}let k=v?D*2+T.margin*4:T.margin*2,R=o-k+m,N=o/n,Me=Math.max(R*N,s),Oe=n-o,Q=R-Me,_e=Oe>0?d/Oe*Q:0;Pe(Me),Re(_e)},[e,C,v,D,s,M.enabled]),Ee=(0,r.useCallback)(t=>{t.preventDefault(),t.stopPropagation();let o=e();o&&(pe(!0),ie({y:t.clientY,scrollTop:o.scrollTop}),C(),L(!0),O())},[e,C,O]),$e=(0,r.useCallback)(t=>{if(!I)return;let o=e();if(!o)return;let n=o.clientHeight,d=o.scrollHeight-n,m=t.clientY-fe.y,k=n-W,R=m/k*d,N=Math.max(0,Math.min(d,fe.scrollTop+R));o.scrollTop=N,x()},[I,fe,W,x,e]),Te=(0,r.useCallback)(()=>{pe(!1),z()&&w(M.delay)},[z,w,M.delay]),re=(0,r.useCallback)(t=>{if(!de.current)return;let o=de.current.getBoundingClientRect(),n=t.clientY-o.top,d=e();if(!d)return;let m=d.clientHeight,k=d.scrollHeight,R=n/m*(k-m);d.scrollTop=Math.max(0,Math.min(k-m,R)),x(),L(!0),w(M.delay),O()},[x,w,M.delay,e,O]),K=(0,r.useCallback)(t=>{if(t.preventDefault(),t.stopPropagation(),!u.current)return;let o=Math.max(0,u.current.scrollTop-S);u.current.scrollTop=o,x(),L(!0),w(M.delay),O()},[x,w,S,M.delay,O]),J=(0,r.useCallback)(t=>{if(t.preventDefault(),t.stopPropagation(),!u.current||!F.current)return;let o=u.current,n=F.current.scrollHeight-o.clientHeight,d=Math.min(n,o.scrollTop+S);o.scrollTop=d,x(),L(!0),w(M.delay),O()},[x,w,S,M.delay,O]),he=(0,r.useCallback)(t=>{if(!Ie.enabled)return;let o=t.target;if(Ke(o,Ie)||t.button!==0)return;let n=e();n&&(n.scrollHeight<=n.clientHeight||(t.preventDefault(),Le(!0),X({x:t.clientX,y:t.clientY,scrollTop:n.scrollTop,scrollLeft:n.scrollLeft||0}),C()))},[Ie,Ke,e,C]),ce=(0,r.useCallback)(t=>{if(!ke)return;let o=e();if(!o)return;let n=me.x-t.clientX,d=me.y-t.clientY;if(Math.abs(d)<3&&Math.abs(n)<3)return;L(!0);let m=Math.max(0,Math.min(o.scrollHeight-o.clientHeight,me.scrollTop+d));o.scrollTop=m,x()},[ke,me,e,x]),ne=(0,r.useCallback)(()=>{Le(!1),z()&&w(M.delay)},[z,w,M.delay]);(0,r.useEffect)(()=>{let t=k=>{x(),C(),L(!0);let R=Ve?M.delayOnWheel:M.delay;w(R),$&&$(k)},o=()=>{je(!0),le.current&&clearTimeout(le.current),le.current=setTimeout(()=>{je(!1)},300),C(),U(),_.current=setTimeout(()=>{L(!0),_.current=null},50)},n=[],d=e();d&&n.push(d);let m=u.current;return m&&!d&&(n.push(m),m.querySelectorAll('[data-virtuoso-scroller], [style*="overflow"], .virtuoso-scroller, [style*="overflow: auto"], [style*="overflow:auto"]').forEach(k=>{let R=k;if(R!==m&&R.classList.contains("overlay-scrollbar-container"))return;let N=R.parentElement;for(;N&&N!==m;){if(N.classList.contains("overlay-scrollbar-container")&&N!==m)return;N=N.parentElement}n.push(R)})),n.forEach(k=>{k.addEventListener("scroll",t,{passive:!0}),k.addEventListener("wheel",o,{passive:!0})}),()=>{n.forEach(k=>{k.removeEventListener("scroll",t),k.removeEventListener("wheel",o)}),le.current&&clearTimeout(le.current),_.current&&clearTimeout(_.current)}},[e,x,$,C,w,M,Ve]),(0,r.useEffect)(()=>{let t=n=>{let d=e();if(!d)return;let{key:m}=n,{scrollTop:k,scrollHeight:R,clientHeight:N}=d,Me=R-N,Oe=50,Q=null;switch(m){case"ArrowUp":n.preventDefault(),Q=Math.max(0,k-Oe);break;case"ArrowDown":n.preventDefault(),Q=Math.min(Me,k+Oe);break;case"PageUp":n.preventDefault(),Q=Math.max(0,k-N);break;case"PageDown":n.preventDefault(),Q=Math.min(Me,k+N);break;case"Home":n.preventDefault(),Q=0;break;case"End":n.preventDefault(),Q=Me;break;default:return}if(Q!==null){let _e=Q/Me,ze=v?D*2+T.margin*4:T.margin*2,Ge=(N-ze-W)*_e;Re(Ge),d.scrollTop=Q,C(),L(!0),w(M.delay)}},o=u.current;if(o)return o.addEventListener("keydown",t),()=>{o.removeEventListener("keydown",t)}},[e,v,D,T.margin,W,C,w,M.delay]),(0,r.useEffect)(()=>{if(ke)return document.addEventListener("mousemove",ce),document.addEventListener("mouseup",ne),()=>{document.removeEventListener("mousemove",ce),document.removeEventListener("mouseup",ne)}},[ke,ce,ne]),(0,r.useEffect)(()=>{if(I)return document.addEventListener("mousemove",$e),document.addEventListener("mouseup",Te),()=>{document.removeEventListener("mousemove",$e),document.removeEventListener("mouseup",Te)}},[I,$e,Te]),(0,r.useEffect)(()=>{x();let t=setTimeout(()=>{x()},100);return()=>clearTimeout(t)},[x]),(0,r.useLayoutEffect)(()=>{De(!0),x(),!M.enabled&&z()&&L(!0)},[z,x,M.enabled]),(0,r.useEffect)(()=>{let t=new ResizeObserver(()=>{x()}),o=[];return u.current&&o.push(u.current),F.current&&o.push(F.current),B.current&&document.contains(B.current)&&o.push(B.current),o.forEach(n=>{t.observe(n)}),()=>t.disconnect()},[x]),(0,r.useEffect)(()=>{if(!u.current)return;let t=new MutationObserver(()=>{B.current=null,x()});return t.observe(u.current,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["style"]}),()=>t.disconnect()},[x]);let Z=Math.max(a,D);return(0,r.useEffect)(()=>{let t="overlay-scrollbar-webkit-hide",o=document.getElementById(t);o&&o.remove();let n=document.createElement("style");return n.id=t,n.textContent=`
1
+ "use strict";var Ge=Object.defineProperty;var tt=Object.getOwnPropertyDescriptor;var rt=Object.getOwnPropertyNames;var ot=Object.prototype.hasOwnProperty;var nt=(l,d)=>{for(var g in d)Ge(l,g,{get:d[g],enumerable:!0})},it=(l,d,g,y)=>{if(d&&typeof d=="object"||typeof d=="function")for(let v of rt(d))!ot.call(l,v)&&v!==g&&Ge(l,v,{get:()=>d[v],enumerable:!(y=tt(d,v))||y.enumerable});return l};var lt=l=>it(Ge({},"__esModule",{value:!0}),l);var bt={};nt(bt,{VirtualDataTable:()=>Ze});module.exports=lt(bt);var c=require("react"),f=require("@mui/material"),Je=require("react-virtuoso");var je=require("react/jsx-runtime"),ke=require("react"),ze=require("@mui/material"),Oe=function(){return Oe=Object.assign||function(d){for(var g,y=1,v=arguments.length;y<v;y++){g=arguments[y];for(var D in g)Object.prototype.hasOwnProperty.call(g,D)&&(d[D]=g[D])}return d},Oe.apply(this,arguments)};function Ue(l){var d=l.visible,g=l.onComplete,y=l.fadeoutDuration,v=y===void 0?200:y,D=l.exitDelay,M=D===void 0?0:D,j=l.size,E=j===void 0?40:j,W=l.className,Q=l.style,z=l.sx,V=l.indicator,H=l.background,F=H===void 0?{show:!0,color:"255, 255, 255",opacity:.9}:H,ue=(0,ke.useRef)(void 0),u=(0,ke.useRef)(null),_=(0,ke.useState)(d),de=_[0],ge=_[1],$=F.show,be=$===void 0?!0:$,S=F.color,I=S===void 0?"255, 255, 255":S,pe=F.opacity,ee=pe===void 0?.9:pe;if((0,ke.useEffect)(function(){var Ie=ue.current;if(Ie===!0&&d===!1&&u.current){var ne=u.current;ne.style.opacity="0",setTimeout(function(){ge(!1),g?.()},v+M)}else d===!0&&(ge(!0),u.current&&(u.current.style.opacity="1"));ue.current=d},[d,g,v,M]),!de)return null;var Le=function(){return typeof V=="string"?(0,je.jsx)("img",{src:V,alt:"Loading",style:{width:E,height:E}}):V||(0,je.jsx)(ze.CircularProgress,{size:E})},fe=function(){return be?I.startsWith("rgba")?{backgroundColor:I}:/^\d+,\s*\d+,\s*\d+$/.test(I)?{backgroundColor:"rgba(".concat(I,", ").concat(ee,")")}:ee!==1?{backgroundColor:I,"&::before":{content:'""',position:"absolute",top:0,left:0,right:0,bottom:0,backgroundColor:I,opacity:ee,zIndex:-1}}:{backgroundColor:I}:{backgroundColor:"transparent"}};return(0,je.jsx)(ze.Box,{ref:u,className:W,style:Oe({},Q),sx:Oe(Oe({position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e3,opacity:d?1:0,transition:"opacity ".concat(v,"ms ease-out")},fe()),z),children:Le()})}var r=require("react"),oe=require("react/jsx-runtime"),at=["editor","textarea","input","select","textfield","form-control","contenteditable","MuiInputBase-input","MuiSelect-select","MuiOutlinedInput-input","MuiFilledInput-input","MuiInput-input","MuiFormControl-root","MuiTextField-root","MuiSelect-root","MuiOutlinedInput-root","MuiFilledInput-root","MuiInput-root","MuiAutocomplete-input","MuiDatePicker-input","MuiSlider-thumb","MuiSlider-rail","MuiSlider-track","MuiSlider-mark","MuiSlider-markLabel","MuiSlider-root","MuiSlider-colorPrimary","MuiSlider-sizeMedium","MuiIconButton-root","MuiButton-root","MuiButtonBase-root","MuiTouchRipple-root","MuiCheckbox-root","MuiRadio-root","MuiSwitch-root","PrivateSwitchBase-root","ant-input","ant-input-affix-wrapper","ant-input-group-addon","ant-input-number","ant-input-number-handler","ant-select","ant-select-selector","ant-select-selection-search","ant-select-dropdown","ant-cascader","ant-cascader-input","ant-picker","ant-picker-input","ant-time-picker","ant-calendar-picker","ant-slider","ant-slider-track","ant-slider-handle","ant-switch","ant-checkbox","ant-checkbox-wrapper","ant-radio","ant-radio-wrapper","ant-rate","ant-upload","ant-upload-drag","ant-form-item","ant-form-item-control","ant-btn","ant-dropdown","ant-dropdown-trigger","ant-menu","ant-menu-item","ant-tooltip","ant-popover","ant-modal","ant-drawer","ant-tree-select","ant-auto-complete","ant-mentions","ant-transfer","ui-input","ui-textarea","ui-select","ui-select-trigger","ui-select-content","ui-select-item","ui-button","ui-checkbox","ui-radio-group","ui-switch","ui-slider","ui-range-slider","ui-calendar","ui-date-picker","ui-combobox","ui-command","ui-command-input","ui-popover","ui-dialog","ui-sheet","ui-dropdown-menu","ui-context-menu","ui-menubar","ui-navigation-menu","ui-form","ui-form-control","ui-form-item","ui-form-field","ui-label","radix-ui","radix-select","radix-dropdown","radix-dialog","radix-popover","radix-accordion","radix-tabs","radix-slider","radix-switch","radix-checkbox","radix-radio","ql-editor","ql-container","ql-toolbar","ql-picker","ql-picker-label","ql-picker-options","ql-formats","ql-snow","ql-bubble","quill","quilleditor","monaco-editor","monaco-editor-background","view-lines","decorationsOverviewRuler","monaco-scrollable-element","CodeMirror","CodeMirror-code","CodeMirror-lines","CodeMirror-scroll","CodeMirror-sizer","cm-editor","cm-focused","cm-content","tox-editor-container","tox-editor-header","tox-edit-area","tox-tinymce","mce-content-body","ck-editor","ck-content","ck-toolbar","ck-editor__editable","ck-widget","slate-editor","slate-content","DraftEditor-root","DraftEditor-editorContainer","public-DraftEditor-content","ehfuse-editor","ehfuse-editor-wrapper","ehfuse-editor-content","ehfuse-toolbar","ehfuse-toolbar-group","ehfuse-cursor","text-editor","rich-text-editor","wysiwyg","ace_editor","ace_content"],Xe=(l,d)=>{let g=l.tagName.toLowerCase(),y=["text","password","email","number","search","tel","url","checkbox","radio"];if(g==="input"){let v=l.type;return y.includes(v)}if(["textarea","select","button"].includes(g)||["svg","path","circle","rect","line","polygon","polyline"].includes(g)||l.getAttribute("contenteditable")==="true")return!0;if(d?.excludeSelectors){for(let v of d.excludeSelectors)if(l.matches(v))return!0}return st(l,d)},st=(l,d)=>{let g=[...at,...d?.excludeClasses||[]],y=l,v=0,D=5;for(;y&&v<=D;){if(g.some(M=>y.classList.contains(M)))return!0;if(y.classList.contains("MuiDialogContent-root"))break;y=y.parentElement,v++}return!1},ct={},ut={},dt={},pt={},ft={},mt=(0,r.forwardRef)(({className:l="",style:d={},containerStyle:g={},contentStyle:y={},children:v,onScroll:D,thumb:M=ct,track:j=ut,arrows:E=dt,dragScroll:W=pt,autoHide:Q=ft,showScrollbar:z=!0,detectInnerScroll:V=!1},H)=>{let F=(0,r.useRef)({});(0,r.useEffect)(()=>{F.current={children:v,onScroll:D,showScrollbar:z,thumb:M,track:j,arrows:E,dragScroll:W,autoHide:Q}});let ue=(0,r.useRef)(null),u=(0,r.useRef)(null),_=(0,r.useRef)(null),de=(0,r.useRef)(null),ge=(0,r.useRef)(null),$=(0,r.useRef)(null),[be,S]=(0,r.useState)(!1),[I,pe]=(0,r.useState)(!1),[ee,Le]=(0,r.useState)(!1),[fe,Ie]=(0,r.useState)({y:0,scrollTop:0}),[ne,Pe]=(0,r.useState)(0),[Ae,Ye]=(0,r.useState)(0),[ye,De]=(0,r.useState)(!1),[O,ie]=(0,r.useState)(!1),[ve,Be]=(0,r.useState)({x:0,y:0,scrollTop:0,scrollLeft:0}),[qe,Re]=(0,r.useState)(null),[le,me]=(0,r.useState)(null),[Qe,We]=(0,r.useState)(!1),ae=(0,r.useRef)(null),[Ee,xe]=(0,r.useState)(!1),we=(0,r.useRef)(null),se=(0,r.useRef)(null),ce=(0,r.useRef)(null),P=(0,r.useMemo)(()=>{let e=M.color??"#606060";return{width:M.width??8,minHeight:M.minHeight??50,radius:M.radius??(M.width??8)/2,color:e,opacity:M.opacity??.6,hoverColor:M.hoverColor??e,hoverOpacity:M.hoverOpacity??1}},[M]),x=(0,r.useMemo)(()=>({width:j.width??16,color:j.color??"rgba(128, 128, 128, 0.1)",visible:j.visible??!0,alignment:j.alignment??"center",radius:j.radius??P.radius??4,margin:j.margin??4}),[j,P.radius]),A=(0,r.useMemo)(()=>{let e=E.color??"#808080";return{visible:E.visible??!1,step:E.step??50,color:e,opacity:E.opacity??.6,hoverColor:E.hoverColor??e,hoverOpacity:E.hoverOpacity??1}},[E]),n=(0,r.useMemo)(()=>({enabled:W.enabled??!0,excludeClasses:W.excludeClasses??[],excludeSelectors:W.excludeSelectors??[]}),[W]),o=(0,r.useMemo)(()=>({enabled:Q.enabled??!0,delay:Q.delay??1500,delayOnWheel:Q.delayOnWheel??700}),[Q]),p=P.width,k=x.width,G=P.minHeight,t=A.visible,U=A.step,X=(0,r.useCallback)(()=>{if(!u.current)return;let e=document.activeElement;e&&u.current.contains(e)&&e!==u.current||u.current.focus()},[]);(0,r.useImperativeHandle)(H,()=>({getScrollContainer:()=>u.current,scrollTo:e=>{u.current&&u.current.scrollTo(e)},get scrollTop(){return u.current?.scrollTop||0},get scrollHeight(){return u.current?.scrollHeight||0},get clientHeight(){return u.current?.clientHeight||0}}),[]);let b=(0,r.useCallback)(()=>{if($.current){let i=$.current;if(document.contains(i)&&i.scrollHeight>i.clientHeight+2)return i;$.current=null}if(!u.current)return null;if(_.current&&_.current.scrollHeight>u.current.clientHeight+2)return $.current=u.current,u.current;if(!V)return null;let e=u.current.querySelectorAll('[data-virtuoso-scroller], [style*="overflow"], .virtuoso-scroller, [style*="overflow: auto"], [style*="overflow:auto"]');for(let i of e){let a=i;if(a!==u.current&&a.classList.contains("overlay-scrollbar-container"))continue;let m=a.parentElement,w=!1;for(;m&&m!==u.current;){if(m.classList.contains("overlay-scrollbar-container")&&m!==u.current){w=!0;break}m=m.parentElement}if(!w&&a.scrollHeight>a.clientHeight+2)return $.current=a,a}return null},[]),te=(0,r.useCallback)(()=>b()!==null,[b]),R=(0,r.useCallback)(()=>{we.current&&(clearTimeout(we.current),we.current=null)},[]),He=(0,r.useCallback)(()=>{se.current&&(clearTimeout(se.current),se.current=null)},[]),Ve=(0,r.useCallback)(()=>{ce.current&&(clearTimeout(ce.current),ce.current=null)},[]),L=(0,r.useCallback)(e=>{o.enabled&&(R(),we.current=setTimeout(()=>{S(!1),we.current=null},e))},[R,o.enabled]),h=(0,r.useCallback)(()=>{let e=b();if(!e){S(!1),De(!1),R();return}if(De(!0),!de.current)return;o.enabled||(S(!0),R());let i=e.clientHeight,a=e.scrollHeight,m=e.scrollTop,w=0;if(ue.current){let Ne=window.getComputedStyle(ue.current),_e=parseFloat(Ne.paddingTop)||0,et=parseFloat(Ne.paddingBottom)||0;w=_e+et}let T=t?p*2+x.margin*4:x.margin*2,B=i-T+w,N=i/a,Ce=Math.max(B*N,G),$e=a-i,Z=B-Ce,Fe=$e>0?m/$e*Z:0;Pe(Ce),Ye(Fe)},[b,R,t,p,G,o.enabled]),K=(0,r.useCallback)(e=>{e.preventDefault(),e.stopPropagation();let i=b();i&&(pe(!0),Ie({y:e.clientY,scrollTop:i.scrollTop}),R(),S(!0),X())},[b,R,X]),Y=(0,r.useCallback)(e=>{if(!I)return;let i=b();if(!i)return;let a=i.clientHeight,m=i.scrollHeight-a,w=e.clientY-fe.y,T=a-ne,B=w/T*m,N=Math.max(0,Math.min(m,fe.scrollTop+B));i.scrollTop=N,h()},[I,fe,ne,h,b]),re=(0,r.useCallback)(()=>{pe(!1),te()&&L(o.delay)},[te,L,o.delay]),Me=(0,r.useCallback)(e=>{if(!de.current)return;let i=de.current.getBoundingClientRect(),a=e.clientY-i.top,m=b();if(!m)return;let w=m.clientHeight,T=m.scrollHeight,B=a/w*(T-w);m.scrollTop=Math.max(0,Math.min(T-w,B)),h(),S(!0),L(o.delay),X()},[h,L,o.delay,b,X]),he=(0,r.useCallback)(e=>{if(e.preventDefault(),e.stopPropagation(),!u.current)return;let i=Math.max(0,u.current.scrollTop-U);u.current.scrollTop=i,h(),S(!0),L(o.delay),X()},[h,L,U,o.delay,X]),Te=(0,r.useCallback)(e=>{if(e.preventDefault(),e.stopPropagation(),!u.current||!_.current)return;let i=u.current,a=_.current.scrollHeight-i.clientHeight,m=Math.min(a,i.scrollTop+U);i.scrollTop=m,h(),S(!0),L(o.delay),X()},[h,L,U,o.delay,X]),J=(0,r.useCallback)(e=>{if(!n.enabled)return;let i=e.target;if(Xe(i,n)||e.button!==0)return;let a=b();a&&(a.scrollHeight<=a.clientHeight||(e.preventDefault(),ie(!0),Be({x:e.clientX,y:e.clientY,scrollTop:a.scrollTop,scrollLeft:a.scrollLeft||0}),R()))},[n,Xe,b,R]),Se=(0,r.useCallback)(e=>{if(!O)return;let i=b();if(!i)return;let a=ve.x-e.clientX,m=ve.y-e.clientY;if(Math.abs(m)<3&&Math.abs(a)<3)return;S(!0);let w=Math.max(0,Math.min(i.scrollHeight-i.clientHeight,ve.scrollTop+m));i.scrollTop=w,h()},[O,ve,b,h]),C=(0,r.useCallback)(()=>{ie(!1),te()&&L(o.delay)},[te,L,o.delay]);(0,r.useEffect)(()=>{let e=T=>{h(),R(),S(!0);let B=Ee?o.delayOnWheel:o.delay;L(B),D&&D(T)},i=()=>{xe(!0),ae.current&&clearTimeout(ae.current),ae.current=setTimeout(()=>{xe(!1)},300),R(),Ve(),ce.current=setTimeout(()=>{S(!0),ce.current=null},50)},a=[],m=b();m&&a.push(m);let w=u.current;return w&&!m&&(a.push(w),w.querySelectorAll('[data-virtuoso-scroller], [style*="overflow"], .virtuoso-scroller, [style*="overflow: auto"], [style*="overflow:auto"]').forEach(T=>{let B=T;if(B!==w&&B.classList.contains("overlay-scrollbar-container"))return;let N=B.parentElement;for(;N&&N!==w;){if(N.classList.contains("overlay-scrollbar-container")&&N!==w)return;N=N.parentElement}a.push(B)})),a.forEach(T=>{T.addEventListener("scroll",e,{passive:!0}),T.addEventListener("wheel",i,{passive:!0})}),()=>{a.forEach(T=>{T.removeEventListener("scroll",e),T.removeEventListener("wheel",i)}),ae.current&&clearTimeout(ae.current),ce.current&&clearTimeout(ce.current)}},[b,h,D,R,L,o,Ee]),(0,r.useEffect)(()=>{let e=a=>{let m=b();if(!m)return;let{key:w}=a,{scrollTop:T,scrollHeight:B,clientHeight:N}=m,Ce=B-N,$e=50,Z=null;switch(w){case"ArrowUp":a.preventDefault(),Z=Math.max(0,T-$e);break;case"ArrowDown":a.preventDefault(),Z=Math.min(Ce,T+$e);break;case"PageUp":a.preventDefault(),Z=Math.max(0,T-N);break;case"PageDown":a.preventDefault(),Z=Math.min(Ce,T+N);break;case"Home":a.preventDefault(),Z=0;break;case"End":a.preventDefault(),Z=Ce;break;default:return}if(Z!==null){let Fe=Z/Ce,Ne=t?p*2+x.margin*4:x.margin*2,_e=(N-Ne-ne)*Fe;Ye(_e),m.scrollTop=Z,R(),S(!0),L(o.delay)}},i=u.current;if(i)return i.addEventListener("keydown",e),()=>{i.removeEventListener("keydown",e)}},[b,t,p,x.margin,ne,R,L,o.delay]),(0,r.useEffect)(()=>{if(O)return document.addEventListener("mousemove",Se),document.addEventListener("mouseup",C),()=>{document.removeEventListener("mousemove",Se),document.removeEventListener("mouseup",C)}},[O,Se,C]),(0,r.useEffect)(()=>{if(I)return document.addEventListener("mousemove",Y),document.addEventListener("mouseup",re),()=>{document.removeEventListener("mousemove",Y),document.removeEventListener("mouseup",re)}},[I,Y,re]),(0,r.useEffect)(()=>{h();let e=setTimeout(()=>{h()},100);return()=>clearTimeout(e)},[h]),(0,r.useLayoutEffect)(()=>{We(!0),h(),!o.enabled&&te()&&S(!0)},[te,h,o.enabled]),(0,r.useEffect)(()=>{let e=new ResizeObserver(()=>{h()}),i=[];return u.current&&i.push(u.current),_.current&&i.push(_.current),$.current&&document.contains($.current)&&i.push($.current),i.forEach(a=>{e.observe(a)}),()=>e.disconnect()},[h]),(0,r.useEffect)(()=>{if(!u.current)return;let e=new MutationObserver(()=>{$.current=null,h()});return e.observe(u.current,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["style"]}),()=>e.disconnect()},[h]);let q=Math.max(k,p);return(0,r.useEffect)(()=>{let e="overlay-scrollbar-webkit-hide",i=document.getElementById(e);i&&i.remove();let a=document.createElement("style");return a.id=e,a.textContent=`
2
2
  .overlay-scrollbar-container::-webkit-scrollbar {
3
3
  display: none !important;
4
4
  width: 0 !important;
@@ -18,7 +18,7 @@
18
18
  outline: 2px solid rgba(0, 123, 255, 0.5);
19
19
  outline-offset: -2px;
20
20
  }
21
- `,document.head.appendChild(n),()=>{let d=document.getElementById(t);d&&d.remove()}},[]),(0,oe.jsxs)("div",{ref:ue,className:`overlay-scrollbar-wrapper ${l}`,style:{display:"flex",flexDirection:"column",position:"relative",minHeight:0,height:"100%",flex:"1 1 0%",...p},children:[(0,oe.jsx)("div",{ref:u,className:"overlay-scrollbar-container",tabIndex:-1,onMouseDown:he,style:{display:"flex",width:"100%",flex:"1 1 auto",minHeight:0,overflow:"auto",scrollbarWidth:"none",msOverflowStyle:"none",outline:"none",userSelect:ke?"none":"auto",...g},children:(0,oe.jsx)("div",{ref:F,className:"overlay-scrollbar-content",style:{flex:"1 1 0%",minHeight:0,display:"flex",flexDirection:"column",...b},children:h})}),A&&Ce&&(0,oe.jsxs)("div",{ref:de,className:"overlay-scrollbar-track",onMouseEnter:()=>{C(),se.current=setTimeout(()=>{L(!0),se.current=null},100)},onMouseLeave:()=>{Fe(),I||w(M.delay)},style:{position:"absolute",top:0,right:0,width:`${Z}px`,height:"100%",opacity:be?1:0,transition:"opacity 0.2s ease-in-out",cursor:"pointer",zIndex:1e3,pointerEvents:"auto"},children:[T.visible&&(0,oe.jsx)("div",{className:"overlay-scrollbar-track-background",onClick:t=>{t.preventDefault(),t.stopPropagation(),re(t)},style:{position:"absolute",top:v?`${P.width+T.margin*2}px`:`${T.margin}px`,right:T.alignment==="right"?"0px":`${(Z-P.width)/2}px`,width:`${P.width}px`,height:v?`calc(100% - ${P.width*2+T.margin*4}px)`:`calc(100% - ${T.margin*2}px)`,backgroundColor:T.color,borderRadius:`${T.radius}px`,cursor:"pointer"}}),(0,oe.jsx)("div",{ref:ge,className:"overlay-scrollbar-thumb",onMouseDown:Ee,onMouseEnter:()=>Se(!0),onMouseLeave:()=>Se(!1),style:{position:"absolute",top:`${(v?D+T.margin*2:T.margin)+Ye}px`,right:T.alignment==="right"?"0px":`${(Z-D)/2}px`,width:`${D}px`,height:`${Math.max(W,s)}px`,backgroundColor:te||I?P.hoverColor:P.color,opacity:te||I?P.hoverOpacity:P.opacity,borderRadius:`${P.radius}px`,cursor:"pointer",transition:"background-color 0.2s ease-in-out, opacity 0.2s ease-in-out"}})]}),A&&Ce&&v&&(0,oe.jsx)("div",{className:"overlay-scrollbar-up-arrow",onClick:K,onMouseEnter:()=>xe("up"),onMouseLeave:()=>xe(null),style:{position:"absolute",top:`${T.margin}px`,right:T.alignment==="right"?"0px":`${(Z-D)/2}px`,width:`${D}px`,height:`${D}px`,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",fontSize:`${Math.max(D*.75,8)}px`,color:ve==="up"?G.hoverColor:G.color,userSelect:"none",zIndex:1001,opacity:be?ve==="up"?G.hoverOpacity:G.opacity:0,transition:"opacity 0.2s ease-in-out, color 0.15s ease-in-out"},children:"\u25B2"}),A&&Ce&&v&&(0,oe.jsx)("div",{className:"overlay-scrollbar-down-arrow",onClick:J,onMouseEnter:()=>xe("down"),onMouseLeave:()=>xe(null),style:{position:"absolute",bottom:`${T.margin}px`,right:T.alignment==="right"?"0px":`${(Z-D)/2}px`,width:`${D}px`,height:`${D}px`,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",fontSize:`${Math.max(D*.75,8)}px`,color:ve==="down"?G.hoverColor:G.color,userSelect:"none",zIndex:1001,opacity:be?ve==="down"?G.hoverOpacity:G.opacity:0,transition:"opacity 0.2s ease-in-out, color 0.15s ease-in-out"},children:"\u25BC"})]})}),Je=ht;var c=require("react/jsx-runtime"),gt={alignment:"right",margin:0,radius:0};function bt({data:l,loading:p=!1,columns:g,onRowClick:b,onRowMouseDown:h,getRowId:$,selectedRowId:y,rowHeight:j=50,columnHeight:E=56,striped:Y,rowDivider:ee=!0,onSort:A,onLoadMore:q,sortBy:H,sortDirection:V,showPaper:ue=!0,paddingX:u="1rem",paddingTop:F=0,paddingBottom:de=0,rowHoverColor:ge,rowHoverOpacity:B,scrollbars:be,emptyMessage:L="NO DATA",LoadingComponent:I}){let pe=(0,i.useMemo)(()=>(0,i.forwardRef)((a,s)=>{let v=(0,i.useRef)(null);return(0,c.jsx)(Je,{detectInnerScroll:!0,track:gt,...be,children:(0,c.jsx)(f.TableContainer,{component:f.Box,...a,ref:S=>{v.current=S,typeof s=="function"?s(S):s&&(s.current=S)},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:u,paddingTop:F,paddingBottom:de}}})})}),[]),te=(0,i.useMemo)(()=>{if(Y===!0)return"#f5f5f5";if(typeof Y=="string")return Y},[Y]),[Se,fe]=(0,i.useState)(p),[ie,W]=(0,i.useState)(null),Pe=(0,i.useRef)(y),[Ye,Re]=(0,i.useState)(0);(0,i.useEffect)(()=>{p&&fe(!0)},[p]),(0,i.useEffect)(()=>{ie!==null&&ie===y&&W(null)},[ie,y]),(0,i.useEffect)(()=>{Pe.current!==y&&(W(null),Pe.current=y)},[y]),(0,i.useEffect)(()=>{y==null&&W(null)},[y]);let Ce=(0,i.useCallback)(()=>{fe(!1)},[]),Ne=Se,ke=p&&l.length>0,Le=(0,i.useRef)(!1),me=(0,i.useRef)(null),X=(0,i.useRef)(null),ye=(0,i.useRef)(!1),qe=(0,i.useRef)({x:0,y:0,scrollTop:0}),ve=(0,i.useRef)(!1),xe=(0,i.useRef)(0),He=(0,i.useRef)(0),De=(0,i.useRef)(!1),le=(0,i.useRef)({x:0,y:0}),Ve=(0,i.useRef)(null),je=(0,i.useCallback)(a=>{},[]),ae=(0,i.useCallback)(a=>{if(!ve.current||!X.current)return;let s=a.clientY-qe.current.y;if(!ye.current&&Math.abs(s)>5&&(ye.current=!0,X.current&&(X.current.style.userSelect="none")),ye.current){let S=s*2;He.current+=-S;let O=X.current,e=Math.max(0,xe.current+He.current);O.scrollTop=e,qe.current.y=a.clientY,a.preventDefault()}},[]),se=(0,i.useCallback)(()=>{if(ve.current=!1,ye.current&&X.current){let a=Math.max(0,xe.current+He.current),s=()=>{X.current&&(X.current.scrollTop=a)};s(),setTimeout(s,1),setTimeout(s,5),setTimeout(s,10)}ye.current=!1,He.current=0,X.current&&(X.current.style.userSelect="auto")},[]);(0,i.useEffect)(()=>{let a=document.querySelector('[data-testid="virtuoso-scroller"]');a&&a.querySelectorAll(".MuiTableSortLabel-root").forEach(v=>{let S=new MouseEvent("mouseleave",{bubbles:!0,cancelable:!0});v.dispatchEvent(S)})},[H]);let _=(0,i.useCallback)(a=>{if(!A)return;A(a,H===a&&V==="asc"?"desc":"asc")},[A,H,V]),P=(0,i.useCallback)(a=>{if(!q||p&&l.length===0)return;let s=Date.now(),v=window.lastRangeChangeTime||0;if(s-v<100)return;window.lastRangeChangeTime=s;let S=Math.max(10,Math.floor(l.length*.1)),O=a.endIndex>=l.length-S,e=l.length>=30;if(O&&e&&q&&!Le.current){Le.current=!0;let z=l.length;q(z,50)}},[l.length,p,q]);(0,i.useEffect)(()=>{p||(Le.current=!1)},[p]),(0,i.useEffect)(()=>{l.length===0&&Re(a=>a+1)},[l.length]);let T=(0,i.useRef)(l.length);(0,i.useEffect)(()=>{let a=T.current,s=l.length;if(s>a&&a>0){T.current=s;return}me.current&&s>0&&s<=a&&me.current.scrollToIndex({index:0,align:"start",behavior:"auto"}),T.current=s},[l]),(0,i.useEffect)(()=>(document.addEventListener("mousemove",ae),document.addEventListener("mouseup",se),()=>{document.removeEventListener("mousemove",ae),document.removeEventListener("mouseup",se)}),[ae,se]);let G=(0,i.useCallback)(()=>{let a={},s=[];if(g.forEach(e=>{e.group?(a[e.group]||(a[e.group]=[]),a[e.group].push(e)):s.push(e)}),!(Object.keys(a).length>0))return(0,c.jsx)(f.TableRow,{children:g.map(e=>(0,c.jsx)(f.TableCell,{align:e.align||"left",style:{width:e.width,minWidth:e.width,...e.style,fontWeight:"bold",position:"sticky",top:0,zIndex:2,padding:"16px"},children:e.sortable?(0,c.jsx)("div",{style:{display:"flex",alignItems:"center",justifyContent:e.align==="center"?"center":e.align==="right"?"flex-end":"flex-start",position:"relative",width:"100%"},children:(0,c.jsxs)(f.Box,{sx:{position:"relative",cursor:"default","&:hover .MuiTableSortLabel-root":{opacity:"1 !important","& .MuiSvgIcon-root":{color:"#000",opacity:"1 !important"}}},onClick:()=>_(String(e.id)),children:[e.text,(0,c.jsx)(f.TableSortLabel,{active:H===e.id,direction:H===e.id?V:"desc",sx:{position:"absolute",left:"100%",top:"50%",transform:"translateY(-50%)",marginLeft:"4px",minWidth:"auto",width:"16px",height:"16px",cursor:"default",opacity:H===e.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)"}}})]})}):e.text},String(e.id)))});let S=[...s.map(e=>(0,c.jsx)(f.TableCell,{rowSpan:2,align:e.align||"left",style:{width:e.width,minWidth:e.width,...e.style,fontWeight:"bold",position:"sticky",top:0,zIndex:2,padding:"16px"},children:e.sortable&&A?(0,c.jsx)("div",{style:{display:"flex",alignItems:"center",justifyContent:e.align==="center"?"center":e.align==="right"?"flex-end":"flex-start",position:"relative",width:"100%"},children:(0,c.jsxs)(f.Box,{sx:{position:"relative",cursor:"default","&:hover .MuiTableSortLabel-root":{opacity:"1 !important","& .MuiSvgIcon-root":{color:"#000",opacity:"1 !important"}}},onClick:()=>_(String(e.id)),children:[e.text,(0,c.jsx)(f.TableSortLabel,{active:H===e.id,direction:H===e.id?V:"desc",sx:{position:"absolute",left:"100%",top:"50%",transform:"translateY(-50%)",marginLeft:"4px",minWidth:"auto",width:"16px",height:"16px",cursor:"default",opacity:H===e.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)"}}})]})}):e.text},String(e.id))),...Object.entries(a).map(([e,z])=>(0,c.jsx)(f.TableCell,{align:"center",colSpan:z.length,style:{fontWeight:"bold",position:"sticky",top:0,zIndex:2,padding:"16px"},children:e},e))],O=[...Object.values(a).flat().map(e=>(0,c.jsx)(f.TableCell,{align:e.align||"left",style:{width:e.width,minWidth:e.width,...e.style,fontWeight:"bold",position:"sticky",top:0,zIndex:2,padding:"16px"},children:e.sortable&&A?(0,c.jsx)("div",{style:{display:"flex",alignItems:"center",justifyContent:e.align==="center"?"center":e.align==="right"?"flex-end":"flex-start",position:"relative",width:"100%"},children:(0,c.jsxs)(f.Box,{sx:{position:"relative",cursor:"default","&:hover .MuiTableSortLabel-root":{opacity:"1 !important","& .MuiSvgIcon-root":{color:"#000",opacity:"1 !important"}}},onClick:()=>_(String(e.id)),children:[e.text,(0,c.jsx)(f.TableSortLabel,{active:H===e.id,direction:H===e.id?V:"desc",sx:{position:"absolute",left:"100%",top:"50%",transform:"translateY(-50%)",marginLeft:"4px",minWidth:"auto",width:"16px",height:"16px",cursor:"default",opacity:H===e.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)"}}})]})}):e.text},String(e.id)))];return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(f.TableRow,{children:S}),(0,c.jsx)(f.TableRow,{children:O})]})},[g,H,V,_,A,E]),Ie=(0,i.useCallback)((a,s)=>s?(0,c.jsx)(c.Fragment,{children:g.map(v=>(0,c.jsx)(f.TableCell,{align:v.align||"left",style:{width:v.width,minWidth:v.width,...v.style,padding:"8px 16px"},children:v.render?v.render(s,a):String(s[v.id]||"")},String(v.id)))}):(console.log("rowContent - \uC544\uC774\uD15C \uC5C6\uC74C, \uC778\uB371\uC2A4:",a),null),[g]),M=(0,i.useMemo)(()=>({Scroller:pe,Table:a=>(0,c.jsx)(f.Table,{...a,sx:{borderCollapse:"separate",tableLayout:"fixed",marginRight:"16px"}}),TableHead:(0,i.forwardRef)((a,s)=>(0,c.jsx)(f.TableHead,{...a,ref:s,sx:{userSelect:"none","& tr":{height:E,"& th":{padding:"16px",position:"sticky",top:0,zIndex:2,fontWeight:"bold"}}}})),TableRow:a=>{let{item:s,...v}=a,S=v["data-index"]??0,O=S%2===1,e=s&&$?$(s,S):S,z=ie??y,C=z!=null&&e===z,Fe=U=>{if(C)return"#dbeafe";let w=U.palette.mode==="dark",Ee=ge??"#000000",$e=B??.06,Te=Ee.replace("#",""),re=parseInt(Te.substring(0,2),16)/255,K=parseInt(Te.substring(2,4),16)/255,J=parseInt(Te.substring(4,6),16)/255;if(w){let he=Math.max(re,K,J),ce=Math.min(re,K,J),ne=0,Z=0,t=(he+ce)/2;if(he!==ce){let n=he-ce;switch(Z=t>.5?n/(2-he-ce):n/(he+ce),he){case re:ne=((K-J)/n+(K<J?6:0))/6;break;case K:ne=((J-re)/n+2)/6;break;case J:ne=((re-K)/n+4)/6;break}}t=1-t;let o=(n,d,m)=>(m<0&&(m+=1),m>1&&(m-=1),m<1/6?n+(d-n)*6*m:m<1/2?d:m<2/3?n+(d-n)*(2/3-m)*6:n);if(Z===0)re=K=J=t;else{let n=t<.5?t*(1+Z):t+Z-t*Z,d=2*t-n;re=o(d,n,ne+1/3),K=o(d,n,ne),J=o(d,n,ne-1/3)}}return`rgba(${Math.round(re*255)}, ${Math.round(K*255)}, ${Math.round(J*255)}, ${$e})`};return(0,c.jsx)(f.TableRow,{...v,onMouseDown:U=>{De.current=!1,le.current={x:U.clientX,y:U.clientY},U.button===0&&(s&&(b||h)&&e!==y&&(0,Ze.flushSync)(()=>{W(e)}),s&&h&&h(s,S))},onMouseMove:U=>{let w=Math.abs(U.clientX-le.current.x),x=Math.abs(U.clientY-le.current.y),Ee=5;(w>Ee||x>Ee)&&(De.current=!0)},onClick:()=>{!De.current&&!ye.current&&s&&b&&(e!==y&&W(e),b(s,S)),De.current=!1},sx:U=>{let w=C?"#dbeafe":O&&te?te:"transparent",x=Fe(U);return{userSelect:"none",height:j,backgroundColor:w,boxShadow:C?"inset 3px 0 0 #3b82f6":"none","& td":{padding:"8px 16px",borderBottom:ee?"1px solid rgba(224, 224, 224, 1)":"none",fontWeight:C?600:void 0,backgroundColor:w},"& th":{padding:"8px 16px",borderBottom:"none",backgroundColor:w},"&:hover":b||h?{backgroundColor:x,transition:"background-color 0.2s ease"}:void 0,"&:hover td":b||h?{backgroundColor:x,transition:"background-color 0.2s ease"}:void 0,"&:active":b||h?{backgroundColor:x}:void 0,"&:active td":b||h?{backgroundColor:x}:void 0,cursor:b||h?"pointer":void 0}}})},TableBody:(0,i.forwardRef)((a,s)=>(0,c.jsx)(f.TableBody,{...a,ref:s}))}),[b,h,$,y,ie,j,je,te,ee,E,ge,B,pe]),D=(0,c.jsxs)(f.Box,{sx:{position:"relative",height:"100%",width:"100%","& .MuiTableHead-root":{backgroundColor:a=>a.palette.mode==="dark"?"#1e1e1e !important":"#ffffff !important"}},children:[(0,c.jsx)(Qe.TableVirtuoso,{ref:me,data:l,totalCount:q?l.length+1:l.length,fixedHeaderContent:G,itemContent:Ie,rangeChanged:P,components:M,style:{height:"100%"},increaseViewportBy:{top:100,bottom:300},overscan:5,followOutput:!1},Ye),l.length===0&&!p&&(0,c.jsx)(f.Box,{sx:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:2},children:typeof L=="string"?(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(f.Box,{sx:{width:48,height:48,display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"50%",backgroundColor:"#f5f5f5",color:"#999"},children:"\u{1F4C4}"}),(0,c.jsx)(f.Typography,{variant:"body1",sx:{color:"text.secondary"},children:L})]}):L}),Ne&&(0,c.jsx)(c.Fragment,{children:I?(0,c.jsx)(I,{visible:p,onComplete:Ce}):(0,c.jsx)(Xe,{visible:p,onComplete:Ce,size:40,sx:{top:`${g.some(a=>a.group)?E*2:E}px`},background:{show:l.length===0,opacity:.8}})})]});return ue?(0,c.jsx)(f.Paper,{className:"grow",elevation:1,sx:{padding:0,paddingLeft:u,height:"100%",minHeight:0,flex:1,display:"flex",flexDirection:"column"},children:D}):(0,c.jsx)(f.Box,{className:"grow",style:{padding:0,paddingLeft:u,height:"100%",minHeight:0,flex:1,display:"flex",flexDirection:"column"},children:D})}var et=(0,i.memo)(bt);
21
+ `,document.head.appendChild(a),()=>{let m=document.getElementById(e);m&&m.remove()}},[]),(0,oe.jsxs)("div",{ref:ue,className:`overlay-scrollbar-wrapper ${l}`,style:{display:"flex",flexDirection:"column",position:"relative",minHeight:0,height:"100%",flex:"1 1 0%",...d},children:[(0,oe.jsx)("div",{ref:u,className:"overlay-scrollbar-container",tabIndex:-1,onMouseDown:J,style:{display:"flex",width:"100%",flex:"1 1 auto",minHeight:0,overflow:"auto",scrollbarWidth:"none",msOverflowStyle:"none",outline:"none",userSelect:O?"none":"auto",...g},children:(0,oe.jsx)("div",{ref:_,className:"overlay-scrollbar-content",style:{flex:"1 1 0%",minHeight:0,display:"flex",flexDirection:"column",...y},children:v})}),z&&ye&&(0,oe.jsxs)("div",{ref:de,className:"overlay-scrollbar-track",onMouseEnter:()=>{R(),se.current=setTimeout(()=>{S(!0),se.current=null},100)},onMouseLeave:()=>{He(),I||L(o.delay)},style:{position:"absolute",top:0,right:0,width:`${q}px`,height:"100%",opacity:be?1:0,transition:"opacity 0.2s ease-in-out",cursor:"pointer",zIndex:1e3,pointerEvents:"auto"},children:[x.visible&&(0,oe.jsx)("div",{className:"overlay-scrollbar-track-background",onClick:e=>{e.preventDefault(),e.stopPropagation(),Me(e)},style:{position:"absolute",top:t?`${P.width+x.margin*2}px`:`${x.margin}px`,right:x.alignment==="right"?"0px":`${(q-P.width)/2}px`,width:`${P.width}px`,height:t?`calc(100% - ${P.width*2+x.margin*4}px)`:`calc(100% - ${x.margin*2}px)`,backgroundColor:x.color,borderRadius:`${x.radius}px`,cursor:"pointer"}}),(0,oe.jsx)("div",{ref:ge,className:"overlay-scrollbar-thumb",onMouseDown:K,onMouseEnter:()=>Le(!0),onMouseLeave:()=>Le(!1),style:{position:"absolute",top:`${(t?p+x.margin*2:x.margin)+Ae}px`,right:x.alignment==="right"?"0px":`${(q-p)/2}px`,width:`${p}px`,height:`${Math.max(ne,G)}px`,backgroundColor:ee||I?P.hoverColor:P.color,opacity:ee||I?P.hoverOpacity:P.opacity,borderRadius:`${P.radius}px`,cursor:"pointer",transition:"background-color 0.2s ease-in-out, opacity 0.2s ease-in-out"}})]}),z&&ye&&t&&(0,oe.jsx)("div",{className:"overlay-scrollbar-up-arrow",onClick:he,onMouseEnter:()=>me("up"),onMouseLeave:()=>me(null),style:{position:"absolute",top:`${x.margin}px`,right:x.alignment==="right"?"0px":`${(q-p)/2}px`,width:`${p}px`,height:`${p}px`,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",fontSize:`${Math.max(p*.75,8)}px`,color:le==="up"?A.hoverColor:A.color,userSelect:"none",zIndex:1001,opacity:be?le==="up"?A.hoverOpacity:A.opacity:0,transition:"opacity 0.2s ease-in-out, color 0.15s ease-in-out"},children:"\u25B2"}),z&&ye&&t&&(0,oe.jsx)("div",{className:"overlay-scrollbar-down-arrow",onClick:Te,onMouseEnter:()=>me("down"),onMouseLeave:()=>me(null),style:{position:"absolute",bottom:`${x.margin}px`,right:x.alignment==="right"?"0px":`${(q-p)/2}px`,width:`${p}px`,height:`${p}px`,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",fontSize:`${Math.max(p*.75,8)}px`,color:le==="down"?A.hoverColor:A.color,userSelect:"none",zIndex:1001,opacity:be?le==="down"?A.hoverOpacity:A.opacity:0,transition:"opacity 0.2s ease-in-out, color 0.15s ease-in-out"},children:"\u25BC"})]})}),Ke=mt;var s=require("react/jsx-runtime"),ht={alignment:"right",margin:0,radius:0};function gt({data:l,loading:d=!1,columns:g,onRowClick:y,getRowId:v,selectedRowId:D,selectedRowSx:M,rowHeight:j=50,columnHeight:E=56,striped:W,rowDivider:Q=!0,onSort:z,onLoadMore:V,sortBy:H,sortDirection:F,showPaper:ue=!0,paddingX:u="1rem",paddingTop:_=0,paddingBottom:de=0,rowHoverColor:ge,rowHoverOpacity:$,scrollbars:be,emptyMessage:S="NO DATA",LoadingComponent:I}){let pe=(0,c.useMemo)(()=>(0,c.forwardRef)((n,o)=>{let p=(0,c.useRef)(null);return(0,s.jsx)(Ke,{detectInnerScroll:!0,track:ht,...be,children:(0,s.jsx)(f.TableContainer,{component:f.Box,...n,ref:k=>{p.current=k,typeof o=="function"?o(k):o&&(o.current=k)},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:u,paddingTop:_,paddingBottom:de}}})})}),[]),ee=(0,c.useMemo)(()=>{if(W===!0)return"#f5f5f5";if(typeof W=="string")return W},[W]),[Le,fe]=(0,c.useState)(d),[Ie,ne]=(0,c.useState)(0);(0,c.useEffect)(()=>{d&&fe(!0)},[d]);let Pe=(0,c.useCallback)(()=>{fe(!1)},[]),Ae=Le,Ye=d&&l.length>0,ye=(0,c.useRef)(!1),De=(0,c.useRef)(null),O=(0,c.useRef)(null),ie=(0,c.useRef)(!1),ve=(0,c.useRef)({x:0,y:0,scrollTop:0}),Be=(0,c.useRef)(!1),qe=(0,c.useRef)(0),Re=(0,c.useRef)(0),le=(0,c.useRef)(!1),me=(0,c.useRef)({x:0,y:0}),Qe=(0,c.useRef)(null),We=(0,c.useCallback)(n=>{},[]),ae=(0,c.useCallback)(n=>{if(!Be.current||!O.current)return;let o=n.clientY-ve.current.y;if(!ie.current&&Math.abs(o)>5&&(ie.current=!0,O.current&&(O.current.style.userSelect="none")),ie.current){let k=o*2;Re.current+=-k;let G=O.current,t=Math.max(0,qe.current+Re.current);G.scrollTop=t,ve.current.y=n.clientY,n.preventDefault()}},[]),Ee=(0,c.useCallback)(()=>{if(Be.current=!1,ie.current&&O.current){let n=Math.max(0,qe.current+Re.current),o=()=>{O.current&&(O.current.scrollTop=n)};o(),setTimeout(o,1),setTimeout(o,5),setTimeout(o,10)}ie.current=!1,Re.current=0,O.current&&(O.current.style.userSelect="auto")},[]);(0,c.useEffect)(()=>{let n=document.querySelector('[data-testid="virtuoso-scroller"]');n&&n.querySelectorAll(".MuiTableSortLabel-root").forEach(p=>{let k=new MouseEvent("mouseleave",{bubbles:!0,cancelable:!0});p.dispatchEvent(k)})},[H]);let xe=(0,c.useCallback)(n=>{if(!z)return;z(n,H===n&&F==="asc"?"desc":"asc")},[z,H,F]),we=(0,c.useCallback)(n=>{if(!V||d&&l.length===0)return;let o=Date.now(),p=window.lastRangeChangeTime||0;if(o-p<100)return;window.lastRangeChangeTime=o;let k=Math.max(10,Math.floor(l.length*.1)),G=n.endIndex>=l.length-k,t=l.length>=30;if(G&&t&&V&&!ye.current){ye.current=!0;let U=l.length;V(U,50)}},[l.length,d,V]);(0,c.useEffect)(()=>{d||(ye.current=!1)},[d]),(0,c.useEffect)(()=>{l.length===0&&ne(n=>n+1)},[l.length]);let se=(0,c.useRef)(l.length);(0,c.useEffect)(()=>{let n=se.current,o=l.length;if(o>n&&n>0){se.current=o;return}De.current&&o>0&&o<=n&&De.current.scrollToIndex({index:0,align:"start",behavior:"auto"}),se.current=o},[l]),(0,c.useEffect)(()=>(document.addEventListener("mousemove",ae),document.addEventListener("mouseup",Ee),()=>{document.removeEventListener("mousemove",ae),document.removeEventListener("mouseup",Ee)}),[ae,Ee]);let ce=(0,c.useCallback)(()=>{let n={},o=[];if(g.forEach(t=>{t.group?(n[t.group]||(n[t.group]=[]),n[t.group].push(t)):o.push(t)}),!(Object.keys(n).length>0))return(0,s.jsx)(f.TableRow,{children:g.map(t=>(0,s.jsx)(f.TableCell,{align:t.align||"left",style:{width:t.width,minWidth:t.width,...t.style,fontWeight:"bold",position:"sticky",top:0,zIndex:2,padding:"16px"},children:t.sortable?(0,s.jsx)("div",{style:{display:"flex",alignItems:"center",justifyContent:t.align==="center"?"center":t.align==="right"?"flex-end":"flex-start",position:"relative",width:"100%"},children:(0,s.jsxs)(f.Box,{sx:{position:"relative",cursor:"default","&:hover .MuiTableSortLabel-root":{opacity:"1 !important","& .MuiSvgIcon-root":{color:"#000",opacity:"1 !important"}}},onClick:()=>xe(String(t.id)),children:[t.text,(0,s.jsx)(f.TableSortLabel,{active:H===t.id,direction:H===t.id?F:"desc",sx:{position:"absolute",left:"100%",top:"50%",transform:"translateY(-50%)",marginLeft:"4px",minWidth:"auto",width:"16px",height:"16px",cursor:"default",opacity:H===t.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)"}}})]})}):t.text},String(t.id)))});let k=[...o.map(t=>(0,s.jsx)(f.TableCell,{rowSpan:2,align:t.align||"left",style:{width:t.width,minWidth:t.width,...t.style,fontWeight:"bold",position:"sticky",top:0,zIndex:2,padding:"16px"},children:t.sortable&&z?(0,s.jsx)("div",{style:{display:"flex",alignItems:"center",justifyContent:t.align==="center"?"center":t.align==="right"?"flex-end":"flex-start",position:"relative",width:"100%"},children:(0,s.jsxs)(f.Box,{sx:{position:"relative",cursor:"default","&:hover .MuiTableSortLabel-root":{opacity:"1 !important","& .MuiSvgIcon-root":{color:"#000",opacity:"1 !important"}}},onClick:()=>xe(String(t.id)),children:[t.text,(0,s.jsx)(f.TableSortLabel,{active:H===t.id,direction:H===t.id?F:"desc",sx:{position:"absolute",left:"100%",top:"50%",transform:"translateY(-50%)",marginLeft:"4px",minWidth:"auto",width:"16px",height:"16px",cursor:"default",opacity:H===t.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)"}}})]})}):t.text},String(t.id))),...Object.entries(n).map(([t,U])=>(0,s.jsx)(f.TableCell,{align:"center",colSpan:U.length,style:{fontWeight:"bold",position:"sticky",top:0,zIndex:2,padding:"16px"},children:t},t))],G=[...Object.values(n).flat().map(t=>(0,s.jsx)(f.TableCell,{align:t.align||"left",style:{width:t.width,minWidth:t.width,...t.style,fontWeight:"bold",position:"sticky",top:0,zIndex:2,padding:"16px"},children:t.sortable&&z?(0,s.jsx)("div",{style:{display:"flex",alignItems:"center",justifyContent:t.align==="center"?"center":t.align==="right"?"flex-end":"flex-start",position:"relative",width:"100%"},children:(0,s.jsxs)(f.Box,{sx:{position:"relative",cursor:"default","&:hover .MuiTableSortLabel-root":{opacity:"1 !important","& .MuiSvgIcon-root":{color:"#000",opacity:"1 !important"}}},onClick:()=>xe(String(t.id)),children:[t.text,(0,s.jsx)(f.TableSortLabel,{active:H===t.id,direction:H===t.id?F:"desc",sx:{position:"absolute",left:"100%",top:"50%",transform:"translateY(-50%)",marginLeft:"4px",minWidth:"auto",width:"16px",height:"16px",cursor:"default",opacity:H===t.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)"}}})]})}):t.text},String(t.id)))];return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(f.TableRow,{children:k}),(0,s.jsx)(f.TableRow,{children:G})]})},[g,H,F,xe,z,E]),P=(0,c.useCallback)((n,o)=>o?(0,s.jsx)(s.Fragment,{children:g.map(p=>(0,s.jsx)(f.TableCell,{align:p.align||"left",style:{width:p.width,minWidth:p.width,...p.style,padding:"8px 16px"},children:p.render?p.render(o,n):String(o[p.id]||"")},String(p.id)))}):(console.log("rowContent - \uC544\uC774\uD15C \uC5C6\uC74C, \uC778\uB371\uC2A4:",n),null),[g]),x=(0,c.useMemo)(()=>({Scroller:pe,Table:n=>(0,s.jsx)(f.Table,{...n,sx:{borderCollapse:"separate",tableLayout:"fixed",marginRight:"16px"}}),TableHead:(0,c.forwardRef)((n,o)=>(0,s.jsx)(f.TableHead,{...n,ref:o,sx:{userSelect:"none","& tr":{height:E,"& th":{padding:"16px",position:"sticky",top:0,zIndex:2,fontWeight:"bold"}}}})),TableRow:n=>{let{item:o,...p}=n,k=p["data-index"]??0,G=k%2===1,t=o&&v?v(o,k):k,U=D!=null&&t===D,X=U&&M?typeof M=="function"?M(o,k):M:void 0;return(0,s.jsx)(f.TableRow,{...p,onMouseDown:b=>{le.current=!1,me.current={x:b.clientX,y:b.clientY}},onMouseMove:b=>{let te=Math.abs(b.clientX-me.current.x),R=Math.abs(b.clientY-me.current.y),He=5;(te>He||R>He)&&(le.current=!0)},onClick:()=>{!le.current&&!ie.current&&o&&y&&y(o,k),le.current=!1},sx:[{userSelect:"none",height:j,backgroundColor:G&&ee?ee:"transparent","& td":{padding:"8px 16px",borderBottom:Q?"1px solid rgba(224, 224, 224, 1)":"none"},"& th":{padding:"8px 16px",borderBottom:"none"},"&:hover":y&&!U?{backgroundColor:b=>{let te=b.palette.mode==="dark",He=ge??"#000000",Ve=$??.06,L=He.replace("#",""),h=parseInt(L.substring(0,2),16)/255,K=parseInt(L.substring(2,4),16)/255,Y=parseInt(L.substring(4,6),16)/255;if(te){let re=Math.max(h,K,Y),Me=Math.min(h,K,Y),he=0,Te=0,J=(re+Me)/2;if(re!==Me){let C=re-Me;switch(Te=J>.5?C/(2-re-Me):C/(re+Me),re){case h:he=((K-Y)/C+(K<Y?6:0))/6;break;case K:he=((Y-h)/C+2)/6;break;case Y:he=((h-K)/C+4)/6;break}}J=1-J;let Se=(C,q,e)=>(e<0&&(e+=1),e>1&&(e-=1),e<1/6?C+(q-C)*6*e:e<1/2?q:e<2/3?C+(q-C)*(2/3-e)*6:C);if(Te===0)h=K=Y=J;else{let C=J<.5?J*(1+Te):J+Te-J*Te,q=2*J-C;h=Se(q,C,he+1/3),K=Se(q,C,he),Y=Se(q,C,he-1/3)}}return`rgba(${Math.round(h*255)}, ${Math.round(K*255)}, ${Math.round(Y*255)}, ${Ve})`}}:void 0,cursor:y?"pointer":void 0},X]})},TableBody:(0,c.forwardRef)((n,o)=>(0,s.jsx)(f.TableBody,{...n,ref:o}))}),[y,v,D,M,j,We,ee,Q,E,ge,$,pe]),A=(0,s.jsxs)(f.Box,{sx:{position:"relative",height:"100%",width:"100%","& .MuiTableHead-root":{backgroundColor:n=>n.palette.mode==="dark"?"#1e1e1e !important":"#ffffff !important"}},children:[(0,s.jsx)(Je.TableVirtuoso,{ref:De,data:l,totalCount:V?l.length+1:l.length,fixedHeaderContent:ce,itemContent:P,rangeChanged:we,components:x,style:{height:"100%"},increaseViewportBy:{top:100,bottom:300},overscan:5,followOutput:!1},Ie),l.length===0&&!d&&(0,s.jsx)(f.Box,{sx:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:2},children:typeof S=="string"?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(f.Box,{sx:{width:48,height:48,display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"50%",backgroundColor:"#f5f5f5",color:"#999"},children:"\u{1F4C4}"}),(0,s.jsx)(f.Typography,{variant:"body1",sx:{color:"text.secondary"},children:S})]}):S}),Ae&&(0,s.jsx)(s.Fragment,{children:I?(0,s.jsx)(I,{visible:d,onComplete:Pe}):(0,s.jsx)(Ue,{visible:d,onComplete:Pe,size:40,sx:{top:`${g.some(n=>n.group)?E*2:E}px`},background:{show:l.length===0,opacity:.8}})})]});return ue?(0,s.jsx)(f.Paper,{className:"grow",elevation:1,sx:{padding:0,paddingLeft:u,height:"100%",minHeight:0,flex:1,display:"flex",flexDirection:"column"},children:A}):(0,s.jsx)(f.Box,{className:"grow",style:{padding:0,paddingLeft:u,height:"100%",minHeight:0,flex:1,display:"flex",flexDirection:"column"},children:A})}var Ze=(0,c.memo)(gt);
22
22
  /**
23
23
  * Virtual Data Table - A high-performance virtual data table component for React
24
24
  *