// Copyright 2014 Apple Inc.  All Rights Reserved.
(function(){return function(e,t,r){var a=Scanner.fromMessage(e);a.setLocale(t);var n,i,c,o,s,h,p,m,g,x,d,l,u=a.getSpan(),f=r.isConfirmation?"Confirmed":"Cancelled",v=[],S=u.nextText(r.reservationIdPrefix).withEnd(u.nextText(r.pricePrefix).getEnd());o=getFuzzyDate(a.getDetachedSpan(""+S.innerDate())),i=(""+S).match(/(.+)-/)[1].trim();var P=u.nextText(r.totalPricePrefix).withEnd(u.nextText(r.paymentPrefix).getStart()).innerCapture(regExpFormatted(/\s([\d,.-]+)\s/,r.totalPricePrefix),1).trim();if(ASSERT(i,o)&&v.push({"@context":"http://schema.org","@type":"http://schema.org/EventReservation",name:n,totalPrice:P,priceCurrency:"",reservedTicket:{"@type":"http://schema.org/Ticket",ticketNumber:"",ticketToken:g,ticketedSeat:{"@type":"http://schema.org/Seat",seatNumber:x,seatSection:d,seatRow:l}},reservationFor:{"@type":"http://schema.org/Event",eventStatus:"http://schema.org/Event"+f,name:i,url:c,startDate:o,endDate:s,location:{"@type":"http://schema.org/Place",name:h,telephone:m,address:p}}}),v.length>0)return v}}).call();