Actually in this case unlike your other question the limit can be considered from both directions without confusion. Observe that
$$\sin^4\sqrt{x} = (1-\cos^2\sqrt{x})^2$$
where we made the change to $\cos$ to note more easily that in the case of $x<0$, $\cos^2\sqrt{-x} = \cosh^2\sqrt{x}$ without any ambiguity or choice of branch in the complex plane. You can algebraically prove this for yourself. This expression will always evaluate to a single (not multivalued) real number.
Having said that, consider rewriting the limmand as
$$\left(a\cdot \frac{\sin^4\sqrt{x}}{x^2}\cdot\frac{x^2}{\cos x - 1}\cdot(\sqrt{\cos x} + 1)\right)^{\frac{\tan\left(\log^2(1+\sqrt{2}x)\right)}{\log^2(1+\sqrt{2}x)}\cdot\frac{\log^2(1+\sqrt{2}x)}{2x^2}\cdot\frac{x^2}{\sin^2 x}\cdot\frac{\sin^2 x}{\log(1+\sin^2 x)}\cdot 2}$$
where we have multiplied by a series of terms of the form $\frac{f(x)}{f(x)}$ leaving the original value of the function unaltered. If taken, the limit in the exponent evaluates to
$$\lim_{x\to0}\frac{\tan\left(\log^2(1+\sqrt{2}x)\right)}{\log^2(1+\sqrt{2}x)}\cdot\frac{\log^2(1+\sqrt{2}x)}{2x^2}\cdot\frac{x^2}{\sin^2 x}\cdot\frac{\sin^2 x}{\log(1+\sin^2 x)}\cdot 2 = 1\cdot 1 \cdot 1 \cdot 1 \cdot 2 = 2$$
by using the known limits of $\frac{\tan u}{u}$, $\frac{\log(1+u)}{u}$, and $\frac{\sin u}{u}$ as $u\to 0$ . This would mean that the limit for the base must approach either $\pm 4$ (but we will get to the feasibility of both options later). Now ready to tackle the limit of the base, we get
$$\lim_{x\to0}a\cdot \frac{\sin^4\sqrt{x}}{x^2}\cdot\frac{x^2}{\cos x - 1}\cdot(\sqrt{\cos x} + 1) = a \cdot 1 \cdot -2 \cdot 2 = -4a$$
using the known limits $\frac{\sin u}{u}$ and $\frac{1-\cos u}{u^2}$.
From here it seems like a simple matter that our choices for $a$ from what we determined earlier are $\pm 1$. Unlike the last time, attempting to make the base negative will make the full exponential evaluation multivalued since the exponent is an arbitrary real function instead of being restricted to the integers. This means we have to ensure the base is positive in a neighborhood of $0$, and there is only one possible value, $\boxed{a=-1}$, that meets this criteria.