(function(){return function(e,r,t){var i=Scanner.fromMessage(e);i.setLocale(r);var a,n,p,o,l,g,s,u,m,d,f,h,c,x,v,A,T,C,y,S=[],D=[];a=i.getSpan().innerCapture(regExpFormatted(/\1\s*(.+)/,t.reservationIdPrefix),1).trim(),n=i.getSpan().next(t.checkinUrlPrefix).nextLink(),A=i.getSpan().next(t.pricePrefix).nextTag("td2").tagContents(),A.exists()&&(T=A.innerCapture(/([\d,.]+)/,1),C=A.innerCapture(/([^\d$,.]+)/,1).trim()),v=i.getSpan().next(t.passengerPrefix).parentAnyTag("table"),v.exists()&&(S=v.allInnerTagsFiltered("td2").map(function(e){return(""+e).trim()}).filter(function(e){return!t.passengerPrefix.test(e)&&!/^</.test(e)})),x=i.getSpan().next(t.flightNumberRegExp);do{var z;p=x.previousTag("table3").innerDate(),p===y&&z&&(p=z);var E=x.innerCapture(t.flightNumberRegExp);o=E[1],l=E[2];var F=x.next(t.flightTimeAirportRegExp),R=!1;if(F.exists()||(R=!0,F=x.next(t.ftarAlternate)),F.exists()){var N=F.innerCapture(R?t.ftarAlternate:t.flightTimeAirportRegExp),b=[N[0],N[1],N[2],R?null:N[3]];if(s=b[1],u=b[2],m=b[3],F=F.nextTag("td2").next(R?t.ftarAlternate:t.flightTimeAirportRegExp),F.exists()){N=F.innerCapture(R?t.ftarAlternate:t.flightTimeAirportRegExp);var P=[N[0],N[1],N[2],R?null:N[3]];f=P[1],h=P[2],c=P[3],g=i.getDetachedSpan(s+", "+p).innerDate(),d=i.getDetachedSpan(f+", "+p).innerDate(),t.arriveNextDay.test(F.getString())&&(d=modifyDate(d,1),z=d.split(/\s/)[0]),i.getDateDD(g).iso8601>i.getDateDD(d).iso8601&&(d=modifyDate(d,1),z=d.split(/\s/)[0]),R&&(c=h.getString().trim(),h=null),ASSERT(o,l)&&D.push({airlineCode:o,flightNumber:l,departureTime:g,departureAirportFuzzy:u,departureAirportCode:m,arrivalTime:d,arrivalAirportFuzzy:h,arrivalAirportCode:c})}}y=x.previousTag("table3").innerDate(),x=x.next(t.flightNumberRegExp)}while(x.exists());var k=[];if(D.forEach(function(e){S.forEach(function(r){if(ASSERT(r,a)){k.push({"@context":"http://schema.org","@type":"http://schema.org/FlightReservation",reservationFor:{"@type":"http://apple.com/FuzzyFlight",airlineName:e.airlineName,airlineCode:e.airlineCode,flightNumber:e.flightNumber,departureAirportFuzzy:e.departureAirportFuzzy,departureAirportCode:e.departureAirportCode,departureTime:e.departureTime,arrivalAirportFuzzy:e.arrivalAirportFuzzy,arrivalAirportCode:e.arrivalAirportCode,arrivalTime:e.arrivalTime},underName:{"@type":"http://schema.org/Person",name:r},checkinUrl:n,reservationId:a,reservationStatus:"http://schema.org/ReservationConfirmed",totalPrice:T,priceCurrency:C,reservedTicket:{"@type":"http://schema.org/Ticket",ticketedSeat:{"@type":"http://schema.org/Seat"}}})}})}),k.length)return k}}).call();