// Copyright 2014 Apple Inc.  All Rights Reserved.
new ReverseTemplateList([new ReverseTemplate("travelocity.com-yahoo",function(e){return/Yahoo! Travel (?:Cancellation )?Confirmation$/.test(e.subject)},function(e){if(/Yahoo! Travel (?:Cancellation )?Confirmation$/.test(e.subject)){var n="en_US",r={};r.rentalCompany="Rental Company",r.cancellation=/Travel Cancellation Confirmation/,r.itinerary="Itinerary",r.name="Primary Contact:",r.rentalCarProvider="Rental Company:",r.pickupLocation="Pick up Location:",r.dropoffLocation="Drop off Location:",r.phone="Telephone:",r.pickupTime="Pick-up:",r.dropoffTime="Drop-off:",r.brand="Car:",r.reservationId="Confirmation #:",r.pricing="Pricing",r.total="Total:",r.hotel="Hotel:",r.checkIn="Check In:",r.checkOut="Check Out:";var a=loadHelper("travelocity-yahoo-skeleton.js");return a(e,n,r)}},"0/1/2/3/4/5/939/1109/1123","SGbe92ef8d"),new ReverseTemplate("travelocity.com-yahoo-shared-itinerary",function(e){return/Your Friend Made A Reservation on\s+Yahoo! Travel$/.test(e.subject)},function(e){if(/Your Friend Made A Reservation on\s+Yahoo! Travel$/.test(e.subject)){var n=Scanner.fromMessage(e);n.setLocale("en_US");var r,a,t,o,i,p,c,s,l,m,f,d,u,h,v,C=[];n.getSpan().nextText("Rental Company").exists()&&(r=n.getSpan().innerCapture(/Driver: (.*?)\n/,1),c=n.getSpan().innerCapture(/Rental Company: (.*?)\n/,1),u=n.getSpan().innerCapture(/Pick up Location:\n(.*?)\n/,1),l=n.getSpan().innerCapture(/Drop off Location:\n(.*?)\n/,1),not(l)&&(l=u),v=n.getSpan().nextText("Pick-up:").nextDate(),f=n.getSpan().nextText("Drop-off:").nextDate(),p=n.getSpan().innerCapture(/Car:\n(.*?)\n/,1),t=n.getSpan().innerCapture(/Confirmation #: (.*?)\n/,1),a=n.getSpan().innerCapture(/Total: (?:.*?)([\d,.]+)\n/,1),ASSERT(v,c,t,OR(u,d))&&C.push({name:r,brand:p,pickupTime:v,pickupName:d,pickupAddress:u,pickupTelephone:h,dropoffTime:f,dropoffName:s,dropoffAddress:l,dropoffTelephone:m,provider:c,reservationId:t,reservationStatus:o,cancelReservationUrl:i,totalPrice:a}));for(var T,g,y=[],k=0;k<C.length;k++)g=C[k],T={"@context":"http://schema.org","@type":"http://schema.org/RentalCarReservation",totalPrice:g.totalPrice,priceCurrency:g.priceCurrency,reservationId:g.reservationId,reservationStatus:"http://schema.org/Reservation"+(g.reservationStatus||"Confirmed"),checkinUrl:g.checkinUrl,modifyReservationUrl:g.modifyReservationUrl,cancelReservationUrl:g.cancelReservationUrl,underName:{"@type":"http://schema.org/Person",name:g.name,email:g.email},provider:{"@type":"http://schema.org/Organization",name:g.provider},pickupTime:g.pickupTime,pickupLocation:{"@type":"http://schema.org/Place",name:g.pickupName,telephone:g.pickupTelephone,address:g.pickupAddress},dropoffTime:g.dropoffTime,dropoffLocation:{"@type":"http://schema.org/Place",name:g.dropoffName,telephone:g.dropoffTelephone,address:g.dropoffAddress}},g.brand&&(T.reservationFor={"@type":"http://schema.org/Car",brand:{"@type":"http://schema.org/Organization",name:g.brand},license:g.license,color:g.color}),y.push(T);if(y.length)return y}},"0/1/2/3/4/5/939/1109/1124","SG5a77befa")]);