  Charge carriers in magic angle graphene come in eight flavors described by a
combination of their spin, valley, and sublattice polarizations. When the
inversion and time reversal symmetries are broken by the substrate or by strong
interactions, the degeneracy of the flavors can be lifted and their
corresponding bands can be filled sequentially. Due to their non-trivial band
topology and Berry curvature, each of the bands is classified by a topological
Chern number, leading to the quantum anomalous Hall and Chern insulator states
at integer fillings $\nu$ of the bands. It has been recently predicted,
however, that depending on the local atomic-scale arrangements of the graphene
and the encapsulating hBN lattices, rather than being a global topological
invariant, the Chern number C may become position dependent, altering transport
and magnetic properties of the itinerant electrons. Using a SQUID-on-tip, we
directly image the nanoscale Berry-curvature-induced equilibrium orbital
magnetism, the polarity of which is governed by the local Chern number, and
detect its two constituent components associated with the drift and the
self-rotation of the electronic wave packets. At $\nu=1$, we observe local
zero-field valley-polarized Chern insulators forming a mosaic of microscopic
patches of C=-1, 0, or 1, governed by the local sublattice polarization,
consistent with predictions. Upon further filling, we find a first-order phase
transition due to recondensation of electrons from valley K to K', which leads
to irreversible flips of the local Chern number and the magnetization, and to
the formation of valley domain walls giving rise to hysteretic global anomalous
Hall resistance. The findings shed new light on the structure and dynamics of
topological phases and call for exploration of the controllable formation of
flavor domain walls and their utilization in twistronic devices.
