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