class FunctionsHelper{constructor(){this.closeCallbacks=[]}browsers(){var t=navigator&&navigator.userAgent.toLowerCase()||"",e={webkit:/webkit/.test(t),mozilla:/mozilla/.test(t)&&!/(compatible|webkit)/.test(t),chrome:/chrome/.test(t),msie:/msie/.test(t)&&!/opera/.test(t),firefox:/firefox/.test(t),safari:/safari/.test(t)&&!/chrome/.test(t),opera:/opera/.test(t),hasFlash:!!navigator.mimeTypes["application/x-shockwave-flash"],ios:/iphone|ipad|ipod/i.test(t),version:""};return e.version=e.safari?(t.match(/.+(?:ri)[\/: ]([\d]+)/)||[])[1]:(t.match(/.+(?:ox|me|ra|ie)[\/: ]([\d]+)/)||[])[1],e}xhrJsonRequest(t,e){const r=new XMLHttpRequest;r.open("GET",t,!0),r.addEventListener("readystatechange",()=>{if(4===r.readyState)if(200===r.status&&r.responseText)try{return e(JSON.parse(r.responseText))}catch(t){return e()}else console.log("cb3"),e()},!1),r.send()}findScript(t){for(var e=document.getElementsByTagName("script"),r=0;r1)try{o=decodeURIComponent(e[1].replace(/^\s+|\s+$/g,""))}catch(t){o=void 0}return o}e=null,""}}style(t,e,r){if("object"==typeof e){var o=e;for(var a in e="",o)e+=r?a+":"+o[a]+";":a+":"+o[a]+" !important;"}r?(t.style.cssText=e+";"+t.style.cssText,t.style.cssText=t.style.cssText.replace(/!\s*important;/g,";").replace(/;/g," !important;")):(t.style.cssText=t.style.cssText.replace(/!\s*important;/g,";")+";"+e,t.style.cssText=t.style.cssText.replace(/!\s*important;/g,";").replace(/;/g," !important;"))}isChromeNew(){return this.browsers().chrome}isFireFox(){return this.browsers().firefox}static addScript(t,e=document.body,r=(()=>null)){let o=document.createElement("script"),a=navigator.userAgent.toLowerCase();if(o.encoding="UTF-8",/msie/.test(a)&&!/opera/.test(a)?o.onreadystatechange=function(){"loaded"!=this.readyState&&"complete"!=this.readyState||r()}:(o.onload=r,o.onerror=r),o.type="text/javascript",o.src=t,o.async=!0,o.charset="utf-8",e&&"string"==typeof e){let t=FunctionsHelper.findScriptBySrc(e);t?t.parentNode.insertBefore(o,t):document.body.appendChild(o)}else document.body.appendChild(o)}addSyncPixel(t,e){this.cookieGet(e)||(this.cookieSet(e,1),this.addPixel(t))}static findScriptBySrc(t){let e=document.getElementsByTagName("script");for(let r=0;r