/**
 * ESP - RTBHouse
 * @version v1.2.7
 * @link https://www.rtbhouse.com/
 */
!function(){const e=async()=>{let e=window.localStorage.getItem("rtbhouse-esp");var t,o=window.localStorage.getItem("rtbhouse-segments");let n;pbjs?.getUserIds&&(n=pbjs?.getUserIds()?.pubcid),e||(e=(t=(e,t)=>e.toString(16).padStart(t,0),(s=crypto.getRandomValues(new Uint8Array(16)))[6]=15&s[6]|64,s[8]=63&s[8]|128,s=new DataView(s.buffer),`${t(s.getUint32(0),8)}-${t(s.getUint16(4),4)}-${t(s.getUint16(6),4)}-${t(s.getUint16(8),4)}-`+t(s.getUint32(10),8)+t(s.getUint16(14),4)),window.localStorage.setItem("rtbhouse-esp",e)),signal_decrypted={domain:encodeURIComponent(window.location.href)},e&&(signal_decrypted["rtbhouse-esp"]=e),n&&(signal_decrypted.EID=n),"browsingTopics"in document&&document.featurePolicy.allowsFeature("browsing-topics")&&(t=await document.browsingTopics(),signal_decrypted.topics=JSON.stringify(t)),o&&(signal_decrypted.segments=o),document.referrer&&(signal_decrypted.referrer=encodeURIComponent(document.referrer));s=signal_decrypted;var s,o=await(await(await fetch("https://esp.rtbhouse.com/encrypt",{method:"POST",body:JSON.stringify({publisher_id:"rtbhouse",signal:s}),headers:{"Content-Type":"text/plain"}})).json()).message;return Promise.resolve(o)};new class{constructor(e){Object.assign(this,e)}send_signal(){window.googletag.secureSignalProviders||(window.googletag.secureSignalProviders=[]),null!=googletag.secureSignalProviders&&googletag.secureSignalProviders.push({id:"rtbhouse",collectorFunction:e})}}({send_cookie:!0}).send_signal()}();