Nondemolition quasiprobabilities of work and heat in the presence of a non-Markovian environment | Synapse