A density version of the Halpern–Läuchli theorem