var IOLStringUtilsModule=function(){function b(){}b.normalizeString=function(a,d){void 0===d&&(d="-");return a?a.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[^\w\s]|_/g,"").replace(/\s/g,d):""};b.stripHTMLFromString=function(a){var d=document.createElement("div");d.innerHTML=a;return 0===d.childNodes.length?"":d.childNodes[0].nodeValue};b.simplifyAndCutEncodedString=function(a,d){var c=a;decodeURIComponent(a)!==a&&(c=decodeURIComponent(a));c=(new DOMParser).parseFromString("\x3c!doctype html\x3e\x3cbody\x3e"+ c,"text/html").body.textContent;c=c.trim().normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/['"]+/g,"").replace(/[^\w\s]|_/g,"");c=encodeURIComponent(c);if(c.length>d)for(c=c.substring(0,d);!b.isAValidadEncodedText(c);)c=c.substring(0,c.lastIndexOf("%"));return decodeURIComponent(c)};b.isAValidadEncodedText=function(a){try{return decodeURIComponent(a),!0}catch(d){return!1}};b.getDomainFromURL=function(a){a=a.replace("https://","");a=a.replace("http://","");a=a.substring(0,a.indexOf("/")); a=a.replace("stg.","");a=a.replace("dev.","");a=a.replace("dev","");return a=a.replace("www.","")};b.getDomain=function(a){return(a=this.DOMAINS[a.toUpperCase()])?a:""};b.DOMAINS={IOL:"https://iol.pt",TVI:"https://tvi.iol.pt",TVI24:"https://tvi24.iol.pt",CNN:"https://cnnportugal.iol.pt",TVIPLAYER:"https://tviplayer.iol.pt",MAISFUTEBOL:"https://maisfutebol.iol.pt",SELFIE:"https://selfie.iol.pt",AUTOPORTAL:"https://autoportal.iol.pt",LUX:"https://lux.iol.pt"};return b}(),IOLOnliveChannelType=function(){return function(b, a){this.name=b;this.icon=a}}(),IOLOnliveChannel=function(){return function(b,a,d,c,f){this.name=b;this.title=a;this.cover=d;this.url=c;this.type=f}}(),IOLOnliveChannelLibrary=function(){function b(){}b.getChannel=function(a){return this.LIBRARY[a]};b.RADIO_TYPE=new IOLOnliveChannelType("radio","icon-radio");b.TV_TYPE=new IOLOnliveChannelType("tv","icon-tv");b.LIVE_TYPE=new IOLOnliveChannelType("live","");b.LIBRARY={RADIO_COMERCIAL:new IOLOnliveChannel("Rádio Comercial","Ouvir emissão","https://radiocomercial.iol.pt/images/svg/logoRC_white.svg", "https://radiocomercial.iol.pt/player/emissaofm",b.RADIO_TYPE),M80:new IOLOnliveChannel("M80","Ouvir emissão","https://m80.iol.pt/images/logo-m80-footer.svg","https://m80.iol.pt/player",b.RADIO_TYPE),CIDADE_FM:new IOLOnliveChannel("CIDADE_FM","Ouvir emissão","https://cidade.iol.pt/images/logo-CDD.svg","https://cidade.iol.pt/player/",b.RADIO_TYPE),SMOOTH_FM:new IOLOnliveChannel("SMOOTH","Ouvir emissão","https://smoothfm.iol.pt/images/logo-sfm-white.svg","https://smoothfm.iol.pt/player/SMOOTHFM",b.RADIO_TYPE), VODAFONE_FM:new IOLOnliveChannel("VODAFONE.FM","Ouvir emissão","/img/logos/radios/vodafonefm.png","https://vodafone.fm",b.RADIO_TYPE),NIT_FM:new IOLOnliveChannel("NIT FM","Ouvir emissão","/img/logos/radios/nitfm.png","https://nitfm.pt/",b.RADIO_TYPE),NIT_TV:new IOLOnliveChannel("NIT TV","","https://nittv.nit.pt/wp-content/themes/nittv-v1/dist/images/logo_nittv.png","https://nittv.nit.pt/",b.TV_TYPE)};return b}(),IOLOnliveLayout=function(){function b(a){this.onlive=a}b.prototype.createOverlayContainer= function(){var a=this.createOnliveHTML(),d=this.createBroadcastHTML(),c=this.createOtherChannelsHTML();this.onlive.onliveElement.innerHTML='\x3cdiv id\x3d"iol-onlive-container" class\x3d"'+("itens-"+this.onlive.onliveObject.size+" overlay "+(this.onlive.conditions.isClosed?"minimize":""))+'"\x3e \n '+(this.onlive.isClosable?'\x3cdiv id\x3d"iol-onlive-container-close"\x3e\n \x3cimg src\x3d"https://cdn.iol.pt/js/utils/Modules/IOLOnlive/dist/assets/live.gif" width\x3d"14"/\x3e EM DIRETO \x3cspan class\x3d"icon-close"\x3e\x3c/span\x3e\n \x3c/div\x3e': "")+'\n \x3cdiv id\x3d"iol-onlive-container-inside"\x3e\n '+a+"\n "+d+"\n "+c+"\n \x3c/div\x3e\n \x3c/div\x3e"};b.prototype.createBannerContainer=function(){var a=this.createOnliveHTML(),d=this.createBroadcastHTML(),c=this.createOtherChannelsHTML();this.onlive.onliveElement.innerHTML='\x3cdiv id\x3d"iol-onlive-container" class\x3d"'+("itens-"+this.onlive.onliveObject.size+" "+(this.onlive.conditions.isClosed? "minimize":""))+'"\x3e \n '+(this.onlive.isClosable?'\x3cdiv id\x3d"iol-onlive-container-close"\x3e\x3cspan class\x3d"icon-close"\x3e\x3c/span\x3e\x3c/div\x3e':"")+'\n \x3cdiv id\x3d"iol-onlive-container-inside"\x3e\n '+a+"\n "+d+"\n "+c+"\n \x3c/div\x3e\n \x3c/div\x3e"};b.prototype.createOnliveHTML=function(){var a=this,d="";this.onlive.onliveObject.lives&& 0