Fixed stack overflow in child resolution

Resolved a "Maximum call stack size exceeded" error that occurred when processing large arrays of child elements. The fix chunks large arrays into smaller batches (32,768 items at a time) before merging them, preventing the call stack from exceeding JavaScript limits.