// Copyright 2014 Apple Inc.  All Rights Reserved.
(function(){return function(e,t,a){var n=Scanner.fromMessage(e);n.setLocale(t);var r,p,i,o,c,g,l,m,u,s,C,d,f,h,S,v,T,k,D,y;if(a.cancel.test(e.subject))i=n.getSpan().innerCapture(a.cancellationId,1),r=n.getSpan().innerCapture(a.guestNameCancel,1),y=n.getSpan().innerCapture(a.pickUpDateCancel,1).innerDate(),v=n.getSpan().innerCapture(a.dropOffDateCancel,1).innerDate(),k=n.getSpan().innerCapture(a.pickUpLocCancel,1),h=n.getSpan().innerCapture(a.dropOffLocCancel,1),s=n.getSpan().innerCapture(a.car,1),o="Cancelled";else{i=n.getSpan().innerCapture(a.reservationId,1),r=(""+n.getSpan().innerCapture(a.guestName,1)).trim();var U,L;U=n.getSpan().innerCapture(a.pickUpTime),!U&&a.pickUpTimeAlt&&(U=n.getSpan().innerCapture(a.pickUpTimeAlt)),y=(""+U.$pickupDateTime).replace(/\./g,"/"),y=n.getDetachedSpan(y).innerDate(),L=n.getSpan().innerCapture(a.dropoffTime),!L&&a.dropoffTimeAlt&&(L=n.getSpan().innerCapture(a.dropoffTimeAlt)),L&&(v=(""+L.$dropoffDateTime).replace(/\./g,"/"),v=n.getDetachedSpan(v).innerDate()),k=n.getSpan().innerCapture(a.pickUpLoc,1),h=n.getSpan().innerCapture(a.dropOffLoc,1);var P=n.getSpan().allPhoneNumbers();D=P[1],S=P[2],s=n.getSpan().innerCapture(a.car,1);var R=n.getSpan().nextRegExp(a.totalPrice).innerCapture(a.totalPrice,1);m=R.innerCapture(/([\d.,]+)/,1),u=R.innerCapture(/([^\d.,]+)/,1).trim()}if(ASSERT(i,r,s,k,y))return[{"@context":"http://schema.org","@type":"http://schema.org/RentalCarReservation",totalPrice:m,priceCurrency:u,reservationId:i,reservationStatus:"http://schema.org/Reservation"+(o||"Confirmed"),checkinUrl:c,modifyReservationUrl:g,cancelReservationUrl:l,underName:{"@type":"http://schema.org/Person",name:r,email:p},provider:{"@type":"http://schema.org/Organization",name:"Budget"},reservationFor:{"@type":"http://schema.org/Car",brand:{"@type":"http://schema.org/Organization",name:s},license:C,color:d},pickupTime:y,pickupLocation:{"@type":"http://schema.org/Place",name:T,telephone:D,address:k},dropoffTime:v,dropoffLocation:{"@type":"http://schema.org/Place",name:f,telephone:S,address:h}}]}}).call();