1import{aV as N,aW as X,c9 as $,a$ as w,aY as j,aX as P,b1 as x,br as u,by as m,bw as s,b6 as V,bx as h,bu as H,c8 as W,bs as z,bX as G,ca as J,bz as q,cb as K,bv as Q,b9 as O,bJ as Z,cc as ee,cd as ne,bC as oe}from"./EBpBARSw.js";import{I as te}from"./De1uZK4E.js";import{b as ae}from"./CSLGp06j.js";import{u as se}from"./DL71b4LM.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},l=new a.Error().stack;l&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[l]="77978c74-1628-4d35-a1c3-7a613bcd3252",a._sentryDebugIdIdentifier="sentry-dbid-77978c74-1628-4d35-a1c3-7a613bcd3252")}catch{}})();const re=["innerHTML"],ie=["id"],de={key:1,style:{color:"#787878","line-height":"1"}},ce=N({__name:"Adfox",props:{config:{default:()=>({}),type:Object},disabledMessage:{default:"",type:String}},emits:["complete"],setup(a,{emit:l}){const f=a,I=l,b=X().$adfoxLoader,A=se(),k=$(),E=O(()=>b.done);let _=null;const i=w(),v=w(),g=w(),c=w(f.config.containerId),r=O(()=>({ownerId:ee,onLoad:e=>T(e),onRender:()=>L(),onError:e=>Y(e),onStub:()=>B(),...f.config,containerId:c.value})),n=Z({...ae}),M={isDisabled:"DISABLED",isLoaded:"LOADED",isRendered:"RENDERED",isUndefined:"UNDEFINED",withError:"ERROR",withStub:"STUB"};function T(e){n.isLoaded=!0,v.value=e}function L(){n.isRendered=!0,d({data:v.value,state:n}),R()}function Y(e){n.withError=!0,g.value=e,d({error:e,state:n})}function B(){n.withStub=!0,d({state:n})}function d({data:e={},error:o={},state:t}){const p=c.value;Object.keys(e).length;const U=Object.keys(o).length;t.isCompleted=!0;let S;for(const y in t)Object.hasOwn(t,y)&&t[y]&&(S=M[y]);const C={containerId:r.value.containerId,status:S,config:r.value,state:t,href:location.href};t.withError&&!t.isDisabled?window.__ADFOX__.banners.push({...C,...U&&{error:o}}):t.withStub&&!t.isDisabled&&window.__ADFOX__.banners.push(C),I("complete",{data:e,error:o,id:p,state:t})}async function F(){await ne(250),r.value.params={...r.value.params,...k.puids||{},...r.value.shouldSyncSession&&{pr:window.__ADFOX__.pr}};const{adUnit:e,bannerStates:o,adaptiveOptions:t}=r.value,p=o||t?"createAdaptive":"create";e?window.Ya.adfoxCode.hbCallbacks.push(()=>{window.Ya.headerBidding.pushAdUnits([{...e,code:c.value}]),window.yaContextCb?.push(()=>window.Ya?.adfoxCode?.[p](r.value))}):window.yaContextCb?.push(()=>window.Ya?.adfoxCode?.[p](r.value))}function R(){if(!i.value)return;if(i.value?.style?.content?.includes("adfox-email-subscription")){i.value.style.cursor="pointer";for(let o=0;o<i.value.children.length;o++)i.value.children[o].style.pointerEvents="none";i.value.addEventListener("click",D)}}function D(){A.open("emailSubscriptionModal",{componentAttrs:{type:"adfox"}})}return j(()=>{i.value?.removeEventListener("click",D),window.Ya&&window.Ya.adfoxCode&&typeof window.Ya.adfoxCode.destroy=="function"&&window.Ya.adfoxCode.destroy(c.value)}),P(()=>{if(b.isDisabled)return n.isDisabled=!0,d({state:n});const e=()=>(n.isUndefined=!0,d({error:{message:"There is no Ya in window"},state:n}));if(b.error)return e();x(()=>b.error,o=>o&&e()),x(E,async o=>{if(o){if(!f.config.containerId){const t=(Math.random()*1e8).toFixed(0);c.value=`adfox_${t}`}if(!window.Ya)return n.isUndefined=!0,d({error:{message:"There is no Ya in window"},state:n});if(!window.Ya.adfoxCode)return n.isUndefined=!0,d({error:{message:"There is no adfoxCode in window.Ya"},state:n});await F()}},{immediate:!0})}),(e,o)=>(u(),m("aside",{class:Q(e.$style.root)},[s(E)?(u(),m(V,{key:0},[a.config.comments?(u(),m("samp",{key:0,style:{display:"none"},innerHTML:a.config.comments},null,8,re)):h("",!0),H("div",{id:s(c),ref_key:"adfoxEl",ref:i},[W(e.$slots,"default")],8,ie),s(_)?(u(),z(G(s(_)),{key:1,config:s(r),error:s(g),state:s(n)},null,8,["config","error","state"])):h("",!0)],64)):h("",!0),s(te)&&!s(J)?(u(),m("div",de,q(a.disabledMessage||s(K)),1)):h("",!0)],2))}}),ue="W2ncF",le={root:ue},fe={$style:le},ye=oe(ce,[["__cssModules",fe]]);export{ye as default};
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.