new ReverseTemplateList([new ReverseTemplate("expedia.com-flight-changes-en",function(e){return/^Changes have been made to your .*? flight/.test(e.subject)||/^Your flight itinerary .*? changed$/.test(e.subject)},function(e){if(/^Changes have been made to your .+? flight/.test(e.subject)||/^Your flight itinerary .+? changed$/.test(e.subject)){if(!/notifications@expedia.com/.test(e.from)){var r="en_US",t={};t.itineraryLabel="Revised Itinerary",t.confirmationLabel="Airline confirmation code",t.passenger="Traveler(s)",t.traveler="Traveler",t.ticketNo="Airline Ticket No.",t.cancelled=/Per your request, your flight is canceled/,t.cancelledLabel="CANCELED",t.reservationId="Expedia Itinerary No.";return loadHelper("expediamail.com-flight-alternative-skeleton.js")(e,r,t)}var a=Scanner.fromMessage(e);a.setLocale("en_US");var i,n,s,l,o,p,u,m,g,c,h,d,f,v,C,b,y=[],N={};if(i=a.getSpan().nextText("Passenger(s):").parentAnyTag("td").tagContents().innerCapture(/\bPassenger\(s\): (.*)/,1),not(i))return CONTINUE;i=i.split(",").map(function(e){return e.trim()});for(var T=0;T<i.length;T++)N[""+i[T]]={name:i[T],seats:{},seatingType:{}};o=a.getSpan().next(/Your updated flight (?:schedule|itinerary) is below/).next(/(?:Flight (?:Change )?Details|Cancelled Flight)/).parentAnyTag("table");var S=o.getTagNumber();o=o.withStart(a.getSpan().next(/Your updated flight (?:itinerary|schedule) is below/).getEnd()).allInnerTags("tr"+S).map(function(e){return e.allInnerTagsFiltered("td"+S)}).filter(function(e){return e.length>0});for(var A=0;A<o.length;A++)if(n=o[A],n[0].innerCapture(/^(?:Flight(?: Change)? Details|Cancelled Flight)/)&&n[1])c=n[1],/Cancelled Flight/.test(n[0])&&(b="Cancelled");else if(n[1]&&n[1].innerCapture(/^Flight Number:/))u=n[0],p=n[1].innerCapture(/^Flight Number: ($<code>\w{2})\s*(?:\d+\s+)?($<flightNumber>\d+)/),m=p?p.$code:null,g=p?p.$flightNumber:null,a.getSpan().nextText(u+" confirmation code:").exists()&&(s=a.getSpan().innerCapture(RegExp(regExpEscape(""+u)+" confirmation code: (.*)\\s"),1));else if(n[0].innerCapture(/^From:/)&&n[1])h=n[0].innerCapture(/^From:.*\(([A-Z]{3})[-\)]/,1);else if(n[0].innerCapture(/^To:/)&&n[1])f=n[0].innerCapture(/^To:.*\(([A-Z]{3})[-\)]/,1),v=n[1].innerCapture(/^Arrive: .* \+1 day$/),d=combineDateAndTime(c,n[1].lastInnerDate()),not(v)||(d=modifyDate(d,1));else if(n[1]&&n[1].innerCapture(/^Class:/))C=n[1].innerCapture(/^Class: (.*)/,1);else if(n[0].innerCapture(/^Equipment:/)){if(n[1]&&n[1].innerCapture(/^Seats:/)&&(l=n[1].innerCapture(/^Seats: (.*)/,1).split(",").map(function(e){return e.trim()})),valid(g)){i=Object.keys(N);for(var T=0;T<i.length;T++)valid(l)&&(N[i[T]].seats[""+g]=l[T]),valid(C)&&(N[i[T]].seatingType[""+g]=C)}ASSERT(m,g,c,h,d,f)&&y.push({airlineName:u,airlineCode:m,flightNumber:g,departureTime:c,departureCode:h,arrivalTime:d,arrivalCode:f,reservationId:s,passengers:N,reservationStatus:b}),p=u=m=g=c=h=d=f=C=l=s=b=null}for(var F,x=[],A=0;A<y.length;A++){F=y[A];for(var k=Object.keys(F.passengers),E=0;E<k.length;E++){var I=F.passengers[k[E]],j={"@context":"http://schema.org","@type":"http://schema.org/FlightReservation",reservationFor:{"@type":"http://apple.com/FuzzyFlight",airlineName:F.airlineName,airlineCode:F.airlineCode,flightNumber:F.flightNumber,departureAirportFuzzy:F.departureAirport,departureAirportCode:F.departureCode,departureTime:F.departureTime,arrivalAirportFuzzy:F.arrivalAirport,arrivalAirportCode:F.arrivalCode,arrivalTime:F.arrivalTime},underName:{"@type":"http://schema.org/Person",name:I.name},checkinUrl:F.checkinUrl,reservationId:F.reservationId,reservationStatus:"http://schema.org/Reservation"+(F.reservationStatus||"Confirmed"),totalPrice:I.price,priceCurrency:I.currency,reservedTicket:{"@type":"http://schema.org/Ticket",ticketNumber:I.ticketNumber,ticketedSeat:{"@type":"http://schema.org/Seat",seatNumber:I.seats[F.flightNumber],seatingType:I.seatingType[F.flightNumber]}}};valid(I.membershipNumber,I.programName)&&(j.programMembershipUsed={"@type":"http://schema.org/ProgramMembership",membershipNumber:I.membershipNumber,programName:I.programName}),x.push(j)}}if(x.length)return x}},"0/1/2/3/4/5/6/223/231/1133","SG6be94b68")]);