A point \(P\) lies in the same plane as a given square with side length \(1\). The vertices of the square, taken counterclockwise, are labeled as \(A\), \(B\), \(C\), and \(D\). The distances from point \(P\) to the vertices \(A\), \(B\), and \(C\) are \(u\), \(v\), and \(w\), respectively. Determine the greatest distance that \(P\) can be from vertex \(D\), given that \(u^2 + v^2 = w^2\). The original answer is in the form \(k + \sqrt{m}\). Please provide the value of \(k + m\).

Let's think step by step and output the final answer within \boxed{}.
user