(function(){return function(e,r,t){var a=Scanner.fromMessage(e);a.setLocale(r);var n=a.getSpan(),i="Confirmed";/\ud56d\uacf5\uad8c \ud658\ubd88 \uc644\ub8cc/.test(e.subject)&&(i="Cancelled");for(var l=n.next(t.passPointer),o=[];!l.isNullSpan_;){o.push(l.parentAnyTag("td").tagContents().innerCapture(regExpFormatted(/(.+)\s?\1,?/,t.passPointer),1).trim()),l=l.nextAnyTag("td").next(t.passPointer)}var p=n.next(t.cancel).next(t.cancel).parentAnyTag("table").allInnerTagsFiltered("td1"),u=[],s=n.next(t.reservation).parentAnyTag("td").tagContents().innerCapture(regExpFormatted(/\1\s:\s(\w+)/,t.reservation),1);0===p.length&&(p=n.next(t.cancelNext).parentAnyTag("table").allInnerTagsFiltered("td1"));for(var m=0;m<p.length;m+=6){var d=p[1+m].innerCapture(/($<name>.+)\(($<code>.+)\)\s*[\n]+($<time>.+)/),g=d?d.$name:null,v=d?d.$code:null,c=d?d.$time:null;c=getFuzzyDate(c),d=p[2+m].innerCapture(/($<name>.+)\(($<code>.+)\)\s*[\n]+($<time>.+)/);var h=d?d.$name:null,$=d?d.$code:null,C=d?d.$time:null;C=getFuzzyDate(C);var A=p[3+m].innerCapture(/($<name>.+)\/\s*[\n]+($<num>.+)/),T=A?A.$name:null,y=A?A.$num:null;ASSERT(c,g,h,$)&&u.push({airlineName:T,flightNumber:y,departureAirport:g,departureTime:c,arrivalAirport:h,arrivalTime:C,arrivalCode:$,departureCode:v})}for(var F=[],m=0;m<u.length;m++)for(var f=0;f<o.length;f++){var x=u[m];F.push({"@context":"http://schema.org","@type":"http://schema.org/FlightReservation",reservationFor:{"@type":"http://apple.com/FuzzyFlight",airlineName:x.airlineName,flightNumber:x.flightNumber,departureAirportFuzzy:x.departureAirport,departureAirportCode:x.departureCode,departureTime:x.departureTime,arrivalAirportFuzzy:x.arrivalAirport,arrivalAirportCode:x.arrivalCode,arrivalTime:x.arrivalTime},underName:{"@type":"http://schema.org/Person",name:o[f]},reservationId:s,reservationStatus:"http://schema.org/Reservation"+i})}return F}}).call();