// Copyright 2014 Apple Inc.  All Rights Reserved.
new ReverseTemplateList([new ReverseTemplate("opentable.co.uk-restaurant-invitation-en",function(e){return/^Restaurant invitation from/.test(e.subject)},function(e){if(/^Restaurant invitation from/.test(e.subject)){var t=Scanner.fromMessage(e);t.setLocale("en_GB");var n=loadHelper("opentable-restaurant-invitation-check.js");if(n(e))return STOP;var a,r,o,i,s,u,p,l,v,c,d;if(o=t.getSpan().nextDate(),d=t.getSpan().nextText("Restaurant:").nextTag("td3").tagContents().innerCapture(/($<name>.*)\n($<address>[^]+?)\s+($<phoneNumber>[\d +]+)\s+See menus, map & more/),d||(d=t.getSpan().innerCapture(/Restaurant:\s+($<name>.*)\s+($<address>[\s\S]*?)\s+($<phoneNumber>[\d\s]+)\s+See menus/)),d&&(r=d.$name,l=d.$address,u=d.$phoneNumber),a=t.getSpan().nextText("No. of diners:").nextTag("td3").tagContents(),a.exists()||(a=t.getSpan().innerCapture(/Table for (\d+) on/,1)),i=t.getSpan().innerCapture(/\n(.*?) has sent you an invitation!/,1),ASSERT(a,r,o,i))return[{"@context":"http://schema.org","@type":"http://schema.org/FoodEstablishmentReservation",partySize:a,reservationId:p,reservationStatus:"http://schema.org/ReservationConfirmed",reservationFor:{"@type":"http://schema.org/FoodEstablishment",name:r,url:s,telephone:u,address:l},startTime:o,bookingAgent:{"@type":"http://schema.org/Organization",name:"OpenTable",url:"https://www.opentable.co.uk"},underName:{"@type":"http://schema.org/Person",name:i},cancelReservationUrl:v,modifyReservationUrl:c}]}},"0/1/2/3/4/5/1138/1196/1199","SGa3dab59f"),new ReverseTemplate("opentable.com-restaurant-invitation-en",function(e){return/^Restaurant Invitation (?:from|to)/.test(e.subject)},function(e){if(/^Restaurant Invitation (?:from|to)/.test(e.subject)){var t="en_US",n={};if(n.nameCapture=/(.*) has invited you to dine!/,n.partySizeCapture=/\bfor (\d+) people/,int(e.epoch)<1388534400)return STOP;var a=loadHelper("opentable-restaurant-invitation-check.js");if(a(e))return STOP;var r=loadHelper("opentable-restaurant-invitation-skeleton-2015.js");return r(e,t,n)}},"0/1/2/3/4/5/1138/1196/1206","SGbd57ea90"),new ReverseTemplate("opentable.com-restaurant-invitation-es",function(e){return/^Invitaci\xf3n al restaurante/.test(e.subject)},function(e){if(/^Invitaci\xf3n al restaurante/.test(e.subject)){var t={};t.hour="Hora",t.restaurant="estaurante",t.phone="N\xfamero de tel\xe9fono:",t.person="Grupo de",t.invitation="le ha enviado una invitaci\xf3n";var n="es_MX",a=loadHelper("opentable.com-restauration-invitation-skeleton.js"),r="www.opentable.com.mx";return a(e,n,t,r)}},"0/1/2/3/4/5/1138/1196/1207","SG61042de3"),new ReverseTemplate("opentable.de-restaurant-invitation-de",function(e){return/^Restauranteinladung/.test(e.subject)},function(e){if(/^Restauranteinladung/.test(e.subject)){var t={},n="de_DE",a=loadHelper("opentable-restaurant-invitation-check.js");if(a(e))return STOP;if(/Machen Sie eine Reservierung/.test(e.plain)){t.nameCapture=/(.*)\s+hat Sie zum Essen eingeladen!/,t.partySizeCapture=/\bf\xfcr\s+(\d+)\s+Personen/i;var r=loadHelper("opentable-restaurant-invitation-skeleton-2015.js");return r(e,n,t)}t.hour="Uhrzeit",t.restaurant="Restaurant",t.phone="Telefon",t.person="Personen",t.invitation="hat Ihnen eine Einladung gesendet";var o=loadHelper("opentable.com-restauration-invitation-skeleton.js"),i="www.opentable.de";return o(e,n,t,i)}},"0/1/2/3/4/5/1138/1196/1212","SG8d160e30"),new ReverseTemplate("opentable.jp-restaurant-invitation-jp",function(e){return/\u69d8\u304b\u3089\u306e/.test(e.subject)},function(e){if(/\u69d8\u304b\u3089\u306e/.test(e.subject)){var t,n="ja_JP",a={};if(/\u69d8\u304b\u3089\u306e/.test(e.plain))return a.nameCapture=/(.*)\u69d8\u304b\u3089\u306e/,a.partySizeCapture=/(\d+)\u540d\u69d8/,(t=loadHelper("opentable-restaurant-invitation-skeleton-2015.js"))(e,n,a);a.hour="\u65e5\u6642",a.restaurant="\u30ec\u30b9\u30c8\u30e9\u30f3",a.phone="\u96fb\u8a71\u756a\u53f7",a.person="\u540d\u69d8",a.invitation="\u69d8\u3088\u308a\u3001\u304a\u98df\u4e8b\u4f1a\u306e\u3054\u6848\u5185\u3067\u3059";var r="www.opentable.jp";return(t=loadHelper("opentable.com-restauration-invitation-skeleton.js"))(e,n,a,r)}},"0/1/2/3/4/5/1138/1196/1216","SG9965eff9")]);