Messenger Monte-Carlo MAPPINGS V (M^3) -- A self-consistent
  three-dimensional photoionization code
  The Messenger Interface Monte-Carlo Mappings V (M^3) is a photoionization
code adopting the fully self-consistent Monte-Carlo radiative transfer
technique, which presents a major advance over previous photoionization models
with simple geometries. M^3 is designed for modeling nebulae in arbitrary
three-dimensional geometries. In this paper, we describe the Monte-Carlo
radiative transfer technique and the microphysics implemented in M^3, including
the photoionization, collisional ionization, the free-free and free-bound
recombination, and two-photon radiation. We put M^3 through the
Lexington/Meudon benchmarks to test the reliability of the new code. We apply
M^3 to three HII region models with fiducial geometries, demonstrating that M^3
is capable of dealing with nebulae with complex geometries. M^3 is a promising
tool for understanding emission-line behavior in the era of SDSS-V/LVM and
JWST, which will provide high-quality data of spatially-resolved nearby HII
regions and highly turbulent local and high-redshift HII regions.
