Square ABCD has side length 1. Point $P$ lies on $\overline{BC}$ and point $Q$ lies on $\overline{CD}$ such that $\angle PAQ = 45^\circ.$ The area of triangle BPQ is $\frac{7}{47}.$ Compute the area of triangle APQ.