Invasions, Rebellions, and the Fall of Imperial China