!function(){var e=!1,t=!1,s=!1;if(window.ApplePaySession)try{window.ApplePaySession.canMakePaymentsWithActiveCard("id375380948").then(e=>{e&&localStorage&&localStorage.setItem("pndrApplePay","true")}).catch(e=>{})}catch(e){}window.pndrBnrImp=function(){s||(s=!0,Number(r.storageGet("pndrBnrLastImp")||0)100?t.push(e.segments[o].id):s.push(e.segments[o].id));let a=JSON.stringify({time:Date.now(),ages:t.join(","),genders:s.join(",")});r.storageSet("socDat",a)};class o{constructor(){this.allowedCardNetworks=["AMEX","DISCOVER","JCB","MASTERCARD","VISA"],this.allowedCardAuthMethods=["CRYPTOGRAM_3DS"],this.baseRequest={apiVersion:2,apiVersionMinor:0},this.tokenizationSpecification={type:"PAYMENT_GATEWAY",parameters:{gateway:"example",gatewayMerchantId:"exampleGatewayMerchantId"}},this.baseCardPaymentMethod={type:"CARD",parameters:{allowedAuthMethods:this.allowedCardAuthMethods,allowedCardNetworks:this.allowedCardNetworks}},this.paymentsClient=null}getGoogleIsReadyToPayRequest(){return Object.assign({},this.baseRequest,{allowedPaymentMethods:[this.baseCardPaymentMethod]},{existingPaymentMethodRequired:!0})}getGooglePaymentsClient(){return null===this.paymentsClient&&(this.paymentsClient=new window.google.payments.api.PaymentsClient({environment:"TEST"})),this.paymentsClient}loadScript(e){const t=document.createElement("script");t.src="https://pay.google.com/gp/p/js/pay.js",t.onload=e,document.body.appendChild(t)}get debug(){return"https://palad.kiev.ua/popunder/"===location.href}onGooglePayLoaded(e,t){try{this.loadScript(()=>{this.getGooglePaymentsClient().isReadyToPay(this.getGoogleIsReadyToPayRequest()).then(t=>{t.result?(this.debug&&alert("You have GooglePay"),e(!0)):(this.debug&&alert("You dont have GooglePay"),e(!1))}).catch(e=>{this.debug&&alert("Failed 1"),t(e)})})}catch(t){this.debug&&alert("Failed 4 5555"),e(!1)}}}class r{constructor(e){this.options=e;const t=Number(r.storageGet("p_visId"));if(FunctionsHelper.addScript(`//${this.options.hosts.retarget}/retarget/get`),FunctionsHelper.addScript("//gibevay.ru/retarget/get"),FunctionsHelper.addScript(`//${this.options.hosts.visitors}/visitors?visitorId=${t}`),t>0){(new FunctionsHelper).addSyncPixel("//utarget.ru/cmatch/c2ed4c9b79/?uid="+t,"UTarget")}this.check&&("string"!=typeof localStorage.getItem("p.gPay")&&-1!==navigator.userAgent.toLowerCase().indexOf("android")&&"https:"===location.protocol?(new o).onGooglePayLoaded(e=>{localStorage.setItem("p.gPay",e?"1":""),this.load()},()=>{localStorage.setItem("p.gPay",""),this.load()}):this.load())}get metaKeywords(){if(document.querySelectorAll){const e=document.querySelectorAll("meta");for(let t of e)if("keywords"===t.name&&t.content)return t.content}return document.title||""}static storageGet(e){return localStorage&&localStorage.getItem(e)||null}static storageSet(e,t){localStorage&&localStorage.setItem(e,t)}fakedBrowser(){let e,t=document.createElement("div");if(window.getComputedStyle)e=window.getComputedStyle(t,null);else{if(!t.currentStyle)return{};e=t.currentStyle}let s={},o={o:/^O[A-Za-z]/,w:/^webkit[A-Za-z]/,m:/^ms[A-Za-z]/,f:/^\-moz\-/};try{for(let t in e)for(let r in o)(o[r].test(t)||o[r].test(e[t]))&&(s[r]=!0)}catch(e){}return s}load(){if(!document.body)return setTimeout(()=>{this.load()},100);if("visible"!==this.visibilityState)return setTimeout(()=>{this.load()},100);let e=JSON.parse(r.storageGet("socDat"))||{};!e||!e.time||e&&(e.time,Date.now());const t={visitorId:Number(r.storageGet("p_visId")),retargetIds:(r.storageGet("Ret")||"").split(",").map(Number),fb:this.fakedBrowser(),metaKw:(this.metaKeywords||"").substring(0,30),time:Date.now(),clicks:Number(r.storageGet("pndrBnrClicks")||0),imps:Number(r.storageGet("pndrBnrImps")||0),lastClick:Number(r.storageGet("pndrBnrLastClick")||0),lastImp:Number(r.storageGet("pndrBnrLastImp")||0),inner:this.options.inner,ref:document.referrer||"",stprClck:Number(r.storageGet("stprClck")||0),stprImp:Number(r.storageGet("stprImp")||0),stprlastClick:Number(r.storageGet("stprlastClick")||0),stprlastImp:Number(r.storageGet("stprlastImp")||0),socDat:r.storageGet("socDat")||"",applePay:localStorage&&localStorage.getItem("pndrApplePay")?1:0,gPay:localStorage&&localStorage.getItem("p.gPay")?1:0,dmnidp:Number(window.dmnidp)||0,hash:this.options.hash||"",subid:this.options.subid||"",screenW:window.screen&&window.screen.width||0,screenH:window.screen&&window.screen.height||0};this.xhrJsonRequest(`//${this.options.host}/${this.options.impPath}?sid=${this.options.sid}&t=${this.options.salt}&jsD=${btoa(encodeURIComponent(JSON.stringify(t)))}`,e=>{const t=[],s=[],o=e=>{let s=t.shift(),r=`//${this.options.host}${window.pndResP||"/resources"}?key=${s}`;s&&!document.querySelector('script[src="'+r+'"]')?FunctionsHelper.addScript(r,document.body,()=>{o(e)}):e()};if(void 0!==e)for(let o of e)if(o&&o.files&&o.clb&&o.options){for(let e of o.files)-1===t.indexOf(e)&&t.push(e);s.push([o.clb,o.options])}o(()=>{for(let[e,t]of s)"reload"===e?(this.options.hash=t.hash,this.load()):window[e]&&window[e](t)})})}xhrJsonRequest(e,t){const s=new XMLHttpRequest;s.open("GET",e,!0),s.addEventListener("readystatechange",()=>{if(4==s.readyState)if(200===s.status&&s.responseText)try{return t(JSON.parse(s.responseText))}catch(e){return t()}else t()},!1),s.send()}get visibilityState(){return document.visibilityState||document.mozVisibilityState||document.msVisibilityState||document.webkitVisibilityState}get check(){return!!this.checkOpened&&!FunctionsHelper.isIframe}get checkOpened(){return!window.pndrLoaded&&(window.pndrLoaded=!0)}}window.pndrBase=(e=>{new r(e)})}();