(function(){return function(e,r,a){var t=Scanner.fromMessage(e);t.setLocale(r);var i,n,p,o,m,s,u,l,d,v,g,h,c=[],C=[];i=t.getSpan().innerCapture(a.name,1).trim(),d=t.getSpan().innerCapture(regExpFormatted(/\1\s+(.*)/,a.reservationId),1);var l=t.getSpan().innerCapture(a.name,2).trim();if(not(i))return CONTINUE;C[""+i]={name:i,ticketNumber:l};for(var T=t.getSpan().allInnerCapture(/AIR BERLIN - (\w{2}\s+(\d{2,4}))/,1),N=0;N<T.length;N++)g=T[N],h=g.nextDate(),v=g.innerCapture(/($<airlineCode>\w*)\s+($<flightNumber>\d*)/),p=v.$airlineCode,n=v.$flightNumber,v=t.getSpan().innerCapture(regExpFormatted(/\1\s*\n.*?(?:\2)?\s{2,}($<departure>.+?)\s{2,}($<arrival>.+?)\s{2,}($<departureTime>.+?)\s{2,}($<arrivalTime>.*)/,""+g,""+h)),m=v.$departure,u=v.$arrival,o=combineDateAndTime(h,v.$departureTime),s=combineDateAndTime(h,v.$arrivalTime),ASSERT(p,n,m,o,u,s)&&c.push({reservationId:d,airlineCode:p,flightNumber:n,departureAirport:m,departureTime:o,arrivalAirport:u,arrivalTime:s,passengers:C});var f=[];for(N=0;N<c.length;N++)for(var A=c[N],$=Object.keys(A.passengers),b=0;b<$.length;b++){var S=A.passengers[$[b]],y={"@context":"http://schema.org","@type":"http://schema.org/FlightReservation",reservationFor:{"@type":"http://apple.com/FuzzyFlight",airlineName:A.airlineName,airlineCode:A.airlineCode,flightNumber:A.flightNumber,departureAirportFuzzy:A.departureAirport,departureAirportCode:A.departureCode,departureTime:A.departureTime,arrivalAirportFuzzy:A.arrivalAirport,arrivalAirportCode:A.arrivalCode,arrivalTime:A.arrivalTime},underName:{"@type":"http://schema.org/Person",name:S.name},reservationId:A.reservationId,reservationStatus:"http://schema.org/ReservationConfirmed",reservedTicket:{"@type":"http://schema.org/Ticket",ticketNumber:S.ticketNumber}};f.push(y)}return f.length?f:void 0}}).call();