NBA: Cooper Flagg posts season-high 43 as Mavericks outlast Pacers