/**
 * Minified by jsDelivr using Terser v5.48.0.
 * Original file: /npm/scroll-padlock@3.1.0/dist/scroll-padlock.js
 *
 * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
 */
const stylers={};export function setStyle(e){const t=globalThis,{document:l}=t,{documentElement:s,scrollingElement:o,head:c,body:n}=l,{selector:i=".scroll-padlock",element:r=o||s,formatter:h=({offsetWidth:e=0,clientWidth:t=0})=>`--scrollbar-width: ${e-t}px;`}=e||{};let d=0,f=0,g=0,a=0;const W=r===n||r===s||r===o;W&&(d=t.innerWidth,f=t.innerHeight,g=t.scrollY,a=t.scrollX),W||(g=r.scrollTop,a=r.scrollLeft),!W&&r instanceof t.HTMLElement&&(d=r.offsetWidth,f=r.offsetHeight);const{clientWidth:m,clientHeight:H,scrollWidth:p,scrollHeight:u}=r,y=stylers[i]||l.createElement("style");c.contains(y)||c.append(y);const{sheet:E}=y;for(stylers[i]=y;E?.cssRules.length;)E?.deleteRule(0);return E?.insertRule(`${i}{${h({offsetWidth:d,offsetHeight:f,clientWidth:m,clientHeight:H,scrollHeight:u,scrollWidth:p,scrollTop:g,scrollLeft:a})}}`),y}
//# sourceMappingURL=/sm/e60fc25aaa5acab715be0b1ca6cc0a41f582b4a20252d41480f8df337de11370.map