!function(e){var t=function(u,D,f){"use strict";var k,H;if(function(){var e;var t={lazyClass:"lazyload",loadedClass:"lazyloaded",loadingClass:"lazyloading",preloadClass:"lazypreload",errorClass:"lazyerror",autosizesClass:"lazyautosizes",fastLoadedClass:"ls-is-cached",iframeLoadMode:0,srcAttr:"data-src",srcsetAttr:"data-srcset",sizesAttr:"data-sizes",minSize:40,customMedia:{},init:true,expFactor:1.5,hFac:.8,loadMode:2,loadHidden:true,ricTimeout:0,throttleDelay:125};H=u.lazySizesConfig||u.lazysizesConfig||{};for(e in t){if(!(e in H)){H[e]=t[e]}}}(),!D||!D.getElementsByClassName){return{init:function(){},cfg:H,noSupport:true}}var O=D.documentElement,i=u.HTMLPictureElement,P="addEventListener",$="getAttribute",q=u[P].bind(u),I=u.setTimeout,U=u.requestAnimationFrame||I,o=u.requestIdleCallback,j=/^picture$/i,r=["load","error","lazyincluded","_lazyloaded"],a={},G=Array.prototype.forEach,J=function(e,t){if(!a[t]){a[t]=new RegExp("(\\s|^)"+t+"(\\s|$)")}return a[t].test(e[$]("class")||"")&&a[t]},K=function(e,t){if(!J(e,t)){e.setAttribute("class",(e[$]("class")||"").trim()+" "+t)}},Q=function(e,t){var a;if(a=J(e,t)){e.setAttribute("class",(e[$]("class")||"").replace(a," "))}},V=function(t,a,e){var i=e?P:"removeEventListener";if(e){V(t,a)}r.forEach(function(e){t[i](e,a)})},X=function(e,t,a,i,r){var n=D.createEvent("Event");if(!a){a={}}a.instance=k;n.initEvent(t,!i,!r);n.detail=a;e.dispatchEvent(n);return n},Y=function(e,t){var a;if(!i&&(a=u.picturefill||H.pf)){if(t&&t.src&&!e[$]("srcset")){e.setAttribute("srcset",t.src)}a({reevaluate:true,elements:[e]})}else if(t&&t.src){e.src=t.src}},Z=function(e,t){return(getComputedStyle(e,null)||{})[t]},s=function(e,t,a){a=a||e.offsetWidth;while(a<H.minSize&&t&&!e._lazysizesWidth){a=t.offsetWidth;t=t.parentNode}return a},ee=function(){var a,i;var t=[];var r=[];var n=t;var s=function(){var e=n;n=t.length?r:t;a=true;i=false;while(e.length){e.shift()()}a=false};var e=function(e,t){if(a&&!t){e.apply(this,arguments)}else{n.push(e);if(!i){i=true;(D.hidden?I:U)(s)}}};e._lsFlush=s;return e}(),te=function(a,e){return e?function(){ee(a)}:function(){var e=this;var t=arguments;ee(function(){a.apply(e,t)})}},ae=function(e){var a;var i=0;var r=H.throttleDelay;var n=H.ricTimeout;var t=function(){a=false;i=f.now();e()};var s=o&&n>49?function(){o(t,{timeout:n});if(n!==H.ricTimeout){n=H.ricTimeout}}:te(function(){I(t)},true);return function(e){var t;if(e=e===true){n=33}if(a){return}a=true;t=r-(f.now()-i);if(t<0){t=0}if(e||t<9){s()}else{I(s,t)}}},ie=function(e){var t,a;var i=99;var r=function(){t=null;e()};var n=function(){var e=f.now()-a;if(e<i){I(n,i-e)}else{(o||r)(r)}};return function(){a=f.now();if(!t){t=I(n,i)}}},e=function(){var v,m,c,h,e;var y,z,g,p,C,b,A;var n=/^img$/i;var d=/^iframe$/i;var E="onscroll"in u&&!/(gle|ing)bot/.test(navigator.userAgent);var _=0;var w=0;var M=0;var N=-1;var L=function(e){M--;if(!e||M<0||!e.target){M=0}};var x=function(e){if(A==null){A=Z(D.body,"visibility")=="hidden"}return A||!(Z(e.parentNode,"visibility")=="hidden"&&Z(e,"visibility")=="hidden")};var W=function(e,t){var a;var i=e;var r=x(e);g-=t;b+=t;p-=t;C+=t;while(r&&(i=i.offsetParent)&&i!=D.body&&i!=O){r=(Z(i,"opacity")||1)>0;if(r&&Z(i,"overflow")!="visible"){a=i.getBoundingClientRect();r=C>a.left&&p<a.right&&b>a.top-1&&g<a.bottom+1}}return r};var t=function(){var e,t,a,i,r,n,s,o,l,u,f,c;var d=k.elements;if((h=H.loadMode)&&M<8&&(e=d.length)){t=0;N++;for(;t<e;t++){if(!d[t]||d[t]._lazyRace){continue}if(!E||k.prematureUnveil&&k.prematureUnveil(d[t])){R(d[t]);continue}if(!(o=d[t][$]("data-expand"))||!(n=o*1)){n=w}if(!u){u=!H.expand||H.expand<1?O.clientHeight>500&&O.clientWidth>500?500:370:H.expand;k._defEx=u;f=u*H.expFactor;c=H.hFac;A=null;if(w<f&&M<1&&N>2&&h>2&&!D.hidden){w=f;N=0}else if(h>1&&N>1&&M<6){w=u}else{w=_}}if(l!==n){y=innerWidth+n*c;z=innerHeight+n;s=n*-1;l=n}a=d[t].getBoundingClientRect();if((b=a.bottom)>=s&&(g=a.top)<=z&&(C=a.right)>=s*c&&(p=a.left)<=y&&(b||C||p||g)&&(H.loadHidden||x(d[t]))&&(m&&M<3&&!o&&(h<3||N<4)||W(d[t],n))){R(d[t]);r=true;if(M>9){break}}else if(!r&&m&&!i&&M<4&&N<4&&h>2&&(v[0]||H.preloadAfterLoad)&&(v[0]||!o&&(b||C||p||g||d[t][$](H.sizesAttr)!="auto"))){i=v[0]||d[t]}}if(i&&!r){R(i)}}};var a=ae(t);var S=function(e){var t=e.target;if(t._lazyCache){delete t._lazyCache;return}L(e);K(t,H.loadedClass);Q(t,H.loadingClass);V(t,B);X(t,"lazyloaded")};var i=te(S);var B=function(e){i({target:e.target})};var T=function(e,t){var a=e.getAttribute("data-load-mode")||H.iframeLoadMode;if(a==0){e.contentWindow.location.replace(t)}else if(a==1){e.src=t}};var F=function(e){var t;var a=e[$](H.srcsetAttr);if(t=H.customMedia[e[$]("data-media")||e[$]("media")]){e.setAttribute("media",t)}if(a){e.setAttribute("srcset",a)}};var s=te(function(t,e,a,i,r){var n,s,o,l,u,f;if(!(u=X(t,"lazybeforeunveil",e)).defaultPrevented){if(i){if(a){K(t,H.autosizesClass)}else{t.setAttribute("sizes",i)}}s=t[$](H.srcsetAttr);n=t[$](H.srcAttr);if(r){o=t.parentNode;l=o&&j.test(o.nodeName||"")}f=e.firesLoad||"src"in t&&(s||n||l);u={target:t};K(t,H.loadingClass);if(f){clearTimeout(c);c=I(L,2500);V(t,B,true)}if(l){G.call(o.getElementsByTagName("source"),F)}if(s){t.setAttribute("srcset",s)}else if(n&&!l){if(d.test(t.nodeName)){T(t,n)}else{t.src=n}}if(r&&(s||l)){Y(t,{src:n})}}if(t._lazyRace){delete t._lazyRace}Q(t,H.lazyClass);ee(function(){var e=t.complete&&t.naturalWidth>1;if(!f||e){if(e){K(t,H.fastLoadedClass)}S(u);t._lazyCache=true;I(function(){if("_lazyCache"in t){delete t._lazyCache}},9)}if(t.loading=="lazy"){M--}},true)});var R=function(e){if(e._lazyRace){return}var t;var a=n.test(e.nodeName);var i=a&&(e[$](H.sizesAttr)||e[$]("sizes"));var r=i=="auto";if((r||!m)&&a&&(e[$]("src")||e.srcset)&&!e.complete&&!J(e,H.errorClass)&&J(e,H.lazyClass)){return}t=X(e,"lazyunveilread").detail;if(r){re.updateElem(e,true,e.offsetWidth)}e._lazyRace=true;M++;s(e,t,r,i,a)};var r=ie(function(){H.loadMode=3;a()});var o=function(){if(H.loadMode==3){H.loadMode=2}r()};var l=function(){if(m){return}if(f.now()-e<999){I(l,999);return}m=true;H.loadMode=3;a();q("scroll",o,true)};return{_:function(){e=f.now();k.elements=D.getElementsByClassName(H.lazyClass);v=D.getElementsByClassName(H.lazyClass+" "+H.preloadClass);q("scroll",a,true);q("resize",a,true);q("pageshow",function(e){if(e.persisted){var t=D.querySelectorAll("."+H.loadingClass);if(t.length&&t.forEach){U(function(){t.forEach(function(e){if(e.complete){R(e)}})})}}});if(u.MutationObserver){new MutationObserver(a).observe(O,{childList:true,subtree:true,attributes:true})}else{O[P]("DOMNodeInserted",a,true);O[P]("DOMAttrModified",a,true);setInterval(a,999)}q("hashchange",a,true);["focus","mouseover","click","load","transitionend","animationend"].forEach(function(e){D[P](e,a,true)});if(/d$|^c/.test(D.readyState)){l()}else{q("load",l);D[P]("DOMContentLoaded",a);I(l,2e4)}if(k.elements.length){t();ee._lsFlush()}else{a()}},checkElems:a,unveil:R,_aLSL:o}}(),re=function(){var a;var n=te(function(e,t,a,i){var r,n,s;e._lazysizesWidth=i;i+="px";e.setAttribute("sizes",i);if(j.test(t.nodeName||"")){r=t.getElementsByTagName("source");for(n=0,s=r.length;n<s;n++){r[n].setAttribute("sizes",i)}}if(!a.detail.dataAttr){Y(e,a.detail)}});var i=function(e,t,a){var i;var r=e.parentNode;if(r){a=s(e,r,a);i=X(e,"lazybeforesizes",{width:a,dataAttr:!!t});if(!i.defaultPrevented){a=i.detail.width;if(a&&a!==e._lazysizesWidth){n(e,r,i,a)}}}};var e=function(){var e;var t=a.length;if(t){e=0;for(;e<t;e++){i(a[e])}}};var t=ie(e);return{_:function(){a=D.getElementsByClassName(H.autosizesClass);q("resize",t)},checkElems:t,updateElem:i}}(),t=function(){if(!t.i&&D.getElementsByClassName){t.i=true;re._();e._()}};return I(function(){H.init&&t()}),k={cfg:H,autoSizer:re,loader:e,init:t,uP:Y,aC:K,rC:Q,hC:J,fire:X,gW:s,rAF:ee}}(e,e.document,Date);e.lazySizes=t,"object"==typeof module&&module.exports&&(module.exports=t)}("undefined"!=typeof window?window:{});DOM = {url: "",mobile: false,tablet: false,xhttp: false,toggleClass: function (t,c){document.querySelector(t).classList.toggle(c);},removeClass: function (t,c){const ele = document.querySelector(t);if(ele !== null){document.querySelector(t).classList.remove(c);}},addClass: function (t,c){const ele = document.querySelector(t);if(ele !== null) {document.querySelector(t).classList.add(c);}},click: function (t,f){const ele = document.querySelector(t);if(ele !== null) {document.querySelector(t).addEventListener("click", f);}},change: function (t,f){const ele = document.querySelector(t);if(ele !== null){ele.addEventListener("change",f);}},text : function (t,v){if(v === undefined){return document.querySelector(t).innerText;}document.querySelector(t).innerText = v;},shuffle : function (t){return t;},ele : function (t){return document.querySelector(t);},visible : function (t){const ele = document.querySelector(t);if(ele){return ele.offsetWidth > 0 || ele.offsetHeight > 0;}return false;},ajax: function (url,data,method,f,m){data.isContent = 1;DOM.xhttp = new XMLHttpRequest();DOM.xhttp.onreadystatechange = function() {if (this.readyState == 4 && this.status == 200) {DOM.xhttp = false;if(f === "json"){m.call(this,JSON.parse(this.responseText))}else{m.call(this,this.responseText)}}};DOM.xhttp.open(method,DOM.url + url, true);const form = new FormData();for(let i in data){form.set(i,data[i]);}DOM.xhttp.send(form);},ajaxBinary: function (url,data,method,m){data.isContent = 1;DOM.xhttp = new XMLHttpRequest();DOM.xhttp.onreadystatechange = function() {if (this.readyState == 4 && this.status == 200) {DOM.xhttp = false;m.call(this,this.response)}};DOM.xhttp.open(method,DOM.url + url, true);const form = new FormData();for(let i in data){form.set(i,data[i]);}DOM.xhttp.send(form);},ap : function (t,v){document.querySelector(t).innerHTML = document.querySelector(t).innerHTML + v;},html : function (t,v){document.querySelector(t).innerHTML = v;},pageBack : function(){if(document.referrer.indexOf(DOM.url) > -1){window.history.back();}else{window.location.href = DOM.url}},dd : function (){const items = document.querySelectorAll(".drop-down");items.forEach(function(elem, index) {if(elem.classList.contains("disabled")) return;elem.setAttribute("data-id",'');elem.addEventListener('open', function (e) {elem.classList.add("open");elem.addEventListener("mousedown",function (e){e.stopPropagation();});window.addEventListener("mousedown",function (e){elem.dispatchEvent(new Event('close'));});}, false);elem.addEventListener('close', function (e) {elem.classList.remove("open");elem.removeEventListener("mousedown",DOM.rv);window.removeEventListener("mousedown",DOM.rv);}, false);const label = elem.querySelector(".label");label.addEventListener("click",function (e){if(elem.classList.contains("open")){elem.dispatchEvent(new Event('close'));}else{elem.dispatchEvent(new Event('open'));}});const li = elem.querySelector("ul").querySelectorAll("li");li.forEach(function(liElm) {liElm.addEventListener("click",function (e){elem.setAttribute("data-id",liElm.getAttribute("data-id"));label.innerHTML = liElm.innerHTML;elem.dispatchEvent(new Event('close'));elem.dispatchEvent(new Event('change'));});});});},attr : function (t,a){const ele = document.querySelector(t);return ele === null ? "" : document.querySelector(t).getAttribute(a);},show : function (t){const item = document.querySelector(t);if(item){item.style.display = "block";}},hide : function (t){const item = document.querySelector(t);if(item){item.style.display = "none";}},rv : function (){},scrollTo : function (top){window.scrollTo({left: 0, top: top, behavior: 'smooth'})},setInnerHTML : function (elm, html){elm.innerHTML = html;Array.from(elm.querySelectorAll("script")).forEach( oldScript => {const newScript = document.createElement("script");Array.from(oldScript.attributes).forEach( attr => newScript.setAttribute(attr.name, attr.value) );newScript.appendChild(document.createTextNode(oldScript.innerHTML));oldScript.parentNode.replaceChild(newScript, oldScript);});},browser : function (){return "";},getCookie: function (cname) {let name = cname + "=";let decodedCookie = decodeURIComponent(document.cookie);let ca = decodedCookie.split(';');for(let i = 0; i <ca.length; i++) {let c = ca[i];while (c.charAt(0) == ' ') {c = c.substring(1);}if (c.indexOf(name) == 0) {return c.substring(name.length, c.length);}}return "";},setCookie: function (cname, cvalue){document.cookie = cname + "=" + cvalue + ";path=/";},setCookieExp: function(cname, cvalue, exhours) {const d = new Date();d.setTime(d.getTime() + (exhours*100*3600));let expires = "expires="+ d.toUTCString();document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/";}};BannerController = {init : function(){if(!Model.isMobile){if($("#snack_ldb").length){var observer = new MutationObserver(BannerController.onTopBanner);observer.observe(document.getElementById('snack_ldb'), {childList: true, subtree: true });}}},onTopBanner : function(mutationsList, observer){for(var mutation in mutationsList) { if (mutationsList[mutation].type === 'childList') {switch($("#snack_ldb").height()){case 250:$("#snack_ldb").attr("class","ad-container header-size size-250");$("#snack_ldb").siblings(".header-ad").attr("class","header-ad size-250");break;case "90":$("#snack_ldb").attr("class","ad-container header-size size-90");$("#snack_ldb").siblings(".header-ad").attr("class","header-ad size-90");break;}}}}};SearchView = {name:"SearchView",intervalId:0,index:0,navindex:0,searchInput:0,searchResults:0,placeHolders:0,isLoading:0,value:0,timeoutId:0,selectedItem:0,searchIconFrame:13,searchIconFrameWidth:22,searchFadeTimeout:0,searchResultTimeout:0,searchIconAnimationInterval:0,init: function(){SearchView.searchSprite = document.querySelector(".search-sprite");SearchView.searchInput = document.querySelector("#search-keywords");SearchView.searchResults = document.querySelector("#search-results-list");SearchView.placeHolders = ["Teams","Players","Tournaments","Games","Articles"];SearchView.searchInput.addEventListener("keyup",SearchView.search);SearchView.searchInput.addEventListener("input", function(e) {DOM.text(".search-line",SearchView.searchInput.value);});},search : function(e){switch(e.keyCode){case 13:if(SearchView.searchResults.querySelectorAll("li.selected a").length){window.location.href = SearchView.searchResults.querySelector("li.selected a").getAttribute("href");}return;case 40:SearchView.down();return;case 38:SearchView.up();return;}DOM.addClass("#search-preloader","transition-in");clearTimeout(SearchView.searchResultTimeout);DOM.removeClass("#search-results-list","transition-in");SearchView.value = SearchView.searchInput.value;if(SearchView.value.length > 1){clearTimeout(SearchView.timeoutId);SearchView.loadSearch();}else{DOM.removeClass("#search-preloader","transition-in");SearchView.isLoading = 0;SearchView.searchResults.innerHTML = "";}},loadSearch : function(){SearchView.isLoading = 1;SearchView.searchResults.innerHTML = "";SearchView.navindex = 0;DOM.ajax("search",{keyword:SearchView.value},"POST",'json',function(data){DOM.removeClass("#search-preloader","transition-in");clearTimeout(SearchView.searchResultTimeout);SearchView.searchResultTimeout = setTimeout(function () {DOM.addClass("#search-results-list","transition-in");}, 200);let sel = "selected";let n = 0;let html = "";for(let i in data.results){html += SearchView.listItem(data.results[i],sel,n);sel = '';n++;}if(n === 0 && data.possibles.length){for(let i in data.possibles){html += SearchView.possibleItem(data.possibles[i],sel,n);sel = '';n++;}}html += SearchView.newsItem(SearchView.value,sel,n);SearchView.searchResults.innerHTML = html;SearchView.setSelectedItem();document.querySelectorAll(".search-result-item").forEach(function (item, index){item.addEventListener("mouseover",function (){ if(!item.classList.contains("selected")){ item.classList.add("selected"); }});item.addEventListener("mouseout",function (){if(item.classList.contains("selected")){item.classList.remove("selected");}});});SearchView.isLoading = 0;},);},listItem : function(result,sel,n){return '<li class="search-result-item '+sel+' '+result.type+'" data-index="'+n+'"><a href="'+result.link+'"><span class="name">'+result.name+'</span><span class="meaning">'+result.meaning+'</span></a></li>';},possibleItem : function(result,sel,n){return '<li class="search-result-item '+sel+' '+result.value.type+'" data-index="'+n+'"><a href="'+result.value.link+'"><span class="name">'+result.label+'</span></a></li>';},newsItem : function(value,sel,n){return '<li class="search-result-item news '+sel+'" data-index="'+n+'"><a href="'+DOM.url + 'search/?s='+ value +'"><span class="name news">Search Rugbypass for ' + SearchView.value.substr(0,12) +'</span><span class="meaning">News</span></a></li>';},openSearch : function(){SearchView.init();SearchView.dealWithPreloader();clearTimeout(SearchView.searchFadeTimeout);DOM.removeClass('body','show-menu');DOM.addClass('body','search');DOM.show(".search-container");SearchView.toggleSearchIcon(true);clearInterval(SearchView.intervalId);SearchView.index = 0;SearchView.searchInput.setAttribute("placeholder","");setTimeout(function(){SearchView.setPlaceHolder();SearchView.intervalId = setInterval(SearchView.setPlaceHolder,4000);},500);SearchView.searchInput.focus();},dealWithPreloader : function () {DOM.removeClass("#search-preloader","transition-in");clearTimeout(SearchView.searchResultTimeout);DOM.addClass("#search-results-list","transition-in");},closeSearch : function(){SearchView.toggleSearchIcon(false);clearTimeout(SearchView.searchFadeTimeout);SearchView.searchFadeTimeout = setTimeout(function () {DOM.removeClass('body','search');DOM.removeClass(".close-search-btn","allow-hover");DOM.hide(".search-container");}, 400);SearchView.index = 0;clearInterval(SearchView.intervalId);SearchView.insertPlaceHolder();},toggleSearchIcon : function (toClose) {SearchView.dealWithPreloader();if(toClose){DOM.addClass(".search-sprite","close");} else {setTimeout(function (){DOM.removeClass(".search-sprite","close");}, 500);}},setPlaceHolder : function(){SearchView.index++;if(SearchView.index === SearchView.placeHolders.length){SearchView.index = 0;}SearchView.insertPlaceHolder();},insertPlaceHolder : function(){try{const word = SearchView.placeHolders[SearchView.index];let i = 0;let finalWord = "";const interval = setInterval(function(){finalWord += word[i];SearchView.searchInput.setAttribute("placeholder",finalWord);i++;if(i === word.length){clearInterval(interval);}},100);}catch (e){}},down : function() {const l = document.querySelectorAll(".search-result-item").length;if(!l) return;if(SearchView.navindex === l-1) return;SearchView.navindex++;DOM.removeClass(".search-result-item.selected","selected");SearchView.setSelectedItem();SearchView.selectedItem.classList.add("selected");},up : function() {const l = document.querySelectorAll(".search-result-item").length;if(!l) return;if(SearchView.navindex === 0) return;SearchView.navindex--;DOM.removeClass(".search-result-item.selected","selected");SearchView.setSelectedItem();SearchView.selectedItem.classList.add("selected");},setSelectedItem : function(){SearchView.selectedItem = document.querySelector(".search-result-item[data-index='"+SearchView.navindex+"']");},news : function(){},update : function(note){}};SiteSearch = {app:0,init : function(url,tz){const {createApp} = Vue;SiteSearch.app = createApp({data() {return {xhttp:false,url:url,tz:tz,cachedData:false,dataCached:false,searchOpen:false,keyword:"",tabIndex:0,searchResults:0,rptvResults:0,newsResults:0,matchesResults:0,noMatchResults:false,noRPTVResults:false,noNewsResults:false,sections:["All","Teams","Tournaments","Players","Matches","RPTV","News"]}},methods: {open(){this.searchOpen = true;if(!this.dataCached){this.ajax("cache");}},close(){this.searchOpen = false;setTimeout(()=>{DOM.removeClass('body','search');},800);},selectTab(i){if(i !== this.tabIndex){this.tabIndex = i;if(this.tabIndex === 4 && this.matchesResults === 0){this.ajax("matches");}if(this.tabIndex === 5 && this.rptvResults === 0){this.ajax("rptv");}if(this.tabIndex === 6 && this.newsResults === 0){this.ajax("news");}}},searchCache(){if(this.keyword.length > 2){this.noNewsResults = false;this.noMatchResults = false;this.noRPTVResults = false;this.tabIndex = 0;this.newsResults = 0;this.matchesResults = 0;this.rptvResults = 0;this.searchResults = {teams:this.filterData(this.cachedData.teams),players:this.filterData(this.cachedData.players),tournaments:this.filterData(this.cachedData.tournaments)};this.hasResults = true;}else{this.hasResults = false;}},filterData(list){let results = [];list.forEach((item,i) =>{let name = item.n.toLowerCase();if(name.indexOf(this.keyword.trim().toLowerCase()) > -1){results.push(item);}});return results;},ajax(path){if(this.xhttp){this.xhttp.abort();}this.xhttp = new XMLHttpRequest();let query = "";switch (path){case "news":case "matches":case "rptv":query = "?s=" + this.keyword + "&tz=" + this.tz;break;}this.xhttp.onreadystatechange = () => {if (this.xhttp.readyState === 4 && this.xhttp.status === 200) {let result = JSON.parse(this.xhttp.responseText);switch (path){case "cache":this.cachedData = result;this.dataCached = true;break;case "news":this.newsResults = result.news;this.noNewsResults = result.news.length === 0;break;case "matches":this.matchesResults = result.matches;this.noMatchResults = result.matches.length === 0;break;case "rptv":this.rptvResults = result.rptv;this.noRPTVResults = result.rptv.length === 0;break;}this.xhttp = false;}};this.xhttp.open("GET",this.url + "site-search/" + path + query, true);this.xhttp.send();},clear(){this.keyword = "";this.hasResults = false;this.noNewsResults = false;this.noMatchResults = false;this.noRPTVResults = false;this.matchesResults = 0;this.rptvResults = 0;this.newsResults = 0;this.tabIndex = 0;this.searchResults = {teams:[],players:[],tournaments:[]};},matchLink(game){return DOM.url + "live/" + game.u + "/?g=" + game.id;},teamLink(team){return DOM.url + "teams/" + team.u + "/";},playerLink(player){return DOM.url + "players/" + player.u + "/";},compLink(comp){return DOM.url + comp.u + "/";},newsLink(article){return DOM.url + (article.p ? "plus" : "news") + "/" + article.u + "/";},rptvLink(item){switch (item.t){case "LIVE":return "https://rugbypass.tv/live/" + item.id;default:return "https://rugbypass.tv/video/" + item.id;}},img(path,w){let parts = path.split("?");if(parts.length > 1){return "https://eu-cdn.rugbypass.com/webp-images/" + parts[0] + ".webp?maxw=" + w + "&" + parts[1];}return "https://eu-cdn.rugbypass.com/webp-images/" + path + ".webp?maxw=" + w}},mounted(){}}).mount("#site-search");},openSearch : function(){DOM.removeClass('body','show-menu');DOM.addClass('body','search');setTimeout(()=>{SiteSearch.app.open();},10);}};SiteSearchView = {app:0,init : function(url,tz,lang){const {createApp} = Vue;SiteSearchView.app = createApp({data() {return {cndVar:"5",xhttp:false,lang:lang,url:url,tz:tz,isSafari:false,loading:false,cachedData:false,dataCached:false,searchOpen:false,hasFilter:false,isTopSearch:false,keyword:"",type:"",filterIndex:0,filterTotal:0,tabIndex:0,tabId:0,selectedTab:0,filterResults:0,searchResults:0,hasResults:false,resultsType:0,fixtures:[],results:[],topResults:[],items:[],allTeams:[],allItems:[],allPlayers:[],allMatches:[],allRPTV:[],allNews:[],transInId:0,transInIndex:0,sections:["All","Teams","Tournaments","Players","Matches","RPTV","News"],position:0,}},methods: {open(){document.querySelector("body").classList.add("search-open");this.searchOpen = true;this.focusInput();if(!this.dataCached){this.ajax("cache");}},focusInput(){this.$nextTick(()=>{document.querySelector("#search-keyword").focus();});},close(){document.querySelector("body").classList.remove("search-open");this.searchOpen = false;setTimeout(()=>{DOM.removeClass('body','search');this.clear();},800);},selectTab(i){if(i === -1){i = 0;}if(i === this.searchResults.menu.length){i = this.searchResults.menu.length-1;}if(i !== this.tabIndex){this.tabIndex = i;this.filterIndex = 0;this.selectedTab = this.searchResults.menu[i];this.transInIndex = 0;document.querySelector(".results").scrollTop = 0;this.transIn();}},menuDisabled(item){switch (item.id){case "teams":return this.searchResults.teams.length === 0;case "players":return this.searchResults.players.length === 0;case "rptv":return this.searchResults.rptv.length === 0;case "news":return this.searchResults.news.length === 0;case "matches":return this.searchResults.matches.length === 0;case "tournaments":return this.searchResults.tournaments.length === 0;default:return false;}},searchCode(event){try {switch (event.keyCode){case 27:this.clear();break;case 40:this.filterIndex++;if(this.filterIndex === this.filterTotal){this.filterIndex = this.filterTotal - 1;}this.checkResultVisibility();break;case 38:this.filterIndex--;if(this.filterIndex === -1){this.filterIndex = 0;}this.checkResultVisibility();break;case 13:this.triggerFilter();break;default:this.filterIndex = 0;break;}}catch (e){}},searchFilter(event){try {switch (event.keyCode){case 27:case 40:case 38:case 13:return;}}catch (e){}this.keyword = document.querySelector("#search-keyword").value;if(this.keyword.length > 1){this.hasResults = false;this.tabIndex = 0;this.loading = false;this.filterResults = {teams:this.filterTeams(this.cachedData.teams),players:this.filterPlayers(this.cachedData.players),tournaments:this.filterData(this.cachedData.tournaments)};this.setFilteredTotal();this.hasFilter = true;this.isTopSearch = false;}else{this.hasFilter = false;if(this.keyword === ""){this.setTopSearch();}}},setFilteredTotal(){this.filterTotal = this.filterResults.teams.length + this.filterResults.players.length + this.filterResults.tournaments.length;},triggerFilter(){let items = [];this.filterResults.tournaments.forEach((item,i)=>{item.type = 'comp';items.push(item);});this.filterResults.teams.forEach((item,i)=>{item.type = 'team';items.push(item);});this.filterResults.players.forEach((item,i)=>{item.type = 'player';items.push(item);});this.selectFilter(items[this.filterIndex],items[this.filterIndex].type);},filterTeams(list){let results = [];list.forEach((item,i) =>{let name = item.n.toLowerCase();let h1 = item.h1.toLowerCase();let kw = item.k.toLowerCase();if(name.search(this.keyword.toLowerCase()) > -1 || h1.search(this.keyword.toLowerCase()) > -1 || this.checkKeyWords(kw)){results.push(item);}});return results;},filterPlayers(list){let results = [];list.forEach((item,i) =>{let name = item.n.toLowerCase();let kw = item.k.toLowerCase();if(name.search(this.keyword.toLowerCase()) > -1 || this.checkKeyWords(kw)){results.push(item);}});return results;},checkKeyWords(k){let valid = false;if(k !== ""){let a = k.split(",");a.forEach((item,i)=>{if(item.search(this.keyword.toLowerCase()) > -1){valid = true;}});}return valid;},filterData(list){let results = [];list.forEach((item,i) =>{let name = item.n.toLowerCase();if(name.search(this.keyword.toLowerCase()) > -1){results.push(item);}});return results;},resultName(){switch (this.type){case "comp":return this.searchResults.tournament.n;case "team":return this.searchResults.team.n;case "player":return this.searchResults.player.n;}return "";},ajax(path){if(this.xhttp){this.xhttp.abort();}this.loading = true;this.xhttp = new XMLHttpRequest();let query = "";let bz2 = "";let date = new Date();let dateStr = date.getFullYear()+"-"+(date.getMonth()+1)+"-"+date.getDate()+"-"+date.getHours();switch (path){case "cache":query = "?date="+dateStr+"-"+date.getMinutes() + "&ver=" + this.cndVar;break;case "search":query = "?t=" + this.type + "&i=" + this.id + "&tz=" + this.tz + "&bz2=" + bz2 + "&date="+dateStr + "&ver=" + this.cndVar + "&lang=" + this.lang;break;}this.xhttp.onreadystatechange = () => {if (this.xhttp.readyState === 4 && this.xhttp.status === 200) {let result = JSON.parse(this.xhttp.responseText);if(result.success){switch (path){case "cache":this.cachedData = result;this.dataCached = true;this.setTopSearch();break;case "search":this.searchResults = result.result;this.selectedTab = this.searchResults.menu[0];this.$nextTick(() => {this.setAllList();this.tabIndex = 0;this.filterIndex = 0;this.hasResults = true;this.hasFilter = false;this.keyword = "";this.setMatches();this.focusInput();this.transInIndex = 0;this.transIn();let name = "";switch (this.type){case "player":name = this.searchResults.player.n;break;case "team":name = this.searchResults.team.n;break;case "comp":name = this.searchResults.tournament.n;break;}DOM.ajax("count-search",{type:this.type,id:this.id,name:name},"post");});break;}}this.xhttp = false;this.loading = false;}};this.xhttp.open("GET",this.url + "site-search/" + path + query, true);this.xhttp.send();},setTopSearch(){this.filterResults = {teams:[],players:[],tournaments:[]};this.cachedData.top.forEach((item,i) =>{switch(item.type){case "comp":this.filterResults.tournaments.push(this.getItem(item.id,this.cachedData.tournaments));break;case "team":this.filterResults.teams.push(this.getItem(item.id,this.cachedData.teams));break;case "player":this.filterResults.players.push(this.getItem(item.id,this.cachedData.players));break;}});this.hasFilter = true;this.isTopSearch = true;this.setFilteredTotal();},getItem(id,items){let result = 0;items.forEach((item,i) =>{if(parseInt(item.id) === parseInt(id)){result = item;}});return result;},setAllList(){this.allItems = [];switch (this.type){case "player":this.addThreeItems("player",this.searchResults.players);this.addThreeItems("team",this.searchResults.teams);this.addThreeItems("tournament",this.searchResults.tournaments);this.addThreeFixtures("match",this.searchResults.matches);this.addThreeItems("news",this.searchResults.news);this.addThreeItems("rptv",this.searchResults.rptv);break;case "team":this.addThreeItems("team",this.searchResults.teams);this.addThreeItems("tournament",this.searchResults.tournaments);this.addThreeItems("player",this.searchResults.players);this.addThreeFixtures("match",this.searchResults.matches);this.addThreeItems("news",this.searchResults.news);this.addThreeItems("rptv",this.searchResults.rptv);break;case "comp":this.addThreeItems("tournament",this.searchResults.tournaments);this.addThreeItems("team",this.searchResults.teams);this.addThreeItems("player",this.searchResults.players);this.addThreeFixtures("match",this.searchResults.matches);this.addThreeItems("news",this.searchResults.news);this.addThreeItems("rptv",this.searchResults.rptv);break;}this.setOut();},setIsIn(list,value){let results = [];list.forEach((item,i) => {item.isIn = value;results.push(item)});return results;},addThreeItems(type,list){let items = list.slice(0,3);items.forEach(item => {item.type = type;this.allItems.push(item);});},addThreeFixtures(type,list){console.clear();let matches = [];let items = list.slice();while (matches.length < 3 && items.length > 0){let item = items.pop();if(item.s === 0){matches.push(item);}}if(matches.length === 0){matches = list.slice(0,3);}matches.forEach(item => {item.type = type;this.allItems.push(item);});},setResultType(i){this.resultsType = i;this.transInIndex = 0;this.transIn();},getThumb(url){return url.split("original").join("350x197");},setOut(){this.setIsIn(this.allItems,false);this.setIsIn(this.searchResults.teams,false);this.setIsIn(this.searchResults.players,false);this.setIsIn(this.searchResults.tournaments,false);this.setIsIn(this.searchResults.news,false);this.setIsIn(this.searchResults.rptv,false);},transIn(){clearInterval(this.transInId);this.setOut();this.$nextTick(() => {this.$nextTick(() => {this.setResultScroll(0);this.filterIndex = 0;console.log("transIn",this.selectedTab.id);this.transInId = setInterval(()=>{if(this.selectedTab.id === 'all'){if(this.allItems[this.transInIndex] !== undefined){this.allItems[this.transInIndex].isIn = true;this.transInIndex++;this.filterTotal = this.allItems.length;if(this.transInIndex === this.allItems.length){clearInterval(this.transInId);}}else{clearInterval(this.transInId);}}if(this.selectedTab.id === 'teams'){if(this.searchResults.teams[this.transInIndex] !== undefined){this.searchResults.teams[this.transInIndex].isIn = true;this.transInIndex++;this.filterTotal = this.searchResults.teams.length;if(this.transInIndex === this.searchResults.teams.length){clearInterval(this.transInId);}}else{clearInterval(this.transInId);}}if(this.selectedTab.id === 'players'){if(this.searchResults.players[this.transInIndex] !== undefined){this.searchResults.players[this.transInIndex].isIn = true;this.transInIndex++;this.filterTotal = this.searchResults.players.length;if(this.transInIndex === this.searchResults.players.length){clearInterval(this.transInId);}}else{clearInterval(this.transInId);}}if(this.selectedTab.id === 'tournaments'){if(this.searchResults.tournaments[this.transInIndex] !== undefined){this.searchResults.tournaments[this.transInIndex].isIn = true;this.transInIndex++;this.filterTotal = this.searchResults.tournaments.length;if(this.transInIndex === this.searchResults.tournaments.length){clearInterval(this.transInId);}}else{clearInterval(this.transInId);}}if(this.selectedTab.id === 'news'){if(this.searchResults.news[this.transInIndex] !== undefined){this.searchResults.news[this.transInIndex].isIn = true;this.transInIndex++;this.filterTotal = this.searchResults.news.length;if(this.transInIndex === this.searchResults.news.length){clearInterval(this.transInId);}}else{clearInterval(this.transInId);}}if(this.selectedTab.id === 'rptv'){if(this.searchResults.rptv[this.transInIndex] !== undefined){this.searchResults.rptv[this.transInIndex].isIn = true;this.transInIndex++;this.filterTotal = this.searchResults.rptv.length;if(this.transInIndex === this.searchResults.rptv.length){clearInterval(this.transInId);}}else{clearInterval(this.transInId);}}if(this.selectedTab.id === 'matches'){if(this.resultsType === 0){if(this.fixtures[this.transInIndex] !== undefined){this.fixtures[this.transInIndex].isIn = true;this.transInIndex++;this.filterTotal = this.fixtures.length;if(this.transInIndex === this.fixtures.length){clearInterval(this.transInId);}}else{clearInterval(this.transInId);}}if(this.resultsType === 1){if(this.results[this.transInIndex] !== undefined){this.results[this.transInIndex].isIn = true;this.transInIndex++;this.filterTotal = this.results.length;if(this.transInIndex === this.results.length){clearInterval(this.transInId);}}else{clearInterval(this.transInId);}}}},80);});});},setMatches(){this.resultsType = 0;this.results = [];this.fixtures = [];if(this.searchResults.matches !== undefined){this.searchResults.matches.forEach((item,i)=>{if(item.s === 1){this.results.push(item);}else{this.fixtures.push(item);}});}this.results.sort((a,b)=>{if(a.e === b.e) return 0;return a.e > b.e ? -1 : 1;});this.fixtures.sort((a,b)=>{if(a.e === b.e) return 0;return a.e < b.e ? -1 : 1;});if(this.fixtures.length === 0 && this.results.length > 0){this.resultsType = 1;}},clear(){this.keyword = "";this.hasResults = false;this.hasFilter = false;this.tabIndex = 0;this.setTopSearch();this.$nextTick(()=>{this.focusInput();});},selectFilter(item,type){this.keyword = item.n;this.type = type;this.id = item.id;this.hasFilter = false;this.ajax("search");},matchLink(game){return DOM.url + "live/" + game.u + "/?g=" + game.id;},teamLink(team){return DOM.url + "teams/" + team.u + "/";},playerLink(player){return DOM.url + "players/" + player.u + "/";},compLink(comp){return DOM.url + comp.u + "/";},newsLink(article){return DOM.url + (article.p ? "plus" : "news") + "/" + article.u + "/";},rptvLink(item){switch (item.t){case "LIVE":return "https://rugbypass.tv/live/" + item.id;default:return "https://rugbypass.tv/video/" + item.id;}},img(path,w){let parts = path.split("?");if(parts.length > 1){return "https://eu-cdn.rugbypass.com/webp-images/" + parts[0] + ".webp?maxw=" + w + "&" + parts[1];}return "https://eu-cdn.rugbypass.com/webp-images/" + path + ".webp?maxw=" + w},resultsCode(event){if(this.hasResults){event.preventDefault();switch (event.keyCode){case 27:this.clear();break;case 40:this.filterIndex++;if(this.filterIndex === this.filterTotal){this.filterIndex = this.filterTotal - 1;}this.checkResultVisibility();break;case 38:this.filterIndex--;if(this.filterIndex === -1){this.filterIndex = 0;}this.checkResultVisibility();break;case 39:let n = this.tabIndex + 1;let l = this.searchResults.menu.length - 1;while (this.menuDisabled(this.searchResults.menu[n]) && n < l){n++;}if(n === l && this.menuDisabled(this.searchResults.menu[n])){n = 0;}this.selectTab(n);break;case 37:let m = this.tabIndex - 1;if(m === -1){m = this.searchResults.menu.length - 1;}while (this.menuDisabled(this.searchResults.menu[m]) && m > -1){m--;}this.selectTab(m);break;case 13:this.triggerResult();break;}}},checkResultVisibility(){let results = document.querySelector(".site-search .results");let rect = results.getBoundingClientRect();let bnd = null;let top = 0;if(this.selectedTab.id === 'rptv'){let items = document.querySelectorAll(".site-search .results .rptv-results .group .list > div");bnd = items[this.filterIndex].getBoundingClientRect();top = bnd.top - rect.top;}else{let items = document.querySelectorAll(".site-search .results > div");bnd = items[this.filterIndex].getBoundingClientRect();top = bnd.top - rect.top;}if(bnd !== null){if(top + bnd.height > rect.height){let scrollY = results.scrollTop + Math.abs(top - rect.height) + bnd.height;this.setResultScroll(scrollY);}if(top < 0){let scrollY = results.scrollTop + top - bnd.height;this.setResultScroll(scrollY);}}},setResultScroll(scrollY){document.querySelector(".site-search .results").scrollTo(0,scrollY);},triggerResult(){let ele = null;if(this.selectedTab.id === 'rptv'){let items = document.querySelectorAll(".site-search .results .rptv-results .group .list > div");ele = items[this.filterIndex];}else{let items = document.querySelectorAll(".site-search .results > div");ele = items[this.filterIndex];}if(ele !== null){let a = ele.querySelector(".link-box");if(a !== null){a.click();}}},isMobile(){let userAgent = navigator.userAgent || navigator.vendor || window.opera;if (/windows phone/i.test(userAgent)) {return true}if (/android/i.test(userAgent)) {return true}if (/iPad|iPhone|iPod/.test(userAgent) && !window.MSStream) {return true}return false;}},mounted(){this.url = "https://eu-cdn.rugbypass.com/";window.addEventListener("keydown",(e)=> {this.resultsCode(e);});this.isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);}}).mount("#site-search");},openSearch : function(){DOM.removeClass('body','show-menu');DOM.addClass('body','search');setTimeout(()=>{SiteSearchView.app.open();},10);}};CountBannerView = {name:"CountBannerView",enableCounter:1,enableSeconds:1,sec:0,min:0,hour:0,day:0,intervalID:0,body:0,header:0,init : function (){CountBannerView.body = document.querySelector("body");CountBannerView.header = document.querySelector("header");CountBannerView.min = parseInt(DOM.text("#count-min"));CountBannerView.hour = parseInt(DOM.text("#count-hour"));CountBannerView.day = parseInt(DOM.text("#count-day"));CountBannerView.sec = parseInt(DOM.text("#count-sec"));if(CountBannerView.enableCounter){if(CountBannerView.enableSeconds) {CountBannerView.intervalID = setInterval(CountBannerView.countDownSeconds, 1000);}else{CountBannerView.intervalID = setInterval(CountBannerView.countDown, 60000);}}window.addEventListener("scroll",function (e){CountBannerView.scroll(window.scrollY);})},countDownSeconds : function (){CountBannerView.sec--;if(CountBannerView.sec === -1){CountBannerView.sec = 59;CountBannerView.countDown();}DOM.text("#count-min",CountBannerView.setTwoDigit(CountBannerView.min));DOM.text("#count-hour",CountBannerView.setTwoDigit(CountBannerView.hour));DOM.text("#count-day",CountBannerView.setTwoDigit(CountBannerView.day));DOM.text("#count-sec",CountBannerView.setTwoDigit(CountBannerView.sec));},countDown : function (){CountBannerView.min--;if(CountBannerView.min === -1){CountBannerView.min = 59;if (CountBannerView.day === 0 && CountBannerView.hour === 0){CountBannerView.min = 0;clearInterval(CountBannerView.intervalID);DOM.addClass(".lions-countdown","no-count-down");}else{CountBannerView.hour--;}if(CountBannerView.hour === -1){CountBannerView.hour = 23;if (CountBannerView.day === 0){CountBannerView.hour = 0;}CountBannerView.day--;if(CountBannerView.day === -1){CountBannerView.day = 0;}}}DOM.text("#count-min",CountBannerView.setTwoDigit(CountBannerView.min));DOM.text("#count-hour",CountBannerView.setTwoDigit(CountBannerView.hour));DOM.text("#count-day",CountBannerView.setTwoDigit(CountBannerView.day));DOM.text("#count-sec",CountBannerView.setTwoDigit(CountBannerView.sec));},setTwoDigit : function (value){return value < 10 ? "0" + value : value;},scroll: function (st){if(!CountBannerView.body.classList.contains("hide-notice") && !CountBannerView.body.classList.contains("countdown-banner")) return;const maxTop = DOM.visible("#under-or-equal-to-1200") ? 168 : 120;CountBannerView.header.style.top = Math.max(-maxTop,-st) + "px";}};MainHeaderView = {name:"MainHeaderView",menuOn:false,openMenuTimeout:0,isMobileMenu:0,initialized:0,body:0,login:0,scrollY:0,setScrollY:0,init : function (){if(MainHeaderView.initialized) return;MainHeaderView.initialized = 1;MainHeaderView.body = document.querySelector("body");document.querySelectorAll(".expand-menu").forEach(function (item, index){item.addEventListener("open",function (){MainHeaderView.closeAllDropdowns();item.classList.add("open");item.addEventListener("mousedown",function (e){e.stopPropagation();});window.addEventListener("mousedown",function (){item.dispatchEvent(new Event('close'));});});item.addEventListener("close",function (){item.classList.remove("open");item.removeEventListener("mousedown",function (e){e.stopPropagation();});window.removeEventListener("mousedown",function (){item.dispatchEvent(new Event('close'));});});item.querySelector(".label").addEventListener("click",function (e){if(item.classList.contains("open")){item.dispatchEvent(new Event('close'));}else{item.dispatchEvent(new Event('open'));}});if(item.querySelector(".title") !== null){item.querySelector(".title").addEventListener("click",function (e){item.dispatchEvent(new Event('close'));});}});MainHeaderView.resize();document.querySelectorAll("#tournaments-list li").forEach(function (item, index){item.addEventListener("mouseover",function (){if(MainHeaderView.isMobileMenu) return;const teamMenu = item.querySelector(".team-menu");if(teamMenu){document.querySelector("#tournaments-list-bg").classList.add("show");teamMenu.classList.add("show");console.log("Over 3");}});item.addEventListener("mouseout",function (){if(MainHeaderView.isMobileMenu) return;const teamMenu = item.querySelector(".team-menu");if(teamMenu){teamMenu.classList.remove("show");document.querySelector("#tournaments-list-bg").classList.remove("show");}});});if(document.querySelector("header .close-notice")) {document.querySelector("header .close-notice").addEventListener("click", function () {MainHeaderView.body.classList.add("hide-notice");MainHeaderView.body.classList.remove("countdown-banner");DOM.ajax("hide-notice", {}, "post", "html", function () {});});}window.addEventListener("resize",MainHeaderView.resize);window.addEventListener("scroll",MainHeaderView.scroll);window.addEventListener("hashchange", MainHeaderView.locationHashChanged, false);if(MainHeaderView.login){const userMenu = document.querySelector("#user-menu");userMenu.addEventListener("open",function (){userMenu.classList.add("open");userMenu.addEventListener("mousedown",function (e){e.stopPropagation();});window.addEventListener("mousedown",function (){userMenu.dispatchEvent(new Event('close'));});});userMenu.addEventListener("close",function (){userMenu.classList.remove("open");userMenu.removeEventListener("mousedown",function (e){e.stopPropagation();});window.removeEventListener("mousedown",function (){userMenu.dispatchEvent(new Event('close'));});});userMenu.addEventListener("click",function (){userMenu.dispatchEvent(new Event('open'));});}},locationHashChanged: function () {switch(location.hash){case "#user-login":UserView.scrollToComments = 1;UserView.toggleLogin();location.hash = "#n";break;}},closeAllDropdowns : function () {document.querySelectorAll(".expand-menu").forEach(function (item, index){item.dispatchEvent(new Event('close'));});},showTeamMenu: function (uri) {document.querySelector("#team_" + uri).classList.toggle("expand");},toggleMobileAccountBox : function () {document.querySelector("#mobile-account-box").classList.toggle("show");},toggleBurgerMenu : function () {GATracking.sendEvent('Interaction','burger_menu','burger_menu','1');if(MainHeaderView.menuOn){MainHeaderView.closeMenu();}else{MainHeaderView.openMenu();}},openMenu : function(){if(!MainHeaderView.menuOn){window.scrollTo({top:0, left: 0, behavior: 'smooth'});MainHeaderView.body.classList.add("show-menu");DOM.hide("#m-bg");DOM.hide("#content");DOM.hide("#footer");MainHeaderView.menuOn = true;}},closeMenu : function(){if(MainHeaderView.menuOn){MainHeaderView.body.classList.remove("show-menu");DOM.show("#m-bg");DOM.show("#content");DOM.show("#footer");document.querySelectorAll(".dropdown").forEach(function (item, index){item.classList.remove("open");});MainHeaderView.menuOn = false;}},scroll : function (){MainHeaderView.scrollY = window.scrollY;},resize : function (){MainHeaderView.isMobileMenu = DOM.visible("#under-or-equal-to-990");}};GlobalView = {validateEmail:function (address) {const reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;return reg.test(address);},shareFacebook : function(){GATracking.sendDataLayerEvent('shareFacebook');FB.ui({method: 'share',href: window.location.href}, function(response){});},shareTwitter : function(text){GATracking.sendDataLayerEvent('shareTwitter');if(!text){text = document.querySelector("title").innerText;}window.open("http://twitter.com/intent/tweet?text=" + text + "&url=" + window.location.href,"","width=500, height=300");},shareLinkedIn : function(title,summary){window.open("https://www.linkedin.com/shareArticle?mini=true&url="+window.location.href+"&title="+title+"&summary"+summary+"=&source=","","width=500, height=300");},shareWhatsApp : function(title){GATracking.sendDataLayerEvent('shareWhatsApp');window.open("https://wa.me/?text="+encodeURIComponent(title + " - " + window.location.href),"","width=500, height=300");},sharePinInterest : function(media,description){GATracking.sendDataLayerEvent('sharePinInterest');window.open("https://pinterest.com/pin/create/button/?url="+window.location.href+"&media=" + media + "&description=" + description,"","width=500, height=300");},shareMessenger : function(){GATracking.sendDataLayerEvent('shareMessenger');window.open('fb-messenger://share?link=' + encodeURIComponent(window.location.href) + '&app_id=' + encodeURIComponent(1472967632714342),"","width=500, height=300");},copyToClipboard : function(){GATracking.sendDataLayerEvent('copyToClipboard');const copyTextarea = document.querySelector('.js-copytextarea');copyTextarea.select();try {const successful = document.execCommand('copy');const msg = successful ? 'successful' : 'unsuccessful';if(successful){copyTextarea.parentElement.querySelector(".clipboard").classList.add("show");setTimeout(function (){copyTextarea.parentElement.querySelector(".clipboard").classList.remove("show");},2000);}} catch (err) {}},modalCopyToClipboard : function(){GATracking.sendDataLayerEvent('copyToClipboard');const copyTextarea = document.querySelector('.js-copytextarea');copyTextarea.select();try {const successful = document.execCommand('copy');const msg = successful ? 'successful' : 'unsuccessful';if(successful){document.querySelector("#article-share-modal-clipboard").innerHTML = "Link copied";setTimeout(function (){document.querySelector("#article-share-modal-clipboard").innerHTML = "Copy link";},2000);}} catch (err) {}},wikiCopyToClipboard : function(){const copyTextarea = document.querySelector('.js-copytextarea');copyTextarea.select();try {const successful = document.execCommand('copy');const msg = successful ? 'successful' : 'unsuccessful';if(successful){copyTextarea.parentElement.querySelector(".clipboard").classList.add("show");setTimeout(function (){copyTextarea.parentElement.querySelector(".clipboard").classList.remove("show");},2000);}} catch (err) {}},mobileShare : function(title){if (navigator.share) {GATracking.sendDataLayerEvent('shareMobile');navigator.share({title: 'RugbyPass News',text: title,url: window.location.href});}},showShareModal(){let modal = document.querySelector('.article-share-modal');if(modal !== null){modal.classList.add('show');}},closeShareModal(){let modal = document.querySelector('.article-share-modal');if(modal !== null){modal.classList.remove('show');}}};MegaMenuView = {body:0,header:0,nav:0,key:0,isMobile:0,eventState:0,megaTimeout:0,currentSt:0,lastCheckedSt:0,upScrollCount:0,isMatchCentre:0,init : function (){MegaMenuView.body = document.querySelector("body");MegaMenuView.header = document.querySelector("header");MegaMenuView.nav = document.querySelector("header nav");MegaMenuView.isMatchCentre = MegaMenuView.body.classList.contains("match-center");if(MegaMenuView.isMatchCentre){MegaMenuView.body.classList.add("animate");}MegaMenuView.setEvents();document.querySelectorAll(".account-select-box").forEach(function (ele, index){ele.addEventListener("open",function (){ele.classList.add("open");ele.addEventListener(MegaMenuView.isMobile ? "touchstart" : "mousedown",function (e){e.stopPropagation();});window.addEventListener(MegaMenuView.isMobile ? "touchstart" : "mousedown",function (){ele.dispatchEvent(new Event('close'));});});ele.addEventListener("close",function (){ele.classList.remove("open");ele.removeEventListener(MegaMenuView.isMobile ? "touchstart" :"mousedown",function (e){e.stopPropagation();});window.removeEventListener(MegaMenuView.isMobile ? "touchstart" :"mousedown",function (){ele.dispatchEvent(new Event('close'));});});ele.addEventListener(MegaMenuView.isMobile ? "touchstart" : "click",function (){if(ele.classList.contains("open")){ele.dispatchEvent(new Event('close'));}else{ele.dispatchEvent(new Event('open'));}});});window.addEventListener("hashchange", MegaMenuView.locationHashChanged, false);window.addEventListener("message", function (event){if(event.data.action !== undefined){switch (event.data.action){case "mailchimp-banner":grecaptcha.ready(function() {grecaptcha.execute(MegaMenuView.key, {action: 'submit'}).then(function(token) {DOM.ajax("mailchimp-popup",{email:event.data.email, token: token},"POST","json",function (data){if(data.success){event.source.postMessage(data,event.origin);}});});});break;}}}, false);},locationHashChanged: function () {switch(location.hash){case "#user-login":UserView.scrollToComments = 1;UserView.toggleLogin();location.hash = "#n";break;}},showEditionPopup : function (){const edition = document.querySelector(".geo-toggle-mobile");if(edition){edition.classList.add("show");}},closeEditionPopup : function (){const edition = document.querySelector(".geo-toggle-mobile");if(edition){edition.classList.remove("show");}},resize : function (){},setEvents : function (){document.querySelectorAll("header nav .main-menu > li").forEach(function (item, index){if(!item.classList.contains("no-mega")) {item.addEventListener(MegaMenuView.isMobile ? "touchstart" : "mouseover", function (e) {if (!DOM.visible("#under-or-equal-to-1150")) {clearTimeout(MegaMenuView.megaTimeout);MegaMenuView.megaTimeout = setTimeout(function () {MegaMenuView.expandMegaMenuItem(item);}, 200);}});item.addEventListener(MegaMenuView.isMobile ? "touchend" : "mouseleave", function () {if (!DOM.visible("#under-or-equal-to-1150")) {clearTimeout(MegaMenuView.megaTimeout);MegaMenuView.megaTimeout = setTimeout(function () {MegaMenuView.contractMegaMenuItem(item);}, 800);}});item.addEventListener(MegaMenuView.isMobile ? "touchstart" : "mousedown", function () {if (DOM.visible("#under-or-equal-to-1150")) {MegaMenuView.closeOthers(item);item.classList.add("show");MegaMenuView.body.classList.add("show-mega");let dmenu = document.querySelector('.d-menu');dmenu.setAttribute("data-selected", item.getAttribute('data-index'));MegaMenuView.body.classList.remove("cropped");MegaMenuView.body.classList.add("fade-out-menu");}});const backTitle = item.querySelector(".mega-menu .back-title");if (backTitle !== null) {backTitle.addEventListener(MegaMenuView.isMobile ? "touchstart" : "click", function () {MegaMenuView.body.classList.remove("show-mega");let dmenu = document.querySelector('.d-menu');dmenu.setAttribute("data-selected", "-1");setTimeout(function () {item.classList.remove("show");MegaMenuView.body.classList.add("cropped");MegaMenuView.body.classList.remove("fade-out-menu");}, 200);});}if (item.querySelector(".mega-menu .bg") !== null) {item.querySelector(".mega-menu .bg").addEventListener(MegaMenuView.isMobile ? "touchstart" : "mousedown", function () {clearTimeout(MegaMenuView.megaTimeout);MegaMenuView.body.classList.remove("show-mega");let dmenu = document.querySelector('.d-menu');dmenu.setAttribute("data-selected", "-1");setTimeout(function () {item.classList.remove("show");MegaMenuView.body.classList.add("cropped");MegaMenuView.body.classList.remove("fade-out-menu");MegaMenuView.body.classList.remove("show-mega");document.querySelectorAll(".main-menu li").forEach(function (item, index) {item.classList.remove("show");});}, 200);});}}if(item.classList.contains("small-menu")) {item.addEventListener(MegaMenuView.isMobile ? "touchstart" : "mouseover", function (e) {if (!DOM.visible("#under-or-equal-to-1150")) {item.classList.add("show");}});item.addEventListener(MegaMenuView.isMobile ? "touchend" : "mouseleave", function () {if (!DOM.visible("#under-or-equal-to-1150")) {item.classList.remove("show");}});item.addEventListener(MegaMenuView.isMobile ? "touchstart" : "mousedown", function (e) {if (DOM.visible("#under-or-equal-to-1150")) {item.classList.add("show");}});const backTitle = item.querySelector(".back-title");if (backTitle !== null) {backTitle.addEventListener(MegaMenuView.isMobile ? "touchstart" : "click", function () {item.classList.remove("show");});}}});window.addEventListener("scroll",MegaMenuView.scroll);},megaLazy : function (){document.querySelectorAll(".mega-lazy").forEach(function (ele, index){ele.classList.add("lazy");ele.classList.remove("mega-lazy");});},expandMegaMenuItem : function (item) {MegaMenuView.closeOthers(item);item.classList.add("show");MegaMenuView.body.classList.add("show-mega");MegaMenuView.megaLazy();let itemH = item.querySelector('.mega-menu .menu-container').offsetHeight;document.querySelector("#mega-menu-bg").style.maxHeight = (itemH + 116) + "px";document.querySelectorAll(".mega-menu").forEach(function (ele, index){ele.style.maxHeight = (itemH) + "px";});},contractMegaMenuItem : function (item) {document.querySelectorAll(".main-menu li").forEach(function (item, index){item.classList.remove("show");});MegaMenuView.body.classList.remove("show-mega");},scroll : function () {var st = window.pageYOffset;if(MegaMenuView.isMatchCentre){MegaMenuView.closeOthers();MegaMenuView.body.classList.remove("show-mega");}else{if(st > MegaMenuView.lastCheckedSt){MegaMenuView.body.classList.add("hide-header");MegaMenuView.upScrollCount = 0;} else {MegaMenuView.upScrollCount += (MegaMenuView.lastCheckedSt - st);if(MegaMenuView.upScrollCount > 90){MegaMenuView.body.classList.remove("hide-header");} else {MegaMenuView.body.classList.add("hide-header");}}if(st < 150){MegaMenuView.body.classList.remove("hide-header");}MegaMenuView.lastCheckedSt = st;}},closeOthers : function (){document.querySelectorAll(".main-menu li").forEach(function (item, index){item.classList.remove("show");});},toggleBurgerMenu : function () {if(MegaMenuView.menuOn){MegaMenuView.closeMenu();}else{MegaMenuView.openMenu();}},openMenu : function(){if(!MegaMenuView.menuOn){MegaMenuView.currentSt = window.pageYOffset;let dmenu2 = document.querySelector('.d-menu');dmenu2.setAttribute("data-selected","-1");window.scrollTo({top:0, left: 0, behavior: 'smooth'});MegaMenuView.body.classList.add("show-menu");MegaMenuView.body.classList.remove("show-mega");MegaMenuView.body.classList.add("cropped");MegaMenuView.body.classList.remove("fade-out-menu");MegaMenuView.body.classList.remove("hide-header");MegaMenuView.megaLazy();let extra = 137;let mainDiv = document.querySelector('main');mainDiv.style.top = (-MegaMenuView.currentSt + extra) + "px";DOM.hide("#m-bg");DOM.hide("#content");DOM.hide("#footer");MegaMenuView.menuOn = true;document.querySelectorAll(".main-menu li").forEach(function (item, index){item.classList.remove("show");});}},closeMenu : function(){if(MegaMenuView.menuOn){let mainDiv = document.querySelector('main');mainDiv.style.top = "0px";MegaMenuView.body.classList.remove("show-menu");MegaMenuView.body.classList.remove("show-mega");MegaMenuView.body.classList.remove("hide-header");DOM.show("#m-bg");DOM.show("#content");DOM.show("#footer");MegaMenuView.menuOn = false;window.scrollTo(0,MegaMenuView.currentSt);}},closeRWCBanner : function(){DOM.ajax("close-rwc-banner",{},"post","html",function (){document.querySelector(".wrwc-footer").classList.add("closed");});},navigateEdition : function (url,code){GATracking.sendEvent('Interaction','edition_pick','edition_pick','1');DOM.ajax("geo-toggle",{code:code},"post","html",function (){window.location.href = url;});}};HeaderView = {body:0,mcAdd:0,megaTimeout:0,scrollY:0,isMatchCentre:0,upScrollCount:0,lastCheckedSt:0,selected:0,blockShow:0,init : function (){HeaderView.body = document.querySelector("body");HeaderView.mcAdd = document.querySelector(".mc-banner");if(HeaderView.body.classList.contains("match-center")){HeaderView.body.classList.add("animate");}HeaderView.setEvents();},scroll : function () {let st = window.scrollY;if(HeaderView.isMatchCentre){HeaderView.closeOthers();HeaderView.body.classList.remove("show-mega");}else{if(st > HeaderView.lastCheckedSt){HeaderView.body.classList.add("hide-header");HeaderView.upScrollCount = 0;} else {HeaderView.upScrollCount += (HeaderView.lastCheckedSt - st);if(HeaderView.upScrollCount > 90){if(HeaderView.blockShow === 0){HeaderView.body.classList.remove("hide-header");}} else {HeaderView.body.classList.add("hide-header");}}if(st < 150){if(HeaderView.blockShow === 0){HeaderView.body.classList.remove("hide-header");}}HeaderView.lastCheckedSt = st;}if(HeaderView.mcAdd !== null){if(window.scrollY > 250) {HeaderView.mcAdd.classList.remove("out");}else{HeaderView.mcAdd.classList.add("out");}}},setEvents : function (){HeaderView.selected = [];document.querySelectorAll(".menu-item.selected").forEach(function (item, index){HeaderView.selected.push(item);});let userName = document.querySelector(".user-name .label");if(userName !== null){userName.addEventListener(MegaMenuView.isMobile ? "touchstart" : "mousedown", function (e) {document.querySelector(".user-name .account-box").classList.toggle("show");e.stopPropagation();});document.querySelector(".user-name .account-box").addEventListener(MegaMenuView.isMobile ? "touchstart" : "mousedown", function (e) {e.stopPropagation();});window.addEventListener(MegaMenuView.isMobile ? "touchstart" : "mousedown", function () {document.querySelector(".user-name .account-box").classList.remove("show");});}document.querySelectorAll(".desktop-nav .menu-item").forEach(function (item, index){if(!item.classList.contains("no-mega")) {item.addEventListener(DOM.isMobile ? "touchstart" : "mouseover", function (e) {HeaderView.selected.forEach(function (node, i){if(node !== item){node.classList.remove("selected");}});if (!DOM.visible("#under-or-equal-to-1150")) {clearTimeout(HeaderView.megaTimeout);HeaderView.megaTimeout = setTimeout(function () {HeaderView.expandMegaMenuItem(item);}, 100);}});item.addEventListener(DOM.isMobile ? "touchend" : "mouseleave", function () {if (!DOM.visible("#under-or-equal-to-1150")) {clearTimeout(HeaderView.megaTimeout);HeaderView.megaTimeout = setTimeout(function () {HeaderView.contractMegaMenuItem(item);HeaderView.selected.forEach(function (node, i){node.classList.add("selected");});}, 800);}});item.querySelector(".menu-label").addEventListener(MegaMenuView.isMobile ? "touchstart" : "mousedown", function () {if (DOM.visible("#under-or-equal-to-1150")) {HeaderView.closeOthers(item);HeaderView.megaLazy();item.classList.add("show");HeaderView.body.classList.add("show-mega");}});const backTitle = item.querySelector(".mega-menu .back-title");if (backTitle !== null) {backTitle.addEventListener(MegaMenuView.isMobile ? "touchstart" : "click", function () {HeaderView.body.classList.remove("show-mega");setTimeout(function () {item.classList.remove("show");}, 200);});}}else{item.addEventListener(DOM.isMobile ? "touchstart" : "mouseover", function (e) {if (!DOM.visible("#under-or-equal-to-1150")) {HeaderView.closeOthers();HeaderView.body.classList.remove("show-mega");clearTimeout(HeaderView.megaTimeout);HeaderView.selected.forEach(function (node, i){if(node !== item){node.classList.remove("selected");}});}});item.addEventListener(DOM.isMobile ? "touchend" : "mouseleave", function () {if (!DOM.visible("#under-or-equal-to-1150")) {HeaderView.selected.forEach(function (node, i){node.classList.add("selected");});}});}if(item.classList.contains("small-menu")) {item.addEventListener(MegaMenuView.isMobile ? "touchstart" : "mouseover", function (e) {if (!DOM.visible("#under-or-equal-to-1150")) {item.classList.add("show");}});item.addEventListener(MegaMenuView.isMobile ? "touchend" : "mouseleave", function () {if (!DOM.visible("#under-or-equal-to-1150")) {item.classList.remove("show");}});item.addEventListener(MegaMenuView.isMobile ? "touchstart" : "mousedown", function (e) {if (DOM.visible("#under-or-equal-to-1150")) {item.classList.add("show");}});const backTitle = item.querySelector(".back-title");if (backTitle !== null) {backTitle.addEventListener(MegaMenuView.isMobile ? "touchstart" : "click", function () {item.classList.remove("show");});}}});window.addEventListener("scroll",HeaderView.scroll);window.addEventListener("resize",HeaderView.resize);},resize : function (){if(HeaderView.body.classList.contains("show-menu") && !DOM.visible("#under-or-equal-to-1023")){HeaderView.body.classList.remove("show-menu");DOM.show("main");DOM.show("#footer");}},expandMegaMenuItem : function (item) {HeaderView.closeOthers();item.classList.add("show");HeaderView.body.classList.add("show-mega");HeaderView.megaLazy();let itemH = item.querySelector('.mega-menu .menu-container').offsetHeight;document.querySelector(".mega-bg").style.maxHeight = (itemH + 119) + "px";document.querySelectorAll(".mega-menu").forEach(function (ele, index){ele.style.maxHeight = (itemH) + "px";});},contractMegaMenuItem : function (item) {document.querySelectorAll(".desktop-nav .menu-item").forEach(function (item, index){item.classList.remove("show");});HeaderView.body.classList.remove("show-mega");},closeOthers : function (){document.querySelectorAll(".desktop-nav .menu-item").forEach(function (item, index){item.classList.remove("show");});},megaLazy : function (){document.querySelectorAll(".mega-lazy").forEach(function (ele, index){ele.classList.add("lazy");ele.classList.remove("mega-lazy");});},showEditionPopup : function (){const edition = document.querySelector(".geo-toggle-mobile");if(edition){edition.classList.add("show");}},toggleBurgerMenu : function () {HeaderView.closeOthers();if(HeaderView.body.classList.contains("show-menu")){HeaderView.body.classList.remove("show-menu");HeaderView.body.classList.remove("show-mega");DOM.show("main");DOM.show("#footer");window.scrollTo(0,HeaderView.scrollY);}else{HeaderView.body.classList.add("show-menu");HeaderView.scrollY = window.scrollY;window.scrollTo({top:0, left: 0, behavior: 'smooth'});DOM.hide("main");DOM.hide("#footer");}}};GATracking = {sendDataLayerEvent : function(event) {try{if(dataLayer !== null){dataLayer.push({'event':event});}}catch(e){}},sendEvent : function (category,action,label,value){if(dataLayer !== null) {dataLayer.push({'event': 'shareFacebook'});}},getName : function (){const trackers = ga.getAll();trackers.forEach(function (item, index){console.log(item.get('trackingId'));if(item.get('trackingId') === "UA-42069532-13"){console.log("Selected: " + item.get('trackingId'));return item.get('name');}});return trackers[0].get('name');},testTrack : function (){ga('create', 'UA-42069532-13');ga(function(tracker) {ga(tracker.get("name") + '.send', 'event', {'eventCategory': 'articles','eventAction': 'next-article','eventLabel': 'Next Article','eventValue': 1});});}};LinkRefractor = {init : function (){document.querySelectorAll("a").forEach(function (ele, index){let url = ele.getAttribute("href");if(url !== null){if(url.indexOf("https://rugbypass.tv") === 0 || url.indexOf("http://rugbypass.tv") === 0 || url.indexOf("https://www.rugbypass.tv") === 0 || url.indexOf("http://www.rugbypass.tv") === 0){let a = url.split("?");if(a.length === 1){ele.setAttribute("href",url + "?utm_source=rugbypass.com&utm_medium=referral&utm_campaign=RPTV&utm_content=acquisition&esrefid=e7c1f8c4-ad04-41e6-b3a6-647efa7501c0");}}}});}};UserView = {uid:0,ssoLoginUrl:0,useSSOLogin:0,loginInterval:0,ssoLogin: function (){window.location.href = UserView.ssoLoginUrl;},closeSSOLogin: function (){document.querySelector(".sso-login").classList.remove("show");clearInterval(UserView.loginInterval);},register : function (){UserView.ssoLogin();},toggleLogin : function (){UserView.ssoLogin();},};SSOLogin = {init: function (){if(window.location.hash) {let parts = window.location.hash.split("=");if(parts.shift() === "#id_token"){let value = parts.join("");console.log(value);}}}};AddServer = {device:"Desktop",iu: function (){switch (AddServer.device){case "iOS":return "/6428571,91282419/RugbyPass-Video-iOS&description_url=rugbypass.com&tfcd=0&npa=0&sz=640x480&gdfp_req=1&output=vast&unviewed_position_start=1&env=vp&impl=s&correlator=";case "Android":return "/6428571,91282419/RugbyPass-Video-Android&description_url=rugbypass.com&tfcd=0&npa=0&sz=640x480&gdfp_req=1&output=vast&unviewed_position_start=1&env=vp&impl=s&correlator="}return "/6428571,91282419/RugbyPass-Video-Desktop&description_url=rugbypass.com&tfcd=0&npa=0&sz=640x480&gdfp_req=1&output=vast&unviewed_position_start=1&env=vp&impl=s&correlator=";},url: function (){return "https://pubads.g.doubleclick.net/gampad/ads?iu=" + AddServer.iu();}};PageViewTracking = {completed:[],send: function(type,id,path) {let key = type + "-" + id;if(PageViewTracking.completed[key] !== 1) {PageViewTracking.completed[key] = 1;const xhttp = new XMLHttpRequest();xhttp.open("get",DOM.url + 'api/tracking/' +type + "/" + id + "/" + path, true);const form = new FormData();xhttp.send(form);}}};function MailchimpPopup(id,key){this.key = key;this.form = document.querySelector("#" + id);this.thnks = this.form.querySelector(".thanks");this.token = this.form.querySelector("input[name='token']");this.email = this.form.querySelector("input[name='email']");this.btn = this.form.querySelector(".btn");const scope = this;this.form.querySelector(".btn").addEventListener("click",function (){scope.submit();});this.form.querySelector(".btn").addEventListener("touchstart",function (){scope.submit();});}MailchimpPopup.prototype.submit = function (){if(GlobalView.validateEmail(this.email.value)){const scope = this;this.btn.classList.add("sending");grecaptcha.ready(function() {grecaptcha.execute(scope.key, {action: 'submit'}).then(function(token) {DOM.ajax("mailchimp-popup",{email: scope.email.value, token: token},"POST","json",function (data){ if(data.success){ scope.form.classList.add("sent"); scope.btn.classList.remove("sending"); scope.email.value = ""; }});});});}};!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.Glide=e()}(this,function(){"use strict";var n={type:"slider",startAt:0,perView:1,focusAt:0,gap:10,autoplay:!1,hoverpause:!0,keyboard:!0,bound:!1,swipeThreshold:80,dragThreshold:120,perSwipe:"|",touchRatio:.5,touchAngle:45,animationDuration:400,rewind:!0,rewindDuration:800,animationTimingFunc:"cubic-bezier(.165, .840, .440, 1)",waitForTransition:!0,throttle:10,direction:"ltr",peek:0,breakpoints:{},classes:{swipeable:"glide--swipeable",dragging:"glide--dragging",direction:{ltr:"glide--ltr",rtl:"glide--rtl"},type:{slider:"glide--slider",carousel:"glide--carousel"},slide:{clone:"glide__slide--clone",active:"glide__slide--active"},arrow:{disabled:"glide__arrow--disabled"},nav:{active:"glide__bullet--active"}}};function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t=function(t,e,n){return e&&s(t.prototype,e),n&&s(t,n),t};function s(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var a=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t};function y(t){return parseInt(t)}function o(t){return"string"==typeof t}function u(t){var e=void 0===t?"undefined":r(t);return"function"===e||"object"===e&&!!t}function c(t){return"function"==typeof t}function l(t){return void 0===t}function f(t){return t.constructor===Array}function d(t,e,n){Object.defineProperty(t,e,n)}function h(t,e){var n=a({},t,e);return e.hasOwnProperty("classes")&&(n.classes=a({},t.classes,e.classes),e.classes.hasOwnProperty("direction")&&(n.classes.direction=a({},t.classes.direction,e.classes.direction)),e.classes.hasOwnProperty("type")&&(n.classes.type=a({},t.classes.type,e.classes.type)),e.classes.hasOwnProperty("slide")&&(n.classes.slide=a({},t.classes.slide,e.classes.slide)),e.classes.hasOwnProperty("arrow")&&(n.classes.arrow=a({},t.classes.arrow,e.classes.arrow)),e.classes.hasOwnProperty("nav")&&(n.classes.nav=a({},t.classes.nav,e.classes.nav))),e.hasOwnProperty("breakpoints")&&(n.breakpoints=a({},t.breakpoints,e.breakpoints)),n}var v=(t(e,[{key:"on",value:function(t,e){if(f(t))for(var n=0;n<t.length;n++)this.on(t[n],e);this.hop.call(this.events,t)||(this.events[t]=[]);var i=this.events[t].push(e)-1;return{remove:function(){delete this.events[t][i]}}}},{key:"emit",value:function(t,e){if(f(t))for(var n=0;n<t.length;n++)this.emit(t[n],e);this.hop.call(this.events,t)&&this.events[t].forEach(function(t){t(e||{})})}}]),e);function e(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};i(this,e),this.events=t,this.hop=t.hasOwnProperty}var p=(t(m,[{key:"mount",value:function(t){var e=0<arguments.length&&void 0!==t?t:{};return this._e.emit("mount.before"),u(e)&&(this._c=function(t,e,n){var i={};for(var r in e)c(e[r])&&(i[r]=e[r](t,i,n));for(var s in i)c(i[s].mount)&&i[s].mount();return i}(this,e,this._e)),this._e.emit("mount.after"),this}},{key:"mutate",value:function(t){var e=0<arguments.length&&void 0!==t?t:[];return f(e)&&(this._t=e),this}},{key:"update",value:function(t){var e=0<arguments.length&&void 0!==t?t:{};return this.settings=h(this.settings,e),e.hasOwnProperty("startAt")&&(this.index=e.startAt),this._e.emit("update"),this}},{key:"go",value:function(t){return this._c.Run.make(t),this}},{key:"move",value:function(t){return this._c.Transition.disable(),this._c.Move.make(t),this}},{key:"destroy",value:function(){return this._e.emit("destroy"),this}},{key:"play",value:function(t){var e=0<arguments.length&&void 0!==t&&t;return e&&(this.settings.autoplay=e),this._e.emit("play"),this}},{key:"pause",value:function(){return this._e.emit("pause"),this}},{key:"disable",value:function(){return this.disabled=!0,this}},{key:"enable",value:function(){return this.disabled=!1,this}},{key:"on",value:function(t,e){return this._e.on(t,e),this}},{key:"isType",value:function(t){return this.settings.type===t}},{key:"settings",get:function(){return this._o},set:function(t){u(t)&&(this._o=t)}},{key:"index",get:function(){return this._i},set:function(t){this._i=y(t)}},{key:"type",get:function(){return this.settings.type}},{key:"disabled",get:function(){return this._d},set:function(t){this._d=!!t}}]),m);function m(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};i(this,m),this._c={},this._t=[],this._e=new v,this.disabled=!1,this.selector=t,this.settings=h(n,e),this.index=this.settings.startAt}function g(){return(new Date).getTime()}function b(n,i,r){var s=void 0,o=void 0,u=void 0,a=void 0,c=0;r=r||{};function l(){c=!1===r.leading?0:g(),s=null,a=n.apply(o,u),s||(o=u=null)}function t(){var t=g();c||!1!==r.leading||(c=t);var e=i-(t-c);return o=this,u=arguments,e<=0||i<e?(s&&(clearTimeout(s),s=null),c=t,a=n.apply(o,u),s||(o=u=null)):s||!1===r.trailing||(s=setTimeout(l,e)),a}return t.cancel=function(){clearTimeout(s),c=0,s=o=u=null},t}var w={ltr:["marginLeft","marginRight"],rtl:["marginRight","marginLeft"]};function _(t){if(t&&t.parentNode){for(var e=t.parentNode.firstChild,n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}return[]}function k(t){return!!(t&&t instanceof window.HTMLElement)}var S='[data-glide-el="track"]';var H=(t(T,[{key:"on",value:function(t,e,n,i){var r=3<arguments.length&&void 0!==i&&i;o(t)&&(t=[t]);for(var s=0;s<t.length;s++)this.listeners[t[s]]=n,e.addEventListener(t[s],this.listeners[t[s]],r)}},{key:"off",value:function(t,e,n){var i=2<arguments.length&&void 0!==n&&n;o(t)&&(t=[t]);for(var r=0;r<t.length;r++)e.removeEventListener(t[r],this.listeners[t[r]],i)}},{key:"destroy",value:function(){delete this.listeners}}]),T);function T(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};i(this,T),this.listeners=t}var O=["ltr","rtl"],x={">":"<","<":">","=":"="};function A(t,e){return{modify:function(t){return e.Direction.is("rtl")?-t:t}}}function P(i,r,s){var o=[function(t,n){return{modify:function(t){var e=Math.floor(t/n.Sizes.slideWidth);return t+n.Gaps.value*e}}},function(t,e){return{modify:function(t){return t+e.Clones.grow/2}}},function(n,i){return{modify:function(t){if(0<=n.settings.focusAt){var e=i.Peek.value;return u(e)?t-e.before:t-e}return t}}},function(s,o){return{modify:function(t){var e=o.Gaps.value,n=o.Sizes.width,i=s.settings.focusAt,r=o.Sizes.slideWidth;return"center"===i?t-(n/2-r/2):t-r*i-e*i}}}].concat(i._t,[A]);return{mutate:function(t){for(var e=0;e<o.length;e++){var n=o[e];c(n)&&c(n().modify)&&(t=n(i,r,s).modify(t))}return t}}}var M=!1;try{var z=Object.defineProperty({},"passive",{get:function(){M=!0}});window.addEventListener("testPassive",null,z),window.removeEventListener("testPassive",null,z)}catch(t){}var C=M,L=["touchstart","mousedown"],R=["touchmove","mousemove"],D=["touchend","touchcancel","mouseup","mouseleave"],E=["mousedown","mousemove","mouseup","mouseleave"];function j(t){return u(t)?function(n){return Object.keys(n).sort().reduce(function(t,e){return t[e]=n[e],t[e],t},{})}(t):{}}var W={Html:function(e,t){var n={mount:function(){this.root=e.selector,this.track=this.root.querySelector(S),this.slides=Array.prototype.slice.call(this.wrapper.children).filter(function(t){return!t.classList.contains(e.settings.classes.slide.clone)})}};return d(n,"root",{get:function(){return n._r},set:function(t){o(t)&&(t=document.querySelector(t)),k(t)&&(n._r=t)}}),d(n,"track",{get:function(){return n._t},set:function(t){k(t)&&(n._t=t)}}),d(n,"wrapper",{get:function(){return n.track.children[0]}}),n},Translate:function(i,r,n){var s={set:function(t){var e=P(i,r).mutate(t);r.Html.wrapper.style.transform="translate3d("+-1*e+"px, 0px, 0px)"},remove:function(){r.Html.wrapper.style.transform=""},getStartIndex:function(){var t=r.Sizes.length,e=i.index,n=i.settings.perView;return r.Run.isOffset(">")||r.Run.isOffset("|>")?t+(e-n):(e+n)%t},getTravelDistance:function(){var t=r.Sizes.slideWidth*i.settings.perView;return r.Run.isOffset(">")||r.Run.isOffset("|>")?-1*t:t}};return n.on("move",function(t){if(!i.isType("carousel")||!r.Run.isOffset())return s.set(t.movement);r.Transition.after(function(){n.emit("translate.jump"),s.set(r.Sizes.slideWidth*i.index)});var e=r.Sizes.slideWidth*r.Translate.getStartIndex();return s.set(e-r.Translate.getTravelDistance())}),n.on("destroy",function(){s.remove()}),s},Transition:function(n,i,t){var r=!1,e={compose:function(t){var e=n.settings;return r?t+" 0ms "+e.animationTimingFunc:t+" "+this.duration+"ms "+e.animationTimingFunc},set:function(t){var e=0<arguments.length&&void 0!==t?t:"transform";i.Html.wrapper.style.transition=this.compose(e)},remove:function(){i.Html.wrapper.style.transition=""},after:function(t){setTimeout(function(){t()},this.duration)},enable:function(){r=!1,this.set()},disable:function(){r=!0,this.set()}};return d(e,"duration",{get:function(){var t=n.settings;return n.isType("slider")&&i.Run.offset?t.rewindDuration:t.animationDuration}}),t.on("move",function(){e.set()}),t.on(["build.before","resize","translate.jump"],function(){e.disable()}),t.on("run",function(){e.enable()}),t.on("destroy",function(){e.remove()}),e},Direction:function(t,e,n){var i={mount:function(){this.value=t.settings.direction},resolve:function(t){var e=t.slice(0,1);return this.is("rtl")?t.split(e).join(x[e]):t},is:function(t){return this.value===t},addClass:function(){e.Html.root.classList.add(t.settings.classes.direction[this.value])},removeClass:function(){e.Html.root.classList.remove(t.settings.classes.direction[this.value])}};return d(i,"value",{get:function(){return i._v},set:function(t){-1<O.indexOf(t)&&(i._v=t)}}),n.on(["destroy","update"],function(){i.removeClass()}),n.on("update",function(){i.mount()}),n.on(["build.before","update"],function(){i.addClass()}),i},Peek:function(n,t,e){var i={mount:function(){this.value=n.settings.peek}};return d(i,"value",{get:function(){return i._v},set:function(t){u(t)?(t.before=y(t.before),t.after=y(t.after)):t=y(t),i._v=t}}),d(i,"reductor",{get:function(){var t=i.value,e=n.settings.perView;return u(t)?t.before/e+t.after/e:2*t/e}}),e.on(["resize","update"],function(){i.mount()}),i},Sizes:function(t,i,e){var n={setupSlides:function(){for(var t=this.slideWidth+"px",e=i.Html.slides,n=0;n<e.length;n++)e[n].style.width=t},setupWrapper:function(){i.Html.wrapper.style.width=this.wrapperSize+"px"},remove:function(){for(var t=i.Html.slides,e=0;e<t.length;e++)t[e].style.width="";i.Html.wrapper.style.width=""}};return d(n,"length",{get:function(){return i.Html.slides.length}}),d(n,"width",{get:function(){return i.Html.root.offsetWidth}}),d(n,"wrapperSize",{get:function(){return n.slideWidth*n.length+i.Gaps.grow+i.Clones.grow}}),d(n,"slideWidth",{get:function(){return n.width/t.settings.perView-i.Peek.reductor-i.Gaps.reductor}}),e.on(["build.before","resize","update"],function(){n.setupSlides(),n.setupWrapper()}),e.on("destroy",function(){n.remove()}),n},Gaps:function(e,s,t){var n={apply:function(t){for(var e=0,n=t.length;e<n;e++){var i=t[e].style,r=s.Direction.value;i[w[r][0]]=0!==e?this.value/2+"px":"",e!==t.length-1?i[w[r][1]]=this.value/2+"px":i[w[r][1]]=""}},remove:function(t){for(var e=0,n=t.length;e<n;e++){var i=t[e].style;i.marginLeft="",i.marginRight=""}}};return d(n,"value",{get:function(){return y(e.settings.gap)}}),d(n,"grow",{get:function(){return n.value*s.Sizes.length}}),d(n,"reductor",{get:function(){var t=e.settings.perView;return n.value*(t-1)/t}}),t.on(["build.after","update"],b(function(){n.apply(s.Html.wrapper.children)},30)),t.on("destroy",function(){n.remove(s.Html.wrapper.children)}),n},Move:function(t,i,r){var e={mount:function(){this._o=0},make:function(t){var e=this,n=0<arguments.length&&void 0!==t?t:0;this.offset=n,r.emit("move",{movement:this.value}),i.Transition.after(function(){r.emit("move.after",{movement:e.value})})}};return d(e,"offset",{get:function(){return e._o},set:function(t){e._o=l(t)?0:y(t)}}),d(e,"translate",{get:function(){return i.Sizes.slideWidth*t.index}}),d(e,"value",{get:function(){var t=this.offset,e=this.translate;return i.Direction.is("rtl")?e+t:e-t}}),r.on(["build.before","run"],function(){e.make()}),e},Clones:function(v,p,t){var e={mount:function(){this.items=[],v.isType("carousel")&&(this.items=this.collect())},collect:function(t){for(var e=0<arguments.length&&void 0!==t?t:[],n=p.Html.slides,i=v.settings,r=i.perView,s=i.classes,o=r+ +!!v.settings.peek+Math.round(r/2),u=n.slice(0,o).reverse(),a=n.slice(-1*o),c=0;c<Math.max(1,Math.floor(r/n.length));c++){for(var l=0;l<u.length;l++){var f=u[l].cloneNode(!0);f.classList.add(s.slide.clone),e.push(f)}for(var d=0;d<a.length;d++){var h=a[d].cloneNode(!0);h.classList.add(s.slide.clone),e.unshift(h)}}return e},append:function(){for(var t=this.items,e=p.Html,n=e.wrapper,i=e.slides,r=Math.floor(t.length/2),s=t.slice(0,r).reverse(),o=t.slice(-1*r).reverse(),u=p.Sizes.slideWidth+"px",a=0;a<o.length;a++)n.appendChild(o[a]);for(var c=0;c<s.length;c++)n.insertBefore(s[c],i[0]);for(var l=0;l<t.length;l++)t[l].style.width=u},remove:function(){for(var t=this.items,e=0;e<t.length;e++)p.Html.wrapper.removeChild(t[e])}};return d(e,"grow",{get:function(){return(p.Sizes.slideWidth+p.Gaps.value)*e.items.length}}),t.on("update",function(){e.remove(),e.mount(),e.append()}),t.on("build.before",function(){v.isType("carousel")&&e.append()}),t.on("destroy",function(){e.remove()}),e},Resize:function(t,e,n){var i=new H,r={mount:function(){this.bind()},bind:function(){i.on("resize",window,b(function(){n.emit("resize")},t.settings.throttle))},unbind:function(){i.off("resize",window)}};return n.on("destroy",function(){r.unbind(),i.destroy()}),r},Build:function(i,r,t){var e={mount:function(){t.emit("build.before"),this.typeClass(),this.activeClass(),t.emit("build.after")},typeClass:function(){r.Html.root.classList.add(i.settings.classes.type[i.settings.type])},activeClass:function(){var e=i.settings.classes,t=r.Html.slides[i.index];t&&(t.classList.add(e.slide.active),_(t).forEach(function(t){t.classList.remove(e.slide.active)}))},removeClasses:function(){var t=i.settings.classes,e=t.type,n=t.slide;r.Html.root.classList.remove(e[i.settings.type]),r.Html.slides.forEach(function(t){t.classList.remove(n.active)})}};return t.on(["destroy","update"],function(){e.removeClasses()}),t.on(["resize","update"],function(){e.mount()}),t.on("move.after",function(){e.activeClass()}),e},Run:function(u,n,i){var a={mount:function(){this._o=!1},make:function(t){var e=this;u.disabled||(u.settings.waitForTransition&&u.disable(),this.move=t,i.emit("run.before",this.move),this.calculate(),i.emit("run",this.move),n.Transition.after(function(){e.isStart()&&i.emit("run.start",e.move),e.isEnd()&&i.emit("run.end",e.move),e.isOffset()&&(e._o=!1,i.emit("run.offset",e.move)),i.emit("run.after",e.move),u.enable()}))},calculate:function(){var t=this.move,e=this.length,n=t.steps,i=t.direction,r=1;if("="!==i)if(">"!==i||">"!==n)if("<"!==i||"<"!==n){if("|"===i&&(r=u.settings.perView||1),">"===i||"|"===i&&">"===n){var s=function(t){var e=u.index;if(u.isType("carousel"))return e+t;return e+(t-e%t)}(r);return e<s&&(this._o=!0),void(u.index=function(t,e){var n=a.length;if(t<=n)return t;if(u.isType("carousel"))return t-(n+1);if(u.settings.rewind)return a.isBound()&&!a.isEnd()?n:0;if(a.isBound())return n;return Math.floor(n/e)*e}(s,r))}if("<"===i||"|"===i&&"<"===n){var o=function(t){var e=u.index;if(u.isType("carousel"))return e-t;return(Math.ceil(e/t)-1)*t}(r);return o<0&&(this._o=!0),void(u.index=function(t,e){var n=a.length;if(0<=t)return t;if(u.isType("carousel"))return t+(n+1);if(u.settings.rewind)return a.isBound()&&a.isStart()?n:Math.floor(n/e)*e;return 0}(o,r))}}else u.index=0;else u.index=e;else u.index=n},isStart:function(){return u.index<=0},isEnd:function(){return u.index>=this.length},isOffset:function(t){var e=0<arguments.length&&void 0!==t?t:void 0;return e?!!this._o&&("|>"===e?"|"===this.move.direction&&">"===this.move.steps:"|<"===e?"|"===this.move.direction&&"<"===this.move.steps:this.move.direction===e):this._o},isBound:function(){return u.isType("slider")&&"center"!==u.settings.focusAt&&u.settings.bound}};return d(a,"move",{get:function(){return this._m},set:function(t){var e=t.substr(1);this._m={direction:t.substr(0,1),steps:e?y(e)?y(e):e:0}}}),d(a,"length",{get:function(){var t=u.settings,e=n.Html.slides.length;return this.isBound()?e-1-(y(t.perView)-1)+y(t.focusAt):e-1}}),d(a,"offset",{get:function(){return this._o}}),a},Swipe:function(d,h,v){var r=new H,p=0,m=0,g=0,n=!1,s=!!C&&{passive:!0},t={mount:function(){this.bindSwipeStart()},start:function(t){if(!n&&!d.disabled){this.disable();var e=this.touches(t);p=null,m=y(e.pageX),g=y(e.pageY),this.bindSwipeMove(),this.bindSwipeEnd(),v.emit("swipe.start")}},move:function(t){if(!d.disabled){var e=d.settings,n=e.touchAngle,i=e.touchRatio,r=e.classes,s=this.touches(t),o=y(s.pageX)-m,u=y(s.pageY)-g,a=Math.abs(o<<2),c=Math.abs(u<<2),l=Math.sqrt(a+c),f=Math.sqrt(c);if(!(180*(p=Math.asin(f/l))/Math.PI<n))return!1;t.stopPropagation(),h.Move.make(o*function(t){return parseFloat(t)}(i)),h.Html.root.classList.add(r.dragging),v.emit("swipe.move")}},end:function(t){if(!d.disabled){var e=d.settings,n=e.perSwipe,i=e.touchAngle,r=e.classes,s=this.touches(t),o=this.threshold(t),u=s.pageX-m,a=180*p/Math.PI;this.enable(),o<u&&a<i?h.Run.make(h.Direction.resolve(n+"<")):u<-o&&a<i?h.Run.make(h.Direction.resolve(n+">")):h.Move.make(),h.Html.root.classList.remove(r.dragging),this.unbindSwipeMove(),this.unbindSwipeEnd(),v.emit("swipe.end")}},bindSwipeStart:function(){var e=this,t=d.settings,n=t.swipeThreshold,i=t.dragThreshold;n&&r.on(L[0],h.Html.wrapper,function(t){e.start(t)},s),i&&r.on(L[1],h.Html.wrapper,function(t){e.start(t)},s)},unbindSwipeStart:function(){r.off(L[0],h.Html.wrapper,s),r.off(L[1],h.Html.wrapper,s)},bindSwipeMove:function(){var e=this;r.on(R,h.Html.wrapper,b(function(t){e.move(t)},d.settings.throttle),s)},unbindSwipeMove:function(){r.off(R,h.Html.wrapper,s)},bindSwipeEnd:function(){var e=this;r.on(D,h.Html.wrapper,function(t){e.end(t)})},unbindSwipeEnd:function(){r.off(D,h.Html.wrapper)},touches:function(t){return-1<E.indexOf(t.type)?t:t.touches[0]||t.changedTouches[0]},threshold:function(t){var e=d.settings;return-1<E.indexOf(t.type)?e.dragThreshold:e.swipeThreshold},enable:function(){return n=!1,h.Transition.enable(),this},disable:function(){return n=!0,h.Transition.disable(),this}};return v.on("build.after",function(){h.Html.root.classList.add(d.settings.classes.swipeable)}),v.on("destroy",function(){t.unbindSwipeStart(),t.unbindSwipeMove(),t.unbindSwipeEnd(),r.destroy()}),t},Images:function(t,e,n){var i=new H,r={mount:function(){this.bind()},bind:function(){i.on("dragstart",e.Html.wrapper,this.dragstart)},unbind:function(){i.off("dragstart",e.Html.wrapper)},dragstart:function(t){t.preventDefault()}};return n.on("destroy",function(){r.unbind(),i.destroy()}),r},Anchors:function(t,e,n){var i=new H,r=!1,s=!1,o={mount:function(){this._a=e.Html.wrapper.querySelectorAll("a"),this.bind()},bind:function(){i.on("click",e.Html.wrapper,this.click)},unbind:function(){i.off("click",e.Html.wrapper)},click:function(t){s&&(t.stopPropagation(),t.preventDefault())},detach:function(){if(s=!0,!r){for(var t=0;t<this.items.length;t++)this.items[t].draggable=!1,this.items[t].setAttribute("data-href",this.items[t].getAttribute("href")),this.items[t].removeAttribute("href");r=!0}return this},attach:function(){if(s=!1,r){for(var t=0;t<this.items.length;t++)this.items[t].draggable=!0,this.items[t].setAttribute("href",this.items[t].getAttribute("data-href"));r=!1}return this}};return d(o,"items",{get:function(){return o._a}}),n.on("swipe.move",function(){o.detach()}),n.on("swipe.end",function(){e.Transition.after(function(){o.attach()})}),n.on("destroy",function(){o.attach(),o.unbind(),i.destroy()}),o},Controls:function(i,e,t){var n=new H,r=!!C&&{passive:!0},s={mount:function(){this._n=e.Html.root.querySelectorAll('[data-glide-el="controls[nav]"]'),this._c=e.Html.root.querySelectorAll('[data-glide-el^="controls"]'),this.addBindings()},setActive:function(){for(var t=0;t<this._n.length;t++)this.addClass(this._n[t].children)},removeActive:function(){for(var t=0;t<this._n.length;t++)this.removeClass(this._n[t].children)},addClass:function(t){var e=i.settings,n=t[i.index];n&&(n.classList.add(e.classes.nav.active),_(n).forEach(function(t){t.classList.remove(e.classes.nav.active)}))},removeClass:function(t){var e=t[i.index];e&&e.classList.remove(i.settings.classes.nav.active)},addBindings:function(){for(var t=0;t<this._c.length;t++)this.bind(this._c[t].children)},removeBindings:function(){for(var t=0;t<this._c.length;t++)this.unbind(this._c[t].children)},bind:function(t){for(var e=0;e<t.length;e++)n.on("click",t[e],this.click),n.on("touchstart",t[e],this.click,r)},unbind:function(t){for(var e=0;e<t.length;e++)n.off(["click","touchstart"],t[e])},click:function(t){t.preventDefault(),e.Run.make(e.Direction.resolve(t.currentTarget.getAttribute("data-glide-dir")))}};return d(s,"items",{get:function(){return s._c}}),t.on(["mount.after","move.after"],function(){s.setActive()}),t.on("destroy",function(){s.removeBindings(),s.removeActive(),n.destroy()}),s},Keyboard:function(t,e,n){var i=new H,r={mount:function(){t.settings.keyboard&&this.bind()},bind:function(){i.on("keyup",document,this.press)},unbind:function(){i.off("keyup",document)},press:function(t){39===t.keyCode&&e.Run.make(e.Direction.resolve(">")),37===t.keyCode&&e.Run.make(e.Direction.resolve("<"))}};return n.on(["destroy","update"],function(){r.unbind()}),n.on("update",function(){r.mount()}),n.on("destroy",function(){i.destroy()}),r},Autoplay:function(e,n,t){var i=new H,r={mount:function(){this.start(),e.settings.hoverpause&&this.bind()},start:function(){var t=this;e.settings.autoplay&&l(this._i)&&(this._i=setInterval(function(){t.stop(),n.Run.make(">"),t.start()},this.time))},stop:function(){this._i=clearInterval(this._i)},bind:function(){var t=this;i.on("mouseover",n.Html.root,function(){t.stop()}),i.on("mouseout",n.Html.root,function(){t.start()})},unbind:function(){i.off(["mouseover","mouseout"],n.Html.root)}};return d(r,"time",{get:function(){var t=n.Html.slides[e.index].getAttribute("data-glide-autoplay");return y(t||e.settings.autoplay)}}),t.on(["destroy","update"],function(){r.unbind()}),t.on(["run.before","pause","destroy","swipe.start","update"],function(){r.stop()}),t.on(["run.after","play","swipe.end"],function(){r.start()}),t.on("update",function(){r.mount()}),t.on("destroy",function(){i.destroy()}),r},Breakpoints:function(t,e,n){var i=new H,r=t.settings,s=j(r.breakpoints),o=a({},r),u={match:function(t){if(void 0!==window.matchMedia)for(var e in t)if(t.hasOwnProperty(e)&&window.matchMedia("(max-width: "+e+"px)").matches)return t[e];return o}};return a(r,u.match(s)),i.on("resize",window,b(function(){t.settings=h(r,u.match(s))},t.settings.throttle)),n.on("update",function(){s=j(s),o=a({},r)}),n.on("destroy",function(){i.off("resize",window)}),u}};function B(){return i(this,B),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(B.__proto__||Object.getPrototypeOf(B)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(B,p),t(B,[{key:"mount",value:function(t){var e=0<arguments.length&&void 0!==t?t:{};return function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var s=Object.getPrototypeOf(e);return null===s?void 0:t(s,n,i)}if("value"in r)return r.value;var o=r.get;return void 0!==o?o.call(i):void 0}(B.prototype.__proto__||Object.getPrototypeOf(B.prototype),"mount",this).call(this,a({},W,e))}}]),B});APIModel = {apiKey:"cb718b63-97e5-47e7-afd4-0d9a4f539363",apiKeyStaging:"857a1e5d-e35e-4fdf-805b-a87b6f8364bf",authToken:0,xhttp:0,getVOD: function (vodId,onResult){APIModel.getToken((token)=>{APIModel.xhttp = new XMLHttpRequest();APIModel.xhttp.onreadystatechange = function() {if (this.readyState == 4 && this.status == 200) {onResult.call(this,JSON.parse(this.responseText));APIModel.xhttp = false;}};APIModel.xhttp.open("get", "https://dce-frontoffice.imggaming.com/api/v4/vod/" + vodId , true);APIModel.xhttp.withCredentials = true;APIModel.xhttp.setRequestHeader("Authorization", "Bearer " + token);APIModel.send();});},getLive: function (onResult){APIModel.getToken((token)=>{APIModel.xhttp = new XMLHttpRequest();APIModel.xhttp.onreadystatechange = function() {if (this.readyState == 4 && this.status == 200) {onResult.call(this,JSON.parse(this.responseText));APIModel.xhttp = false;}};APIModel.xhttp.open("get", "https://dce-frontoffice.imggaming.com/api/v4/event/live?rpp=25" , true);APIModel.xhttp.withCredentials = true;APIModel.xhttp.setRequestHeader("Authorization", "Bearer " + token);APIModel.send();});},getUpcoming: function (onResult){APIModel.getToken((token)=>{APIModel.xhttp = new XMLHttpRequest();APIModel.xhttp.onreadystatechange = function() {if (this.readyState == 4 && this.status == 200) {onResult.call(this,JSON.parse(this.responseText));APIModel.xhttp = false;}};APIModel.xhttp.open("get", "https://dce-frontoffice.imggaming.com/api/v4/event/upcoming?rpp=8" , true);APIModel.xhttp.withCredentials = true;APIModel.xhttp.setRequestHeader("Authorization", "Bearer " + token);APIModel.send();});},getBucket: function (bucketExid,onResult){APIModel.getToken((token)=>{APIModel.xhttp = new XMLHttpRequest();APIModel.xhttp.onreadystatechange = function() {if (this.readyState == 4 && this.status == 200) {onResult.call(this,JSON.parse(this.responseText));APIModel.xhttp = false;}};APIModel.xhttp.open("get", "https://dce-frontoffice.imggaming.com/api/v4/content/bucket/" + bucketExid + "?rpp=8" , true);APIModel.xhttp.withCredentials = true;APIModel.xhttp.setRequestHeader("Authorization", "Bearer " + token);APIModel.send();});},getToken: function (onResult){if(APIModel.authToken){console.log("Use APIModel.authToken");onResult.call(this,APIModel.authToken);return;}if(APIModel.getCookie("authorisationToken")){let time = parseInt(APIModel.getCookie("authorisationTime"));let toGO = (Math.round(Date.now()/1000) - time);console.log("Seconds To Go: " + (600 - toGO));if(toGO > 600){console.log("Get refresh Token");APIModel.getRefreshToken(onResult);}else{console.log("Use cookie token");onResult.call(this,APIModel.getCookie("authorisationToken"));}return;}APIModel.xhttp = new XMLHttpRequest();APIModel.xhttp.onreadystatechange = function() {if (this.readyState == 4 && this.status == 201) {const data = JSON.parse(this.responseText);APIModel.authToken = data.authorisationToken;APIModel.setCookie("refreshToken",data.refreshToken);APIModel.setCookie("authorisationToken",data.authorisationToken);APIModel.setCookie("authorisationTime",Math.round(Date.now()/1000));onResult.call(this,data.authorisationToken);APIModel.xhttp = false;}};APIModel.xhttp.open("post", "https://dce-frontoffice.imggaming.com/api/v2/login/guest/checkin", true);APIModel.send();},getRefreshToken: function (onResult){APIModel.xhttp = new XMLHttpRequest();APIModel.xhttp.onreadystatechange = function() {if (this.readyState == 4 && this.status == 201) {const data = JSON.parse(this.responseText);APIModel.setCookie("authorisationToken",data.authorisationToken);APIModel.authToken = data.authorisationToken;onResult.call(this,data.authorisationToken);APIModel.xhttp = false;}if (this.readyState == 4 && this.status == 429) {onResult.call(this,APIModel.getCookie("authorisationToken"));}};let params = JSON.stringify({refreshToken:APIModel.getCookie("refreshToken")});APIModel.xhttp.open("post", "https://dce-frontoffice.imggaming.com/api/v2/token/refresh", true);APIModel.xhttp.setRequestHeader("Authorization", "Bearer " + APIModel.getCookie("authorisationToken"));APIModel.xhttp.setRequestHeader("Realm", "dce.worldrugby");APIModel.xhttp.setRequestHeader("app", "dice");APIModel.xhttp.setRequestHeader("x-api-key", APIModel.apiKey);APIModel.xhttp.setRequestHeader("Content-Type",'application/json');APIModel.xhttp.setRequestHeader("Accept",'application/json, text/plain, */*');APIModel.xhttp.send(params);},send : function (){APIModel.xhttp.setRequestHeader("Realm", "dce.worldrugby");APIModel.xhttp.setRequestHeader("app", "dice");APIModel.xhttp.setRequestHeader("x-api-key", APIModel.apiKey);APIModel.xhttp.send(null);},cache : function (data){APIModel.xhttp = new XMLHttpRequest();APIModel.xhttp.onreadystatechange = function() {};let post = {videos:data,country:countrycode};APIModel.xhttp.open("post", "cache.php", true);APIModel.xhttp.send(JSON.stringify(post));},getCookie: function (cname) {let name = cname + "=";let decodedCookie = decodeURIComponent(document.cookie);let ca = decodedCookie.split(';');for(let i = 0; i <ca.length; i++) {let c = ca[i];while (c.charAt(0) == ' ') {c = c.substring(1);}if (c.indexOf(name) == 0) {return c.substring(name.length, c.length);}}return "";},setCookie: function (cname, cvalue){document.cookie = cname + "=" + cvalue + ";";}};function RPTVRail(id,bucket){const {createApp} = Vue;let videosList = eval("videos_" + bucket);if(videosList === undefined){videosList = [];}createApp({data() {return {videos:[],bucket:0,glide:0,index:0,loaded:false}},methods: {bullet(index){this.index = index;this.glide.go('='+this.index);},addVideos(list){if(list.length > 0){list.forEach((video, index) =>{this.videos.push({image:this.getThumb(video.thumbnailUrl),title:video.title,showTitle:true,live:true,link:this.getLink(video),});this.total++;});setTimeout(()=>{this.setGlide();},100);}},getThumb(url){return url.split("original").join("350x197");},getLink(item){switch (item.type){case "LIVE":return "https://rugbypass.tv/live/" + item.id + "?utm_source=rugbypass.space&utm_medium=referral&utm_campaign=RPTV&utm_content=acquisition&esrefid=e7c1f8c4-ad04-41e6-b3a6-647efa7501c0";case "PLAYLIST":return "https://rugbypass.tv/playlist/" + item.id + "?utm_source=rugbypass.space&utm_medium=referral&utm_campaign=RPTV&utm_content=acquisition&esrefid=e7c1f8c4-ad04-41e6-b3a6-647efa7501c0";default:return "https://rugbypass.tv/video/" + item.id + "?utm_source=rugbypass.space&utm_medium=referral&utm_campaign=RPTV&utm_content=acquisition&esrefid=e7c1f8c4-ad04-41e6-b3a6-647efa7501c0";}},next(){this.index += 4;if(this.index > this.total){this.index = this.total - 1;}this.glide.go('='+this.index);},back(){this.index-= 4;if(this.index < 0){this.index = 0;}this.glide.go('='+this.index);},setGlide(){this.glide = new Glide('.' + id + "-glide", {type: 'carousel',perView:4,gap:30,breakpoints: {990: {perView: 2},480: {perView: 1,peek:{ before: 0, after: 80 }}}});this.glide.on('run', () => {this.index = this.glide.index;});this.glide.mount();},cleanTitle(title){title = title.replace("\\'", "'");title = title.replace('\\"', '"');title = title.replace('\\"', '"');title = title.replace('\\', '');return title;}},mounted(){this.bucket = bucket;if(videosList.length){this.addVideos(videosList);this.loaded = true;}else{APIModel.getBucket(bucket,(result)=>{this.addVideos(result.contentList);this.loaded = true;});}}}).mount("#" + id);}HomePage = {glide:0,init:function (){HomePage.geoToggle();},geoToggle : function(){document.querySelectorAll(".geo-toggle").forEach(function (item, index){if(item !== null && item !== undefined){item.addEventListener("open",function (){item.classList.add("open");item.addEventListener("mousedown",function (e){e.stopPropagation();});window.addEventListener("mousedown",function (e){item.dispatchEvent(new Event("close"));});});item.addEventListener("close",function (){item.classList.remove("open");item.removeEventListener("mousedown",function (e){e.stopPropagation();});window.removeEventListener("mousedown",function (e){item.dispatchEvent(new Event("close"));});});const select = item.querySelector(".geo-toggle-select");if(select !== null){select.addEventListener("click",function (){item.dispatchEvent(new Event("open"));});}}});},navigateEdition : function (url,code){GATracking.sendEvent('Interaction','edition_pick','edition_pick','1');DOM.ajax("geo-toggle",{code:code},"post","html",function (){window.location.href = url;});},trending: function (){new Glide('.trending-items', {type: 'slider',perView:5,gap:30,breakpoints: {990: {type: 'carousel',perView: 2},480: {type: 'carousel',perView: 1,peek:{ before: 0, after: 80 }}}}).mount();}};HomeVideo = {id:"",playArea:0,playList:0,videoPlayer:0,videoTitle:0,videoCopyLink:0,videoDescription:0,videoCopy:0,embed:0,player:0,isAdPlaying:0,videoStopped:0,scrollIndex:0,videoItems:[],playIndex:0,allowFixed:0,scrollPlay:0,allowScrollPlay:1,loadFirstOnly:0,videoPage:0,videoLink:0,dynamicAddUrl:0,scrollBar:0,scrollBarHandle:0,serverUrl:0,usePrebid:0,init : function (id){HomeVideo.id = id;HomeVideo.playArea = document.querySelector(".play-area");HomeVideo.videoLink = document.querySelector("#home-playlist-video-link");HomeVideo.playList = document.querySelector(".play-list-items");HomeVideo.scrollBar = document.querySelector(".play-list .scroll-bar");HomeVideo.scrollBarHandle = document.querySelector(".play-list .scroll-bar div");HomeVideo.playList.addEventListener("wheel",function (e){e.stopPropagation();e.preventDefault();let value = HomeVideo.playList.scrollTop;const speed = DOM.browser() === "chrome" ? 20 : 40;if(e.deltaY < 0){value -= speed;if(value < 0){value = 0;}}else{value += speed;}HomeVideo.playList.scrollTo({top: value,left: 0,behavior: "instant"});});HomeVideo.videoTitle = document.querySelector(".video-copy h3");HomeVideo.videoCopy = document.querySelector(".video-copy");HomeVideo.videoDescription = document.querySelector(".video-copy p");HomeVideo.videoCopyLink = document.querySelector(".video-copy .bc-link");HomeVideo.videoPlayer = document.querySelector(".video-player");HomeVideo.embed = document.querySelector("#home-playlist-embed");window.addEventListener("scroll",HomeVideo.scroll);const bodyRect = HomeVideo.playList.getBoundingClientRect();document.querySelectorAll(".play-list-items .video-item").forEach(function (item, index){HomeVideo.videoItems.push({top:item.getBoundingClientRect().top - bodyRect.top,id:item.getAttribute("data-id")});});if(HomeVideo.loadFirstOnly){window.bcPlayers.push(HomeVideo);}if(HomeVideo.scrollBar !== null){HomeVideo.initScrollBar();}},isScrolling:0,startY:0,handleY:0,setIma3 : function (url){console.log("setIma3",url);HomeVideo.serverUrl = url;HomeVideo.start();},initScrollBar : function (){HomeVideo.sizeScrollBar();HomeVideo.playList.addEventListener("scroll",function (e){if(!HomeVideo.isScrolling){let per = HomeVideo.playList.scrollY/HomeVideo.playList.scrollHeight;let pos = HomeVideo.playList.scrollTop/HomeVideo.scrollHeight()*HomeVideo.maxScroll();HomeVideo.scrollBarHandle.style.top =Math.max(0,pos) + "px";}});HomeVideo.scrollBarHandle.addEventListener("mousedown",function (e){HomeVideo.startY = e.clientY;HomeVideo.handleY = parseInt(HomeVideo.scrollBarHandle.style.top);if(isNaN(HomeVideo.handleY)){HomeVideo.handleY = 0;}HomeVideo.isScrolling = 1;});window.addEventListener("mouseup",function (e){HomeVideo.isScrolling = 0;});window.addEventListener("mousemove",function (e){if(HomeVideo.isScrolling){let pos = HomeVideo.handleY + (e.clientY -HomeVideo.startY);let top = Math.max(0,Math.min(HomeVideo.maxScroll(),pos));let value = top/HomeVideo.maxScroll() * HomeVideo.scrollHeight();HomeVideo.scrollBarHandle.style.top =Math.max(0,Math.min(HomeVideo.maxScroll(),pos)) + "px";HomeVideo.playList.scrollTo({top: value,left: 0,behavior: "smooth"});}});},maxScroll : function (){return HomeVideo.scrollBar.getBoundingClientRect().height - HomeVideo.scrollBarHandle.getBoundingClientRect().height;},scrollHeight : function (){return HomeVideo.playList.scrollHeight - HomeVideo.playList.getBoundingClientRect().height;},sizeScrollBar : function (){if(HomeVideo.playList.getBoundingClientRect().height < HomeVideo.scrollHeight()){HomeVideo.scrollBar.classList.remove("no-scroll");HomeVideo.scrollBarHandle.style.height =(HomeVideo.playList.getBoundingClientRect().height/HomeVideo.scrollHeight() * HomeVideo.scrollBar.getBoundingClientRect().height) + "px";}else{HomeVideo.scrollBar.classList.add("no-scroll");}},bcPlayersStart : function (){if(!HomeVideo.usePrebid) {HomeVideo.start();}},up : function (){HomeVideo.scrollIndex-=5;if(HomeVideo.scrollIndex < 0){HomeVideo.scrollIndex = 0;}HomeVideo.playlistScroll();},down : function (){HomeVideo.scrollIndex+=5;if(HomeVideo.scrollIndex >= HomeVideo.videoItems.length){HomeVideo.scrollIndex = HomeVideo.videoItems.length-1;}HomeVideo.playlistScroll();},playlistScroll : function (){HomeVideo.playList.scrollTo({top: HomeVideo.videoItems[HomeVideo.scrollIndex].top,left: 0,behavior: 'smooth'});},close : function (id){HomeVideo.stopVideo();HomeVideo.playArea.classList.remove("fixed-in");HomeVideo.videoStopped = 1;setTimeout(function (){HomeVideo.playArea.classList.remove("fixed");},500);},play : function (id, index){if(id !== HomeVideo.id){HomeVideo.updateCopy(id);}if(index){HomeVideo.scrollIndex = index;HomeVideo.playList.scrollTo({top: HomeVideo.videoItems[HomeVideo.scrollIndex].top,left: 0,behavior: 'smooth'});}HomeVideo.id = id;HomeVideo.start();},start: function (){console.clear();console.log("start");HomeVideo.embed.innerHTML = HomeVideo.embedVideo();bc(document.getElementById("home-video-embed"));HomeVideo.videoPlayer.classList.add("playing");if(HomeVideo.usePrebid){console.log("################## usePrebid " + HomeVideo.serverUrl);bc("home-video-embed").on('ready',function(){this.ima3({serverUrl: HomeVideo.serverUrl,debug: true,timeout: 5000,ima3SdkSettings: {"disableCustomPlaybackForIOS10Plus": true},adTechOrder: ["html5","flash"],});});}videojs("home-video-embed").ready(function(){HomeVideo.player = this;HomeVideo.player.muted(true);HomeVideo.player.on("loadstart",function(){HomeVideo.updateSelectedVideo();});if(HomeVideo.loadFirstOnly === 0){HomeVideo.resumeVideo();}else{HomeVideo.stopVideo();HomeVideo.loadFirstOnly = 0;}if(HomeVideo.videoPlayer.classList.contains("autoplay")){HomeVideo.resumeVideo();}});videojs("home-video-embed").on('ended',function(){HomeVideo.playIndex++;HomeVideo.scrollIndex++;if(HomeVideo.playIndex === HomeVideo.videoItems.length){return;}HomeVideo.play(HomeVideo.videoItems[HomeVideo.playIndex].id,HomeVideo.scrollIndex);});videojs("home-video-embed").on('pause',function(){HomeVideo.videoPlayer.classList.add("paused");});videojs("home-video-embed").on('play',function(){if(this.mediainfo.link !== null){if(this.mediainfo.link.url !== null){HomeVideo.showVideoLinks(true,this.mediainfo.link);if(document.querySelector(".read-story") !== null){document.querySelector(".read-story").classList.add("show");}}else{if(document.querySelector(".read-story") !== null){document.querySelector(".read-story").classList.remove("show");}HomeVideo.showVideoLinks(false,"");}}else{if(document.querySelector(".read-story") !== null){document.querySelector(".read-story").classList.remove("show");}HomeVideo.showVideoLinks(false,"");}HomeVideo.videoPlayer.classList.remove("paused");});videojs("home-video-embed").on(["ads-ad-started","pause","ads-ad-ended","ima3-complete","ima3-started","ads-ad-skipped","adserror","ads-allpods-completed"],function(e) {console.log("################## " + e.type + " ##################");if(e.type == "ads-ad-started" || e.type == "ima3-started") {HomeVideo.isAdPlaying = true;} else {HomeVideo.isAdPlaying = false;}});},showVideoLinks : function (value,link){document.querySelectorAll(".video-link-a").forEach(function (ele, index){ele.setAttribute("href",link.url);if(!ele.classList.contains("link-box")){ele.innerHTML = link.text;}else{ele.innerHTML = "";}value ? ele.classList.add("show") : ele.classList.remove("show");});},updateCopy : function (id){document.querySelector(".video-item.current").classList.remove("current");const item = document.querySelector(".video-item[data-id='" + id + "']");item.classList.add("current");HomeVideo.videoTitle.innerHTML = item.querySelector("h3").innerText + '<time>' + item.querySelector("time").innerText+ '</time>';HomeVideo.videoDescription.innerText = item.querySelector("span").innerText;if(item.querySelector("div") !== null &&HomeVideo.videoCopyLink !== null){let text = item.querySelector(".copy div").innerText;if(text === "none"){HomeVideo.videoCopyLink.classList.add("out");}else{let json = JSON.parse(text);HomeVideo.videoCopyLink.classList.remove("out");HomeVideo.videoCopyLink.setAttribute("href",json.url);HomeVideo.videoCopyLink.innerText = json.text;}}},scroll : function (){if(window.scrollY < 100 || HomeVideo.videoStopped || HomeVideo.allowScrollPlay === 0){return false;}const bounds = HomeVideo.playArea.getBoundingClientRect();const diff = document.body.classList.contains("countdown-banner") ? 200 : 150;const bottom = (bounds.top + bounds.height - HomeVideo.videoCopy.clientHeight) - diff;if(!document.body.classList.contains("no-scroll-video")) {if (bottom < 0) {HomeVideo.allowFixed = 1;}if (bottom < 0 || bounds.top > window.innerHeight && HomeVideo.allowFixed) {if(bounds.bottom > 380 && HomeVideo.playArea.classList.contains("no-above-fixed") && DOM.visible("#under-or-equal-to-767")){if (HomeVideo.playArea.classList.contains("fixed")) {HomeVideo.playArea.classList.remove("fixed-in");setTimeout(function () {HomeVideo.playArea.classList.remove("fixed");}, 500);} }else{if (!HomeVideo.playArea.classList.contains("fixed")) {HomeVideo.playArea.classList.add("fixed");setTimeout(function () {HomeVideo.playArea.classList.add("fixed-in");}, 50);}}return true;} else {if (HomeVideo.playArea.classList.contains("fixed")) {HomeVideo.playArea.classList.remove("fixed-in");setTimeout(function () {HomeVideo.playArea.classList.remove("fixed");}, 500);}}if((bounds.top + bounds.height/2) < window.innerHeight && !HomeVideo.scrollPlay){HomeVideo.scrollPlay = 1;HomeVideo.resumeVideo();}}else{console.log(2);if(((bounds.top + bounds.height/2) < window.innerHeight) && (bounds.top + bounds.height) > 130){if(HomeVideo.scrollPlay){if(!HomeVideo.videoPage){HomeVideo.resumeVideo();}}else{HomeVideo.start();}HomeVideo.scrollPlay = 1;}else{if(!HomeVideo.videoPage) {HomeVideo.stopVideo();}}}},resumeVideo: function (){if(HomeVideo.player){HomeVideo.player.play();HomeVideo.videoStopped = 0;HomeVideo.videoPlayer.classList.remove("paused");}},stopVideo : function (){if(this.player){if(this.isAdPlaying && HomeVideo.player.ima3 !== undefined){if(this.player.ima3.adPlayer !== undefined){this.player.ima3.adPlayer.pause();}}else{this.player.pause();}}},embedVideo: function (){return '<video id="home-video-embed" data-video-id="'+HomeVideo.id+'" playsinline="true" width="100%" height="100%" muted="true" data-account="5446914862001" data-embed="default" data-application-id class="video-js" controls></video>';},updateSelectedVideo : function (){}};