// Copyright 2014 Apple Inc.  All Rights Reserved.
new ReverseTemplateList([new ReverseTemplate("tugg.com-1",function(e){return/\[Tugg\] (Please don't forget to print your tickets|.+ Tickets)/.test(e.subject)},function(e){if(startsWith(e.subject,"[Tugg] Ticket reserved"))return CONTINUE;if(!/\[Tugg\] (Please don't forget to print your tickets|.+ Tickets)/.test(e.subject))return CONTINUE;var t=Scanner.fromMessage(e);t.setLocale("en_US");var r,n,a,s,o,i,c,p,g,v,u,m,h;r=t.getSpan().innerCapture(/Hi, (.*),/,1),g=t.getSpan().nextText("Event Details").nextDate(),h=g.nextAddress();var T=t.getSpan().nextText("Event Details").nextTag("td4").tagContents().innerCapture(/\b($<eventName>.*) \(event info\) <($<eventUrl>.*)>\s+($<place>.*)\s+/);return T&&(c=T.$eventName,p=T.$eventUrl,m=T.$place.trim()),ASSERT(g,c)?[{"@context":"http://schema.org","@type":"http://schema.org/EventReservation",totalPrice:n,priceCurrency:a,reservedTicket:{"@type":"http://schema.org/Ticket",ticketedSeat:{"@type":"http://schema.org/Seat",seatNumber:i},ticketToken:o,ticketNumber:s},reservationFor:{"@type":"http://schema.org/MovieShowing",eventStatus:"http://schema.org/EventConfirmed",url:p,startDate:g,endDate:v,movie:{"@type":"http://schema.org/Movie",name:c},location:{"@type":"http://schema.org/Place",name:m,telephone:u,address:h}}}]:void 0},"0/1/2/3/4/5/1248/1343/1344","SG5a2f0028")]);