(function(){return function(e,r,t){var a=Scanner.fromMessage(e);a.setLocale(r);var i,n=a.getSpan(),p=t.isCancellation?"Cancelled":"Confirmed",l=[],o=[],s=[],u=a.getSpan().next(t.reservationIdPrefix);u.exists()?i=u.parentTag("td3").split("\n")[3].trim():(u=e.html.match(regExpFormatted(/\1[\s\S]*?<\/span>/,t.reservationIdPrefix)))instanceof Array&&u.length>=1&&(i=u[0].split("\n")[2].trim());for(var m=n.next(t.flightLegPrefix[0]).parentTag("table3");m.exists();){m.allInnerTags("table4").forEach(function(e){var r,i,n,p,o,u,m,c,g=e.allInnerTags("td5").map(function(e){return e.tagContents()});if(g&&10===g.length){o=a.getDetachedSpan(g[0]+" "+g[1].replace(/\s+/," ")+" "+g[4].innerDate());var d=g[3].innerCapture(/([0-9A-Z]{2})([0-9]{1,4})/);r=d[1],i=d[2];var h=g[6].replace(/\s+/," ").replace(/\n/," ").innerCapture(/(.+)\s\(([A-Z]{3})\)/);n=h[1],p=h[2],c=a.getDetachedSpan(g[0]+" "+g[1].replace(/\s+/," ")+" "+g[7].innerDate());var f=g[9].replace(/\s+/," ").replace(/\n/," ").innerCapture(/(.+)\s\(([A-Z]{3})\)/);u=f[1],m=f[2],Date.parse(unSpanDate_(o))>Date.parse(unSpanDate_(c))&&(c=modifyDate(c,1)),s.push({airlineCode:r,flightNumber:i,departureAirport:n.trim(),departureAirportCode:p,departureDateTime:o,arrivalAirport:u.trim(),arrivalAirportCode:m,arrivalDateTime:c})}else{var v={name:null,ticketNumber:null},A=e.nextAnyTag("td").tagContents().split(/\n/);v.name=A[0],v.ticketNumber=A[1],v.name=""+v.name.trim(),v.ticketNumber=""+v.ticketNumber.innerCapture(t.ticketNumberRegExp,1),l.map(function(e){return e.name}).indexOf(v.name)===-1&&l.push(v)}});var c=m.next(t.flightLegStopOverPrefix).nextTag("table3");if(c.exists())m=c;else{if(""+(c=m.next(t.flightLegPrefix[1]).parentTag("table3"))==""+m)break;m=c}}return 0===l.length&&l.push({}),s.forEach(function(e){l.forEach(function(r){ASSERT(e.airlineCode,e.flightNumber,e.departureAirport,e.departureDateTime),o.push({"@context":"http://schema.org","@type":"http://schema.org/FlightReservation",reservationFor:{"@type":"http://apple.com/FuzzyFlight",airlineCode:e.airlineCode,airlineName:e.airlineName,flightNumber:e.flightNumber,departureAirportFuzzy:e.departureAirport,departureAirportCode:e.departureAirportCode,departureTime:e.departureDateTime,arrivalAirportFuzzy:e.arrivalAirport,arrivalAirportCode:e.arrivalAirportCode,arrivalTime:e.arrivalDateTime},underName:{"@type":"http://schema.org/Person",name:r.name},reservationId:i,reservationStatus:"http://schema.org/Reservation"+p,reservedTicket:{"@type":"http://schema.org/Ticket",ticketNumber:r.ticketNumber,ticketedSeat:{"@type":"http://schema.org/Seat",seatNumber:r.seat,seatingType:null}}})})}),o}}).call();