(function(){"use strict";function e(e,s){i=$(s).find(n.selectTrigger);r=$(s).find(n.leagueSelect);t=$(s).find(n.clubSelect);u();i.on("change",u);r.on("change",o);t.on("change",f)}function u(){i.find(":selected").val()!=""?($(n.selectClubsWrapTrigger).removeClass("hidden"),t.removeClass("hidden"),$(n.selectClubsWrapTrigger).removeClass("hidden"),t.find(":selected").val()!=""&&f()):(t.addClass("hidden"),$(n.holdbacksContainer).addClass("hidden"),$(n.selectClubsWrapTrigger).addClass("hidden"))}function f(){$.ajax({type:"GET",url:"/api/holdbacks/get",data:{region:i.find(":selected").val(),club:t.find(":selected").val()},success:function(t){$(n.holdbacksContainer).removeClass("hidden");$(n.holdbacksContainer).html(t)}})}function o(){$(n.holdbacksContainer).addClass("hidden")}var n={blackoutTrigger:"[data-efl-blackout]",selectTrigger:"[data-blackout-select-region]",holdbacksContainer:"[data-blackout-holdbacks]",selectClubsWrapTrigger:"[data-blackout-select-clubs]",clubSelect:"[data-blackout-club-select]",leagueSelect:"[data-blackout-league-select]"},i,r,t;$(function(){$(n.blackoutTrigger).each(e)})})(jQuery);window.EFL=window.EFL||{};window.EFL.AnalyticsOptimizeEFL=function(){"use strict";function rt(n){$("*[data-target-region]").each(function(){var t=$(this).data("target-region");t===n&&$(this).removeClass("hide");t==="ND"&&n!=="D"&&$(this).removeClass("hide")})}function ut(n){$("*[data-target-country]").each(function(){var t=$(this).data("target-country");t===n&&$(this).removeClass("hide")})}var o=900,a=window.EFL.local.cookies,n=window.EFL.local.storage,r,u,t,d;window.EFL.analyticsController.track({"next-match-first-team-ko":window.EFL.video.nextfxKO});window.EFL.analyticsController.track({"next-match-minutes":window.EFL.video.nextfxKOMins});window.EFL.video.nextfxMC===""?window.EFL.analyticsController.track({"next-match-first-team-mc":""}):window.EFL.analyticsController.track({"next-match-first-team-mc":"https://"+window.EFL.video.thisDomain+window.EFL.video.nextfxMC});window.EFL.analyticsController.track({"video-subscribe-page":"https://"+window.EFL.video.thisDomain+window.EFL.video.packagesUrl});r=a.get(window.EFL.video.videoLoggedInName);u=a.get(window.EFL.video.videoAccessLevelName);typeof r=="undefined"&&(r="false");typeof u=="undefined"&&(u="free");t="clubtoken";window.EFL.analyticsController.track({"video-logged-in":r});window.EFL.analyticsController.track({"video-access-level":u});var f=function(i){var r=n.get(t);$.ajax({url:window.EFL.video.apiUrl+"packages",dataType:"json",data:{},headers:{Authorization:"Bearer "+r},error:function(n){g(n,i)},success:function(t){n.set(window.EFL.video.packagesDateTokenName,Date.now());n.set(window.EFL.video.packagesTokenName,t);v(!1)}})},e=function(i){var r=n.get(t);$.ajax({url:window.EFL.video.apiUrl+"config",dataType:"json",data:{format:"json"},headers:{Authorization:"Bearer "+r},error:function(n){nt(n,i)},success:function(t){n.set(window.EFL.video.configDateTokenName,Date.now());n.set(window.EFL.video.configTokenName,t);y(!1)}})},s=function(i){var f=n.get(t),r=window.EFL.video.nextfxVideoId,u;r!==""&&(u={extid:r,purchases:"true"},$.ajax({url:window.EFL.video.apiUrl+"game",dataType:"json",data:u,headers:{Authorization:"Bearer "+f},error:function(n){tt(n,i)},success:function(t){n.set(window.EFL.video.nextGameDateTokenName,Date.now());n.set(window.EFL.video.nextGameTokenName,t);it(!1)}}))},g=function(n,t){n.status===401?t!==!1&&i(function(){f(!1)}):t!==!1&&i(function(){f(!1)})},nt=function(n,t){n.status===401?t!==!1&&i(function(){e(!1)}):t!==!1&&i(function(){e(!1)})},tt=function(n,t){n.status===401&&t!==!1&&i(function(){s(!1)})},i=function(i){$.ajax({url:window.EFL.video.clubIdpUrl+"/secure/accesstoken",dataType:"json",data:{format:"json"},success:function(r){n.set(t,r.data.accessToken);i&&i()}})},h=function(){var r=n.get(t);r===undefined?i(function(){f()}):f()},c=function(){var r=n.get(t);r===undefined?i(function(){e()}):e()},l=function(){var r=n.get(t);r===undefined?i(function(){s()}):s()},v=function(i){var e=n.get(t),r=n.get(window.EFL.video.packagesTokenName),u=n.get(window.EFL.video.packagesDateTokenName),f;u===undefined?i!==!1&&h():(f=(Date.now()-u)/1e3,f>o?i!==!1&&h():r===undefined?i!==!1&&h():(window.EFL.analyticsController.track({"video-region":p(r)}),w=!0,rt(p(r))))},y=function(i){var h=n.get(t),r=n.get(window.EFL.video.configTokenName),e=n.get(window.EFL.video.configDateTokenName),s,f,u;if(e===undefined)i!==!1&&c();else if(s=(Date.now()-e)/1e3,s>o)i!==!1&&c();else if(r===undefined)i!==!1&&c();else{if(r.geo!==undefined){if(window.EFL.analyticsController.track({"video-country":r.geo.country}),window.EFL.analyticsController.track({"video-country-name":countries[r.geo.country]}),ut(r.geo.country),window.EFL.analyticsController.track({"video-state":r.geo.state}),window.EFL.analyticsController.track({"video-city":r.geo.city}),f="false",r.geo.contentRegions!==undefined)for(u=0;u<r.geo.contentRegions.length;u++)(r.geo.contentRegions[u].name.toLowerCase().indexOf("partial blackout")>=0||r.geo.contentRegions[u].name.toLowerCase().indexOf("league blackout")>=0)&&(f="true");f==="true"?window.EFL.analyticsController.track({"league-blackout-excluded":"true"}):window.EFL.analyticsController.track({"league-blackout-excluded":"false"})}else window.EFL.analyticsController.track({"video-country":""}),window.EFL.analyticsController.track({"video-state":""}),window.EFL.analyticsController.track({"video-city":""}),window.EFL.analyticsController.track({"league-blackout-excluded":"false"});b=!0}},it=function(t){var i=n.get(window.EFL.video.nextGameTokenName),r=n.get(window.EFL.video.nextGameDateTokenName),u,f;r===undefined?t!==!1&&l():(u=(Date.now()-r)/1e3,u>o?t!==!1&&l():i===undefined?t!==!1&&l():(i.gamePurchases!==undefined?(f="https://"+window.EFL.video.thisDomain+window.EFL.video.registerUrl+"&sku="+i.gamePurchases[0].sku+"&id="+i.id+"&redirect=https://"+window.EFL.video.thisDomain+window.EFL.video.nextfxMC,window.EFL.analyticsController.track({"video-match-pass-available":"true"}),window.EFL.analyticsController.track({"match-pass-url":f}),window.EFL.analyticsController.track({"match-pass-price":i.gamePurchases[0].product.price.display})):(window.EFL.analyticsController.track({"video-match-pass-available":"false"}),window.EFL.analyticsController.track({"match-pass-url":""}),window.EFL.analyticsController.track({"match-pass-price":""})),k=!0))},p=function(n){var t,i,f,r,e,u;if(n.bundlePurchaseModels!==undefined)for(f=0;f<n.bundlePurchaseModels.length;f++)r=n.bundlePurchaseModels[f].sku[n.bundlePurchaseModels[f].sku.length-1],(r==="N"||r==="I"||r==="E"||r==="D")&&(t=r);if(n.gamePurchaseModels!==undefined)for(e=0;e<n.gamePurchaseModels.length;e++)u=n.gamePurchaseModels[e].sku[n.gamePurchaseModels[e].sku.length-1],(u==="N"||u==="I"||u==="E"||u==="D")&&(i=u);return t!==undefined&&t[t.length-1]!=="N"?t[t.length-1]:i!==undefined&&i[i.length-1]!=="N"?i[i.length-1]:"Unknown"},w=!1,b=!1,k=!1;v();y();d=setInterval(function(){w&&b&&k&&(clearInterval(d),dataLayer.push({event:"optimize.activate"}))},100)}