Build 576754stable
Module 379261
578 characters · in no known chunkDependencies
Source Raw
function(e,t,n){"use strict";n.d(t,{r:()=>o});var i=n(627968),r=n(64700),a=n(503698),s=n.n(a),l=n(767216);function o(e){let{children:t,className:n,style:a}=e,o=r.useRef(null),d=r.useRef(null),[c,u]=r.useState(null);return r.useLayoutEffect(()=>{!function(){let e=o.current,t=d.current;if(null==e||null==t)return;let n=t.scrollWidth-e.clientWidth;u(n>0?n:null)}()},[t]),(0,i.jsx)("div",{ref:o,className:s()(l.kL,n),"data-marquee-overflow":null!=c,style:a,children:(0,i.jsx)("span",{ref:d,className:l.Qq,style:null!=c?{"--custom-marquee-overflow":`${c}px`}:void 0,children:t})})}}