Sorts components alphabetically within categories: internal ports, components, 0, 1.