// Copyright 2014 Apple Inc.  All Rights Reserved.
(function(){return function(e,t,n){var r=Scanner.fromMessage(e);r.setLocale(t);var a,i,o,s,x,g,p,d,c,h,m,l=r.getSpan(),f="Confirmed";a=l.next(n.underPersonNamePrefix).parentAnyTag("td").tagContents().innerCapture(regExpFormatted(/\1\s(.*)/,n.underPersonNamePrefix),1),g=l.innerCapture(regExpFormatted(/\1\s(\d+\-\d+\-\d+)\s/,n.reservationIdPrefix),1),p=l.next(n.reservationModificationUrlPrefix).nextLink();var u=(""+l.next(n.bookingDetailBlockPrefix).nextAnyTag("table").nextAnyTag("td").tagContents()).split("\n");if(i=u.shift(),x=u.join("\n"),s=l.nextText(n.hotelUrlPrefix).nextLink(),o=l.innerCapture(regExpFormatted(/<\1(.*)>/,n.hotelPhoneNumberPrefix),1),[d,c]=(""+l.next(n.hotelUrlPrefix).nextDate()).split(" - "),d=r.getDetachedSpan(d).innerDate(),c=r.getDetachedSpan(c).innerDate(),[,m,h]=l.next(RegExp(n.pricePrefix)).nextAnyTag("td").tagContents().innerCapture(/(\D)\s?([\d\,\.]+)/),ASSERT(a,i,d))return[{"@context":"http://schema.org","@type":"http://schema.org/LodgingReservation",underName:{"@type":"http://schema.org/Person",name:a},totalPrice:h,priceCurrency:m,checkinTime:d,checkoutTime:c,reservationStatus:"http://schema.org/Reservation"+f,reservationId:g,modifyReservationUrl:p,reservationFor:{"@type":"http://schema.org/LodgingBusiness",name:i,telephone:o,url:s,address:x}}]}}).call();