@ehfuse/overlay-scrollbar 1.7.17 → 1.7.19

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.
@@ -81,6 +81,8 @@ export interface OverlayScrollbarProps {
81
81
  }
82
82
  export interface ScrollTopFabConfig {
83
83
  threshold?: number;
84
+ idleDelay?: number;
85
+ scrollingOpacity?: number;
84
86
  position?: "left" | "right";
85
87
  offset?: number;
86
88
  background?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"OverlayScrollbar.d.ts","sourceRoot":"","sources":["../src/OverlayScrollbar.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,KAAK,EAAE,EAMV,SAAS,EAKZ,MAAM,OAAO,CAAC;AAIf,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAGnD,MAAM,WAAW,WAAW;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;CACzB;AAGD,MAAM,WAAW,WAAW;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IAClC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;CACvB;AAGD,MAAM,WAAW,YAAY;IACzB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;CACzB;AAGD,MAAM,WAAW,gBAAgB;IAC7B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;CAC/B;AAGD,MAAM,WAAW,cAAc;IAC3B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,qBAAqB;IAClC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,cAAc,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IACrC,YAAY,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IACnC,QAAQ,EAAE,SAAS,CAAC;IACpB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IAGlC,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAC9B,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B,aAAa,CAAC,EAAE,mBAAmB,CAAC;IAGpC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,YAAY,CAAC,EAAE,OAAO,GAAG,kBAAkB,CAAC;CAC/C;AAGD,MAAM,WAAW,kBAAkB;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB;AAGD,MAAM,WAAW,mBAAmB;IAChC,kBAAkB,EAAE,MAAM,cAAc,GAAG,IAAI,CAAC;IAChD,QAAQ,EAAE,CAAC,OAAO,EAAE,eAAe,KAAK,IAAI,CAAC;IAC7C,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;CACxB;AAUD,QAAA,MAAM,gBAAgB,mGAy9DrB,CAAC;AAEF,eAAe,gBAAgB,CAAC;AAChC,OAAO,EAAE,gBAAgB,EAAE,CAAC"}
1
+ {"version":3,"file":"OverlayScrollbar.d.ts","sourceRoot":"","sources":["../src/OverlayScrollbar.tsx"],"names":[],"mappings":"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"}
package/dist/index.esm.js CHANGED
@@ -1,4 +1,4 @@
1
- import{useRef as O,useEffect as A,useState as h,useCallback as m,useMemo as Me,forwardRef as Zt,useImperativeHandle as Qt,useLayoutEffect as Jt,useId as eo}from"react";var jt=["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"],Pe=(M,L)=>{if(M instanceof HTMLElement&&M.isContentEditable||M.closest('[role="textbox"],[role="searchbox"]'))return!0;let E=M.tagName.toLowerCase();if(E==="input"){let d=(M.type||"text").toLowerCase();return!["button","submit","reset","image","hidden"].includes(d)}if(["textarea","select","button"].includes(E)||["svg","path","circle","rect","line","polygon","polyline"].includes(E)||M.getAttribute("contenteditable")==="true")return!0;if(L?.excludeSelectors){for(let d of L.excludeSelectors)if(M.matches(d))return!0}return Gt(M,L)},Gt=(M,L)=>{let E=[...jt,...L?.excludeClasses||[]],d=M,z=0,P=5;for(;d&&z<=P;){if(E.some(k=>d.classList.contains(k)))return!0;if(d.classList.contains("MuiDialogContent-root"))break;d=d.parentElement,z++}return!1};import{useEffect as bt,useRef as re,useState as gt}from"react";var vt=({containerRef:M,config:L})=>{let E=L.enabled??!0,d=L.threshold??80,z=L.maxDistance??d*2,P=L.onRefresh,[k,D]=gt(0),[$,X]=gt(!1),F=re(0),fe=re(0),q=re(!1),J=re(!1),ne=re(!1),j=re(0),le=re(!1);return bt(()=>{le.current=$},[$]),bt(()=>{let S=M.current;if(!S||!(E&&typeof P=="function"))return;let Ee=f=>{let C=f instanceof Element?f:null;for(;C&&C!==S;){if(C instanceof HTMLElement&&C.scrollHeight>C.clientHeight+1&&C.scrollTop>0)return!1;C=C.parentElement}return!0},$e=f=>{q.current=!1,J.current=!1,ne.current=!1,!le.current&&f.touches.length===1&&S.scrollTop===0&&Ee(f.target)&&(q.current=!0,F.current=f.touches[0].clientY,fe.current=f.touches[0].clientX)},ee=f=>{if(!q.current||le.current||f.touches.length!==1)return;let C=f.touches[0].clientY-F.current,We=f.touches[0].clientX-fe.current;if(!J.current){if(C<=0||S.scrollTop>0){q.current=!1;return}if(C>8&&C>Math.abs(We))J.current=!0,ne.current=S.scrollTop<0;else return}!ne.current&&f.cancelable&&f.preventDefault();let pe=Math.min(Math.max(C,0)*.5,z);j.current=pe,D(pe)},G=()=>{if(!q.current||(q.current=!1,!J.current))return;J.current=!1,ne.current=!1;let f=j.current;j.current=0,f>=d&&!le.current?(X(!0),D(d),Promise.resolve().then(()=>P()).catch(()=>{}).finally(()=>{X(!1),D(0)})):D(0)};return S.addEventListener("touchstart",$e,{passive:!0}),S.addEventListener("touchmove",ee,{passive:!1}),S.addEventListener("touchend",G,{passive:!0}),S.addEventListener("touchcancel",G,{passive:!0}),()=>{S.removeEventListener("touchstart",$e),S.removeEventListener("touchmove",ee),S.removeEventListener("touchend",G),S.removeEventListener("touchcancel",G)}},[M,E,P,d,z]),{pullDistance:k,isRefreshing:$,pullProgress:Math.min(k/d,1),pullThreshold:d}};import{useEffect as Kt,useState as Vt}from"react";function yt(){let[M,L]=Vt(()=>typeof window>"u"||typeof window.matchMedia!="function"?!1:window.matchMedia("(pointer: coarse)").matches);return Kt(()=>{if(typeof window>"u"||typeof window.matchMedia!="function")return;let E=window.matchMedia("(pointer: coarse)"),d=z=>L(z.matches);return L(E.matches),typeof E.addEventListener=="function"?(E.addEventListener("change",d),()=>E.removeEventListener("change",d)):(E.addListener(d),()=>E.removeListener(d))},[]),M}import{jsx as H,jsxs as Qe}from"react/jsx-runtime";var to={},oo={},ro={},no={},lo={},io={},ao=Zt(({className:M="",style:L={},containerStyle:E={},contentStyle:d={},children:z,onScroll:P,thumb:k=to,track:D=oo,arrows:$=ro,dragScroll:X=no,autoHide:F=lo,pullToRefresh:fe=io,showScrollbar:q=!0,showHorizontalScrollbar:J=!0,detectInnerScroll:ne=!1,scrollTopFab:j=!1},le)=>{let S=yt(),ie=q,Ee=S?!1:J,ee=`os-${eo().replace(/[^a-zA-Z0-9_-]/g,"")}`,G=j!==!1&&j!=null,f=typeof j=="object"?j:{},C=f.threshold??200,We=f.position??"right",pe=f.offset??16,wt=f.background??"#1976d2",Tt=f.color??"#ffffff",Se=f.size??48,[Oe,Mt]=h(!1),Et=O({});A(()=>{Et.current={children:z,onScroll:P,showScrollbar:ie,showHorizontalScrollbar:Ee,thumb:k,track:D,arrows:$,dragScroll:X,autoHide:F}});let Ae=O(null),i=O(null),he=O(null),me=O(null),St=O(null),B=O(null),{pullDistance:ze,isRefreshing:Ce,pullProgress:Fe}=vt({containerRef:i,config:fe}),Je=fe.indicatorColor??"#1976d2",Ct=ze>0||Ce,[He,x]=h(!1),[_,et]=h(!1),[tt,ot]=h(!1),[Ne,Ht]=h({y:0,scrollTop:0}),[be,rt]=h(0),[Lt,Be]=h(0),[ae,nt]=h(!1),[lt,it]=h(!1),[U,at]=h(!1),[_e,kt]=h({x:0,scrollLeft:0}),[Ue,st]=h(0),[Ye,ct]=h(0),[Dt,ut]=h(!1),se=O(!1),[K,dt]=h(!1),[ge,Rt]=h({x:0,y:0,scrollTop:0,scrollLeft:0}),[so,co]=h(null),[Le,ke]=h(null),[uo,It]=h(!1),[Pt,$t]=h(0),ve=O(null),[ft,pt]=h(!1),ye=O(null),te=O(null),oe=O(null),w=Me(()=>{let e=k.color??"#606060";return{width:k.width??8,minHeight:k.minHeight??50,radius:k.radius??(k.width??8)/2,color:e,opacity:k.opacity??.6,hoverColor:k.hoverColor??e,hoverOpacity:k.hoverOpacity??1}},[k]),r=Me(()=>({width:D.width??16,color:D.color??"rgba(128, 128, 128, 0.1)",visible:D.visible??!0,alignment:D.alignment??"outside",radius:D.radius??w.radius??4,margin:D.margin??4,overflowX:D.overflowX??!0,overflowY:D.overflowY??!0}),[D,w.radius]),N=Me(()=>{let e=$.color??"#808080";return{visible:$.visible??!1,step:$.step??50,color:e,opacity:$.opacity??.6,hoverColor:$.hoverColor??e,hoverOpacity:$.hoverOpacity??1}},[$]),xe=Me(()=>({enabled:S?!1:X.enabled??!0,excludeClasses:X.excludeClasses??[],excludeSelectors:X.excludeSelectors??[]}),[X,S]),a=Me(()=>({enabled:F.enabled??!0,delay:F.delay??1500,delayOnWheel:F.delayOnWheel??700,initialDelay:F.initialDelay??200}),[F]),[ce,Wt]=h(()=>(F.initialDelay??200)>0),g=w.width,Ot=r.width,Xe=w.minHeight,Y=N.visible,De=N.step,W=m(()=>{if(!i.current)return;let e=document.activeElement;e&&i.current.contains(e)&&e!==i.current||i.current.focus()},[]);Qt(le,()=>({getScrollContainer:()=>i.current,scrollTo:e=>{i.current&&i.current.scrollTo(e)},get scrollTop(){return i.current?.scrollTop||0},get scrollHeight(){return i.current?.scrollHeight||0},get clientHeight(){return i.current?.clientHeight||0}}),[]);let u=m(()=>{if(B.current){let t=B.current;if(document.contains(t)&&(t.scrollHeight>t.clientHeight+2||t.scrollWidth>t.clientWidth+2))return t;B.current=null}if(!i.current)return null;if(i.current.scrollHeight>i.current.clientHeight+2||i.current.scrollWidth>i.current.clientWidth+2)return B.current=i.current,i.current;if(!ne)return null;let e=i.current.querySelectorAll('[data-virtuoso-scroller], [style*="overflow"], .virtuoso-scroller, [style*="overflow: auto"], [style*="overflow:auto"]');for(let t of e){let o=t;if(o!==i.current&&o.classList.contains("overlay-scrollbar-container"))continue;let n=o.parentElement,l=!1;for(;n&&n!==i.current;){if(n.classList.contains("overlay-scrollbar-container")&&n!==i.current){l=!0;break}n=n.parentElement}if(!l&&(o.scrollHeight>o.clientHeight+2||o.scrollWidth>o.clientWidth+2))return B.current=o,o}return null},[]),V=m(()=>u()!==null,[u]),v=m(()=>{ye.current&&(clearTimeout(ye.current),ye.current=null)},[]),Re=m(()=>{te.current&&(clearTimeout(te.current),te.current=null)},[]),ht=m(()=>{oe.current&&(clearTimeout(oe.current),oe.current=null)},[]),At=m(()=>{Re(),!(_||U||K||se.current)&&(v(),x(!1))},[v,Re,_,U,K]),b=m(e=>{a.enabled&&(v(),ye.current=setTimeout(()=>{x(!1),ye.current=null},e))},[v,a.enabled]),c=m(()=>{let e=u()??i.current;if(!e){x(!1),nt(!1),ut(!1),v();return}!a.enabled&&!ce&&(x(!0),v());let t=e.clientHeight,o=e.scrollHeight,n=e.scrollTop,l=e.clientWidth,s=e.scrollWidth,y=e.scrollLeft,T=o-t>0,p=s-l>0,ue=T||p;nt(T),ut(p),ue||(x(!1),v());let we=0,I=0;if(Ae.current){let Z=window.getComputedStyle(Ae.current),Q=parseFloat(Z.paddingTop)||0;I=parseFloat(Z.paddingBottom)||0,we=Q+I,$t(I)}if(T){let Z=Y?g*2+r.margin*4:r.margin*2,Q=t-Z+we,Ie=t/o,de=Math.max(Q*Ie,Xe),mt=o-t,Xt=Q-de,qt=mt>0?n/mt*Xt:0;rt(de),Be(qt)}else rt(0),Be(0);let Te=s-l;if(Te>0){let Z=l/s,Q=Math.max(l*Z,50),Ie=l-Q,de=Te>0?y/Te*Ie:0;st(Q),ct(de)}else st(0),ct(0)},[u,v,Y,g,Xe,a.enabled,ce]),zt=m(e=>{e.preventDefault(),e.stopPropagation();let t=u();t&&(et(!0),Ht({y:e.clientY,scrollTop:t.scrollTop}),v(),x(!0),W())},[u,v,W]),qe=m(e=>{if(!_)return;let t=u();if(!t)return;let o=t.clientHeight,l=t.scrollHeight-o,s=e.clientY-Ne.y,y=o-be,T=s/y*l,p=Math.max(0,Math.min(l,Ne.scrollTop+T));t.scrollTop=p,c()},[_,Ne,be,c,u]),je=m(()=>{et(!1),V()&&b(a.delay)},[V,b,a.delay]),Ft=m(e=>{if(!me.current)return;let o=me.current.getBoundingClientRect(),n=e.clientY-o.top,l=u();if(!l)return;let s=l.clientHeight,y=l.scrollHeight,p=n/s*(y-s);l.scrollTop=Math.max(0,Math.min(y-s,p)),c(),x(!0),b(a.delay),W()},[c,b,a.delay,u,W]),Nt=m(e=>{if(e.preventDefault(),e.stopPropagation(),!i.current)return;let t=Math.max(0,i.current.scrollTop-De);i.current.scrollTop=t,c(),x(!0),b(a.delay),W()},[c,b,De,a.delay,W]),Bt=m(e=>{if(e.preventDefault(),e.stopPropagation(),!i.current||!he.current)return;let t=i.current,n=he.current.scrollHeight-t.clientHeight,l=Math.min(n,t.scrollTop+De);t.scrollTop=l,c(),x(!0),b(a.delay),W()},[c,b,De,a.delay,W]),_t=m(e=>{e.preventDefault(),e.stopPropagation();let t=u();t&&(at(!0),kt({x:e.clientX,scrollLeft:t.scrollLeft}),v(),x(!0),W())},[u,v,W]),Ge=m(e=>{if(!U)return;let t=u();if(!t)return;let o=t.clientWidth,l=t.scrollWidth-o,s=e.clientX-_e.x,y=o-Ue,T=s/y*l,p=Math.max(0,Math.min(l,_e.scrollLeft+T));t.scrollLeft=p,c()},[U,_e,Ue,c,u]),Ke=m(()=>{at(!1),V()&&b(a.delay)},[V,b,a.delay]),Ut=m(e=>{if(!me.current)return;let o=me.current.getBoundingClientRect(),n=e.clientX-o.left,l=u();if(!l)return;let s=l.clientWidth,y=l.scrollWidth,p=n/s*(y-s);l.scrollLeft=Math.max(0,Math.min(y-s,p)),c(),x(!0),b(a.delay),W()},[c,b,a.delay,u,W]),Yt=m(e=>{if(!xe.enabled||e.defaultPrevented)return;let t=e.target,o=i.current;if(!o||!o.contains(t)||Pe(t,xe)||e.button!==0)return;let n=u();n&&(n.scrollHeight<=n.clientHeight&&n.scrollWidth<=n.clientWidth||(e.preventDefault(),se.current=!0,Rt({x:e.clientX,y:e.clientY,scrollTop:n.scrollTop,scrollLeft:n.scrollLeft||0}),v()))},[xe,Pe,u,v]),Ve=m(e=>{if(!se.current&&!K)return;let t=u();if(!t)return;let o=ge.x-e.clientX,n=ge.y-e.clientY;if(Math.abs(n)<5&&Math.abs(o)<5)return;se.current&&(se.current=!1,dt(!0)),x(!0);let l=Math.max(0,Math.min(t.scrollHeight-t.clientHeight,ge.scrollTop+n)),s=Math.max(0,Math.min(t.scrollWidth-t.clientWidth,ge.scrollLeft+o));t.scrollTop=l,t.scrollLeft=s,c()},[K,ge,u,c]),Ze=m(()=>{let e=K;se.current=!1,dt(!1),e&&V()&&b(a.delay)},[K,V,b,a.delay]);A(()=>{let e=s=>{if(c(),G){let T=s.target?.scrollTop??0;Mt(T>C)}if(ce){P&&P(s);return}v(),x(!0),ht();let y=ft?a.delayOnWheel:a.delay;b(y),P&&P(s)},t=()=>{pt(!0),ve.current&&clearTimeout(ve.current),ve.current=setTimeout(()=>{pt(!1)},300),ht(),oe.current=setTimeout(()=>{x(!0),oe.current=null,b(a.delayOnWheel)},50)},o=[],n=u();n&&o.push(n);let l=i.current;return l&&!n&&(o.push(l),l.querySelectorAll('[data-virtuoso-scroller], [style*="overflow"], .virtuoso-scroller, [style*="overflow: auto"], [style*="overflow:auto"]').forEach(y=>{let T=y;if(T!==l&&T.classList.contains("overlay-scrollbar-container"))return;let p=T.parentElement;for(;p&&p!==l;){if(p.classList.contains("overlay-scrollbar-container")&&p!==l)return;p=p.parentElement}o.push(T)})),o.forEach(s=>{s.addEventListener("scroll",e,{passive:!0}),s.addEventListener("wheel",t,{passive:!0})}),()=>{o.forEach(s=>{s.removeEventListener("scroll",e),s.removeEventListener("wheel",t)}),ve.current&&clearTimeout(ve.current),oe.current&&clearTimeout(oe.current)}},[u,c,P,v,b,a,ft,ce,G,C]),A(()=>{let e=o=>{let n=o.target;if(o.defaultPrevented||n instanceof Element&&Pe(n,xe))return;let l=u();if(!l)return;let{key:s}=o,{scrollTop:y,scrollHeight:T,clientHeight:p}=l,ue=T-p,we=50,I=null;switch(s){case"ArrowUp":o.preventDefault(),I=Math.max(0,y-we);break;case"ArrowDown":o.preventDefault(),I=Math.min(ue,y+we);break;case"PageUp":o.preventDefault(),I=Math.max(0,y-p);break;case"PageDown":o.preventDefault(),I=Math.min(ue,y+p);break;case"Home":o.preventDefault(),I=0;break;case"End":o.preventDefault(),I=ue;break;default:return}if(I!==null){let Te=I/ue,Z=Y?g*2+r.margin*4:r.margin*2,de=(p-Z-be)*Te;Be(de),l.scrollTop=I,v(),x(!0),b(a.delay)}},t=i.current;if(t)return t.addEventListener("keydown",e),()=>{t.removeEventListener("keydown",e)}},[u,Y,g,r.margin,be,v,b,a.delay,xe]),A(()=>(document.addEventListener("mousemove",Ve),document.addEventListener("mouseup",Ze),()=>{document.removeEventListener("mousemove",Ve),document.removeEventListener("mouseup",Ze)}),[K,Ve,Ze]),A(()=>{if(_)return document.addEventListener("mousemove",qe),document.addEventListener("mouseup",je),()=>{document.removeEventListener("mousemove",qe),document.removeEventListener("mouseup",je)}},[_,qe,je]),A(()=>{if(U)return document.addEventListener("mousemove",Ge),document.addEventListener("mouseup",Ke),()=>{document.removeEventListener("mousemove",Ge),document.removeEventListener("mouseup",Ke)}},[U,Ge,Ke]),A(()=>{c();let e=setTimeout(()=>{c()},100);return()=>clearTimeout(e)},[c]),Jt(()=>{It(!0),c(),!a.enabled&&!ce&&V()&&x(!0)},[V,c,a.enabled,ce]),A(()=>{if(a.initialDelay>0){let e=setTimeout(()=>{Wt(!1)},a.initialDelay);return()=>clearTimeout(e)}},[a.initialDelay]),A(()=>{let e=new ResizeObserver(()=>{c()}),t=[];return i.current&&t.push(i.current),he.current&&t.push(he.current),B.current&&document.contains(B.current)&&t.push(B.current),t.forEach(o=>{e.observe(o)}),()=>e.disconnect()},[c]),A(()=>{if(!i.current)return;let e=new MutationObserver(()=>{B.current=null,c()});return e.observe(i.current,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["style"]}),()=>e.disconnect()},[c]);let R=Math.max(Ot,g);return A(()=>{let e="overlay-scrollbar-shared";if(document.getElementById(e))return;let t=document.createElement("style");t.id=e,t.textContent=`
1
+ import{useRef as O,useEffect as P,useState as p,useCallback as m,useMemo as Me,forwardRef as oo,useImperativeHandle as ro,useLayoutEffect as no,useId as lo}from"react";var Qt=["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"],$e=(M,L)=>{if(M instanceof HTMLElement&&M.isContentEditable||M.closest('[role="textbox"],[role="searchbox"]'))return!0;let S=M.tagName.toLowerCase();if(S==="input"){let f=(M.type||"text").toLowerCase();return!["button","submit","reset","image","hidden"].includes(f)}if(["textarea","select","button"].includes(S)||["svg","path","circle","rect","line","polygon","polyline"].includes(S)||M.getAttribute("contenteditable")==="true")return!0;if(L?.excludeSelectors){for(let f of L.excludeSelectors)if(M.matches(f))return!0}return Jt(M,L)},Jt=(M,L)=>{let S=[...Qt,...L?.excludeClasses||[]],f=M,z=0,$=5;for(;f&&z<=$;){if(S.some(D=>f.classList.contains(D)))return!0;if(f.classList.contains("MuiDialogContent-root"))break;f=f.parentElement,z++}return!1};import{useEffect as yt,useRef as re,useState as xt}from"react";var Tt=({containerRef:M,config:L})=>{let S=L.enabled??!0,f=L.threshold??80,z=L.maxDistance??f*2,$=L.onRefresh,[D,k]=xt(0),[W,X]=xt(!1),F=re(0),pe=re(0),q=re(!1),J=re(!1),ne=re(!1),j=re(0),le=re(!1);return yt(()=>{le.current=W},[W]),yt(()=>{let E=M.current;if(!E||!(S&&typeof $=="function"))return;let Se=u=>{let C=u instanceof Element?u:null;for(;C&&C!==E;){if(C instanceof HTMLElement&&C.scrollHeight>C.clientHeight+1&&C.scrollTop>0)return!1;C=C.parentElement}return!0},We=u=>{q.current=!1,J.current=!1,ne.current=!1,!le.current&&u.touches.length===1&&E.scrollTop===0&&Se(u.target)&&(q.current=!0,F.current=u.touches[0].clientY,pe.current=u.touches[0].clientX)},ee=u=>{if(!q.current||le.current||u.touches.length!==1)return;let C=u.touches[0].clientY-F.current,Ee=u.touches[0].clientX-pe.current;if(!J.current){if(C<=0||E.scrollTop>0){q.current=!1;return}if(C>8&&C>Math.abs(Ee))J.current=!0,ne.current=E.scrollTop<0;else return}!ne.current&&u.cancelable&&u.preventDefault();let Ce=Math.min(Math.max(C,0)*.5,z);j.current=Ce,k(Ce)},G=()=>{if(!q.current||(q.current=!1,!J.current))return;J.current=!1,ne.current=!1;let u=j.current;j.current=0,u>=f&&!le.current?(X(!0),k(f),Promise.resolve().then(()=>$()).catch(()=>{}).finally(()=>{X(!1),k(0)})):k(0)};return E.addEventListener("touchstart",We,{passive:!0}),E.addEventListener("touchmove",ee,{passive:!1}),E.addEventListener("touchend",G,{passive:!0}),E.addEventListener("touchcancel",G,{passive:!0}),()=>{E.removeEventListener("touchstart",We),E.removeEventListener("touchmove",ee),E.removeEventListener("touchend",G),E.removeEventListener("touchcancel",G)}},[M,S,$,f,z]),{pullDistance:D,isRefreshing:W,pullProgress:Math.min(D/f,1),pullThreshold:f}};import{useEffect as eo,useState as to}from"react";function wt(){let[M,L]=to(()=>typeof window>"u"||typeof window.matchMedia!="function"?!1:window.matchMedia("(pointer: coarse)").matches);return eo(()=>{if(typeof window>"u"||typeof window.matchMedia!="function")return;let S=window.matchMedia("(pointer: coarse)"),f=z=>L(z.matches);return L(S.matches),typeof S.addEventListener=="function"?(S.addEventListener("change",f),()=>S.removeEventListener("change",f)):(S.addListener(f),()=>S.removeListener(f))},[]),M}import{jsx as H,jsxs as Je}from"react/jsx-runtime";var io={},ao={},so={},co={},uo={},fo={},po=oo(({className:M="",style:L={},containerStyle:S={},contentStyle:f={},children:z,onScroll:$,thumb:D=io,track:k=ao,arrows:W=so,dragScroll:X=co,autoHide:F=uo,pullToRefresh:pe=fo,showScrollbar:q=!0,showHorizontalScrollbar:J=!0,detectInnerScroll:ne=!1,scrollTopFab:j=!1},le)=>{let E=wt(),ie=q,Se=E?!1:J,ee=`os-${lo().replace(/[^a-zA-Z0-9_-]/g,"")}`,G=j!==!1&&j!=null,u=typeof j=="object"?j:{},C=u.threshold??600,Ee=u.idleDelay??400,Ce=u.scrollingOpacity??.45,St=u.position??"right",et=u.offset??16,Et=u.background??"#1976d2",Ct=u.color??"#ffffff",He=u.size??48,[Ae,Ht]=p(!1),[Lt,tt]=p(!1),ae=O(null),Dt=O({});P(()=>{Dt.current={children:z,onScroll:$,showScrollbar:ie,showHorizontalScrollbar:Se,thumb:D,track:k,arrows:W,dragScroll:X,autoHide:F}});let ze=O(null),i=O(null),he=O(null),me=O(null),kt=O(null),B=O(null),{pullDistance:Fe,isRefreshing:Le,pullProgress:Ne}=Tt({containerRef:i,config:pe}),ot=pe.indicatorColor??"#1976d2",Rt=Fe>0||Le,[De,x]=p(!1),[_,rt]=p(!1),[nt,lt]=p(!1),[Be,It]=p({y:0,scrollTop:0}),[be,it]=p(0),[Ot,_e]=p(0),[se,at]=p(!1),[st,ct]=p(!1),[U,ut]=p(!1),[Ue,Pt]=p({x:0,scrollLeft:0}),[Ye,dt]=p(0),[Xe,ft]=p(0),[$t,pt]=p(!1),ce=O(!1),[K,ht]=p(!1),[ge,Wt]=p({x:0,y:0,scrollTop:0,scrollLeft:0}),[ho,mo]=p(null),[ke,Re]=p(null),[bo,At]=p(!1),[zt,Ft]=p(0),ve=O(null),[mt,bt]=p(!1),ye=O(null),te=O(null),oe=O(null),T=Me(()=>{let e=D.color??"#606060";return{width:D.width??8,minHeight:D.minHeight??50,radius:D.radius??(D.width??8)/2,color:e,opacity:D.opacity??.6,hoverColor:D.hoverColor??e,hoverOpacity:D.hoverOpacity??1}},[D]),r=Me(()=>({width:k.width??16,color:k.color??"rgba(128, 128, 128, 0.1)",visible:k.visible??!0,alignment:k.alignment??"outside",radius:k.radius??T.radius??4,margin:k.margin??4,overflowX:k.overflowX??!0,overflowY:k.overflowY??!0}),[k,T.radius]),N=Me(()=>{let e=W.color??"#808080";return{visible:W.visible??!1,step:W.step??50,color:e,opacity:W.opacity??.6,hoverColor:W.hoverColor??e,hoverOpacity:W.hoverOpacity??1}},[W]),xe=Me(()=>({enabled:E?!1:X.enabled??!0,excludeClasses:X.excludeClasses??[],excludeSelectors:X.excludeSelectors??[]}),[X,E]),a=Me(()=>({enabled:F.enabled??!0,delay:F.delay??1500,delayOnWheel:F.delayOnWheel??700,initialDelay:F.initialDelay??200}),[F]),[ue,Nt]=p(()=>(F.initialDelay??200)>0),g=T.width,Bt=r.width,qe=T.minHeight,Y=N.visible,Ie=N.step,A=m(()=>{if(!i.current)return;let e=document.activeElement;e&&i.current.contains(e)&&e!==i.current||i.current.focus()},[]);ro(le,()=>({getScrollContainer:()=>i.current,scrollTo:e=>{i.current&&i.current.scrollTo(e)},get scrollTop(){return i.current?.scrollTop||0},get scrollHeight(){return i.current?.scrollHeight||0},get clientHeight(){return i.current?.clientHeight||0}}),[]);let d=m(()=>{if(B.current){let t=B.current;if(document.contains(t)&&(t.scrollHeight>t.clientHeight+2||t.scrollWidth>t.clientWidth+2))return t;B.current=null}if(!i.current)return null;if(i.current.scrollHeight>i.current.clientHeight+2||i.current.scrollWidth>i.current.clientWidth+2)return B.current=i.current,i.current;if(!ne)return null;let e=i.current.querySelectorAll('[data-virtuoso-scroller], [style*="overflow"], .virtuoso-scroller, [style*="overflow: auto"], [style*="overflow:auto"]');for(let t of e){let o=t;if(o!==i.current&&o.classList.contains("overlay-scrollbar-container"))continue;let n=o.parentElement,l=!1;for(;n&&n!==i.current;){if(n.classList.contains("overlay-scrollbar-container")&&n!==i.current){l=!0;break}n=n.parentElement}if(!l&&(o.scrollHeight>o.clientHeight+2||o.scrollWidth>o.clientWidth+2))return B.current=o,o}return null},[]),V=m(()=>d()!==null,[d]),v=m(()=>{ye.current&&(clearTimeout(ye.current),ye.current=null)},[]),Oe=m(()=>{te.current&&(clearTimeout(te.current),te.current=null)},[]),gt=m(()=>{oe.current&&(clearTimeout(oe.current),oe.current=null)},[]),_t=m(()=>{Oe(),!(_||U||K||ce.current)&&(v(),x(!1))},[v,Oe,_,U,K]),b=m(e=>{a.enabled&&(v(),ye.current=setTimeout(()=>{x(!1),ye.current=null},e))},[v,a.enabled]),c=m(()=>{let e=d()??i.current;if(!e){x(!1),at(!1),pt(!1),v();return}!a.enabled&&!ue&&(x(!0),v());let t=e.clientHeight,o=e.scrollHeight,n=e.scrollTop,l=e.clientWidth,s=e.scrollWidth,y=e.scrollLeft,w=o-t>0,h=s-l>0,de=w||h;at(w),pt(h),de||(x(!1),v());let Te=0,I=0;if(ze.current){let Z=window.getComputedStyle(ze.current),Q=parseFloat(Z.paddingTop)||0;I=parseFloat(Z.paddingBottom)||0,Te=Q+I,Ft(I)}if(w){let Z=Y?g*2+r.margin*4:r.margin*2,Q=t-Z+Te,Pe=t/o,fe=Math.max(Q*Pe,qe),vt=o-t,Vt=Q-fe,Zt=vt>0?n/vt*Vt:0;it(fe),_e(Zt)}else it(0),_e(0);let we=s-l;if(we>0){let Z=l/s,Q=Math.max(l*Z,50),Pe=l-Q,fe=we>0?y/we*Pe:0;dt(Q),ft(fe)}else dt(0),ft(0)},[d,v,Y,g,qe,a.enabled,ue]),Ut=m(e=>{e.preventDefault(),e.stopPropagation();let t=d();t&&(rt(!0),It({y:e.clientY,scrollTop:t.scrollTop}),v(),x(!0),A())},[d,v,A]),je=m(e=>{if(!_)return;let t=d();if(!t)return;let o=t.clientHeight,l=t.scrollHeight-o,s=e.clientY-Be.y,y=o-be,w=s/y*l,h=Math.max(0,Math.min(l,Be.scrollTop+w));t.scrollTop=h,c()},[_,Be,be,c,d]),Ge=m(()=>{rt(!1),V()&&b(a.delay)},[V,b,a.delay]),Yt=m(e=>{if(!me.current)return;let o=me.current.getBoundingClientRect(),n=e.clientY-o.top,l=d();if(!l)return;let s=l.clientHeight,y=l.scrollHeight,h=n/s*(y-s);l.scrollTop=Math.max(0,Math.min(y-s,h)),c(),x(!0),b(a.delay),A()},[c,b,a.delay,d,A]),Xt=m(e=>{if(e.preventDefault(),e.stopPropagation(),!i.current)return;let t=Math.max(0,i.current.scrollTop-Ie);i.current.scrollTop=t,c(),x(!0),b(a.delay),A()},[c,b,Ie,a.delay,A]),qt=m(e=>{if(e.preventDefault(),e.stopPropagation(),!i.current||!he.current)return;let t=i.current,n=he.current.scrollHeight-t.clientHeight,l=Math.min(n,t.scrollTop+Ie);t.scrollTop=l,c(),x(!0),b(a.delay),A()},[c,b,Ie,a.delay,A]),jt=m(e=>{e.preventDefault(),e.stopPropagation();let t=d();t&&(ut(!0),Pt({x:e.clientX,scrollLeft:t.scrollLeft}),v(),x(!0),A())},[d,v,A]),Ke=m(e=>{if(!U)return;let t=d();if(!t)return;let o=t.clientWidth,l=t.scrollWidth-o,s=e.clientX-Ue.x,y=o-Ye,w=s/y*l,h=Math.max(0,Math.min(l,Ue.scrollLeft+w));t.scrollLeft=h,c()},[U,Ue,Ye,c,d]),Ve=m(()=>{ut(!1),V()&&b(a.delay)},[V,b,a.delay]),Gt=m(e=>{if(!me.current)return;let o=me.current.getBoundingClientRect(),n=e.clientX-o.left,l=d();if(!l)return;let s=l.clientWidth,y=l.scrollWidth,h=n/s*(y-s);l.scrollLeft=Math.max(0,Math.min(y-s,h)),c(),x(!0),b(a.delay),A()},[c,b,a.delay,d,A]),Kt=m(e=>{if(!xe.enabled||e.defaultPrevented)return;let t=e.target,o=i.current;if(!o||!o.contains(t)||$e(t,xe)||e.button!==0)return;let n=d();n&&(n.scrollHeight<=n.clientHeight&&n.scrollWidth<=n.clientWidth||(e.preventDefault(),ce.current=!0,Wt({x:e.clientX,y:e.clientY,scrollTop:n.scrollTop,scrollLeft:n.scrollLeft||0}),v()))},[xe,$e,d,v]),Ze=m(e=>{if(!ce.current&&!K)return;let t=d();if(!t)return;let o=ge.x-e.clientX,n=ge.y-e.clientY;if(Math.abs(n)<5&&Math.abs(o)<5)return;ce.current&&(ce.current=!1,ht(!0)),x(!0);let l=Math.max(0,Math.min(t.scrollHeight-t.clientHeight,ge.scrollTop+n)),s=Math.max(0,Math.min(t.scrollWidth-t.clientWidth,ge.scrollLeft+o));t.scrollTop=l,t.scrollLeft=s,c()},[K,ge,d,c]),Qe=m(()=>{let e=K;ce.current=!1,ht(!1),e&&V()&&b(a.delay)},[K,V,b,a.delay]);P(()=>{let e=s=>{if(c(),G){let w=s.target?.scrollTop??0;Ht(w>C),tt(!0),ae.current&&clearTimeout(ae.current),ae.current=setTimeout(()=>{ae.current=null,tt(!1)},Ee)}if(ue){$&&$(s);return}v(),x(!0),gt();let y=mt?a.delayOnWheel:a.delay;b(y),$&&$(s)},t=()=>{bt(!0),ve.current&&clearTimeout(ve.current),ve.current=setTimeout(()=>{bt(!1)},300),gt(),oe.current=setTimeout(()=>{x(!0),oe.current=null,b(a.delayOnWheel)},50)},o=[],n=d();n&&o.push(n);let l=i.current;return l&&!n&&(o.push(l),l.querySelectorAll('[data-virtuoso-scroller], [style*="overflow"], .virtuoso-scroller, [style*="overflow: auto"], [style*="overflow:auto"]').forEach(y=>{let w=y;if(w!==l&&w.classList.contains("overlay-scrollbar-container"))return;let h=w.parentElement;for(;h&&h!==l;){if(h.classList.contains("overlay-scrollbar-container")&&h!==l)return;h=h.parentElement}o.push(w)})),o.forEach(s=>{s.addEventListener("scroll",e,{passive:!0}),s.addEventListener("wheel",t,{passive:!0})}),()=>{o.forEach(s=>{s.removeEventListener("scroll",e),s.removeEventListener("wheel",t)}),ve.current&&clearTimeout(ve.current),oe.current&&clearTimeout(oe.current)}},[d,c,$,v,b,a,mt,ue,G,C,Ee]),P(()=>()=>{ae.current&&clearTimeout(ae.current)},[]),P(()=>{let e=o=>{let n=o.target;if(o.defaultPrevented||n instanceof Element&&$e(n,xe))return;let l=d();if(!l)return;let{key:s}=o,{scrollTop:y,scrollHeight:w,clientHeight:h}=l,de=w-h,Te=50,I=null;switch(s){case"ArrowUp":o.preventDefault(),I=Math.max(0,y-Te);break;case"ArrowDown":o.preventDefault(),I=Math.min(de,y+Te);break;case"PageUp":o.preventDefault(),I=Math.max(0,y-h);break;case"PageDown":o.preventDefault(),I=Math.min(de,y+h);break;case"Home":o.preventDefault(),I=0;break;case"End":o.preventDefault(),I=de;break;default:return}if(I!==null){let we=I/de,Z=Y?g*2+r.margin*4:r.margin*2,fe=(h-Z-be)*we;_e(fe),l.scrollTop=I,v(),x(!0),b(a.delay)}},t=i.current;if(t)return t.addEventListener("keydown",e),()=>{t.removeEventListener("keydown",e)}},[d,Y,g,r.margin,be,v,b,a.delay,xe]),P(()=>(document.addEventListener("mousemove",Ze),document.addEventListener("mouseup",Qe),()=>{document.removeEventListener("mousemove",Ze),document.removeEventListener("mouseup",Qe)}),[K,Ze,Qe]),P(()=>{if(_)return document.addEventListener("mousemove",je),document.addEventListener("mouseup",Ge),()=>{document.removeEventListener("mousemove",je),document.removeEventListener("mouseup",Ge)}},[_,je,Ge]),P(()=>{if(U)return document.addEventListener("mousemove",Ke),document.addEventListener("mouseup",Ve),()=>{document.removeEventListener("mousemove",Ke),document.removeEventListener("mouseup",Ve)}},[U,Ke,Ve]),P(()=>{c();let e=setTimeout(()=>{c()},100);return()=>clearTimeout(e)},[c]),no(()=>{At(!0),c(),!a.enabled&&!ue&&V()&&x(!0)},[V,c,a.enabled,ue]),P(()=>{if(a.initialDelay>0){let e=setTimeout(()=>{Nt(!1)},a.initialDelay);return()=>clearTimeout(e)}},[a.initialDelay]),P(()=>{let e=new ResizeObserver(()=>{c()}),t=[];return i.current&&t.push(i.current),he.current&&t.push(he.current),B.current&&document.contains(B.current)&&t.push(B.current),t.forEach(o=>{e.observe(o)}),()=>e.disconnect()},[c]),P(()=>{if(!i.current)return;let e=new MutationObserver(()=>{B.current=null,c()});return e.observe(i.current,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["style"]}),()=>e.disconnect()},[c]);let R=Math.max(Bt,g);return P(()=>{let e="overlay-scrollbar-shared";if(document.getElementById(e))return;let t=document.createElement("style");t.id=e,t.textContent=`
2
2
  /* ehfuse-editor-content\uB294 \uC2A4\uD06C\uB864\uBC14 \uC720\uC9C0 */
3
3
  .overlay-scrollbar-container .ehfuse-editor-content {
4
4
  scrollbar-width: thin !important;
@@ -27,7 +27,7 @@ import{useRef as O,useEffect as A,useState as h,useCallback as m,useMemo as Me,f
27
27
  from { transform: rotate(0deg); }
28
28
  to { transform: rotate(360deg); }
29
29
  }
30
- `,document.head.appendChild(t)},[]),A(()=>{let e=`overlay-scrollbar-instance-${ee}`,t=document.getElementById(e);t&&t.remove();let o=document.createElement("style");o.id=e;let n=`.${ee}`;return o.textContent=`
30
+ `,document.head.appendChild(t)},[]),P(()=>{let e=`overlay-scrollbar-instance-${ee}`,t=document.getElementById(e);t&&t.remove();let o=document.createElement("style");o.id=e;let n=`.${ee}`;return o.textContent=`
31
31
  ${n} {
32
32
  scrollbar-width: none !important;
33
33
  -ms-overflow-style: none !important;
@@ -38,5 +38,5 @@ import{useRef as O,useEffect as A,useState as h,useCallback as m,useMemo as Me,f
38
38
  height: 0 !important;
39
39
  }
40
40
  ${n}::-webkit-scrollbar-track { display: none !important; }
41
- ${n}::-webkit-scrollbar-thumb { display: none !important; }`,document.head.appendChild(o),()=>{document.getElementById(e)?.remove()}},[ee]),Qe("div",{ref:Ae,className:`overlay-scrollbar-wrapper ${M}`,onMouseLeave:At,style:{display:"flex",flexDirection:"column",position:"relative",minHeight:0,height:"100%",flex:"1 1 0%",overflow:"visible",...L},children:[Ct&&H("div",{className:"overlay-scrollbar-pull-indicator",style:{position:"absolute",top:0,left:"50%",transform:`translate(-50%, ${ze-68}px)`,transition:Ce?"transform 0.15s ease-out":ze===0?"transform 0.2s ease-out":"none",width:60,height:60,borderRadius:"50%",background:"#ffffff",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.25)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1001,pointerEvents:"none",opacity:Ce?1:Math.min(Fe*1.5,1)},children:Ce?H("svg",{width:"36",height:"36",viewBox:"0 0 24 24",style:{animation:"overlay-scrollbar-ptr-spin 0.8s linear infinite"},children:H("circle",{cx:"12",cy:"12",r:"9",fill:"none",stroke:Je,strokeWidth:"2.5",strokeLinecap:"round",strokeDasharray:"42",strokeDashoffset:"14"})}):H("svg",{width:"36",height:"36",viewBox:"0 0 24 24",style:{transform:`rotate(${Fe*270}deg)`,opacity:Fe>=1?1:.6},children:H("path",{d:"M17.65 6.35A7.958 7.958 0 0 0 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08A5.99 5.99 0 0 1 12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z",fill:Je})})}),H("div",{ref:i,className:`overlay-scrollbar-container ${ee}`,tabIndex:-1,onMouseDown:Yt,style:{display:"flex",width:"100%",flex:"1 1 auto",minHeight:0,overflow:"auto",outline:"none",userSelect:K?"none":"auto",...E},children:H("div",{ref:he,className:"overlay-scrollbar-content",style:{flex:"1 1 0%",minHeight:0,display:"flex",flexDirection:"column",boxSizing:"border-box",...d},children:z})}),ie&&ae&&(r.overflowY??!0)&&Qe("div",{ref:me,className:"overlay-scrollbar-track",onMouseEnter:()=>{v(),te.current=setTimeout(()=>{x(!0),te.current=null},100)},onMouseLeave:()=>{Re(),_||b(a.delay)},style:{position:"absolute",top:0,right:0,width:`${R}px`,height:"100%",opacity:He?1:0,transition:"opacity 0.2s ease-in-out",cursor:"pointer",zIndex:1e3,pointerEvents:"auto"},children:[r.visible&&H("div",{className:"overlay-scrollbar-track-background",onClick:e=>{e.preventDefault(),e.stopPropagation(),Ft(e)},style:{position:"absolute",top:Y?`${w.width+r.margin*2}px`:`${r.margin}px`,right:r.alignment==="outside"?"0px":`${(R-w.width)/2}px`,width:`${w.width}px`,height:Y?`calc(100% - ${w.width*2+r.margin*4}px)`:`calc(100% - ${r.margin*2}px)`,backgroundColor:r.color,borderRadius:`${r.radius}px`,cursor:"pointer"}}),H("div",{ref:St,className:"overlay-scrollbar-thumb",onMouseDown:zt,onMouseEnter:()=>ot(!0),onMouseLeave:()=>ot(!1),style:{position:"absolute",top:`${(Y?g+r.margin*2:r.margin)+Lt}px`,right:r.alignment==="outside"?"0px":`${(R-g)/2}px`,width:`${g}px`,height:`${Math.max(be,Xe)}px`,backgroundColor:tt||_?w.hoverColor:w.color,opacity:tt||_?w.hoverOpacity:w.opacity,borderRadius:`${w.radius}px`,cursor:"pointer",transition:"background-color 0.2s ease-in-out, opacity 0.2s ease-in-out"}})]}),ie&&ae&&Y&&H("div",{className:"overlay-scrollbar-up-arrow",onClick:Nt,onMouseEnter:()=>ke("up"),onMouseLeave:()=>ke(null),style:{position:"absolute",top:`${r.margin}px`,right:r.alignment==="outside"?"0px":`${(R-g)/2}px`,width:`${g}px`,height:`${g}px`,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",fontSize:`${Math.max(g*.75,8)}px`,color:Le==="up"?N.hoverColor:N.color,userSelect:"none",zIndex:1001,opacity:He?Le==="up"?N.hoverOpacity:N.opacity:0,transition:"opacity 0.2s ease-in-out, color 0.15s ease-in-out"},children:"\u25B2"}),ie&&ae&&Y&&H("div",{className:"overlay-scrollbar-down-arrow",onClick:Bt,onMouseEnter:()=>ke("down"),onMouseLeave:()=>ke(null),style:{position:"absolute",bottom:`${r.margin}px`,right:r.alignment==="outside"?"0px":`${(R-g)/2}px`,width:`${g}px`,height:`${g}px`,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",fontSize:`${Math.max(g*.75,8)}px`,color:Le==="down"?N.hoverColor:N.color,userSelect:"none",zIndex:1001,opacity:He?Le==="down"?N.hoverOpacity:N.opacity:0,transition:"opacity 0.2s ease-in-out, color 0.15s ease-in-out"},children:"\u25BC"}),ie&&Ee&&Dt&&(r.overflowX??!0)&&Qe("div",{className:"overlay-scrollbar-horizontal-track",onMouseEnter:()=>{v(),te.current=setTimeout(()=>{x(!0),te.current=null},100)},onMouseLeave:()=>{Re(),U||b(a.delay)},style:{position:"absolute",bottom:`${Pt}px`,left:0,width:"100%",height:`${R}px`,opacity:He?1:0,transition:"opacity 0.2s ease-in-out",cursor:"pointer",zIndex:1e3,pointerEvents:"auto"},children:[r.visible&&H("div",{className:"overlay-scrollbar-horizontal-track-background",onClick:e=>{e.preventDefault(),e.stopPropagation(),Ut(e)},style:{position:"absolute",bottom:r.alignment==="outside"?"0px":`${(R-g)/2}px`,left:`${r.margin}px`,right:ae?r.alignment==="outside"?`${R-r.margin}px`:`${R}px`:`${r.margin}px`,height:`${g}px`,backgroundColor:r.color,borderRadius:`${r.radius}px`,cursor:"pointer"}}),H("div",{className:"overlay-scrollbar-horizontal-thumb",onMouseDown:_t,onMouseEnter:()=>it(!0),onMouseLeave:()=>it(!1),style:{position:"absolute",bottom:r.alignment==="outside"?"0px":`${(R-g)/2}px`,left:`${r.margin+Ye}px`,right:ae?r.alignment==="outside"?`${R-r.margin}px`:`${R}px`:"auto",maxWidth:ae?r.alignment==="outside"?`calc(100% - ${r.margin+Ye+R-r.margin}px)`:`calc(100% - ${r.margin+Ye+R}px)`:"none",width:`${Math.max(Ue,50)}px`,height:`${g}px`,backgroundColor:lt||U?w.hoverColor:w.color,opacity:lt||U?w.hoverOpacity:w.opacity,borderRadius:`${w.radius}px`,cursor:"pointer",transition:"background-color 0.2s ease-in-out, opacity 0.2s ease-in-out"}})]}),G&&H("button",{type:"button","aria-label":"\uB9E8 \uC704\uB85C",onClick:()=>i.current?.scrollTo({top:0,behavior:"smooth"}),style:{position:"absolute",[We]:pe,bottom:pe,zIndex:1200,width:Se,height:Se,padding:0,display:"flex",alignItems:"center",justifyContent:"center",border:"none",borderRadius:"50%",backgroundColor:wt,color:Tt,boxShadow:"0 3px 8px rgba(15, 23, 42, 0.28)",cursor:"pointer",opacity:Oe?1:0,transform:Oe?"translateY(0) scale(1)":"translateY(8px) scale(0.9)",pointerEvents:Oe?"auto":"none",transition:"opacity 0.2s ease, transform 0.2s ease"},children:H("svg",{width:Math.round(Se*.5),height:Math.round(Se*.5),viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:H("polyline",{points:"18 15 12 9 6 15"})})})]})}),xt=ao;export{xt as OverlayScrollbar,xt as default};
41
+ ${n}::-webkit-scrollbar-thumb { display: none !important; }`,document.head.appendChild(o),()=>{document.getElementById(e)?.remove()}},[ee]),Je("div",{ref:ze,className:`overlay-scrollbar-wrapper ${M}`,onMouseLeave:_t,style:{display:"flex",flexDirection:"column",position:"relative",minHeight:0,height:"100%",flex:"1 1 0%",overflow:"visible",...L},children:[Rt&&H("div",{className:"overlay-scrollbar-pull-indicator",style:{position:"absolute",top:0,left:"50%",transform:`translate(-50%, ${Fe-68}px)`,transition:Le?"transform 0.15s ease-out":Fe===0?"transform 0.2s ease-out":"none",width:60,height:60,borderRadius:"50%",background:"#ffffff",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.25)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1001,pointerEvents:"none",opacity:Le?1:Math.min(Ne*1.5,1)},children:Le?H("svg",{width:"36",height:"36",viewBox:"0 0 24 24",style:{animation:"overlay-scrollbar-ptr-spin 0.8s linear infinite"},children:H("circle",{cx:"12",cy:"12",r:"9",fill:"none",stroke:ot,strokeWidth:"2.5",strokeLinecap:"round",strokeDasharray:"42",strokeDashoffset:"14"})}):H("svg",{width:"36",height:"36",viewBox:"0 0 24 24",style:{transform:`rotate(${Ne*270}deg)`,opacity:Ne>=1?1:.6},children:H("path",{d:"M17.65 6.35A7.958 7.958 0 0 0 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08A5.99 5.99 0 0 1 12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z",fill:ot})})}),H("div",{ref:i,className:`overlay-scrollbar-container ${ee}`,tabIndex:-1,onMouseDown:Kt,style:{display:"flex",width:"100%",flex:"1 1 auto",minHeight:0,overflow:"auto",outline:"none",userSelect:K?"none":"auto",...S},children:H("div",{ref:he,className:"overlay-scrollbar-content",style:{flex:"1 1 0%",minHeight:0,display:"flex",flexDirection:"column",boxSizing:"border-box",...f},children:z})}),ie&&se&&(r.overflowY??!0)&&Je("div",{ref:me,className:"overlay-scrollbar-track",onMouseEnter:()=>{v(),te.current=setTimeout(()=>{x(!0),te.current=null},100)},onMouseLeave:()=>{Oe(),_||b(a.delay)},style:{position:"absolute",top:0,right:0,width:`${R}px`,height:"100%",opacity:De?1:0,transition:"opacity 0.2s ease-in-out",cursor:"pointer",zIndex:1e3,pointerEvents:"auto"},children:[r.visible&&H("div",{className:"overlay-scrollbar-track-background",onClick:e=>{e.preventDefault(),e.stopPropagation(),Yt(e)},style:{position:"absolute",top:Y?`${T.width+r.margin*2}px`:`${r.margin}px`,right:r.alignment==="outside"?"0px":`${(R-T.width)/2}px`,width:`${T.width}px`,height:Y?`calc(100% - ${T.width*2+r.margin*4}px)`:`calc(100% - ${r.margin*2}px)`,backgroundColor:r.color,borderRadius:`${r.radius}px`,cursor:"pointer"}}),H("div",{ref:kt,className:"overlay-scrollbar-thumb",onMouseDown:Ut,onMouseEnter:()=>lt(!0),onMouseLeave:()=>lt(!1),style:{position:"absolute",top:`${(Y?g+r.margin*2:r.margin)+Ot}px`,right:r.alignment==="outside"?"0px":`${(R-g)/2}px`,width:`${g}px`,height:`${Math.max(be,qe)}px`,backgroundColor:nt||_?T.hoverColor:T.color,opacity:nt||_?T.hoverOpacity:T.opacity,borderRadius:`${T.radius}px`,cursor:"pointer",transition:"background-color 0.2s ease-in-out, opacity 0.2s ease-in-out"}})]}),ie&&se&&Y&&H("div",{className:"overlay-scrollbar-up-arrow",onClick:Xt,onMouseEnter:()=>Re("up"),onMouseLeave:()=>Re(null),style:{position:"absolute",top:`${r.margin}px`,right:r.alignment==="outside"?"0px":`${(R-g)/2}px`,width:`${g}px`,height:`${g}px`,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",fontSize:`${Math.max(g*.75,8)}px`,color:ke==="up"?N.hoverColor:N.color,userSelect:"none",zIndex:1001,opacity:De?ke==="up"?N.hoverOpacity:N.opacity:0,transition:"opacity 0.2s ease-in-out, color 0.15s ease-in-out"},children:"\u25B2"}),ie&&se&&Y&&H("div",{className:"overlay-scrollbar-down-arrow",onClick:qt,onMouseEnter:()=>Re("down"),onMouseLeave:()=>Re(null),style:{position:"absolute",bottom:`${r.margin}px`,right:r.alignment==="outside"?"0px":`${(R-g)/2}px`,width:`${g}px`,height:`${g}px`,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",fontSize:`${Math.max(g*.75,8)}px`,color:ke==="down"?N.hoverColor:N.color,userSelect:"none",zIndex:1001,opacity:De?ke==="down"?N.hoverOpacity:N.opacity:0,transition:"opacity 0.2s ease-in-out, color 0.15s ease-in-out"},children:"\u25BC"}),ie&&Se&&$t&&(r.overflowX??!0)&&Je("div",{className:"overlay-scrollbar-horizontal-track",onMouseEnter:()=>{v(),te.current=setTimeout(()=>{x(!0),te.current=null},100)},onMouseLeave:()=>{Oe(),U||b(a.delay)},style:{position:"absolute",bottom:`${zt}px`,left:0,width:"100%",height:`${R}px`,opacity:De?1:0,transition:"opacity 0.2s ease-in-out",cursor:"pointer",zIndex:1e3,pointerEvents:"auto"},children:[r.visible&&H("div",{className:"overlay-scrollbar-horizontal-track-background",onClick:e=>{e.preventDefault(),e.stopPropagation(),Gt(e)},style:{position:"absolute",bottom:r.alignment==="outside"?"0px":`${(R-g)/2}px`,left:`${r.margin}px`,right:se?r.alignment==="outside"?`${R-r.margin}px`:`${R}px`:`${r.margin}px`,height:`${g}px`,backgroundColor:r.color,borderRadius:`${r.radius}px`,cursor:"pointer"}}),H("div",{className:"overlay-scrollbar-horizontal-thumb",onMouseDown:jt,onMouseEnter:()=>ct(!0),onMouseLeave:()=>ct(!1),style:{position:"absolute",bottom:r.alignment==="outside"?"0px":`${(R-g)/2}px`,left:`${r.margin+Xe}px`,right:se?r.alignment==="outside"?`${R-r.margin}px`:`${R}px`:"auto",maxWidth:se?r.alignment==="outside"?`calc(100% - ${r.margin+Xe+R-r.margin}px)`:`calc(100% - ${r.margin+Xe+R}px)`:"none",width:`${Math.max(Ye,50)}px`,height:`${g}px`,backgroundColor:st||U?T.hoverColor:T.color,opacity:st||U?T.hoverOpacity:T.opacity,borderRadius:`${T.radius}px`,cursor:"pointer",transition:"background-color 0.2s ease-in-out, opacity 0.2s ease-in-out"}})]}),G&&H("button",{type:"button","aria-label":"\uB9E8 \uC704\uB85C",onClick:()=>i.current?.scrollTo({top:0,behavior:"smooth"}),style:{position:"absolute",[St]:et,bottom:et,zIndex:1200,width:He,height:He,padding:0,display:"flex",alignItems:"center",justifyContent:"center",border:"none",borderRadius:"50%",backgroundColor:Et,color:Ct,boxShadow:"0 3px 8px rgba(15, 23, 42, 0.28)",cursor:"pointer",opacity:Ae?Lt?Ce:1:0,transform:Ae?"translateY(0) scale(1)":"translateY(8px) scale(0.9)",pointerEvents:Ae?"auto":"none",transition:"opacity 0.25s ease, transform 0.25s ease"},children:H("svg",{width:Math.round(He*.5),height:Math.round(He*.5),viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:H("polyline",{points:"18 15 12 9 6 15"})})})]})}),Mt=po;export{Mt as OverlayScrollbar,Mt as default};
42
42
  //# sourceMappingURL=index.esm.js.map