A 14-year-old girl has been found guilty of the attempted murder of two teachers and a pupil at a school in West Wales.