let urlTesting=window.location.href.includes("validation"),stepName="begin_checkout",productTM={diretoria:"Produtos Digitais",site:"desconhecido"},hasThirdPartyCookie=!1;if(urlTesting&&console.log("version 026"),window.universal_variable){async function verifyThirdCookies(){let e=!1;function i(e,i,t){window.removeEventListener("message",i),clearTimeout(t),e&&e.parentNode&&e.parentNode.removeChild(e)}const t=await new Promise(t=>{const a=document.createElement("iframe");a.src="https://tm.jsuol.com.br/modules/external/admanager/third-cookies.html",a.id="third-party-cookie",a.style.display="none",document.body.appendChild(a);const r=setTimeout(()=>{e||(e=!0,i(a,o,r),t(!1))},3e3);function o(s){"https://tm.jsuol.com.br"===s.origin&&"THIRD_PARTY_COOKIE_RESULT"===s.data?.type&&(e||(e=!0,i(a,o,r),t(!0===s.data.enabled)))}window.addEventListener("message",o)});window.thirdPartyCookiesEnabled=t,window.thirdPartyDetectionFinished=!0,t?(window.thirdPartyMode="ENABLED",window.thirdPartyData={strategy:"legacy_cookie_supported"},hasThirdPartyCookie=!0):(window.thirdPartyMode="BLOCKED",window.thirdPartyData={strategy:"fallback_mode"},hasThirdPartyCookie=!1)}function insertPermutive(){let e=document.createElement("script");e.innerHTML="!function(e,o,n,i){if(!e){e=e||{},window.permutive=e,e.q=[];var t=function(){return([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,function(e){return(e^(window.crypto||window.msCrypto).getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16)})};e.config=i||{},e.config.apiKey=o,e.config.workspaceId=n,e.config.environment=e.config.environment||'production',(window.crypto||window.msCrypto)&&(e.config.viewId=t());for(var g=['addon','identify','track','trigger','query','segment','segments','ready','on','once','user','consent'],r=0;r({promo:e.id||void 0,name:e.name||void 0,inscriptionId:e.inscriptionId||void 0,periodicity:e.periodicity||void 0,oferta:e.skuCode||void 0,unitPrice:e.unitPrice||void 0})),payment_type:t.payment_type||void 0,total:Number(t.total)||void 0,transactionId:t.transactionId||void 0,stepName:stepName},o)}async function sendDataPermutive(){await verifyThirdCookies();try{if(permutive)if(universal_variable&&universal_variable.hasOwnProperty("ecommerce")){window.universal_variable.ecommerce=function e(i,t=""){return new Proxy(i,{get(i,a,r){const o=Reflect.get(i,a,r);return"object"==typeof o&&null!==o?e(o,`${t}${a}.`):o},set:(e,i,t,a)=>(sendCheckoutEventPermutive(),Reflect.set(e,i,t,a))})}(window.universal_variable.ecommerce)}else{const e=document.getElementById("VUELAND_STATE");let i;if(i=e?JSON.parse(e.textContent):null,null!==i){if(UOLPD.dataLayer&&universal_variable&&universal_variable.aud&&universal_variable.page){const e=universal_variable.aud.publicationDate,[t,a]=e.split(" "),[r,o,s]=t.split("/"),n=`${s}-${o}-${r}T${a}`,d=new Date(n),c=[];i.page.authors.forEach(e=>{c.push(e.name)});const u=String(UOLPD.dataLayer.isIncognito)||"",l=String(UOLPD.dataLayer.origin)||"",g=UOLPD.dataLayer.tags||universal_variable.page.tags||[],p=Object.values(universal_variable.page.tagsMap)||[""],m=universal_variable.aud.central||"",v=universal_variable.aud.channel||"",b=universal_variable.aud.subchannel||"",P=universal_variable.aud.collection||"",h=e?d.toISOString():(new Date).toISOString(),w=universal_variable.aud.mediaType||"",y=universal_variable.aud.mediaTitle||"",f=universal_variable.aud.characterQuantity||2e3,D=universal_variable.aud.previousCentral||"",L=i.page.contentType||"",_=i.page.adultContent||!1,T=Number(i?.page?.comments?.answers??0),O=i.page.showAds||!0,k=i.page.isPrime||!1,U=i?.page?.recommendation?.selected??"";let S=!1,C=!1;const I=UOLPD.dataLayer.tags||universal_variable.page.tags?universal_variable.page.tags.map(e=>e.toString()):[],E={isIncognito:u,origin:l,tags:g,central:m,channel:v,subchannel:b,collection:P,publicationDate:h,tagsText:p,mediaType:w,mediaTitle:y,characterQuantity:f,previousCentral:D,authors:c,tagsId:I,hasThirdPartyCookie:hasThirdPartyCookie};E.contentType=L||"",E.adultContent=_||!1,E.commentsQuantity=T||0,E.updated=i.page.updated||"",E.showAds=O||!0,E.isPrime=k||!1,E.recommendationStatus=U||"",E.isLogged=S||!1,E.isSubscriber=C||!1;let N=setInterval(()=>{universal_variable.user&&void 0!==universal_variable.user.isLogged&&void 0!==universal_variable.user.isSubscriber&&(clearInterval(N),S=universal_variable.user.isLogged||!1,C=universal_variable.user.isSubscriber||!1,E.isLogged=S||!1,E.isSubscriber=C||!1,permutive.addon("web",{page:E}))},100)}}else{let e={isIncognito:String(UOLPD.dataLayer.isIncognito)||"",origin:String(UOLPD.dataLayer.origin)||"",tags:UOLPD.dataLayer.tags||[],central:"",channel:"",subchannel:"",collection:"",publicationDate:(new Date).toISOString(),tagsText:[""],mediaType:"",mediaTitle:"",characterQuantity:0,previousCentral:"",authors:[""],hasThirdPartyCookie:hasThirdPartyCookie,contentType:"",adultContent:!1,commentsQuantity:0,updated:"",showAds:!0,isPrime:!1,recommendationStatus:"",isLogged:!1,isSubscriber:!1};permutive.addon("web",{page:e})}}}catch(e){console.log("Error in sendDataPermutive:",e)}}insertPermutive(),insertUOLIDinPermutive(),sendDataPermutive(),universal_variable.hasOwnProperty("ecommerce")&&(overrideTriggerUOLTM(),sendCheckoutEventPermutive())}