(function(){return function(e,r,t){if(!e||!r||!t)return CONTINUE;var a=Scanner.fromMessage(e);a.setLocale(r);var i,n,o,l,p,s,u,d,c,g,h,m,v,T,C,f,y,x,D,A,b,F=a.getSpan(),S=[],I={};n=F.withInterval(F.nextText(t.reservationId).getEnd(),F.nextText(t.reservationIdPostFix).getStart()).trim();var N=F.nextText(t.passengerDetails).nextTag("table3").allInnerTagsFiltered("td3"),P=[];for(x=0;x<N.length;x++)/\u2022/.test(""+N[x])||P.push(N[x]);for(u=F.nextText(t.totalPrice).nextTag("td3").tagContents().innerCapture(/($<priceCurrency>[\w]+)\s($<totalPrice>[\d,.]+)/),d=u?u.$totalPrice:null,c=u?u.$priceCurrency:null,x=0;x<P.length;x++)l=""+P[x],I[""+l]={name:l,totalPrice:d,priceCurrency:c};p=F.withInterval(F.nextText(t.flightDetails).getEnd(),F.nextText(t.endOfFlightDetails).getStart()).allInnerTagsFiltered("table3");for(var x=0;x<p.length;x++){for(var k=p[x].firstAbsoluteDate(),z=p[x].allInnerTagsFiltered("td3"),E=[],$=0,w=0;w<z.length;w++)/Class:|Equipment:|Equipo:/.test(z[w])&&E.push(w);var O=[],R=[],q=5;for(w=q;w<E[$];w++)O.push(z[w]),w+1===E[$]&&(w=E[$],$+=1,R.push(O),O=[]);for(var w=0;w<R.length;w++){var M=R[w];[,g,s]=M[0].innerCapture(/([A-Z0-9]+)\s(\d+)/),[,h,m]=M[1].innerCapture(/(.+)\n(.+)/),[,T,C]=M[2].innerCapture(/(.+)\n(.+)/),b=combineDateAndTime(k,h),Date.parse(unSpanDate_(A))>Date.parse(unSpanDate_(b))&&(b=modifyDate(b,1),k=modifyDate(k,1)),A=combineDateAndTime(k,T),Date.parse(b)>Date.parse(A)&&(A=modifyDate(A,1)),ASSERT(s,h,T)&&S.push({airlineCode:g,flightNumber:s,departureTime:b,departureCode:v,departureAirport:m.trim(),arrivalTime:A,arrivalCode:f,arrivalAirport:C.trim(),passengers:I})}}var U=[];for(x=0;x<S.length;x++){var _=S[x],j=Object.keys(_.passengers);for(D=0;D<j.length;D++){y=_.passengers[j[D]];U.push({"@context":"http://schema.org","@type":"http://schema.org/FlightReservation",reservationFor:{"@type":"http://apple.com/FuzzyFlight",airlineName:"Copa Airlines",airlineCode:"CM",flightNumber:_.flightNumber,departureAirportFuzzy:_.departureAirport,departureAirportCode:_.departureCode,departureTime:_.departureTime,arrivalAirportFuzzy:_.arrivalAirport,arrivalAirportCode:_.arrivalCode,arrivalTime:_.arrivalTime},underName:{"@type":"http://schema.org/Person",name:y.name},checkinUrl:o,reservationId:n,reservationStatus:"http://schema.org/ReservationConfirmed",totalPrice:y.totalPrice,priceCurrency:y.priceCurrency,reservedTicket:{"@type":"http://schema.org/Ticket",ticketNumber:i,ticketedSeat:{"@type":"http://schema.org/Seat",seatNumber:"",seatingType:""}}})}}return U.length?U:void 0}}).call();