8. In the right trapezoid $A B C D$, it is known that $A D \perp A B$, $A B / / D C, A B=4, A D=D C=2$. Let $N$ be the midpoint of side $D C$, and $M$ be a moving point within or on the boundary of trapezoid $A B C D$. Then the maximum value of $\overrightarrow{A M} \cdot \overrightarrow{A N}$ is