(function(){return function(e,t,n){var r=Scanner.fromMessage(e);r.setLocale(t);var a,s,i,o,x,c,g,d,m,h,u,p,f;if(n.reservationCancelled.test(e.subject))f="Cancelled";else{if(!n.confirmation.test(e.subject))return CONTINUE;f="Confirmed"}var l=r.getSpan().next(n.reservationIdPrefix);g=l.nextTag("td3").tagContents(),a=l.next(n.underPersonNamePrefix).nextTag("td3").tagContents().innerCapture(regExpFormatted(/(.*)\1/,n.underPersonNameSuffix),1).trim(),i=l.next(n.hotelNamePrefix).nextTag("td3").tagContents(),i.exists()&&(i=(""+i).replace(/\s*<.+>/,"")),o=l.next(n.hotelPhonePrefix).nextTag("td3").tagContents(),c=l.next(n.hotelAddressPrefix).nextTag("td3").tagContents(),c.exists()&&(c=(""+c).replace(/\s*<.+>/,""));var C=l.next(n.pricePrefix).nextTag("td3").tagContents();d=l.next(n.checkInDateTimePrefix).nextTag("td3").innerDate();var T=l.next(n.stayLengthPrefix).nextTag("td3").tagContents().innerCapture(/(\d+)/,1);return h=l.next(n.checkOutTimePrefix).nextTag("td3").tagContents(),T.exists()&&T.getLength()>0&&(m=modifyDate(d,int(""+T)),h&&(m=combineDateAndTime(m,h))),u=C.innerCapture(/([\d,.]+)/,1),p=C.innerCapture(/([^\d,.]+)/,1),p.exists()&&(p=(""+p).replace(/\s*\uff08.+\uff09/,"")),ASSERT(d,c)?[{"@context":"http://schema.org","@type":"http://schema.org/LodgingReservation",underName:{"@type":"http://schema.org/Person",name:a,email:s},totalPrice:u,priceCurrency:p,checkinTime:d,checkoutTime:m,reservationStatus:"http://schema.org/Reservation"+f,reservationId:g,reservationFor:{"@type":"http://schema.org/LodgingBusiness",name:i,telephone:o,url:x,address:c}}]:CONTINUE}}).call();