1?x>1:false,e=m>1?m-1>x:false;n.classList.toggle("is-more-left",r?e:s);n.classList.toggle("is-more-right",r?s:e);};document.querySelectorAll(".rooster-lms-tabs:not([data-rl-strip])").forEach(function(n){n.setAttribute("data-rl-strip","");var c=n.querySelector("[aria-current],[aria-selected=\"true\"]");if(c?n.scrollWidth>n.clientWidth:false){var a=(c.closest("li")||c).getBoundingClientRect(),b=n.getBoundingClientRect();n.scrollLeft+=a.left+a.width/2-(b.left+b.width/2);}u(n);n.addEventListener("scroll",function(){u(n);},{passive:true});window.addEventListener("resize",function(){u(n);});});})();'; public static function early( string $html ): string { if ( ! str_contains( $html, 'rooster-lms-tabs' ) || 1 !== preg_match( '/\bclass="[^"]*\brooster-lms-tabs\b/', $html ) ) { return $html; } return EarlyScripts::after( $html, self::JS ); } }