webpackJsonp([0],[,,function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAAAfCAYAAABXscv8AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyhpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTM4IDc5LjE1OTgyNCwgMjAxNi8wOS8xNC0wMTowOTowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTcgKE1hY2ludG9zaCkiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MjQ1MzQ5Nzk1RDEzMTFFOEExMzJBMDBDRDI1NUE2NTgiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MjQ1MzQ5N0E1RDEzMTFFOEExMzJBMDBDRDI1NUE2NTgiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDoyNDUzNDk3NzVEMTMxMUU4QTEzMkEwMENEMjU1QTY1OCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDoyNDUzNDk3ODVEMTMxMUU4QTEzMkEwMENEMjU1QTY1OCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PrdDyLYAAAA/SURBVHja7NABAQAACAKg6v9nGyJMYJNMs5tyAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIEFDhBRgA4ykDO24AYyMAAAAASUVORK5CYII="},function(e,t,a){function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=function(){function e(e,t){for(var a=0;a\n '},parking:{viewBox:"0 0 33.33 33.33",html:'\n \n \n '},nfl:{viewBox:"0 0 34.779 47.783",html:'\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n '},info:{viewBox:"0 0 33.33 33.33",html:'\n \n \n '},chevronRight:{viewBox:"0 0 7.502 11.78",html:'\n \n '},north:{viewBox:"0 0 84.12 66.73",html:'\n \n \n \n \n \n \n '},east:{viewBox:"0 0 84.12 66.73",html:'\n \n \n \n \n \n \n '},south:{viewBox:"0 0 84.12 66.73",html:'\n \n \n \n \n \n \n '},west:{viewBox:"0 0 84.12 66.73",html:'\n \n \n \n \n \n \n '},foodAndDrink:{viewBox:"0 0 51.02 56.69",html:'\n \n \n \n \n \n \n \n \n '},accessibility:{viewBox:"0 0 57.18 57.18",html:'\n \n \n \n \n \n '},transport:{viewBox:"0 0 48.61 66.58",html:'\n \n \n \n \n '},tickets:{viewBox:"0 0 59.57 38.17",html:'\n \n \n \n \n '},attractions:{viewBox:"0 0 72.23 45.99",html:'\n \n \n \n \n \n \n \n '},arrowLeft:{viewBox:"0 0 16.531 13.838",html:'\n \n \n \n \n '},filters:{viewBox:"0 0 25.246 23.502",html:'\n \n '},chevronRightAlt:{viewBox:"0 0 23.996 14.897",html:'\n \n '},chevronRightAltTwo:{viewBox:"0 0 11 17",html:'\n \n '},chevronLeft:{viewBox:"0 0 83.3 117.01",html:'\n \n '},padlock:{viewBox:"0 0 32 32",html:'\n \n '},facebook:{viewBox:"0 0 100 100",html:'\n \n '},instagram:{viewBox:"0 0 100 100",html:'\n \n \n \n \n \n '},youtube:{viewBox:"0 0 100 100",html:'\n \n '},tiktok:{viewBox:"0 0 448 512",html:'\n \n '},threads:{viewBox:"0 0 128 128",html:'\n \n '},whatsapp:{viewBox:"0 0 56.693 56.693",html:'\n \n \n \n \n '},snapchat:{viewBox:"0 0 100 100",html:'\n \n '},naver:{viewBox:"0 0 1024 1024",html:'\n \n '},weibo:{viewBox:"0 0 512 512",html:'\n \n '},bilibili:{viewBox:"0 0 32 32",html:'\n \n '},wechat:{viewBox:"0 0 24 24",html:'\n \n \n \n \n '},x:{viewBox:"0 0 24 24",html:'\n \n '},ukFlag:{viewBox:"0 0 275 166",html:'\n \n \n \n \n \n \n \n \n \n \n '},koreaFlag:{viewBox:"0 0 273 165",html:'\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n '},chinaFlag:{viewBox:"0 0 273 165",html:'\n \n \n \n \n '},indonesiaFlag:{viewBox:"0 0 272 165",html:'\n \n \n \n \n '},malaysiaFlag:{viewBox:"0 0 272 165",html:'\n \n \n \n \n \n \n \n '},portugalFlag:{viewBox:"0 0 640 480",html:'\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n '},spanishFlag:{viewBox:"0 0 272 165",html:'\n \n \n '},thailandFlag:{viewBox:"0 0 272 165",html:'\n \n \n \n \n \n '},indiaFlag:{viewBox:"0 0 273 166",html:'\n \n \n \n \n \n \n \n \n \n \n \n \n \n '},chevronDown:{viewBox:"0 0 1571.6 785.8",html:'\n \n '},enlarge:{viewBox:"0 0 38.733 38.734",html:'\n \n \n \n \n \n '},search:{viewBox:"0 0 29 31",html:'\n \n '},close:{viewBox:"0 0 32 32",html:'\n \n '},closeAlt:{viewBox:"0 0 31.135 31.136",html:'\n \n \n \n \n '},location:{viewBox:"0 0 38 58",html:'\n \n '},logoNoText:{viewBox:"0 0 197.219 488.601",html:'\n \n '}};return e[this.props.name]?s.createElement("svg",{className:this.props.className,width:this.props.width,height:this.props.height,viewBox:e[this.props.name].viewBox,dangerouslySetInnerHTML:function(t){return{__html:e[t].html}}(this.props.name)}):null}}]),t}(s.Component);e.exports=l},,,,,,,,,,,,,function(e,t,a){function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=a(229),i=function e(){var t=this;n(this,e),this.subscribe=function(e,a,n){null===t.client&&(t.client=new r.Realtime(a));var i=t.client.channels.get(e);i.subscribe(function(e){console.debug("Message received from: "+e.name),n(e)}),i.on("detached",function(){console.debug("A channel was detached on channel: "+i.name),"connected"===this.client.connection.state&&(i.attach(),console.debug("A channel was re-attached: "+i.name))}),t.client.connection.on("connected",function(){i.attach(),console.log("Module subscribed to channel: "+i.name)})},this.client=null};e.exports=new i},function(e,t){function a(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)})}t.guid=a},function(e,t,a){function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=function(){function e(e,t){for(var a=0;a0&&t.setAttribute(e.key,e.value)});var n="https://secure.widget.cloud.opta.net/v3/v3.opta-widgets.js";if(!a.scriptExists(n)){var r=document.createElement("script");r.src=n,document.getElementsByTagName("body")[0].appendChild(r)}}},a.scriptExists=function(e){for(var t=document.getElementsByTagName("script"),a=0;a0?" ":"")+this.state.description,r=void 0;if("facebook"===e){r="Facebook";var i={"og:url":this.props.data.url,"og:title":this.state.title,"og:description":this.state.description};null!==this.props.data.imageUrl&&(i["og:image"]=this.props.data.imageUrl),window.FB.ui({method:"share_open_graph",action_type:"og.shares",action_properties:JSON.stringify({object:i})},function(e){})}if("x"===e&&(r="Twitter",window.open(this.baseXUrl+this.props.data.url+"&text="+n,"X","menubar=no,location=no,resizable=yes,scrollbars=yes,status=yes,centerscreen=yes,chrome=yes,height=400,width=600")),"link"===e&&(r="Link",this.setState({hideCopiedMessage:!1},function(){setTimeout(function(){a.setState({hideCopiedMessage:!0})},1e3)}),l(n+(n.length>0?" ":"")+this.props.data.url)),null!==this.state.defaultMParticleEventObject&&null!==window.articleMParticleEventObject){var o=Object.assign({},this.state.defaultMParticleEventObject,window.articleMParticleEventObject);o.event="content_shared",o.share_method=r,window.dataLayer.push(o)}}},{key:"render",value:function(){return s.createElement("div",{className:"InlineShare"},s.createElement("ul",null,s.createElement("li",{className:"InlineShare__icon InlineShare__icon--facebook"},s.createElement("button",{tabIndex:this.props.tabIndex,onClick:this.handleClick.bind(this,"facebook")},s.createElement("img",{src:u,alt:"Share this page via Facebook"}))),s.createElement("li",{className:"InlineShare__icon"},s.createElement("button",{tabIndex:this.props.tabIndex,onClick:this.handleClick.bind(this,"x")},s.createElement("img",{src:c,alt:"Share this page via X (formerly Twitter)"}))),s.createElement("li",{className:"InlineShare__icon"},s.createElement("button",{tabIndex:this.props.tabIndex,onClick:this.handleClick.bind(this,"link")},s.createElement("img",{src:p,alt:"Copy a link to this page"})))),s.createElement("span",{className:this.state.hideCopiedMessage?"hide":""},"Copied to clipboard"))}}]),t}(s.Component);e.exports=m},function(e,t,a){function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=function(){function e(e,t){for(var a=0;a0&&(r=0);var i=e.getBoundingClientRect().top+window.pageYOffset-r;window.scroll({top:i,left:0,behavior:"auto"}),t&&window.history.replaceState(void 0,void 0,t)}}},{key:"isMobile",value:function(){return matchMedia("(max-width: 999px)").matches}},{key:"triggerAccordionOpenCheck",value:function(e){var t=new CustomEvent("openImageCopyAccordion",{detail:{id:e}});document.dispatchEvent(t)}},{key:"render",value:function(){return""}}]),t}(s.Component);e.exports=l},function(e,t,a){function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=function(){function e(e,t){for(var a=0;a0&&s.createElement("div",null,s.createElement("table",null,s.createElement("thead",null,s.createElement("tr",null,s.createElement("th",{className:"LeagueTable__cell"},s.createElement("abbr",{title:"Position"},"Pos")),s.createElement("th",{className:"LeagueTable__cell"},"Team"),s.createElement("th",{className:"LeagueTable__cell"},s.createElement("abbr",{title:"Played"},"Pld")),s.createElement("th",{className:"LeagueTable__cell"},s.createElement("abbr",{title:"Win"},"W")),s.createElement("th",{className:"LeagueTable__cell"},s.createElement("abbr",{title:"Draw"},"D")),s.createElement("th",{className:"LeagueTable__cell"},s.createElement("abbr",{title:"Loss"},"L")),s.createElement("th",{className:"LeagueTable__cell LeagueTable__cell--desktop"},s.createElement("abbr",{title:"Goal for"},"GF")),s.createElement("th",{className:"LeagueTable__cell LeagueTable__cell--desktop"},s.createElement("abbr",{title:"Goal against"},"GA")),s.createElement("th",{className:"LeagueTable__cell LeagueTable__cell--desktop"},s.createElement("abbr",{title:"Goal difference"},"GD")),s.createElement("th",{className:"LeagueTable__cell"},s.createElement("abbr",{title:"Points"},"Pts")))),s.createElement("tbody",null,this.props.table.Table.length>0&&this.props.table.Table.map(function(t,a){var n=e.props.siteTeamOptaId===parseInt(t.TeamRef,10);return s.createElement("tr",{key:a,className:"LiveLeagueTable__row"+(n?" LiveLeagueTable__row--highlight":"")},s.createElement("td",{className:"LiveLeagueTable__cell"},s.createElement("div",null," ",t.Position)),s.createElement("td",{className:"LiveLeagueTable__cell"},s.createElement("div",{className:"LiveLeagueTable__cell--image"},s.createElement("img",{src:l,"data-src":e.props.baseUrl+t.TeamRef+".png",alt:""})),s.createElement("div",{className:"LiveLeagueTable__cell--team"},s.createElement("span",{className:"LiveLeagueTable__cell--longname"},t.TeamName))),s.createElement("td",{className:"LiveLeagueTable__cell"},t.Played),s.createElement("td",{className:"LiveLeagueTable__cell"},t.Won),s.createElement("td",{className:"LiveLeagueTable__cell"},t.Drawn),s.createElement("td",{className:"LiveLeagueTable__cell"},t.Lost),s.createElement("td",{className:"LiveLeagueTable__cell LeagueTable__cell--desktop"},t.GoalsFor),s.createElement("td",{className:"LiveLeagueTable__cell LeagueTable__cell--desktop"},t.GoalsAgainst),s.createElement("td",{className:"LiveLeagueTable__cell LeagueTable__cell--desktop"},t.GoalDifference),s.createElement("td",{className:"LiveLeagueTable__cell"},t.Points))}))))))}}]),t}(s.Component);e.exports=c},function(e,t,a){function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=function(){function e(e,t){for(var a=0;a0&&l(document).ready(function(){e.setState({width:e.generatePercentage(e.props.data.values)})}))}},{key:"componentWillReceiveProps",value:function(e){this.props.data!==e.data&&(this.setState({data:e.data}),this.props.data.values&&this.props.data.values.length>0&&this.setState({width:this.generatePercentage(this.props.data.values)}))}},{key:"render",value:function(){return s.createElement("div",{className:"BarChart"},this.state.data&&this.state.data.values&&s.createElement("div",{className:"BarChart__wrapper",tabIndex:"0"},s.createElement("p",{className:"BarChart__title"},this.state.data.title),s.createElement("div",{className:"BarChart__bar",style:{backgroundColor:this.props.awayColour}},s.createElement("div",{className:"BarChart__bar--progress",style:{width:this.state.width+"%",backgroundColor:this.props.homeColour}})),s.createElement("p",{className:"BarChart__values--left","aria-label":this.props.ariaDescriptionHome},this.state.data.values[0]),s.createElement("p",{className:"BarChart__values--right","aria-label":this.props.ariaDescriptionAway},this.state.data.values[1])))}}]),t}(s.Component);e.exports=c},function(e,t,a){function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=function(){function e(e,t){for(var a=0;a 0) \xa0\xa0\xa0\xa0\xa0\xa0\xa0 isError = true; \xa0\xa0\xa0 if (isError) \xa0\xa0\xa0\xa0\xa0\xa0\xa0 alert(errorString); \xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0 return !isError; } function checkNumber(event) { \xa0\xa0\xa0 if ( (event.keyCode >= 48 && event.keyCode <= 57)\xa0 || \xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0 (event.keyCode >= 96 && event.keyCode <= 105) || \xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0 event.keyCode == 190 || \xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0 event.keyCode == 110 || \xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0 event.keyCode == 8\xa0\xa0 || \xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0 event.keyCode == 9\xa0\xa0 || \xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0 event.keyCode == 12\xa0\xa0 || \xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0 event.keyCode == 27\xa0\xa0 || \xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0 event.keyCode == 37\xa0\xa0 || \xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0 event.keyCode == 39\xa0\xa0 || \xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0 event.keyCode == 46 \xa0\xa0\xa0\xa0\xa0\xa0\xa0 ) \xa0\xa0\xa0\xa0\xa0 { \xa0\xa0\xa0\xa0\xa0\xa0\xa0 return true; \xa0\xa0\xa0\xa0\xa0 } \xa0 \xa0\xa0\xa0\xa0return false; }'}}),s.createElement("script",{src:"https://official.tottenhamhotspur.com/inc/cal.js"}),s.createElement("div",{dangerouslySetInnerHTML:this.createContent()}),s.createElement("script",{language:"javascript",dangerouslySetInnerHTML:{__html:'var urlInput = document.getElementById("ci_consenturl");if (urlInput != null && urlInput != "undefined") {urlInput.value = encodeURI(window.location.href);}'}}))}}]),t}(s.Component);e.exports=l},function(e,t,a){function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=function(){function e(e,t){for(var a=0;a0&&n.createElement("h3",null,t.month),a)};e.exports=s},function(e,t,a){var n=a(0);a(507);var r=function(e){return e.link?n.createElement("a",{href:e.link.url,target:e.newWindow?"_blank":"_self",rel:e.newWindow?"noopener noreferrer":void 0},e.children):n.createElement("div",null,e.children)},i=function(e){var t=e.promotion.desktopImage,a=e.promotion.mobileImage,i=function(e,t){return n.createElement("span",{style:{backgroundImage:"url("+t+")"},className:e})};return n.createElement("div",{className:"FixturePromotion"},n.createElement(r,{link:e.promotion.link,newWindow:e.newWindow},a&&i("banner-image",a.url),t&&i("portrait-image",t.url)))};e.exports=i},function(e,t,a){function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=function(){function e(e,t){for(var a=0;a13?e.value.substring(0,13)+"...":e.value)}))),s.createElement("div",{className:"FixturesFilter__seasons"},s.createElement("select",{id:"seasons",onChange:this.props.onSeasonChange,ref:this.props.seasonsRef,defaultValue:a.find(function(e){return e.selected}).key},a&&a.map(function(e,t){return s.createElement("option",{id:e.key,"data-url":e.getFixturesApiUrl,key:e.key,value:e.key},e.value)}))),this.props.filtered&&s.createElement("div",{className:"FixturesFilter__reset"},s.createElement("button",{onClick:this.props.onReset},"Reset"))),s.createElement("div",{className:"FixturesFilter__actions--desktop"},a.some(function(e){return null!==e.addToCalendarLink&&e.selected})&&s.createElement("button",{className:"FixturesFilter__actions--calendar",onClick:this.handleCalendarClick,"aria-label":"Open calendar"}),a.some(function(e){return null!==e.calendarImageDownloadUrl&&e.selected})&&s.createElement("button",{className:"FixturesFilter__actions--download",onClick:this.handleDownloadClick,"aria-label":"Download fixtures schedule"})))}},{key:"componentWillUnmount",value:function(){document.querySelector("body").removeEventListener("click",this.closeAutocomplete)}}]),t}(s.Component);e.exports=l},function(e,t,a){function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=function(){function e(e,t){for(var a=0;a0&&this.props.data.slides.map(function(e,t){return s.createElement("div",{className:"Gallery__slide",key:t},s.createElement("img",{src:u,"data-src":e.image.smallUrl+"*,*"+e.image.mediumUrl+"*,*"+e.image.largeUrl+"*,*"+e.image.extraLargeUrl,alt:e.imageAltText||e.image.altText}),s.createElement("div",{className:"overlay"}))})),s.createElement("div",{className:"Gallery__background"})),s.createElement("p",{className:"Gallery__caption"},this.state.caption))}}]),t}(s.Component);e.exports=p},function(e,t,a){function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=function(){function e(e,t){for(var a=0;a1e3?(clearInterval(i),console.warn("Timed out waiting for google.")):r+=1},50)}else e.createMaps()})}},{key:"createMaps",value:function(){for(var e=l("#"+this.state.targetId),t=0;t0&&this.props.data.slides.map(function(e,t){return s.createElement("div",{className:"c-grid-gallery-carousel__slide",key:t},s.createElement("picture",null,s.createElement("source",{media:"(min-width: 1600px)",srcSet:e.image.extraLargeUrl}),s.createElement("source",{media:"(min-width: 1400px)",srcSet:e.image.largeUrl}),s.createElement("source",{media:"(min-width: 1024px)",srcSet:e.image.mediumUrl}),s.createElement("img",{src:e.image.smallUrl,alt:e.imageAltText||e.image.altText,loading:"lazy"})),s.createElement("div",{className:"overlay"}))}))))}}]),t}(s.Component);e.exports=u},function(e,t,a){var n=a(0),r=a(802),i=function(e){return n.createElement("span",{className:"Hashtag__tag"},n.createElement("a",{className:"link",href:e.tag.url},e.tag.hashtag),n.createElement("button",{className:"remove","data-id":e.tag.id,onClick:e.handleRemove,type:"type"},n.createElement("img",{src:r,alt:"Delete hashtag"})))};e.exports=i},function(e,t,a){function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=function(){function e(e,t){for(var a=0;a0&&s.createElement("div",{className:"MainHero__video"},s.createElement("video",{className:"lazy",autoPlay:!0,muted:!0,loop:!0,playsInline:!0},this.props.data.backgroundVideo.map(function(e){return s.createElement("source",{key:e.type,"data-src":e.src,type:e.type})}))),s.createElement("div",{className:"MainHero__heading wrapper"+(this.props.data.publishDate&&this.props.data.author?" tall":"")},s.createElement("p",{className:"tags"},this.props.data.tags&&this.props.data.tags.map(function(e,t){return s.createElement("a",{href:e.url,rel:"nofollow",key:t},e.hashtag," ")})),this.props.data.link?s.createElement("a",{href:this.props.data.link.url},i):i,this.props.data.subTitle&&s.createElement("p",{className:"subtitle"},this.props.data.link?s.createElement("a",{href:this.props.data.link.url},this.props.data.subTitle):this.props.data.subTitle),this.props.data.media&&s.createElement("div",{className:"media"},this.getLinkOrButton(n,a,r)),this.props.data.link&&s.createElement("div",null,s.createElement("a",{href:this.props.data.link.url,className:"c-button c-button--on-dark"},this.props.data.link.caption))),this.props.data.publishDate&&this.props.data.author&&s.createElement("div",{className:"MainHero__article-details"},this.props.data.twitter&&s.createElement("p",null,s.createElement("img",{src:h,alt:"",className:"inline-icon inline-icon--x"}),s.createElement("a",{href:this.props.data.twitter.url,target:"_blank",className:"twitter-link",rel:"noopener noreferrer"},this.props.data.twitter.label)),s.createElement("p",null,s.createElement("img",{src:d,alt:"",className:"inline-icon"}),l(c.toUTC(this.props.data.publishDate),"ddd dd mmmm yyyy, HH:MM"),s.createElement("span",{className:"separator"},"|"),s.createElement("img",{src:m,alt:"",className:"inline-icon"}),this.props.data.author)),this.props.data.media&&s.createElement("div",null,s.createElement(y,{isOpen:this.state.isModalOpen,onCancel:this.onCloseModal},s.createElement(f,{type:"STREAM",data:this.props.data.media,autoplay:!0}))))}}]),t}(s.Component);e.exports=b},function(e,t,a){function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=function(){function e(e,t){for(var a=0;at&&!a.props.data.fixture.isFullTime;if(a.setState({isMatchOccurring:r}),n.setHours(n.getHours()-a.props.data.hoursBeforeKickOffCountdown),e>t&&a.startMdc(),e>=n&&t>=e){var i=Math.abs(t.getTime()-e.getTime()),o=l(i,"HH MM ss",!0),s=l(i,"HH",!0),c=l(i,"MM",!0),u=l(i,"ss",!0);a.setState({showTimer:!a.props.data.fixture.showKickOffOverrideText}),a.setState({kickOff:o}),a.setState({kickOffHours:s}),a.setState({kickOffMinutes:c}),a.setState({kickOffSeconds:u}),"00:00:00"===o&&(a.startMdc(),a.props.data.hideDuringGame||a.setState({isMatchOccurring:!0}))}else a.setState({kickOffDay:l(t,"dddd")}),a.setState({kickOff:l(t,"dd mmmm HH:MM"),showTimer:!1})},a.startMdc=function(){a.props.data.hideDuringGame&&(a.setState({showSelf:!1}),c.publish("StartMdc")),clearInterval(a.countDownInterval)},a.loadHighlights=function(){u.ajax({method:"GET",url:a.props.data.endpoints.find(function(e){return"highlights"===e.name}).url}).done(function(e){e&&e.Items&&a.populatePenalties(e.Items),e.HomeCrestUrl&&e.AwayCrestUrl&&a.setState({homeCrestUrl:a.props.data.baseUrl+e.HomeCrestUrl,awayCrestUrl:a.props.data.baseUrl+e.AwayCrestUrl})})},a.loadLatestScores=function(){u.ajax({method:"GET",url:a.props.data.endpoints.find(function(e){return"latestScore"===e.name}).url}).done(function(e){e&&a.populateLatestScores(e)})},a.populatePenalties=function(e,t){var n=function(e){return e.IsHome&&"Scored"===e.Outcome},r=function(e){return!e.IsHome&&"Scored"===e.Outcome};if(e.some(function(e){return"PenaltyShot"===e.HighlightType})){var i=a.state.penalties,o=e.filter(function(e){return"PenaltyShot"===e.HighlightType});t?o.forEach(function(e,t,a){-1===i.findIndex(function(t){return t.Id===e.Id})&&i.push(e)}):i=e.filter(function(e){return"PenaltyShot"===e.HighlightType});var s=i.filter(n).length,l=i.filter(r).length;a.setState({showPenalties:!0,penaltyShootOutOccurring:!0,penalties:i,penaltiesScore:"(Pen "+s+" - "+l+")"})}},a.populateLatestScores=function(e){a.setState({score:e.home.score+" - "+e.away.score,aggregateScore:e.home.aggregateScore+" - "+e.away.aggregateScore,showAggregateScore:e.showAggregateScore&&void 0!==e.home.aggregateScore&&void 0!==e.away.aggregateScore})},a.populateLatestResults=function(e){a.setState({latestResults:e})},a.state={kickOff:"",kickOffDay:"",isMatchOccurring:a.props.data.fixture.isMatchOccurring,showSelf:!0,kickOffHours:"",kickOffMinutes:"",kickOffSeconds:"",showTimer:!1,showPenalties:!1,penaltyShootOutOccurring:!1,awayCrestUrl:"",homeCrestUrl:"",penalties:[],penaltiesScore:"",latestResults:[],score:"",showAggregateScore:!1,aggregateScore:""},a.countDownInterval=null,a.scoreInterval=null,a}return i(t,e),o(t,[{key:"render",value:function(){var e=this,t=!1,a="";return this.state.isMatchOccurring?(t=!0,a="Now Live"):this.props.data.fixture.isFullTime?(t=!0,a="Result"):a="Next match",s.createElement("div",{"data-bg":this.image.smallUrl+"*,*"+this.image.mediumUrl+"*,*"+this.image.largeUrl+"*,*"+this.image.extraLargeUrl,ref:function(t){e.hero=t},className:"MatchDayCentreHero"+(this.state.showSelf?"":" hide"),id:this.props.data.id},s.createElement("div",{className:"MatchDayCentreHero__outer-wrapper"},s.createElement("div",{className:"MatchDayCentreHero__wrapper"},s.createElement("div",{className:"MatchDayCentreHero__header"},s.createElement("h1",null,a),this.props.data.fixture.competition.lightCrest&&s.createElement("img",{src:p,"data-src":this.props.data.fixture.competition.lightCrest.url,alt:this.props.data.fixture.competition.lightCrest.altText})),s.createElement("p",{className:"tags"},s.createElement("a",{href:this.props.data.fixture.tag.url,rel:"nofollow"},this.props.data.fixture.tag.hashtag," ")),this.state.showTimer&&s.createElement("p",{className:"kickoff-countdown"},"Countdown to kick-off:"),this.props.data.fixture&&s.createElement("div",null,this.props.data.fixture.showKickOffOverrideText&&s.createElement("div",{class:"MatchDayCentreHero__kickoff"},s.createElement("p",null,this.props.data.fixture.kickOffOverrideText)),!this.props.data.fixture.showKickOffOverrideText&&!this.state.isMatchOccurring&&s.createElement("div",null,this.state.showTimer?s.createElement("div",{className:"MatchDayCentreHero__kickoff"},s.createElement("p",{className:"sliced-time hours"},s.createElement("span",{className:"sliced-time__wrapper"},s.createElement("span",{className:"text"},"HOURS"),s.createElement("span",null,this.state.kickOffHours))),s.createElement("p",{className:"sliced-time minutes"},s.createElement("span",{className:"sliced-time__wrapper"},s.createElement("span",{className:"text"},"MINUTES"),s.createElement("span",null,this.state.kickOffMinutes))),s.createElement("p",{className:"sliced-time seconds"},s.createElement("span",{className:"sliced-time__wrapper"},s.createElement("span",{className:"text"},"SECONDS"),s.createElement("span",null,this.state.kickOffSeconds)))):s.createElement("div",{className:"MatchDayCentreHero__kickoff"},s.createElement("span",null,this.state.kickOffDay),s.createElement("p",null,this.state.kickOff))),s.createElement("div",{className:"MatchDayCentreHero__crests"},s.createElement("div",{className:"home"},this.props.data.fixture.homeTeam.lightCrest&&s.createElement("img",{src:p,"data-src":this.props.data.fixture.homeTeam.lightCrest.smallUrl,alt:this.props.data.fixture.homeTeam.lightCrest.altText}),s.createElement("p",null,this.props.data.fixture.homeTeam.shortName)),(this.props.data.fixture.isFullTime||this.state.isMatchOccurring)&&s.createElement("div",{className:"score"},this.props.data.fixture.isFullTime?(null!==this.props.data.fixture.homeScore?this.props.data.fixture.homeScore:"")+" - "+(null!==this.props.data.fixture.homeScore?this.props.data.fixture.awayScore:""):this.state.score,this.props.data.fixture.isFullTime&&""!==this.props.data.fixture.aggregateHomeScore&&null!==this.props.data.fixture.aggregateAwayScore?s.createElement("span",{className:"score-extra"},"(Agg ",this.props.data.fixture.aggregateHomeScore," - ",this.props.data.fixture.aggregateAwayScore,")"):this.state.showAggregateScore?s.createElement("span",{className:"score-extra"},"(Agg ",this.state.aggregateScore,")"):"",this.props.data.fixture.isFullTime&&""!==this.props.data.fixture.penaltyHomeScore&&null!==this.props.data.fixture.penaltyAwayScore?s.createElement("span",{className:"score-extra"+(this.props.data.fixture.aggregateAwayScore?" score-extra-offset":"")},"(Pen ",this.props.data.fixture.penaltyHomeScore," - ",this.props.data.fixture.penaltyAwayScore,")"):this.state.penaltyShootOutOccurring&&s.createElement("span",{className:"score-extra"+(this.state.showAggregateScore?" score-extra-offset":"")},this.state.penaltiesScore)),!this.props.data.fixture.isFullTime&&!this.state.isMatchOccurring&&s.createElement("span",null,"VS"),s.createElement("div",{className:"away"},this.props.data.fixture.awayTeam.lightCrest&&s.createElement("img",{src:p,"data-src":this.props.data.fixture.awayTeam.lightCrest.smallUrl,alt:this.props.data.fixture.awayTeam.lightCrest.altText}),s.createElement("p",null,this.props.data.fixture.awayTeam.shortName))),s.createElement("div",{className:"MatchDayCentreHero__stadium"},s.createElement("p",null,this.props.data.fixture.competition.name),s.createElement("p",{className:"location"},this.props.data.fixture.stadium.displayName),this.props.data.fixture.referee&&s.createElement("p",{className:"referee"},"Referee: ",this.props.data.fixture.referee))),t?s.createElement("p",{className:"MatchDayCentreHero__action"},s.createElement("a",{href:this.props.data.fixture.matchDayCentreLink.url,className:"c-button c-button--on-dark"},this.props.data.fixture.matchDayCentreLink.caption)):this.props.data.fixture&&this.props.data.fixture.buttonLink&&s.createElement("p",{className:"MatchDayCentreHero__action"},s.createElement("a",{href:this.props.data.fixture.buttonLink.url,className:"c-button c-button--on-dark"},this.props.data.fixture.buttonLink.caption)),!t&&this.props.data.fixture&&this.props.data.fixture.buttonLinkComment&&s.createElement("div",{className:"MatchDayCentreHero__description"},s.createElement("p",null,this.props.data.fixture.buttonLinkComment))),this.props.data.fixture&&s.createElement("div",{className:"MatchDayCentreHero__desktop"},s.createElement("div",{className:"MatchDayCentreHero__crests"},s.createElement("div",{className:"home"},this.props.data.fixture.homeTeam.lightCrest&&s.createElement("img",{src:p,"data-src":this.props.data.fixture.homeTeam.lightCrest.smallUrl,alt:this.props.data.fixture.homeTeam.lightCrest.altText}),s.createElement("p",null,this.props.data.fixture.homeTeam.name)),(this.props.data.fixture.isFullTime||this.state.isMatchOccurring)&&s.createElement("div",{className:"score"},this.props.data.fixture.isFullTime?(null!==this.props.data.fixture.homeScore?this.props.data.fixture.homeScore:"")+" - "+(null!==this.props.data.fixture.homeScore?this.props.data.fixture.awayScore:""):this.state.score,this.props.data.fixture.isFullTime&&""!==this.props.data.fixture.aggregateHomeScore&&null!==this.props.data.fixture.aggregateAwayScore?s.createElement("span",{className:"score-extra"},"(Agg ",this.props.data.fixture.aggregateHomeScore," - ",this.props.data.fixture.aggregateAwayScore,")"):this.state.showAggregateScore?s.createElement("span",{className:"score-extra"},"(Agg ",this.state.aggregateScore,")"):"",this.props.data.fixture.isFullTime&&""!==this.props.data.fixture.penaltyHomeScore&&null!==this.props.data.fixture.penaltyAwayScore?s.createElement("span",{className:"score-extra"+(this.props.data.fixture.aggregateAwayScore?" score-extra-offset":"")},"(Pen ",this.props.data.fixture.penaltyHomeScore," - ",this.props.data.fixture.penaltyAwayScore,")"):this.state.penaltyShootOutOccurring&&s.createElement("span",{className:"score-extra"+(this.state.showAggregateScore?" score-extra-offset":"")},this.state.penaltiesScore)),!this.props.data.fixture.isFullTime&&!this.state.isMatchOccurring&&s.createElement("span",null,"VS"),s.createElement("div",{className:"away"},this.props.data.fixture.awayTeam.lightCrest&&s.createElement("img",{src:p,"data-src":this.props.data.fixture.awayTeam.lightCrest.smallUrl,alt:this.props.data.fixture.awayTeam.lightCrest.altText}),s.createElement("p",null,this.props.data.fixture.awayTeam.name))))))}}]),t}(s.Component);e.exports=d},function(e,t,a){function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=function(){function e(e,t){for(var a=0;a0&&s.createElement("div",{className:"PlayerHero__video"},s.createElement("video",{className:"lazy",autoPlay:!0,muted:!0,loop:!0,playsInline:!0},this.props.data.player.backgroundVideo.map(function(e){return s.createElement("source",{key:e.type,"data-src":e.src,type:e.type})}))),s.createElement("div",{className:"PlayerHero__filter"},s.createElement("div",{className:"PlayerHero__wrapper"},s.createElement("div",{className:"PlayerHero__playerImage"},s.createElement("div",{className:"PlayerHero__playerNumber"},this.props.data.player.playerNumber),null!==this.props.data.player.playerImage?s.createElement("img",{"data-src":this.props.data.player.playerImage.mediumUrl,alt:this.props.data.player.playerImage.altText}):s.createElement("img",{src:u,alt:"No photo for "+this.props.data.player.fullName})),s.createElement("div",{className:"PlayerHero__playerMeta"},s.createElement("div",{className:"PlayerHero__playerTable"},s.createElement("div",{className:"PlayerHero__playerDetails"},s.createElement("h1",null,s.createElement("span",{className:"firstName"},this.props.data.player.firstName," "),s.createElement("span",{className:"lastName"},this.props.data.player.lastName)),s.createElement("div",{className:"statusIcon"},this.props.data.player.playerCountry&&s.createElement("div",{className:"flag"},s.createElement("img",{"data-src":"/static/media/flags/4x3/"+this.props.data.player.playerCountry+".svg",alt:this.props.data.player.playerCountry+" flag"})),this.props.data.player.playerIsOnLoan&&s.createElement("div",{className:"loan"},s.createElement("span",null,"On Loan"))),this.props.data.player.playerPosition&&this.props.data.player.playerShowPosition&&s.createElement("p",{className:"no-spacing"},s.createElement("span",null,"Position: "),this.props.data.player.playerPosition),this.props.data.player.playerDateOfBirth&&s.createElement("p",{className:"no-spacing"},s.createElement("span",null,"Born: "),l(this.props.data.player.playerDateOfBirth,"dd mmmm yyyy"),this.props.data.player.playerPlaceOfBirth&&s.createElement("span",{className:"no-weight"},"\xa0(",this.props.data.player.playerPlaceOfBirth,")")),this.props.data.player.playerJoinDate&&s.createElement("p",{className:"no-spacing"},s.createElement("span",null,"Join Date: "),l(this.props.data.player.playerJoinDate,"dd mmmm yyyy")),this.props.data.player.playerDebut&&s.createElement("p",{className:"no-spacing"},s.createElement("span",null,"Spurs Debut: "),l(this.props.data.player.playerSpursDebut,"dd mmmm yyyy")),this.props.data.player.playerProfessionalDebut&&s.createElement("p",{className:"no-spacing mobile"},s.createElement("span",null,"Professional Debut: "),l(this.props.data.player.playerProfessionalDebut,"dd mmmm yyyy")),this.props.data.player.playerPreviousClubs.length>0&&s.createElement("p",{className:"no-spacing mobile"},s.createElement("span",null,"Previous Clubs: "),this.props.data.player.playerPreviousClubs.map(function(e,t,a){return s.createElement("span",{className:"no-weight prev-clubs",key:e+"-"+t},e,t!==a.length-1?",":"")})),this.props.data.player.tags&&s.createElement("div",{className:"PlayerHero__tags"},this.props.data.player.tags.map(function(e,t){return s.createElement("a",{href:e.url,rel:"nofollow",key:t},e.hashtag," ")})))))))),s.createElement("div",{className:"PlayerAdditionalData-desktop"},this.props.data.player.playerProfessionalDebut&&s.createElement("p",{className:"no-spacing"},s.createElement("span",null,"Professional Debut: "),l(this.props.data.player.playerProfessionalDebut,"dd mmmm yyyy")),this.props.data.player.playerPreviousClubs.length>0&&s.createElement("p",{className:"no-spacing"},s.createElement("span",null,"Previous Clubs: "),this.props.data.player.playerPreviousClubs.map(function(e,t,a){return s.createElement("span",{className:"no-weight prev-clubs",key:e+"-"+t},e,t!==a.length-1?",":"")}))),this.props.data.player.playerDescription&&s.createElement(c,{className:"PlayerHero__playerBio",data:{isLoadMore:!0,content:this.props.data.player.playerDescription}}))}}]),t}(s.Component);e.exports=p},function(e,t,a){function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=function(){function e(e,t){for(var a=0;a-1&&a.state.defaultMParticleEventObject.topics_followed.splice(r,1),a.state.defaultMParticleEventObject.topics_followed.length||(a.state.defaultMParticleEventObject.topics_followed=null)}var i=Object.assign({},a.state.defaultMParticleEventObject,n);window.dataLayer.push(i)}).always(function(e){a.setState({isLoading:!1})})},a.state={hasChanged:!1,isFollowing:a.props.data.isFollowing,isLoggedIn:!1,baseUrl:a.props.data.baseUrl,id:a.props.data.id,showFollow:!1,hashTagTitle:a.props.data.hashtagTitle,defaultMParticleEventObject:window.defaultMParticleEventObject},a}return i(t,e),o(t,[{key:"componentDidMount",value:function(){var e=a(33),t=e.isLoggedIn;this.setState({isLoggedIn:t(),showFollow:this.props.data.showFollow&&window.spurs_login_data.enabled})}},{key:"render",value:function(){var e=this,t=this.props.data.image;return s.createElement("div",{"data-bg":t.smallUrl+"*,*"+t.mediumUrl+"*,*"+t.largeUrl+"*,*"+t.extraLargeUrl,ref:function(t){e.hero=t},className:"TrendingHero"},s.createElement("div",{className:"TrendingHero__wrapper"},s.createElement("h1",null,this.props.data.hashtagTitle),s.createElement("p",null,this.props.data.subTitle),this.state.showFollow&&s.createElement(u,{hasAccess:this.state.isLoggedIn,isVideo:!1,className:"trending"},s.createElement(c,{checked:this.state.isFollowing,callback:this.hasChanged,labelUnchecked:"Follow",labelChecked:"Unfollow",id:"trendinghero"},this.state.isLoading&&s.createElement("img",{src:p,className:"spinner",alt:"Loading animation"}))),s.createElement("p",{className:"flash-message"+(this.state.hasChanged?" show":"")},this.state.isFollowing?"You have followed this tag and added it to My Tags":"You have unfollowed this tag and removed it from My Tags")))}}]),t}(s.Component);e.exports=m},function(e,t,a){function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=function(){function e(e,t){for(var a=0;a0?s.createElement("ul",{className:"c-information__quick-links"},this.props.data.quickLinks.length>0&&this.props.data.quickLinks.map(function(e,t){return s.createElement("li",{key:t,className:"c-information__quick-links-item"},s.createElement("a",{href:e.link.url,className:"c-information__quick-links-link"},s.createElement(c,{className:"c-information__quick-links-icon",name:e.icon,width:30,height:30}),s.createElement(c,{className:"c-information__quick-links-chevron",name:"chevronRight",width:7,height:12}),e.link.caption))})):null),s.createElement("div",{className:"c-information__text-container"},s.createElement("h2",{className:"c-information__title"},this.props.data.title),s.createElement("div",{className:"c-information__text c-richtext"},s.createElement("p",null,this.props.data.text)),this.props.data.cta&&this.props.data.cta.url&&this.props.data.cta.caption?s.createElement("a",{href:this.props.data.cta.url,className:"c-button c-button--on-dark "+t},this.props.data.cta.caption):null))))}}]),t}(s.Component);e.exports=p},function(e,t,a){function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=function(){function e(e,t){for(var a=0;a'+e.data.items[a].value+''+e.data.items[a].suffix+""},prevArrow:'",nextArrow:'"},a.state={lastWindowHeight:0},a}return i(t,e),o(t,[{key:"componentDidMount",value:function(){if(!(this.props.data.items.length<=1)){a(54);var e=c(this.gallery);e.not(".slick-initialized").slick(this.settings),setTimeout(function(){e.get(0).querySelector(".slick-dots li:first-child").classList.add("is-active")},10),e.on("afterChange",function(e,t){e.currentTarget.querySelector(".is-active").classList.remove("is-active"),e.currentTarget.querySelector(".slick-dots li:nth-child("+(t.currentSlide+1)+")").classList.add("is-active")}),e.find(".slick-dots").wrap('
'),e.find("[data-pagination-button], .slick-arrow").each(function(){c(this).focus(function(){e.addClass("is-focus")}).blur(function(){e.removeClass("is-focus")})}),e.on("swipe",function(){e.slick("slickPause"),e.addClass("is-focus")}),c("[data-pagination-button], .slick-arrow").on("click",function(){e.slick("slickPause"),e.addClass("is-focus")}),this.initAutoplayWhenInViewport(e)}}},{key:"initAutoplayWhenInViewport",value:function(e){var t=this;if("IntersectionObserver"in window){var a=new IntersectionObserver(function(n,r){n.forEach(function(n){n.isIntersecting&&(e.slick("slickPlay"),e.addClass("autoplay-started"),a.unobserve(t.gallery))})},{rootMargin:"0px 0px -50%"});a.observe(this.gallery)}else e.slick("slickPlay")}},{key:"render",value:function(){var e=this,t=this.props.data.isOneHotspur?" c-key-facts--one-hotspur":this.props.data.isPremium?" c-key-facts--premium":"",a=this.props.data.isOneHotspur?" c-button--one-hotspur":this.props.data.isPremium?" c-button--premium":"c-button--outline";return s.createElement("div",{id:this.props.data.id,className:"c-key-facts"+t+(this.props.data.items.length<=1?" c-key-facts--lonely":"")},this.props.data.items.length&&s.createElement("div",{className:"c-key-facts__wrapper"},s.createElement("div",{className:"c-key-facts__wrapper__inner",ref:function(t){return e.gallery=t}},this.props.data.items.map(function(t,n){return s.createElement("div",{key:n,className:"c-key-facts__item"},s.createElement("div",{className:"c-key-facts__item__inner"},s.createElement("div",{className:"c-key-facts__copy"},t.value&&t.suffix&&s.createElement("h2",{className:"c-key-facts__title"},s.createElement("span",{className:"c-key-facts__value"},t.value),s.createElement("span",{className:"c-key-facts__suffix"},t.suffix)),s.createElement("div",{className:"c-key-facts__copy__main"},s.createElement(p,{content:t.richtext,isPremium:e.props.data.isPremium,largeText:"true"}),t.link.url&&t.link.caption&&s.createElement("p",{className:"c-key-facts__action"},s.createElement("a",{href:t.link.url,className:"c-button c-button--on-dark "+a},t.link.caption))))),s.createElement("div",{className:"c-key-facts__image-container"},s.createElement(u,{loading:"lazy",image:t.image,class:"c-key-facts__image"})))}))))}}]),t}(s.Component);e.exports=d},function(e,t,a){function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=function(){function e(e,t){for(var a=0;a1?e.soccerDocument.competition.teamStandings.find(function(e){return e.round.name==a.props.data.tableName}).teamRecord:e.soccerDocument.competition.teamStandings[0].teamRecord;a.setState({records:t,teams:e.soccerDocument.team,isLoading:!1})},a.getTeamName=function(e){var t=a.state.teams.filter(function(t){return t.uid==e});return s.createElement("span",{className:"LeagueTable__cell--longname"},t.length>0?t[0].name:"")},a.state={table:[],teams:[],records:[],isLoading:!0},a}return i(t,e),o(t,[{key:"componentDidMount",value:function(){this.loadData()}},{key:"render",value:function(){var e=this;return s.createElement("div",{className:"LeagueTable"},s.createElement("div",{className:"LeagueTable__wrapper"},this.state.isLoading&&s.createElement("img",{src:c,className:"spinner",alt:"Loading animation"}),!this.state.isLoading&&0===this.state.records.length&&s.createElement("p",null,"No league data is available"),this.state.records.length>0&&s.createElement("div",null,s.createElement("table",null,s.createElement("thead",null,s.createElement("tr",null,s.createElement("th",{className:"LeagueTable__cell"},s.createElement("abbr",{title:"Position"},"Pos")),s.createElement("th",{className:"LeagueTable__cell"},"Team"),s.createElement("th",{className:"LeagueTable__cell"},s.createElement("abbr",{title:"Played"},"Pld")),s.createElement("th",{className:"LeagueTable__cell"},s.createElement("abbr",{title:"Win"},"W")),s.createElement("th",{className:"LeagueTable__cell"},s.createElement("abbr",{title:"Draw"},"D")),s.createElement("th",{className:"LeagueTable__cell"},s.createElement("abbr",{title:"Loss"},"L")),s.createElement("th",{className:"LeagueTable__cell LeagueTable__cell--desktop"},s.createElement("abbr",{title:"Goal for"},"GF")),s.createElement("th",{className:"LeagueTable__cell LeagueTable__cell--desktop"},s.createElement("abbr",{title:"Goal against"},"GA")),s.createElement("th",{className:"LeagueTable__cell LeagueTable__cell--desktop"},s.createElement("abbr",{title:"Goal difference"},"GD")),s.createElement("th",{className:"LeagueTable__cell"},s.createElement("abbr",{title:"Points"},"Pts")))),s.createElement("tbody",null,this.state.records.length>0&&this.state.records.map(function(t,a){var n=e.props.data.siteTeamOptaId===t.teamRef.toString();return s.createElement("tr",{key:a,"data-optaid":t.teamRef,className:"LeagueTable__row"+(n?" LeagueTable__row--highlight":"")},s.createElement("td",{className:"LeagueTable__cell"},t.standing.position),s.createElement("td",{className:"LeagueTable__cell"},s.createElement("div",{className:"LeagueTable__cell--image"},s.createElement("img",{src:u,"data-src":e.props.data.baseUrl+t.teamRef+".png",alt:""})),s.createElement("div",{className:"LeagueTable__cell--team"},e.getTeamName(t.teamRef))),s.createElement("td",{className:"LeagueTable__cell"},t.standing.played),s.createElement("td",{className:"LeagueTable__cell"},t.standing.won),s.createElement("td",{className:"LeagueTable__cell"},t.standing.drawn),s.createElement("td",{className:"LeagueTable__cell"},t.standing.lost),s.createElement("td",{className:"LeagueTable__cell LeagueTable__cell--desktop"},t.standing.for),s.createElement("td",{className:"LeagueTable__cell LeagueTable__cell--desktop"},t.standing.against),s.createElement("td",{className:"LeagueTable__cell LeagueTable__cell--desktop"},t.standing.for-t.standing.against),s.createElement("td",{className:"LeagueTable__cell"},t.standing.points))})))),this.state.records.length>0&&this.props.data.loadMoreLink&&s.createElement(p,Object.assign({button:!0},this.props.data.loadMoreLink))))}}]),t}(s.Component);e.exports=m},function(e,t,a){function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=function(){function e(e,t){for(var a=0;a1&&s.createElement("div",{className:"c-filters__secondary__control c-filters__secondary__control--pagination"},s.createElement(h,{data:this.getPaginationData(),parentCallback:this.handlePaginationChange.bind(this)}))))))),s.createElement(p,{data:this.state.cardData}),!this.state.cardData.cards.length&&s.createElement("div",{id:this.props.data.id,className:"c-section c-section--tight-top"+(this.props.data.isPremium?" c-section--premium":"")},s.createElement("div",{className:"c-section__inner"},s.createElement("p",{className:"c-no-results",role:"status"},"No results found for your selection."))),this.state.pages>1&&s.createElement("div",{className:"c-section c-section--tight-top c-section--center"},s.createElement("div",{className:"c-section__inner"},s.createElement(h,{data:this.getPaginationData(),parentCallback:this.handlePaginationChange.bind(this)}))))}}]),t}(s.Component);e.exports=y},function(e,t,a){function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=function(){function e(e,t){for(var a=0;ae.bottom&&!a.state.isLoading&&e.bottom>0&&a.setState({isLoading:!0},function(){a.handleLoadMore()})},a.updateCommentary=function(e){var t=e[0].Id,n=a.state.allData.filter(function(e){return"AdminComment"!==e.HighlightSource||e.Id!==t}),r=n.concat(e);r=c(r,[function(e){return e.TimeStamp}],["desc"]);var i=a.currentPage*a.pageSize,o=r.slice(0,i>=r.length?r.length:i);a.setState({allData:r,visibleData:o,isMore:o.length=t.length?t.length:n);a.setState({allData:t,visibleData:r,isMore:r.length0&&(console.debug("------ CommentaryModule - delete data received ------"),console.debug(t.data.Deleted),e.deleteCommentary(t.data.Deleted)),t.data.Updated.length>0&&(console.debug("------ CommentaryModule - update data received ------"),console.debug(t.data.Updated),e.updateCommentary(t.data.Updated))})}},{key:"render",value:function(){var e=this;return s.createElement("div",{className:"Commentary",ref:function(t){return e.commentary=t}},!this.state.isLoading&&this.state.visibleData.length>0&&s.createElement("div",{className:"Commentary__title"},s.createElement("h2",null,"Live Reporting"),s.createElement("p",null,"By ",this.state.commentatorName)),s.createElement("div",{className:"Commentary__wrapper"},this.state.visibleData.length>0&&this.state.visibleData.map(function(t,a){return s.createElement(p,{isHomeTeam:t.IsHomeTeam,homeTeamCrestUrl:e.props.data.homeTeamCrestUrl,awayTeamCrestUrl:e.props.data.awayTeamCrestUrl,comment:t,key:a,baseUrl:e.props.data.baseUrl})})),this.state.isMore&&s.createElement(m,{handle:this.handleLoadMore,caption:"Show more",context:"commentary"}),this.state.isLoading&&s.createElement("img",{src:d,className:"spinner",alt:"Loading..."}),!this.state.isLoading&&0===this.state.visibleData.length&&s.createElement("p",null,"Live text commentary will start on this page in the build-up to kick-off."))}}]),t}(s.Component);e.exports=h},function(e,t,a){function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=function(){function e(e,t){for(var a=0;a0&&s.createElement("div",{className:"LineupPlayer__stat"},s.createElement("p",{className:"LineupPlayer__stat--heading"},"Minutes Played"),s.createElement("p",{className:"LineupPlayer__stat--value"},this.props.MinutesPlayed)),!isNaN(this.props.GoalsScored)&&s.createElement("div",{className:"LineupPlayer__stat"},s.createElement("p",{className:"LineupPlayer__stat--heading"},"Goals Scored"),s.createElement("p",{className:"LineupPlayer__stat--value"},this.props.GoalsScored)),!isNaN(this.props.Assists)&&s.createElement("div",{className:"LineupPlayer__stat"},s.createElement("p",{className:"LineupPlayer__stat--heading"},"Assists"),s.createElement("p",{className:"LineupPlayer__stat--value"},this.props.Assists)),!isNaN(this.props.Clearances)&&s.createElement("div",{className:"LineupPlayer__stat"},s.createElement("p",{className:"LineupPlayer__stat--heading"},"Clearances"),s.createElement("p",{className:"LineupPlayer__stat--value"},this.props.Clearances)),!isNaN(this.props.Interceptions)&&s.createElement("div",{className:"LineupPlayer__stat"},s.createElement("p",{className:"LineupPlayer__stat--heading"},"Interceptions"),s.createElement("p",{className:"LineupPlayer__stat--value"},this.props.Interceptions)),!isNaN(this.props.TacklesTotal)&&s.createElement("div",{className:"LineupPlayer__stat"},s.createElement("p",{className:"LineupPlayer__stat--heading"},"Total Tackles"),s.createElement("p",{className:"LineupPlayer__stat--value"},this.props.TacklesTotal)),!isNaN(this.props.YellowCards)&&!isNaN(this.props.RedCards)&&s.createElement("div",{className:"LineupPlayer__stat"},s.createElement("p",{className:"LineupPlayer__stat--heading"},"Cards"),s.createElement("p",{className:"LineupPlayer__stat--value"},s.createElement("span",{className:"yellowcard","aria-label":"Number of yellow cards"},this.props.YellowCards)," ",s.createElement("span",{className:"redcard","aria-label":"Number of red cards"},this.props.RedCards)))))}}]),t}(s.Component);e.exports=l},function(e,t,a){function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=function(){function e(e,t){for(var a=0;a0&&s.createElement("div",{className:"LineupPlayer__stat"},s.createElement("p",{className:"LineupPlayer__stat--heading"},"Minutes Played"),s.createElement("p",{className:"LineupPlayer__stat--value"},this.props.MinutesPlayed)),!isNaN(this.props.GoalsConceded)&&s.createElement("div",{className:"LineupPlayer__stat"},s.createElement("p",{className:"LineupPlayer__stat--heading"},"Goals Conceded"),s.createElement("p",{className:"LineupPlayer__stat--value"},this.props.GoalsConceded)),!isNaN(this.props.Saves)&&s.createElement("div",{className:"LineupPlayer__stat"},s.createElement("p",{className:"LineupPlayer__stat--heading"},"Saves"),s.createElement("p",{className:"LineupPlayer__stat--value"},this.props.Saves)),!isNaN(this.props.Throws)&&s.createElement("div",{className:"LineupPlayer__stat"},s.createElement("p",{className:"LineupPlayer__stat--heading"},"Throws"),s.createElement("p",{className:"LineupPlayer__stat--value"},this.props.TotalThrows)),!isNaN(this.props.Punches)&&s.createElement("div",{className:"LineupPlayer__stat"},s.createElement("p",{className:"LineupPlayer__stat--heading"},"Punches"),s.createElement("p",{className:"LineupPlayer__stat--value"},this.props.Punches)),!isNaN(this.props.GoalsScored)&&s.createElement("div",{className:"LineupPlayer__stat"},s.createElement("p",{className:"LineupPlayer__stat--heading"},"Goal Kicks"),s.createElement("p",{className:"LineupPlayer__stat--value"},this.props.GoalKicks)),!isNaN(this.props.YellowCards)&&!isNaN(this.props.RedCards)&&s.createElement("div",{className:"LineupPlayer__stat"},s.createElement("p",{className:"LineupPlayer__stat--heading"},"Cards"),s.createElement("p",{className:"LineupPlayer__stat--value"},s.createElement("span",{className:"yellowcard","aria-label":"Number of yellow cards"},this.props.YellowCards)," ",s.createElement("span",{className:"redcard","aria-label":"Number of red cards"},this.props.RedCards)))))}}]),t}(s.Component);e.exports=l},function(e,t,a){function n(e){if(Array.isArray(e)){for(var t=0,a=Array(e.length);t0){var r=function(e){return-1!==a.state.highlightsToRemove.findIndex(function(t){return t.Id===e.Id})},i=function(e){return-1!==a.state.highlights.findIndex(function(t){return t.Id===e.Id})},o=a.parseHighlights([].concat(n(a.state.highlights),n(e[e.Items?"Items":"Updated"].filter(function(e){return!r(e)}).filter(function(e){return!i(e)}))));a.setState({highlights:o||[],highlightsToRemove:[]})}else{t&&a.state.highlights.length<=0&&a.setState({highlightsToRemove:e.Deleted?e.Deleted:[]});var s=function(t){return e.Deleted&&-1!==e.Deleted.findIndex(function(e){return e.Id===t.Id})},l=function(t){return-1!==e[e.Items?"Items":"Updated"].findIndex(function(e){return e.Id===t.Id})},c=a.parseHighlights([].concat(n(e[e.Items?"Items":"Updated"]),n(a.state.highlights.filter(function(e){return!s(e)}).filter(function(e){return!l(e)}))));a.setState({highlights:c||[]})}console.log("final list: ",a.state.highlights)},a.loadHighlights=function(){c.ajax({method:"GET",url:a.highlightsEndpoint.url}).done(function(e){a.handleHighlights(e,!1)})},a.loadLineup=function(){c.ajax({method:"GET",url:a.props.data.endpoints.find(function(e){return"lineup"===e.name}).url}).done(function(e){a.populateLineup(e)}).fail(function(){a.setState({isLoading:!1})})},a.populateLineup=function(e){var t=a.props.data.endpoints.find(function(e){return"lineup"===e.name}).channelId.match(/\.(.+)$/)[1];e.HomeTeamDetails.StartingLineUp.map(function(e){return e.statsUrl=a.props.data.baseUrl+"mdc/playerprofile?playerId="+e.PlayerId+"&id="+t,e}),e.HomeTeamDetails.Substitutes.map(function(e){return e.statsUrl=a.props.data.baseUrl+"mdc/playerprofile?playerId="+e.PlayerId+"&id="+t,e}),e.AwayTeamDetails.StartingLineUp.map(function(e){return e.statsUrl=a.props.data.baseUrl+"mdc/playerprofile?playerId="+e.PlayerId+"&id="+t,e}),e.AwayTeamDetails.Substitutes.map(function(e){return e.statsUrl=a.props.data.baseUrl+"mdc/playerprofile?playerId="+e.PlayerId+"&id="+t,e}),a.setState({data:e,isLoading:!1})},a.attachChannels=function(){var e=a.props.data.endpoints.find(function(e){return"lineup"===e.name}).channelId;a.Realtime.subscribe(e,a.props.data.realtimeKey,function(e){a.populateLineup(e.data)}),a.Realtime.subscribe(a.highlightsEndpoint.channelId,a.props.data.realtimeKey,function(e){console.log("LineupModule : subscribed highlights message: ",e.data),e.data&&a.handleHighlights(e.data,!0)})},a.state={data:{},highlights:[],highlightsToRemove:[],isLoading:!0},a.highlightsEndpoint=a.props.data.endpoints.find(function(e){return"highlights"===e.name}),a}return o(t,e),s(t,[{key:"componentDidMount",value:function(){this.Realtime=a(21),this.loadLineup(),this.attachChannels(),this.loadHighlights()}},{key:"render",value:function(){var e=this,t=this.state.data&&this.state.data.HomeTeamDetails&&this.state.data.HomeTeamDetails.StartingLineUp.length>0,a=this.state.data&&this.state.data.AwayTeamDetails&&this.state.data.AwayTeamDetails.StartingLineUp.length>0;return l.createElement("div",{className:"Lineup"},l.createElement("div",{className:"Lineup__wrapper"},l.createElement("h2",null,"Line-up"),(t||a)&&this.props.data.description&&l.createElement("p",null,this.props.data.description),t&&l.createElement("div",{className:"Lineup__column"},l.createElement("div",{className:"Lineup__header",tabIndex:"0"},l.createElement("div",{className:"Lineup__crest"},l.createElement("img",{src:this.props.data.baseUrl+this.state.data.HomeTeamDetails.CrestUrl,alt:"Crest logo"})),l.createElement("div",{className:"Lineup__title"},l.createElement("p",null,this.state.data.HomeTeamDetails.Name))),l.createElement("div",{className:"Lineup__group"},this.state.data.HomeTeamDetails.StartingLineUp.map(function(t,a){return l.createElement(u,{key:a,player:t,highlights:e.state.highlights})})),l.createElement("div",{className:"Lineup__group"},l.createElement("p",{className:"Lineup__subheader"},"Substitutes"),this.state.data.HomeTeamDetails.Substitutes.map(function(t,a){return l.createElement(u,{key:a,player:t,highlights:e.state.highlights})}))),a&&l.createElement("div",{className:"Lineup__column"},l.createElement("div",{className:"Lineup__header",tabIndex:"0"},l.createElement("div",{className:"Lineup__crest"},l.createElement("img",{src:this.props.data.baseUrl+this.state.data.AwayTeamDetails.CrestUrl,alt:"Crest logo"})),l.createElement("div",{className:"Lineup__title"},l.createElement("p",null,this.state.data.AwayTeamDetails.Name))),l.createElement("div",{className:"Lineup__group"},this.state.data.AwayTeamDetails.StartingLineUp.map(function(t,a){return l.createElement(u,{key:a,player:t,highlights:e.state.highlights})})),l.createElement("div",{className:"Lineup__group"},l.createElement("p",{className:"Lineup__subheader"},"Substitutes"),this.state.data.AwayTeamDetails.Substitutes.map(function(t,a){return l.createElement(u,{key:a,player:t,highlights:e.state.highlights})}))),this.state.isLoading&&l.createElement("img",{src:p,className:"spinner",alt:"Loading animation"}),!this.state.isLoading&&!t&&!a&&l.createElement("p",null,"Line-ups will show on this page in the build-up to kick-off.")))}}]),t}(l.Component);e.exports=m},function(e,t,a){function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=function(){function e(e,t){for(var a=0;a0&&void 0!==arguments[0])||arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e&&a.setState({isLoading:!0}),l.ajax({method:"GET",url:a.props.player.statsUrl}).done(function(e){var n=[];e.Stats.Heatmap.length>0&&(n=e.Stats.Heatmap.map(function(e){return{x:Math.round(e.X),y:100-e.Y}})),a.setState({heatmapData:n,isLoading:!1,allStats:e},function(){t&&a.playerStats.focus()})}).fail(function(){a.setState({isLoading:!1})})},a.getPlayerHighlights=function(e,t){var a=[];if(e)for(var n=0;n0&&a.highlightTypesAreEffectivelyTheSame(r[t],r[t-1])?s.createElement(s.Fragment,{key:t},", ",i,"'",n===f.Penalty?" (P)":""):s.createElement(s.Fragment,{key:t},a.renderHighlightIcon(n),i,"'",n===f.Penalty?" (P)":"")})}},{key:"render",value:function(){var e=this,t=!this.state.allStats.Position&&!this.state.allStats.Age&&(null===this.state.heatmapData||0===this.state.heatmapData.length),a=this.renderPlayerHighlights(this.state.highlights,this.props.player.PlayerId);return s.createElement("div",{className:"LineupPlayer"},s.createElement("div",{className:"LineupPlayer__header"+(this.state.isOpen?" open":""),onClick:this.handleOnClick,onKeyPress:this.handleOnClick,tabIndex:"0","aria-label":this.props.player.Name,"aria-haspopup":!0,"aria-expanded":!!this.state.isOpen,role:"button"},s.createElement("div",null,s.createElement("span",{className:"LineupPlayer__header--position"},1===this.props.player.Number.toString().length?"0"+this.props.player.Number:this.props.player.Number),s.createElement("span",{className:"LineupPlayer__header--name"},this.props.player.Name),s.createElement("span",{className:"event__highlights"},a))),s.createElement("div",{className:"LineupPlayer__content"+(this.state.isOpen?" open":""),onKeyDown:this.handleKeyDown,ref:function(t){e.playerStats=t}},this.state.isLoading?s.createElement("img",{src:h,className:"spinner",alt:"Loading..."}):s.createElement("div",null,this.state.allStats.Position&&s.createElement("p",{className:"LineupPlayer__info"},s.createElement("span",null,"Position:")," ",this.state.allStats.Position),this.state.allStats.Age&&s.createElement("p",{className:"LineupPlayer__info"},s.createElement("span",null,"Age:")," ",this.state.allStats.Age),null!==this.state.heatmapData&&this.state.heatmapData.length>0&&s.createElement("div",{className:"LineupPlayer__heatmap",ref:function(t){e.heatmap=t}},s.createElement(c,{max:5,data:this.state.heatmapData,unit:"percent"})),null!==this.state.heatmapData&&this.state.heatmapData.length>0&&s.createElement("div",{className:"LineupPlayer__labels"},s.createElement("span",{className:"LineupPlayer__labels--left"},"Defending"),s.createElement("span",{className:"LineupPlayer__labels--right"},"Attacking")),this.state.allStats&&"Defender"===this.state.allStats.Position&&s.createElement(u,this.state.allStats.Stats),this.state.allStats&&"Goalkeeper"===this.state.allStats.Position&&s.createElement(d,this.state.allStats.Stats),this.state.allStats&&"Midfielder"===this.state.allStats.Position&&s.createElement(p,this.state.allStats.Stats),this.state.allStats&&"Forward"===this.state.allStats.Position&&s.createElement(m,this.state.allStats.Stats),t&&s.createElement("p",{className:"LineupPlayer__error"},"No stats available"))))}}]),t}(s.Component);e.exports=y},function(e,t,a){function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=function(){function e(e,t){for(var a=0;a0&&s.createElement("div",{className:"LineupPlayer__stat"},s.createElement("p",{className:"LineupPlayer__stat--heading"},"Minutes Played"),s.createElement("p",{className:"LineupPlayer__stat--value"},this.props.MinutesPlayed)),!isNaN(this.props.GoalsScored)&&s.createElement("div",{className:"LineupPlayer__stat"},s.createElement("p",{className:"LineupPlayer__stat--heading"},"Goals Scored"),s.createElement("p",{className:"LineupPlayer__stat--value"},this.props.GoalsScored)),!isNaN(this.props.Assists)&&s.createElement("div",{className:"LineupPlayer__stat"},s.createElement("p",{className:"LineupPlayer__stat--heading"},"Assists"),s.createElement("p",{className:"LineupPlayer__stat--value"},this.props.Assists)),!isNaN(this.props.TotalPasses)&&s.createElement("div",{className:"LineupPlayer__stat"},s.createElement("p",{className:"LineupPlayer__stat--heading"},"Total Passes"),s.createElement("p",{className:"LineupPlayer__stat--value"},this.props.TotalPasses)),!isNaN(this.props.CompletedPasses)&&s.createElement("div",{className:"LineupPlayer__stat"},s.createElement("p",{className:"LineupPlayer__stat--heading"},"Completed Passes"),s.createElement("p",{className:"LineupPlayer__stat--value"},this.props.CompletedPasses)),!isNaN(this.props.Touches)&&s.createElement("div",{className:"LineupPlayer__stat"},s.createElement("p",{className:"LineupPlayer__stat--heading"},"Touches"),s.createElement("p",{className:"LineupPlayer__stat--value"},this.props.Touches)),!isNaN(this.props.YellowCards)&&!isNaN(this.props.RedCards)&&s.createElement("div",{className:"LineupPlayer__stat"},s.createElement("p",{className:"LineupPlayer__stat--heading"},"Cards"),s.createElement("p",{className:"LineupPlayer__stat--value"},s.createElement("span",{className:"yellowcard","aria-label":"Number of yellow cards"},this.props.YellowCards)," ",s.createElement("span",{className:"redcard","aria-label":"Number of red cards"},this.props.RedCards)))))}}]),t}(s.Component);e.exports=l},function(e,t,a){function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=function(){function e(e,t){for(var a=0;a0&&s.createElement("div",{className:"LineupPlayer__stat"},s.createElement("p",{className:"LineupPlayer__stat--heading"},"Minutes Played"),s.createElement("p",{className:"LineupPlayer__stat--value"},this.props.MinutesPlayed)),!isNaN(this.props.GoalsScored)&&s.createElement("div",{className:"LineupPlayer__stat"},s.createElement("p",{className:"LineupPlayer__stat--heading"},"Goals Scored"),s.createElement("p",{className:"LineupPlayer__stat--value"},this.props.GoalsScored)),!isNaN(this.props.Assists)&&s.createElement("div",{className:"LineupPlayer__stat"},s.createElement("p",{className:"LineupPlayer__stat--heading"},"Assists"),s.createElement("p",{className:"LineupPlayer__stat--value"},this.props.Assists)),!isNaN(this.props.ShotsTotal)&&s.createElement("div",{className:"LineupPlayer__stat"},s.createElement("p",{className:"LineupPlayer__stat--heading"},"Shots Total"),s.createElement("p",{className:"LineupPlayer__stat--value"},this.props.ShotsTotal)),!isNaN(this.props.ShotsOnTarget)&&s.createElement("div",{className:"LineupPlayer__stat"},s.createElement("p",{className:"LineupPlayer__stat--heading"},"Shots On Target"),s.createElement("p",{className:"LineupPlayer__stat--value"},this.props.ShotsOnTarget)),!isNaN(this.props.Touches)&&s.createElement("div",{className:"LineupPlayer__stat"},s.createElement("p",{className:"LineupPlayer__stat--heading"},"Touches"),s.createElement("p",{className:"LineupPlayer__stat--value"},this.props.Touches)),!isNaN(this.props.YellowCards)&&!isNaN(this.props.RedCards)&&s.createElement("div",{className:"LineupPlayer__stat"},s.createElement("p",{className:"LineupPlayer__stat--heading"},"Cards"),s.createElement("p",{className:"LineupPlayer__stat--value"},s.createElement("span",{className:"yellowcard","aria-label":"Number of yellow cards"},this.props.YellowCards)," ",s.createElement("span",{className:"redcard","aria-label":"Number of red cards"},this.props.RedCards)))))}}]),t}(s.Component);e.exports=l},function(e,t,a){function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=function(){function e(e,t){for(var a=0;a0){var t=e.results.pop(),a=(""!==t.HomeTeam.TeamCode?t.HomeTeam.TeamCode:t.HomeTeam.TeamName)+" "+t.HomeTeam.Score+" - "+t.AwayTeam.Score+" "+(""!==t.AwayTeam.TeamCode?t.AwayTeam.TeamCode:t.AwayTeam.TeamName);e.setState({latestResult:a,fadeInAndOut:!0}),console.log("Displaying: "+a),window.setTimeout(function(){e.setState({fadeInAndOut:!1})},5e3)}},1e4)},a.componentWillReceiveProps=function(e){a.props.results!==e.results&&(a.results=a.results.concat(e.results))},a.results=[],a.state={latestResult:"",fadeInAndOut:!1},a}return i(t,e),o(t,[{key:"render",value:function(){return s.createElement("p",{className:"LatestResult"+(this.state.fadeInAndOut?" fadeIn":"")},this.state.latestResult)}}]),t}(s.Component);e.exports=l},function(e,t,a){function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=function(){function e(e,t){for(var a=0;a0;)e.push(t.splice(0,3));for(var n=[],r=a.props.awayScorers.slice();r.length>0;)n.push(r.splice(0,3));for(;r.length>0;)n.push(r.splice(0,3));a.setState({homeScorers:e,awayScorers:n})},a.settings={dots:!1,infinite:!0,arrows:!1,speed:500,vertical:!0,slidesToShow:1,slidesToScroll:1,touchMove:!1,draggable:!1},a.state={homeScorers:[],awayScorers:[]},a}return i(t,e),o(t,[{key:"componentDidMount",value:function(){l=a(210).default,this.groupScorers(),setTimeout(function(){var e=document.querySelector(".slick-list");e&&"0px"===e.style.height&&window.dispatchEvent(new Event("resize"))},1e3)}},{key:"componentWillReceiveProps",value:function(e){e.homeScorers===this.props.homeScorers&&e.awayScorers===this.props.awayScorers||this.groupScorers()}},{key:"render",value:function(){return s.createElement("div",{className:"LatestScores"},s.createElement("div",{className:"LatestScores__goals--left"},l&&this.state.homeScorers.length>0&&s.createElement(l,Object.assign({},this.settings,{autoplay:this.state.homeScorers.length>1}),this.state.homeScorers.map(function(e,t){return s.createElement("div",{className:"LatestScores__group",key:t},s.createElement("div",{className:"LatestScores__innerwrapper"},e.map(function(e,t){return s.createElement("p",{key:t},e.Surname," (",e.GoalTimes+"'",")")})))}))),s.createElement("div",{className:"LatestScores__score"},s.createElement("div",{className:"wrapper"},s.createElement("div",{className:"LatestScores__score--left"},this.props.homeCrestUrl&&s.createElement("img",{src:c,"data-src":this.props.homeCrestUrl,alt:"Home team crest"}),s.createElement("div",{className:"LatestScores__name"},s.createElement("abbr",{title:this.props.homeName},this.props.homeShortName))),s.createElement("div",{className:"LatestScores__score--middle"},this.props.score&&s.createElement("p",{className:"score"},this.props.score),this.props.displayMinute&&s.createElement("p",null,this.props.displayMinute),this.props.aggregateScore&&s.createElement("p",null,"(Agg ",this.props.aggregateScore,")")),s.createElement("div",{className:"LatestScores__score--right"},this.props.awayCrestUrl&&s.createElement("img",{src:c,"data-src":this.props.awayCrestUrl,alt:"Away team crest"}),s.createElement("div",{className:"LatestScores__name"},s.createElement("abbr",{title:this.props.awayName},this.props.awayShortName))))),s.createElement("div",{className:"LatestScores__goals--right"},l&&this.state.awayScorers.length>0&&s.createElement(l,Object.assign({},this.settings,{autoplay:this.state.awayScorers.length>1}),this.state.awayScorers.map(function(e,t){return s.createElement("div",{className:"LatestScores__group",key:t},s.createElement("div",{className:"LatestScores__innerwrapper"},e.map(function(e,t){return s.createElement("p",{key:t},e.Surname," (",e.GoalTimes+"'",")")})))}))))}}]),t}(s.Component);e.exports=u},function(e,t,a){function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=function(){function e(e,t){for(var a=0;a0&&a.setState({tables:e.LeagueTable.Tables,timestamp:e.LeagueTable.LeagueTableTimestamp}),e.Results&&e.Results.length>0&&a.setState({results:e.Results}),a.setState({isLoading:!1})},a.Realtime=null,a.state={tables:[],results:[],isLoading:!0,updated:""},a}return i(t,e),o(t,[{key:"componentDidMount",value:function(){this.Realtime=a(21),this.loadData(),this.attachChannels()}},{key:"attachChannels",value:function(){var e=this,t=this.props.data.endpoints.find(function(e){return"leagueTable"===e.name}).channelId;this.Realtime.subscribe(t,this.props.data.realtimeKey,function(t){e.populateData(t.data)})}},{key:"render",value:function(){var e=this;return s.createElement("div",{className:"LiveResults"},this.state.isLoading&&s.createElement("img",{src:c,className:"spinner",alt:"Loading animation"}),!this.state.isLoading&&0===this.state.results.length&&0===this.state.tables.length&&s.createElement("p",null,"No live results are available"),this.state.results.length>0&&s.createElement(p,{results:this.state.results}),!this.state.isLoading&&this.state.tables.length>0&&s.createElement("h2",{className:"LiveResults__header"},"League Table"),this.state.tables.length>0&&this.state.tables.map(function(t,a){return s.createElement(u,{key:a,table:t,siteTeamOptaId:e.props.data.siteTeamOptaId,baseUrl:e.props.data.baseUrl,updated:e.state.tables.LeagueTableTimestamp})}),this.state.tables&&this.state.timestamp&&s.createElement("p",null,"As of: ",this.state.timestamp))}}]),t}(s.Component);e.exports=m},function(e,t,a){function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=function(){function e(e,t){for(var a=0;a0&&(t.data.forEach(function(e,t){e.EntityId=e.Id.split("-").reverse()[0]}),e.updateItem(t.data))})}},{key:"render",value:function(){return l.createElement("div",{className:"SocialTab"},!this.state.isLoading&&this.state.initialDataPaged.length>0&&l.createElement("div",{className:"SocialTab__title"},l.createElement("h2",null,"Social Media"),l.createElement("p",null,"Find the latest Twitter trends.")),l.createElement("div",{className:"SocialTab__wrapper"},this.state.newData.length>0&&this.state.newData.map(function(e,t){return l.createElement(u,{data:e,key:e.EntityId})})),l.createElement("div",{className:"SocialTab__wrapper"},this.state.initialDataPaged.length>0&&this.state.initialDataPaged.map(function(e,t){return l.createElement(u,{data:e,key:e.EntityId})})),this.state.isMore&&l.createElement(p,{handle:this.handleLoadMore,caption:"Show more",context:"social content"}),this.state.isLoading&&l.createElement("img",{src:m,className:"spinner",alt:"Loading..."}),!this.state.isLoading&&0===this.state.initialDataPaged.length&&l.createElement("p",null,"No Social data is available"))}}]),t}(l.Component);e.exports=d},function(e,t,a){function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=function(){function e(e,t){for(var a=0;a=this.logosWidth&&this.isCarouselInitialised&&this.$scroller.slick("unslick")}},{key:"componentDidMount",value:function(){var e=this;a(54),this.$scroller=l(this.scroller);var t=c(function(){e.toggleCarousel()},1e3,{leading:!1,trailing:!0});l(window).on("load",function(){e.logosWidth=e.$scroller.find(".SponsorsMdc__sponsors__logo").toArray().reduce(function(e,t){return e+l(t).outerWidth()},0),t()}),l(window).resize(function(){t()})}},{key:"shouldComponentUpdate",value:function(){return!1}},{key:"render",value:function(){var e=this;return s.createElement("div",{className:"SponsorsMdc"},s.createElement("div",{className:"SponsorsMdc__title"},this.props.data.sponsorsLabel),s.createElement("div",{className:"SponsorsMdc__sponsors"},s.createElement("div",{className:"SponsorsMdc__sponsors__container",ref:function(t){e.scroller=t}},this.props.data.sponsors.map(function(e,t){var a=null!=e.link?s.createElement("a",{href:e.link.url,target:e.link.newWindow?"_blank":"_self",rel:e.link.newWindow?"noopener noreferrer":void 0},s.createElement("img",{src:u,"data-src":e.image.smallUrl,alt:e.image.altText})):s.createElement("img",{src:u,"data-src":e.image.smallUrl,alt:e.image.altText});return s.createElement("div",{className:"SponsorsMdc__sponsors__logo",key:t},a)}))))}}]),t}(s.Component);e.exports=p},function(e,t,a){function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=function(){function e(e,t){for(var a=0;a1?(t=this.props.event.group.some(function(e){return"goal"===e.type.toLowerCase()})?" Event__group-with-goal":" Event__group",t=t.concat(this.props.selectEvent&&this.props.event.group.some(function(t){return t.id===e.props.selectedEvent})?" white":"")):(t=" Event__"+this.props.event.group[0].type.toLowerCase(),t=t.concat(this.props.selectEvent&&this.props.event.id===this.props.selectedEvent?" white":"")),t=t.concat(this.props.event.group[0].isHome?" home":" away"),this.props.event.group.length>1?s.createElement("button",{className:"Event"+t,onClick:this.handleClick,style:{left:this.props.event.position}},this.props.event.group.length):s.createElement("button",{className:"Event"+t,onClick:this.handleClick,style:{left:this.props.event.group[0].position}})}}]),t}(s.Component);e.exports=l},function(e,t,a){function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=function(){function e(e,t){for(var a=0;aa.state.selectedEventIndex&&n<=t&&(e.read=!0),e});a.setState({selectedEventIndex:t,events:n,notifications:n.filter(function(e){return!1===e.read}).length})}},a.initialLoad=function(e,t){var n=e.map(function(e,t){return e.read=!0,e});a.setState({showSelf:!0,selectedEventIndex:t?e.findIndex(function(e){return e.Id===t}):0,events:n,notifications:0})},a.handleSliderAfterChange=function(e){a.props.selectedEventChanged(a.state.events[e].Id);var t=a.state.events.slice();t[e].read=!0,a.setState({events:t,notifications:t.filter(function(e){return!1===e.read}).length})},a.toggleKeyMoments=function(){var e=a.state.showSelf;if(a.setState({showSelf:!a.state.showSelf}),e)a.props.unselectEvents();else{var t=a.state.events[a.state.selectedEventIndex].Id;a.props.selectedEventChanged(t)}},a.generateBackground=function(){if(a.state.events.length>0){var e=a.state.events[a.state.selectedEventIndex];if(e){if("Goal"===e.Type)return" KeyMoments--goal";if("Substitution"===e.Type)return" KeyMoments--substitution";if("Booking"===e.Type&&"YellowCard"===e.CardType)return" KeyMoments--yellowcard";if("Booking"===e.Type&&"RedCard"===e.CardType)return" KeyMoments--redcard";if("Booking"===e.Type&&"YellowRedCard"===e.CardType)return" KeyMoments--yellowredcard"}}return""},a.state={events:[],showSelf:!1,notifications:0,selectedEventIndex:0},a.settings={dots:!1,infinite:!1,arrows:!0,speed:500,autoplay:!1,slidesToShow:1,slidesToScroll:1,draggable:!0,waitForAnimate:!0},a}return i(t,e),o(t,[{key:"componentDidMount",value:function(){l=a(210).default,this.props.events.length>0&&this.initialLoad(this.props.events,this.props.selectedEventId)}},{key:"componentWillReceiveProps",value:function(e){var t=this;if(this.props.events!==e.events)if(0===this.state.events.length)this.initialLoad(e.events,e.events.length>0?e.events[e.events.length-1].Id:void 0);else{var a=e.events.map(function(e,a){return a>t.state.selectedEventIndex&&-1===t.state.events.findIndex(function(t){return t.Id===e.Id})&&(e.read=!1),e});this.setState({events:a,notifications:a.filter(function(e){return!1===e.read}).length})}this.props.selectedEventId!==e.selectedEventId&&this.setState({showSelf:!0},function(){t.eventChanged(e.selectedEventId)})}},{key:"render",value:function(){var e=this;return s.createElement("div",{className:"KeyMoments"+(this.state.showSelf?this.generateBackground():"")},this.state.events.length>0?s.createElement("button",{className:"KeyMoments__button KeyMoments__button--toggle"+(this.state.showSelf?" is-open":""),onClick:this.toggleKeyMoments},this.state.showSelf?"Close Key Moments":"Open Key Moments"):s.createElement("button",{className:"KeyMoments__button KeyMoments__button--noarrow"},"Key moments will appear here"),this.state.showSelf&&this.state.events.length>0&&s.createElement("div",null,s.createElement(l,Object.assign({ref:function(t){e.slider=t}},this.settings,{initialSlide:this.state.selectedEventIndex,afterChange:this.handleSliderAfterChange}),this.state.events.map(function(t,a){var n=t.IsHomeTeam?e.props.homeCrestUrl:e.props.awayCrestUrl;return s.createElement("div",{key:a}," ",s.createElement(c,{tabIndex:e.state.selectedEventIndex===a?"0":"-1",event:t,crestUrl:n}))})),this.state.notifications>0&&s.createElement("div",{className:"KeyMoments__notifications"},s.createElement("span",null,this.state.notifications)," ",s.createElement("span",null,"new moments"))))}}]),t}(s.Component);e.exports=u},function(e,t,a){function n(e){if(Array.isArray(e)){for(var t=0,a=Array(e.length);ta.state.totalWidth?a.state.totalWidth:n},a.updateProgressBar=function(e){a.setState({progressWidth:a.getProgressWidth(e),isFullTime:e.isFullTime,minute:e.minute},function(){return a.placeEvents(e)})},a.handleEventClick=function(e){a.props.selectedEventChanged(e.id)},a.pointHalfWidth=10,a.timePointsNew={base:[{display:"0",position:0,offset:a.pointHalfWidth},{display:"15",position:0},{display:"30",position:0},{display:"HT",position:0},{display:"60",position:0},{display:"75",position:0}],normalPen:[{display:"90",position:0},{display:"Pen",position:0}],extra:[{display:"90",position:0},{display:"105",position:0}],extraPen:[{display:"90",position:0},{display:"105",position:0},{display:"120",position:0},{display:"Pen",position:0}],end:[{display:"FT",position:0,offset:0-a.pointHalfWidth}]},a.state={minute:0,progressWidth:0,showTimeScale:!1,timePoints:[],groupedEvents:[],totalTime:90,timeScaleNew:0,timePointsNew:[].concat(n(a.timePointsNew.base),n(a.timePointsNew.end))},a}return o(t,e),s(t,[{key:"componentDidMount",value:function(){var e=this;window.addEventListener("resize",this.resizeTimescale.bind(this)),c(document).ready(function(){e.resizeTimescale()})}},{key:"componentWillReceiveProps",value:function(e){this.setTimescalePos(e),this.props.events!==e.events&&this.placeEvents(e)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.resizeTimescale)}},{key:"resizeTimescale",value:function(e){this.setTimescalePos(this.props),this.placeEvents(this.props)}},{key:"placeEvents",value:function(e){var t=this,a=e.events.filter(function(e){return e.IsHomeTeam}),n=e.events.filter(function(e){return!e.IsHomeTeam}),r=[],i=[];a.forEach(function(a){r.push(t.evaluatePosition(a,e))}),n.forEach(function(a){i.push(t.evaluatePosition(a,e))}),r.length>0&&(r=this.groupEvents(r)),i.length>0&&(i=this.groupEvents(i)),this.setState({groupedEvents:r.concat(i)})}},{key:"groupEvents",value:function(e){for(var t=[],a=0;ae[a].position){var n=t[t.length-1];n.group.push(e[a]),n.position=(e[a].position-n.group[0].position)/2+n.group[0].position}else t.push({position:e[a].position,id:e[a].id,group:[e[a]]});else t.push({position:e[a].position,id:e[a].id,group:[e[a]]});return t}},{key:"evaluatePosition",value:function(e,t){var a="Booking"===e.HighlightType?e.CardType:e.HighlightType,n=e.Minute*this.state.timeScaleNew-17.5;return{type:a,position:n>=this.state.totalWidth-35?this.state.totalWidth-35:n,id:e.Id,isHome:e.IsHomeTeam,outcome:e.Outcome,period:e.Period,isShootOut:t.isShootOut}}},{key:"render",value:function(){var e=this;return l.createElement("div",{className:"Progress"},l.createElement("div",{className:"Progress__wrapper"},l.createElement("div",{className:"Progress__timescale"},this.state.showTimeScale&&this.state.timePointsNew.map(function(e,t){return l.createElement(u,{key:t,display:e.display,position:e.position})})),l.createElement("div",{className:"Progress__timeline",id:"js-timeline",ref:function(t){return e.timeline=t}},l.createElement("div",{className:"Progress__bar",style:{width:this.state.progressWidth}},l.createElement("div",{className:"Progress__events"},this.state.groupedEvents.length>0&&this.state.groupedEvents.map(function(e,t){return l.createElement(m,{key:t,position:e.position})}),this.state.groupedEvents.length>0&&this.state.groupedEvents.map(function(t,a){return l.createElement(p,{key:a,selectEvent:e.props.selectEvent,selectedEvent:e.props.selectedEventId,onEventClick:e.handleEventClick,event:t})})))),l.createElement("div",{className:"Progress__separator"},l.createElement("div",{className:"Progress__line",style:{width:this.state.progressWidth}}))))}}]),t}(l.Component);e.exports=d},function(e,t,a){function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=function(){function e(e,t){for(var a=0;a=120||e.ShowExtraTime&&/Extra(First|Second)Half/.test(e.Period)},a.populateMatchDetails=function(e){"None"!==e.Period&&a.setState({minute:e.Minutes,showExtraTime:a.isExtraTime(e),isFullTime:a.isFullTime(e),isShootOut:a.isShootOut(e),homeTeamShortName:e.Home.ShortName,awayTeamShortName:e.Away.ShortName,homeTeamName:e.Home.Name,awayTeamName:e.Away.Name})},a.selectedEventChangedHandler=function(e){a.setState({selectedEventId:e,selectEvent:!0})},a.unselectEventsHandler=function(){a.setState({selectEvent:!1})},a.splitQueryPair=function(e){return e.split("=")},a.getQueryValue=function(e){return decodeURIComponent(a.splitQueryPair(e)[1])},a.getQueryVariable=function(e){return a.ifIsSomething(a.getQueryValue,window.location.search.slice(1).split("&").filter(function(t){return t.split("=")[0]===e})[0])},a.skipTimelineHandler=function(){document.querySelector(".KeyMoments .slick-active .Slide").focus()},a.selectEventById=function(e){a.setState({selectedEventId:e})},a.state={showSelf:!1,showExtraTime:!1,isShootOut:!1,minute:null,awayCrestUrl:"",homeCrestUrl:"",selectEvent:!0,eventsList:[]},a.highlightsEndpoint=a.props.data.endpoints.find(function(e){return"highlights"===e.name}),a.detailsEndpoint=a.props.data.endpoints.find(function(e){return"matchDetails"===e.name}),a.Realtime=null,u.subscribe("StartMdc",a.startMdc),a}return o(t,e),s(t,[{key:"attachChannels",value:function(){var e=this;this.Realtime.subscribe(this.detailsEndpoint.channelId,this.props.data.realtimeKey,function(t){e.ifIsSomething(e.populateMatchDetails,t.data)}),this.Realtime.subscribe(this.highlightsEndpoint.channelId,this.props.data.realtimeKey,function(t){e.ifIsSomething(e.handleHighlights,t.data)})}},{key:"componentDidMount",value:function(){this.ifIsSomething(this.selectEventById,this.getQueryVariable("keymoment")),this.Realtime=a(21),this.loadMatchDetails(),this.loadHighlights(),this.attachChannels()}},{key:"componentDidUpdate",value:function(){this.vibrate&&window.navigator.vibrate&&(window.navigator.vibrate([200,30,200,30,200]),this.vibrate=!1)}},{key:"render",value:function(){return l.createElement("div",{className:"Timeline"},this.state.showSelf&&l.createElement("div",{className:"Timeline__wrapper"},l.createElement("button",{className:"Timeline__skip",onClick:this.skipTimelineHandler,type:"button"},"Skip timeline"),l.createElement("div",{className:"Timeline__teams"},l.createElement("div",{className:"Timeline__background"}),l.createElement("div",{className:"Timeline__detail"},this.state.homeTeamShortName&&l.createElement("p",null,l.createElement("abbr",{title:this.state.homeTeamName},this.state.homeTeamShortName)),l.createElement("div",{className:"Timeline__separator"}),this.state.awayTeamShortName&&l.createElement("p",null,l.createElement("abbr",{title:this.state.awayTeamName},this.state.awayTeamShortName)))),l.createElement(p,{selectEvent:this.state.selectEvent,selectedEventId:this.state.selectedEventId,selectedEventChanged:this.selectedEventChangedHandler,events:this.state.eventsList,showExtraTime:this.state.showExtraTime,isShootOut:this.state.isShootOut,isFullTime:this.state.isFullTime,minute:this.state.minute}),l.createElement(m,{selectedEventId:this.state.selectedEventId,unselectEvents:this.unselectEventsHandler,selectedEventChanged:this.selectedEventChangedHandler,events:this.state.eventsList,awayCrestUrl:this.state.awayCrestUrl,homeCrestUrl:this.state.homeCrestUrl})))}}]),t}(l.Component);e.exports=d},function(e,t,a){function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=function(){function e(e,t){for(var a=0;a0?s.createElement(s.Fragment,null,s.createElement("div",{className:"country-select__wrapper"},s.createElement("span",{className:"country-select--title"},"Spurs on TV"),s.createElement("div",{className:"country-select--select-wrapper"},s.createElement("select",{className:"country-select--select",onChange:function(t){return e.change(t)},value:this.state.selectedCountry},this.state.countries.map(function(e){return s.createElement("option",{key:e.Country,value:e.Country},e.Name)}),";"),s.createElement("div",{className:"clearfix"}))),s.createElement("div",{className:"match-table__container"},s.createElement("table",null,s.createElement("thead",null,s.createElement("tr",null,s.createElement("th",{className:"LeagueTable__cell"},"Date"),s.createElement("th",{className:"LeagueTable__cell"},"Competition"),s.createElement("th",{className:"LeagueTable__cell"},"Opposition"),s.createElement("th",{className:"LeagueTable__cell hide"},"Venue"),s.createElement("th",{className:"LeagueTable__cell"},"KO ",s.createElement("span",{className:"no-mobile"},"Time")),s.createElement("th",{className:"LeagueTable__cell"},"Channel"))),s.createElement("tbody",null,this.state.match.map(function(t,a){return s.createElement("tr",{className:"LeagueTable__row",key:a},s.createElement("td",{className:"LeagueTable__cell"},t.KickoffDate),s.createElement("td",{className:"LeagueTable__cell"},t.Competition),s.createElement("td",{className:"LeagueTable__cell"},t.Game),s.createElement("td",{className:"LeagueTable__cell hide"},"Away"),s.createElement("td",{className:"LeagueTable__cell "},t.KickoffTime),s.createElement("td",{className:"LeagueTable__cell "},t.Channels.filter(function(t){return t.Country===e.state.selectedCountry}).map(function(e,t){return s.createElement("span",{key:t},e.Name)})))}))))):s.createElement("div",null)}}]),t}(s.Component);e.exports=l},function(e,t,a){function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=function(){function e(e,t){for(var a=0;a0&&s.createElement("p",null,this.props.memberships.name),e)}}]),t}(s.Component);e.exports=c},function(e,t,a){function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=function(){function e(e,t){for(var a=0;a0&&s.createElement("h2",null,this.props.data.title),this.props.data.memberships&&this.props.data.memberships.map(function(e,t){return s.createElement(l,{memberships:e,key:t})}))}}]),t}(s.Component);e.exports=c},function(e,t,a){function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=function(){function e(e,t){for(var a=0;a6){var t=this.state.tabs.slice(5,this.state.tabs.length),a=this.state.tabs.slice(0,5);this.setState(Object.assign({},this.state,{links:a,moreLinks:t,mobileLinks:e}))}else{var n=this.state.tabs.slice();this.setState(Object.assign({},this.state,{links:n,mobileLinks:e}))}}},{key:"resizeMobileBar",value:function(){var e=0,t=l(window).width();l(this.mobileBar).children().each(function(t,a){e+=l(a).width()}),l(this.mobileBar).width(e0&&this.state.mobileLinks.map(function(t,a){return s.createElement("div",{className:t.isSelected?"InPageTabsBar__item in-tab-selected":"InPageTabsBar__item",key:a},s.createElement("a",{onClick:function(t){return e.props.handleClick(t,a)},href:t.url,target:t.newWindow?"_blank":"_self",rel:t.newWindow?"noopener noreferrer":void 0,className:"InPageTabsBar__item__sub"+(t.hasIndicator?" InPageTabsBar__item__sub--indicator":"")},t.caption))})),s.createElement("div",{className:this.state.tabs.length>5?"InPageTabsBar--desktop":"InPageTabsBar--desktop short",role:"list"},this.state.links&&this.state.links.length>0&&this.state.links.map(function(t,a){return s.createElement("div",{className:t.isSelected?"InPageTabsBar__item in-tab-selected":"InPageTabsBar__item",key:a,role:"listitem"},s.createElement("a",{onClick:function(t){return e.props.handleClick(t,a)},onKeyDown:function(t){return e.asyncKeydownHandler(t,a)},href:t.url,target:t.newWindow?"_blank":"_self",rel:t.newWindow?"noopener noreferrer":void 0,className:"InPageTabsBar__item__sub"+(t.hasIndicator?" InPageTabsBar__item__sub--indicator":"")},t.caption))}),this.state.moreLinks&&s.createElement("div",{onClick:this.toggleMenu,className:"InPageTabsBar__item InPageTabsBar__handle"+(this.state.isDropdownOpen?" is-open":""),key:"DesktopHandle",role:"listitem","aria-haspopup":"true"},s.createElement("button",{className:"InPageTabsBar__item__sub"+(this.state.moreLinks.find(function(e){return e.isSelected})?" in-tab-selected":""),"aria-expanded":this.state.isDropdownOpen,ref:function(t){return e.moreButton=t}},"More"),s.createElement("div",{className:"InPageTabsBar__dropdown"+(this.state.isDropdownOpen?" is-open":""),role:"list",onKeyDown:this.handleEscClose},this.state.moreLinks.map(function(t,a){return s.createElement("div",{className:t.isSelected?"InPageTabsBar__item in-tab-selected":"InPageTabsBar__item",key:a,role:"listitem"},s.createElement("a",{onClick:function(t){return e.props.handleClick(t,e.state.tabs.indexOf(e.state.moreLinks[a]))},onKeyDown:function(t){return e.asyncKeydownHandler(t,e.state.tabs.indexOf(e.state.moreLinks[a]))},href:t.url,target:t.newWindow?"_blank":"_self",rel:t.newWindow?"noopener noreferrer":void 0,tabIndex:"0",className:"InPageTabsBar__item__sub"+(t.hasIndicator?" InPageTabsBar__item__sub--indicator":"")},t.caption))})))))}}]),t}(s.Component);e.exports=c},function(e,t,a){function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=function(){function e(e,t){for(var a=0;a0&&this.state.tabs.map(function(e,t){return s.createElement("div",{className:"InPageTabs__async",key:t,style:{display:e.isSelected?"block":"none"}},e.isLoaded&&s.createElement("div",{className:"InPageTabs__async__content",tabIndex:"0"},e.modules.length>0&&e.modules.map(function(t,a){return s.createElement(window.Components[t.name],{key:a,data:t.data,tabId:e.tabId})})))}))}}]),t}(s.Component);e.exports=u},function(e,t,a){function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=function(){function e(e,t){for(var a=0;a0)for(var r=0;r5){var t=this.state.links.slice(4,this.state.links.length),a=this.state.links.slice(0,4);this.setState({links:a,moreLinks:t,mobileLinks:e})}else this.setState({links:e,mobileLinks:e})}},{key:"componentDidMount",value:function(){var e=this;l(this.subNav),a(20).emitter.on("hide",function(){e.setState({isDropdownOpen:!1})}),"undefined"!==typeof window&&window.location.hash&&(this.subNav.classList.add("sneakpeek--hidden"),this.setState({isDropdownOpen:!1}))}},{key:"render",value:function(){var e=this,t=void 0;return this.props.showLogoPoppy&&(t=s.createElement("img",{src:d,className:"SubNavigationBar__crest__holiday",alt:""})),s.createElement("div",{id:"sub-nav",className:"SubNavigationBar"+function(){return 0===e.state.links.length?" no-links":""}(),ref:function(t){e.subNav=t},role:"menubar"},s.createElement("a",{className:"SubNavigationBar__crest",href:"/",role:"menuitem"},s.createElement("img",{src:m,alt:"Navigate to home"}),t),s.createElement("div",{className:"SubNavigationBar--mobile"},s.createElement("div",{"aria-hidden":!0,className:"SubNavigationBar__header",onClick:this.toggleMenu,role:"menuitem"},s.createElement("div",{className:this.state.mobileLinks.some(function(e){return!0===e.isSelected})?"SubNavigationBar__item in-sub-selected":"SubNavigationBar__item",onClick:this.toggleMenu},""!==this.state.parentLink.caption&&s.createElement("span",{className:"SubNavigationBar__item__main"},this.state.parentLink.caption," ",this.state.mobileLinks.length>0&&s.createElement("img",{src:u,alt:"","aria-hidden":!0})),this.state.mobileLinks.length>0&&this.state.mobileLinks.find(function(e){return e.isSelected})&&s.createElement("span",{className:"SubNavigationBar__item__sub"},this.state.mobileLinks.find(function(e){return e.isSelected}).caption," ",s.createElement("img",{src:p,alt:"","aria-hidden":!0})))),s.createElement("div",{"aria-hidden":!0,className:"SubNavigationBar__dropdown"+(this.state.isDropdownOpen?" is-open":""),role:"menuitem"},this.state.mobileLinks.length>0&&this.state.parentLink.url&&s.createElement("div",{className:this.state.parentLink.isSelected?"SubNavigationBar__item is-parent in-sub-selected":"SubNavigationBar__item is-parent"},s.createElement("a",{href:this.state.parentLink.url,className:"SubNavigationBar__item__sub"},this.state.parentLink.caption)),this.state.mobileLinks.length>0&&this.state.mobileLinks.map(function(e,t){return s.createElement("div",{className:e.isSelected?"SubNavigationBar__item in-sub-selected":"SubNavigationBar__item",key:t},s.createElement("a",{href:e.url,target:e.newWindow?"_blank":"_self",rel:e.newWindow?"noreferrer noopener":void 0,className:"SubNavigationBar__item__sub"},e.caption))}))),this.state.links.length>0&&s.createElement("div",{className:"SubNavigationBar--desktop",role:"list"},""!==this.state.parentLink.caption&&s.createElement("div",{className:this.state.parentLink.isSelected?"SubNavigationBar__item is-parent in-sub-selected":"SubNavigationBar__item is-parent",role:"listitem"},this.state.parentLink.url?s.createElement("a",{href:this.state.parentLink.url,className:"SubNavigationBar__item__sub"},this.state.parentLink.caption):s.createElement("span",{className:"SubNavigationBar__item__sub"},this.state.parentLink.caption)),this.state.links.length>0&&this.state.links.map(function(e,t){return s.createElement("div",{className:e.isSelected?"SubNavigationBar__item in-sub-selected":"SubNavigationBar__item",key:t,role:"listitem"},s.createElement("a",{href:e.url,target:e.newWindow?"_blank":"_self",rel:e.newWindow?"noreferrer noopener":void 0,className:"SubNavigationBar__item__sub"},e.caption))}),this.state.moreLinks&&s.createElement("div",{onClick:this.toggleMenu,className:"SubNavigationBar__item SubNavigationBar__handle"+(this.state.isDropdownOpen?" is-open":""),key:"DesktopHandle",role:"listitem","aria-haspopup":"true",onKeyDown:this.handleEscClose},s.createElement("button",{href:"#",className:"SubNavigationBar__item__sub"+(this.state.moreLinks.find(function(e){return e.isSelected})?" in-sub-selected":""),"aria-expanded":this.state.isDropdownOpen,ref:function(t){return e.moreButton=t}},"More"),s.createElement("div",{className:"SubNavigationBar__dropdown"+(this.state.isDropdownOpen?" is-open":""),role:"list"},this.state.moreLinks.map(function(e,t){return s.createElement("div",{className:e.isSelected?"SubNavigationBar__item in-sub-selected":"SubNavigationBar__item",key:t,role:"listitem"},s.createElement("a",{href:e.url,target:e.newWindow?"_blank":"_self",rel:e.newWindow?"noreferrer noopener":void 0,className:"SubNavigationBar__item__sub"},e.caption))})))),s.createElement(c,null))}}]),t}(s.Component);e.exports=h},function(e,t,a){function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=function(){function e(e,t){for(var a=0;aa-3e5?e.up_to_5_mins.links.push(r):t>a-9e5?e.up_to_15_mins.links.push(r):t>a-18e5?e.up_to_30_mins.links.push(r):t>a-36e5?e.up_to_1_hour.links.push(r):t>a-72e5?e.up_to_2_hours.links.push(r):t>a-144e5?e.up_to_4_hours.links.push(r):t>a-216e5?e.up_to_6_hours.links.push(r):t>a-288e5?e.up_to_8_hours.links.push(r):t>n.getTime()?e.earlier_today.links.push(r):e.yesterday.links.push(r),e},{up_to_5_mins:{title:"NEW in the last 5 minutes",links:[]},up_to_15_mins:{title:"5 to 15 minutes old",links:[]},up_to_30_mins:{title:"15 to 30 minutes old",links:[]},up_to_1_hour:{title:"30 minutes to 1 hour old",links:[]},up_to_2_hours:{title:"1 to 2 hours old",links:[]},up_to_4_hours:{title:"2 to 4 hours old",links:[]},up_to_6_hours:{title:"4 to 6 hours old",links:[]},up_to_8_hours:{title:"6 to 8 hours old",links:[]},earlier_today:{title:"Earlier Today",links:[]},yesterday:{title:"Yesterday",links:[]}})}},{key:"componentDidMount",value:function(){var e=this;setInterval(function(){l.ajax({url:e.state.updateUrl}).done(function(t){e.setState({updateUrl:t.updateUrl,groups:e.groupNews(t.newsArticles)},window.LazyLoad.concat)})},3e5)}},{key:"render",value:function(){var e=this,t=1;return s.createElement("div",{className:"NewsNow"},c(this.state.groups,function(a,n){if(a.links.length>0){var r=e.state.modules.filter(function(e){return e.groupPosition===t});return t++,s.createElement("div",{key:n},s.createElement("div",{className:"NewsNow__container"},s.createElement("div",{className:"NewsNow__group"},s.createElement("h3",null,a.title),a.links.map(function(t,a){return s.createElement("div",{className:"NewsNow__link",key:a},s.createElement("div",{className:"NewsNow__flag"},s.createElement("img",{src:m,"data-src":t.countryIso.length?e.props.data.baseUrl+"/static/media/flags/4x3/"+t.countryIso+".svg":p,alt:t.countryIso})),s.createElement("div",{className:"NewsNow__link__text"},s.createElement("a",{href:t.link,"aria-label":t.title,target:"blank",rel:"noreferrer noopener"},t.title),s.createElement("span",null,t.source," ",u(t.publishDate,"HH:MM:ss"))))}))),r&&r.map(function(e,t){return s.createElement(window.Components[e.name],{data:e.data,key:t})}))}}),this.state.modules.map(function(e,a){return e.groupPosition>=t&&s.createElement(window.Components[e.name],{key:a,data:e.data})}))}}]),t}(s.Component);e.exports=d},function(e,t,a){function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=function(){function e(e,t){for(var a=0;a3?" c-pagination--busy":""),"aria-label":"Pagination Navigation"},this.props.data.page>1&&l.createElement("p",{className:"c-pagination__prev"},l.createElement("button",{type:"button",className:"c-pagination__prev__button",onClick:this.handleClick.bind(this,this.props.data.page-2)},l.createElement(c,{name:"arrowLeft",width:16.531,height:13.838}),l.createElement("span",{className:"u-visually-hidden"},"Navigate to page ",this.props.data.page-1))),l.createElement("ul",{className:"c-pagination__list"},[].concat(n(Array(this.props.data.pages))).map(function(t,a){return l.createElement("li",{className:"c-pagination__item"+(a+1===e.props.data.page?" c-pagination__item--active":""),key:a},a+1===e.props.data.page?l.createElement("span",{className:"c-pagination__active"},l.createElement("span",{className:"u-visually-hidden"},"Viewing page "),l.createElement("span",{"aria-current":"true"},a+1)):l.createElement("button",{type:"button",onClick:e.handleClick.bind(e,a),className:"c-pagination__button"},l.createElement("span",{className:"u-visually-hidden"},"Navigate to page "),a+1))})),this.props.data.page0?this.props.playerNumber:""),s.createElement("div",{className:"PlayersPlayer__name"},this.props.fullName),this.props.playerShowPosition&&s.createElement("div",{className:"PlayersPlayer__position"},this.props.playerPosition),s.createElement("div",{className:"PlayersPlayer__country"},this.props.playerPlaceOfBirth)))}}]),t}(s.Component);e.exports=u},function(e,t,a){function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=function(){function e(e,t){for(var a=0;a0?a.setState({relatedContent:a.state.relatedContent.concat(e.relatedContent),showMoreLink:e.showMoreLink,isLoadingMore:!1},function(){window.LazyLoad.concat(),window.AppUrlModifier&&window.AppUrlModifier.append()}):a.setState({showMoreLink:null,isLoadingMore:!1})}).fail(function(){a.setState({showMoreLink:null,isLoadingMore:!1})})},a.state={isLoadingMore:!1},a.img=[],a.bg=[],a}return i(t,e),o(t,[{key:"componentWillMount",value:function(){this.setState(this.props.data)}},{key:"render",value:function(){return s.createElement("div",{className:"RelatedStories"},s.createElement("div",{className:"RelatedStories__background"},s.createElement("div",{className:"RelatedStories__chevron"},s.createElement("div",{className:"RelatedStories__triangle--left"},s.createElement("img",{src:m,alt:""})),s.createElement("div",{className:"RelatedStories__triangle--right"},s.createElement("img",{src:m,alt:""}))),s.createElement("div",{className:"RelatedStories__colour"})),s.createElement(c,{heading:this.state.heading}),s.createElement("div",{className:"RelatedStories__container"},this.state.relatedContent.map(function(e,t){return s.createElement(u,Object.assign({key:t},e))})),!this.state.isLoadingMore&&this.state.showMoreLink&&s.createElement(p,{handle:this.loadMore,caption:this.state.showMoreLink.caption,context:"related stories"}),this.state.isLoadingMore&&s.createElement("img",{src:d,className:"spinner",alt:"Loading animation"}))}}]),t}(s.Component);e.exports=h},function(e,t,a){function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=function(){function e(e,t){for(var a=0;a0?a.setState({results:e.searchResults.results,totalResults:e.searchResults.totalResults,sortOptions:e.searchResults.sortOptions,isLoadingResults:!1,loadMoreUrl:e.searchResults.loadMoreLink},window.LazyLoad.concat):a.setState({results:[],isLoadingResults:!1,loadMoreUrl:null})},function(e){a.setState({results:[],isLoadingResults:!1,loadMoreUrl:null})}),a.setState({searchTerm:e})},a.callAjax=function(e,t,a){c.ajax({method:"GET",url:e}).done(function(e){t&&t(e)}).fail(function(e){a&&a(e)})},a.generatePlaceholder=function(e){return!e.media||"VIDEO"!==e.media.type&&"AUDIO"!==e.media.type?e.image?s.createElement("a",{href:e.url},s.createElement("div",{className:"SearchResults__image","data-bg":e.image.mediumUrl})):s.createElement("a",{href:e.url},s.createElement("div",{className:"SearchResults__image"},s.createElement("p",null,e.title))):(e.media.displayType="MODAL",s.createElement(d,{data:e.media,hasAccess:!0,publishedDate:e.date}))},a.handleSubmit=function(e){e.preventDefault();var t=a.searchInput.value;if(t.length>0){if(null!==a.state.defaultMParticleEventObject){var n={event:"content_searched",search_keyword:t,search_type:"site_search"},r=Object.assign({},a.state.defaultMParticleEventObject,n);window.dataLayer.push(r)}"undefined"!==typeof window.history&&window.history.pushState(null,"","/search/?SearchTerm="+t),a.setState({isLoadingResults:!0}),a.search(t)}else a.setState({results:[],loadMoreUrl:null})},a.handleSelectChange=function(e){a.setState({selectedOption:e.target.key,isLoadingResults:!0}),a.callAjax(e.target[e.target.selectedIndex].dataset.url,function(e){e.searchResults&&e.searchResults.results&&e.searchResults.results.length>0&&a.setState({results:e.searchResults.results,loadMoreUrl:e.searchResults.loadMoreLink,totalResults:e.searchResults.totalResults,sortOptions:e.searchResults.sortOptions,isLoadingResults:!1},window.LazyLoad.concat)},function(){a.setState({results:[],isLoadingResults:!1,loadMoreUrl:null})})},a.handleLoadMore=function(e){a.setState({isLoadingMore:!0}),a.callAjax(a.state.loadMoreUrl.url,function(e){if(e.searchResults&&e.searchResults.results&&e.searchResults.results.length>0){var t=a.state.results.slice();a.setState({results:t.concat(e.searchResults.results),loadMoreUrl:e.searchResults.loadMoreLink,isLoadingMore:!1},window.LazyLoad.concat)}},function(){a.setState({isLoadingMore:!1})})},a.state={results:a.props.data.searchResults.results,selectedOption:a.props.data.searchResults.sortOptions.find(function(e){return!0===e.selected}).value,loadMoreUrl:a.props.data.searchResults.loadMoreLink,searchTerm:a.props.data.searchRequest.searchTerm,totalResults:a.props.data.searchResults.totalResults,sortOptions:a.props.data.searchResults.sortOptions,isLoadingResults:!1,isLoadingMore:!1,defaultMParticleEventObject:"undefined"!==typeof window?window.defaultMParticleEventObject:null},a}return i(t,e),o(t,[{key:"render",value:function(){var e=this;return s.createElement("div",{className:"SearchResults"},s.createElement("div",{className:"SearchResults__container"},s.createElement("div",{className:"SearchResults__input"},s.createElement("form",{onSubmit:this.handleSubmit},s.createElement("label",{htmlFor:"searchResultInput"},"Search"),s.createElement("input",{id:"searchResultInput",type:"text",ref:function(t){e.searchInput=t},name:"SearchInput",placeholder:"Search",defaultValue:this.props.data.searchRequest.searchTerm}),s.createElement("button",{type:"submit"},s.createElement("img",{src:u,alt:"Submit search button"})))),this.state.results.length>0&&s.createElement("div",{className:"SearchResults__filter-wrapper"},s.createElement("h2",null,this.state.totalResults," ",1===this.state.results.length?"result":"results"," for ",this.state.searchTerm),s.createElement("div",{className:"SearchResults__filter"},s.createElement("select",{value:this.state.selectedOption,onChange:this.handleSelectChange},this.state.sortOptions&&this.state.sortOptions.map(function(e,t){return s.createElement("option",{id:e.key,key:t,"data-url":e.url},e.value)})))),!this.state.isLoadingResults&&this.state.results.length>0&&this.state.results.map(function(t,a){return s.createElement("div",{className:"SearchResults__result",key:a,"data-score":t.score},s.createElement(f,{hasAccess:!t.hasOwnProperty("hasAccess")||!0===t.hasAccess,isVideo:t.media&&"VIDEO"===t.media.type},s.createElement("div",{className:"SearchResults__result-wrapper"},e.generatePlaceholder(t),s.createElement("div",{className:"SearchResults__content"},null!==t.tags&&s.createElement("div",{className:"SearchResults__tags"},null!==t.tags&&t.tags.filter(function(e){return null!==e}).map(function(e,t){return s.createElement("a",{className:"SearchResults__tag",rel:"nofollow",href:e.url,key:t},e.hashtag)})),s.createElement("h3",{className:"SearchResults__title"},s.createElement("a",{href:t.media&&t.media.externalLink?t.media.externalLink:t.url,target:t.media&&t.media.externalLink?"_blank":"_self",rel:t.media&&t.media.externalLink?"noreferrer noopener":void 0},t.title)),t.description&&s.createElement("p",{className:"SearchResults__description"},t.description.length>100?t.description.substring(0,100)+"...":t.description),t.showDate?s.createElement("span",{className:"SearchResults__date",title:l.relativeTime(t.articleDate)},m(t.articleDate,"dd mmmm yyyy")," | ",t.type):s.createElement("span",{className:"SearchResults__date"},t.type)))))}),0===this.state.results.length&&s.createElement("p",null,"No search results were found"),!this.state.isLoadingMore&&!this.state.isLoadingResults&&this.state.loadMoreUrl&&s.createElement(h,{handle:this.handleLoadMore,caption:"Show more",context:"search results"}),(this.state.isLoadingResults||this.state.isLoadingMore)&&s.createElement("img",{src:p,className:"spinner",alt:"Loading animation"})))}}]),t}(s.Component);e.exports=y},function(e,t,a){function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=function(){function e(e,t){for(var a=0;a0&&s.createElement("p",{className:"Sponsors__caption"},e.link.caption))}))}}]),t}(s.Component);e.exports=l},function(e,t,a){function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=function(){function e(e,t){for(var a=0;a0&&s.createElement("p",{className:"Sponsors__caption"},e.link.caption))}))}}]),t}(s.Component);e.exports=l},function(e,t,a){function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=function(){function e(e,t){for(var a=0;a0&&l.createElement("ul",{className:"c-supporters-clubs-map__content__search-results c-supporters-clubs-map__content__search-results--established"},this.state.searchResults.map(function(t,a){return l.createElement("li",{key:a,className:"c-supporters-clubs-map__content__search-results__item"},l.createElement("button",{type:"button",onClick:e.handleResultClick.bind(e,t.id,!0),className:"c-supporters-clubs-map__content__search-results__item__button"},l.createElement(m,{className:"c-supporters-clubs-map__content__search-results__item__button__icon",name:"logoNoText",width:"15",height:"37"}),t.title))})),this.state.supplementaryResults.length>0&&l.createElement("ul",{className:"c-supporters-clubs-map__content__search-results c-supporters-clubs-map__content__search-results--supplementary"},this.state.supplementaryResults.map(function(t,a){return l.createElement("li",{key:a,className:"c-supporters-clubs-map__content__search-results__item"},l.createElement("button",{type:"button",onClick:e.handleSupplementaryResultClick.bind(e,t.place_id),className:"c-supporters-clubs-map__content__search-results__item__button"},l.createElement(m,{className:"c-supporters-clubs-map__content__search-results__item__button__icon",name:"location",width:"15",height:"23"}),t.description))})),this.state.errorMinChar&&l.createElement("p",{className:"c-supporters-clubs-map__content__search-error",role:"alert"},"Please enter at least 3 characters to search for a supporters club."),this.state.errorNoResults&&l.createElement("p",{className:"c-supporters-clubs-map__content__search-error",role:"alert"},'Sorry! No results were found for "',this.state.searchTerm,'" when searching for a supporters club.'),this.state.selectedClub&&l.createElement("div",{className:"c-supporters-clubs-map__content__club"},this.state.selectedClub.title&&""!==this.state.selectedClub.title&&l.createElement("p",{className:"c-supporters-clubs-map__content__club__name"},l.createElement(m,{className:"c-supporters-clubs-map__content__club__name__icon",name:"location",width:"15",height:"23"}),this.state.selectedClub.title),(this.state.selectedClub.website&&""!==this.state.selectedClub.website||this.state.selectedClub.email&&""!==this.state.selectedClub.email)&&!this.state.hideClubWebsiteAndEmail&&l.createElement("ul",{className:"c-supporters-clubs-map__content__club__list"},this.state.selectedClub.website&&""!==this.state.selectedClub.website&&l.createElement("li",{className:"c-supporters-clubs-map__content__club__list__item"},l.createElement("a",{href:this.state.selectedClub.website,className:"c-supporters-clubs-map__content__club__list__item__link",target:"_blank",rel:"noopener noreferrer external"},this.formatUrlForDisplay(this.state.selectedClub.website))),this.state.selectedClub.email&&""!==this.state.selectedClub.email&&l.createElement("li",{className:"c-supporters-clubs-map__content__club__list__item"},l.createElement("a",{href:"mailto:"+this.state.selectedClub.email,className:"c-supporters-clubs-map__content__club__list__item__link"},this.state.selectedClub.email))),this.state.selectedClub.url&&""!==this.state.selectedClub.url&&l.createElement("p",{className:"c-supporters-clubs-map__content__club__link"},l.createElement("a",{className:"c-button c-button--small",href:this.state.selectedClub.url},"Club details")))),l.createElement("div",{className:"c-supporters-clubs-map__content__footer"},l.createElement("p",{className:"c-supporters-clubs-map__content__footer__tagline"},l.createElement("span",{className:"c-supporters-clubs-map__content__footer__tagline__inner"},"Can't find a club?",l.createElement("span",{className:"c-supporters-clubs-map__content__footer__tagline__inner__suffix"}," Start one!"))),l.createElement("a",{href:"https://www.tottenhamhotspur.com/fans/supporters-clubs/form-a-club/",className:"c-button c-button--small c-supporters-clubs-map__content__footer__cta"},"Form a club"))))}}]),t}(l.Component);e.exports=f},function(e,t,a){function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=function(){function e(e,t){for(var a=0;aPrevious',nextArrow:''},a.baseSettings.autoplay=!(!i||i.matches),a.settings=null,a.mergeSettings(a.props.data.settings),a}return i(t,e),o(t,[{key:"componentDidMount",value:function(){var e=this;if(!(this.props.data.items.length<=1)){a(54);var t=u(this.gallery);t.not(".slick-initialized").slick(this.settings),t.on("beforeChange",function(t,a,n,r){e.setState({name:e.props.data.items[r].name||""})});var n=s.createElement("button",{className:"slick-prev slick-arrow","aria-label":"Previous",type:"button",onClick:this.handlePrevClick},s.createElement("span",{className:"u-visually-hidden"},"Previous")),r=s.createElement("button",{className:"slick-next slick-arrow","aria-label":"Next",type:"button",onClick:this.handleNextClick},s.createElement("span",{className:"u-visually-hidden"},"Next")),i=l.renderToString(n),o=l.renderToString(r);t.on("click",".c-testimonial-carousel__pagination .slick-prev",this.handlePrevClick).on("click",".c-testimonial-carousel__pagination .slick-next",this.handleNextClick).on("swipe",function(){t.slick("slickPause")}).find(".slick-dots").wrap('').before(i).after(o),t.find(".slick-dots").on("click",function(){t.slick("slickPause")})}}},{key:"mergeSettings",value:function(e){this.settings=null!=e?c(this.baseSettings,this.props.data.settings):this.baseSettings}},{key:"componentDidUpdate",value:function(e){e.data!==this.props.data&&this.mergeSettings(this.props.data)}},{key:"render",value:function(){var e=this,t=this.props.data.isOneHotspur?" c-section--one-hotspur":"";return s.createElement("div",{className:"c-testimonial-carousel"+t,id:this.props.data.id||null},s.createElement("div",{className:"c-testimonial-carousel__wrapper"},s.createElement("div",{className:"c-testimonial-carousel__wrapper-inner",ref:function(t){return e.gallery=t}},this.props.data.items.map(function(e,t){return s.createElement("div",{key:t,className:"c-testimonial-carousel__slide"},s.createElement("div",{className:"c-testimonial-carousel__slide__content"},s.createElement("div",{className:"c-testimonial-carousel__quote"},s.createElement(p,{content:e.testimonial})),s.createElement("p",{className:"c-testimonial-carousel__caption"},e.name,s.createElement("strong",null,e.suffix?", "+e.suffix:""))))})),s.createElement("div",{className:"c-testimonial-carousel__background"})))}}]),t}(s.Component);e.exports=m},function(e,t,a){(function(t){function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=function(){function e(e,t){for(var a=0;at.bottom&&!i.state.isLoading&&i.setState({isLoading:!0},function(){i.handleLoadMore(e)})},i.handleData=function(e){var t=i.state.fullSet.slice(),a=t.concat(e.modules);i.setState({modules:l(a,i.props.data.itemsPerGrid),fullSet:a,isLoading:!1,loadMoreLink:e.loadMoreLink},function(){window.LazyLoad&&window.LazyLoad.concat(),window.AppUrlModifier&&window.AppUrlModifier.append()})},i.handleLoadMore=function(e){i.setState({isLoading:!0}),i.state.loadMoreLink?c.ajax({method:"GET",url:i.state.loadMoreLink.url}).done(function(t){if(e&&(i.loadMoreIndex+=1,window.sessionStorage&&i.moduleId)){var a=JSON.parse(window.sessionStorage.getItem(i.moduleId));window.sessionStorage.setItem(i.moduleId,a?JSON.stringify(Object.assign({},a,{modules:a.modules.concat(t.modules),loadMoreLink:t.loadMoreLink?Object.assign({},a.loadMoreLink,{url:t.loadMoreLink.url}):null})):JSON.stringify(t))}i.handleData(t)}).fail(function(){i.setState({isLoading:!1})}):(i.setState({isLoading:!1}),window.removeEventListener("scroll",i.scrollHandler))},i.state={modules:l(i.props.data.modules,i.props.data.itemsPerGrid),fullSet:i.props.data.modules,isLoading:!1,loadMoreLink:i.props.data.loadMoreLink,initialPageNumber:i.props.data.initialPageNumber||0},i.loadMoreIndex=i.props.data.initialPageNumber||0,i.allModules=t.Components,i.moduleId=i.props.data.id,i.placementName=i.props.data.placementName,i}return i(a,e),o(a,[{key:"componentDidMount",value:function(){var e=this;if(this.props.data.loadMoreOnScroll&&window.addEventListener("scroll",this.scrollHandler),window.sessionStorage&&this.moduleId){var t=window.sessionStorage.getItem(this.moduleId);t&&this.handleData(JSON.parse(t)),window.addEventListener("beforeunload",function(){e.trendingGrid.contains(document.activeElement)||"A"!==document.activeElement.tagName||document.activeElement.href===window.location.href||window.sessionStorage.removeItem(e.moduleId)})}}},{key:"render",value:function(){var e=this;return s.createElement("div",{className:"TrendingGrid",id:this.moduleId,"data-placement-name":this.placementName,ref:function(t){return e.trendingGrid=t}},this.state.modules.map(function(t,a){return s.createElement("div",{className:"TrendingGrid__container",key:a},t.length>0&&s.createElement("div",{className:"TrendingGrid__16-9--left"},s.createElement("div",{className:"TrendingGrid__16-9__ratio"},s.createElement("div",{className:"TrendingGrid__16-9__container"},t[0]&&s.createElement(e.allModules[t[0].name],{key:0,data:t[0].data})))),t.length>1&&s.createElement("div",{className:"TrendingGrid__16-9--right"},s.createElement("div",{className:"TrendingGrid__16-9__ratio"},s.createElement("div",{className:"TrendingGrid__16-9__container"},t[1]&&s.createElement(e.allModules[t[1].name],{key:1,data:t[1].data})))),t.length>2&&s.createElement("div",{className:"TrendingGrid__20-9"},s.createElement("div",{className:"TrendingGrid__20-9__ratio"},s.createElement("div",{className:"TrendingGrid__20-9__container"},t[2]&&s.createElement(e.allModules[t[2].name],{key:2,data:t[2].data})))))}),!this.state.isLoading&&this.state.loadMoreLink&&s.createElement(u,{handle:this.handleLoadMore,caption:"Show more",isTrending:!0,context:"trending content"}),this.state.isLoading&&s.createElement("img",{src:p,className:"spinner",alt:"Loading animation"}))}}]),a}(s.Component);e.exports=m}).call(t,a(5))},function(e,t,a){(function(t){function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=function(){function e(e,t){for(var a=0;at.bottom&&!i.state.isLoading&&i.setState({isLoading:!0},function(){i.handleLoadMore(e)})},i.handleData=function(e){var t=i.state.fullSet.slice(),a=t.concat(e.modules);i.setState({modules:l(a,i.props.data.itemsPerGrid),fullSet:a,isLoading:!1,loadMoreLink:e.loadMoreLink},function(){window.LazyLoad&&window.LazyLoad.concat(),window.AppUrlModifier&&window.AppUrlModifier.append()})},i.handleLoadMore=function(e){i.setState({isLoading:!0}),i.state.loadMoreLink?c.ajax({method:"GET",url:i.state.loadMoreLink.url}).done(function(t){if(e&&(i.loadMoreIndex+=1,window.sessionStorage&&i.moduleId)){var a=JSON.parse(window.sessionStorage.getItem(i.moduleId));window.sessionStorage.setItem(i.moduleId,a?JSON.stringify(Object.assign({},a,{modules:a.modules.concat(t.modules),loadMoreLink:t.loadMoreLink?Object.assign({},a.loadMoreLink,{url:t.loadMoreLink.url}):null})):JSON.stringify(t))}i.handleData(t)}).fail(function(){i.setState({isLoading:!1})}):(i.setState({isLoading:!1}),window.removeEventListener("scroll",i.scrollHandler))},i.state={modules:l(i.props.data.modules,i.props.data.itemsPerGrid),fullSet:i.props.data.modules,isLoading:!1,loadMoreLink:i.props.data.loadMoreLink,initialPageNumber:i.props.data.initialPageNumber||0},i.loadMoreIndex=i.props.data.initialPageNumber||0,i.allModules=t.Components,i.moduleId=i.props.data.id,i.placementName=i.props.data.placementName,i}return i(a,e),o(a,[{key:"componentDidMount",value:function(){var e=this;if(this.props.data.loadMoreOnScroll&&window.addEventListener("scroll",this.scrollHandler),window.sessionStorage&&this.moduleId){var t=window.sessionStorage.getItem(this.moduleId);t&&this.handleData(JSON.parse(t)),window.addEventListener("beforeunload",function(){e.trendingGrid.contains(document.activeElement)||"A"!==document.activeElement.tagName||document.activeElement.href===window.location.href||window.sessionStorage.removeItem(e.moduleId)})}}},{key:"render",value:function(){var e=this;return s.createElement("div",{className:"TrendingVideoGrid",id:this.moduleId,"data-placement-name":this.placementName,ref:function(t){return e.trendingGrid=t}},this.state.modules.map(function(t,a){return s.createElement("div",{className:"TrendingVideoGrid__container",key:a},t.length>0&&s.createElement("div",{className:"TrendingVideoGrid__16-9--left"},s.createElement("div",{className:"TrendingVideoGrid__16-9__ratio"},s.createElement("div",{className:"TrendingVideoGrid__16-9__container"},t[0]&&s.createElement(p,{data:t[0].data,isTrendingVideo:e.props.isTrendingVideo})))),t.length>1&&s.createElement("div",{className:"TrendingVideoGrid__16-9--right"},s.createElement("div",{className:"TrendingVideoGrid__16-9__ratio"},s.createElement("div",{className:"TrendingVideoGrid__16-9__container"},t[1]&&s.createElement(p,{data:t[1].data,isTrendingVideo:e.props.isTrendingVideo})))),t.length>2&&s.createElement("div",{className:"TrendingVideoGrid__20-9"},s.createElement("div",{className:"TrendingVideoGrid__20-9__ratio"},s.createElement("div",{className:"TrendingVideoGrid__20-9__container"},t[2]&&s.createElement(p,{data:t[2].data,isTrendingVideo:e.props.isTrendingVideo})))))}),!this.state.isLoading&&this.state.loadMoreLink&&s.createElement(u,{handle:this.handleLoadMore,caption:"Show more",isTrending:!0,context:"trending videos"}),this.state.isLoading&&s.createElement("img",{src:m,className:"spinner",alt:"Loading animation"}))}}]),a}(s.Component);e.exports=d}).call(t,a(5))},function(e,t,a){function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=function(){function e(e,t){for(var a=0;a-1&&t.splice(n,1)}for(var r=window.OnetrustActiveGroups.split(","),i=!0,a=0;a0&&clearInterval(e.state.tickInterval),t++})}},{key:"componentWillUnmount",value:function(){if(clearInterval(this.state.tickInterval),this.setState({tickInterval:null}),this.videoPlayer.current){var e=this.state.eventData;this.pushToDataLayer(e,"video_ended","manual"),this.setState({eventData:null}),this.chromecastChild.current&&this.chromecastChild.current.stopApp()}}},{key:"parseTags",value:function(e){return e.length?e.join("|"):null}},{key:"determineIfDuplicateEvent",value:function(e,t){return"video_play_ticked"!==e&&(this.state.lastVideoEventNamePushed===e&&this.state.lastVideoEventActionTypePushed===t)}},{key:"pushToDataLayer",value:function(e,t,a){var n=this;if("video_play_ticked"===t&&!this.state.allowVideoEventPush)return!1;if(this.determineIfDuplicateEvent(t,a))return!1;this.setState({allowVideoEventPush:!1,lastVideoEventNamePushed:t,lastVideoEventActionTypePushed:a});var r=e;r.event=t,r.action_type=a;var i=Object.assign({},this.state.defaultMParticleEventObject,r);window.dataLayer.push(i),setTimeout(function(){n.setState({allowVideoEventPush:!0})},500)}},{key:"pushToDataLayerContentSelect",value:function(e){var t="other";if(this.videoPlayer.current){var a=this.videoPlayer.current.closest("[data-placement-name]");t=a?a.getAttribute("data-placement-name"):t}e.event="content_selected",e.placement_type="list",e.placement_name=t;var n=Object.assign({},this.state.defaultMParticleEventObject,e);window.dataLayer.push(n)}},{key:"handleCasting",value:function(){this.videoPlayer.current.pause(),this.videoPlayer.current.removeAttribute("controls")}},{key:"handleStopCasting",value:function(e){var t=this.videoPlayer.current;t&&(t.setAttribute("controls","controls"),t.pause(),t.currentTime=e)}},{key:"handlePlayButtonClick",value:function(){if(this.state.adsLoaded&&this.state.adsPaused)return this.setState({adsPaused:!1}),void this.adsManager.resume();this.loadAds()}},{key:"getVideoPlayer",value:function(){return this.videoPlayer.current}},{key:"render",value:function(){if(this.state.hasErrored)return s.createElement("div",{className:"VideoEmbedStream"},s.createElement("p",{role:"alert",className:"VideoEmbedStream__error"},"An error has occurred. Please try again later."));var e=this.state.videoDetails&&this.state.videoDetails.subtitles,t=this.allowAds?e&&this.state.adsFinished:e,a=!this.allowAds||(!!this.state.adsFinished||null),n=!this.allowAds&&this.props.autoplay;return s.createElement("div",{className:"VideoEmbedStream"+(this.state.adsLoaded?" VideoEmbedStream--ads-loaded":"")+(this.state.adsFinished?" VideoEmbedStream--ads-finished":"")+(this.state.adsPaused?" VideoEmbedStream--ads-paused":"")},this.state.videoDetails?s.createElement("video",{id:"video",controls:a,playsInline:!0,ref:this.videoPlayer,crossOrigin:"anonymous",autoPlay:n,muted:n},t&&this.state.videoDetails.subtitles.map(function(e,t){return s.createElement("track",{label:e.lang,kind:"captions",srcLang:e.lang,src:e.url,default:0===t,key:t})})):null,this.state.videoDetails&&this.state.showChromecast?s.createElement(p,{ref:this.chromecastChild,requestVideoDetails:this.requestVideoDetails.bind(this),handleCasting:this.handleCasting.bind(this),handleStopCasting:this.handleStopCasting.bind(this),getVideoPlayer:this.getVideoPlayer.bind(this)}):null,this.allowAds&&!this.state.adsErrored?s.createElement("div",{className:"VideoEmbedStream__advert-container",ref:this.adsContainer}):null,this.allowAds&&this.adsManager||this.state.adsErrored?s.createElement("button",{className:"VideoEmbedStream__play-button",onClick:this.handlePlayButtonClick.bind(this)},s.createElement("span",{className:"u-visually-hidden"},"Play video"),s.createElement("span",{className:"VideoEmbedStream__play-button-icon"},s.createElement("img",{src:u,alt:""}))):null,!this.allowAds||this.adsManager||this.state.adsErrored?null:s.createElement("div",{className:"c-loading-wrapper c-loading-wrapper--loading c-loading-wrapper--on-black"},s.createElement("span",{className:"u-visually-hidden"},"Loading video")))}}]),t}(s.Component);e.exports=m},function(e,t,a){function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=function(){function e(e,t){for(var a=0;a1e3?(clearInterval(r),console.warn("Timed out waiting for kWidget.")):n+=1},50)}else this.createPlayer()}},{key:"componentWillUnmount",value:function(){if(clearInterval(this.state.tickInterval),this.setState({tickInterval:null}),this.state.playerElement){window.kWidget.destroy(this.state.targetId),this.setState({playerElement:null});var e=this.state.eventData;this.pushToDataLayer(e,"video_ended","manual"),this.setState({eventData:null})}}},{key:"padDate",value:function(e,t){return e.toString().padStart(t,"0")}},{key:"parseUnixTimestamp",value:function(e){if(!e)return null;var t=1e3*e,a=new Date(t),n=a.getFullYear(),r=a.getMonth()+1,i=a.getDate();return r=this.padDate(r,2),i=this.padDate(i,2),n+"-"+r+"-"+i}},{key:"parseTags",value:function(e){if(!e)return null;return e.replace(new RegExp(", ","g"),"|")}},{key:"parseType",value:function(e){return e?7===e||8===e?"streaming":"on_demand":null}},{key:"determineIfDuplicateEvent",value:function(e,t){return"video_play_ticked"!==e&&(this.state.lastVideoEventNamePushed===e&&this.state.lastVideoEventActionTypePushed===t)}},{key:"pushToDataLayer",value:function(e,t,a){var n=this;if("video_play_ticked"===t&&!this.state.allowVideoEventPush)return!1;if(this.determineIfDuplicateEvent(t,a))return!1;if(!e||!t||!a)return!1;this.setState({allowVideoEventPush:!1,lastVideoEventNamePushed:t,lastVideoEventActionTypePushed:a});var r=e;r.event=t,r.action_type=a;var i=Object.assign({},this.state.defaultMParticleEventObject,r);window.dataLayer=window.dataLayer||[],window.dataLayer.push(i),setTimeout(function(){n.setState({allowVideoEventPush:!0})},500)}},{key:"pushToDataLayerContentSelect",value:function(e){var t="other";if(this.state.playerElement){var a=this.state.playerElement.closest("[data-placement-name]");t=a?a.getAttribute("data-placement-name"):t}e.event="content_selected",e.placement_type="list",e.placement_name=t;var n=Object.assign({},this.state.defaultMParticleEventObject,e);window.dataLayer.push(n)}},{key:"createPlayer",value:function(){var e=this;window.kWidget.embed({targetId:this.state.targetId,wid:"_"+this.props.partnerId,uiconf_id:this.props.playerId,flashvars:{"EmbedPlayer.EnableIpadHTMLControls":!1,streamerType:"auto",autoPlay:!0,autoPMute:!0},entry_id:this.props.entryId}),window.kWidget.addReadyCallback(function(t){var a=document.getElementById(t),n=0;e.setState({playerElement:a},function(){var t=void 0;e.state.playerElement.kBind("metadataReceived",function(){var a=e.state.playerElement.evaluate("{mediaProxy.entry}");t={content_access_type:"free",content_id:a.id,content_type:"video",content_tags:e.parseTags(a.tags),content_title:a.name,content_publication_date:e.parseUnixTimestamp(a.createdAt),content_duration:a.duration,video_stream_type:e.parseType(a.type),interval_sec:10},e.setState({eventData:t}),e.pushToDataLayerContentSelect(t)}),e.state.playerElement.kBind("play",function(){e.pushToDataLayer(t,"video_played","manual"),clearInterval(e.state.tickInterval);var a=setInterval(function(){e.state.playerElement&&e.pushToDataLayer(t,"video_play_ticked","auto")},1e4);e.setState({tickInterval:a})}),e.state.playerElement.kBind("pause",function(){e.pushToDataLayer(t,"video_paused","manual"),clearInterval(e.state.tickInterval)}),e.state.playerElement.kBind("ended",function(){e.pushToDataLayer(t,"video_ended","auto"),clearInterval(e.state.tickInterval)}),e.state.playerElement.kBind("playerSeekEnd",function(){n>0&&clearInterval(e.state.tickInterval),n++})})})}},{key:"render",value:function(){return s.createElement("div",{className:"VideoEmbedStream"},s.createElement("div",{id:this.state.targetId}))}}]),t}(s.Component);e.exports=l},function(e,t,a){function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=function(){function e(e,t){for(var a=0;a