User-Agent strings are compatibility labels, not trusted device records. Browsers often include several historical product tokens, so the last distinctive token usually matters more than the first. For example, Edge and Opera include a Chrome token because they use Chromium, while Chrome and Firefox on iOS report WebKit-compatible strings.
This parser applies ordered rules so specific clients such as Edg/, OPR/, SamsungBrowser/, CriOS/, and FxiOS/ win before generic Chrome or Safari rules. It also calls out reduced fields and platform ambiguities instead of presenting guesses as facts.