A Hybrid Systems Approach to Event-Triggered Consensus of Multiagent Systems With Packet Losses