(function(){return function(e,r,t){var a=Scanner.fromMessage(e);a.setLocale(r);var i,p,n,o,m,s,u,g,d,l,h,c,v,N,b,C,f,y=[],S=[];if(i=a.getSpan().innerCapture(t.name,1).trim(),h=a.getSpan().innerCapture(regExpFormatted(/\1\s+(.*)/,t.ticketNumber),1),b=a.getSpan().innerCapture(regExpFormatted(/\1\s+([A-Z\d]{5,})/,t.reservationId),1),not(i))return CONTINUE;S[""+i]={name:i,seats:{},seatingType:{},ticketNumber:h,totalPrice:c,priceCurrency:v},C=a.getSpan().allInnerCapture(t.flightInfo);for(var T=0;T<C.length;T++){if(f=C[T],1===C.length){var A=/(\w{3})\s(\w{3})$/.exec(e.subject);u=A[1],l=A[2]}m=a.getDetachedSpan(f.$departureDate+" "+f.$departureHour+":"+f.$departureMinute).innerDate(),g=a.getDetachedSpan(f.$arrivalDate+" "+f.$arrivalHour+":"+f.$arrivalMinute).innerDate(),o=f.$airlineCode,p=f.$flightNumber,s=f.$departureAirport,d=f.$arrivalAirport,n=a.getSpan().innerCapture(regExpFormatted(/\1\s+(.*)/,t.price),1),c=n.innerCapture(/([\d,.]+)/,1),v=n.innerCapture(/([^\d,.]+)/,1).trim(),ASSERT(o,p,s,m,d,g)&&y.push({reservationId:b,airlineCode:o,flightNumber:p,departureAirport:s,departureCode:u,arrivalCode:l,departureTime:m,arrivalAirport:d,arrivalTime:g,passengers:S})}var $=[];for(T=0;T<y.length;T++)for(var F=y[T],k=Object.keys(F.passengers),I=0;I<k.length;I++){var z=F.passengers[k[I]],D={"@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:z.name},checkinUrl:N,reservationId:F.reservationId,reservationStatus:"http://schema.org/ReservationConfirmed",reservedTicket:{"@type":"http://schema.org/Ticket",ticketNumber:h,ticketedSeat:{"@type":"http://schema.org/Seat",seatNumber:z.seats[F.flightNumber],seatingType:z.seatingType[F.flightNumber]}}};valid(z.membershipNumber,z.programName)&&(D.programMembershipUsed={"@type":"http://schema.org/ProgramMembership",membershipNumber:z.membershipNumber,programName:z.programName}),$.push(D)}return $.length?$:void 0}}).call();