New details are emerging of the 11th-hour deal between Blake Lively and Justin Baldoni to avert a headline-splashing trial over alleged sexual harassment on the set of It Ends With Us . Baldoni indicated in a joint filing on Thursday that he waived his right to appeal the court’s order last year dismissing his $400 million lawsuit against Lively, opening the door for the actress to recover legal fees and pursue damages under a California law intended to shield sexual harassment victims from retaliatory defamation claims. If Lively’s bid is granted, the court will schedule proceedings to assess the reputational fallout that flowed from Baldoni’s lawsuit. The actress also seeks punitive damages, which are meant to punish the It Ends With Us director and his faction in the case for particularly egregious misconduct.…