(function(){return function(e,t,r){var n=Scanner.fromMessage(e);n.setLocale(t);var a,i,l,o,p,u,d,s,g,m,c,f=n.getSpan(),h=[],v=[],C=f.next(r.dates).parentAnyTag("td").tagContents().innerCapture(regExpFormatted(/\1\s*[\n]+($<firstDate>.*)\s-\s($<secondDate>.*)/,r.dates)),A=C?C.$firstDate:null;f.next(r.itNum).parentAnyTag("td").tagContents().innerCapture(regExpFormatted(/\1\s*[\n]+(.*)/,r.itNum),1);i=r.cancelled.test(e.plain)?"cancelled":"confirmed",C=f.next(r.confirmation).parentAnyTag("td").tagContents().innerCapture(regExpFormatted(/\1\s*[\n]+($<confirm>.*)\s*\(($<airlineName>.*)\)/,r.confirmation)),a=C?C.$confirm:null,l=C?C.airlineName:null;var T=(""+f.next(r.ticket).parentAnyTag("td").tagContents()).split("\n").filter(function(e){return e.length>0}).map(function(e){return e.replace(/(\d+)\s*\((.*)\)/,"$1")}),N=(""+f.next(r.ticket).parentAnyTag("td").tagContents()).split("\n").filter(function(e){return e.length>0}).map(function(e){return e.replace(/(\d+)\s*\((.*)\)/,"$2")});C=n.getSpan().next(r.departure).parentAnyTag("td").nextAnyTag("td").tagContents().innerCapture(/[a-zA-Z ]+($<flightNumber>\d+)\s(?:\1.*)?/);for(var $=1;$<T.length;$++)h.push({name:N[$],ticketNumber:T[$]});var x=f.next(r.departure).nextTag("table7"),b=f.next(r.departure).nextTag("table7").allInnerTagsFiltered("td8");for(b=b.filter(function(e){return!/Terminal: \d/.test(e.getString())});!x.isNullSpan_&&0!==b.length;){C=b[0].innerCapture(/($<airlineName>[a-zA-Z\s]+)\s\(($<airlineCode>[\d\w]+)\)/),u=C?C.$airlineName:null,d=C?C.$airlineCode:null,p=b[1];var y=x.previousAnyTag("td").tagContents().innerCapture(regExpFormatted(/[a-zA-Z ]+($<flightNumber>\d+)\s?(?:\1.*)?/,r.op));o=y?y.$flightNumber:null,p=combineDateAndTime(n.getDetachedSpan(""+A),p),C=b[2].innerCapture(/($<airlineName>[a-zA-Z\s]+)\s\(($<airlineCode>[\d\w]+)\)/),g=C?C.$airlineName:null,m=C?C.$airlineCode:null,s=b[3],/\d?\d:\d{2}(?:AM|PM)?/i.test(s)||(s=b[4]),s=combineDateAndTime(n.getDetachedSpan(""+A),s),s&&v.push({departureAirport:u,departureCode:d,departureTime:p,arrivalTime:s,arrivalAirport:g,flightNumber:o,arrivalCode:m}),x=x.nextTag("table7"),b=x.allInnerTagsFiltered("td8"),b=b.filter(function(e){return!/Terminal: \d/.test(e.getString())})}for(var F=[],c=0;c<v.length;c++)for(var z=v[c],S=0;S<h.length;S++){var D={"@context":"http://schema.org","@type":"http://schema.org/FlightReservation",reservationFor:{"@type":"http://apple.com/FuzzyFlight",airlineName:l,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:h[S].name},reservationId:a,ticketNumber:h[S].ticketNumber,reservationStatus:"http://schema.org/Reservation"+i};F.push(D)}return F}}).call();