import{C as e,R as t,_ as i,a,G as n,b as s,c as r,J as o,A as d,d as h,e as l,i as c,g as v,f as E,E as u,N as f,h as m,j as p,k as C,l as T,m as k,n as A,o as g,p as y,B as S,q as L,r as _,s as D,V as R,t as I,L as F,u as M,v as N,w,x as b,M as O,y as H,z as P}from"./gfp-display-sdk.js";function x(e,t,i){U(e,t),t.set(e,i)}function U(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function V(e,t){return e.get($(e,t))}function B(e,t,i){return e.set($(e,t),i),i}function $(e,t,i){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:i;throw new TypeError("Private element is not present on this object")}function G(e,t,i){return t=g(t),b(e,W()?Reflect.construct(t,i||[],g(e).constructor):t.apply(e,i))}function W(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(W=function(){return!!e})()}function z(e,t,i,a){var n=A(g(e.prototype),t,i);return"function"==typeof n?function(e){return n.apply(i,e)}:n}let j=function(){function e(t){var i;return C(this,e),i=G(this,e,[t]),p(i,"adm",void 0),p(i,"responseSize",void 0),p(i,"hostMeta",void 0),p(i,"commandProcessor",void 0),i.hostMeta=new Map,i.commandProcessor=new y,i}return i(e,S),a(e,[{key:"getSize",value:function(){return this.ad.adInfo?.responseSize}},{key:"setHostMeta",value:function(e){this.hostMeta=e}},{key:"setBounceBackUrl",value:function(){const e=this.eventNotifier?.getProviderEventTrackingUrlList(u.BOUNCE_BACK)??[],{persistenceStore:t}=this.store;t.setBounceBackUrls(e)}},{key:"onCheckAndSetAdParam",value:function(){z(e,"onCheckAndSetAdParam",this)([]);const{adm:t,encoded:i,responseSize:a}=this.ad.adInfo;if("string"!=typeof t)throw new Error("Adm is blank.");if(this.adm=1===i?decodeURIComponent(t):t,!a||a.width<=0&&a.height<=0)throw new Error(`Invalid response size. [${a?.width} x ${a?.height}]`);this.responseSize=a}},{key:"destroy",value:function(){z(e,"destroy",this)([]),this.commandProcessor=new y}}])}(),K=function(){function t(i){var a;return C(this,t),a=G(this,t,[i]),p(a,"events",void 0),p(a,"scriptElement",void 0),p(a,"jsAdMuteHandler",void 0),p(a,"isRenderedCallbackInvoked",!1),p(a,"onAdContainerClick",e=>{const t=e.target,i=T(t,"data-ssp","clk");if(i){if(i instanceof HTMLAnchorElement){const t=i.href??"";(a.clickHandler||a.ad.adInfo.skadn)&&(a.invokeClickHandler(t,void 0,{type:"ad-click"}),e.preventDefault())}a.setBounceBackUrl(),a.adClicked()}}),p(a,"privacyClickHandler",e=>{a.clickHandler&&"function"==typeof a.clickHandler&&a.clickHandler(e,void 0,{type:"privacy-click"})}),a.jsAdMuteHandler=new o({resourceLoader:a.store.resourceLoader,adMuteLibUrl:a.store.globalEnv.gfp.adMuteLibUrl,creativeType:e.BANNER,adChoice:a.ad.adInfo?.adchoice,initialAdMuteState:a.adExtraData.muteState||k.INIT,adDivId:a.adSlotElementId}),a}return i(t,j),a(t,[{key:"loadAdapterAd",value:async function(){try{await this.store.resourceLoader.saveAndLoad("moSspVetaCore","javascript",`${this.store.globalEnv.gfp.cdnUrl}/libs/assets/js/mo/ssp/min/mo.ssp.veta.core.min.js`),this.isRestored||this.savePersistAd(),this.adLoaded(),this.display()}catch(e){const t=e instanceof Error?e.message:"";this.adError(new n(s.LOAD_ERROR_AD_SELECTION_NO_FILL,r.NO_FILL,`Failed to Request JS Ad: ${t}`,void 0))}}},{key:"display",value:function(){if(this.adm&&this.adContainer){if(/<\/script>||<\/script>/gi.test(this.adm)){this.jsAdMuteHandler.shouldRemoveAdMarkLegacy()?this.adContainer.innerHTML=o.replaceAdmToRemoveAdMarkLegacy(this.adm):this.adContainer.innerHTML=this.adm;const e=[...this.adContainer.getElementsByTagName("script")];(async()=>{for await(const t of e)if(""!==t.src)await this.store.resourceLoader.saveAndLoad(t.src,"javascript",t.src),t?.parentNode?.removeChild(t);else{const e=document.createElement("script");e.innerHTML=t.innerText,t?.parentNode?.replaceChild(e,t)}this.onLoadAdm()})()}else{this.scriptElement=document.createElement("script"),this.jsAdMuteHandler.shouldRemoveAdMarkLegacy()?this.scriptElement.innerHTML=o.replaceAdmToRemoveAdMarkLegacy(this.adm):this.scriptElement.innerHTML=this.adm;document.getElementsByTagName("head")[0].appendChild(this.scriptElement)}this.renderConfig?.preload||(this.adRendered(),this.addEventListener())}}},{key:"initEvent",value:function(){this.commandProcessor.push(()=>{this.adRendered(),this.addEventListener()})}},{key:"onLoadAdm",value:function(){this.connectClickEvent(),this.jsAdMuteHandler.initAdMute(this.adMuteCompleted.bind(this),this.muteStateChanged.bind(this),this.muteTouchStartedToAvoidNaverAppFlicking.bind(this),this.muteTouchEndedToAvoidNaverAppFlicking.bind(this)),this.jsAdMuteHandler.setAdThemeByHostMeta(this.hostMeta)}},{key:"setClickHandler",value:function(e){z(t,"setClickHandler",this)([e]),e&&"function"==typeof e&&this.jsAdMuteHandler.setPrivacyClickHandler(this.privacyClickHandler)}},{key:"addCallback",value:function(e){this.events=e,this.fireEvent(d.READY),this.fireEvent(d.HOSTMETA_CHANGED),this.adExtraData.renderedImpressed&&!this.isRenderedCallbackInvoked&&this.fireEvent(d.RENDERED)}},{key:"exposureChangeSetting",value:function(e){this.handleExposureChangeSetting(e)}},{key:"setHostMeta",value:function(e){z(t,"setHostMeta",this)([e]),this.fireEvent(d.HOSTMETA_CHANGED),this.jsAdMuteHandler.setAdThemeByHostMeta(this.hostMeta)}},{key:"fireEvent",value:function(e,t,i){const a=this.events?.[e]&&"function"==typeof this.events?.[e]?this.events?.[e]:null,n=h(this.hostMeta);switch(e){case d.READY:this.commandProcessor.forceExecuteCommands(),a?.({sdkVersion:this.store.globalEnv.version,os:"Web",osVersion:window.navigator.appVersion});break;case d.RENDERED:a?.(),this.isRenderedCallbackInvoked=!0;break;case d.VIEWABLED:case d.DESTROYED:a?.();break;case d.HOSTMETA_CHANGED:a?.(n);break;case d.POSITION_UPDATED:a?.({pageXOffset:window.pageXOffset??0,pageYOffset:window.pageYOffset??0});break;case d.EXPOSURE_CHANGED:i&&a?.({isIntersecting:t,intersectionRatio:i,exposedPercentage:parseFloat((100*i).toFixed(1))})}}},{key:"adViewableImpressed",value:function(){this.adExtraData.viewableImpressed||this.fireEvent(d.VIEWABLED),z(t,"adViewableImpressed",this)([])}},{key:"adExposureChanged",value:function(e,i){this.fireEvent(d.EXPOSURE_CHANGED,e,i),z(t,"adExposureChanged",this)([e,i])}},{key:"adMuteCompleted",value:function(){this.eventNotifier.fireAdMuteCompletedEvent(),this.adSlotListener.dispatch(l.AD_MUTE_COMPLETED)}},{key:"muteStateChanged",value:function(e){this.adExtraData.muteState=e,this.savePersistAd(),this.adSlotListener.dispatch(l.AD_MUTE_STATE_CHANGED,{state:e})}},{key:"muteTouchStartedToAvoidNaverAppFlicking",value:function(){window?.nbp_corp_da?.service?.flicking?.disable(),window.conex?.triggerTouchStartEvent?.()}},{key:"muteTouchEndedToAvoidNaverAppFlicking",value:function(){window?.nbp_corp_da?.service?.flicking?.enable(),window.conex?.triggerTouchEndEvent?.()}},{key:"connectClickEvent",value:function(){if(!this.adContainer)return;this.adContainer.addEventListener("click",this.onAdContainerClick);let e=[...this.adContainer.querySelectorAll("[data-ssp='clk']")];e?.length||(e=[...this.adContainer.querySelectorAll("a")]),e.forEach(e=>{window.self!==window.top&&"_blank"!==e.getAttribute("target")&&e.setAttribute("target","_top")})}},{key:"addEventListener",value:function(){window.addEventListener("resize",this,!1),window.addEventListener("orientationchange",this,!1),window.addEventListener("scroll",this,!1)}},{key:"removeEventListener",value:function(){window.removeEventListener("resize",this,!1),window.removeEventListener("orientationchange",this,!1),window.removeEventListener("scroll",this,!1)}},{key:"handleEvent",value:function(e){try{switch(e.type){case"scroll":case"resize":case"orientationchange":this.fireEvent(d.POSITION_UPDATED)}}catch(e){}}},{key:"destroy",value:function(){this.adContainer?.removeEventListener("click",this.onAdContainerClick),this.fireEvent(d.DESTROYED),z(t,"destroy",this)([]),this.removeEventListener(),this.scriptElement?.remove(),this.scriptElement=null,this.jsAdMuteHandler.destroy()}}])}();const X=e=>{if(!e)return e;c(e.extraImage)&&(e.extraImage={}),c(e.extraText)&&(e.extraText={});const t=["title","desc","desc2","desc3","notice","sponsor","cta","extraText"],i=["icon","extraImage"],a=["extraImage","extraText"],n=(a,n)=>{const s="media"===n&&"type"in a,r=s&&1===a.type,o=s&&2===a.type;if(!0===a.unclickable?delete a.link:c(a.link)&&!a.unclickable&&(a.link=e.link),D(i).call(i,n)||r){const e=a;c(e.src)&&(e.src=""),c(e.ext?.alt)&&(e.ext||(e.ext={}),e.ext.alt="광고 이미지")}else if(D(t).call(t,n)){const e=a;c(e.text)&&(e.text="")}else if(o){const e=a;c(e.tsrc)&&(e.tsrc=""),e.body=e.body?.replace(/(\r\n|\n|\r)/g,"")??""}};return Object.entries(e).reduce((e,[t])=>{var i;if(D(i=[...a,"link"]).call(i,t)){if(D(a).call(a,t)){const i=e[t];Object.keys(i).forEach(e=>{n(i[e],t)})}}else{const i=e[t];n(i,t)}return e},e)};var Y;!function(e){e[e.LOADED=0]="LOADED",e[e.REGISTERED=1]="REGISTERED",e[e.EXPANDED=2]="EXPANDED",e[e.COLLAPSED=3]="COLLAPSED",e[e.CLICKED=4]="CLICKED",e[e.TOUCH_STARTED=5]="TOUCH_STARTED",e[e.NATIVE_AD_MUTE_CLICKED=6]="NATIVE_AD_MUTE_CLICKED",e[e.NATIVE_ADVERTISER_MUTE_CLICKED=7]="NATIVE_ADVERTISER_MUTE_CLICKED",e[e.NATIVE_AD_SLOT_EVENT=8]="NATIVE_AD_SLOT_EVENT",e[e.ERROR=9]="ERROR",e[e.AD_MUTE_COMPLETED=10]="AD_MUTE_COMPLETED",e[e.AD_MUTE_STATE_CHANGED=11]="AD_MUTE_STATE_CHANGED",e[e.AD_MUTE_PRIVACY_CLICKED=12]="AD_MUTE_PRIVACY_CLICKED",e[e.EXPOSURE_SETTING_CHANGED=13]="EXPOSURE_SETTING_CHANGED",e[e.OUTSTREAM_EVENT=14]="OUTSTREAM_EVENT",e[e.CREATIVE_META_CHANGED=15]="CREATIVE_META_CHANGED"}(Y||(Y={}));let q=function(){function e(){return C(this,e),G(this,e,arguments)}return i(e,_),a(e)}();function J(e){return{innerWidth:window.innerWidth??0,innerHeight:window.innerHeight??0,pageXOffset:window.pageXOffset??0,pageYOffset:window.pageYOffset??0,screenWidth:window.screen?.width??0,screenHeight:window.screen?.height??0,bodyClientWidth:document.body?.clientWidth??0,bodyClientHeight:document.body?.clientHeight??0,offsetTop:Q(e)?.top??0,offsetLeft:Q(e)?.left??0}}function Q(e){let t={top:0,left:0};const i=e.ownerDocument,a=i.documentElement;"function"==typeof e.getBoundingClientRect&&(t=e.getBoundingClientRect());const n=i.defaultView;return{top:t.top+(n?.pageYOffset||a.scrollTop)-(a.clientTop||0),left:t.left+(n?.pageXOffset||a.scrollLeft)-(a.clientLeft||0)}}let Z=function(){return a(function e({store:t,adContainer:i,innerWrapper:a,iFrame:n,iFrameWidth:s,iFrameHeight:r,isFluid:o,useResponseSize:d,safeFrameListener:h,msgToken:l,isSafeFrame:c}){C(this,e),p(this,"store",void 0),p(this,"adContainer",void 0),p(this,"innerWrapper",void 0),p(this,"iFrame",void 0),p(this,"iFrameWidth",void 0),p(this,"iFrameHeight",void 0),p(this,"isFluid",void 0),p(this,"useResponseSize",void 0),p(this,"safeFrameListener",void 0),p(this,"isSafeFrame",void 0),p(this,"msgToken",void 0),p(this,"targetOrigin",void 0),p(this,"iFrameWindow",void 0),p(this,"innerWrapperPos",void 0),p(this,"safeFramePos",void 0),p(this,"easingOpt",void 0),this.store=t,this.adContainer=i,this.innerWrapper=a,this.iFrame=n,this.iFrameWidth=s,this.iFrameHeight=r,this.isFluid=o,this.useResponseSize=d,this.safeFrameListener=h,this.iFrameWindow=n.contentWindow,this.isSafeFrame=c,this.msgToken=l,this.targetOrigin=P(this.isSafeFrame,this.store.globalEnv.gfp.cdnDomain)},[{key:"addEventListener",value:function(){try{window.addEventListener("resize",this,!1),window.addEventListener("orientationchange",this,!1),window.addEventListener("message",this,!1),window.addEventListener("scroll",this,!1)}catch(e){}}},{key:"removeEventListener",value:function(){window.removeEventListener("resize",this,!1),window.removeEventListener("orientationchange",this,!1),window.removeEventListener("message",this,!1),window.removeEventListener("scroll",this,!1)}},{key:"sendMsgToSafeFrame",value:function(e){this.iFrameWindow?.postMessage(e,this.targetOrigin)}},{key:"handleEvent",value:function(e){try{switch(e.type){case"scroll":case"resize":case"orientationchange":this.updatePosInfo();break;case"message":this.handleMsgEvt(e)}}catch(e){}}},{key:"updatePosInfo",value:function(){const e={evtType:d.POSITION_UPDATED,parInfo:J(this.adContainer),msgToken:this.msgToken};this.sendMsgToSafeFrame(e)}},{key:"handleMsgEvt",value:function(e){const{iFrameId:t,msgToken:i,evtType:a,params:n}=e.data;if(this.iFrame.id===t&&this.msgToken===i&&this.iFrame.contentWindow===e.source&&(!this.isSafeFrame||this.targetOrigin===e.origin))switch(this.store.logger.safeFrameEvent(a,n,this.adContainer.id),a){case O.SF_LOADED:this.safeFrameLoaded();break;case O.SF_CB_REGISTERED:this.safeFrameCallbackRegistered();break;case O.SF_RESIZED:this.handleSafeFrameResized(n);break;case O.SF_TOUCHSTARTED:this.handleSafeFrameTouchStarted();break;case O.SF_CLICKED:this.clicked(n);break;case O.SF_NATIVE_AD_MUTE_CLICKED:this.nativeAdMuteClicked();break;case O.SF_NATIVE_ADV_MUTE_CLICKED:this.nativeAdvertiserMuteClicked();break;case O.SF_NATIVE_SLOT_EVENT:this.nativeAdSlotEvent(n);break;case O.SF_ERROR:this.handleSafeFrameError(n);break;case O.SF_INIT:case O.SF_REQUEST_RESIZE:this.requestSafeFrameResize(n);break;case O.SF_REQUEST_EXPAND:this.expandSafeFrame(n);break;case O.SF_REQUEST_COLLAPSE:this.collapseSafeFrame();break;case O.SF_AD_MUTE_COMPLETED:this.handleAdMuteCompleted();break;case O.SF_AD_MUTE_STATE_CHANGED:this.handleMuteStateChanged(n);break;case O.SF_AD_MUTE_PRIVACY_CLICKED:this.handleAdMutePrivacyClicked(n);break;case O.SF_AD_MUTE_TOUCHSTARTED:this.handleMuteTouchStartToAvoidNaverAppFlicking();break;case O.SF_AD_MUTE_TOUCHENDED:this.handleMuteTouchEndToAvoidNaverAppFlicking();break;case O.SF_EXPOSURE_CHANGE_SETTING:this.handleExposureChangedSetting(n);break;case O.SF_OUTSTREAM_EVENT:this.handleOutstreamEvent(n);break;case O.SF_NOTIFY_CREATIVE_META:this.handleCreativeMetaChanged(n)}}},{key:"safeFrameLoaded",value:function(){this.safeFrameListener.dispatch(Y.LOADED),this.iFrame.name=""}},{key:"safeFrameCallbackRegistered",value:function(){this.safeFrameListener.dispatch(Y.REGISTERED),this.updatePosInfo()}},{key:"handleSafeFrameResized",value:function(e){if(this.useResponseSize)return;const{frameHeight:t}=e;this.iFrameHeight=t,this.iFrame.style.height=`${t}px`}},{key:"requestSafeFrameResize",value:function(e){const{width:t,height:i,isFluid:a=!1}=e;this.isFluid=a,this.isFluid||(this.iFrameWidth=t),this.iFrameHeight=i;const n=this.isFluid?"100%":`${t}px`,s=this.isFluid?"auto":`${i}px`,r=this.isFluid?"100%":`${t}px`,o=`${i}px`;this.innerWrapperPos=this.isFluid?"":"position:relative;",this.safeFramePos=this.isFluid?"":"position:absolute;",this.innerWrapper.style.cssText=`width:${n};height:${s};margin:0 auto;${this.innerWrapperPos}`,this.iFrame.style.cssText=`width:${r};height:${o};visibility: inherit; display: block; border: 0px; vertical-align: bottom;${this.safeFramePos}`}},{key:"expandSafeFrame",value:function(e){const{deltaX:t,deltaY:i,position:a,easing:n}=e;if(!t||!i)return;this.safeFrameListener.dispatch(Y.EXPANDED);const s="number"==typeof this.iFrameWidth?`${this.iFrameWidth+t}px`:"100%",r=`${this.iFrameHeight+i}px`,o=s,d=this.isFluid?"auto":r;this.innerWrapperPos=this.isFluid?"":"position:relative;",this.safeFramePos=this.isFluid?"":"position:absolute;",this.easingOpt=n?"transition: width 0.4s ease-in-out, height 0.4s;":"";const h=Object.keys(a??{}).map(e=>`${e}:${a[e]}px`).join(";");this.innerWrapper.style.cssText=`width: ${o}; height: ${d}; margin: 0 auto; z-index: 3000; ${this.easingOpt} ${this.innerWrapperPos} `,this.iFrame.style.cssText=`width: ${s}; height: ${r}; visibility: inherit; display: block; border: 0px; vertical-align: bottom; z-index: 3000; ${this.easingOpt}${this.safeFramePos}${h} `}},{key:"collapseSafeFrame",value:function(){this.safeFrameListener.dispatch(Y.COLLAPSED);const e=this.isFluid?"100%":`${this.iFrameWidth}px`,t=`${this.iFrameHeight}px`,i=e,a=this.isFluid?"auto":t;this.innerWrapper.style.cssText=`width: ${i}; height: ${a}; margin: 0 auto; z-index: 0; ${this.easingOpt} ${this.innerWrapperPos} `,this.iFrame.style.cssText=`width: ${e}; height: ${t}; visibility: inherit; display: block; border: 0px; vertical-align: bottom; z-index: 0; ${this.easingOpt} ${this.safeFramePos} `}},{key:"clicked",value:function(e){this.safeFrameListener.dispatch(Y.CLICKED,{params:e})}},{key:"handleSafeFrameTouchStarted",value:function(){this.safeFrameListener.dispatch(Y.TOUCH_STARTED),"object"==typeof TEvent&&"function"==typeof TEvent.touchStartEvent&&TEvent.touchStartEvent(),window.conex?.triggerTouchStartEvent?.()}},{key:"handleSafeFrameError",value:function(e){this.safeFrameListener.dispatch(Y.ERROR,{params:e})}},{key:"nativeAdMuteClicked",value:function(){this.safeFrameListener.dispatch(Y.NATIVE_AD_MUTE_CLICKED)}},{key:"nativeAdvertiserMuteClicked",value:function(){this.safeFrameListener.dispatch(Y.NATIVE_ADVERTISER_MUTE_CLICKED)}},{key:"nativeAdSlotEvent",value:function(e){this.safeFrameListener.dispatch(Y.NATIVE_AD_SLOT_EVENT,{params:e})}},{key:"handleAdMuteCompleted",value:function(){this.safeFrameListener.dispatch(Y.AD_MUTE_COMPLETED)}},{key:"handleMuteStateChanged",value:function(e){this.safeFrameListener.dispatch(Y.AD_MUTE_STATE_CHANGED,{params:e})}},{key:"handleAdMutePrivacyClicked",value:function(e){this.safeFrameListener.dispatch(Y.AD_MUTE_PRIVACY_CLICKED,{params:e})}},{key:"handleMuteTouchStartToAvoidNaverAppFlicking",value:function(){window?.nbp_corp_da?.service?.flicking?.disable(),window.conex?.triggerTouchStartEvent?.()}},{key:"handleMuteTouchEndToAvoidNaverAppFlicking",value:function(){window?.nbp_corp_da?.service?.flicking?.enable(),window.conex?.triggerTouchEndEvent?.()}},{key:"handleExposureChangedSetting",value:function(e){c(e?.enable)||this.safeFrameListener.dispatch(Y.EXPOSURE_SETTING_CHANGED,{params:e})}},{key:"handleOutstreamEvent",value:function(e){this.safeFrameListener.dispatch(Y.OUTSTREAM_EVENT,{params:e})}},{key:"handleCreativeMetaChanged",value:function(e){this.safeFrameListener.dispatch(Y.CREATIVE_META_CHANGED,{creativeMeta:e})}}])}(),ee=function(){return a(function t({store:i,ad:a,adExtraData:n,adContainer:s,adm:r,isFluid:o,responseSize:d,safeFrameListener:h,hostMeta:l,hasClickHandler:c,nativeMeta:v,viewableImpressionConfig:E,forceSafeFrame:u,activateIframeEvent:f}){C(this,t),p(this,"safeFrameHost",void 0),p(this,"store",void 0),p(this,"adContainer",void 0),p(this,"adm",void 0),p(this,"isFluid",void 0),p(this,"responseSize",void 0),p(this,"useResponseSize",void 0),p(this,"safeFrameListener",void 0),p(this,"hostMeta",void 0),p(this,"nativeMeta",void 0),p(this,"nativeResources",void 0),p(this,"hasClickHandler",void 0),p(this,"viewableImpressionConfig",void 0),p(this,"adChoice",void 0),p(this,"creativeType",void 0),p(this,"crid",void 0),p(this,"initialAdMuteState",void 0),p(this,"slotEventTrackingFlags",void 0),p(this,"msgToken",void 0),p(this,"forceSafeFrame",void 0),p(this,"activateIframeEvent",void 0),this.store=i,this.adContainer=s,this.adm=r,this.isFluid=o,this.responseSize=d,this.useResponseSize=!(!d||1!==d.force),this.safeFrameListener=h,this.hostMeta=l,this.nativeMeta=v,this.hasClickHandler=c??!1,this.viewableImpressionConfig=E,this.nativeResources=a?.adInfo?.adStyle?.deco?.resources,this.adChoice=a.adInfo?.adchoice,this.creativeType=a.creativeType??e.BANNER,this.crid=a.adInfo?.crid,this.initialAdMuteState=n.muteState??k.INIT,this.slotEventTrackingFlags=n.slotEventTrackingFlags,this.msgToken=H(),this.forceSafeFrame=u,this.activateIframeEvent=f},[{key:"render",value:function(){this.store.logger.safeFrameRender(this.forceSafeFrame,this.adContainer.id);const t=this.isFluid?"100%":`${this.responseSize?.width}px`,i=this.isFluid?"auto":`${this.responseSize?.height}px`,a=this.isFluid?"100%":this.responseSize?.width,n=this.creativeType===e.BANNER&&(!this.isFluid||this.isFluid&&this.useResponseSize)?this.responseSize?.height:0,s=this.isFluid?"width:100%":`width:${this.responseSize?.width}px`,r=`height:${n}px`,o=this.isFluid?"":"position:relative",d=this.isFluid?"":"position:absolute",h=document.createElement("div");h.style.cssText=`width:${t};height:${i};margin:0 auto;${o};line-height:0;`,this.adContainer.appendChild(h);const l=document.createElement("iframe");l.id=`${this.adContainer.id}_tgtLREC`,l.style.cssText=`${s};${r};visibility:inherit;border:0px;vertical-align:bottom;${d};`,l.frameBorder="no",l.scrolling="no",l.tabIndex=0,l.name=JSON.stringify(this.getInitParam()),l.title="광고";try{if(this.forceSafeFrame)l.setAttribute("sandbox","allow-forms allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts allow-top-navigation-by-user-activation"),l.src=this.store.globalEnv.gfp.safeFrameContainerUrl,h.appendChild(l),void 0!==a&&void 0!==n&&this.initHost(h,l,a,n);else{const e=this.getIFrameHTML();h.appendChild(l);const t=l.contentDocument||l.contentWindow?.document;t&&(t.open(),t.write(e),t.close()),void 0!==a&&void 0!==n&&this.initHost(h,l,a,n)}}catch(e){}}},{key:"getInitParam",value:function(){const{dependentService:e}=this.store.globalConfig,t=this.activateIframeEvent,i=t?.touch;return{evtType:"sf-init",iFrameId:`${this.adContainer.id}_tgtLREC`,isFluid:this.isFluid,adm:this.adm,sourceOrigin:L(),msgToken:this.msgToken,hostMeta:h(this.hostMeta),parInfo:J(this.adContainer),adMuteLibUrl:this.store.globalEnv.gfp.adMuteLibUrl,initialAdMuteState:this.initialAdMuteState,creativeType:this.creativeType,hasClickHandler:this.hasClickHandler,adChoice:this.adChoice,nativeMeta:this.nativeMeta,nativeResources:this.nativeResources,activateIframeTouch:i,activateIframeEvent:t,dependentService:e,viewableImpressionConfig:this.viewableImpressionConfig,crid:this.crid,iv:this.store.globalConfig.iv,slotEventTrackingFlags:this.slotEventTrackingFlags}}},{key:"getIFrameHTML",value:function(){return`\n \n \n \n \n \n \n \n \n \n \n \n 광고\n