(function(){return function(e,r,t){function a(r){if(r.test(e.plain)){var t=RegExp(/From\s+($<departureFuzzy>.*)\(($<departureCode>.+?)\)\s+/.source+/to\s+($<arrivalFuzzy>.*)\(($<arrivalCode>.+?)\)\n/.source+/($<date>.+)\s+Flight\s+($<flightNumber>\d+)\s+Depart.+?at\s+/.source+/($<departureHour>[\d]{2})($<departureMinute>[\d]{2})\s+/.source+/and arrive.*at\s+($<arrivalHour>[\d]{2})($<arrivalMinute>[\d]{2})/.source);s=i.getSpan().innerCapture(regExpFormatted(/\1\n+\2/,r,t)),c=s.$departureFuzzy,m=s.$departureCode,$=s.$arrivalFuzzy,C=s.$arrivalCode,l="FR",o=s.$flightNumber,g=i.getDetachedSpan(s.$date+" "+s.$departureHour+":"+s.$departureMinute).innerDate(),v=i.getDetachedSpan(s.$date+" "+s.$arrivalHour+":"+s.$arrivalMinute).innerDate(),ASSERT(o,g,c,v,$)&&N.push({airlineCode:l,flightNumber:o,departureAirport:c,departureCode:m,departureTime:g,arrivalAirport:$,arrivalCode:C,arrivalTime:v,passengers:T})}}var i=Scanner.fromMessage(e);i.setLocale(r);var n,p,o,u,d,s,l,g,c,m,h,v,$,C,F,f,y,z,S=[],N=[];F=i.getSpan().innerCapture(regExpFormatted(/\1\s+(.*)/,t.reservationId),1);var T=i.getSpan().innerCapture(regExpFormatted(/\1\n(.*)/,t.passengers),1).allInnerCapture(/\d\.\s+([\D]+)/,1);if(!T||!T.length){T=[i.getSpan().innerCapture(regExpFormatted(/\1\s+(.+)/,t.passengers),1).rstrip(":")]}for(a(t.goingOut),a(t.comingBack),f=0;f<N.length;f++){h=N[f];for(var A=0;A<T.length;A++){S.push({"@context":"http://schema.org","@type":"http://schema.org/FlightReservation",reservationFor:{"@type":"http://apple.com/FuzzyFlight",airlineName:h.airlineName,airlineCode:h.airlineCode,flightNumber:h.flightNumber,departureAirportFuzzy:h.departureAirport,departureAirportCode:h.departureCode,departureTime:h.departureTime,arrivalAirportFuzzy:h.arrivalAirport,arrivalAirportCode:h.arrivalCode,arrivalTime:h.arrivalTime},underName:{"@type":"http://schema.org/Person",name:T[A]},checkinUrl:y,reservationId:F,reservationStatus:"http://schema.org/ReservationConfirmed",totalPrice:u,priceCurrency:d,reservedTicket:{"@type":"http://schema.org/Ticket",ticketNumber:z,ticketedSeat:{"@type":"http://schema.org/Seat",seatNumber:n,seatingType:p}}})}}if(S.length)return S}}).call();