计算积分 $\int_0^{\frac{\pi}{4}} \mathrm{~d} \theta \int_0^{\tan \theta \sec \theta} \mathrm{e}^{r \cos \theta} r \mathrm{~d} r+\int_{\frac{\pi}{4}}^{\frac{\pi}{2}} \mathrm{~d} \theta \int_0^{\frac{1}{\sin \theta}} \mathrm{e}^{r \cos \theta} r \mathrm{~d} r=$.
A. e
B. ${e}^{-1}$
C. 0
D. 1