3. Let $x, y, z \in [0,1]$, then the maximum value of $M=\sqrt{|x-y|}+\sqrt{|y-z|}+\sqrt{|z-x|}$ is $\qquad$

Translate the above text into English, please retain the original text's line breaks and format, and output the translation result directly.
Assume $x \geqslant y \geqslant z$, by the Cauchy-Schwarz inequality we get $(\sqrt{x-y}+\sqrt{y-z})^{2} \leqslant 2[(x-y)+(y-z)]$ $=2(x-z) \Rightarrow M \leqslant(\sqrt{2}+1) \sqrt{x-z} \leqslant \sqrt{2}+1$.
Equality holds when $\left\{\begin{array}{l}\sqrt{x-y}=\sqrt{y-z}=\frac{\sqrt{2}}{2}, \\ x-z=1\end{array} \Rightarrow x=1, y=\frac{1}{2}, z=0\right.$.
Therefore, the maximum value of $M=\sqrt{|x-y|}+\sqrt{|y-z|}+\sqrt{|z-x|}$ is $\sqrt{2}+1$.