Cofnod E-bost: Population dynamics of epidemic and endemic states of drug-resistance emergence in infectious diseases