In convex quadrilateral $ABCD$, $AB=BC=13$, $CD=DA=24$, and $\angle D=60^\circ$.  Points $X$ and $Y$ are the midpoints of $\overline{BC}$ and $\overline{DA}$ respectively.  Compute $XY^2$ (the square of the length of $XY$).
We begin by drawing a diagram: [asy]
pair A,B,C,D,X,Y,H;
A=(-12,12*sqrt(3)); D=(0,0); C=(12,12*sqrt(3)); B=(0,5+12*sqrt(3)); X=(B+C)/2; Y=(A+D)/2; H=(A+C)/2;
draw(A--B--C--D--cycle); draw(X--Y);

label("$A$",A,W); label("$B$",B,N); label("$C$",C,E); label("$D$",D,S); label("$X$",X,NE); label("$Y$",Y,SW);

label("$24$",D--C,SE); label("$13$",A--B,NW); label("$60^\circ$",(0,4)); draw(B--D,heavycyan); draw(A--C,heavycyan); label("$H$",H,NW);
[/asy] We draw diagonals $\overline{AC}$ and $\overline{BD}$ and let the intersection point be $H$.  Since $\angle ADC=60^\circ$ and $AD=CD$, $\triangle ACD$ is equilateral, so $AC=24$.  Since $ABCD$ has two pairs of equal sides, it is a kite, and so its diagonals are perpendicular and $\overline{BD}$ bisects $\overline{AC}$.  Thus, \[AH=HC=24/2=12.\]Applying the Pythagorean Theorem on $\triangle BHC$ and $\triangle CHD$ gives \[BH=\sqrt{BC^2-HC^2}=\sqrt{13^2-12^2}=5\]and \[HD=\sqrt{CD^2-HC^2}=\sqrt{24^2-12^2}=12\sqrt{3}.\][asy]
size(180);
pair A,B,C,D,X,Y,H;
A=(-12,12*sqrt(3)); D=(0,0); C=(12,12*sqrt(3)); B=(0,5+12*sqrt(3)); X=(B+C)/2; Y=(A+D)/2; H=(A+C)/2;
draw(A--B--C--D--cycle); draw(X--Y);

label("$A$",A,W); label("$B$",B,N); label("$C$",C,E); label("$D$",D,S); label("$X$",X,NE); label("$Y$",Y,SW);

draw(B--D,heavycyan); draw(A--C,heavycyan); label("$H$",H,NW);
pair W; W = (C+D)/2; draw(X--W--Y,dashed); label("$Y'$",W,SE);
draw(rightanglemark(B,H,C,20),heavycyan);
[/asy]


Let $Y'$ be the midpoint of $\overline{CD}$.  We look at triangle $BCD$.  Since segment $\overline{XY'}$ connects midpoints $X$ and $Y'$, it is parallel to $\overline{BD}$ and has half the length of $\overline{BD}$.  Thus, \[XY' = \frac{1}{2}(BH+HD)=\frac{1}{2}(5+12\sqrt{3}).\]Now, we look at triangle $ACD$.  Similarly, since $Y$ and $Y'$ are midpoints, $\overline{YY'}$ is parallel to $\overline{AC}$ and has half the length of $\overline{AC}$, so \[YY' = 24/2=12.\]Since $\overline{BD} \perp \overline{AC}$, we have $\overline{XY'}\perp \overline{YY'}$, so $\angle XY'Y=90^\circ$.  Finally, we use the Pythagorean theorem on $\triangle XY'Y$ to compute \begin{align*}
XY^2=YY'^2+XY'^2&=12^2+\left(\frac{1}{2}(5+12\sqrt{3})\right)^2\\
&=144+\frac{1}{4}(25+120\sqrt{3}+144\cdot 3) \\
&= \boxed{\frac{1033}{4}+30\sqrt{3}}. \end{align*}