(function(){return function(e,t,r){if(!e||!t||!r)return CONTINUE;var a=Scanner.fromMessage(e);a.setLocale(t);var n,i,p,g,s,o,l,d,m,u,h,x,T=[],c=[];for(h=a.getSpan().next(r.passengerPrefix).next(r.passenger).nextAnyTag("table").allInnerTags("td3"),d=0;d<h.length;d++){c.push({name:(""+h[d].innerCapture(/\:\s+(.*)/,1)).trim(),seats:{}})}for(a.getSpan().nextText(r.passenger).nextTag("td3").tagContents().innerCapture(regExpFormatted(/:(.*)/),1).trim(),s=a.getDetachedSpan(e.subject).innerCapture(regExpFormatted(/(\w+)$/),1),o=a.getSpan().nextText(r.total).nextTag("td3").tagContents(),n=o.innerCapture(regExpFormatted(/([\d\.,\s]+)/),1).trim(),i=o.innerCapture(regExpFormatted(/([^\d\.,\s]+)/),1).trim(),l=a.getSpan().nextText(r.flightData).nextTag("table3").allInnerTagsFiltered("tr3"),d=0;d<l.length;d+=2){u={};var f=l[d],C=f.innerCapture(regExpFormatted(/\1.* (..) (\d{2,})/,r.number));if(3===C.length&&(u.airlineCode=C[1],u.flightNumber=C[2]),l[d+1].inner(r.seat).exists()){if(x=l[d+1].inner(r.seat).parentAnyTag("td").allInnerCapture(/($<seatNumber>\d+\D)\s\(($<seatIndex>\d+)\)/),x.length>0)for(m=0;m<x.length;m++)c[x[m].$seatIndex-1].seats[u.flightNumber]=x[m].$seatNumber;else c[0].seats[u.flightNumber]=l[d+1].innerCapture(regExpFormatted(/\1:\s+(.*)/,r.seat),1);d++}var v=l[d+1];u.departureAirport=v.withEnd(v.nextAnyTag("td").getStart()).tagContents().innerCapture(regExpFormatted(/[\d:]+(.*)/),1).trim(),u.departureTime=getFuzzyDate(a.getDetachedSpan(f.innerDate()+" "+v.firstDate())),u.arrivalAirport=v.nextAnyTag("td").nextAnyTag("td").tagContents().innerCapture(regExpFormatted(/[\d:]+(.*)/),1).trim(),u.arrivalTime=a.getDetachedSpan(f.innerDate()+" "+v.firstDate().nextDate()),ASSERT(u.departureTime,u.arrivalTime,u.departureAirport,u.arrivalAirport,u.flightNumber)&&T.push(u)}var N=[];for(d=0;d<T.length;d++)for(u=T[d],m=0;m<c.length;m++){var y={"@context":"http://schema.org","@type":"http://schema.org/FlightReservation",reservationFor:{"@type":"http://apple.com/FuzzyFlight",airlineName:u.airlineName,airlineCode:u.airlineCode,flightNumber:u.flightNumber,departureAirportFuzzy:u.departureAirport,departureAirportCode:u.departureIata,departureTime:u.departureTime,arrivalAirportFuzzy:u.arrivalAirport,arrivalAirportCode:u.arrivalIata,arrivalTime:u.arrivalTime},underName:{"@type":"http://schema.org/Person",name:c[m].name},checkinUrl:g,reservationId:s,reservationStatus:"http://schema.org/ReservationConfirmed",totalPrice:n,priceCurrency:i,reservedTicket:{"@type":"http://schema.org/Ticket",ticketNumber:p,ticketedSeat:{"@type":"http://schema.org/Seat",seatingType:u.seatingType,seatNumber:c[m].seats[u.flightNumber]}}};N.push(y)}return N.length?N:CONTINUE}}).call();