// Copyright 2014 Apple Inc.  All Rights Reserved.
(function(){return function(e,t,a){var n=Scanner.fromMessage(e);n.setLocale(t);var r,o,i,p,s,c,g,x,d,m,f,l,h,T,C,P,u,v,S="Confirmed";if(i=n.getSpan().innerCapture(regExpFormatted(/\b\1 *(?:N\xba *)?(.+)\n/,a.carReservationIdPrefix),1),r=n.getSpan().nextText(a.underPersonNamePrefix).nextTag("td1").tagContents(),m=n.getSpan().nextText(a.pickUpDateTimePrefix).nextTag("td1").tagContents(),d=n.getSpan().nextText(a.pickUpAddressPrefix).nextTag("td1").tagContents(),d.exists()&&(d=(""+d).replace(/^\*+/,"").replace(/\*+$/,"")),T=n.getSpan().nextText(a.pickUpDateTimePrefix).nextTag("td1").nextText(a.dropOffDateTimePrefix).nextTag("td1").tagContents(),h=n.getSpan().nextText(a.dropOffAddressPrefix).nextTag("td1").tagContents(),h.exists()&&(h=(""+h).replace(/^\*+/,"").replace(/\*+$/,"")),p=n.getSpan().next(a.carBrandPrefix).nextTag("td1").tagContents(),p.exists()){var y=p.innerCapture(/[\.,-]+\s*((?:.|\n)+)\s*- /);2===y.length&&(p=y[1].trim())}var R=n.getSpan().nextText(a.totalPricePrefix).nextTag("td1").tagContents();if(R.exists()&&(u=""+R.innerCapture(/([\d,.]+)/,1),v=(""+R.innerCapture(/([^\d,.\* ]+)/,1).trim()).toLowerCase()),ASSERT(i,d,m))return[{"@context":"http://schema.org","@type":"http://schema.org/RentalCarReservation",totalPrice:u,priceCurrency:v,reservationStatus:"http://schema.org/Reservation"+S,reservationId:i,modifyReservationUrl:C,cancelReservationUrl:P,underName:{"@type":"http://schema.org/Person",name:r,email:o},provider:{"@type":"http://schema.org/Organization",name:"Malagacar"},reservationFor:{"@type":"http://schema.org/Car",brand:{"@type":"http://schema.org/Organization",name:p},license:s,color:c},pickupTime:m,pickupLocation:{"@type":"http://schema.org/Place",name:g,telephone:x,address:d},dropoffTime:T,dropoffLocation:{"@type":"http://schema.org/Place",name:f,telephone:l,address:h}}]}}).call();