// Copyright 2014 Apple Inc.  All Rights Reserved.
(function(){return function(e,t,n){var a=Scanner.fromMessage(e);a.setLocale(t);var r,o,s,g,i,d,c,p,m,x,u,T,h;r=a.getSpan().next(n.underPersonName).parentAnyTag("td").tagContents().innerCapture(regExpFormatted(/\1\s*(.*)/,n.underPersonName),1),o=""+e.to,c=a.getSpan().innerCapture(regExpFormatted(/\1\s+?(\d+)\)/,n.reservationId),1);var l=a.getSpan().nextText(n.hotelDetails).nextTag("table9");s=l.nextAnyTag("td").tagContents(),i=s.nextAnyTag("td").tagContents(),u=a.getSpan().next(n.checkIn).nextAnyTag("td").tagContents(),T=a.getSpan().next(n.checkOut).nextAnyTag("td").tagContents();var C=a.getDateDD(a.getSpan().next(n.dates).nextAnyTag("td").innerDate());C&&C.iso8601&&C.endIso8601&&(p=combineDateAndTime(C.iso8601,u),m=combineDateAndTime(C.endIso8601,T));var v=a.getSpan().nextText(n.totalPrice).parentAnyTag("td").tagContents();v.innerCapture(/(\d+)/,1).exists()||(v=v.nextAnyTag("td").tagContents()),h=v.innerCapture(/(.)\d+/,1),x=v.innerCapture(/([\d,.]+)/,1);var y=n.cancelled.test(e.plain)?"Cancelled":"Confirmed";return ASSERT(OR(r,o),i,p)?[{"@context":"http://schema.org","@type":"http://schema.org/LodgingReservation",underName:{"@type":"http://schema.org/Person",name:r,email:o},totalPrice:x,priceCurrency:h,checkinTime:p,checkoutTime:m,reservationStatus:"http://schema.org/Reservation"+y,reservationId:c,reservationFor:{"@type":"http://schema.org/LodgingBusiness",name:s,telephone:g,url:d,address:i}}]:CONTINUE}}).call();