Quasiprobabilities of work and heat in an open quantum system