Title: Electromagnetic theory of diffractive optics