!function(t){function e(i){if(n[i])return n[i].exports;var o=n[i]={i:i,l:!1,exports:{}};return t[i].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var n={};e.m=t,e.c=n,e.d=function(t,n,i){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:i})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=0)}([function(t,e,n){t.exports=n(1)},function(module,exports){!function(t){function e(i){if(n[i])return n[i].exports;var o=n[i]={i:i,l:!1,exports:{}};return t[i].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var n={};e.m=t,e.c=n,e.d=function(t,n,i){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:i})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=8)}([function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Context=void 0;var i=function(){function t(){}return Object.defineProperty(t,"windowType",{get:function(){return this._window||(this._window=window.top),this._window},enumerable:!1,configurable:!0}),Object.defineProperty(t,"window",{get:function(){return this.windowType},enumerable:!1,configurable:!0}),Object.defineProperty(t,"topMostWindow",{get:function(){return this.getTopWindow()||this.windowType},enumerable:!1,configurable:!0}),Object.defineProperty(t,"document",{get:function(){return this._document||(this._document=this.windowType.document),this._document},enumerable:!1,configurable:!0}),t.isIframe=function(){return this.windowType!==this.getTopWindow()},t.getTopWindow=function(){try{return window.top.document,window.top}catch(t){return null}},t}();e.Context=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),o=function(){function t(){}return t.getTagData=function(){var t;try{t=document.currentScript,(null===t||void 0===t?void 0:t.getAttribute("data-siteKey"))&&(null===t||void 0===t?void 0:t.getAttribute("data-pubKey"))||(t=document.getElementById("browsi-tag"))}catch(e){t=document.getElementById("browsi-tag")}if(!t)throw new Error("no tag");var e=this.getSessionStorage("__browsienv")||t.getAttribute("data-browsidomain")||".browsiprod.com",n="";try{var i=t.getAttribute("src")||"";n=new URL(i).host}catch(t){n="NA"}return{tag:t,sk:t.getAttribute("data-siteKey")||"error",pk:t.getAttribute("data-pubKey")||"error",ds:e,y:"yield-manager"+e,es:"//events"+e+"/events/",fp:t.hasAttribute("prebidbpt"),mt:t.hasAttribute("master"),pd:t.prebidData,so:n}},t.getSessionStorage=function(t){var e;try{e=sessionStorage.getItem(t)}catch(t){}return e||""},t.setSessionStorage=function(t,e){sessionStorage[t]="string"==typeof e?e:JSON.stringify(e)},t.getBIAgentDebugConfig=function(){var t=this.getSessionStorage("__brwsibad"),e={};return t&&(e=JSON.parse(t)),e},t.getD=function(){var t=this.getSessionStorage("__brwsidbg"),e={};return t&&(e=JSON.parse(t)),e},t.isD=function(){var e=t.getD();return!!(null===e||void 0===e?void 0:e.hasOwnProperty("debug"))},t.getLiveConfig=function(){var t=this.getSessionStorage("__brwsilc"),e={};return t&&(e=JSON.parse(t)),e},t.isLiveConfigExtensionEnabled=function(){return!!i.Context.window.__brw_lc},t.isTestMode=function(){var e=t.getD();return!(!e||!e.hasOwnProperty("test"))},t.isObject=function(t){return t&&"object"==typeof t&&!Array.isArray(t)},t.mergeDeep=function(t,e){var n,i;if(this.isObject(t)&&this.isObject(e))for(var o in e)e.hasOwnProperty(o)&&this.isObject(e[o])?(t[o]||Object.assign(t,(n={},n[o]={},n)),this.mergeDeep(t[o],e[o])):Object.assign(t,(i={},i[o]=e[o],i));return t},t.generateToken=function(){var t="abcdefghijklmnopqrstuvwxyz";t+=t.toUpperCase()+"_!@#$";for(var e="",n=0;n<20;n++)e+=t.charAt(Math.floor(Math.random()*t.length));return e},t.getCookie=function(t){var e=i.Context.document.cookie.split(/\s*;\s*/).map(function(t){var e=t.split(/\s*=\s*/);if(2===(null===e||void 0===e?void 0:e.length))return{key:e[0],value:e[1]}}).find(function(e){return(null===e||void 0===e?void 0:e.key)===t});return e?e.value:""},t.setCookie=function(t,e,n,o){void 0===e&&(e=""),void 0===n&&(n=0),void 0===o&&(o="d");var r=6e4;"d"===o&&(r*=1440);var s=new Date(+new Date+n*r);i.Context.document.cookie=t+"="+e+"; expires="+s.toUTCString()+"; path=/"},t.setLocalStorage=function(t,e){try{localStorage.setItem(t,e)}catch(t){}},t.getLocalStorage=function(t){try{return i.Context.windowType.localStorage.getItem(t)||""}catch(t){}return""},t.toUrlParams=function(t){return Object.keys(t).map(function(e){return e+"="+("object"==typeof t[e]?encodeURIComponent(JSON.stringify(t[e])):encodeURIComponent(t[e]))}).join("&")},t.getHead=function(t){return t.head||t.getElementsByTagName("head")[0]},t.getResolution=function(){return i.Context.windowType.screen.width+"x"+i.Context.windowType.screen.height},t.isPositionContained=function(t,e){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY)},t.isVisible=function(t){return this.isCssVisible(t)&&this.hasValidSize(t)},t.isCssVisible=function(t){var e=i.Context.windowType.getComputedStyle(t);return!!e&&("visible"===e.getPropertyValue("visibility")&&"none"!==e.getPropertyValue("display")&&"0"!==e.getPropertyValue("opacity"))},t.hasValidSize=function(t){var e=t.getBoundingClientRect();return e.height>0&&e.width>0},t.getUrlParams=function(){var t=i.Context.document.location.search.substring(1);if(0===t.length)return{};var e={};return t.split("&").forEach(function(t){var n=t.split("=");2===n.length&&n[0]&&(e[n[0]]=n[1])}),e},t.xhrPromise=function(t){return new Promise(function(e,n){var i=new XMLHttpRequest;i.open("GET",t,!0),i.onreadystatechange=function(){i.readyState==(i.DONE||4)&&(200===i.status||204===i.status?e(i):n(i.status))},i.send()})},t.isPromise=function(t){return t instanceof Promise},t.dispatchDOMEvent=function(t,e,n){var i=new CustomEvent(t,{detail:e});n.dispatchEvent(i)},t.generateUUIDIfSupported=function(){return window.crypto&&window.crypto.randomUUID?window.crypto.randomUUID()||"":""},t.getStoredPvid=function(){try{return i.Context.window.browsitag.pvid}catch(t){return}},t.setStoredPvid=function(t){try{i.Context.window.browsitag.pvid=t}catch(t){}},t.getStoredBpvid=function(){try{return i.Context.window.browsitag.bpvid}catch(t){}},t.setStoredBpvid=function(t){try{i.Context.window.browsitag.bpvid=t}catch(t){}},t.setIsBptLoaded=function(t){try{i.Context.window.browsitag.ibl=t}catch(t){}},t.getIsBptLoaded=function(){try{return!!i.Context.window.browsitag.ibl}catch(t){}},t.onReInject=function(){t.setStoredPvid(""),t.setStoredBpvid(""),t.setIsBptLoaded(!1),i.Context.window._middyo=null,i.Context.window.browsitag.st=null,i.Context.window.browsitag.__ori=null,i.Context.window.browsitag.mt.ex=null},t.getMetaDataLanguage=function(){var t;return(null===(t=i.Context.document.querySelector('meta[property="og:locale"]'))||void 0===t?void 0:t.content)||i.Context.document.documentElement.lang},t}();e.default=o},function(t,e,n){"use strict";var i=this&&this.__spreadArray||function(t,e){for(var n=0,i=e.length,o=t.length;n>>0,e=[t[n],t[i]],t[i]=e[0],t[n]=e[1];return t}function r(){return!!C.Context.window.browsitag.vl_loaded}function s(){C.Context.window.browsitag.vl_loaded=!0}function a(t){var e=-1!==(t.dt.b||"").search(/Internet Explorer/i);return t.ly.inf&&!t.r.b&&!t.ly.am&&!e&&!r()}function u(){return m(this,void 0,void 0,function(){var t,e,n;return _(this,function(i){switch(i.label){case 0:return[4,E.default.xhrPromise("https://static.avantisvideo.com/data/abc.txt")];case 1:if(t=i.sent(),!(e=200===t.status?t.responseText:null))throw n="Failed retrieving ab-config.txt (video script group config)",D.error(n),new Error(n);return[2,JSON.parse(atob(e.slice(3)))]}})})}function d(t){var e=o(t.masterDistribution),n=e.find(function(){var t=Math.floor(100*Math.random()+1);return function(e){return(t-=e.weight)<=0}}());if(!n){var i="Failed getting random script group name";throw D.error(i),new Error(i)}return n.groupId}function l(t){var e=E.default.getSessionStorage("avnts_group");if(e in t.groups)return e}function c(t,e){var n=e.ly.inf.sgn in t.groups?e.ly.inf.sgn:null;if(n)return n;if(e.ly.inf.sgn){var i="Invalid video custom script group name";throw D.error(i),new Error(i)}var o=l(t);if(o)return o;var r=d(t);return E.default.setSessionStorage("avnts_group",r),r}function p(t,e){return t+="?id="+e.publisherId+"&tagId="+e.tagId+"&partnerId="+e.supplyConfigId+"&callback=browsitag.avCallback"}function g(t,e,n){return{pubKey:t.i.pk,siteKey:t.i.sk,pvid:t.i.pv,browser:(t.dt.b||"").toLowerCase(),device:(t.dt.p||"").toLowerCase(),os:t.dt.os||"",osVersion:t.dt.osv||"",sid:t.i.s,country:t.r.cc.toUpperCase(),city:t.r.ct||"",eu:"eu"===t.r.cl,uid:t.i.u,publisherId:t.ly.inf.id,tagId:t.ly.inf.tid,url:e.url+C.Context.document.location.search,referrer:C.Context.document.referrer||"",supplyConfigId:t.i.sc,testGroup:n,newUser:b}}function f(t){var e=t.loaderParams,n=t.staticData,i=t.startTime;return m(this,void 0,void 0,function(){var t,o,r,d,l;return _(this,function(f){switch(f.label){case 0:return f.trys.push([0,2,,3]),a(e)?(s(),D.info("Injecting video script"),h(e.ly.inf.id,i),[4,u()]):(D.info("Avoiding video engine injection"),[2]);case 1:return t=f.sent(),o=c(t,e),r=g(e,n,o),d=p(t.groups[o],r),y(r,d,n,i),v(window,e),[3,3];case 2:return l=f.sent(),S.Events.get().sendError(l,n,i,l.message),[3,3];case 3:return[2]}})})}function v(t,e){C.Context.window.browsitag=Object.assign(C.Context.window.browsitag,{av:{scid:e.i.sc,pvid:e.i.pv,country:e.r.cc,device:e.dt.p,os:e.dt.os,browser:e.dt.b}})}function h(t,e){C.Context.window.browsitag.avCallback=function(n){"playerLoaded"===n?S.Events.get().sendVideoPlayerLoaded(e):"impression"===n&&E.default.dispatchDOMEvent("video_ad_impression",{inframeId:t},window)}}function y(t,e,n,i){var o=C.Context.document.createElement("script");o.async=!0,o.id="browsiJS",o.loaderParams=w({},t),o.src=e,o.onerror=function(t){S.Events.get().sendVideoOnLoad(i,!1),S.Events.get().sendError(t,n,i,"onerror "+e)},o.onload=function(){S.Events.get().sendVideoOnLoad(i,!0)};try{E.default.getHead(C.Context.document).appendChild(o)}catch(t){S.Events.get().sendError(t,n,i,"Failed injecting video script")}}var w=this&&this.__assign||function(){return w=Object.assign||function(t){for(var e,n=1,i=arguments.length;n0&&s[s.length-1])&&(6===n[0]||2===n[0])){u=0;continue}if(3===n[0]&&(!s||n[1]>s[0]&&n[1]0&&s[s.length-1])&&(6===n[0]||2===n[0])){u=0;continue}if(3===n[0]&&(!s||n[1]>s[0]&&n[1]0?parseFloat(((t*e+n*i)/o).toFixed(2)):0},mainApp.prototype.getAvgOof=function(){var t=JSON.parse(Utils_1.default.getLocalStorage("__bus")||"{}");if(t.aof){var e=0,n=0,i=t.aof.sd;for(var o in i)i.hasOwnProperty(o)&&(i[o].arb?n++:i[o].ar&&e++);var r=n/(n+e)||0,s=e+n;return this.getWeightedAvg(t.aof.t_a||0,t.aof.t_i||0,r||0,s)}},mainApp.prototype.getQueryParams=function(){var t=[],e=/^(?:\?)(.*)/.exec(Context_1.Context.window.location.search);if(2===(null===e||void 0===e?void 0:e.length)){var n=e[1].split(/&/);t=n.splice(0,Math.min(n.length,10))}return t},mainApp.prototype.buildGetSupplyUrl=function(){return"//"+this.tagData.y+"/supply/v5?"+Utils_1.default.toUrlParams(this.getSupplyParams())},mainApp.prototype.getSupplyParams=function(){var t=Context_1.Context.window.screen,e={sk:this.staticData.sk,pk:this.staticData.pk,url:this.staticData.url,bid:this.staticData.bpvid,at:Context_1.Context.document.title||null,sw:(null===t||void 0===t?void 0:t.width)||-1,sh:(null===t||void 0===t?void 0:t.height)||-1},n=this.getQueryParams();n.length&&(e.qp=n.join("&"));var i=JSON.parse(Utils_1.default.getLocalStorage("__bus")||"{}");if(Object.keys(i).length>0){var o={bi:i.bi,bv:i.bv,pi:i.pi,pv:i.pv,b_ativ:i.tiv?this.getWeightedAvg(i.tiv.b_ativ||0,i.tiv.b_ai||0,i.tiv.b_pv_ativ||0,i.tiv.b_pv_ai||0):void 0,uva:i.uv?this.getWeightedAvg(i.uv.t_a||0,i.uv.t_i||0,i.uv.pv_a||0,i.uv.pv_i||0):void 0,uvsp:i.uv?this.getWeightedAvg(i.uv.t_sp||0,i.uv.t_si||0,i.uv.pv_sp||0,i.uv.pv_si||0):void 0,oofu:this.getAvgOof()};Object.keys(o).forEach(function(t){return void 0===o[t]?delete o[t]:""}),e.us=o}this.staticData.sid&&(e.sid=this.staticData.sid),Context_1.Context.document.referrer&&(e.r=Context_1.Context.document.referrer),this.staticData.uid&&(e.uid=this.staticData.uid),this.tagData.fp&&(this.logger.info("bootstrap was injected by prebid"),e.rp=!1),Utils_1.default.isD()&&Output_1.Output.setKeyValues({supplyParams:e});var r=Utils_1.default.getStoredPvid();r&&(e.pvid=r);var s=Utils_1.default.getMetaDataLanguage();return s&&(e.l=s),e},mainApp.prototype.buildStaticData=function(t){var e=Utils_1.default.getStoredBpvid(),n=Utils_1.default.getStoredPvid();e||(e=Utils_1.default.generateToken(),Utils_1.default.setStoredBpvid(e)),n||(n=Utils_1.default.generateUUIDIfSupported(),Utils_1.default.setStoredPvid(n));var i=Context_1.Context.document.location,o=Utils_1.default.getLocalStorage("__browsiUID")||Utils_1.default.getCookie("__browsiUID");return VideoLoaderService_1.setIsNewUserVideoLoaderParam(!o),{to:+new Date-this.startTime,sk:t||this.tagData.sk,pk:this.tagData.pk,pvid:n||"",bpvid:e,url:i.protocol+"//"+i.host+i.pathname,sid:Utils_1.default.getCookie("__browsiSessionID"),uid:o,mv:"3.5.290"}},mainApp.prototype.listenToErrors=function(){var t=this;this.errorListener=function(e){var n=(null===e||void 0===e?void 0:e.target)&&e.target.src&&"SCRIPT"===e.target.tagName?e.target.src:"";(/.*browsiprod.*/.test(e.filename)||/.*browsiprod.*/.test(n))&&Events_1.Events.get().sendError(e,t.staticData,t.startTime,n+","+e.filename)},Context_1.Context.windowType.addEventListener("error",this.errorListener,!0),this.logger.info("listening to errors")},mainApp.prototype.getUserAgent=function(){var t;return(null===(t=Context_1.Context.window.navigator)||void 0===t?void 0:t.userAgent)||""},mainApp.prototype.setTiming=function(t){this.timingData[t]?this.timingData[t]=Number((Date.now()-this.timingData[t]).toFixed(2)):this.timingData[t]=Date.now()},mainApp.prototype.extractRTDModuleData=function(){var t,e,n=Object.entries((null===(t=this.tagData.pd)||void 0===t?void 0:t.p)||{}).reduce(function(t,e){var n=e[0],i=e[1];return t[n]=__assign({},i.ps),t},{});return{kn:(null===(e=this.tagData.pd)||void 0===e?void 0:e.kn)||"",p:n}},mainApp}();exports.mainApp=mainApp,(new mainApp).run()},function(t,e){Array.prototype.filter||(Array.prototype.filter=function(t){"use strict";if(void 0===this||null===this)throw new TypeError;var e=Object(this),n=e.length>>>0;if("function"!=typeof t)throw new TypeError;for(var i=[],o=arguments.length>=2?arguments[1]:void 0,r=0;r>>0;if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var i=arguments[1],o=0;o>>0;if(0===i)return!1;for(var o=0|e,r=Math.max(o>=0?o:i-Math.abs(o),0);r0)return void n();t.userEngagementEventsNames.forEach(function(e){t.listenerEvents[e]=n,document.addEventListener(e,n,{once:!0})})})},t.prototype.clearAllDelays=function(){var t=this;clearTimeout(this.engineDelayTimeoutId),Object.keys(this.listenerEvents).forEach(function(e){window.removeEventListener(e,t.listenerEvents[e])})},t}();e.EngineDelayService=r},function(t,e,n){"use strict";var i=this&&this.__awaiter||function(t,e,n,i){function o(t){return t instanceof n?t:new n(function(e){e(t)})}return new(n||(n=Promise))(function(n,r){function s(t){try{u(i.next(t))}catch(t){r(t)}}function a(t){try{u(i.throw(t))}catch(t){r(t)}}function u(t){t.done?n(t.value):o(t.value).then(s,a)}u((i=i.apply(t,e||[])).next())})},o=this&&this.__generator||function(t,e){function n(t){return function(e){return i([t,e])}}function i(n){if(o)throw new TypeError("Generator is already executing.");for(;u;)try{if(o=1,r&&(s=2&n[0]?r.return:n[0]?r.throw||((s=r.return)&&s.call(r),0):r.next)&&!(s=s.call(r,n[1])).done)return s;switch(r=0,s&&(n=[2&n[0],s.value]),n[0]){case 0:case 1:s=n;break;case 4:return u.label++,{value:n[1],done:!1};case 5:u.label++,r=n[1],n=[0];continue;case 7:n=u.ops.pop(),u.trys.pop();continue;default:if(s=u.trys,!(s=s.length>0&&s[s.length-1])&&(6===n[0]||2===n[0])){u=0;continue}if(3===n[0]&&(!s||n[1]>s[0]&&n[1]