try{!function(y){if(y){var l,i,s,r,o,n,c,a,d,u={},e=y.top.TraceKit,p=[].slice,_="?",h=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/;u.noConflict=function(){return y.top.TraceKit=e,u},u.wrap=function(e){return function(){try{return e.apply(this,arguments)}catch(e){throw u.report(e),e}}},u.report=(o=[],c=n=null,v.subscribe=function(e){!0!==i&&(l=y.onerror,y.onerror=t,i=!0),!0!==r&&(s=y.onunhandledrejection,y.onunhandledrejection=f,r=!0),o.push(e)},v.unsubscribe=function(e){for(var t=o.length-1;0<=t;--t)o[t]===e&&o.splice(t,1);0===o.length&&(i&&(y.onerror=l,i=!1),r&&(y.onerror=s,r=!1))},v),u.computeStackTrace=(a=!1,d={},I.augmentStackTraceWithInitialElement=C,I.computeStackTraceFromStackProp=E,I.guessFunctionName=k,I.gatherContext=z,I.ofCaller=function(t){t=1+(null==t?0:+t);try{throw new Error}catch(e){return I(e,t+1)}},I.getSource=w,I),u.extendToAsynchronousCallbacks=function(){function e(e){var i=y[e];y[e]=function(){var e=p.call(arguments),t=e[0];return"function"==typeof t&&(e[0]=u.wrap(t)),i.apply?i.apply(this,e):i(e[0],e[1])}}e("setTimeout"),e("setInterval")},u.defaultSendError=function(e){"use strict";try{e.stack||(e.stack=new Error("force-added stack").stack,e.stack&&(e.stack=e.stack.toString())),e.name||(e.name="Unknown"),e.message||(e.message="Unknown")}catch(e){console.error("Error building error data"),console.error(e)}try{var t={client_timestamp:(new Date).getTime(),event_id:"",page_id:"",session_id:"",bidder:"",user_id:"",publisher:"",rtp_file_version:"",ad_project_tag:"",page_url:y.top.location.href||y.location.href||"",in_iframe:!1,is_https:"https:"==document.location.protocol,user_agent:navigator.userAgent||"",stack_trace:JSON.stringify(e.stack),error_message:e.message.toString(),error_name:e.name.toString()};if(t&&"object"==typeof t){var i="",s=encodeURIComponent;for(var r in t)i+="&"+s(r)+"="+s(t[r]);t=i.slice(1)}var o=null;y.ActiveXObject?o=new ActiveXObject("Microsoft.XMLHTTP"):y.XMLHttpRequest&&(o=new XMLHttpRequest);o.open("POST","https://events.proper.io/api/event",1),o.withCredentials=!1,o.timeout=2e3,o.onload=function(){200==o.status||console.error("Error sending exception data. xhr.status: "+o.status)},o.send(t)}catch(e){console.error("Error sending exception data"),console.error(e)}},u.report.subscribe(u.defaultSendError),u.remoteFetching||(u.remoteFetching=!1),u.collectWindowErrors||(u.collectWindowErrors=!1),(!u.linesOfContext||u.linesOfContext<1)&&(u.linesOfContext=11),y.top.TraceKit=u}function x(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function m(e){return void 0===e}function g(e,t,i){var s=null;if(!t||u.collectWindowErrors){for(var r in o)if(x(o,r))try{o[r](e,t,i)}catch(e){s=e}if(s)throw s}}function t(e,t,i,s,r){if(c)u.computeStackTrace.augmentStackTraceWithInitialElement(c,t,i,e),b();else if(r)g(u.computeStackTrace(r),!0,r);else{var o,n={url:t,line:i,column:s},a=e;if("[object String]"==={}.toString.call(e)){var d=e.match(h);d&&(o=d[1],a=d[2])}n.func=u.computeStackTrace.guessFunctionName(n.url,n.line),n.context=u.computeStackTrace.gatherContext(n.url,n.line),g({name:o,message:a,mode:"onerror",stack:[n]},!0,null)}return!!l&&l.apply(this,arguments)}function f(e){g(u.computeStackTrace(e.reason),!0,e.reason)}function b(){var e=c,t=n;n=c=null,g(e,!1,t)}function v(e){if(c){if(n===e)return;b()}var t=u.computeStackTrace(e);throw c=t,n=e,setTimeout(function(){n===e&&b()},t.incomplete?2e3:0),e}function w(e){if("string"!=typeof e)return[];if(!x(d,e)){var t="",i="";try{i=y.document.domain}catch(e){}var s=/(.*)\:\/\/([^:\/]+)([:\d]*)\/{0,1}([\s\S]*)/.exec(e);s&&s[2]===i&&(t=function(e){if(!u.remoteFetching)return"";try{var t=function(){try{return new y.XMLHttpRequest}catch(e){return new y.ActiveXObject("Microsoft.XMLHTTP")}}();return t.open("GET",e,!1),t.send(""),t.responseText}catch(e){return""}}(e)),d[e]=t?t.split("\n"):[]}return d[e]}function k(e,t){var i,s=/function ([^(]*)\(([^)]*)\)/,r=/['"]?([0-9A-Za-z$_]+)['"]?\s*[:=]\s*(function|eval|new Function)/,o="",n=w(e);if(!n.length)return _;for(var a=0;a<10;++a)if(!m(o=n[t-a]+o)){if(i=r.exec(o))return i[1];if(i=s.exec(o))return i[1]}return _}function z(e,t){var i=w(e);if(!i.length)return null;var s=[],r=Math.floor(u.linesOfContext/2),o=r+u.linesOfContext%2,n=Math.max(0,t-r-1),a=Math.min(i.length,t+o-1);t-=1;for(var d=n;d","(?:>|>)").replace("&","(?:&|&)").replace('"','(?:"|")').replace(/\s+/g,"\\s+")}function T(e,t){for(var i,s,r=0,o=t.length;ri&&(s=o.exec(r[i]))?s.index:null}function O(e){if(!m(y&&y.document)){for(var t,i,s,r,o=[y.location.href],n=y.document.getElementsByTagName("script"),a=""+e,d=0;d|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,o=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,n=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,a=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,d=/\((\S*)(?::(\d+))(?::(\d+))\)/,l=e.stack.split("\n"),c=[],p=/^(.*) is undefined$/.exec(e.message),u=0,h=l.length;u eval")&&(t=a.exec(i[3]))?(i[3]=t[1],i[4]=t[2],i[5]=null):0!==u||i[5]||m(e.columnNumber)||(c[0].column=e.columnNumber+1),s={url:i[3],func:i[1]||_,args:i[2]?i[2].split(","):[],line:i[4]?+i[4]:null,column:i[5]?+i[5]:null}}!s.func&&s.line&&(s.func=k(s.url,s.line)),s.context=s.line?z(s.url,s.line):null,c.push(s)}return c.length?(c[0]&&c[0].line&&!c[0].column&&p&&(c[0].column=j(p[1],c[0].url,c[0].line)),{mode:"stack",name:e.name,message:e.message,stack:c}):null}function C(e,t,i,s){var r={url:t,line:i};if(r.url&&r.line){e.incomplete=!1,r.func||(r.func=k(r.url,r.line)),r.context||(r.context=z(r.url,r.line));var o=/ '([^']+)' /.exec(s);if(o&&(r.column=j(o[1],r.url,r.line)),0]+)>|([^\)]+))\((.*)\))? in (.*):\s*$/i,o=t.split("\n"),n=[],a=0;athis.length)&&-1!==this.indexOf(e,t)}),Date.now=Date.now||function(){return+new Date};var l=(t.prototype.addElement=function(e,t){var i={id:e.id,callback:t,lazyload:e.lazyload||!1,viewability:e.viewability||!1,fetchMarginPercent:e.fetchMarginPercent||0,renderMarginPercent:e.renderMarginPercent||0,minHeight:e.minHeight||0,activeTab:!0,viewable:!1,inFetchZone:!1,inDisplayZone:!1};this.started&&this.runViewabilityCheck(i),this.elements.push(i)},t.prototype.start=function(){window.addEventListener("scroll",this.listener,!!this.supportsPassive&&{passive:!0}),window.addEventListener("resize",this.listener,!!this.supportsPassive&&{passive:!0}),this.elements.forEach(function(e){e.activeTab=!0,this.runViewabilityCheck(e,!0)},this),this.started=!0},t.prototype.stop=function(){window.removeEventListener("scroll",this.listener,!!this.supportsPassive&&{passive:!0}),window.removeEventListener("resize",this.listener,!!this.supportsPassive&&{passive:!0}),this.elements.forEach(function(e){e.activeTab=!1,e.viewable=!1,e.inFetchZone=!1,e.inDisplayZone=!1,e.callback(e)}),this.started=!1},t.prototype.runViewabilityCheck=function(e,t){var i=!1;e.viewability&&(i=function(e){var t,i=e.viewable;if(e.element=e.element||k.getElementById(e.id),!e.element)return!1;var s=e.element.getBoundingClientRect();if(0==s.height&&0window.innerHeight?o-=window.innerHeight:o=o<0?Math.abs(o):0;var n=o/window.innerHeight*100;i=n<=e.fetchMarginPercent,s=n<=e.renderMarginPercent;var a=i!=e.inFetchZone||s!=e.inRenderZone;return e.inFetchZone=i,e.inRenderZone=s,a}(e)||i),(i||t)&&e.callback(e)},t.calculateViewablePercentage=function(e){var t=e.getElement();if(null!==t){if("visible"!==window.top.document.visibilityState)return 0;var i=t.getBoundingClientRect(),s={};if(void 0!==i)return s.left=Math.max(i.left,0),s.right=Math.min(i.right,window.top.innerWidth),s.left>=s.right?0:(s.top=Math.max(i.top,0),s.bottom=Math.min(i.bottom,window.top.innerHeight),s.top>=s.bottom?0:(s.width=s.right-s.left,s.height=s.bottom-s.top,s.width*s.height/(i.width*i.height)*100))}return 0},t);function t(){this.timer=null,this.elements=[],this.supportsPassive=function(){try{var e=!1,t=Object.defineProperty({},"passive",{get:function(){e=!0}});return window.addEventListener("testPassive",null,t),window.removeEventListener("testPassive",null,t),e}catch(e){return _(g.computeStackTrace(e)),!1}}(),this.listener=function(){clearTimeout(this.timer),this.timer=O.setTimeout.call(this,function(){this.elements.forEach(function(e){this.runViewabilityCheck(e)},this)},250)}.bind(this),this.listener=g.wrap(this.listener),T.ready(function(){this.start(),function(t){var i="hidden",e=function(e){k[i]?t.stop():t.start()},s=function(){t.stop()},r=function(){t.start()};e=g.wrap(e),s=g.wrap(s),r=g.wrap(r),i in k?k.addEventListener("visibilitychange",e):(i="mozHidden")in k?k.addEventListener("mozvisibilitychange",e):(i="webkitHidden")in k?k.addEventListener("webkitvisibilitychange",e):(i="msHidden")in k?k.addEventListener("msvisibilitychange",e):"onfocusin"in k?(k.onfocusin=r,k.onfocusout=s):"onpagehide"in window?(window.addEventListener("pagehide",s,!1),window.addEventListener("pageshow",r,!1)):"onblur"in window&&(window.onfocus=r,window.onblur=s)}(this)}.bind(this))}function n(){this.lang="",this.tzone="",this.member="no",this.facebook_user="unknown",this.pubcid="",this.init=function(){if(this.tzone=(new Date).getTimezoneOffset(),this.lang=navigator.language||navigator.browserLanguage||navigator.userLanguage||navigator.systemLanguage,"object"==typeof top.window.PublisherCommonId&&"function"==typeof top.window.PublisherCommonId.getId)try{this.pubcid=top.window.PublisherCommonId.getId()}catch(e){_(g.computeStackTrace(e))}if(!this.pubcid){this.pubcid=Qe("_pubcid"),this.pubcid||(this.pubcid=et());var e=new Date;e.setTime(e.getTime()+31536e6),k.cookie="_pubcid="+this.pubcid+"; expires="+e.toGMTString()+"; path=/; SameSite=Lax;"}},this.stickyFreqCapHandler={setStickyClosedCookie:function(){var e=new Date;e.setHours(23,59,59,0),k.cookie="properStickyClosed=true; expires="+e.toGMTString()+"; path=/; SameSite=Lax;"},getStickyClosedCookie:function(){return"true"==Qe("properStickyClosed")},setStickyUnitImps:function(e){var t=new Date;t.setHours(23,59,59,0),k.cookie="properStickyUnitImps="+parseInt(e)+"; expires="+t.toGMTString()+"; path=/; SameSite=Lax;"},getStickyUnitImps:function(){return NaN!=parseInt(Qe("properStickyUnitImps"))?parseInt(Qe("properStickyUnitImps")):0},incrementStickyUnitImps:function(){var e=this.getStickyUnitImps()||0;e+=1,this.setStickyUnitImps(e)},expireCookie:function(e){k.cookie=e+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/; SameSite=Lax;"}},this.init()}function a(){if(this.split_version=0,this.post_id="",this.post_id_enabled=0,this.member="no",this.member_enabled=0,this.secondary_auction=0,this.member_sticky_desktop="yes",this.member_sticky_mobile="yes",this.tags=["unknown"],this.bidder_info={pubmatic_s2s:{rev_share:.81,bid_grouping:"slot"},sovrn_s2s:{rev_share:1,bid_grouping:"page"},gumgum_s2s:{rev_share:1,bid_grouping:"page",dont_refresh:1},brealtime:{rev_share:.9,bid_grouping:"page",default_bid_ttl:3e5,refresh_interval:6e4},districtm:{rev_share:.9,bid_grouping:"page",default_bid_ttl:3e5,refresh_interval:6e4},openx_pmp:{rev_share:1,bid_grouping:"slot"},remnant_rubicon:{rev_share:1,bid_grouping:"slot",remnant:1},remnant_adsense:{rev_share:1,bid_grouping:"slot",remnant:1},remnant_adx:{rev_share:1,bid_grouping:"slot",remnant:1}},void 0!==h)for(var e in h)this.bidder_info[e]=h[e].bidderInfo;this.floors={},this.sticky_floors={},this.dynamic_bid_mod={enabled:0,range:[0,0],m:"",b:""},this.disable_sticky_on_close=!1,this.enable_sticky_freq_cap=!1,this.sticky_freq_cap=0,this.sticky_slot_pos="right",this.sticky_brand="yes",this.remove_sticky_close="no",this.adx_bid_modifier=1.1,this.backup_floor=.1,this.sovrn_floor=.91,this.site_name="",this.domain="",this.dfp_id=5376056,this.google_advertiser=42904576,this.adsense_advertiser=1349528536,this.proper_advertiser=600883576,this.amazon_advertiser=455011336,this.remnant_advertiser=1349314336,this.ad_slots={},this.ad_slot_options={},this.ad_ids={},this.ad_pos={},this.sticky_slot=0,this.refresh_points=[],this.report_ads=0,this.backup_stickies=0,this.testing_mode=0,this.mobile_resolution=0,this.mobile_ids={},this.page_type="",this.ad_pages={},this.facebook_detection=0,this.capture_blocked_html=0,this.blocker_sample_data=0,this.blocker_sample_rate=1,this.autoplay_block=1,this.sandbox_iframe=1,this.sandbox_options="allow-popups allow-pointer-lock allow-scripts allow-same-origin",this.ad_retry_max=6,this.mobile_ad_retry_max=6,this.site_ids={},this.start_stop_bidders={},this.enabled_bidders={},this.domain_protection=0,this.refresh=0,this.full_refresh=0,this.refresh_max=0,this.adx_refresh_interval=3e4,this.refresh_interval=6e4,this.inview_refresh_interval=5e3,this.viewable_ad_refresh=0,this.exclude_google_refresh=0,this.exclude_dfp_refresh=0,this.refresh_inactive_tab=0,this.lazyload_enabled=0,this.lazyload_fetch_margin_desktop=0,this.lazyload_render_margin_desktop=0,this.lazyload_fetch_margin_mobile=0,this.lazyload_render_margin_mobile=0,this.autoplay_whitelist=["sharethrough"],this.outstream_settings={outstream:0,slot_name:"",sound_on_hover:0,expand_collapse:0,placement_selector:"",exclude_dfp:1},this.schain={ver:"1.0",complete:0,nodes:[]}}function d(o){this.proper_tracker_cookie={pid:"",bidders:{}},this.s_to_s_bidders={},this.done_matching=!1,this.sent=0,this.received=0,this.timeout=500,this.timeout_handle=null,this.page=o,this.cookieMatch=function(){for(bidder in this.getTrackerCookie(),this.proper_tracker_cookie.hasOwnProperty("proper_uid")&&""!=this.proper_tracker_cookie.proper_uid||(this.proper_tracker_cookie.proper_uid=f.pubcid),this.s_to_s_bidders)if(1==this.s_to_s_bidders[bidder]&&(void 0!==this.proper_tracker_cookie.bidders[bidder]&&0!=this.proper_tracker_cookie.bidders[bidder]||(void 0!==Qe(bidder+"_cookie")&&""!==Qe(bidder+"_cookie")?this.proper_tracker_cookie.bidders[bidder]=1:this.requestCookieMatch(bidder)),"pubmatic"==bidder)){var t=this;j(function(){try{var e=k.createElement("iframe");e.style.display="none",e.src=t.page.protocol+"//ads.pubmatic.com/AdServer/js/user_sync.html?p=156374&s=206686&predirect=",k.body.appendChild(e)}catch(e){console.log(e),_(g.computeStackTrace(e))}})}this.setTrackerCookie(),0==this.sent?this.matchingDone():this.addTimeout()},this.requestCookieMatch=function(e){o.log.mylog("Start "+e+" Cookie Matching","proper");var t=this;t.sent++;var i="",s="";if("sovrn"==e?(i=t.page.protocol+"//ap.lijit.com/pixel?redir=",s="$UID"):"pubmatic"==e?(i=t.page.protocol+"//image6.pubmatic.com/AdServer/UCookieSetPug?oid=1&rd=",s="#PM_USER_ID"):"districtm"==e&&(i=t.page.protocol+"//ib.adnxs.com/getuid?",s="$UID"),""!=s&&""!=i){var r=encodeURIComponent(t.page.protocol+"//s2s.proper.io/?savecookie=1&bidder="+e+"&proper_uid="+this.proper_tracker_cookie.proper_uid+"&uid="+s);j.ajax({url:i+r,requestType:"jsonp"})}},this.logMatchingResponse=function(e,t,i){var s=new Date;s.setTime(s.getTime()+31536e6),k.cookie=e+"_cookie="+i+"; expires="+s.toGMTString()+"; path=/; domain=."+this.page.domain+"; SameSite=Lax;",this.received++,this.proper_tracker_cookie.bidders[e]=1,this.setTrackerCookie(),this.received>=this.sent&&this.matchingDone()},this.matchingDone=function(){1!=this.done_matching&&(this.done_matching=1,o.log.mylog("S2S Cookie Matching Done","s2s"),this.resetTimeout())},this.getTrackerCookie=function(){if(void 0!==Qe("proper_tracker_cookie")){var e=Qe("proper_tracker_cookie")||"";e=ProperMedia.utils.isBase64(e)?ProperMedia.utils.b64DecodeUnicode(e):decodeURIComponent(e),this.proper_tracker_cookie=ProperMedia.utils.safeJsonParse(e)||this.proper_tracker_cookie}},this.setTrackerCookie=function(){var e=new Date;e.setTime(e.getTime()+31536e6);var t=ProperMedia.utils.b64EncodeUnicode(JSON.stringify(this.proper_tracker_cookie));k.cookie="proper_tracker_cookie="+t+"; expires="+e.toGMTString()+"; path=/; domain=."+this.page.domain+"; SameSite=Lax;"},this.addTimeout=function(){var e=this;this.timeout_handle=O.setTimeout.call(e,function(){e.resetTimeout(),e.matchingDone()},e.timeout)},this.resetTimeout=function(){clearTimeout(this.timeout_handle),this.timeout_handle=null}}var s,r,c,p,u,v=function(){this.url="",this.domain="",this.path="",this.referrer="",this.post_id="",this.page_number=1,this.isolated=0,this.get_vars={},this.width=0,this.height=0,this.protocol="http:",this.use_ssl=!1,this.is_mobile=0,this.slots={},this.requests_sent=0,this.requests_retuned=0,this.start_ts=0,this.bids_started_ts=0,this.dfp_correlator=!1,this.dfp_tags=[],this.bids={},this.dont_send_bids=!1,this.uuid=et(),this.sessionHandler=new I(this),this.log=new x(this),this.adPools=[],this.viewability_tracker=null,this.bidder_page_url="",this.spa_settings={enabled:!1,prefetch:!1,prefetch_slots:[],prefetched_slots:[],prefetch_slots_on_page:!1,gallery_id:null,page_number:1,gallery_base_url:""},window.proper_ad_page_uuid=this.uuid,this.init=function(){this.start_ts=Xe(),"https:"==k.location.protocol?(this.protocol="https:",this.use_ssl=!0):this.protocol="http:",this.url=Ke(),this.path=Ze(),this.domain=Ve(),this.get_vars=Ye(window.location.search.substring(1)),this.width=j(window).width(),this.height=j(window).height(),this.referrer=k.referrer,ProperMedia.utils.mergeObject(this.spa_settings,ProperMedia.utils.deepCopy(special_ops.spa_settings)),this.spa_settings.enabled&&this.spa_settings.prefetch&&this.spa_settings.gallery_id&&this.spa_settings.gallery_base_url?this.bidder_page_url=this.spa_settings.gallery_base_url:this.bidder_page_url=this.url,this.page_number=w.length+1,this.log.mylog("width: "+this.width),this.checkDomainProtection(),this.checkPageIsolation(),this.updateTags(),this.updatePostId(),this.buildAdPools(),this.checkMobile(),this.sessionHandler.init(),this.log.init_bid_data()},this.getTimeOnPage=function(){return 0==this.start_ts?0:Date.now()-this.start_ts},this.checkDomainProtection=function(){if("undefined"!==z.domain_protection&&1==z.domain_protection){var e=new RegExp("(^|\\.)"+z.domain.replace(/(http(s)?:\/\/)?(www\.)?/,"")+"$");this.domain.match(e)||(this.log.mylog("WARNING: Domains don't match. Bids wont be sent out for this page"),this.dont_send_bids=!0)}},this.checkPageIsolation=function(){if(void 0!==z.isolated_urls&&0=z.sticky_freq_cap)){if(1==this.is_mobile&&z.hasOwnProperty("mobile_ad_retry_max")?slot.wait_count_max=z.mobile_ad_retry_max:0==this.is_mobile&&z.hasOwnProperty("ad_retry_max")&&(slot.wait_count_max=z.ad_retry_max),z.ad_slot_options&&z.ad_slot_options[slot.name])for(var s in z.ad_slot_options[slot.name])slot[s]=z.ad_slot_options[slot.name][s];if(z.ad_slot_settings&&z.ad_slot_settings[slot.name])for(var s in z.ad_slot_settings[slot.name])slot[s]=z.ad_slot_settings[slot.name][s];if(slot.inview=0==this.is_mobile&&1==slot.inview_ad_refresh||slot.sticky?1:0,slot.refresh_interval=(slot.inview||slot.viewable_ad_refresh)&&slot.refresh_interval?slot.refresh_interval:z.refresh_interval,slot.inview_refresh_interval=(slot.inview||slot.viewable_ad_refresh)&&slot.inview_refresh_interval?slot.inview_refresh_interval:z.inview_refresh_interval,slot.lazyload_enabled=z.lazyload_enabled&&!slot.exclude_lazyload?1:0,slot.refresh_max=z.refresh_max,slot.refresh_cnt=0,slot.max_timeout=parseInt(slot.wait_interval)*parseInt(slot.wait_count_max),"btf"==slot.position&&(slot.max_timeout=parseInt(1.1*slot.max_timeout)),this.getMaxTier(slot),this.parseTierSizes(slot),"display"==slot.type&&(1==z.report_ads&&0==slot.exclude_ad_report&&(slot.report_ad_tool=1),0==slot.exclude_ad_refresh&&(slot.refresh=z.refresh),1==z.exclude_google_refresh&&(slot.exclude_advertiser=[z.google_advertiser,z.adsense_advertiser]),1!=slot.refresh&&1!=slot.viewable_ad_refresh||slot.refresh_handler&&slot.removeRefreshTimeout(),1==slot.viewable_ad_refresh||1==slot.lazyload_enabled||0==slot.refresh_inactive_tab)){this.viewability_tracker||(this.viewability_tracker=new l),slot.refresh_interval=(slot.inview||slot.viewable_ad_refresh)&&slot.refresh_interval?slot.refresh_interval:z.refresh_interval,slot.inview_refresh_interval=(slot.inview||slot.viewable_ad_refresh)&&slot.inview_refresh_interval?slot.inview_refresh_interval:z.inview_refresh_interval,this.is_mobile?(slot.lazyload.fetchMarginPercent=void 0!==slot.lazyload_fetch_margin_mobile?slot.lazyload_fetch_margin_mobile:z.lazyload_fetch_margin_mobile,slot.lazyload.renderMarginPercent=void 0!==slot.lazyload_render_margin_mobile?slot.lazyload_render_margin_mobile:z.lazyload_render_margin_mobile):(slot.lazyload.fetchMarginPercent=void 0!==slot.lazyload_fetch_margin_desktop?slot.lazyload_fetch_margin_desktop:z.lazyload_fetch_margin_desktop,slot.lazyload.renderMarginPercent=void 0!==slot.lazyload_render_margin_desktop?slot.lazyload_render_margin_desktop:z.lazyload_render_margin_desktop);var r={id:slot.div_id,lazyload:!!slot.lazyload_enabled,viewability:!!slot.viewable_ad_refresh,fetchMarginPercent:slot.lazyload.fetchMarginPercent,renderMarginPercent:slot.lazyload.renderMarginPercent,minHeight:slot.min_height};this.viewability_tracker.addElement(r,slot.viewabilityChange.bind(slot))}this.assignSlotToAdPool(slot)}},this.SpaNextPage=function(){var e=this.getTimeOnPage();this.log.mylog("Time on page: "+e),this.spa_settings.page_number++,this.start_ts=Xe(),"https:"==k.location.protocol?(this.protocol="https:",this.use_ssl=!0):this.protocol="http:",this.uuid=et(),this.url=Ke(),this.path=Ze(),this.domain=Ve(),this.get_vars=Ye(window.location.search.substring(1)),this.width=j(window).width(),this.height=j(window).height(),this.referrer=k.referrer;var s=!1;ProperMedia.utils.deepAccess(this.spa_settings,"gallery_id")&&ProperMedia.utils.deepAccess(special_ops,"spa_settings.gallery_id")&&ProperMedia.utils.deepAccess(this.spa_settings,"gallery_id")===ProperMedia.utils.deepAccess(special_ops,"spa_settings.gallery_id")?this.clearExpiredAds():s=this.clearCachedAds(),this.spa_settings.enabled&&this.spa_settings.prefetch&&this.spa_settings.gallery_id&&this.spa_settings.gallery_base_url?this.bidder_page_url=this.spa_settings.gallery_base_url:this.bidder_page_url=this.url,this.log.mylog("width: "+this.width),this.checkDomainProtection(),this.checkPageIsolation(),this.updateTags(),this.updatePostId(),this.sessionHandler.init(),this.log.init_bid_data(),this.buildDefaultSlots();var t=z.enabled_bidders||[];t=Pe(t=Se(this,t)),z.enabled_bidders=t,this.bids={};var r={};for(slot_name in 1==this.spa_settings.enabled&&1==this.spa_settings.prefetch&&(this.spa_settings.prefetched_slots=ProperMedia.utils.deepCopy(this.spa_settings.prefetch_slots)||[],Object.keys(this.slots).forEach(function(e){var t=ProperMedia.utils.getSlotFromPageObject(this,e);if(t&&t instanceof E){if(t.prefetched=!1,0=t&&t>=e.max_tier&&(e.max_tier=t)},this.parseTierSizes=function(e){e.sizes={};var t=0,i=z.ad_slots[e.type][e.name][e.max_tier];if(i&&0z.sticky_floors[i[s]])&&(e.floors.backup_floor=z.sticky_floors[i[s]]),e.floors.sizes[i[s]]=z.sticky_floors[i[s]]):void 0!==z.floors[i[s]]&&""!==z.floors[i[s]]&&(e.floors.sizes[i[s]]=z.floors[i[s]])),void 0!==z.ad_ids[e.name+"@"+i[s]]?e.sizes[i[s]]=z.ad_ids[e.name+"@"+i[s]]:e.sizes[i[s]]={}}"320x50"==e.default_size&&void 0!==e.sizes["300x250"]&&(e.default_size="300x250"),this.slots[e.name]||(this.slots[e.name]=e)}var o=e.custom_floor&&e.custom_floor>z.backup_floor?e.custom_floor:z.backup_floor;e.floors.backup_floore?this.bids_ready_ts-e:-1},this.auctionTimePassed=function(){var e=0==this.bids_started_ts?this.page.bids_started_ts:this.bids_started_ts;return(new Date).getTime()-e},this.checkBidsReady=function(){(this.bids_returned>=this.bids_sent||this.auctionTimePassed()>=this.max_timeout||this.bids_returned>=.8*this.bids_sent&&this.auctionTimePassed()>.8*this.max_timeout)&&this.bidsReady()},this.bidsReady=function(){if(1==this.auction_send_complete||1==this.prefetched||1==this.kill_slot||this.lazyload_enabled&&!this.lazyload.inRenderZone)return!1;if(this.bids_ready_ts=Xe(),this.precent_bids_ready=this.getPrecentBidsReady(),this.bids_ready=1,"display"==this.type){if(1==this.page.isolated)if(this.getWinningBid(),"undefined"==this.winning_ad.price&&0==this.auction_num&&void 0!==z.secondary_auction&&1==z.secondary_auction){var e=1this.floors.backup_floor?this.floors.sizes[t.size]:this.floors.backup_floor,!(0=i){this.winning_ad=this.ads.splice(e,1).pop();break}}}}},this.wait=function(){var e=this;null==this.timeout_handle&&(this.timeout_handle=O.setTimeout.call(e,function(){e.bidsReady()},e.max_timeout))},this.resetTimeout=function(){clearTimeout(this.timeout_handle),this.timeout_handle=null},this.setRefreshInterval=function(){if(1==this.winning_ad.displayed&&1==ProperMedia.utils.deepAccess(z,"bidder_info."+this.winning_ad.bidder+".dont_refresh")||0==this.refresh)this.refresh=0;else{var e=Math.max(this.refresh_interval,this.min_refresh_interval);if(-1!==[z.google_advertiser,z.adsense_advertiser].indexOf(this.advertiserId)&ðis.ttl}},x=function(e){this.page=e,this.log_lines={},this.autoplay_html={},this.rogue_data=[],this.saved_data={},this.bid_data={},this.ad_info={},this.rogue_timeout=null,this.tracker_timeout=null,this.tracker_wait=500,this.init_bid_data=function(){"greatergood_ctg"!=z.site_name&&"historyinorbit"!=z.site_name&&"groovyhistory"!=z.site_name||(this.tracker_wait=100),this.bid_data={website:tt(z.site_name,{type:"string",default_val:"unknown",max_len:40}),url:tt(this.page.url,{type:"string",max_len:255}),url_path:tt(this.page.path,{type:"string",max_len:150}),os:tt(window.device.os_group,{type:"string",max_len:30}),browser:tt(window.device.browser_group,{type:"string",max_len:30}),device:tt(window.device.device_type,{type:"string",max_len:10}),use_ssl:tt(this.page.use_ssl,{type:"boolean"}),is_mobile:tt(this.page.is_mobile,{type:"boolean"}),is_isolated:tt(this.page.isolated,{type:"boolean"}),session_depth:tt(this.page.sessionHandler.sessionData.depth,{type:"number"}),session_guid:tt(this.page.sessionHandler.sessionData.uuid,{type:"string"}),resolution_width:tt(this.page.width,{type:"number",max:99999}),resolution_height:tt(this.page.height,{type:"number",max:99999}),rtp_file_version:tt(z.split_version,{type:"number"}),referrer:tt(this.page.sessionHandler.sessionData.referrer,{type:"string",max_len:255}),utm_source:tt(this.page.sessionHandler.sessionData.utm_source,{type:"string",max_len:50}),utm_campaign:tt(this.page.sessionHandler.sessionData.utm_campaign,{type:"string",max_len:50}),utm_medium:tt(this.page.sessionHandler.sessionData.utm_medium,{type:"string",max_len:50}),utm_term:tt(this.page.sessionHandler.sessionData.utm_term,{type:"string",max_len:50}),page_guid:tt(this.page.uuid,{type:"string"}),tags:void 0!==z.tags?z.tags.join(","):"",ad_slots:{}},this.send_pageview_pixel()},this.send_pageview_pixel=function(){this.bid_data.ad_slots.pageview_pixel={slot_name:"pageview_pixel",bidder:"pageview_pixel",price:0,gross:0,size:"0x0",refresh_cnt:0,line_item_id:"",response_ms:0,auction_duration:0,precent_bids_ready:0,tag_id:""},this.proper_tracker()},this.log_bid=function(e,t,i,s){this.mylog(e+" ("+t.name+"@"+i+") = "+s)},this.mylog=function(e,t){t=t||"proper",this.log_lines[t]=function(e){void 0!==e&&(e instanceof Array||e instanceof Object)||(e=[]);return e}(this.log_lines[t]),this.log_lines[t].push(e),(1==this.page.get_vars[t]||"proper"==t&&1==Qe("proper_log"))&&console.log(e)},this.rogue_tracker=function(){if(clearTimeout(this.rogue_timeout),this.rogue_timeout=null,0e.floors.backup_floor?e.floors.sizes[s.size]:e.floors.backup_floor,!(0=r){e.winning_ad=s,this.ads.splice(i,1).pop();break}}}},this.clearExpiredAds=function(){if(0u?parseFloat(a.winning_ad.dfp_price)+.01:parseFloat(u)+.01}n.log.mylog("displayed! DFP ("+a.name+", bidder="+c+", size="+d+", price: "+p+")");var h=a.calcAuctionMs();n.log.bid_data.ad_slots[a.name]={slot_name:tt(a.name,{type:"string",max_len:50}),bidder:tt(c,{type:"string",max_len:30}),price:tt(p,{type:"a9"==c?"string":"number",max:1e3,max_len:15}),gross:tt(p,{type:"a9"==c?"string":"number",max:1e3,max_len:15}),size:tt(d,{type:"string",max_len:10}),refresh_cnt:tt(a.refresh_cnt,{type:"number",max:999}),line_item_id:tt(r,{type:"string",max_len:15}),response_ms:tt(h,{type:"number",max:999999}),auction_duration:tt(h,{type:"number",max:999999}),precent_bids_ready:tt(a.precent_bids_ready,{type:"number",max:100}),tag_id:tt(l,{type:"string",max_len:50})};var g={price:p,gross:p,dfp_price:p,bidder:c,size:d,adCode:"",tag_id:l,response_ms:h};a.displayed_ad=new C(a),ProperMedia.utils.mergeObject(a.displayed_ad,g),n.log.saved_data[a.name]={bidder:c,cpm:p,size:d,slot:a.name,request_url:"",request_response:"",adcode:"",ad_details:{}},clearTimeout(n.log.tracker_timeout),n.log.tracker_timeout=null,n.log.tracker_timeout=O.setTimeout.call(n,function(){n.log.proper_tracker()},500)}(s,i,e.size,e.advertiserId,e.lineItemId,e.yieldGroupIds),Ae(e.isEmpty,s,i,e.size,e.creativeId,e.lineItemId,e.advertiserId)))})),googletag.pubads().addEventListener("slotOnload",g.wrap(function(e){var t=ProperMedia.utils.extractSlotNameAndPageNumber(e.slot.getSlotElementId()),i=ProperMedia.utils.getSlotFromPageObject(t);if(i){var s=window.top.document.getElementById("google_ads_iframe_/"+z.dfp_id+"/"+i.name+"_0").contentDocument;s&&(s.getElementById("common_15click_overlay")||s.getElementById("common_15click_anchor"))&&_(new Error("Detected Google Confirmed Click"))}})),googletag.pubads().setTagForChildDirectedTreatment(0),googletag.enableServices(),b=!0,"function"==typeof googletag.pubads().isSRA&&googletag.pubads().isSRA()&&_(new Error("DFP Single Request Mode Enabled"))}),m=1}function Oe(a){if(a instanceof E&&a.getElement()&&0a.floors.backup_floor){var i=He(t);a.dfp_slot.setTargeting("proper_floor_"+e,i.toFixed(2).toString())}});var n=He(a.floors.backup_floor);a.dfp_slot.setTargeting("proper_floor",n.toFixed(2).toString()),0=t?parseFloat(z.dynamic_bid_mod.m)*t+parseFloat(z.dynamic_bid_mod.b):t*z.adx_bid_modifier,n.page.log.mylog("AdX bid modifier. ("+n.winning_ad.bidder+", "+n.name+"@"+n.winning_ad.size+"). Old Price: $"+t+" New Price: $"+i),t=function(e){return e=800e.dfp_sent||1==e.always_refresh_dfp){var t=!(0-- no ad found --',e.winning_ad=test_ad}else if(0==e.refresh_cnt){t=!0===Ge(e,e.default_size)?0:1}var s=1';j("#"+a.div_id).before('
'+p+"
"),j("#"+a.div_id).addClass("ad-wrapper");var u=a.number;j(".ad-sticky .close-ad").on("click",function(e){e.preventDefault(),j(".ad-sticky").removeStyle(),j(".ad-sticky").removeClass("isOpen"),j(".ad-sticky").addClass("close"),z.disable_sticky_on_close&&f.stickyFreqCapHandler.setStickyClosedCookie(),De(u,t)})}j(".ad-sticky").removeClass("sticky-right"),j(".ad-sticky").removeClass("sticky-left"),j(".ad-sticky").removeClass("sticky-btm"),j(".ad-sticky").attr("style",""),j(".ad-sticky .inner-wrapper").attr("style",""),1Report Advertisement')),a.displayed=1);1==a.displayed&&(a.last_displayed_ts=Xe()),1==a.refresh&&a.refresh_cnt