"use strict";!function(s,u){var l=s.__acuityAdsPixelEventServer||"https://e.acuityplatform.com/pj",r="http://",n="https://",y="pixelKey",f="pk";function a(e){try{var t=d(function(e){var t=e.err,r=e.topFrame,n="";if(t)try{n=s.top.location.href}catch(e){n=s.location.href}else n=r.location.href;return n}(function(){var e=s,t=!1;try{for(;e.parent.document!==e.document;){if(!e.parent.document){t=!0;break}e=e.parent}}catch(e){t=!0}return{topFrame:e,err:t}}())),r=function(e){{if(e.hasOwnProperty(y)&&e[y])return e[y];if(e.hasOwnProperty(f)&&e[f])return e[f];if(s.acuityAdsPixelKey)return s.acuityAdsPixelKey;throw new TypeError("Missing required Pixel Key. Please check snippet or pass Pixel Key like following: aap({ pixelKey: '12345' }).")}}(e||{}),n=(c=r,o=t,p=e||{},"".concat(l,"?")+["pk=".concat(c),"pu=".concat(o)].concat(Object.keys(p).filter(function(e){return p[e]&&(!Array.isArray(p[e])||0<p[e].length)}).map(function(e){return"".concat(e,"=").concat(d(Array.isArray(p[e])?p[e].join("~"):p[e]))})).join("&"));a=n,(i=u.createElement("script")).setAttribute("type","text/javascript"),i.src=a,u.body.appendChild(i)}catch(e){console.error("AcuityAds Pixel",e)}var a,i,c,o,p}function i(e){var t=e;return e.startsWith(n)||e.startsWith(r)||(t=n+e),t}s.acuityParseResponse=function(e){try{(t=e).iframeUrls.forEach(function(e){var t=u.createElement("iframe");t.src=i(e),u.body.appendChild(t)}),t.iframeSnippets.forEach(function(e){u.body.insertAdjacentHTML("beforeend",e)}),t.imageUrls.forEach(function(e){var t=u.createElement("img");t.src=i(e),u.body.append(t)}),t.imageUrlsWithNoContent.forEach(function(e){var t=u.createElement("img");t.width=0,t.height=0,t.style.display="none",t.ariaHidden=!0,t.alt="",t.src=i(e),u.body.append(t)}),t.javascriptSnippets.forEach(function(e){var t=e.replace(' type="text/javascript"',"").replace("<script>","").replace("<\/script>",""),r=u.createElement("script");r.setAttribute("type","text/javascript"),r.innerHTML=t,u.body.appendChild(r)}),t.javascriptUrls.forEach(function(e){var t=u.createElement("script");t.setAttribute("type","text/javascript"),t.src=e,u.body.appendChild(t)})}catch(e){console.error("AcuityAds Pixel",e)}var t};var d=function(e){return encodeURIComponent(e)};!function(){for(var t,e=(t=a,function(e){e&&e.delay&&0<e.delay?setTimeout(function(){t(e)},e.delay):t(e)}),r=0;r<s.acuityAdsEventQueue.length;r++)e(s.acuityAdsEventQueue[r]);s.aap=e}()}(window,document);
