(function(){return function(e,t,r){if(!e||!t||!r)return CONTINUE;var a=Scanner.fromMessage(e);a.setLocale(t);var n,i,l,s,p,o,g,u,d,h,m,c,v,T,x,C,f,y=a.getSpan(),F=[],M=[];i=(""+y.withInterval(y.nextText(r.reservationId).getEnd(),y.nextText(r.ticketNumber).getStart()).trim()).match(/(.+)\s/)[1],n=(""+y.withInterval(y.nextText(r.ticketNumber).getEnd(),y.nextText(r.flightDetails).getStart()).trim()).match(/(.+)\s/)[1],o=y.nextText(r.totalPrice).nextTag("th1").tagContents().innerCapture(/($<priceCurrency>[\w]+)\s($<totalPrice>[\d,.]+)/),g=o?o.$totalPrice:null,u=o?o.$priceCurrency:null,s=y.withInterval(y.nextText(r.flightDetails).getEnd(),y.nextText(r.endOfFlightDetails).getStart()).allInnerTagsFiltered("table1");for(var S=y.next(regExpFormatted(/\[\/table1\]\s*[\n]+(?:Miss|Mr|Ms|Mrs)?\s([^\n]+)\s*[\n]+\1/,r.language));!S.isNullSpan_;){M.push({name:S.innerCapture(regExpFormatted(/\[\/table1\]\s*[\n]+(?:Miss|Mr|Ms|Mrs)?\s([^\n]+)\s*[\n]+\1/,r.language),1)}),S=S.nextAnyTag("td").next(regExpFormatted(/\[\/table1\]\s*[\n]+(?:Miss|Mr|Ms|Mrs)?\s([^\n]+)\s*[\n]+\1/,r.language))}for(f=0;f<s.length;f++){var A=s[f].allInnerTagsFiltered("tr1");h=(""+A[0]).match(/,(.+)/)[1].trim();var N=(""+A[1].allInnerDates()).split(",");m=N[0],T=N[1],h=h.replace(/,/g,""),N=h.split(" "),h=N[1]+" "+N[0]+" "+N[2],m=getFuzzyDate(a.getDetachedSpan(h+" "+m)),T=getFuzzyDate(a.getDetachedSpan(h+" "+T)),[,c,v]=A[1].innerCapture(/\n(.+)\((.+)\)/);var b=A[1].allInnerTagsFiltered("th1");[,x,C]=b[0].innerCapture(/\n(.+)\((.+)\)/),[,d,p]=b[1].innerCapture(/([0-9A-Z]{2}?)(?:\W+)(\d+)/),ASSERT(p,m,T)&&F.push({airlineCode:d,flightNumber:p,departureTime:m,departureCode:v,departureAirport:c.trim(),arrivalTime:T,arrivalCode:C,arrivalAirport:x.trim()})}var z=[];for(f=0;f<F.length;f++)for(var I=F[f],D=0;D<M.length;D++){var E={"@context":"http://schema.org","@type":"http://schema.org/FlightReservation",reservationFor:{"@type":"http://apple.com/FuzzyFlight",airlineName:"Copa Airlines",airlineCode:"CM",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:M[D].name},checkinUrl:l,reservationId:i,reservationStatus:"http://schema.org/ReservationConfirmed",totalPrice:g,priceCurrency:u,reservedTicket:{"@type":"http://schema.org/Ticket",ticketNumber:n,ticketedSeat:{"@type":"http://schema.org/Seat",seatNumber:"",seatingType:""}}};z.push(E)}return z.length?z:void 0}}).call();