(function(){return function(e,t,r,n){var a=Scanner.fromMessage(e);a.setLocale(t);var i,p,x,g,o,d=[],m=[],l=[],s=1,u="Confirmed";x=a.getSpan().next(r.number).nextText("\n"),x=a.getSpan().withInterval(x.getEnd(),x.nextText("\n").getStart()),g=a.getSpan().nextText(r.price).nextText("\n"),g=a.getSpan().withInterval(g.getEnd(),g.nextText("\n").getStart()),g.innerCapture(regExpFormatted(/([\d\., ]+)/),1).trim(),g.innerCapture(regExpFormatted(/([^\d\., ]+)/),1),i=a.getSpan().nextText(r.passenger).nextText("\n"),i=a.getSpan().withInterval(i.getEnd(),i.nextText("\n").getStart());do{var T;T=n?i.innerCapture(regExpFormatted(/(.*) .*?/),1):i.innerCapture(regExpFormatted(/.*?\s(.*)/),1),T.exists()||(T=a.getSpan().innerCapture(regExpFormatted(/\1 [\w\.]+ (.*?)\./,r.name),1),T.exists()||(T=a.getSpan().innerCapture(regExpFormatted(/(.*)\1/,r.send),1).trim())),ASSERT(T)&&m.push({name:T}),i=i.nextText("\n"),i=a.getSpan().withInterval(i.getEnd(),i.nextText("\n").getStart())}while(i.getLength());for(p=a.getSpan().nextText(r.flight).nextText("[1]"),a.getSpan().nextText(r.limit).exists()?u="Pending":a.getSpan().nextText(r.cancel).exists()?u="Cancelled":a.getSpan().nextText(r.refund).exists()&&(u="Cancelled");p.exists();){var h,v,S={},c=p.nextDate(),E=p.nextRegExp(regExpFormatted(/([A-Z\d]+)[\n\(]/)).trim();S.airlineCode=E.innerCapture(regExpFormatted(/([A-Z]{2,3})/),1),S.flightNumber=E.innerCapture(regExpFormatted(/(\d+)/),1);var F=a.getSpan().withInterval(p.nextText("\n").getEnd(),p.nextText("\n").nextText("\n").getStart()).split("-");S.arrivalAirportFuzzy=F[1].trim(),S.departureAirportFuzzy=F[0].trim(),S.departureTime=a.getDetachedSpan(c+" "+c.nextText("\n").nextDate()),h=c.nextText("\n").nextDate().collapseToEnd().nextRegExp(regExpFormatted(/[\d\:]+/)),S.arrivalTime=a.getDetachedSpan(c+" "+h),v=a.getSpan().withInterval(h.previousText("\n").getEnd(),h.nextText("\n").getStart()),v.contains(h.nextText(r.addOne))&&(S.arrivalTime=modifyDate(S.arrivalTime,1)),S.seatNumber=a.getSpan().withInterval(v.nextText("\n").getEnd(),v.nextText("\n").nextText("\n").getStart()).innerCapture(regExpFormatted(/\1(.*)/,r.seat),1).trim(),ASSERT(S.arrivalAirportFuzzy,S.departureAirportFuzzy,S.flightNumber,S.departureTime,S.arrivalTime)&&d.push(S),s++,p=p.nextText("["+s+"]")}o=a.getSpan().nextText(r.checkin).nextLink();for(var C=0;C<d.length;C++)for(var z=d[C],A=z.seatNumber.split(","),y=0;y<m.length;y++){var f=m[y],w={"@context":"http://schema.org","@type":"http://schema.org/FlightReservation",reservationFor:{"@type":"http://apple.com/FuzzyFlight",airlineName:"All Nippon Airways",airlineCode:z.airlineCode,flightNumber:z.flightNumber,departureAirportFuzzy:z.departureAirportFuzzy,departureAirportCode:z.departureAirportCode,departureTime:z.departureTime,arrivalAirportFuzzy:z.arrivalAirportFuzzy,arrivalAirportCode:z.arrivalAirportCode,arrivalTime:z.arrivalTime},underName:{"@type":"http://schema.org/Person",name:f.name},checkinUrl:o,reservationId:x.trim(),reservationStatus:"http://schema.org/Reservation"+u,reservedTicket:{"@type":"http://schema.org/Ticket",ticketedSeat:{"@type":"http://schema.org/Seat",seatNumber:A[y],seatingType:""}}};l.push(w)}if(l.length)return l}}).call();