An awkward situation all round… like so many other posters, I find this triggering uncomfortable memories of my school days. Kids can be very cruel!
Your daughter was naive to ask the mum if she could come to the sleepover when she hadn’t been invited. When she has calmed down and feels less hurt, you need to explain to her that you don’t invite yourself to a social event that someone else is organising.
The other girls were mean to discuss the sleepover in front of her.
The mum was extremely rude to rescind the invitation 15 mins before the start of the party and to be so blunt. Yes, she was put on the spot by your daughter, but she should have contacted you much earlier and let your daughter down gently, she could easily have made an excuse.
Friendships do come and go at that age- I agree with PP that you need to discourage your daughter from escalating the situation with a text war. I would try and use this as an opportunity to teach her about boundaries, without wading in on her behalf and making matters worse for her socially . Say to her that she has a choice about who her friends are, and encourage her to invite some other girls over for pizza/cinema/sleepover soon.
Unless the lift arrangement is reciprocal and benefits your daughter, I would stop offering lifts to this girl. Text her mum in a neutral, factual way- don’t rage about her treatment of your DD but, as a PP has suggested, something along the lines of ‘DD was upset not to be invited to X’s sleepover. As our daughters don’t seem to be getting on so well at the moment I think it’s best that I don’t give X a lift to dance class/Swimming/whatever it may be right now’. The mum will get the message.
Oh, and do take your daughter out for a treat. It sucks to be 12 and excluded from a sleepover! x