(function(){return function(e,t,r){var a=Scanner.fromMessage(e);a.setLocale(t);var n,i,p,o,g,s,m,l,d,u,h,c,v,C,T,N,x,A,y=[],f={};for(g=a.getSpan().next(r.reservationId).parentAnyTag("td").tagContents().innerCapture(regExpFormatted(/\1\s+(.*)\s+</,r.reservationId),1),m=a.getSpan().next(r.ticketNr).parentAnyTag("td").tagContents().innerCapture(regExpFormatted(/\1\s+(.*)\s+</,r.ticketNr),1),p=a.getSpan().next(r.price).nextTag("th7").tagContents(),l=p.innerCapture(/([\d,.]+)/,1),d=p.innerCapture(/[\d,.]+\s(\w+)/,1),u=a.getSpan().next(r.departure).parentTag("table5").allInnerTags("tr5"),h=1;h<u.length;h++)if(u[h].tagContents().innerRegExp(r.departure).exists())v=u[h].tagContents().innerRegExp(r.departure),c=v.previousAnyTag("th").tagContents();else{if(v=u[h],C={},T=v.nextTag("td6").tagContents().innerCapture(/($<airline>[^\d]+)\s+($<flightNumber>\d+)/),C.airlineName=T.$airline,C.flightNumber=T.$flightNumber,C.airlineCode=/delta/gi.test(C.airlineName)?"DL":null,C.seatingType=C.flightNumber.nextTag("td6").tagContents(),C.departureAirport=C.seatingType.nextTag("td6").tagContents(),C.departureTime=a.getDetachedSpan(c+" "+(""+C.departureAirport.nextTag("td6").tagContents()).replace("N"," pm")).innerDate(),C.arrivalAirport=C.departureAirport.nextTag("td6").nextTag("td6").tagContents(),o=(""+C.arrivalAirport.nextTag("td6").tagContents()).replace(/(\d+:\d+)(N)/,"$1 pm"),/\*\*/.test(o)){var b=o.split("\n");b&&2===b.length?(o=b[0].replace("**",""),c=b[1].replace("**","")):(o=o.replace("**",""),c=modifyDate(c,1))}C.arrivalTime=a.getDetachedSpan(c+" "+o).innerDate(),ASSERT(C.airlineName,C.flightNumber,C.departureAirport,C.departureTime,C.arrivalAirport,C.arrivalTime)&&y.push(C)}for(N=a.getSpan().next(r.passengerInfo).nextTag("table6").allInnerTags("tr6"),h=0;h<N.length-1;h++)x=N[h],x.tagContents().innerRegExp(r.name).exists()?(n=x.tagContents().innerRegExp(r.name).nextTag("td7").tagContents(),A={name:n,seats:{}}):(i=x.nextTag("td6").tagContents().innerCapture(/(\d+)/,1),i.nextTag("td7").tagContents().inner(r.seat,1).exists()||(A.seats[i]=i.nextTag("td7").tagContents()),f[A.name]=A);for(var S=/DELTA[^:]*:\s?([A-Z]{3})[^\w]*([A-Z]{3})/,k=a.getSpan().next(S),F=0;k!==a.getNullSpan();){var z=S.exec(k);if(3!==z.length||!y[F])break;y[F].departureAirportCode=z[1],y[F].arrivalAirportCode=z[2],k=k.next(S),F+=1}var R=[];for(h=0;h<y.length;h++){C=y[h];var E=Object.keys(f);if(E.length>0)for(var D=0;D<E.length;D++){x=f[E[D]];var I={"@context":"http://schema.org","@type":"http://schema.org/FlightReservation",reservationFor:{"@type":"http://apple.com/FuzzyFlight",airlineName:C.airlineName,airlineCode:C.airlineCode,flightNumber:C.flightNumber,departureAirportFuzzy:C.departureAirport,departureAirportCode:C.departureAirportCode,departureTime:C.departureTime,arrivalAirportFuzzy:C.arrivalAirport,arrivalAirportCode:C.arrivalAirportCode,arrivalTime:C.arrivalTime},underName:{"@type":"http://schema.org/Person",name:x.name},checkinUrl:s,reservationId:g,reservationStatus:"http://schema.org/ReservationConfirmed",totalPrice:l,priceCurrency:d,reservedTicket:{"@type":"http://schema.org/Ticket",ticketNumber:m,ticketedSeat:{"@type":"http://schema.org/Seat",seatNumber:x.seats[C.flightNumber],seatingType:C.seatingType}}};valid(x.membershipNumber,x.programName)&&(I.programMembershipUsed={"@type":"http://schema.org/ProgramMembership",membershipNumber:x.membershipNumber,programName:x.programName}),R.push(I)}else{var I={"@context":"http://schema.org","@type":"http://schema.org/FlightReservation",reservationFor:{"@type":"http://apple.com/FuzzyFlight",airlineName:C.airlineName,airlineCode:C.airlineCode,flightNumber:C.flightNumber,departureAirportFuzzy:C.departureAirport,departureAirportCode:C.departureAirportCode,departureTime:C.departureTime,arrivalAirportFuzzy:C.arrivalAirport,arrivalAirportCode:C.arrivalAirportCode,arrivalTime:C.arrivalTime},underName:{"@type":"http://schema.org/Person",name:""},checkinUrl:s,reservationId:g,reservationStatus:"http://schema.org/ReservationConfirmed",totalPrice:l,priceCurrency:d,reservedTicket:{"@type":"http://schema.org/Ticket",ticketNumber:m,ticketedSeat:{"@type":"http://schema.org/Seat",seatNumber:"",seatingType:C.seatingType}}};R.push(I)}}if(R.length)return R}}).call();