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