PageSourceSearch

https://eldogomes.com.br/wp-content/cache/min/1/sdk.js?ver=1790469852

js eldogomes.com.br collected 2026-10-02 11:26:28 UTC 16,412 bytes, 1 lines download raw bytes

1var __defProp=Object.defineProperty;var __defNormalProp=(obj,key,value)=>key in obj?__defProp(obj,key,{enumerable:!0,configurable:!0,writable:!0,value}):obj[key]=value;var __publicField=(obj,key,value)=>__defNormalProp(obj,typeof key!="symbol"?key+"":key,value);var sdk=(()=>{var _a;var m=Object.defineProperty,v=Object.getOwnPropertyDescriptor,I=Object.getOwnPropertyNames,R=Object.prototype.hasOwnProperty,D=(n,e)=>{for(var t in e)m(n,t,{get:e[t],enumerable:!0})},_=(n,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of I(e))!R.call(n,r)&&r!==t&&m(n,r,{get:()=>e[r],enumerable:!(i=v(e,r))||i.enumerable});return n},T=n=>_(m({},"__esModule",{value:!0}),n),E={};D(E,{SenseAds:()=>g,default:()=>U});var g=(_a=class{constructor(e,t=!0){this.adGuid=e,this.enableMetrics=t,this.clickMacro="",this.cacheBusterMacro=this.getRandomNumber(),this.refererMacro=this.getDefaultReferer(),this.reportElementId=this.getRandomContainer(),this.reportTotalVisibleTime=0,this.visibleStartTime=null,this.reportToken=this.getToken(),this.adContainer=null,this.adData=null,this.currentAdData=null,this.container=null,this.width=0,this.height=0,this.sizeForcedByTag=!1,this.adFetchPromise=this.fetchAdData(),this.impressionReported={},this.creativeViewReported={},this.lastIntersectionRatio=0,this.longestContinuousVisibleMs=0,this.debugSent={},this.lastError=null,this.receivedCreativeResizeMessage=!1,this.debugDisabled=!0,this.styleDisabled=!this.isFramed(),typeof window<"u"&&(window.addEventListener("error",i=>{this.lastError=`error: ${i.message}`}),window.addEventListener("unhandledrejection",i=>{var _a2;this.lastError=`unhandledrejection: ${((_a2=i.reason)==null?void 0:_a2.message)||i.reason}`}))}setSize(e,t){return this.width=e,this.height=t,this.sizeForcedByTag=!0,this}applySizeFromAdData(){var _a2,_b;if(this.sizeForcedByTag)return;let e=Number((_a2=this.currentAdData)==null?void 0:_a2.ad_width),t=Number((_b=this.currentAdData)==null?void 0:_b.ad_height);e>0&&t>0&&(this.width=e,this.height=t)}getContractedArea(){var _a2,_b;let e=Number((_a2=this.currentAdData)==null?void 0:_a2.ad_width),t=Number((_b=this.currentAdData)==null?void 0:_b.ad_height);if(e>0&&t>0)return e*t;let i=Number(this.width),r=Number(this.height);return i>0&&r>0?i*r:null}getVisibilityThreshold(e){var _a2;return(e?e.width*e.height:(_a2=this.getContractedArea())!=null?_a2:0)>=_a.CONFIG.LARGE_AD_AREA_PX?_a.CONFIG.LARGE_AD_VISIBILITY_THRESHOLD:_a.CONFIG.VISIBILITY_THRESHOLD}setData(e,t,i){let r=Date.now()+i*24*60*60*1e3,s=JSON.stringify({value:t,expires:r});try{localStorage.setItem(e,s)}catch(e2){_a._memoryStore[e]=s}}getData(e){let t=null;try{t=localStorage.getItem(e)}catch(e2){t=null}if(t==null&&e in _a._memoryStore&&(t=_a._memoryStore[e]),t==null)return null;let i;try{i=JSON.parse(t)}catch(e2){return null}if(!i)return null;if(Date.now()>i.expires){try{localStorage.removeItem(e)}catch(e2){}return delete _a._memoryStore[e],null}return i.value}appendTo(e){let t=document.getElementById(e);return t?this.appendTarget=t:this.appendTarget=document.body,this}disableStyle(e=!0){return this.styleDisabled=e,this}isFramed(){if(typeof window>"u")return!1;try{return window.self!==window.top}catch(e){return!1}}disableDebug(e=!0){return this.debugDisabled=e,this}setCacheBusterMacro(e){let t=["%%CACHEBUSTER%%","${CLICK_URL}"];return e&&!t.includes(e)&&!t.includes(decodeURIComponent(e))&&(this.cacheBusterMacro=e),this}getRandomNumber(){return Math.floor(Math.random()*1e16).toString()}setClickMacro(e){return this.isValidUrl(e)&&(this.clickMacro=e),this}setReferrerUrlMacro(e){let t=i=>this.hasUnresolvedMacro(i)?!1:this.isValidUrl(i)&&!this.isAdServerUrl(i)?(this.refererMacro=i,!0):!1;if(t(e))return this;try{t(decodeURIComponent(e))}catch(e2){}return this}hasUnresolvedMacro(e){return typeof e=="string"&&(e.includes("${")||e.includes("%%"))}getDefaultReferer(){var _a2,_b;if(typeof window>"u")return"";let e=[],t=this.getSafeFrameUrl();t&&e.push(t);let i=this.getEnablerUrl();i&&e.push(i);let r=this.getCanonicalUrl();r&&e.push(r);try{window.self!==window.top&&document.referrer&&e.push(document.referrer)}catch(e2){typeof document<"u"&&document.referrer&&e.push(document.referrer)}try{let s=(_a2=window.location)==null?void 0:_a2.ancestorOrigins;if(s&&s.length)for(let l=s.length-1;l>=0;l--)e.push(s[l])}catch(e2){}(_b=window.location)!=null&&_b.href&&e.push(window.location.href);for(let s of e)if(this.isValidUrl(s)&&!this.isAdServerUrl(s))return s;for(let s of e)if(this.isValidUrl(s))return this.extractAppId(s)||s;return""}extractAppId(e){try{let t=new URL(e),i=t.searchParams.get("msid"),r=new URLSearchParams(t.hash.replace(/^#/,"")).get("msid"),s=i||r;if(s&&/^[\w.\-]+$/.test(s))return`app://${s}`}catch(e2){}return null}isAdServerUrl(e){try{let t=new URL(e).hostname;return _a.AD_SERVER_HOSTS.some(i=>t===i||t.endsWith("."+i))}catch(e2){return!1}}getSafeFrameUrl(){try{let e=typeof window<"u"?window.$sf:null;if(!e||!e.ext||typeof e.ext.meta!="function")return null;let t=["canonicalUrl","canonical_url","hostPageUrl","pageUrl","url"],i=[];try{let r=e.ext.meta();if(r&&typeof r=="object")for(let s of t)i.push(r[s])}catch(e2){}for(let r of t)try{i.push(e.ext.meta(r))}catch(e2){}for(let r of i)if(this.isValidUrl(r)&&!this.isAdServerUrl(r))return r}catch(e){}return null}getCanonicalUrl(){var _a2,_b,_c,_d;try{let t=(_c=(_b=(_a2=window.top)==null?void 0:_a2.document)==null?void 0:_b.querySelector('link[rel="canonical"]'))==null?void 0:_c.href;if(this.isValidUrl(t)&&!this.isAdServerUrl(t))return t}catch(e){}try{let e=(_d=document.querySelector('link[rel="canonical"]'))==null?void 0:_d.href;if(this.isValidUrl(e)&&!this.isAdServerUrl(e))return e}catch(e){}return null}getEnablerUrl(){try{let e=typeof window<"u"?window.Enabler:null;if(!e||typeof e.getPageLocation!="function"||typeof e.isInitialized=="function"&&!e.isInitialized())return null;let t=e.getPageLocation();if(this.isValidUrl(t)&&!this.isAdServerUrl(t))return t}catch(e){}return null}isValidUrl(e){try{let t=new URL(e);return!0}catch(e2){return!1}}generateUUID(){return Date.now().toString(36)+Math.random().toString(36).slice(2,10)}getToken(){let e=this.getData("report_token_id");return e||(e=this.generateUUID(),this.setData("report_token_id",e,_a.CONFIG.USER_TOKEN_TTL_DAYS)),e}getRandomContainer(){return"container-"+this.generateUUID()}toCssSize(e){let t=String(e).trim();return/^-?\d*\.?\d+(%|px|vw|vh|em|rem)$/.test(t)?t:`${t}px`}createContainer(){this.container=document.createElement("div"),this.container.id=this.reportElementId,this.container.className="sdk",this.container.style.width=this.toCssSize(this.width),this.container.style.height=this.toCssSize(this.height),this.container.style.position="relative",this.container.style.display="inline-block",(this.appendTarget||document.body).appendChild(this.container)}async fetchAdData(){var _a2;let e=`${_a.CONFIG.BASE_URL}placement/${this.adGuid}`,t=await fetch(e);if(!t.ok){let i=null;try{i=(_a2=await t.json())==null?void 0:_a2.detail}catch(e2){}throw new Error(i||`Erro ${t.status} ao buscar dados do anúncio`)}this.adData=await t.json(),this.currentAdData=this.adData[Math.floor(Math.random()*this.adData.length)]}addHtml5(){let e=new URL(`${_a.CONFIG.CDN_URL}${this.currentAdData.ad_storage}`);this.refererMacro&&e.searchParams.set("referer",this.refererMacro),this.cacheBusterMacro&&e.searchParams.set("c",this.cacheBusterMacro),this.clickMacro&&e.searchParams.set("clickMacro",this.clickMacro),this.adContainer=document.createElement("iframe"),this.adContainer.src=e.toString(),this.container.appendChild(this.adContainer)}
1addJpg(){this.adContainer=document.createElement("img"),this.adContainer.loading="lazy",this.adContainer.src=`${_a.CONFIG.CDN_URL}${this.currentAdData.ad_storage}`,this.container.appendChild(this.adContainer)}addLink(){if(this.currentAdData.ad_link){let e=document.createElement("a"),t=`${this.clickMacro}${this.currentAdData.ad_link}`,i=`${t}${this.getReferer(t)}`;this.isValidUrl(i)&&(e.href=i,e.target="_blank",e.onclick=r=>{this.clickThrough(r)},e.appendChild(this.adContainer),this.container.appendChild(e))}else this.container.appendChild(this.adContainer)}setAdStyle(){this.adContainer.style.position="relative",this.adContainer.style.overflow="hidden",this.adContainer.style.border="none",this.adContainer.style.verticalAlign="bottom",this.adContainer.style.width=this.toCssSize(this.width),this.adContainer.style.height=this.toCssSize(this.height)}setStyle(){if(this.styleDisabled)return;let e={margin:"0",padding:"0",width:"100%",height:"100%",overflow:"hidden",display:"flex",justifyContent:"center",alignItems:"center"};Object.assign(document.body.style,e)}async reportImpression(){this.reportMetrics({e:"impression"})}addAd(){let t={HTML:()=>{this.addHtml5()},JPG:()=>{this.addJpg(),this.addLink()},GIF:()=>{this.addJpg(),this.addLink()}}[this.currentAdData.ad_tipo_formato];if(!t){console.error(`${_a.CONFIG.LOG_PREFIX} Formato de anúncio não suportado: ${this.currentAdData.ad_tipo_formato}`),this.reportViewData(),this.reportUniqueView();return}t(),this.adContainer&&this.setAdStyle()}getReferer(e){let t="",r=(e?String(e):"").includes("?")?"&":"?";return this.refererMacro&&(t+=`${r}referer=${encodeURIComponent(this.refererMacro)}`),t}async clickThrough(e){let t=this.container.getBoundingClientRect(),i=e.clientX-t.left,r=e.clientY-t.top;this.reportMetrics({e:"click",x:i,y:r})}async reportMetrics(e){if(!this.enableMetrics)return;let t={...e,u:this.reportToken,b:this.currentAdData.ad_id},i=new URL(`${_a.CONFIG.BASE_URL}metric${this.getReferer(!1)}`);this.cacheBusterMacro&&i.searchParams.set("c",encodeURIComponent(this.cacheBusterMacro));try{!navigator.sendBeacon(i,JSON.stringify(t))&&e.e!=="debug"&&this.reportDebug("beacon_not_queued",{failedEvent:e.e})}catch(r){e.e!=="debug"&&this.reportDebug("beacon_exception",{failedEvent:e.e,message:r.message})}}classifyCreativeViewFailure(e){return this.width<=0||this.height<=0?"zero_size":e&&(e.width===0||e.height===0)?"container_collapsed":e&&typeof window<"u"&&(e.top<0||e.left<0)&&(e.width>window.innerWidth||e.height>window.innerHeight)?"oversized_for_viewport_negative_offset":this.lastIntersectionRatio===0&&this.reportTotalVisibleTime===0?"never_intersected":this.lastIntersectionRatio>0&&this.lastIntersectionRatio<this.getVisibilityThreshold(e)?"below_threshold":this.reportTotalVisibleTime>0?"never_held_continuous_1s":"unknown"}reportDebug(e,t={}){var _a2,_b,_c,_d,_e,_f,_g;if(this.debugDisabled)return;let i=`${e}:${(_a2=this.currentAdData)==null?void 0:_a2.ad_id}`;if(this.debugSent[i])return;this.debugSent[i]=!0;let r=(_d=(_c=(_b=this.adContainer)==null?void 0:_b.getBoundingClientRect)==null?void 0:_c.call(_b))!=null?_d:null;this.reportMetrics({e:"debug",reason:e,detail:JSON.stringify({adGuid:this.adGuid,width:this.width,height:this.height,visibilityThreshold:(_e=this.getVisibilityThreshold)==null?void 0:_e.call(this,r),lastIntersectionRatio:this.lastIntersectionRatio,reportTotalVisibleTime:this.reportTotalVisibleTime,visibilityState:typeof document<"u"?document.visibilityState:null,creativeViewReported:!!((_g=this.creativeViewReported)!=null&&_g[(_f=this.currentAdData)==null?void 0:_f.ad_id]),containerRect:r&&{width:r.width,height:r.height,top:r.top,left:r.left},likelyReason:e==="creativeview_not_reached"?this.classifyCreativeViewFailure(r):null,userAgent:typeof navigator<"u"?navigator.userAgent:null,viewportWidth:typeof window<"u"?window.innerWidth:null,viewportHeight:typeof window<"u"?window.innerHeight:null,lastError:this.lastError,receivedCreativeResizeMessage:this.receivedCreativeResizeMessage,sdkVersion:_a.VERSION,longestContinuousVisibleMs:this.longestContinuousVisibleMs,...t})})}
1async reportUniqueView(){var _a2;let t=`last_unique_view_time_${((_a2=this.currentAdData)==null?void 0:_a2.ad_id)||"unknown"}`,i=this.getData(t),r=Date.now(),s=_a.CONFIG.UNIQUE_VIEW_TIMEOUT_MS;(!i||r-parseInt(i,10)>s)&&(this.setData(t,r,1),this.reportMetrics({e:"uniqueView"}))}async reportViewData(){this.creativeViewReported[this.currentAdData.ad_id]||(this.creativeViewReported[this.currentAdData.ad_id]=!0,this.reportMetrics({e:"creativeView"}))}observer(){if(!this.adContainer){console.error(`${_a.CONFIG.LOG_PREFIX} Nenhum adContainer para observar viewability`);return}let e=null,t=null,i=_a.CONFIG.VISIBILITY_THRESHOLD,r=()=>document.visibilityState==="visible",s=()=>{if(this.visibleStartTime){clearTimeout(e);let o=Date.now()-this.visibleStartTime;this.reportTotalVisibleTime+=o,o>this.longestContinuousVisibleMs&&(this.longestContinuousVisibleMs=o),this.visibleStartTime=null}},l=o=>{var _a2,_b,_c;this.lastIntersectionRatio=o.intersectionRatio,p((_c=(_b=(_a2=this.adContainer)==null?void 0:_a2.getBoundingClientRect)==null?void 0:_b.call(_a2))!=null?_c:null),o.isIntersecting&&o.intersectionRatio>=i&&r()?this.visibleStartTime||(this.visibleStartTime=Date.now(),e=setTimeout(()=>{this.reportTotalVisibleTime+=Date.now()-this.visibleStartTime,this.visibleStartTime=null,this.reportViewData(),this.reportUniqueView()},1e3)):s()},w=o=>{i=this.getVisibilityThreshold(o),t&&t.disconnect(),t=new IntersectionObserver(a=>{a.forEach(l)},{threshold:[i]}),t.observe(this.adContainer)},y=o=>{var _a2,_b,_c;let a=this.getVisibilityThreshold(o);a!==i&&(this.lastIntersectionRatio<a&&s(),w(o),p((_c=(_b=(_a2=this.adContainer)==null?void 0:_a2.getBoundingClientRect)==null?void 0:_b.call(_a2))!=null?_c:o))},c=this.adContainer.getBoundingClientRect();(c.width===0||c.height===0)&&console.error(`${_a.CONFIG.LOG_PREFIX} Container do anúncio renderizou com tamanho zero (${c.width}x${c.height}). Se .setSize() foi chamado com "%", confirme que o elemento do .appendTo() (e seus ancestrais) têm largura/altura explícitas — percentual não resolve contra um pai com tamanho "auto".`),w(c),typeof ResizeObserver<"u"&&new ResizeObserver(a=>{y(a[0].contentRect)}).observe(this.adContainer);let f=[],b=o=>{var _a2;return{self:o&&{t:o.top,l:o.left,w:o.width,h:o.height},win:typeof window<"u"?{w:window.innerWidth,h:window.innerHeight}:null,percInView:Math.round(((_a2=this.lastIntersectionRatio)!=null?_a2:0)*100),visibilityThreshold:Math.round(i*100)}},p=o=>{if(f.length===0)return;let a={type:"geomUpdate",...b(o)};f.forEach(({source:d,origin:h})=>{try{d.postMessage(a,h)}catch(e2){}})},C=o=>{var _a2,_b,_c,_d,_e,_f;let a=o.data;if(!a||typeof a!="object")return;if(a.type==="creativeResize"){let h=Number(a.width),u=Number(a.height);h>0&&u>0&&(this.receivedCreativeResizeMessage=!0,y({width:h,height:u}));return}let d=o.source||(typeof window<"u"?window:null);if(a.type==="geomRequest"){if(!d)return;let h=(_c=(_b=(_a2=this.adContainer)==null?void 0:_a2.getBoundingClientRect)==null?void 0:_b.call(_a2))!=null?_c:null;d.postMessage({type:"geomResponse",...b(h)},o.origin||"*");return}if(a.type==="geomSubscribe"){if(!d)return;let h=o.origin||"*";f.some(u=>u.source===d)||f.push({source:d,origin:h}),p((_f=(_e=(_d=this.adContainer)==null?void 0:_d.getBoundingClientRect)==null?void 0:_e.call(_d))!=null?_f:null)}};window.addEventListener("message",C),document.addEventListener("visibilitychange",()=>{r()||s()});let S=()=>{this.creativeViewReported[this.currentAdData.ad_id]||this.reportDebug("creativeview_not_reached",{requiredThreshold:i})};document.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&S()}),window.addEventListener("pagehide",S)}async start(){let e=async()=>{this.setStyle();try{await this.adFetchPromise}catch(t){console.error(`${_a.CONFIG.LOG_PREFIX} Falha ao buscar dados do anúncio:`,t);return}if(!this.currentAdData){console.error(`${_a.CONFIG.LOG_PREFIX} No ad data available`);return}this.applySizeFromAdData(),this.reportImpression(),this.createContainer(),this.addAd(),this.observer()};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",e):e()}},__publicField(_a,"VERSION","1.0.31"),__publicField(_a,"CONFIG",{
1CDN_URL:"https://cdn.snsrsv.com/",BASE_URL:"https://snsrsv.com/",VISIBILITY_THRESHOLD:.5,LARGE_AD_AREA_PX:242500,LARGE_AD_VISIBILITY_THRESHOLD:.3,UNIQUE_VIEW_TIMEOUT_MS:1440*60*1e3,USER_TOKEN_TTL_DAYS:30,LOG_PREFIX:"[SenseAds SDK]"}),__publicField(_a,"_memoryStore",{}),__publicField(_a,"AD_SERVER_HOSTS",["doubleclick.net","googlesyndication.com","googleadservices.com","google.com","amazon-adsystem.com","imasdk.googleapis.com","adsdkprod.azureedge.net","snsrsv.com"]),_a),U=g;return T(E)})();sdk=sdk.default||sdk,typeof window!="undefined"&&(window.SenseAds=sdk)

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.