text: (window.webpackJsonpreact_ads=window.webpackJsonpreact_ads||[]).push([[258],{245:function(e,t,n){"use strict";n.r(t),n.d(t,"spec",(function(){return d})),n.d(t,"getStorageData",(function(){return s})),n.d(t,"setStorageData",(function(){return c})),n.d(t,"acceptPostMessage",(function(){return u}));var r=n(277),i=n(278),d={code:"trion",isBidRequestValid:function(e){return!!(e&&e.params&&e.params.pubId&&e.params.sectionId)},buildRequests:function(e,t){for(var n=[],r=0;r<e.length;r++){var i=e[r],d=p(i,t);n.push({method:"GET",url:"https://in-appadvertising.com/api/bidRequest",bidRequest:i,data:d})}return n},interpretResponse:function(e,t){var n={},r=[],i=t.bidRequest,d=e?e.body:{};if(d&&d.bidId&&i){var o=d.result;if(o&&o.cpm&&o.placeBid&&o.ad){var a=parseInt(o.cpm,10)/100;n.requestId=i.bidId,n.cpm=a,n.ad=o.ad,n.width=o.width,n.height=o.height,n.ttl=o.ttl,n.creativeId=o.creativeId,n.currency=o.currency,n.netRevenue=o.netRevenue,r.push(n)}}return r},getUserSyncs:function(e,t,n,r){if(e.iframeEnabled)return function(){try{window.addEventListener&&window.addEventListener("message",u)}catch(e){}}(),[{type:"iframe",url:o(n,r)}]}};function o(e,t){var n=(s("_trion_lps")||":").split(":")||[],r=n[0]||-1,i=n[1]||-1,d=a(),o="";return e&&(e.consentString&&(o+="&gc="+encodeURIComponent(e.consentString)),o+="&g="+(e.gdprApplies?1:0)),t&&(o="&up="+encodeURIComponent(t)),"https://in-appadvertising.com/api/userSync.html"+"?p=".concat(r,"&s=").concat(i).concat(o,"&u=").concat(d)}function a(){var e="";try{if(window.top==window)e=window.location.href;else try{e=window.top.location.href}catch(t){e=document.referrer}}catch(e){}return e}function p(e,t){var n=r.getBidIdParameter("pubId",e.params),i=r.getBidIdParameter("sectionId",e.params),d=a(),o=function(e){return e.mediaTypes&&e.mediaTypes.banner&&e.mediaTypes.banner.sizes?e.mediaTypes.banner.sizes:e.sizes}(e),p=r.parseSizesInput(o).join(","),u=navigator&&navigator.webdriver?"1":"0",g=document.hidden?"1":"0",l=encodeURIComponent(document.visibilityState),y=window.TR_INT_T&&-1!=window.TR_INT_T?window.TR_INT_T:null;y||(y=s("_trion_int_t")),y&&c("_trion_int_t",y),c("_trion_lps",n+":"+i);var w="";if(w=r.tryAppendQueryString(w,"bidId",e.bidId),w=r.tryAppendQueryString(w,"pubId",n),w=r.tryAppendQueryString(w,"sectionId",i),w=r.tryAppendQueryString(w,"vers","3.11.0"),d&&(w+="url="+d+"&"),p&&(w+="sizes="+p+"&"),y&&(w=r.tryAppendQueryString(w,"int_t",encodeURIComponent(y))),w=r.tryAppendQueryString(w,"tr_wd",u),w=r.tryAppendQueryString(w,"tr_hd",g),w=r.tryAppendQueryString(w,"tr_vs",l),t&&t.gdprConsent){var f=t.gdprConsent;f&&(f.consentString&&(w=r.tryAppendQueryString(w,"gdprc",encodeURIComponent(f.consentString))),w=r.tryAppendQueryString(w,"gdpr",f.gdprApplies?1:0))}return t&&t.uspConsent&&(w=r.tryAppendQueryString(w,"usp",encodeURIComponent(t.uspConsent))),w.lastIndexOf("&")===w.length-1&&(w=w.substring(0,w.length-1)),w}function s(e){var t=null;try{window.localStorage&&(t=window.localStorage.getItem(e))}catch(e){}return t}function c(e,t){try{window.localStorage&&window.localStorage.setItem(e,t)}catch(e){}}function u(e){var t=e.data||"";if(t.indexOf&&t.split&&0===t.indexOf("_trion_userId")){var n=t.split("_trion_userId=")[1];n&&c("_trion_int_t",n)}}Object(i.registerBidder)(d)}}]);