"""MFA presentation — regex HTML timestamp injection + the Animate-All
progress bar. Everything between "raw MFA results" and "timestamped HTML"."""
from src.ui.mfa_lookups import (
_build_crossword_groups, _build_enriched_json, _build_timestamp_lookups,
_extend_word_timestamps,
)
def _ts_progress_bar_html(total_segments, rate, animated=True):
"""Return HTML for a progress bar showing Segment x/N.
When *animated* is False, shows static "Preparing Alignment..." at 0%.
When True, a single requestAnimationFrame loop drives BOTH the fill
(`transform:scaleX(0→1)`) AND the counter text from one shared
elapsed-time source — so they cannot drift, and `transform:scaleX`
can never overflow the container's bounding box (no width-animation
jitter). The script is injected via an `
` trick because
Gradio innerHTML doesn't execute `