// Copyright 2014 Apple Inc.  All Rights Reserved.
(function(){return function(e,t,r){var a=Scanner.fromMessage(e);a.setLocale(t);var n,i,p,o,s,m,g;n=a.getSpan().innerCapture(regExpFormatted(/(.+) \1/,r.invitedBySuffix),1).trim(),i=a.getSpan().innerCapture(regExpFormatted(/.\1.\n(.+)/,r.eventNamePrefix),1).trim();var d=a.getSpan().innerCapture(regExpFormatted(/\1.(.+)/,r.startDatePrefix),1).allInnerDates();if(d.length>1)p=d[0],o=d[2];else{d=d[0];var c=d.split("\uff5e");c.length>1?(p=c[0].trim(),o=combineDateAndTime(p.split(" ")[0],c[1])):p=d}if(m=a.getSpan().innerCapture(regExpFormatted(/\1.(.+)/,r.addressPrefix),1).trim(),g=a.getSpan().innerCapture(regExpFormatted(/\1. \n(.+)/,r.descriptionPrefix),1).trim(),s=a.getSpan().innerCapture(regExpFormatted(/.\1.\n(.+)/,r.eventUrlPrefix),1).trim(),ASSERT(i,p)){var l={"@context":"http://schema.org","@type":"http://schema.org/EventReservation",reservationStatus:"http://schema.org/ReservationPending",reservationFor:{name:i,url:s,"@type":"http://schema.org/SocialEvent",startDate:p,description:g,location:{"@type":"http://schema.org/Place",address:m}},appleInvitedBy:n};return valid(o)&&(l.reservationFor.endDate=o),[l]}return STOP}}).call();