(function(){return function(e,r,t){var a,i,n,p,l,o,m,s,u,d,h,g=[],v={},c=Scanner.fromMessage(e);for(c.setLocale(r),p=c.getSpan().innerCapture(regExpFormatted(/\1\n\n(.*)/,t.reservationId),1),d=c.getSpan().next(t.reservationId).parentTag("table2").allInnerTagsFiltered("td4").filter(function(e){return e.innerCapture(/^[A-Z\d]{2} \d{2,4}$/)}),o=0;o<d.length;o++){if(u={},"zh_Hans_CN"===r||"ja_JP"===r){var T=d[o].previousTag("td2").innerCapture(/.*,\s(.*)\s(.*)\u6708\s(.*)/);s=T[1]+"-"+("0"+T[2]).slice(-2)+"-"+("0"+T[3]).slice(-2)}else{var C=d[o].previousDate();for(s=!1,m=0;m<2*d.length&&!s;m++)hasTime_(unSpanDate_(C))||(s=C),C=C.previousDate()}i=d[o].nextDate(),u.departureCode=i.parentAnyTag("td").innerCapture(/\((.*?)[\)\s-]/,1),n=i.nextDate(),u.arrivalCode=n.parentAnyTag("td").innerCapture(/\((.*?)[\)\s-]/,1),h=d[o].innerCapture(/($<airlineCode>\D+)\s+($<flightNumber>\d+)/),u.airlineCode=h.$airlineCode,u.flightNumber=h.$flightNumber,u.departureTime=combineDateAndTime(s,i),u.arrivalTime=combineDateAndTime(s,n),Date.parse(u.departureTime)>Date.parse(u.arrivalTime)&&(u.arrivalTime=modifyDate(u.arrivalTime,1)),ASSERT(u.departureTime,u.arrivalTime,u.airlineCode,u.flightNumber,u.departureCode,u.arrivalCode)&&g.push(u)}v=c.getSpan().allInnerCapture(/\[table4\]\s\[tr4\]\s\[td4\]([^\[\]:><\uff1a\/]{4,})\[\/td4\]\s\[td4\]\s{3}/,1),ASSERT(v.length>0);var b,f=[];for(o=0;o<g.length;o++){u=g[o];for(var m=0;m<v.length;m++){var a=v[m].parentTag("table4").allInnerTags("td5"),y=a[2*o+1].tagContents().innerCapture(/(\d{1,2}[A-Za-z])/,1),A=(""+v[m]).trim();b={"@context":"http://schema.org","@type":"http://schema.org/FlightReservation",reservationFor:{"@type":"http://apple.com/FuzzyFlight",airlineCode:u.airlineCode,flightNumber:u.flightNumber,departureAirportFuzzy:u.departureAirport,departureAirportCode:u.departureCode,departureTime:u.departureTime,arrivalAirportFuzzy:u.arrivalAirport,arrivalAirportCode:u.arrivalCode,arrivalTime:u.arrivalTime},underName:{"@type":"http://schema.org/Person",name:A},checkinUrl:l,reservationId:p,reservedTicket:{"@type":"http://schema.org/Ticket",ticketNumber:null,ticketedSeat:{"@type":"http://schema.org/Seat",seatNumber:y,seatingType:null}},totalPrice:null,priceCurrency:null,reservationStatus:"http://schema.org/ReservationConfirmed"},valid(A.membershipNumber)&&(b.programMembershipUsed={"@type":"http://schema.org/ProgramMembership",membershipNumber:A.membershipNumber,programName:"Frequent Flyer"}),f.push(b)}}if(f.length)return f}}).call();