I'm trying to figure out the mechanism for this reaction (the product is in the second image). As far as I understand, it is an electrophilic aromatic substitution, but I don't understand how to get a bromonium ion out of the NBS. I read that the Br in an N-Br bond has a partial positive charge so could the triazole attack it directly? Or do I need to first separate the Br, turn it into a bromonium ion, and then attack that ion with the triazole? If so, does anyone know how to do that?