Estimating spatially and temporally complex range dynamics when detection is imperfect