This is so hard to comment on because I see considerable similarities with my own dd (7yo) when she's totally dysregulated. And it's usually much, much worse on holiday. Thankfully, her worst behaviour is directed at dh and I, though. Once she reaches this level of dysregulation, over a protracted period of time without the opportunity to reduce her anxiety, the only way to get her, and us, through it, is to remove all demands in the short term, put up with the disapproving looks from others about our lack of boundaries/ consequences/ behaviour management and just help her regulate first and foremost. The rules come back into play once she is settled. We do have boundaries, she knows right and wrong, and is an absolute delight mostly, well mannered, caring, funny etc. But on her worst days, you'd say she was just doing things to get her own way and we were enabling her behaviour by allowing it to go unchecked. I feel an overwhelming sense of empathy with the parents.
The only thing that gives me pause is that op has said there's a general lack of routine, which I'd agree won't be helping the situation, and may indeed be a big cause of it. They desperately need advice and support, because it sounds like their dd has spiralled completely and they're now struggling to take back the reins.
However. This is your holiday too and, for whatever reason, you were not aware of how badly her behaviour would impact on you and your family. You're close enough friends to holiday together, so I'd expect you to be close enough to explain honestly how you feel: desperately sorry and understanding of their situation, but this isn't what you were expecting and you need some space to enjoy your holiday. As others have said, you may find that they're grateful to you for removing an additional pressure they don't need. As a friend, I'd be enquiring as to what kind of support they have sought, are receiving and if there's anything you can do to help.