1'use strict';23// Same-task parent -> child entities (product categories, nested blog categories) land in one4// pass. The parent is written by the same task, so no dependency edge can wait for5// it (a task is never its own producer), and building every record before the first write6// holds every child as `parent-not-imported`. Instead the task runs one depth level at a time:7// level n+1 is built -- and its parent resolved from the crosswalk -- only after level n is8// written. Same depth-ascending rule as `wix-build.js` buildCategory, for a streamed importer.910// Splits records into depth levels, keeping input order inside a level. A record whose parent is11// not in the source set is a root here; its builder decides whether that parent is resolvable.12// A record on a parent cycle (or deeper than `maxDepth`) is never placed in a level: it is13// returned in `unplaceable` for the caller to hold.