window.performaConfig={}; var performa_Class=function(){var that=this;window.pfm_env=window.location.protocol+("dev"==xe_core.vm?"//dev":!1!==xe_core.vm&&xe_core.level>=1?"//stage":"//api"),window.pfm_pubkey=window.pfm_pubkey||(xe_isset(xe_config.crossDomain)?xe_config.crossDomain.DGUID:xe_config.GUID),this.getMetaAuthor=function(){var e=document.getElementsByTagName("meta"),r="";if("object"==typeof e&&e.length>0)for(var t=0;t -1?"performa"+version+".js":"performa-valid"+version+".js")+"?ts\x3d"+xe_getCacheTS(),resultEval=!0;if(xe_isset(performaConfig.details.variables.boot,"string")&&""!=performaConfig.details.variables.boot){var evalVar="(function () {"+performaConfig.details.variables.boot+"})()";try{var resultEval=eval(evalVar)}catch(e){xe_core.vm&&console.error("[Performa] Failed to execute the boot script! "+e)}}if(!1!==resultEval){xe_isset(performaConfig.details.cross_domain,"string")&&""!=performaConfig.details.cross_domain&& (document.cookie.split(";").reduce((e,r)=>{var [t,a]=r.split("\x3d").map(e=>e.trim());t.indexOf("xe_xdm-")>-1&&(document.cookie=t+"\x3d;expires\x3dThu, 01 Jan 1970 00:00:01 GMT;")},{}),xe_crossDomain(performaConfig.details.cross_domain));var trayCredits=document.querySelector(".ch-credits");("Tray Tecnologia"==that.getMetaAuthor()||trayCredits&&trayCredits.textContent.includes("TrayCommerce"))&&(performaConfig.details.csp=!0,xe_core.vm&&console.warn("[Performa] - Tray Commerce auto CSP")),performaConfig.details.csp&& (that.convertToGlobals=function(e,r){return r=!!xe_isset(r,"boolean")&&r,e=e.replace(/function\s+(\w+)\s*\(\s*\)/g,function(e,r){return"window."+r+" \x3d function()"}),r&&(e=e.replace(/var\s+(\w+)\s*=\s*/g,function(e,r){return"window."+r+" \x3d "})),e});var script=document.createElement("script");script.type="text/javascript",script.async=!0,script.id="performaLoadHelper",script.src="//"+(pfm_env.indexOf("//api")>-1?"cdn":"cdn-valid")+".performa.ai/v1/"+performa_js,document.getElementsByTagName("head")[0].appendChild(script)}else xe_core.vm&& console.warn("[Performa] Execution stopped! (boot script)")}}else xe_core.vm&&console.error("[Performa] - Data Error!")})},this.ready=function(){xe_core.requireExtension("datatunnel.js","visitor.js")?(xe_core.vm&&console.log("[Conectiva][Performa] Initing extension..."),that.init()):console.error("[Conectiva][Performa] Required extensions not loaded...")},xe_core.hookEvent(XE_EVENTS.vars.ready,function(){that.ready()}),xe_core.ready&&that.ready()},xex_performa=new performa_Class;