(function(){return function(e,r,t){var a=Scanner.fromMessage(e);a.setLocale(r);var n,i,l,d,o,p,s,g,u,m,h,T,c=[],v=[];n=a.getSpan().innerCapture(regExpFormatted(/\b\1 (.*?)\s/,t.bookingReference),1),i=(""+a.getSpan().nextText(t.passengers).parentAnyTag("table").tagContents()).match(/\d?\d\.\s+(?:[a-zA-Z]+ *)+/g);for(var C=/\d?\d\.\s*((?:[a-zA-Z]+\s*)+)/,f=(a.getSpan().nextText(t.passengers).parentAnyTag("table").allInnerTagsFiltered("td4"),0);f<i.length;f++)v.push(i[f].replace(C,"$1"));if(!v.length)return CONTINUE;if(o=a.getSpan().nextText(t.itineraryDetails).nextTag("table4").allInnerTags("tr4").map(function(e){return e.allInnerTagsFiltered("td4")}).filter(function(e){return e.length>=7}),o.length>0)for(var b=0;b<o.length;b++){d=o[b],l=d[0].innerDate(),s=d[1].innerCapture(/($<code>\D+)($<flightNumber>\d+)/),g=s?s.$code:null,p=s?s.$flightNumber:null,m=d[2],T=d[3],u=combineDateAndTime(l,d[4].innerDate()),h=(""+d[5]).match(/(\d{2}:\d{2})\s*(\(?\+\d+\)?)?/),void 0!==h[h.length-1]?(l=modifyDate(l,1),h=combineDateAndTime(l,d[5].innerDate())):h=combineDateAndTime(l,d[5].innerDate());var A=d[6];ASSERT(g,p,u,m,h,T)&&c.push({airlineCode:g,flightNumber:p,departureCode:m,departureTime:u,arrivalCode:T,arrivalTime:h,seatingType:A})}else{var $=a.getSpan().nextTag("table4").nextTag("table4").allInnerTagsFiltered("tr4"),y=a.getSpan().nextText("Date"),f=0;for(f=y.isNullSpan_?0:1;f<$.length;f++){var S=$[f].innerCapture(/($<code>[a-zA-Z]{2,3})($<flightNumber>\d+)\s*\[.*/),N=$[f].innerCapture(/.*?\]\s*($<depCode>[a-zA-Z]{2,4})\s*\[/),x=$[f].innerCapture(/.*\]\s*($<arCode>[a-zA-Z]{2,4})\s*\[/),z=($[f].innerCapture(/.*?\]\s*($<arTime>\d?\d:\d{2})\s*\[/),$[f].innerCapture(/.*\]\s*($<depTime>\d?\d:\d{2})\s*\[/)),D=$[f].innerCapture(/.*\]\s*($<class>.*)/);g=S?S.$code:null,p=S?S.$flightNumber:null,m=z?N.$depCode:null,T=x?x.$arCode:null;var A=D?D.$class:null;ASSERT(g,p,m,T,A)&&c.push({airlineCode:g,flightNumber:p,departureCode:m,departureTime:void 0,arrivalCode:T,arrivalTime:void 0,seatingType:A})}}for(var F=[],b=0;b<c.length;b++)for(var I=c[b],R=0;R<v.length;R++){var Z={"@context":"http://schema.org","@type":"http://schema.org/FlightReservation",reservationFor:{"@type":"http://apple.com/FuzzyFlight",airlineName:I.airlineName,airlineCode:I.airlineCode,flightNumber:I.flightNumber,departureAirportFuzzy:I.departureAirport,departureAirportCode:I.departureCode,departureTime:I.departureTime,arrivalAirportFuzzy:I.arrivalAirport,arrivalAirportCode:I.arrivalCode,arrivalTime:I.arrivalTime},underName:{"@type":"http://schema.org/Person",name:v[R]},reservationStatus:"http://schema.org/ReservationCancelled",reservationId:n,reservedTicket:{"@type":"http://schema.org/Ticket",ticketedSeat:{"@type":"http://schema.org/Seat",seatingType:I.seatingType}}};F.push(Z)}return F.length?F:void 0}}).call();