  The main goal of this paper is a detailed study of asymptotic cones of the
mapping class groups. In particular, we prove that every asymptotic cone of a
mapping class group has a bi-Lipschitz equivariant embedding into a product of
real trees, sending limits of hierarchy paths onto geodesics, and with image a
median subspace. One of the applications is that a group with Kazhdan's
property (T) can have only finitely many pairwise non-conjugate homomorphisms
into a mapping class group. We also give a new proof of the rank conjecture of
Brock and Farb (previously proved by Behrstock and Minsky, and independently by
Hamenstaedt).
