Energy-based representation of multiport circuits and antennas suitable for near-and far-field syntheses