/* Minification failed. Returning unminified contents. (17,46-47): run-time error JS1195: Expected expression: ) (17,49-50): run-time error JS1195: Expected expression: > (19,1-2): run-time error JS1002: Syntax error: } (23,1-2): run-time error JS1002: Syntax error: } (25,24-25): run-time error JS1195: Expected expression: ) (25,27-28): run-time error JS1195: Expected expression: > (32,1-2): run-time error JS1002: Syntax error: } (37,1-2): run-time error JS1002: Syntax error: } (138,52-53): run-time error JS1004: Expected ';': { (155,30-31): run-time error JS1100: Expected ',': = (172,29-30): run-time error JS1100: Expected ',': = (189,24-25): run-time error JS1100: Expected ',': = (244,18-19): run-time error JS1014: Invalid character: ` (244,19-20): run-time error JS1195: Expected expression: < (244,53-54): run-time error JS1197: Too many errors. The file might not be a JavaScript file: $ (236,1-38): run-time error JS1301: End of file encountered before function is properly closed: function doMailConfirmEmail(Name) (244,81-82): run-time error JS1195: Expected expression: < (244,82-83): run-time error JS1197: Too many errors. The file might not be a JavaScript file: / */ const siteRoot = '/'; const SiteLocalization = window.location.host.indexOf('.com.br') > 0 ? '.br' : ''; const Ax5Site = 'http://axeso5.futbolgratis.org' + SiteLocalization; const billingSite = 'https://billing.axeso5.futbolgratis.org' + SiteLocalization; const mainSiteRoot = 'https://axeso5.futbolgratis.org' + SiteLocalization + '/'; const authRoot = 'https://registro.axeso5.futbolgratis.org' + SiteLocalization + '/'; const AuthServicesUrl = authRoot + 'ajaxService/Service.ashx'; const RegServicesUrl = authRoot + 'ajaxService/regService.ashx'; const inviterRedirectDomain = 'https://axeso5.futbolgratis.org'; const CommunityServices = 'https://communityservices.axeso5.futbolgratis.org'; const cookieDomain = '.axeso5.futbolgratis.org' + SiteLocalization; const Action = 'mainsite-'; const Ax5GClientId = '440763772590-4aaosahfe4756da2kp7hsr97s1s1ds65.apps.googlecontent.com'; //Prod AX5; 'use strict'; //CHECK VIEWPORT window.addEventListener('DOMContentLoaded', () => { checkViewPort(); }); window.addEventListener('resize', () => { checkViewPort(); }); const checkViewPort = () => { const mainContainer = document.getElementById('mainContainer'); if (mainContainer.offsetHeight + 400 < window.innerHeight) { mainContainer.classList.add('max-view-height'); } else { mainContainer.classList.remove('max-view-height'); } }; //PREVENT DRAG document.addEventListener('dragstart', (e) => { e.preventDefault(); }); //const checkViewPort = () => { // let viewportHeight = window.innerHeight; // const mainContainer = document.getElementById('mainContainer'); // if ((mainContainer.offsetHeight < viewportHeight) && (mainContainer.offsetHeight > 550)) { // mainContainer.classList.add('max-view-height'); // } else { // mainContainer.classList.remove('max-view-height'); // } //}; //function doSuccess(msg, action = 'closeAndReload') { // const optionsSuccess = { // has_html: false, // icon: 'success', // message: msg, // button: true, // btn_action: action // } // new Ax5Alerts('alertContainer', optionsSuccess); //} //function doError(msg, action = 'close') { // const optionsError = { // has_html: false, // icon: 'error', // message: msg, // button: true, // btn_action: action // } // new Ax5Alerts('alertContainer', optionsError); //} //function doInfo(msg, action = 'close') { // const optionsInfo = { // has_html: false, // icon: 'info', // message: msg, // button: true, // btn_action: action // } // new Ax5Alerts('alertContainer', optionsInfo); //} //function doLoading() { // if (SiteLocalization) // enviandoSolicitud = 'Em processamento...'; // else // enviandoSolicitud = 'Enviando solicitud...'; // const options = { // has_html: false, // icon: 'loading', // message: enviandoSolicitud, // button: false // } // new Ax5Alerts('alertContainer', options); //} //function doClose() { // document.getElementById('alertContainer').innerHTML = '' // document.getElementById('alertContainer').classList.remove('modal-wrapper-show'); //} //function redirectTo(url) { // window.location.href = url; //} //function LogOffAndSendTo() { // LogoffAndRedirect('/'); //} //function LogOffAndSendTo() { // LogoffAndRedirect('/registro'); //} //function LogoffAndRedirect(url) { // $.ajax({ // type: 'GET', // url: AuthServicesUrl, // data: 'Field=Ex', // async: false, // cache: false, // crossDomain: true, // dataType: "jsonp", // success: function (htmlResponse) { // retval = htmlResponse; // setTimeout(function () { // window.location.href = url; // }, 2000); // }, // error: function () { } // }) //}; 'use strict'; function doSuccess(msg, action = 'closeAndReload') { if (typeof (togglebar) === 'function') { togglebar('dark'); } const optionsSuccess = { has_html: false, icon: 'success', message: msg, button: true, btn_action: action, fixed_wrapper: true } new Ax5Alerts('alertContainer', optionsSuccess); } function doError(msg, action = 'close') { if (typeof (togglebar) === 'function') { togglebar('dark'); } const optionsError = { has_html: false, icon: 'error', message: msg, button: true, btn_action: action, fixed_wrapper: true } new Ax5Alerts('alertContainer', optionsError); } function doInfo(msg, action = 'close') { if (typeof (togglebar) === 'function') { togglebar('dark'); } const optionsInfo = { has_html: false, icon: 'info', message: msg, button: true, btn_action: action, fixed_wrapper: true } new Ax5Alerts('alertContainer', optionsInfo); } function doLoading(msg = null) { if (typeof (togglebar) === 'function') { togglebar('dark'); } let message; if (msg !== null) message = msg; else message = lang.ENVIANDO_SOLICITUD; const options = { has_html: false, icon: 'loading', message: message, button: false, fixed_wrapper: true } new Ax5Alerts('alertContainer', options); } function doClose() { if (typeof (togglebar) === 'function') { togglebar('light'); } document.getElementById('alertContainer').innerHTML = '' document.getElementById('alertContainer').classList.remove('modal-wrapper-show'); } function doBanned() { if (typeof (togglebar) === 'function') { togglebar('dark'); } const optionsBanned = { has_html: true, icon: 'error', html_content: '

