// Copyright 2014 Apple Inc.  All Rights Reserved.
(function(){return function(e,t,n){var r=Scanner.fromMessage(e);r.setLocale(t);var a,o,i,p,c,s,g,m,h,l,d,u,v,C,f,R,x,y,S,T,N="Redspot";if(n.confirmSubject.test(e.subject)){i=r.getSpan().nextRegExp(n.reservationId).tagContents().innerCapture(n.reservationId,1),a=r.getSpan().nextRegExp(n.guestName).tagContents().innerCapture(n.guestName,1);var P=r.getSpan().nextText(n.pickup).parentTag("td4").tagContents();T=P.innerDate(),S=P.innerPhoneNumber(),P=(""+P).split("\n"),y=""+P.slice(2,-2);var E=r.getSpan().nextText(n.dropoff).parentTag("td4").tagContents();R=E.innerDate(),f=E.innerPhoneNumber(),E=(""+E).split("\n"),C=""+E.slice(2,-2),l=r.getSpan().nextText(n.car).nextTag("td4").nextTag("td4").tagContents().innerCapture(/(.+)/,1);var I=r.getSpan().nextRegExp(n.price).tagContents().innerCapture(n.price,1);if(m=I.innerCapture(/([\d,.]+)/,1),h=I.innerCapture(/([^\d,.]+)/,1),!ASSERT(a,i,T,R,y,C))return CONTINUE}if(n.cancellationSubject.test(e.subject)){if(i=r.getSpan().nextRegExp(n.cancelReservationId).tagContents().innerCapture(n.cancelReservationId,1),!ASSERT(i))return CONTINUE;p="Cancelled"}return 0===(""+l).length||null===l?[{"@context":"http://schema.org","@type":"http://schema.org/RentalCarReservation",totalPrice:m,priceCurrency:h,reservationId:i,reservationStatus:"http://schema.org/Reservation"+(p||"Confirmed"),checkinUrl:c,modifyReservationUrl:s,cancelReservationUrl:g,underName:{"@type":"http://schema.org/Person",name:a,email:o},provider:{"@type":"http://schema.org/Organization",name:N},pickupTime:T,pickupLocation:{"@type":"http://schema.org/Place",name:x,telephone:S,address:y},dropoffTime:R,dropoffLocation:{"@type":"http://schema.org/Place",name:v,telephone:f,address:C}}]:[{"@context":"http://schema.org","@type":"http://schema.org/RentalCarReservation",totalPrice:m,priceCurrency:h,reservationId:i,reservationStatus:"http://schema.org/Reservation"+(p||"Confirmed"),checkinUrl:c,modifyReservationUrl:s,cancelReservationUrl:g,underName:{"@type":"http://schema.org/Person",name:a,email:o},provider:{"@type":"http://schema.org/Organization",name:N},reservationFor:{"@type":"http://schema.org/Car",brand:{"@type":"http://schema.org/Organization",name:l},license:d,color:u},pickupTime:T,pickupLocation:{"@type":"http://schema.org/Place",name:x,telephone:S,address:y},dropoffTime:R,dropoffLocation:{"@type":"http://schema.org/Place",name:v,telephone:f,address:C}}]}}).call();