Weakly unique factorization modules