(function(){return function(e,r,t){if(!e||!r||!t)return CONTINUE;var a=Scanner.fromMessage(e);a.setLocale(r);var n,i,o,p,s,d,c,g,m,l,u,h,C,T,x,f,v,y,b,N,k,A,$,F,S,P,D,R,I,U=[],E=[],z={},w=[],O=function(e){if(o=e.tagContents().innerCapture(regExpFormatted(/\1:\s+(.*)/,t.car.name),1),m=e.tagContents().innerCapture(regExpFormatted(/\s+\1:\s*(.*)/,t.car.reservationId),1),T=m.nextText(t.car.driver).nextTag("td5").tagContents().innerCapture(/(.*?):/,1),d=e.nextText(t.car.totalPrice).nextTag("td5").tagContents(),p=d.innerCapture(/([\d,.]+)/,1),s=d.innerCapture(/([^\d,.]+)/,1),l=e.nextText(t.car.pickupTime).tagContents().nextDate(),h=l.nextDate(),x=l.parentTag("td5").tagContents().innerCapture(regExpFormatted(/(.*)\s+\1/,""+T),1),u=h.nextText(t.car.loc).parentTag("td6").tagContents().innerCapture(regExpFormatted(/\1:\s+(.*)/,t.car.loc),1),C=u,ASSERT(o,l,u,x))return{name:o,reservationId:m,priceCurrency:s,totalPrice:p,pickupTime:l,pickupAddress:u,dropoffTime:h,dropoffAddress:C,brand:T,provider:x}},L=function(e){for(v=e.nextText(t.flight.summary).nextTag("table5"),d=e.nextText(t.flight.price).nextTag("td5").tagContents(),p=d.innerCapture(/([\d,.]+)/,1),s=d.innerCapture(/([^\d,.]+)/,1),m=e.nextTag("table5").nextTag("table5").nextTag("tr5").nextTag("td5").tagContents().innerCapture(regExpFormatted(/\1:\s+(.*)/,t.flight.reservationId),1),J=e.nextText(t.flight.passenger);!J.nextTag("tr5").innerText(t.flight.taxes).exists();)J=J.nextTag("tr5"),o=J.nextTag("td5").tagContents(),z[""+o]={name:o,totalPrice:p,priceCurrency:s,seats:{},seatingType:{},ticketNumber:f};for(;v.innerDate().exists();)c=v.nextDate().parentAnyTag("td").tagContents().innerCapture(/\w+\s+(.*)/,1),N=c.nextDate().parentAnyTag("td"),D=N.tagContents().innerCapture(/($<departureAirport>.*)\(($<departureCode>.*)\)/),y=D.$departureCode,D=D.$departureAirport,b=a.getDetachedSpan(c+" "+N.firstDate()).innerDate(),k=N.nextTag("td5").nextTag("td5"),P=k.tagContents().innerCapture(/($<arrivalAirport>.*)\(($<arrivalCode>.*)\)/),A=P.$arrivalCode,P=P.$arrivalAirport,$=a.getDetachedSpan(c+" "+k.firstDate()).innerDate(),F=k.nextTag("td5").nextTag("td5"),F=F.tagContents().innerCapture(regExpFormatted(/^($<airlineCode>.*)\s+($<airline>.*)\n\1: ($<flightNr>\w+)/,t.flightName)),R=F.$airline,I=F.$flightNr,S=F.$airlineCode,ASSERT(R,I,b,y,$,A)&&w.push({airlineName:R,airlineCode:S,flightNumber:I,reservationId:m,departureAirport:D,departureCode:y,departureTime:b,arrivalAirport:P,arrivalCode:A,arrivalTime:$,passengers:z}),v=v.nextTag("table5")};switch(n=a.getSpan().nextText(t.bookedItems),i=n.nextTag("table4"),""+i.tagContents().innerCapture(/(\w+):/,1)){case t.carName:E.push(O(i));break;case t.eventName:break;case t.flightName:L(i)}for(var M,j=0;j<E.length;j++)M=E[j],g={"@context":"http://schema.org","@type":"http://schema.org/RentalCarReservation",totalPrice:M.totalPrice,priceCurrency:M.priceCurrency,reservationId:M.reservationId,reservationStatus:"http://schema.org/Reservation"+(M.reservationStatus||"Confirmed"),checkinUrl:M.checkinUrl,modifyReservationUrl:M.modifyReservationUrl,cancelReservationUrl:M.cancelReservationUrl,underName:{"@type":"http://schema.org/Person",name:M.name,email:M.email},provider:{"@type":"http://schema.org/Organization",name:M.provider},pickupTime:M.pickupTime,pickupLocation:{"@type":"http://schema.org/Place",name:M.pickupName,telephone:M.pickupTelephone,address:M.pickupAddress},dropoffTime:M.dropoffTime,dropoffLocation:{"@type":"http://schema.org/Place",name:M.dropoffName,telephone:M.dropoffTelephone,address:M.dropoffAddress}},M.brand&&(g.reservationFor={"@type":"http://schema.org/Car",brand:{"@type":"http://schema.org/Organization",name:M.brand},license:M.license,color:M.color}),U.push(g);for(var q,B=0;B<w.length;B++){q=w[j];for(var G=Object.keys(q.passengers),H=0;H<G.length;H++){var J=q.passengers[G[H]],g={"@context":"http://schema.org","@type":"http://schema.org/FlightReservation",reservationFor:{"@type":"http://apple.com/FuzzyFlight",airlineName:q.airlineName,airlineCode:q.airlineCode,flightNumber:q.flightNumber,departureAirportFuzzy:q.departureAirport,departureAirportCode:q.departureCode,departureTime:q.departureTime,arrivalAirportFuzzy:q.arrivalAirport,arrivalAirportCode:q.arrivalCode,arrivalTime:q.arrivalTime},underName:{"@type":"http://schema.org/Person",name:J.name},checkinUrl:q.checkinUrl,reservationId:q.reservationId,reservationStatus:"http://schema.org/ReservationConfirmed",totalPrice:J.totalPrice,priceCurrency:J.priceCurrency,reservedTicket:{"@type":"http://schema.org/Ticket",ticketNumber:J.ticketNumber,ticketedSeat:{"@type":"http://schema.org/Seat",seatNumber:J.seats[q.flightNumber],seatingType:J.seatingType[q.flightNumber]}}};valid(J.membershipNumber,J.programName)&&(g.programMembershipUsed={"@type":"http://schema.org/ProgramMembership",membershipNumber:J.membershipNumber,programName:J.programName}),U.push(g)}}return U.length?U:void 0}}).call();