How does the inverter/charger prioritize different power sources in various working modes?