PageSourceSearch

https://discovery-next.svc.sympla.com.br/_next/static/chunks/4189.e52711a1c91d8bae.js

js sympla.com.br collected 2026-09-24 07:46:12 UTC 4,345 bytes, 2 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4189],{59042:()=>{},74189:(e,r,t)=>{"use strict";t.r(r),t.d(r,{default:()=>T});var o,a=t(44410),n=t(36512),s=t(59673),i=t(1971),l=t(74445),d=t(56326),c=t(39669),u=t(73555),m=t(77060),p=t(34622),g=t(5576),h=t(75465);let v="TSE_060MJTOhuVyNjEJNcOEOXuQC2HG5rj3cDrYS";async function _(e,r,t){if(!v)return void(0,p.browserLogger)().error({message:"Topsort Token not found.",data:"TOPSORT_TOKEN environment variable not found."});let o=(0,h.S)();try{let i=await fetch(g.B,{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(v)},body:JSON.stringify({auctions:[(0,a._)({slots:1,type:"banners",device:r?"mobile":"desktop",slotId:e,opaqueUserId:o},t?{geoTargeting:{location:t}}:{})]})});if(!i.ok)throw Error("Topsort Auction failed");let l=await i.json();if(l.results.length>0&&l.results[0].winners.length>0){var n,s;let e=l.results[0].winners[0],r=(null==(s=e.asset)||null==(n=s[0])?void 0:n.url)||"",t=e.id;if("product"===e.type?t="https://www.sympla.com.br/evento/".concat(e.id):"vendor"===e.type&&(t="https://www.sympla.com.br/produtor/".concat(e.id)),r&&t)return{id:e.campaignId,imageUrl:r,url:t,resolvedBidId:e.resolvedBidId,vendorId:e.vendorId}}return null}catch(e){(0,p.browserLogger)().error({message:"Error reporting get Topsort banner",data:String(e)})}}var f=t(50175),b=t(51450);function w(){return(w=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var o in t)({}).hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e}).apply(null,arguments)}let y=e=>l.createElement("svg",w({viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),o||(o=l.createElement("path",{d:"M9 8.5a.5.5 0 0 1-1 0V4.707L3.854 8.854a.5.5 0 1 1-.708-.708L7.293 4H3.5a.5.5 0 0 1 0-1h5a.5.5 0 0 1 .5.5v5Z",fill:"#535862"})));var I=t(68551),k=t(40430),B=t(3420);t(54817),t(59042);let T=(0,c.PA)(function(e){var r;let{idBanner:t,marginBottom:o,pageTitleForTracking:c}=e,{ref:g,inView:h}=(0,d.Wx)({triggerOnce:!0}),[v,w]=(0,l.useState)(!0),[T,j]=(0,l.useState)(null),N=(0,i.getCookie)(m.CR),O=(null==(r=k.A.selectedLocation)?void 0:r.slug)||void 0,S=(0,l.useMemo)(()=>{if(!(null==T?void 0:T.url))return!1;try{let e=new URL(T.url).hostname;return"sympla.com.br"===e||e.endsWith(".sympla.com.br")}catch(e){return!1}},[null==T?void 0:T.url]),x=async e=>{try{let r=await _(t,e,O);j(r||null)}catch(e){(0,p.browserLogger)().error({message:"Topsort Auction error",data:String(e)})}finally{w(!1)}},E=(0,l.useCallback)(e=>{let r=t.match(/_(\d+)$/),o=r?Number(r[1]):1;(0,B.K)(e,{item_ads_position:o,item_ads_page_title:c||t,item_ads_sponsor_id:null==T?void 0:T.vendorId,item_ads_campaign_id:null==T?void 0:T.id,transport:b.o9.sendBeacon})},[T,c,t]);(0,l.useEffect)(()=>{x((0,I.Fr)())},[t,N,O]),(0,l.useEffect)(()=>{!v&&h&&T&&(E(b.sK.ads_viewed),(0,f.II)({type:"impression",resolvedBidId:T.resolvedBidId,idBanner:t}))},[v,h,T,E,t]);let C=(0,l.useCallback)(()=>{if(!T)return;E(b.sK.ads_clicked),T.id&&(0,i.setCookie)("topsort_campaign_id",T.id,(0,n._)((0,a._)({},{domain:".sympla.com.br"}),{path:"/"}));let e="",r=null;try{r=(e=new URL(T.url).pathname).match(/\/(?:evento\/(?:[^\/]+\/)?|event\/)(\d+)/)}catch(e){(0,p.browserLogger)().error({message:"Topsort Banner URL parsing error",data:String(e)})}if(T.resolvedBidId&&e&&!r){let r={bidId:T.resolvedBidId,landingPath:e};(0,i.setCookie)("ts_ads_context",JSON.stringify(r),(0,n._)((0,a._)({maxAge:3600},{domain:".sympla.com.br"}),{path:"/"}))}(0,f.II)({type:"click",resolvedBidId:T.resolvedBidId,idBanner:t}),r&&(0,f.II)({type:"click",resolvedBidId:T.resolvedBidId,idBanner:t,additionalAttribution:{id:r[1],type:"product"}})},[T,E,t]);return v?(0,s.jsx)(u.R,{}):T?(0,s.jsx)("div",{className:"".concat("_1mh7eto0"," ").concat(o?"_1mh7eto5":""),"data-testid":"topsort-banner-".concat(t),ref:g,children:(0,s.jsxs)("a",{href:T.url,target:S?"_self":"_blank",rel:S?void 0:"noopener noreferrer",className:"_1mh7eto1",onClick:C,children:[(0,s.jsx)("img",{"data-testid":"topsort-banner-img-".concat(t),src:T.imageUrl,alt:"Banner ADS ".concat(t),className:"_1mh7eto2"}),(0,s.jsxs)("div",{className:"_1mh7eto3",children:[(0,s.jsx)("span",{children:"Publicidade"}),(0,s.jsx)(y,{width:12,height:12,className:"_1mh7eto4"})]})]})}):null})}}]);
2//# sourceMappingURL=4189.e52711a1c91d8bae.js.map

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.