// Copyright 2014 Apple Inc.  All Rights Reserved.
(function(){return function(t,e,n){var a=Scanner.fromMessage(t);a.setLocale(e);var r,g,o,s,i,c,p,d=a.getSpan();if("1"===n.version?(o=d.nextTag("table2").allInnerTags("td2"),r=o[3].tagContents().innerCapture(/(.*) <http/,1),c=d.nextDate(),s=o[6].tagContents(),s=/\n(.*)\n(.*)/.exec(s)[2],g=c.nextLink()):d.nextTag("table3").innerDate().exists()?(o=d.nextTag("table3"),r=o.nextAnyTag("td").tagContents(),c=o.nextDate(),s=o.nextAnyTag("td").nextAnyTag("td").tagContents(),s=/\n(.*)\n(.*)/.exec(s)[2],g=o.nextLink()):(c=a.getSpan().nextDate(),r=a.getSpan().withStart(c.parentAnyTag("td").tagContents().getStart()).withEnd(c.getStart()).trim(),s=a.getSpan().withStart(c.getEnd()).withEnd(c.parentAnyTag("td").tagContents().getEnd()).trim()),ASSERT(r,c)){var h={"@context":"http://schema.org","@type":"http://schema.org/EventReservation",reservationStatus:"http://schema.org/ReservationConfirmed",reservationFor:{name:r,url:g,"@type":"http://schema.org/SocialEvent",startDate:c,description:i,location:{"@type":"http://schema.org/Place",address:s}}};return valid(p)&&(h.reservationFor.endDate=p),[h]}return CONTINUE}}).call();