The study of gasphase metallicity and its spatial distribution at high redshift is crucial to understand the processes that shaped the growth and evolution of galaxies in the early Universe. Here we study the spatially resolved metallicity in three systems at z  6  8 namely A2744YD4 BDF3299 and COSMOS24108 with JWST NIRSpec IFU lowresolution R  100 spectroscopic observations. These are among the highestz sources in which metallicity gradients have been probed so far. Each of these systems hosts several spatial components in the process of merging within a few kiloparsecs identified from the restframe UV and optical stellar continuum and ionised gas emission line maps. The sources have heterogeneous properties with stellar masses logMSUBSUBMSUBSUB 7.69.3 star formation rates SFRs 115 MSUBSUB yrSUP1SUP and gasphase metallicities 12logOH 7.78.3 which exhibit a large scatter within each system. Their properties are generally consistent with those of the highestredshift samples to date z  3  10 though the sources in A2744YD4 and COSMOS24108 are at the high end of the massmetallicity relation MZR defined by the z  3  10 sources. Moreover the targets in this work follow the predicted slope of the MZR at z  6  8 from most cosmological simulations. The gasphase metallicity gradients are consistent with being flat in the main sources of each system. Flat metallicity gradients are thought to arise from gas mixing processes on galaxy scales such as mergers or galactic outflows and supernova winds driven by intense stellar feedback which wash out any gradient formed in the galaxy. The existence of flat gradients at z  6  8 sets also important constraints on future cosmological simulations and chemical evolution models whose predictions on the cosmic evolution of metallicity gradients often differ significantly especially at high redshift but are mostly limited to z  3 so far.
['galaxies: high-redshift', 'galaxies: abundances', 'galaxies: ISM', 'galaxies: evolution', 'techniques: imaging spectroscopy', 'techniques: high angular resolution', 'Astrophysics - Astrophysics of Galaxies']
Gasphase metallicity gradients in galaxies at z  68
{'Gas-phase metallicity gradients in galaxies at z ∼ 6 -8': 'G. Venturi 1,2, ⋆ , S. Carniani 1,2 , E. Parlanti 1 , M. Kohandel 1 , M. Curti 3 , A. Pallottini 1 , L. Vallini 4 , S. Arribas 5 , A. J. Bunker 6 , A. J. Cameron 6 , M. Castellano 12 , A. Ferrara 1 , A. Fontana 12 , S. Gallerani 1 , V. Gelli 7,8 , R. Maiolino 9,10,11 , E. Ntormousi 1 , C. Pacifici 13 , L. Pentericci 12 , S. Salvadori 14,2 , and E. Vanzella 4  \n- 1 Scuola Normale Superiore, Piazza dei Cavalieri 7, I-56126 Pisa, Italy\n- 2 INAF - Osservatorio Astrofisico di Arcetri, Largo E. Fermi 5, I-50125 Firenze, Italy\n- 3 European Southern Observatory, Karl-Schwarzschild-Strasse 2, 85748, Garching, Germany\n- 4 INAF - Osservatorio di Astrofisica e Scienza dello Spazio, via Gobetti 93 / 3, I-40129, Bologna, Italy\n- 5 Centro de Astrobiología (CAB), CSIC-INTA, Cra. de Ajalvir Km. 4, 28850, Torrejón de Ardoz, Madrid, Spain\n- 6 Department of Physics, University of Oxford, Denys Wilkinson Building, Keble Road, Oxford, OX1 3RH, UK\n- 7 Cosmic Dawn Center (DAWN), Jagtvej 128, 2200, Copenhagen N, Denmark\n- 8 Niels Bohr Institute, University of Copenhagen, Jagtvej 128, 2200, Copenhagen N, Denmark\n- 9 Kavli Institute for Cosmology, University of Cambridge, Madingley Road, Cambridge, CB3 0HA, UK\n- 10 Cavendish Laboratory - Astrophysics Group, University of Cambridge, 19 JJ Thomson Avenue, Cambridge, CB3 0HE, UK\n- 11 Department of Physics and Astronomy, University College London, Gower Street, London WC1E 6BT, UK\n- 12 INAF - Osservatorio Astronomico di Roma, via di Frascati 33, I-00078 Monte Porzio Catone, Italy\n- 13 Space Telescope Science Institute, 3700 San Martin Drive, Baltimore, MD 21218, USA\n- 14 Dipartimento di Fisica e Astronomia, Università degli Studi di Firenze, Largo E. Fermi 1, 50125, Firenze, Italy  \nReceived 5 March 2024; accepted 12 August 2024', 'ABSTRACT': 'The study of gas-phase metallicity and its spatial distribution at high redshift is crucial to understand the processes that shaped the growth and evolution of galaxies in the early Universe. Here we study the spatially resolved metallicity in three systems at z ∼ 6-8, namely A2744-YD4, BDF-3299, and COSMOS24108, with JWST NIRSpec IFU low-resolution ( R ∼ 100) spectroscopic observations. These are among the highestz sources in which metallicity gradients have been probed so far. Each of these systems hosts several spatial components in the process of merging within a few kiloparsecs, identified from the rest-frame UV and optical stellar continuum and ionised gas emission line maps. The sources have heterogeneous properties, with stellar masses log( M ∗ / M ⊙ ) ∼ 7.6-9.3, star formation rates (SFRs) ∼ 1-15 M ⊙ yr -1 , and gas-phase metallicities 12 + log(O / H) ∼ 7.7-8.3, which exhibit a large scatter within each system. Their properties are generally consistent with those of the highest-redshift samples to date ( z ∼ 3-10), though the sources in A2744-YD4 and COSMOS24108 are at the high end of the mass-metallicity relation (MZR) defined by the z ∼ 3-10 sources. Moreover, the targets in this work follow the predicted slope of the MZR at z ∼ 6-8 from most cosmological simulations. The gas-phase metallicity gradients are consistent with being flat in the main sources of each system. Flat metallicity gradients are thought to arise from gas mixing processes on galaxy scales, such as mergers or galactic outflows and supernova winds driven by intense stellar feedback, which wash out any gradient formed in the galaxy. The existence of flat gradients at z ∼ 6-8 sets also important constraints on future cosmological simulations and chemical evolution models, whose predictions on the cosmic evolution of metallicity gradients often di ff er significantly, especially at high redshift, but are mostly limited to z ≲ 3 so far.  \nKey words. Galaxies: high-redshift - Galaxies: abundances - Galaxies: ISM - Galaxies: evolution - Techniques: imaging spectroscopy - Techniques: high angular resolution', '1. Introduction': "Gas-phase metallicity, its scaling relations with other galactic properties, and its spatial distribution are fundamental tools to study and understand the evolution of galaxies (e.g. Maiolino & Mannucci 2019). The interplay between gas accretion, star formation, outflows, and mergers regulates the growth of galaxies and the buildup of their metal content, leading to the correlation between gas-phase metallicity and stellar mass in galaxies known as mass-metallicity relation (MZR; e.g. Davé et al. 2011; Pallottini et al. 2014; Somerville & Davé 2015). The spatial distribution of metals in galaxies, usually described through radial metallicity gradients, bears the imprint of these underlying processes. Therefore, spatially resolved studies of metallicity in the  \nearly Universe, where the formation and primordial growth of galaxies were taking place, are key to better constrain the main mechanisms that have contributed to shape them.  \nNegative (radially decreasing) gradients are usually interpreted as resulting from an inside-out galaxy formation scenario, in which stars start forming earlier in the inner parts of galaxies and thus have more time to chemically enrich the inner regions than the outer ones (e.g. Samland et al. 1997; Prantzos & Boissier 2000; Davé et al. 2011; Pilkington et al. 2012; Gibson et al. 2013; Hemler et al. 2021; Tissera et al. 2022). Flattened gradients could arise from radial mixing of gas and redistribution of metals on galaxy scales, induced by supernova (SN) winds within the galaxy or galactic outflows of metal-enriched material expelled from the galaxy and re-accreted in the outer regions (so-called galactic fountains), driven by intense stellar feedback (e.g. Gibson et al. 2013; Ma et al. 2017), as well as by galaxy  \nFig. 1. Simple sketch summarising the three main classes of radial gasphase metallicity gradients and possible physical origin. Negative (decreasing) gradients can be interpreted as the result of the inside-out growth of a galaxy, in which star formation and the following chemical enrichment start earlier in the inner regions. Flat gradients can result from radial mixing processes, such as galaxy mergers as well as SN winds redistributing the metals in the interstellar medium (ISM) and galactic outflows of metal-enriched gas evacuated (or re-accreted) in the outer regions. Positive (increasing) inverted gradients may arise from accretion of pristine gas to the central regions of the galaxy; this can also lead to flattened gradients.  \n<!-- image -->  \nmerging and interactions (e.g. Rupke et al. 2010b,a; Rich et al. 2012; Torres-Flores et al. 2014). Finally, positive (radially increasing; also called inverted) gradients may be produced by accretion of external pristine gas towards the central regions of the galaxy (e.g. Ceverino et al. 2016); this could also contribute to flatten the metallicity gradient, if not invert it. Particularly strong metal-loaded galactic outflows could also contribute to produce a positive gradient, by moving the metal-rich gas from the central starburst regions to the outskirts (e.g. Tissera et al. 2022). A schematic cartoon that summarises the above framework is shown in Fig. 1.  \nIn the local Universe, most spiral galaxies show negative metallicity gradients, with more metal-enriched gas in the inner than in the outer regions of the galaxy (e.g. Magrini et al. 2009, 2017; Stanghellini & Haywood 2010; Luck et al. 2011 for the Milky Way; Zaritsky et al. 1994; Magrini et al. 2010; Kewley et al. 2010; Bresolin 2011; Sánchez et al. 2014; Berg et al. 2015; Ho et al. 2015; Belfiore et al. 2017 for other local galaxies). By using metallicity diagnostics that trace past metal enrichment, primarily planetary nebulae (PNe; up to 5-10 Gyr ago, i.e. z ≲ 2) some studies have suggested that the Milky Way and nearby galaxies had flatter gradients in the past which  \ngrew progressively steeper with cosmic time (Stanghellini et al. 2014; Stanghellini & Haywood 2018; Magrini et al. 2016). A dependence of gradient slope with mass has been observed in the local Universe, with more massive galaxies exhibiting progressively steeper gradients, while low-mass galaxies having almost flat gradients (Belfiore et al. 2017). This relation between mass and metallicity gradient may be the result of an evolutionary sequence in mass, with more massive, more evolved galaxies having steeper gradients and low-mass, less evolved ones, analogues of highz galaxies, having flatter gradients (e.g. Maiolino &Mannucci 2019).  \nCosmological simulations of galaxy evolution make very different predictions on metallicity gradients at high redshift (up to z ∼ 3), which can strongly vary depending on prescriptions on star formation and stellar feedback models and on their relative contribution to gas mixing as compared to mergers (e.g. Gibson et al. 2013; Ma et al. 2017; Hemler et al. 2021; Tissera et al. 2022). For example, according to the FIRE simulations (Hopkins et al. 2014), mergers and rapid variations of metallicity gradients in highz galaxies, induced by starburst episodes which drive strong outflows and disrupt the gas disc, would flatten any negative gradients previously developed, especially in low-mass galaxies where feedback mechanisms are more e ffi -cient (Ma et al. 2017). Instead, the TNG50 simulations (Pillepich et al. 2019; Nelson et al. 2019) which feature less bursty feedback, predict negative gradients at all redshifts, steeper (more negative) with increasing z (Hemler et al. 2021). The metallicity gradients resulting from the MUGS ('normal' feedback; Stinson et al. 2010) and MaGICC ('enhanced' feedback; Brook et al. 2012) simulation suites are compared in Gibson et al. (2013). The enhanced feedback (including pre-SN early stellar feedback from massive stars) re-distributes energy and re-cycled ISM material over large scales, through re-accretion in the outer parts of the galaxy of gas expelled via outflows. In this case, relatively flat and temporally invariant abundance gradients are predicted, in contrast to the steeper negative gradients at increasing z emerging from the normal feedback scenario. Finally, the EAGLE simulations (Schaye et al. 2015) find that the median gradient is zero (flat) at all redshifts, but with the scatter around the median increasing with z due to individual galaxies transitioning between steep (either negative or positive) and flatter gradients (Tissera et al. 2022). The authors report that this behaviour results from the higher frequency of major mergers at higher z leading to episodes of enhanced accretion of low-metallicity gas which trigger intense star formation and ejection of metalenriched gas.  \nNon-cosmological chemical evolution models have also been employed to study the evolution of metallicity gradients with cosmic time, mostly for the Milky Way. Mott et al. (2013), assuming an inside-out formation of the disc, a constant star formation e ffi ciency (SFE) along the disc, and the presence of radial flows with varying speed, predict an inversion of the gradients (from negative to positive) at z ≳ 1, due to a strong infall of primordial gas in the innermost disc regions at early times; only a variable SFE does not lead to an inversion of the gradients at high z in their models. Kubryk et al. (2015) study the role of the radial motions of gas and stars on the evolution of abundance profiles in the Milky Way disc, finding steep abundance profiles at high z which flatten with time, as a result of the inside-out formation of the disc. Mollá et al. (2019) investigate the role of the growth of the stellar disc, the e ff ect of infall rate and star formation prescriptions, as well as the pre-enrichment of the infall gas, and find a smooth evolution of the gradients with a slight flattening from z = 4 to 1. Finally, the first principles-based model of  \nSharda et al. (2021) finds that the gradient in Milky Way-like galaxies has steepened over time and also predicts the evolution of metallicity gradients with redshift in galaxy samples matched in both stellar masses and abundances, finding that disc galaxies transition from the advection- to the accretion-dominated regime from high to low z ; in general little evolution of the gradients is predicted for z ≳ 1.  \nObservations at the cosmic noon epoch (i.e., z ∼ 1-4) have found heterogeneous results, with both negative, positive, and flat metallicity gradients (e.g. Cresci et al. 2010; Yuan et al. 2011; Queyrel et al. 2012; Swinbank et al. 2012; Stott et al. 2014; Troncoso et al. 2014; Jones et al. 2013, 2015; Leethochawalit et al. 2016; Wuyts et al. 2016; Wang et al. 2017, 2022; Carton et al. 2018; Förster Schreiber et al. 2018; Curti et al. 2020a). Nevertheless, the majority of highz measurements is consistent with little or no cosmic evolution of metallicity gradients, which are found to be flat or only moderately negative or positive ( ≲ | ± 0 . 1 | dex kpc -1 ; see e.g. the compilation in Curti et al. 2020a).  \nAt higher redshift ( z ∼ 7), Vallini et al. (2024) also found flat gradients by making use of a physically motivated Bayesian model to derive metallicities from rest-frame far-infrared lines ([O iii ] 88 µ m and [C ii ] 158 µ m) from Atacama Large Millimeter / submillimeter Array (ALMA) observations. However, as the authors point out as a caveat, there may be systematics in comparing their results with gradients of O / H abundance obtained with the more standard methods based on optical lines, since the adopted model does not take into account the likely enhancement of O / C at low metallicities (see e.g. Maiolino & Mannucci 2019), which would result in the model returning higher values of metallicity. Therefore, while their results consistent with flat gradients at z ∼ 7 are very significant, they require independent confirmation.  \nThe James Webb Space Telescope (JWST) has recently opened up the possibility of measuring metallicity gradients in the first 1-2 Gyr of the Universe by using rest-frame optical emission lines (Wang et al. 2022; Rodríguez Del Pino et al. 2023; Arribas et al. 2023) which are extensively used and calibrated at lower redshifts (e.g. Curti et al. 2017, 2020b). In this work, we study the spatially resolved gas-phase metallicity and investigate the shape of metallicity gradients at high redshift ( z ≳ 6), by tracing the warm ( T ∼ 10 4 K) ionised gas emission. Specifically, we observed three highz systems with the Near-InfraRed Spectrograph (NIRSpec) on board JWST in its Integral Field Unit (IFU) mode with the low-spectral resolution PRISM / CLEAR( R ∼ 100) disperser-filter combination. These are A2744-YD4, part of the proto-cluster A2744-z7p9OD ( z ∼ 7.88), BDF-3299 ( z ∼ 7.11), and COSMOS24108 ( z ∼ 6.36). Basic information on the targets is given in Table 1. We trace gas-phase metallicity by making use of strong-line calibrators relying on rest-frame optical and nearUV emission lines. We also present the basic properties of each source, specifically stellar mass, obtained from spectral energy distribution (SED) fitting, and star formation rate (SFR), from H β or H α . The star formation history of these targets is studied in detail in a separate paper (Kohandel et al., in prep.).  \nThroughout this work, the reported wavelengths are in vacuum and we adopt a flat Λ CDM cosmology with H 0 ≃ 67.7 km s -1 Mpc -1 , Ω M ≃ 0.31, and ΩΛ ≃ 0.69 (Planck Collaboration et al. 2020).", '2. Description of observations, data reduction, and analysis': "The observations employed in this work were carried out between October and December 2022 as part of the JWST GO  \nprogram ID 1893 (PI: S. Carniani; Carniani et al. 2021). The three sources were observed for 15.102 ks ( ∼ 4 h) on-source each (22.059 ks with overheads; ∼ 6 h) with 1.678 ks of background exposure time each (2.830 ks with overheads). The observations were performed with the PRISM / CLEAR disperser-filter combination and an eight-point dither 'medium' cycling pattern (step ∼ 0.5 '' ). The JWST NIRSpec ∼ 3 '' × 3 '' IFU PRISM observations simultaneously span the spectral range 0.6-5.2 µ m with a spectral resolution ranging between R ∼ 30-330.", '2.1. Data reduction': "We retrieved the raw data from the MAST archive and we ran the three stages of the pipeline using version 1.11 with CRDS (calibration reference data system) context 'jwst\\_1094.pmap'. First, at stage 1 'calwebb\\_detector1', the pipeline applied the detector-level corrections (e.g. check for saturation, dark exposure subtraction, flagging of bad pixels and cosmic-ray persistences) and performed ramp fitting for individual exposures. We then calibrated the count rate images by executing stage 2 'cal-webb\\_spec2' of the pipeline, which corrects for flat field and performs the wavelength calibration. The background was subtracted from each exposure during this stage by using the observations of the dedicated background for each target. We processed the background targets up to stage 2 of the pipeline, then we applied the background step for the science target. In the background step, the pipeline subtracts the background exposure from each target exposure in the detector space. Finally, each calibrated exposure was combined in stage 3 'calwebb\\_spec3' by using 'drizzle' weighting and a spaxel size of 0.05 '' to obtain the final cubes. During stage 3, we applied the outlier rejection step built in the pipeline and then a sigma clipping to remove any residual outliers in the final cube.", '2.2. Data analysis': 'In this section, we describe the analysis of the NIRSpec R100 IFU data. In brief, we obtained the emission line fluxes from emission-line modelling of the spectra, which were used to infer the gas-phase metallicity. This was done on both an integrated basis (to get the integrated metallicity of each target) and a spatially resolved one, in this case both spaxel-by-spaxel (to produce maps) and in concentric radial annuli (to obtain radial gradients). From the integrated spectra, we also obtained the stellar mass ( M ∗ ) of each source from SED fitting and their SFR from the emission-line modelling. We provide more details in the following.', '2.2.1. Emission line fitting': "The main goal of this work is to measure radial gas-phase metallicity gradients. To do so, we infer the oxygen abundance relative to hydrogen (12 + log(O / H)), a proxy of gas-phase metallicity, by making use of the optical and near-UV strong-line diagnostic ratios reported in Table 2. We adopt the new diagnostic ratio ˆ R = 0.47 R2 + 0.88 R3, first introduced in Laseter et al. (2024), in place of the more traditional R23 = ([O ii ] λλ 3727,30 + [O iii ] λλ 4960,5008) / H β , since the former is more suited for highz galaxies, while the latter is a projection mostly driven by lowmetallicity local analogues. We adopt the best-fit polynomial calibrations from Curti et al. (2017, 2020b), slightly revisited in Curti et al. (2023a,b) to better probe the low-O / H regime, to infer the gas metallicity from the combination of the above ratios.  \nTable 1. Basic information on the observed targets.  \nNotes. ( a ) From this work. ( b ) The reported scale is corrected for the lensing magnification factor of ∼ 2 (Morishita et al. 2023; Bergamini et al. 2023).  \nTable 2. Emission line diagnostic ratios used in this work together with their compact notation.  \nWetested other gas-phase metallicity calibrations (e.g. Nakajima et al. 2022; Sanders et al. 2024). These gave 12 + log(O / H) values similar to the Curti et al. ones within 0.1 dex, consistent with the uncertainties, and virtually no di ff erence in the metallicity radial gradients.  \nThe full width at half maximum (FWHM) of the point spread function (PSF) of JWST depends on wavelength. Specifically, the PSF FWHM of NIRSpec IFU ranges from around 0.09 '' at 1 µ m up to around 0.16 '' at 4.5 µ m, and the variation with wavelength is stronger in the direction perpendicular to the IFU slices than along them (D'Eugenio et al. 2023). Since the aim of this work is to obtain spatially resolved metallicities from emission line ratios sometimes far in wavelength (see Table 2), we applied a wavelength-dependent spatial smoothing to the data cube prior to the line fitting with the aim of achieving the same spatial resolution at all wavelengths. We adopted the PSF FWHM curves from D'Eugenio et al. (2023), empirically calibrated by matching NIRSpec IFU observations with NIRCam ones of the same target reported in their Eqs. 3 and 4, for the along- and across-slice cases, respectively. The smoothing was done by convolving the cube with a wavelength-dependent 2D Gaussian kernel in order to obtain a smoothed cube having the same spatial resolution at each wavelength, specifically the PSF FWHM reported in D'Eugenio et al. (2023) at the wavelength of the highest-wavelength line of interest for the along-slice case (which has the largest FWHM among the two cases). This corresponds to FWHMgoal ∼ 0.16 '' (at [O iii ]) for A2744-YD4, ∼ 0.14 '' (at [O iii ]) for BDF-3299, and ∼ 0.18 '' (at H α -[S ii ]) for COSMOS24108. Specifically, the 2D Gaussian kernel to be used for the convolution, at a given wavelength λ , was defined as follows: FWHM 2 kern;dir ( λ ) = FWHM 2 goal ( λ ) - FWHM 2 mod;dir ( λ ), where FWHMmod;dir is the model FWHM from D'Eugenio et al. (2023) and 'dir' indicates the direction, either along or across the slices.  \nIn general, we employed the original unsmoothed data cube for the flux maps of continuum and emission lines and for integrated measurements from circular apertures, while we adopted the smoothed data cube for the maps and radial profiles involving line ratios and metallicity, which would have otherwise been a ff ected by the wavelength-dependence of the PSF. In case of  \nA2744-YD4, the highestz target of our sample, we adopted the smoothed data cube for every map, to obtain visually clearer maps as compared to the more noisy ones from the unsmoothed cube.  \nThe data analysis consisted in modelling the rest-frame optical and near-UV emission lines available in the observed spectral range. The emission lines are spectrally unresolved in the PRISM spectra (the spectral resolution is σ res ∼ 1250 km s -1 at ∼ 3 µ m and σ res ∼ 450 km s -1 at ∼ 5 µ m), therefore a single Gaussian function per line was used. We fitted the [O iii ]-H β , the [O ii ]-[Ne iii ]-H γ , and the H α -[N ii ]-[S ii ] line complexes separately. The [N ii ] 6550,85 was included to allow for a better modelling of the H α line profile, which was otherwise showing a marked residual in its redward wing. This was done only when fitting integrated spectra from circular apertures or concentric annuli for radial profiles, not in the lower-S / N case of spaxelby-spaxel fitting, for which no residual wing indicative of [N ii ] was detected above the noise. For each line complex, the velocity was tied to be the same for all the lines, while we allowed the line width to vary to match the PRISM spectral resolution, given that all lines are spectrally unresolved as mentioned. We fixed the flux ratios [O iii ] λ 5008 / λ 4960 and [N ii ] λ 6585 / λ 6550 to their theoretical value of 3 (Storey & Zeippen 2000). We included an underlying first-order polynomial to model the continuum. We accounted for the Balmer break of the continuum at around 3645 Å rest-frame, when needed, by employing three (first-order) polynomials, one modelling the jump and the other two on each side of it.  \nThe line fluxes used to infer the metallicity or the SFR were first corrected for dust extinction, when possible (see below), using the H γ / H β ratio (for A2744-YD4 and BDF-3299) or H α / H β (for COSMOS24108), only when both lines had S / N > 3. We adopted a Calzetti et al. (2000) reddening curve, with an RV = 4.05, suitable for highz low-metallicity (12 + log(O / H) < 8.5) star-forming galaxies at the wavelengths of interest here of ≳ 3000 Å (see e.g. Shivaei et al. 2020). We assumed the theoretical extinction-free H γ / H β and H α / H β ratios of 0.466 and 2.87, respectively, valid for case-B recombination and an electron temperature of T e ∼ 10 4 K (Osterbrock & Ferland 2006), typical of the warm ionised gas emitting rest-frame optical lines.  \nWe selected the line ratio diagnostics for the metallicity estimation in an adaptive way, based on the line S / N. Specifically, a certain ratio (e.g. [Ne iii ] / [O ii ]) was employed only when all the lines involved in it had S / N > 3. In this way, for each fitted spectrum we only selected the sub-sample of line ratio diagnostics whose line fluxes exceeded the S / N threshold, instead of using all the ratios (even those involving S / N < 3 lines) or none of them (when just one or a few of the lines were below the S / N threshold). Finally, given a set of diagnostic ratios, the best-fit metallicity was obtained by minimising the chi-squared defined simultaneously by the di ff erent observed ratios and their relative calibration curves, weighted by the observed uncertainties and  \nthe intrinsic dispersion of the calibration (added in quadrature; see Curti et al. 2020b).  \nWe first modelled the emission lines in integrated spectra extracted from circular apertures centred on each sub-source present in the three studied systems. From these, we obtained the integrated gas-phase metallicity (as described above) and SFR of each sub-source. The SFR was obtained from the extinctioncorrected flux of H α , using the relation from Kennicutt & Evans (2012). In A2744-YD4 and BDF-3299, for which H α was not available, the SFR was obtained from the extinction-corrected flux of H β , converted to H α by adopting the theoretical H α / H β ratio of 2.87. We employed circular apertures of 0.15 '' radius for A2744-YD4 and COSMOS24108, and of 0.1 '' for BDF-3299, due to the spatial vicinity of the sources in this latter system.  \nThe emission line modelling was then performed both on a spaxel-by-spaxel basis (for both the unsmoothed and the smoothed data cubes) and in concentric radial annuli centred on each source (for the smoothed data cube). The latter was done to increase the S / N on the emission lines and get more robust estimates of metallicity with the goal of obtaining metallicity gradients. For this annular line modelling, we extracted integrated spectra at each radius by collapsing the spaxels within concentric circular annuli. The annuli, having radial width of 1 spaxel (0.05 '' ) each, were centred on each of the main spatial components detected in each targeted system, with a variable maximum aperture radius depending on the component extension (as described in the next sections separately for each target).  \nThe extinction-correction of emission line fluxes used to infer metallicity was done only for the case of integrated spectra from circular apertures and from concentric radial annuli. This was not possible for the spaxel-by-spaxel case because, among the useful Balmer lines tracing extinction, H γ is detected in almost no spaxels in A2744-YD4 and BDF-3299. Therefore, the maps of metallicity were obtained without accounting for possible extinction. For COSMOS24108, also including H α in the spectral range, H β is detected in a large enough number of spaxels to attempt for an extinction correction of the line fluxes for the metallicity. However, the resulting map is very similar to the non-extinction-corrected one, only more noisy, therefore we report the metallicity map obtained without the extinction correction.", '2.2.2. SED fitting': 'With the goal of obtaining the stellar mass of each target, we fitted the spatially integrated spectra extracted from the data cube by using the SED fitting code bagpipes (Carnall et al. 2018). We adopted the stellar population models by Bruzual & Charlot (2003) and included the nebular emission with cloudy (Ferland et al. 2017) with the ionisation parameter ( -3 . 0 < log U < 0 . 0) as a free parameter and adopting a [C / O] = [C / O] ⊙ . We assumed a Kroupa (2001) initial mass function truncated at 0.01 and 100 M ⊙ and a Calzetti et al. (2000) attenuation curve. Finally, we used a non-parametric star-formation history model with continuity priors (see Leja et al. 2019) and with four time bins: 0 < t < 10 Myr, 10 < t < 50 Myr, 50 < t < 100 Myr, and 100 < t < 300 Myr.', '3. A2744-YD4': "A2744-YD4 is part of the proto-cluster A2744-z7p9OD at z ∼ 7.883 located behind the strong lensing cluster Abell 2744. The proto-cluster includes 22 sources at 7 < z < 9 identified  \nthrough combined deep HST and Spitzer IRAC photometry (Laporte et al. 2014; Zheng et al. 2014; Atek et al. 2015; Ishigaki et al. 2016) as part of the Hubble Frontier Fields program (Lotz et al. 2017). Seven of them were recently spectroscopically confirmed to be at z = 7.88 through JWST NIRSpec MSA spectroscopy (Morishita et al. 2023). This makes A2744-z7p9OD the most distant proto-cluster known so far. The system is highly over-dense, with an excess of surface number density from the field average δ = ( n -n ) / n ∼ 130 + 66 -51 (Ishigaki et al. 2016).  \nThe ∼ 3 '' × 3 '' IFU FOV of our observations includes five sources of the proto-cluster known as the 'quintet', namely YD1, YD4, YD6, YD7, and ZD1, as well as a new source identified by Hashimoto et al. (2023) and named s1 (Fig. 2, top-left). We only partially cover the East component of YD7 (named YD7E), while its emission toward to West lies outside the FOV. The lensing magnification factor of the source in the FOV is µ ≃ 2.0 (Morishita et al. 2023; Bergamini et al. 2023). YD4, at the centre of our IFU observation, was reported to be at z = 8.38 based on Ly α and ALMA [C ii ] 158 µ m and [O iii ] 88 µ m line emission (Laporte et al. 2017, 2019; Carniani et al. 2020). Recently, Morishita et al. (2023) measured z = 7.88 for YD4 based on the detection of high-S / N[O iii ] 4959,5007 Å and H β emission lines in high-spectral resolution ( R 2700) NIRSpec MSA observations, thus ruling out the previous redshift measurement.  \nThe top-left panel of Fig. 2 shows the map of the continuum emission in the range 2-3 µ mobserved wavelength ( ∼ 0.230.34 µ m rest-frame). In addition to the sources named YD4, YD6, YD1, s1, YD7-E, and ZD1, the continuum map also shows the presence of a source at the northernmost part of the FOV, which is also present in the NIRCam image but is not labelled in Hashimoto et al. (2023); we name this source s2. However, given that this is at the edge of the FOV, where many artefacts are present in the NIRSpec IFU data, we consider this source as tentative and report its label in parenthesis in the figure. Moreover, in the map of the continuum obtained from the unsmoothed data cube integrated over the spectral range 1.2-2 µ m (Fig. A.3 in the Appendix 1 , top-left), where the spatial resolution is the highest, the eastern tail of YD1 appears as a separate peaked spatial component. We label this extra source as YD1-E.  \nFig. 2, bottom panel, illustrates the integrated spectrum (aperture radius = 0.15 '' ) associated with the main component of the A2744-YD4 system, that is, YD4 itself. The rest-frame optical lines [O ii ], H β , and [O iii ] are detected with high S / N ( ≳ 6 on the peak). The spectroscopic redshift based on Lyman break and optical lines ( z ∼ 7.88) is consistent with that found by Morishita et al. (2023) and Hashimoto et al. (2023) from the NIRSpec R 2700 data. We find a stellar mass of log( M ∗ / M ⊙ ) ∼ 8.7 from the SED fitting and a SFR ∼ 2 M ⊙ yr -1 from H β for YD4 (Table 3). These were corrected for the magnification factor of 2 due to the lensing. The gas-phase metallicity, relying on line ratios, is instead not a ff ected by it. For the other spatial components in the system, we find log( M ∗ / M ⊙ ) ∼ 7.5-8.6 and SFR ∼ 1-3 M ⊙ yr -1 .  \nThe [O iii ] flux map resulting from our spectral emissionline modelling is displayed in Fig. 2, central panel (the maps of H β and [O ii ] are shown in Fig. A.3 1 ). From the [O iii ] map, we identify two new emission regions which are weak or absent in continuum, which we label as YD6-[OIII]-E and YD4-[OIII]W. Overall, the [O iii ] maps obtained from the PRISM data presented here are deeper and reveal fainter and more extended features than those from high-resolution grating data presented in  \nTable 3. Properties of the individual sources.  \nNotes. (1) Source name. (2) Redshift from [O iii ] λ 5008. (3) Stellar mass from SED fitting with bagpipes . (4-9) [O ii ] λλ 3727,30, [Ne iii ] λ 3870, H β , [O iii ] λ 5008, H α , and [S ii ] λ 6718,33 measured fluxes (in units of 10 -20 erg s -1 cm -2 ), (10) SFR (in M ⊙ yr -1 ), and (10) gas-phase metallicity from emission line Gaussian fitting. For the sources in the A2744-YD4 system, the reported M ∗ and SFR are corrected for the lensing magnification factor of ∼ 2 (Morishita et al. 2023; Bergamini et al. 2023); the line fluxes are instead the observed ones. All the properties are obtained from integrated spectra extracted from circular apertures (having radius of 0.15 '' for A2744-YD4 and COSMOS24108 and of 0.1 '' for BDF-3299) centred on each source. For the line fluxes and SFR, we also report the 3 σ upper limits in case of no detection.  \nFig. 2. Maps for A2744-YD4 from JWST NIRSpec IFU. All the maps are obtained from the (wavelength-dependent) spatially smoothed data cube (details in Sect. 2.2). No extinction correction is applied. A cut of S / N > 3 on the peak flux of each line is applied. Median stellar continuum emission in the observed spectral range 2-3 µ m (0.23-0.34 µ m rest-frame; left); [O iii ] integrated flux (centre); map of oxygen abundance, 12 + log(O / H) (right). Contours mark the continuum from first panel. NIRSpec PRISM / CLEAR spectrum extracted from a circular aperture with radius of 0.15 '' centred at the location of the target YD4 (bottom).  \n<!-- image -->  \nHashimoto et al. (2023) (who do not report the detection of any other emission line due to the lower S / N of their data). We can count nine sources in total in the ∼ 3 '' × 3 '' NIRSpec IFU FOV, among those detected in continuum and in line emission, namely YD4, YD6, YD6-[OIII]-E, YD4-[OIII]-W, YD7-E, ZD1, YD1, YD1-E, and s1, and possibly a tenth source, s2. All these sources lie at z ∼ 7.88, either confirmed spectroscopically (YD4, YD6, YD6-[OIII]-E, YD4-[OIII]-W, YD1, YD1-E, and s1; e.g. Morishita et al. 2023, Hashimoto et al. 2023, and this work) or from photometry (ZD1), except for YD7-E (and the tentative source s2) whose redshift is not assessed. The spectra of all targets, but YD4, are reported in Figs. A.1 and A.2 in the Appendix 2 .  \nIn the top-right panel of Fig. 2, we show the map of oxygen abundance, 12 + log (O / H), a proxy for gas-phase metallicity. The metallicity is inferred by making use of the strongline diagnostics reported in Table 2 as described in Sect. 2.2 (the maps of the [O iii ] λ 5008 / H β and [O iii ] λ 5008 / [O ii ] λλ 3727,30 emission line ratios are shown in Fig. A.3 2 ). The ratios involving lines which are not close in wavelength (all but [O iii ] and H β ) may be a ff ected by extinction. Unfortunately, the only robustly detected Balmer line at the spaxel level is H β , and only in a handful of spaxels, therefore estimating the dust extinction spaxel-by-spaxel is not possible. Based on this, the abundance map should not be taken as a robust measurement; moreover, the map is very noisy. Nevertheless, the map seems to suggest that, in the northern system, YD1 is embedded between two sources at lower metallicity, s1 and YD1-E. No clear pattern of metallicity shows up in the southern system (the YD4 one) from the map.", '4. BDF-3299': "BDF-3299 is a spectroscopically confirmed star-forming galaxy (SFRUV ∼ 6 M ⊙ yr -1 , SFRdust ≲ 12 M ⊙ / yr) at z ∼ 7.109 (Castellano et al. 2010; Vanzella et al. 2011; Maiolino et al. 2015; Carniani et al. 2017), located in an over-density of galaxies (Castellano et al. 2016). We report the maps for BDF-3299 from the NIRSpec IFU observations in Fig. 3.  \nThe median continuum in the observed spectral range 1.1-2 µ m ( ∼ 0.14-0.25 µ m rest-frame) shows that BDF-3299 is composed of three spatial components. The two brighter ones are located at the NW (the strongest of the two in the continuum) and at the centre of the system, respectively; a third, fainter one resides in the E part. We label these sources as BDF-3299-a, BDF-3299-b, and BDF-3299-c, respectively, in decreasing order of continuum brightness, as labelled in Fig. 3, left panel. The other continuum emitters in the FOV are lower-redshift sources.  \nFig. 3, bottom panel, shows the integrated spectrum (aperture radius = 0.1 '' ) associated with the brightest component in continuum emission, BDF-3299-a. The rest-frame optical lines [O ii ], H β , and [O iii ] are detected with high S / N ( ≳ 6 on the peak). From the lines, we estimate a redshift of 7.114, slightly higher but roughly consistent with the previously reported one from Ly α (7.109; Vanzella et al. 2011) and [C ii ] (7.107; Carniani et al. 2017). We obtain a stellar mass of log( M ∗ / M ⊙ ) ∼ 7.9 from the SED fitting and a SFR ∼ 3.5 M ⊙ yr -1 from H β for BDF3299-a (Table 3). The spectra of the other spatial components in the system, namely BDF-3299-b and c, are reported in Fig. B.1 in the Appendix 2 ). From these, we find log( M ∗ / M ⊙ ) ∼ 7.6-8.2 and SFR ∼ 1.5-4 M ⊙ yr -1 .  \nThe [O iii ] emission (Fig. 3, central panel) peaks on BDF3299-b rather than on BDF-3299-a (the strongest in continuum emission). The line ratio maps are quite noisy and only few spaxels are above the S / N threshold of 3 (Fig. B.2). Therefore, the same applies to the metallicity map, which generally shows low values, of 12 + log(O / H) ≲ 7.8, in the few spaxels where it can be estimated (Fig. 3, right).", '5. COSMOS-24108': "COSMOS-24108 ( z ∼ 6.36; SFRUV ∼ 29 M ⊙ / yr, SFRdust ≲ 6.2 M ⊙ / yr) shows two, or possibly three, spatial components in Hband HST rest-frame UV imaging (Pentericci et al. 2016). In Fig. 4, left panel, we show the 1-2 µ m observed continuum ( ∼ 0.14-0.27 µ m rest-frame) from the NIRSpec IFU data. This shows two main spatial components, and a third, fainter one in the SE part of the system, consistent with those seen with HST in a similar spectral band. We label these three spatial components as COSMOS24108-a, b, and c, in order of continuum brightness. The continuum at redder wavelengths, between 3-3.5 µ m ( ∼ 0.39-0.46 µ mrest-frame; Fig. C.2 in the Appendix 2 ), is dominated by the southernmost of the two main components, and only an extended emission towards the northernmost source is present at these wavelengths, instead of a more clearly separate spatial component as at lower wavelengths. Therefore, the northernmost source has bluer continuum than the southernmost one. In the SW corner of the FOV, another galaxy at a lower redshift is also present.  \nFig. 4, bottom panel, shows the integrated spectrum (aperture radius = 0.15 '' ) associated with the brightest component in continuum emission, COSMOS24108-a. The rest-frame optical lines [O ii ], H β , [O iii ], H α , and [S ii ] are detected with high S / N ( ≳ 4 on the peak). We obtain a stellar mass of log( M ∗ / M ⊙ ) ∼ 9.3 from SED fitting and a SFR ∼ 15 M ⊙ yr -1 from H α for COSMOS24108-a (Table 3). The integrated spectra of the other spatial components in the system are shown in Fig. C.1 in the Appendix 2 . For these, we find log( M ∗ / M ⊙ ) ∼ 8.4-8.9 and SFR ∼ 2-15 M ⊙ yr -1 .  \nThe [O iii ] ionised gas line emission (Fig. 4, central panel; H β , [O ii ], and H α maps are reported in Fig. C.2 2 ) is much more extended than the continuum, revealing two additional bright clumps to the SE of the system, one of the two also tentatively detected in continuum (see contours). We label these as COSMOS24108-[OIII]-Ea and [OIII]-Eb. The H α map (Fig. C.2, bottom-left) shows a bridge of gas (visible also in [O iii ], though weaker relative the rest of the emission) connecting the main system to the closer of these two clumps, COSMOS24108-[OIII]-Ea. By comparing the ionised gas line emission with the 1-2 µ m continuum, we see that the former peaks in between the two main continuum components, with a preferential extension towards the northernmost, weaker continuum component (COSMOS24108-b) rather than to the southernmost, brighter one (COSMOS24108-a).  \nFig. 4, right panel, reports the map of gas metallicity (the [O iii ] λ 5008 / H β and [O iii ] λ 5008 / [O ii ] λλ 3727,30 line ratio maps are shown in Fig. C.2 2 ). The metallicity exhibits differences of up to ∼ 0.5-0.6 dex among the di ff erent sources in the system. The northernmost of the two main continuum sources, COSMOS24108-b, appears to have lower metallicity (12 + log (O / H) ∼ 8.0-8.1) than the southernmost one, COSMOS24108-a ( ∼ 8.2), while the SE minor continuum component, COSMOS24108-c, has larger metallicity ( ∼ 8.4). Towards the two ionised gas clumps to the SE, COSMOS24108-  \nFig. 3. Maps for BDF-3299 from JWST NIRSpec IFU. The flux maps are obtained from the original data cube, while the line ratio and metallicity maps from the spatially smoothed data cube (details in Sect. 2.2). Median stellar continuum emission in the observed spectral range 1.1-2 µ m ( ∼ 0.14-0.25 µ m rest-frame; top-left). The rest is as in Fig. 2. The PRISM / CLEAR spectrum (bottom) is extracted from a circular aperture with radius of 0.1 '' centred at the location of the most luminous component in continuum, BDF-3299-a.  \n<!-- image -->  \nFig. 4. Maps for COSMOS24108 from JWST NIRSpec IFU. Same as in Fig. 3. The continuum map (left) is the median in the 1-2 µ m observed range ( ∼ 0.14-0.27 µ m rest-frame). The PRISM / CLEAR spectrum (bottom) is extracted from a circular aperture with radius of 0.15 '' centred at the location of the most luminous component in continuum, COSMOS24108-a.  \n<!-- image -->  \n[OIII]-Ea and COSMOS24108-[OIII]-Eb, the metallicity is the lowest, with values of ∼ 7.8-7.9.", '6. Integrated mass-metallicity relation': "We obtained the properties of each sub-source belonging to each target, by extracting integrated spectra from circular apertures of radius of 0.15 '' for A2744-YD4 and COSMOS24108 and of 0.1 ''  \nfor BDF-3299 centred on each sub-source (Table 3). We find emission line ratios of log([O iii ] / H β ) ∼ 0.4-0.9 for A2744-YD4, log([O iii ] / H β ) ∼ 0.7-0.8 for BDF-3299, and log([O iii ] / H β ) ∼ 0.5-0.9 and log([S ii ] / H α ) ≲ -0.8 for COSMOS24108. These are consistent with the range of values found for z ∼ 6-8 starforming galaxies in the JADES survey (Cameron et al. 2023), of log([O iii ] / H β ) ∼ 0.5-0.8 and log([S ii ] / H α ) ≲ -0.8 (when only considering detections and not upper limits), in a range of stel-  \n10.0  \n<!-- image -->  \nFig. 5. Star formation rate versus stellar mass (left) and gas-phase metallicity versus stellar mass (right) for the single spatial components in the systems from this work (red, green, and blue circles). In grey circles we show for comparison the compilation of z ∼ 3-10 galaxies from JADES (Curti et al. 2023b; including GNz-11, Bunker et al. 2023), CEERS (Nakajima et al. 2023, as re-computed for consistency in Curti et al. 2023b), and EROs (Curti et al. 2023a; Laseter et al. 2024). Left: The main sequences of star formation (SFMS) at z ∼ 0 and z ∼ 8 from Popesso et al. (2023) are displayed for reference. Right: Best-fit mass-metallicity relations (MZRs) from Curti et al. (2023b) for these z ∼ 3-10 targets, Li et al. (2023) at z ∼ 3 (GLASS-JWST), Sanders et al. (2021) at z ∼ 3.3 and 2.3 (MOSDEF), and Curti et al. (2020b) at z ∼ 0.08 (SDSS). The highz MZRs predicted by EAGLE ( z ∼ 8; Schaye et al. 2015), FIRE ( z ∼ 6; Ma et al. 2016), IllustrisTNG ( z ∼ 8; Torrey et al. 2019), FirstLight ( z ∼ 6 and z ∼ 8, for log( M ∗ / M ⊙ ) ≲ 9 at z ∼ 6; Langan et al. 2020; and z ∼ 8, for log( M ∗ / M ⊙ ) ≳ 9 at z ∼ 6; Nakazato et al. 2023), and SERRA ( z ∼ 8; Pallottini et al. 2022) cosmological simulations are also displayed.  \n<!-- image -->  \nlar masses (log( M ∗ / M ⊙ ) ∼ 6.5-9.0) and SFRs ( ∼ 0.1-30) comprising those of the sources in this work. In some cases, like COSMOS24108-a with log([O iii ] / H β ) ∼ 0.8 and log([S ii ] / H α ) ∼ -0.8, the ratios are at the high end of the values reported in (Cameron et al. 2023).  \nWe inferred the gas-phase metallicity and the SFR from emission-line fitting and the stellar mass from SED fitting, as described in Sect. 2.2. In Fig. 5, we display the metallicity versus SFR and stellar mass diagrams for the spatial components identified in the images (Table 3). We compare these with the values reported by Curti et al. (2023b) for the z ∼ 3-10 galaxies from the JADES (including GNz-11; Bunker et al. 2023), CEERS(Nakajima et al. 2023, re-computed by Curti et al. 2023b for consistency), and EROs (Curti et al. 2023a; Laseter et al. 2024) samples (grey circles). The best-fit relation for this z ∼ 310 compilation obtained by Curti et al. (2023b) is also shown. We also report for reference the best-fit mass-metallicity relations (MZRs) for galaxies at z ∼ 0.08 from SDSS (Curti et al. 2020b), z ∼ 2-3 from MOSDEF (Sanders et al. 2021), and z ∼ 3 from GLASS-JWST (Li et al. 2023).  \nOur targets are generally compatible with the values found for the z ∼ 3-10 galaxies, especially the sources in BDF-3299 which sit on the MZR defined by this highz collection. We note that most of the sources in A2744-YD4 and COSMOS24108 ( z ∼ 8 and 6, respectively) are at the high end of the JADES, CEERS, and EROs points, where the z ∼ 2-3 MZRs from MOSDEF and GLASS-JWST lie. This suggests that the A2744-YD4 and COSMOS24108 systems may comprise more evolved sources as compared to the majority of sources at the same redshifts and be instead more similar to galaxies at cosmic noon.  \nWe further display the predictions for the highz MZR from a number of cosmological simulations, specifically EAGLE ( z ∼ 8; Schaye et al. 2015), FIRE ( z ∼ 6; Ma et al. 2016), IllustrisTNG ( z ∼ 8; Torrey et al. 2019), FirstLight (from Langan et al. 2020 at z ∼ 6 and z ∼ 8 and Nakazato et al. 2023 at z ∼ 8, for log( M ∗ / M ⊙ )  \nTable 4. Metallicity gradients inferred for the main sources in this work.  \n≲ 9 and ≳ 9, respectively, at z ∼ 6), and SERRA ( z ∼ 8; Pallottini et al. 2022) 3 . We note that the sources analysed in this work, both as a whole and within the individual A2744-YD4 and COSMOS24108 systems, are better aligned with simulations predicting steeper MZR slopes than the median of the observations at z ∼ 3-10.", '7. Gas-phase metallicity gradients': "To more robustly constrain the spatially resolved metallicity, we extracted the line fluxes from spatially integrated spectra from concentric radial annuli, as described in Sect. 2.2. This allowed us to increase the S / N of the emission lines at large radii and determine the dust extinction from the faint Balmer lines. We thus determined the gas-phase metallicity as a function of the distance from the centre of each source, as defined in the following.  \nThe resulting metallicity gradients are reported in Fig. 6. In the system A2744-YD4, we determined the metallicity gradients only for the two brightest sources YD4 and YD1 (cen-  \n<!-- image -->  \n<!-- image -->  \n<!-- image -->  \n<!-- image -->  \n<!-- image -->  \n<!-- image -->  \n<!-- image -->  \nFig. 6. Metallicity gradients for the main sources in A2744-YD4 (top two rows), BDF-3299 (mid-bottom), and COSMOS24108 (bottom). Radial annuli have radial width of 1 spaxel (0.05 '' ). The wavelength-dependent spatially smoothed cube was used (details in Sect. 2.2). Metallicity gradients (right) and [O iii ] maps (left; also from smoothed cube), where the concentric annuli are reported on the source (the shaded region in the COSMOS24108 map was masked out from the gradient; see text). The vertical grey dashed line marks the spatial resolution ( σ res . ). The fluxes of emission lines far in wavelength are corrected for extinction based on H γ / H β in A2744-YD4 and BDF-3299, while in COSMOS24108 H α / H β is used for that and also [S ii ] and H α are used to infer the metallicity. A cut of S / N > 3 on the peak flux of each line is applied.  \n<!-- image -->  \nCOS24108-main-a  \ntred around their continuum peak) since the metallicity measurements for the other sources su ff ered from large uncertainties due to low S / N of emission lines. For BDF-3299, since we could have only extracted two radial points for each spatial component (BDF-3299-a, b, and c) due to the compactness of this system, we obtained the metallicity gradient profile for the whole BDF-3299 system, centred on the brightest source in line emission, BDF-3299-b. For the COSMOS24108 system, we centred the gradient around the continuum emission peak, corresponding to the spatial component COSMOS24108-a (Fig. 4, left panel). We masked the region surrounding the low-metallicity [O iii ] clump COSMOS24108-Ea (shaded circle in Fig. 6), since it has a markedly low metallicity (see Fig. 4, right panel) and can be clearly spatially separated from the rest of the system. Given that the line emission peaks between the two main continuum components, COSMOS24108-a and COSMOS24108-b, and not on either of them (see Fig. 4, central panel), we also extracted the gradient centred around the [O iii ] peak, instead of around the continuum. This is reported in Fig. C.3 in the Appendix 4 . The two gradients are not statistically di ff erent within the uncertainties. In Fig. C.3 we also report the metallicity gradient from two additional smaller apertures centred on the emission line clumps to the SE of the main system, COSMOS24108-Ea and COSMOS24108-Eb.  \nFor all the sources, A2744-YD4, YD1, BDF-3299, and COSMOS24108, the metallicity gradients span a range between ∇ r log( Z ) ∼ -0 . 05 dex kpc -1 and ∇ r log( Z ) ∼ 0 . 15 dex kpc -1 (Table 4). We note that, within the uncertainties, all metallicity gradients in our sample are flat.  \nWe also estimate the gradients relative to the e ff ective (halflight) radius, R e, as sometimes done in observational (e.g. Belfiore et al. 2017) and theoretical studies (e.g. Mollá et al. 2019); in this case, the gradient should not depend on other properties of galaxies (as suggested by e.g. Garnett et al. 1997). We estimated the e ff ective radius with a 2D Gaussian modelling of the continuum emission for the whole BDF-3299 and COSMOS24108 systems (including all the spatial components in continuum), and for the single YD4 and YD1 components, for consistency with the way metallicity gradients were calculated; for the same reason, we employed the wavelength-dependent spatially smoothed data cube, as done for the gradients. We stress that, therefore, the R e thus obtained should not be considered as the intrinsic ones (i.e. de-convolved for the spatial resolution of the observations), and, in the case of BDF-3299 and COSMOS24108, they are not the R e of the single spatial clumps. The obtained R e are ∼ 0.74, 0.70, 0.75, and 1.2 kpc for YD4, YD1, BDF-3299, and COSMOS24108, respectively. The resulting gradients are reported in Table 4. These are flat, and in any case ≳ -0.1 dex R -1 e when considering the uncertainties; in the local Universe, such gradients are typical of low-mass galaxies (log( M ∗ / M ⊙ ) ≲ 9.5-10; Belfiore et al. 2017).", '8.1. Driving mechanisms of the observed gradients': "We find flat gradients within the uncertainties for the sources in A2744-YD4, BDF-3299, and COSMOS24108 analysed in this work. As introduced in Sect. 1 and sketched in Fig. 1, negative (radially decreasing) gradients are expected as a consequence of the inside-out galaxy formation scenario, while inverted (radially  \nincreasing) gradients may arise as a consequence of pristine gas accretion towards the central regions. Possible explanations for flat radial gradients are radial gas mixing processes, occurring as a consequence of mergers, SN-driven winds and / or large-scale gas circulation (galactic fountains, i.e. metal-loaded outflows expelled from the galaxy and re-accreted in the external regions), which redistribute the gas in the galaxy and wash out any preexisting radial gradient of metallicity.  \nAll the targets in this work show multiple sources within a few kpc and disturbed morphologies. This indicates that they are experiencing, or have experienced, interactions and galaxy merging processes, which are expected to be more frequent in the early Universe according to cosmological simulations (see e.g. Kohandel et al. 2020; Pallottini & Ferrara 2023). Specifically, galaxies at z ∼ 6 with stellar masses ≳ 5 × 10 8 M ⊙ living in dense environments, similar to those studied in this work (see Table 3), are expected to have already experienced multiple merger events (Gelli et al. 2020). On the other hand, while in the lowspectral resolution ( R ∼ 100) NIRSpec PRISM data analysed in this work the emission lines are spectrally unresolved, [O iii ] and H β do not show evidence for asymmetric wings or any complex line profile indicative of outflows in the higher resolution ( R ∼ 2700) NIRSpec IFU or MSA data from Hashimoto et al. (2023) and Morishita et al. (2023), respectively, for the case of YD4, YD1, and s1 in the A2744-YD4 system (YD4 having both IFU and MSA R ∼ 2700 data). Therefore, this indicates that strong outflows are not occurring at present in this system. However, in principle we cannot exclude that the redistribution of metals across the galaxy may also be the result of past intense SN winds mixing the ISM or re-accretion in the outer regions of metalenriched gas expelled by past galactic outflows, whose trace is absent in present-day spectra. All in all, mergers and / or possibly either past galactic outflows or SN wind mixing seem the most likely mechanism driving the observed flat metallicity gradients.  \nWestress that, even if we did our best in extracting the metallicity gradient for each separate spatial component, complications arise because in some cases these sub-sources are very close to each other and may contaminate each other's metallicity (as appears to be the case of YD1 and YD1-E; Fig. 2) or there is confusion as to which source the detected gas belongs (as in the case of COSMOS24108-a and COSMOS24108-b, where gas is located between the two sources). Moreover, the sources are not settled in radially symmetric metallicity distributions. All these aspects can contribute to yielding a flat gradient. Nevertheless, the spatial vicinity of the sources and the displacement of gas and stars are the result of the ongoing merging processes. Therefore, ultimately, mergers appear to be the most likely cause for the flatness of the metallicity gradients.", '8.2. Metallicity gradients across cosmic time': "In Fig. 7, we report the metallicity gradients from a compilation of observational studies, from z = 0 up to z ∼ 8 (this study), namely the highest redshift probed so far. We report the gradients in dex kpc -1 , given that most values reported in literature are in these units rather then in dex R -1 e . The flat gradients within the uncertainties that we find at z ∼ 6-8 are compatible with the other currently available measured gradients at these redshifts, namely Vallini et al. (2024) from FIR lines with ALMA and Arribas et al. (2023) from rest-frame optical lines with JWST / NIRSpec. Specifically, the results from Vallini et al. (2024) showcase the potential for synergies between spatially resolved observations with JWST and ALMA, though the spatial resolutions may be  \n<!-- image -->  \nAge of the Universe [Gyr]  \nFig. 7. Gas-phase metallicity gradient (in dex kpc -1 ) as a function of redshift (bottom x axis) and cosmic time (upper x axis). The targets analysed in this work are marked with red (A2744-YD4 and YD1), green (BDF-3299), and blue (COSMOS24108). The other symbols are a compilation of gas-phase metallicity gradients from literature. Specifically, at z ∼ 0, we report the measurements from Rupke et al. (2010c, full and empty squares for isolated and merging galaxies, respectively) and (Belfiore et al. 2017, MaNGA, median). The evolution of metallicity gradients with cosmic time for the Milky Way, M33, and M81 from H II regions ( z ∼ 0) and PNe (up to a few Gyr ago), from Magrini et al. (2009, 2010), Stanghellini & Haywood (2010, 2018), and Stanghellini et al. (2014) is shown. We report the gradients estimated at various z from Yuan et al. (2011), Swinbank et al. (2012, HiZELS), Queyrel et al. (2012, MASSIV, median), Stott et al. (2014, KMOS-HiZELS, median), Troncoso et al. (2014, AMAZE + LSD), Jones et al. (2013, 2015, GLASS), Leethochawalit et al. (2016, CASSOWARY), Wuyts et al. (2016, KMOS 3D ), Carton et al. (2018), Wang et al. (2017, 2019, 2020, 2022, GLASS + GLASS JWST), Förster Schreiber et al. (2018, SINS / zC-SINF), Curti et al. (2020a, KLEVER), Gillman et al. (2021, KROSS + KGES, median), Simons et al. (2021, CLEAR), (Li et al. 2022, MAMMOTH-Grism), Vallini et al. (2024), and Arribas et al. (2023, GA-NIFS). Hatched regions are reported in case of large samples. The predictions for the evolution of metallicity gradients from cosmological simulations are also shown, specifically for MUGS (enhanced feedback) and MaGICC (normal feedback) from Gibson et al. (2013), FIRE (Ma et al. 2017), Taylor & Kobayashi (2017), TNG50 (Hemler et al. 2021), and EAGLE (Tissera et al. 2022), together with the predicted evolution from the chemical evolution models from Mott et al. (2013, for both constant and variable SFE), Kubryk et al. (2015), Mollá et al. (2019), and Sharda et al. (2021).  \n<!-- image -->  \nquite di ff erent ( σ ∼ 0.2-0.4 kpc in our case versus ∼ 1.5 kpc in the case of Vallini et al. 2024).  \nWe also report the predictions for the evolution of metallicity gradients with redshift from cosmological simulations. Some of them predict steeper negative gradients with increasing redshift (MUGS, with normal feedback, Gibson et al. 2013; TNG50, Hemler et al. 2021), in some cases extremely steep (Taylor & Kobayashi 2017, for which the case of a log( M ∗ / M ⊙ ) = 12 galaxy at the center of a cluster with no AGN is shown), while  \nothers predict median flatter gradients at higher z though with increasing scatter (MAGICC, with enhanced feedback, Gibson et al. 2013; FIRE, Ma et al. 2017; EAGLE, Tissera et al. 2022). Predictions from chemical evolution models, also displayed in Fig. 7, are very heterogeneous as well, with little to no evolution with redshift (Mott et al. 2013 for the Milky Way, with variable SFE, and Sharda et al. 2021, for which the log( M ∗ / M ⊙ ) = 11.1 case is shown) and slightly to steeply increasing gradients with z (Mollá et al. 2019 and Kubryk et al. 2015, respectively, both  \nfor the Milky Way), as well as gradients inverting at z ≳ 1 (Mott et al. 2013 with constant SFE).  \nUnfortunately, predictions for the cosmic evolution of metallicity gradients from cosmological simulations and models are limited to z ≲ 3-4 so far. If we assumed that the trend with redshift follows a simple linear extrapolation to z ∼ 8 of the negative trends from TNG50 (Hemler et al. 2021) and MUGS (Gibson et al. 2013), as well as the model by Kubryk et al. (2015), we would get metallicity gradients that are incompatible with our estimates considering the uncertainties (Fig. 7), which would instead be more in line with flat gradient predictions at high z (MaGICC, Gibson et al. 2013; FIRE, Ma et al. 2017; EAGLE, Tissera et al. 2022; Mott et al. 2013 with variable SFE; Sharda et al. 2021). However, this very rough linear extrapolation is most likely wrong, given that metals are expected to start forming from uniformly distributed, pristine gas and therefore the gradients should converge to zero at some point in the past. The only case which extends beyond z ∼ 3-4 is the simulations of Taylor & Kobayashi (2017), which reach up to z ∼ 6, where gradients even steeper than -1.5 dex kpc -1 (not shown in the figure to avoid an excessive shrink of the y axis) are predicted, way steeper than those observed at z ∼ 6-8; however, even in this case, the redshifts up to 8 probed by the current observations are not explored.  \nAll in all, we cannot draw any clear conclusion on what cosmological simulations and models best reproduce the observed gradients at high z . Instead, we stress the need for updated metallicity gradient predictions from cosmological simulations and chemical models at z ≳ 3 in order to match the redshifts reached by current observations.  \nWe point out that the merger fraction increases with redshift (e.g. theoretically Fakhouri et al. 2010; Rodriguez-Gomez et al. 2015; O'Leary et al. 2021; observationally Duncan et al. 2019), therefore galaxies at high redshift often have disturbed morphologies due to interactions and do not have radially symmetric gas and chemical distributions (see e.g. Figs. 2, 3, and 4; also e.g. observations in de Graa ff et al. 2023; Arribas et al. 2023; Rodríguez Del Pino et al. 2023 and simulations in Pallottini et al. 2017, 2019). Specifically, the metallicity maps in our work show in some cases non-azimuthally symmetric structures which are averaged out when producing radial gradients (as it is e.g. the case of YD1, having the highest values to the W and the lowest to the E of its spatial emission peak). Therefore, radial gradients may not be the optimal means to describe the distribution of metals in highz galaxies and other alternative methods to quantify it (such as the metallicity scatter in the galaxy, as suggested by Maiolino & Mannucci 2019) should be sought and included in predictions from simulations.  \nIn summary, the flat radial gradients and the asymmetric spatial distribution of metallicity observed in some cases seem to support the merging scenario, though ISM mixing due to past SN winds or re-accretion in the outer regions of metal-enriched gas from past galactic outflows (galactic fountains) are also a viable mechanism to explain the flatness of the gradients. Spatially asymmetric low-metallicity accretion from the circumgalactic medium (CGM) and intergalactic medium (IGM) could also contribute to produce non-azimuthally symmetric metallicities as suggested by Arribas et al. (2023).", '9. Conclusions': "In this work, we have presented new JWST NIRSpec IFU observations at low spectral resolution ( R ∼ 100; PRISM / CLEAR) of three highz systems, namely A2744-YD4 in the proto-cluster  \nA2744-z7p9OD ( z ∼ 7.88), BDF-3299 ( z ∼ 7.11), and COSMOS24108 ( z ∼ 6.36). At these redshifts, the NIRSpec PRISM spectra (spanning ∼ 0.6-5.2 µ m) cover the rest-frame UV and optical spectral ranges and include the main optical emission lines from warm ( T ∼ 10 4 K) ionised gas, [O ii ], H γ , H β , [O iii ], and, for COSMOS24108, also H α and [S ii ]. We modelled the ionised gas lines in the spectra with Gaussian functions and mapped their emission. The main goal of this work is to study the spatially resolved gas-phase metallicity and investigate the shape of metallicity gradients at high redshift ( z ≳ 6).  \nThe targets have very disturbed morphologies in both the stellar continuum and ionised gas line emission. We identify several spatial components concentrated within a few kiloparsecs in all the three systems. We obtained the main integrated properties of each spatial component in each target, specifically stellar mass from SED fitting, SFR from H α or H β , and gasphase metallicity by means of flux ratios of rest-frame optical emission lines which we modelled with Gaussian functions. We found log( M ∗ / M ⊙ ) ∼ 7.6-9.3, SFRs ∼ 1-15 M ⊙ yr -1 , and gasphase metallicities 12 + log(O / H) ∼ 7.7-8.3 by extracting integrated spectra from circular apertures centred on each spatial component.  \nWe compared the stellar masses and gas-phase metallicities of the targets with the mass-metallicity relations (MZRs) inferred observationally at di ff erent redshifts and with those predicted by cosmological simulations. In general, the sources in the systems studied in this work are consistent with the distribution of the highestz galaxies to date ( z ∼ 3-10) from JADES, CEERS, and EROs samples in the mass-metallicity plane. Nevertheless, most of the sources in A2744-YD4 and COSMOS24108 lie at the upper end of this z ∼ 3-10 distribution, in terms of metallicity at a given stellar mass, and are closer to the best-fit MZRs measured at z ∼ 2-3 (e.g. MOSDEF and GLASS-JWST surveys) than to the MZR at z ∼ 3-10. Relative to the MZRs from cosmological simulations, the sources in the three systems studied in this work are in good agreement with the slopes predicted at z ∼ 6-8 by most simulations.  \nWe inferred the gas-phase metallicity radial gradients by extracting integrated spectra from concentric radial annuli centred on the main sources of each system for which the S / N allowed for a robust metallicity estimate. The gas-phase metallicity gradients are flat within the uncertainties. Flat gradients can be associated with processes which mix the gas and the metals on galaxy scales and therefore wash out any gradient which may have formed in the galaxy, such as mergers, SN wind mixing, and re-accretion of metal-loaded galactic outflows in the outer regions.  \nThese are among the very few measurements of spatially resolved gas metallicity at these high redshifts ( z ∼ 6-8). In particular, YD4 (at z ∼ 8) constitutes the highestz source in which a metallicity gradient has been probed so far.  \nCosmological simulations and chemical evolution models make very di ff erent predictions regarding the cosmic evolution of metallicity gradients. Some of them predict steeper negative gradients with increasing redshift (e.g. MUGS and TNG50), while others predict median flatter gradients at higher z (e.g. MaGICC, FIRE, and EAGLE). Unfortunately, these predictions are generally limited to z ≲ 3, therefore no conclusions can be drawn on what simulations best reproduce the observed mainly flat gradients at z ∼ 6-8 found in this work.  \nAll in all, the results of this work in terms of the MZR and gas-phase metallicity gradients at z ∼ 6-8 provide important constraints to guide future cosmological simulations and models. In particular, they urge for specific predictions on the cosmic evolu-  \non of metallicity gradients and metallicity maps out to redshift of 8, given that most of such predictions are currently limited to z ≲ 3.  \nMoreover, galaxies at high z tend to have more irregular morphologies and may not have azimuthally symmetric chemical distributions, as a result of frequent mergers and asymmetric low-mass gas infall. Radial gradients, which average out any azimuthal information, may then not be the optimal means to quantify the distribution of metals in highz galaxies. Therefore, other alternative quantitative tracers of the spatially resolved metallicity should be considered as part of predictions from simulations, to be compared with observations.  \nAcknowledgements. We acknowledge support from European Union's HE ERC Starting Grant No. 101040227 - WINGS (G.V., S.C.), INAF Minigrant 'Reionization and fundamental cosmology with high-redshift galaxies' (M.C.), 'FirstGalaxies' Advanced Grant from the European Research Council (ERC) under the European Union's Horizon 2020 research and innovation program, Grant agreement No. 789056 (A.J.B.), ERC Advanced Grant INTERSTELLAR H2020 / 740120 (A.F.), grant PID2021-127718NB-I00 funded by the Spanish Ministry of Science and Innovation / State Agency of Research, MICIN / AEI / 10.13039 / 501100011033 (S.A.). This work is based on observations made with the NASA / ESA / CSA James Webb Space Telescope. The data were obtained from the Mikulski Archive for Space Telescopes at the Space Telescope Science Institute, which is operated by the Association of Universities for Research in Astronomy, Inc., under NASA contract NAS 5-03127 for JWST. These observations are associated with program #1893. This research has made use of NASA's Astrophysics Data System Bibliographic Services. This research has made use of the Python packages NumPy (Harris et al. 2020), SciPy (Virtanen et al. 2020), IPython (Perez & Granger 2007), Matplotlib (Hunter 2007), emcee (Foreman-Mackey et al. 2013), and Astropy ( http://www.astropy.org ), a community-developed core Python package for Astronomy (Astropy Collaboration et al. 2013, 2018). This research has made use of the FITS files visualisation tool QFitsView ( https://www.mpe.mpg.de/~ott/QFitsView/ ).", 'References': '- Arribas, S., Perna, M., Rodríguez Del Pino, B., et al. 2023, arXiv e-prints, arXiv:2312.00899\n- Astropy Collaboration, Price-Whelan, A. M., Sip"ocz, B. M., et al. 2018, AJ, 156, 123\n- Astropy Collaboration, Robitaille, T. P., Tollerud, E. J., et al. 2013, A&A, 558, A33\n- Atek, H., Richard, J., Kneib, J.-P., et al. 2015, ApJ, 800, 18 Belfiore, F., Maiolino, R., Tremonti, C., et al. 2017, MNRAS, 469, 151 Berg, D. A., Skillman, E. D., Croxall, K. V., et al. 2015, ApJ, 806, 16 Bergamini, P., Acebron, A., Grillo, C., et al. 2023, ApJ, 952, 84 Bresolin, F. 2011, ApJ, 730, 129\n- Brook, C. B., Stinson, G., Gibson, B. K., Wadsley, J., & Quinn, T. 2012, MNRAS, 424, 1275\n- Bruzual, G. & Charlot, S. 2003, MNRAS, 344, 1000\n- Bunker, A. J., Saxena, A., Cameron, A. J., et al. 2023, A&A, 677, A88\n- Calzetti, D., Armus, L., Bohlin, R. C., et al. 2000, ApJ, 533, 682\n- Cameron, A. J., Saxena, A., Bunker, A. J., et al. 2023, A&A, 677, A115\n- Carnall, A. C., McLure, R. J., Dunlop, J. S., & Davé, R. 2018, MNRAS, 480, 4379\n- Carniani, S., Arribas, S., Bunker, A., et al. 2021, Galaxy assembly at z > 6: unraveling the origin of the spatial o ff set between the UV and FIR emission, JWST Proposal. Cycle 1, ID. #1893\n- Carniani, S., Ferrara, A., Maiolino, R., et al. 2020, MNRAS, 499, 5136 Carniani, S., Maiolino, R., Pallottini, A., et al. 2017, A&A, 605, A42 Carton, D., Brinchmann, J., Contini, T., et al. 2018, MNRAS, 478, 4293 Castellano, M., Dayal, P., Pentericci, L., et al. 2016, ApJ, 818, L3 Castellano, M., Fontana, A., Paris, D., et al. 2010, A&A, 524, A28 Ceverino, D., Sánchez Almeida, J., Muñoz Tuñón, C., et al. 2016, MNRAS, 457, 2605\n- Cresci, G., Mannucci, F., Maiolino, R., et al. 2010, Nature, 467, 811\n- Curti, M., Cresci, G., Mannucci, F., et al. 2017, MNRAS, 465, 1384\n- Curti, M., D\'Eugenio, F., Carniani, S., et al. 2023a, MNRAS, 518, 425\n- Curti, M., Maiolino, R., Cirasuolo, M., et al. 2020a, MNRAS, 492, 821\n- Curti, M., Maiolino, R., Curtis-Lake, E., et al. 2023b, arXiv e-prints, arXiv:2304.08516\n- Curti, M., Mannucci, F., Cresci, G., & Maiolino, R. 2020b, MNRAS, 491, 944 Davé, R., Finlator, K., & Oppenheimer, B. D. 2011, MNRAS, 416, 1354\n- de Graa ff , A., Rix, H.-W., Carniani, S., et al. 2023, arXiv e-prints, arXiv:2308.09742\n- D\'Eugenio, F., Perez-Gonzalez, P., Maiolino, R., et al. 2023, arXiv e-prints, arXiv:2308.06317  \nArticle number, page 14 of 20  \nDuncan, K., Conselice, C. J., Mundy, C., et al. 2019, ApJ, 876, 110 Fakhouri, O., Ma, C.-P., & Boylan-Kolchin, M. 2010, MNRAS, 406, 2267 Ferland, G. J., Chatzikos, M., Guzmán, F., et al. 2017, Rev. Mexicana Astron.  \n- Astrofis., 53, 385\n- Foreman-Mackey, D., Hogg, D. W., Lang, D., & Goodman, J. 2013, PASP, 125, 306\n- Förster Schreiber, N. M., Renzini, A., Mancini, C., et al. 2018, ApJS, 238, 21 Garnett, D. R., Shields, G. A., Skillman, E. D., Sagan, S. P., & Dufour, R. J. 1997, ApJ, 489, 63\n- Gelli, V., Salvadori, S., Pallottini, A., & Ferrara, A. 2020, MNRAS, 498, 4134 Gibson, B. K., Pilkington, K., Brook, C. B., Stinson, G. S., & Bailin, J. 2013, A&A, 554, A47  \nGillman, S., Tiley, A. L., Swinbank, A. M., et al. 2021, MNRAS, 500, 4229 Harris, C. R., Millman, K. J., van der Walt, S. J., et al. 2020, Nature, 585, 357 Hashimoto, T., Álvarez-Márquez, J., Fudamoto, Y., et al. 2023, ApJ, 955, L2 Hemler, Z. S., Torrey, P., Qi, J., et al. 2021, MNRAS, 506, 3024 Ho, I. T., Kudritzki, R.-P., Kewley, L. J., et al. 2015, MNRAS, 448, 2030 Hopkins, P. F., Kereš, D., Oñorbe, J., et al. 2014, MNRAS, 445, 581 Hunter, J. D. 2007, Computing in Science and Engineering, 9, 90 Ishigaki, M., Ouchi, M., & Harikane, Y. 2016, ApJ, 822, 5 Jones, T., Ellis, R. S., Richard, J., & Jullo, E. 2013, ApJ, 765, 48 Jones, T., Wang, X., Schmidt, K. B., et al. 2015, AJ, 149, 107 Kennicutt, R. C. & Evans, N. J. 2012, ARA&A, 50, 531  \n- Kewley, L. J., Rupke, D., Zahid, H. J., Geller, M. J., & Barton, E. J. 2010, ApJ, 721, L48  \nKohandel, M., Pallottini, A., Ferrara, A., et al. 2020, MNRAS, 499, 1250 Kroupa, P. 2001, MNRAS, 322, 231 Kubryk, M., Prantzos, N., & Athanassoula, E. 2015, A&A, 580, A127 Langan, I., Ceverino, D., & Finlator, K. 2020, MNRAS, 494, 1988 Laporte, N., Ellis, R. S., Boone, F., et al. 2017, ApJ, 837, L21 Laporte, N., Katz, H., Ellis, R. S., et al. 2019, MNRAS, 487, L81 Laporte, N., Streblyanska, A., Clement, B., et al. 2014, A&A, 562, L8 Laseter, I. H., Maseda, M. V., Curti, M., et al. 2024, A&A, 681, A70 Leethochawalit, N., Jones, T. A., Ellis, R. S., et al. 2016, ApJ, 820, 84 Leja, J., Carnall, A. C., Johnson, B. D., Conroy, C., & Speagle, J. S. 2019, ApJ,  \n- 876, 3\n- Li, M., Cai, Z., Bian, F., et al. 2023, ApJ, 955, L18\n- Li, Z., Wang, X., Cai, Z., et al. 2022, ApJ, 929, L8\n- Lotz, J. M., Koekemoer, A., Coe, D., et al. 2017, ApJ, 837, 97\n- Luck, R. E., Andrievsky, S. M., Kovtyukh, V. V., Gieren, W., & Graczyk, D. 2011, AJ, 142, 51\n- Ma, X., Hopkins, P. F., Faucher-Giguère, C.-A., et al. 2016, MNRAS, 456, 2140 Ma, X., Hopkins, P. F., Feldmann, R., et al. 2017, MNRAS, 466, 4780  \nMagrini, L., Coccato, L., Stanghellini, L., Casasola, V., & Galli, D. 2016, A&A,  \n588, A91  \n- Magrini, L., Randich, S., Kordopatis, G., et al. 2017, A&A, 603, A2\n- Magrini, L., Sestito, P., Randich, S., & Galli, D. 2009, A&A, 494, 95\n- Magrini, L., Stanghellini, L., Corbelli, E., Galli, D., & Villaver, E. 2010, A&A, 512, A63\n- Maiolino, R., Carniani, S., Fontana, A., et al. 2015, MNRAS, 452, 54\n- Maiolino, R. & Mannucci, F. 2019, A&A Rev., 27, 3 Mollá, M., Díaz, Á. I., Cavichia, O., et al. 2019, MNRAS, 482, 3071 Morishita, T., Roberts-Borsani, G., Treu, T., et al. 2023, ApJ, 947, L24 Mott, A., Spitoni, E., & Matteucci, F. 2013, MNRAS, 435, 2918 Nakajima, K., Ouchi, M., Isobe, Y., et al. 2023, ApJS, 269, 33 Nakajima, K., Ouchi, M., Xu, Y., et al. 2022, ApJS, 262, 3 Nakazato, Y., Yoshida, N., & Ceverino, D. 2023, ApJ, 953, 140 Nelson, D., Pillepich, A., Springel, V., et al. 2019, MNRAS, 490, 3234 O\'Leary, J. A., Moster, B. P., Naab, T., & Somerville, R. S. 2021, MNRAS, 501, 3215\n- Osterbrock, D. E. & Ferland, G. J. 2006, Astrophysics of gaseous nebulae and active galactic nuclei\n- Pallottini, A. & Ferrara, A. 2023, A&A, 677, L4\n- Pallottini, A., Ferrara, A., Decataldo, D., et al. 2019, MNRAS, 487, 1689\n- Pallottini, A., Ferrara, A., Gallerani, S., et al. 2022, MNRAS, 513, 5621\n- Pallottini, A., Ferrara, A., Gallerani, S., Salvadori, S., & D\'Odorico, V. 2014, MNRAS, 440, 2498  \nPallottini, A., Ferrara, A., Gallerani, S., et al. 2017, MNRAS, 465, 2540 Pentericci, L., Carniani, S., Castellano, M., et al. 2016, ApJ, 829, L11 Perez, F. & Granger, B. E. 2007, Computing in Science and Engineering, 9, 21 Pilkington, K., Few, C. G., Gibson, B. K., et al. 2012, A&A, 540, A56 Pillepich, A., Nelson, D., Springel, V., et al. 2019, MNRAS, 490, 3196 Planck Collaboration, Aghanim, N., Akrami, Y., et al. 2020, A&A, 641, A6 Popesso, P., Concas, A., Cresci, G., et al. 2023, MNRAS, 519, 1526 Prantzos, N. & Boissier, S. 2000, MNRAS, 313, 338  \n- Queyrel, J., Contini, T., Kissler-Patig, M., et al. 2012, A&A, 539, A93  \n- Rich, J. A., Torrey, P., Kewley, L. J., Dopita, M. A., & Rupke, D. S. N. 2012, ApJ, 753, 5\n- Rodríguez Del Pino, B., Perna, M., Arribas, S., et al. 2023, arXiv e-prints, arXiv:2309.14431\n- Rodriguez-Gomez, V., Genel, S., Vogelsberger, M., et al. 2015, MNRAS, 449, 49\n- Rupke, D., Kewley, L., & Barnes, J. 2010a, in Astronomical Society of the Pacific Conference Series, Vol. 423, Galaxy Wars: Stellar Populations and Star Formation in Interacting Galaxies, ed. B. Smith, J. Higdon, S. Higdon, & N. Bastian, 355\n- Rupke, D. S. N., Kewley, L. J., & Barnes, J. E. 2010b, ApJ, 710, L156  \nRupke, D. S. N., Kewley, L. J., & Chien, L. H. 2010c, ApJ, 723, 1255  \nSamland, M., Hensler, G., & Theis, C. 1997, ApJ, 476, 544  \n- Sánchez, S. F., Rosales-Ortega, F. F., Iglesias-Páramo, J., et al. 2014, A&A, 563, A49\n- Sanders, R. L., Shapley, A. E., Jones, T., et al. 2021, ApJ, 914, 19\n- Sanders, R. L., Shapley, A. E., Topping, M. W., Reddy, N. A., & Brammer, G. B. 2024, ApJ, 962, 24\n- Schaye, J., Crain, R. A., Bower, R. G., et al. 2015, MNRAS, 446, 521\n- Sharda, P., Krumholz, M. R., Wisnioski, E., et al. 2021, MNRAS, 502, 5935\n- Shivaei, I., Reddy, N., Rieke, G., et al. 2020, ApJ, 899, 117\n- Simons, R. C., Papovich, C., Momcheva, I., et al. 2021, ApJ, 923, 203\n- Somerville, R. S. & Davé, R. 2015, ARA&A, 53, 51\n- Stanghellini, L. & Haywood, M. 2010, ApJ, 714, 1096\n- Stanghellini, L. & Haywood, M. 2018, ApJ, 862, 45\n- Stanghellini, L., Magrini, L., Casasola, V., & Villaver, E. 2014, A&A, 567, A88\n- Stinson, G. S., Bailin, J., Couchman, H., et al. 2010, MNRAS, 408, 812\n- Storey, P. J. & Zeippen, C. J. 2000, MNRAS, 312, 813\n- Stott, J. P., Sobral, D., Swinbank, A. M., et al. 2014, MNRAS, 443, 2695  \nSwinbank, A. M., Sobral, D., Smail, I., et al. 2012, MNRAS, 426, 935  \n- Taylor, P. & Kobayashi, C. 2017, MNRAS, 471, 3856\n- Tissera, P. B., Rosas-Guevara, Y., Sillero, E., et al. 2022, MNRAS, 511, 1667 Torres-Flores, S., Scarano, S., Mendes de Oliveira, C., et al. 2014, MNRAS, 438, 1894\n- Torrey, P., Vogelsberger, M., Marinacci, F., et al. 2019, MNRAS, 484, 5587 Troncoso, P., Maiolino, R., Sommariva, V., et al. 2014, A&A, 563, A58\n- Vallini, L., Witstok, J., Sommovigo, L., et al. 2024, MNRAS, 527, 10\n- Vanzella, E., Pentericci, L., Fontana, A., et al. 2011, ApJ, 730, L35\n- Virtanen, P., Gommers, R., Oliphant, T. E., et al. 2020, Nature Methods, 17, 261\n- Wang, X., Jones, T., Vulcani, B., et al. 2022, ApJ, 938, L16\n- Wang, X., Jones, T. A., Treu, T., et al. 2020, ApJ, 900, 183\n- Wang, X., Jones, T. A., Treu, T., et al. 2019, ApJ, 882, 94\n- Wang, X., Jones, T. A., Treu, T., et al. 2017, ApJ, 837, 89\n- Wuyts, E., Wisnioski, E., Fossati, M., et al. 2016, ApJ, 827, 74\n- Yuan, T. T., Kewley, L. J., Swinbank, A. M., Richard, J., & Livermore, R. C. 2011, ApJ, 732, L14\n- Zaritsky, D., Kennicutt, Robert C., J., & Huchra, J. P. 1994, ApJ, 420, 87 Zheng, W., Shu, X., Moustakas, J., et al. 2014, ApJ, 795, 93', 'Appendix A: Additional figures for A2744-YD4': "Fig. A.1. NIRSpec PRISM / CLEAR spectra extracted from a circular aperture with radius of 0.15 '' centred at the location of the targets YD6, YD6-[O iii ]-E, YD4-[O iii ]-W, and ZD1.  \n<!-- image -->  \nFig. A.2. NIRSpec PRISM / CLEAR spectra extracted from a circular aperture with radius of 0.15 '' centred at the location of the targets YD1, YD1-E, and s1.  \n<!-- image -->  \n<!-- image -->  \n<!-- image -->  \n<!-- image -->  \n<!-- image -->  \nFig. A.3. Additional maps for A2744-YD4. Highest-resolution continuum map of A2744-YD4 from the original unsmoothed data cube in observed spectral range 1.2-2 µ m, where the spatial resolution is the highest (top-left). All the other maps are obtained from the (wavelength-dependent) spatially smoothed data cube, as in Fig. 2 (details in Sect. 2.2). First row: H β (centre) and [O ii ] (right) integrated fluxes. Second row: [O iii ] / H β (left) and [O iii ] / [O ii ] (right) line flux ratios. Contours mark the 2-3 µ m(observed-frame) continuum.  \n<!-- image -->", 'Appendix B: Additional figures for BDF-3299': "Fig. B.1. NIRSpec PRISM / CLEAR spectra extracted from a circular aperture with radius of 0.1 '' centred at the location of the targets BDF3299-b and BDF-3299-c.  \n<!-- image -->  \nFig. B.2. Additional maps for BDF-3299. As in Fig. 3, the flux maps are obtained from the original data cube, while the line ratio maps from the spatially smoothed data cube (details in Sect. 2.2). Top row: maps of H β integrated flux (left), [O iii ] / H β (centre) and [O iii ] / [O ii ] (right) line flux ratios.  \n<!-- image -->", 'Appendix C: Additional figures for COSMOS24108': "Fig. C.1. NIRSpec PRISM / CLEAR spectra extracted from a circular aperture with radius of 0.15 '' centred at the location of the targets COSMOS24108-b, COSMOS24108-c, COSMOS24108-[OIII]-Ea, and COSMOS24108-[OIII]-Eb.  \n<!-- image -->  \nFig. C.2. Additional maps for COSMOS24108. As in Fig. 4, the flux maps are obtained from the original data cube, while the line ratio maps from the spatially smoothed data cube (details in Sect. 2.2). Top row: median continuum map in the observed spectral range 3-3.5 µ m( ∼ 0.39-0.46 µ m rest-frame; left), with the contours of the continuum in the observed spectral range 1-2 µ m(same as in Fig. 4, left) superimposed; H β (centre-left), [O ii ] (centre-right), and H α (right) flux maps. Middle row: [O iii ] / H β (left) and [O iii ] / [O ii ] (centre-left) line ratio maps.  \n<!-- image -->  \n<!-- image -->  \n<!-- image -->  \n<!-- image -->  \n<!-- image -->  \n<!-- image -->  \nFig. C.3. Metallicity gradients for the two minor sources in COSMOS24108, [O iii ]-Ea and [O iii ]-Eb (top and mid panels, respectively), and for the main system (bottom panel), when centring the gradient around the peak of the [O iii ] emission instead of around the continuum peak as in Fig. 6.  \n<!-- image -->"}