' + lang._BANNED + '

', button: true, btn_action: 'close' } new Ax5Alerts('alertContainer', optionsBanned); } function doMailConfirmEmail(Name) { if (typeof (togglebar) === 'function') { togglebar('dark'); } const optionsMailConf = { has_html: false, icon: 'error', message: `

${lang.CUENTA_NO_CONFIRMADA}

`, button: true, btn_action: 'btnSendEmailConf("' + Name + '")', btn_text: lang.BTN_MAIL_CONFIRM, close_button: true } new Ax5Alerts('alertContainer', optionsMailConf); } function btnSendEmailConf(Name) { const url = location.origin === Ax5Site ? escape(mainSiteRoot + 'registro') : escape(location.origin); doLoading(); $.ajax({ type: 'POST', url: RegServicesUrl, async: true, crossDomain: true, dataType: 'jsonp', data: 'Field=sendActivationByPopUp' + '&Name=' + Name + '&location=' + url,//escape(mainSiteRoot + 'registro'), success: function (jsonResponse) { if (jsonResponse != '') { if (jsonResponse.State == true) { doSuccess(lang.EMAIL_SENT, 'redirectTo("/")'); } else { doError(jsonResponse.Msg); } } else { doError(lang.CONF_MAIL_REENVIADO); } }, error: function (error) { console.log(error); doError(lang.CONF_MAIL_REENVIADO); } }); } function redirectTo(url) { window.location.href = url; } function getReturnUrlN() { let retval = ''; //url.slice(p + 10, url.length); if (location.href.split('?').length > 1) { const params = location.href.split('?')[1]; for (let i = 0; i < params.split('&').length; i++) { if (params.split('&')[i].split('=')[0].toLowerCase() == 'returnurl') retval = unescape(params.split('&')[i].split('=')[1]); } } if (retval == '') retval = '/'; return retval.replace('&openinparent', '').replace('?openInOverlay=true', ''); } function googleGetState(code, action) { $.ajax({ type: 'POST', url: AuthServicesUrl, data: 'Field=Google&code=' + code + '&authority=' + escape(window.origin), async: true, cache: false, crossDomain: true, dataType: 'jsonp', success: function (jsonResponse) { if (jsonResponse != '') { switch (jsonResponse.State) { case 0: //INGRESA switch (action) { case 'oauth2-': location.reload(); break; case 'launcher-': case 'mainsite-': location.href = unescape(getReturnUrlN()); break; case 'mainsite-': case 'gamesite-': location.href = location.origin; break; case 'mainsite-recover': location.href = '/mi-cuenta'; break; //default: // doInfo(action); // break; } break; case 2: //FALTA CONFIRMAR //doMailConfirmEmail(document.getElementById('txtName').value, jsonResponse.Msg, false); doMailConfirmEmail(jsonResponse.realName); break; case 4: doError(jsonResponse.Msg); break; case 7: // EXISTE EN LA BASE O NUEVO switch (action) { case 'oauth2-': case 'launcher-': case 'mainsite-': case 'mainsite-recover': let ignoreName; if (jsonResponse.realName === '' || jsonResponse.realName === undefined || jsonResponse.realName === null) ignoreName = 1; else ignoreName = 2; if (action === 'oauth2-') window.location.href = mainSiteRoot + 'registro?GoogleAct=' + ignoreName; else window.location.href = '/registro?GoogleAct=' + ignoreName; break; case 'mainsite-': case 'gamesite-': googleUI(jsonResponse.realName, jsonResponse.email); break; //default: // doInfo(action); // break; } break; default: //OTROS ERRORES doError(lang.ERROR_SOLICITUD + '
Error ' + jsonResponse.State); break; } } else { doError(lang.ERROR_SOLICITUD); } }, error: function (error) { console.log(error); doError(lang.ERROR_SOLICITUD); } }); } //window.addEventListener('DOMContentLoaded', () => { // checkViewPort(); //}); //window.addEventListener('resize', () => { // checkViewPort(); //}); //const checkViewPort = () => { // const mainContainer = document.getElementById('mainContainer'); // if (mainContainer.offsetHeight + 400 < window.innerHeight /*&& (mainContainer.offsetHeight + 438 < window.innerHeight)*/) { // mainContainer.classList.add('max-view-height'); // } else { // mainContainer.classList.remove('max-view-height'); // } //}; //function LogOffAndSendTo() { // LogoffAndRedirect('/'); //} //function LogOffAndSendTo() { // LogoffAndRedirect('/registro'); //} //function LogoffAndRedirect(url) { // $.ajax({ // type: 'GET', // url: AuthServicesUrl, // data: 'Field=Ex', // async: false, // cache: false, // crossDomain: true, // dataType: "jsonp", // success: function (jsonResponse) { // retval = jsonResponse; // setTimeout(function () { // window.location.href = url; // }, 2000); // }, // error: function () { } // }) //}; 'use strict'; class Ax5Alerts { constructor(divWrapper, options) { this._divWrapper = document.getElementById(divWrapper); this._bodyWitdh = options.width; this._bodyHeight = options.height; this._maxWidth = options.max_width; this._minWidth = options.min_width; this._maxHeight = options.max_height; this._minHeight = options.min_height; this._text = options.message; this._icon = options.icon; this._button = options.button; this._btnAction = options.btn_action; this._btnText = options.btn_text; this._hasHtmlContent = options.has_html; this._htmlContent = options.html_content; this._closeButton = options.close_button; this._confirmDialog = options.confirm_dialog; this._confirmAction = options.confirm_action; this._cancelAction = options.cancel_action; this._confirmBtnText = options.confirm_btn_txt; this._confirmBtnWidth = options.confirm_btn_width; this._cancelBtnText = options.cancel_btn_txt; this._cancelBtnWidth = options.cancel_btn_width; this._btnGroupWidth = options.btn_group_width; this._ignoreEscKey = options.ignore_esc_key; this._fixedWrapper = options.fixed_wrapper; this._padding = options.padding; this._modalBody; this.init(); } init() { this.pressEnter(); this._divWrapper.innerHTML = ""; this._divWrapper.classList.add('modal-wrapper-show'); if (this._fixedWrapper === true) this._divWrapper.classList.add('modal-wrapper-fixed'); this._modalBody = document.createElement('div') const maxWidth = (this._maxWidth !== '' && this._maxWidth !== undefined) ? 'max-width:' + this._maxWidth + ';' : ''; const maxHeight = (this._maxHeight !== '' && this._maxHeight !== undefined) ? 'max-height:' + this._maxHeight + ';': ''; const minWidth = (this._minWidth !== '' && this._minWidth !== undefined) ? 'min-width:' + this._minWidth + ';' : ''; const minHeight = (this._minHeight !== '' && this._minHeight !== undefined) ? 'min-height:' + this._minHeight + ';' : ''; const alertbodyWidth = (this._bodyWitdh !== '' && this._bodyWitdh !== undefined) ? 'width:' + this._bodyWitdh + ';' : ''; const alertbodyHeight = (this._bodyHeight !== '' && this._bodyHeight !== undefined) ? 'height:' + this._bodyHeight + ';' : ''; const padding = (this._padding !== '' && this._padding !== undefined) ? 'padding:' + this._padding + ';' : ''; this._modalBody.setAttribute('style', `${alertbodyWidth}${alertbodyHeight}${maxWidth}${maxHeight}${minWidth}${minHeight}${padding}`); this._modalBody.setAttribute('class', 'modal-body'); this._divWrapper.appendChild(this._modalBody); if(this._hasHtmlContent) this.showInnerHtml(); else { this.showIcon(); this.showText(); } this.showButton(); this.showConfirmButton(); if(this._closeButton) this.showCloseButton(); setTimeout(()=> this._modalBody.classList.add('modal-body-show'), 25); } showIcon() { let icon; switch(this._icon) { case 'loading': icon = document.createElement('div'); icon.setAttribute('class', 'lds-ring lds-ring-'); icon.innerHTML = '
'; break; case 'error': icon = document.createElement('div'); icon.setAttribute('class', 'error-icon'); icon.innerHTML = ''; break; case 'success': icon = document.createElement('div'); icon.setAttribute('class', 'success-icon'); icon.innerHTML = ''; break; case 'info': icon = document.createElement('div'); icon.setAttribute('class', 'info-icon'); icon.innerHTML = ''; break; case 'question': icon = document.createElement('div'); icon.setAttribute('class', 'info-icon'); icon.innerHTML = ''; break; case 'warning': icon = document.createElement('div'); icon.setAttribute('class', 'warning-icon'); icon.innerHTML = ''; break; case 'shopping-cart': icon = document.createElement('div'); icon.setAttribute('class', 'cart-icon'); icon.innerHTML = '
'; break; case 'none': return; default: icon = document.createElement('div'); icon.setAttribute('class', 'lds-ring lds-ring-'); icon.innerHTML = '
'; break; } this._modalBody.appendChild(icon); } showText() { let msgText; if(this._text !== '' && this._text !== null && this._text !== undefined) { msgText = document.createElement('p'); msgText.setAttribute('class', 'alert-msg'); msgText.innerHTML = this._text; this._modalBody.appendChild(msgText); } } showButton() { let button; if(this._button) { button = document.createElement('div'); button.setAttribute('id', 'btnAx5Alert'); button.setAttribute('class', 'btn-div-alert'); switch(this._btnAction) { case 'close': button.addEventListener('click', () => this.closeAlert()); break; case 'closeAndReload': button.addEventListener('click', () => { this.closeAlert(); location.href = location.href.replace('#',''); }); break; default: button.setAttribute('onclick', this._btnAction); break; } if (this._btnText) { button.innerHTML = this._btnText; } else { button.innerHTML = 'Aceptar'; } this._modalBody.appendChild(button); } } showCloseButton() { let closeButton; closeButton = document.createElement('div'); closeButton.setAttribute('id', 'closeButtonAx5Alert'); closeButton.setAttribute('class', 'close-btn-alert'); closeButton.innerHTML = ''; closeButton.addEventListener('click', () => this.closeAlert()); this._modalBody.appendChild(closeButton); } showInnerHtml() { let innerHTML; innerHTML = document.createElement('div'); innerHTML.setAttribute('id', 'htmlContentAx5Alert'); innerHTML.setAttribute('class', 'html-content-alert'); innerHTML.innerHTML = this._htmlContent; this._modalBody.appendChild(innerHTML); } showConfirmButton() { if (this._confirmDialog) { let confirmButtonGroup; let confirmButton; let cancelButton; confirmButtonGroup = document.createElement('div'); confirmButtonGroup.setAttribute('class', 'btn-confirm-group'); if (this._btnGroupWidth) confirmButtonGroup.setAttribute('style', 'width:' + this._btnGroupWidth + ';'); confirmButton = document.createElement('div'); confirmButton.setAttribute('id', 'btnAx5Alert'); confirmButton.setAttribute('class', 'btn-alert-confirm'); confirmButton.setAttribute('onclick', this._confirmAction); if (this._confirmBtnText) confirmButton.innerText = this._confirmBtnText; else confirmButton.innerText = 'Si'; if (this._confirmBtnWidth) confirmButton.setAttribute('style', 'width:' + this._confirmBtnWidth + ';'); confirmButtonGroup.appendChild(confirmButton); cancelButton = document.createElement('div'); cancelButton.setAttribute('id', 'btnCancelAx5Alert'); cancelButton.setAttribute('class', 'btn-alert-cancel'); cancelButton.addEventListener('click', () => this.closeAlert()); if (this._cancelBtnText) cancelButton.innerText = this._cancelBtnText; else cancelButton.innerText = 'No'; if (this._cancelBtnWidth) cancelButton.setAttribute('style', 'width:' + this._cancelBtnWidth + ';'); if (this._cancelAction) cancelButton.setAttribute('onclick', this._cancelAction); confirmButtonGroup.appendChild(cancelButton); this._modalBody.appendChild(confirmButtonGroup); } } closeAlert() { this._modalBody.classList.remove('modal-body-show'); setTimeout(() => { this._divWrapper.classList.remove('modal-wrapper-show'); if (typeof (togglebar) === 'function') togglebar('light'); }, 500); setTimeout(() => { this._divWrapper.innerHTML = ""; }, 600); } pressEnter() { document.addEventListener('keydown', (e)=> { //e.stopPropagation(); if (this._divWrapper.classList.contains('modal-wrapper-show')) { if (e.key === 'Enter') { if (document.getElementById('btnAx5Alert') !== null) { e.preventDefault(); document.getElementById('btnAx5Alert').click(); } } else if (e.key === 'Escape') { e.preventDefault(); if (this._ignoreEscKey !== true) { //if (document.getElementById('btnCancelAx5Alert') === null) // document.getElementById('btnAx5Alert').click(); //else // document.getElementById('btnCancelAx5Alert').click(); if (document.getElementById('btnAx5Alert') !== null) document.getElementById('btnAx5Alert').click(); else if (document.getElementById('btnCancelAx5Alert') !== null) document.getElementById('btnCancelAx5Alert').click(); else if (document.getElementById('closeButtonAx5Alert') !== null) document.getElementById('closeButtonAx5Alert').click(); } } } }); } };