window.performaConfig={};window.cartstackAPI={szEmail:"",szCartID:"",result:""}; var performa_Class=function(){var e=this;this.modules={powercart:{cs_debug:typeof window.cs_debug=="undefined"?xe_core.vm=="stage"&&xe_core.level==1?!0:!1:window.cs_debug,rcMode:!0,getProc:function(){var b={newlayer:window.btoa(window.location.href.toLowerCase()),cartstacktest:-10)for(var d=0;d=1?"//stage":"//api");window.pfm_pubkey=xe_isset(xe_config.crossDomain,"object")?xe_config.crossDomain.DGUID:xe_config.GUID;xe_basicXMLHttpRequest("GET",pfm_env+'.performa.ai/v1/?type\x3dfront\x26params\x3d{"route":"store_details"}\x26pubkey\x3d'+pfm_pubkey+"\x26cache\x3dremote",!0,function(b){if(b.status===200){try{window.performaConfig=String(b.responseText)!== ""?JSON.parse(b.responseText):!1}catch(c){xe_setLS("pfmsuite_result","failed",2/24),xe_core.vm&&console.error("[Performa] Failed to parse API response! "+c)}if(typeof window.performaConfig==="object"&&xe_isset(window.performaConfig.status))if(window.performaConfig.status==="ok"){xe_setLS("pfmsuite_result","success",1);xe_core.vm&&console.log("[Performa] - API loaded with success!");b=xe_isset(window.performaConfig.details.version)?"-"+String(window.performaConfig.details.version):"";b=(pfm_env.indexOf("//api")> -1?"performa"+b+".js":"performa-valid"+b+".js")+"?ts\x3d"+xe_getCacheTS();var a=!0;if(xe_isset(window.performaConfig.details.variables.boot,"string")&&window.performaConfig.details.variables.boot!=""){var d="(function () {"+window.performaConfig.details.variables.boot+"})()";try{a=eval(d)}catch(c){xe_core.vm&&console.error("[Performa] Failed to execute the boot script! "+c)}}if(a!==!1){xe_isset(window.performaConfig.details.cross_domain,"string")&&window.performaConfig.details.cross_domain!=""&&(document.cookie.split(";").reduce((c, g)=>{[c]=g.split("\x3d").map(f=>f.trim());c.indexOf("xe_xdm-")>-1&&(document.cookie=c+"\x3d;expires\x3dThu, 01 Jan 1970 00:00:01 GMT;")},{}),xe_crossDomain(window.performaConfig.details.cross_domain));a=document.querySelector(".ch-credits");if(e.modules.suite.getMetaAuthor().indexOf("Tray")>-1||a&&a.textContent.includes("TrayCommerce"))window.performaConfig.details.csp=!0,xe_core.vm&&console.warn("[Performa] - Tray Commerce auto CSP");window.performaConfig.details.csp&&(e.convertToGlobals=function(c, g){g=xe_isset(g,"boolean")?g:!1;c=c.replace(/function\s+(\w+)\s*\(\s*\)/g,function(f,h){return"window."+h+" \x3d function()"});g&&(c=c.replace(/var\s+(\w+)\s*=\s*/g,function(f,h){return"window."+h+" \x3d "}));return c});a=document.createElement("script");a.type="text/javascript";a.async=!0;a.id="performaLoadHelper";a.src="//"+(pfm_env.indexOf("//api")>-1?"cdn":"cdn-valid")+".performa.ai/v1/"+b;document.getElementsByTagName("head")[0].appendChild(a)}else xe_core.vm&&console.warn("[Performa] Execution stopped! (boot script)")}else xe_setLS("pfmsuite_result", "failed",2/24);else xe_core.vm&&console.error("[Performa] - Data Error!")}})}}};Object.entries||(Object.entries=function(b){for(var a=Object.keys(b),d=a.length,c=Array(d);d--;)c[d]=[a[d],b[a[d]]];return c});this.ready=function(){xe_core.requireExtension("datatunnel","visitor")?(e.modules.suite.init(),xe_core.requireExtension("lgpd")||(xe_core.vm&&console.log("[Performa][PowerCart] LGPD Extension not loaded..."),e.modules.powercart.init())):console.error("[Performa] Required extensions not loaded...")}; xe_core.requireExtension("lgpd")&&(xe_core.hookEvent(xex_lgpd.events.COOKIE_CONSENT_INIT,function(){xe_core.vm&&console.log("[Performa][PowerCart] LGPD Extension inited! Lets init...");e.modules.powercart.init()}),xe_core.hookEvent(xex_lgpd.events.COOKIE_CONSENT,function(){var b=Array.prototype.slice.call(arguments);xe_isset(b[0],"string")&&b[0]==="DENY"&&(e.modules.powercart.cs_debug&&console.log("[Performa][PowerCart] - User just denied sharing cookies so we froze any captures already sent..."), typeof cartstack_LGPD==="function"&&cartstack_LGPD(_cartstack))}));xe_core.hookEvent(XE_EVENTS.vars.ready,function(){e.ready()});xe_core.ready&&e.ready()},xex_performa=new performa_Class;