// Copyright 2014 Apple Inc.  All Rights Reserved.
(function(){return function(e,t,a){var n=Scanner.fromMessage(e);n.setLocale(t);var r,i,o,p,d,m;r=n.getSpan().innerCapture(regExpFormatted(/\1: (.*)/,a.eventName),1).trim();var s=n.getSpan(),g=n.getSpan().next(a.startDate).next(a.dateFormat).innerCapture(a.dateFormat);i=n.getDetachedSpan(""+g.$date+" "+g.$time+" "+g.$meridian).innerDate(),0!==(""+s.next(a.endDate)).length&&(g=n.getSpan().next(a.endDate).next(a.dateFormat).innerCapture(a.dateFormat),o=n.getDetachedSpan(""+g.$date+" "+g.$time+" "+g.$meridian).innerDate());var c=n.getSpan().innerCapture(regExpFormatted(/\1: (.*)/,a.addressPrefix),1).trim();if(m=c.firstPhoneNumber(),valid(m)){var h=m.split(" ");h.length>1&&(m=h[0]),d=c.withInterval(m.getEnd(),m.nextText("\n").getStart()).trim()}else d=c;if(p=n.getSpan().nextText(a.eventUrl).nextLink(),ASSERT(r,i))return[{"@context":"http://schema.org","@type":"http://schema.org/EventReservation",reservationStatus:"http://schema.org/ReservationPending",reservationFor:{name:r,url:p,"@type":"http://schema.org/SocialEvent",startDate:i,endDate:o,location:{"@type":"http://schema.org/Place",address:d}}}]}}).call();