(function(){return function(e,r,t){var a=Scanner.fromMessage(e);a.setLocale(r);var n,i,p,s,o,g,m,d,l,u,h,v,c,T,C,y,A,N,b,$,f,x=[],S={};for(n=a.getSpan().next(t.reservationId).parentAnyTag("td").tagContents().innerCapture(regExpFormatted(/\1[\s\n]*(\w*)/,t.reservationId),1),g=a.getSpan().next(t.departs).parentAnyTag("table").allInnerTags("tr3"),b=0;b<g.length;b++)if(g[b].innerDate().exists()){A=g[b],$=A.nextAnyTag("td").nextAnyTag("td").nextAnyTag("td").tagContents(),l=$.nextAnyTag("td").tagContents(),c=l.nextAnyTag("td").tagContents(),o=c.nextAnyTag("td").tagContents(),N=o.nextAnyTag("td").nextAnyTag("td").tagContents(),s=N.nextAnyTag("td").tagContents(),$=$.innerCapture(/($<airlineName>\w+)\s+($<flightNumber>\d+)/),d=$.$airlineName,m=$.$flightNumber,l=l.innerCapture(/($<departureAirport>.*)\s+\(($<departureCode>.*)\)($<departureTime>[\s\S]*)/),h=l.$departureAirport,v=l.$departureCode,u=a.getDetachedSpan((""+l.$departureTime).replace(/\n/g," ")).innerDate(),c=c.innerCapture(/($<arrivalAirport>.*)\s+\(($<arrivalCode>.*)\)($<arrivalTime>[\s\S]*)/),C=c.$arrivalAirport,y=c.$arrivalCode,T=a.getDetachedSpan((""+c.$arrivalTime).replace(/\n/g," ")).innerDate(),S={},p=N.split(/\n/);for(var k=s.split(/\n/),F=0;F<p.length;F++)S[p[F]]={name:p[F],seats:k[F],seatingType:(""+o).replace(/\n/g," ").trim()};ASSERT(d,m,h,v,u,C,y,T)&&x.push({airlineName:d,flightNumber:m,reservationId:n,departureAirport:h,departureCode:v,departureTime:u,arrivalAirport:C,arrivalCode:y,arrivalTime:T,passengers:S})}var I=[];for(b=0;b<x.length;b++)for(var z=x[b],D=Object.keys(z.passengers),F=0;F<D.length;F++){var P=z.passengers[D[F]];/alaska/i.test(z.airlineName)&&(z.airlineCode="AS"),f={"@context":"http://schema.org","@type":"http://schema.org/FlightReservation",reservationFor:{"@type":"http://apple.com/FuzzyFlight",airlineName:z.airlineName,airlineCode:z.airlineCode,flightNumber:z.flightNumber,departureAirportFuzzy:z.departureAirport,departureAirportCode:z.departureCode,departureTime:z.departureTime,arrivalAirportFuzzy:z.arrivalAirport,arrivalAirportCode:z.arrivalCode,arrivalTime:z.arrivalTime},underName:{"@type":"http://schema.org/Person",name:P.name},checkinUrl:i,reservationStatus:"http://schema.org/Reservation"+(z.reservationStatus||"Confirmed"),reservationId:valid(z.reservationId)?z.reservationId:n,reservedTicket:{"@type":"http://schema.org/Ticket",ticketNumber:P.ticketNumber,ticketedSeat:{"@type":"http://schema.org/Seat",seatNumber:P.seats,seatingType:P.seatingType}},totalPrice:P.totalPrice,priceCurrency:P.priceCurrency},not(P.membershipNumber)||(f.programMembershipUsed={"@type":"http://schema.org/ProgramMembership",membershipNumber:P.membershipNumber,programName:P.programName}),I.push(f)}if(I.length)return I}}).call();