// Copyright 2014 Apple Inc.  All Rights Reserved.
(function(){return function(e,t,r){if(!e||!t||!r)return CONTINUE;var a=Scanner.fromMessage(e);a.setLocale(t);var n,o,p,s,g,i,m,c,d,h;return n=a.getSpan().innerCapture(regExpFormatted(/\1: (\d+) \2/,r.guest,r.person),1).trim(),o=a.getSpan().innerCapture(regExpFormatted(/\1: (.*)/,r.restaurant),1),h=a.getSpan().innerCapture(regExpFormatted(/\1: (.*)/,r.reference),1),g=a.getSpan().innerCapture(regExpFormatted(/\1: (\+\d+)/,r.phone),1),i=getFuzzyAddress(a.getDetachedSpan((""+a.getSpan().nextText(r.phone).previousText(o).collapseToEnd().withEnd(a.getSpan().nextText(r.phone).getStart())).replace(",",""))),p=getFuzzyDate(a.getSpan().nextText(r.restaurant).collapseToEnd().withEnd(a.getSpan().nextText(r.guest).getStart())),s=a.getDetachedSpan((""+a.getSpan().innerCapture(regExpFormatted(/\1 (.*),/,r.dear,r.mister),1)).replace(r.mister,"")).trim(),m=a.getSpan().nextText(r.cancel).nextLink(),ASSERT(n,o,p,s)?[{"@context":"http://schema.org","@type":"http://schema.org/FoodEstablishmentReservation",partySize:n,reservationId:h,reservationStatus:"http://schema.org/ReservationConfirmed",reservationFor:{"@type":"http://schema.org/FoodEstablishment",name:o,url:d,telephone:g,address:i},startTime:p,bookingAgent:{"@type":"http://schema.org/Organization",name:"Bookatable",url:"http://www.bookatable.com/"},underName:{"@type":"http://schema.org/Person",name:s},cancelReservationUrl:m,modifyReservationUrl:c}]:CONTINUE}}).call();