// Copyright 2014 Apple Inc.  All Rights Reserved.
(function(){return function(e){if(e.html){var t,r=e.html.replace('style="display:none>','style="display:none">'),a=parseMicrodata(r);if(a.length){for(var o=!1,s=0;s<a.length;s++){if("http://schema.org/EventReservation"!==a[s]["@type"]){o=!0;break}a[s]["@context"]="http://schema.org",ASSERT(OR(a[s].reservationId,a[s].reservationNumber),a[s].startTime,a[s].reservationFor)}if(!o)return a}else{if(t=/<script type="application\/ld\+json">(?:[\s\S]*<\!\[CDATA\[)?([\s\S]+?)(?:\]\]>[\s\S]*)?<\/script>/.exec(e.html),!t)return t;if(a=JSON.parse(t[1].replace(/[\r\n]/g," ").replace(/\\\'/g,"'").replace(/  /g," ")),ASSERT(a.reservationFor.startDate,a.reservationFor.name)){var n={"@context":"http://schema.org","@type":"http://schema.org/EventReservation",name:a.underName.name,reservedTicket:{"@type":"http://schema.org/Ticket",ticketNumber:a.reservationNumber,ticketedSeat:{"@type":"http://schema.org/Seat"}},reservationFor:a.reservationFor};return a.reservationStatus&&(n.reservationFor.eventStatus=a.reservationStatus.replace(/org\//,"org/Event")),n.reservationFor.location.address["@type"]="http://schema.org/PostalAddress",n.reservationFor.location["@type"]="http://schema.org/"+n.reservationFor.location["@type"],n.reservationFor["@type"]="http://schema.org/"+n.reservationFor["@type"],[n]}}}}}).call();