// Copyright 2014 Apple Inc.  All Rights Reserved.
(function(){return function(e,t,n){var a=Scanner.fromMessage(e);a.setLocale(t);var r,i,o,c,g,s,p,C,l,u,m,x,h,d;if(!n.emailTitelConfirmation.test(e.subject)&&!n.emailTitelCancelConfirmation.test(e.subject))return CONTINUE;var S=a.getSpan().nextTag("td1").tagContents();return u=S.innerCapture(/(.+)/,1),m=S.innerPhoneNumber(),S=(""+S).replace(""+u+"\n",""),S=(""+S).replace(""+m,""),x=S,g=a.getSpan().nextRegExp(n.reservationId).tagContents().innerCapture(n.reservationId,1),r=a.getSpan().nextRegExp(n.guestName).tagContents().innerCapture(n.guestName,1),i=a.getSpan().nextRegExp(n.guestEmail).tagContents().innerCapture(n.guestEmail,1),p=a.getSpan().nextRegExp(n.checkIn).tagContents().innerCapture(n.checkIn,1).innerDate(),C=a.getSpan().nextRegExp(n.checkOut).tagContents().innerCapture(n.checkOut,1).innerDate(),o=a.getSpan().nextRegExp(n.totalPrice).tagContents().innerCapture(n.totalPrice,1),c=a.getSpan().nextRegExp(n.priceCurrency).tagContents().innerCapture(n.priceCurrency,1),h=a.getSpan().nextText(n.modifyUrl).tagContents().parentTag("td1").innerLink(),d=h,n.emailTitelConfirmation.test(e.subject)?s="Confirmed":n.emailTitelCancelConfirmation.test(e.subject)&&(s="Cancelled",o=a.getSpan().nextRegExp(n.totalCancelPrice).tagContents().innerCapture(n.totalCancelPrice,1),c=a.getSpan().nextRegExp(n.totalCancelCurrencyPrice).tagContents().innerCapture(n.totalCancelCurrencyPrice,1)),ASSERT(p,C,x)?[{"@context":"http://schema.org","@type":"http://schema.org/LodgingReservation",underName:{"@type":"http://schema.org/Person",name:r,email:i},totalPrice:o,priceCurrency:c,checkinTime:p,checkoutTime:C,modifyReservationUrl:h,cancelReservationUrl:d,reservationStatus:"http://schema.org/Reservation"+(s||"Confirmed"),reservationId:g,reservationFor:{"@type":"http://schema.org/LodgingBusiness",name:u,url:l,telephone:m,address:x}}]:void 0}}).call();