The area of the region enclosed by the curve \( f(x) = \max\{\sin x, \cos x\} ,\ -\pi \le x \le \pi \) and the x-axis is:
\( 2\sqrt{2}(\sqrt{2}+1) \)
\( 4(\sqrt{2}) \)
\( 4 \)
\( 2(\sqrt{2}+1) \)