(()=>{var e={660:function(e){var t;t=function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=2)}([function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));class r{log(){console.log(...arguments)}warn(){console.warn(...arguments)}error(){console.error(...arguments)}info(){console.info(...arguments)}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return o})),n.d(t,"d",(function(){return p})),n.d(t,"e",(function(){return f})),n.d(t,"f",(function(){return s})),n.d(t,"g",(function(){return a})),n.d(t,"h",(function(){return l})),n.d(t,"i",(function(){return c})),n.d(t,"j",(function(){return u})),n.d(t,"k",(function(){return d}));const r=(e,t,n)=>{e.removeEventListener?e.removeEventListener(t,n):e.detachEvent&&e.detachEvent("on"+t,n)},i=(e,t,n)=>{e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent&&e.attachEvent("on"+t,n)},o=e=>String.prototype.trim?e.trim():e.replace(/^\s+|\s+$/gm,""),s=(e,t)=>{if(e.createRange){var n=e.createRange();if(n.selectNodeContents(t),n.getBoundingClientRect){var r=n.getBoundingClientRect();if(r)return{top:r.top,left:r.left,width:r.right-r.left,height:r.bottom-r.top}}}return!1},a=(e,t)=>{var n,r=0,i=0,o=function(e){r+=e.offsetLeft,i+=e.offsetTop,e.offsetParent&&o(e.offsetParent)};if("#text"==t.nodeName){if(n=s(e,t))return n}else if(!t.offsetWidth&&!t.offsetHeight&&t.getBoundingClientRect){var a="none"===t.style.display;if(a&&(t.style.display=""),n=t.getBoundingClientRect(),a&&(t.style.display="none"),n)return{top:n.top,left:n.left,width:n.right-n.left,height:n.bottom-n.top}}return o(t),{top:i,left:r,width:t.offsetWidth,height:t.offsetHeight}},c=(e,t,n)=>{var r,i,o,s=[],a=[],c="pointer-events";if("function"==typeof e.elementsFromPoint)return e.elementsFromPoint(t,n);if("function"==typeof e.msElementsFromPoint)return e.msElementsFromPoint(t,n);for(;(r=e.elementFromPoint(t,n))&&-1===s.indexOf(r)&&null!=r;)s.push(r),a.push({value:r.style.getPropertyValue(c),priority:r.style.getPropertyPriority(c)}),r.style.setProperty(c,"none","important");for(i=a.length-1;i>=0;i--)o=a[i],s[i].style.setProperty(c,o.value?o.value:"",o.priority);return s},u=e=>{var t=e.defaultView||e.parentWindow;return"pageYOffset"in t?t.pageYOffset:e.documentElement.scrollTop||e.body.scrollTop},l=(e,t)=>{var n;if(0==(t=o(t)).indexOf("."))return e.getElementsByClassName(t.substring(1));if(0==t.indexOf("#")){if(n=e.getElementById(t.substring(1)))return[n]}else if(n=e.getElementById(t))return[n];return!1},d=(e,t)=>{var n=function(e,t,n){e[t]=e[t]||n};"string"==typeof e&&(e={url:e});var r=e.headers||{},i=e.body,o=e.method||(i?"POST":"GET"),s=e.withCredentials||!1,a=function(){if(window.XMLHttpRequest)return new window.XMLHttpRequest;try{return new window.ActiveXObject("MSXML2.XMLHTTP.3.0")}catch(e){}throw new Error("no xmlhttp request able to be created")}();for(var c in a.withCredentials=s,a.onreadystatechange=function(){4==a.readyState&&t(a.status,a.responseText,a)},i&&(n(r,"X-Requested-With","XMLHttpRequest"),n(r,"Content-Type","application/x-www-form-urlencoded")),a.open(o,e.url,!0),r)a.setRequestHeader(c,r[c]);a.send(i)},h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",p=window.atob?window.atob:function(e){var t,n,r,i={},o=0,s=0,a="",c=String.fromCharCode,u=e.length;for(t=0;t<64;t++)i[h.charAt(t)]=t;for(n=0;n=8;)((r=o>>>(s-=8)&255)||n>2,o=(3&t)<<4|(n=e.charCodeAt(u++))>>4,s=(15&n)<<2|(r=e.charCodeAt(u++))>>6,a=63&r,isNaN(n)?s=a=64:isNaN(r)&&(a=64),c=c+h.charAt(i)+h.charAt(o)+h.charAt(s)+h.charAt(a);return c}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),i=n(1);n.d(t,"Console",(function(){return r.a})),n.d(t,"delEvent",(function(){return i.a})),n.d(t,"addEvent",(function(){return i.b})),n.d(t,"strTrim",(function(){return i.c})),n.d(t,"b64decode",(function(){return i.d})),n.d(t,"b64encode",(function(){return i.e})),n.d(t,"getTextNodeDim",(function(){return i.f})),n.d(t,"getClipRect",(function(){return i.g})),n.d(t,"getElements",(function(){return i.h})),n.d(t,"elementsFromPoint",(function(){return i.i})),n.d(t,"getDocumentScrollTop",(function(){return i.j})),n.d(t,"miniajax",(function(){return i.k}))}])},e.exports=t()},615:function(e){var t;t=function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=29)}([function(e,t,n){"use strict";var r=n(2);const i={childByName:function(e,t){const n=e.childNodes;for(const e in n){const r=n[e];if(r.nodeName===t)return r}},childrenByName:function(e,t){const n=[],r=e.childNodes;for(const e in r){const i=r[e];i.nodeName===t&&n.push(i)}return n},resolveVastAdTagURI:function(e,t){if(!t)return e;if(0===e.indexOf("//")){const{protocol:t}=location;return`${t}${e}`}return-1===e.indexOf("://")?`${t.slice(0,t.lastIndexOf("/"))}/${e}`:e},parseBoolean:function(e){return-1!==["true","TRUE","1"].indexOf(e)},parseNodeText:function(e){return e&&(e.textContent||e.text||"").trim()},copyNodeAttribute:function(e,t,n){const r=t.getAttribute(e);r&&n.setAttribute(e,r)},parseDuration:function(e){if(null==e)return-1;if(r.a.isNumeric(e))return parseInt(e);const t=e.split(":");if(3!==t.length)return-1;const n=t[2].split(".");let i=parseInt(n[0]);2===n.length&&(i+=parseFloat(`0.${n[1]}`));const o=parseInt(60*t[1]),s=parseInt(60*t[0]*60);return isNaN(s)||isNaN(o)||isNaN(i)||o>3600||i>60?-1:s+o+i},splitVAST:function(e){const t=[];let n=null;return e.forEach(((r,i)=>{if(r.sequence&&(r.sequence=parseInt(r.sequence,10)),r.sequence>1){const t=e[i-1];if(t&&t.sequence===r.sequence-1)return void(n&&n.push(r));delete r.sequence}n=[r],t.push(n)})),t},mergeWrapperAdData:function(e,t){e.errorURLTemplates=t.errorURLTemplates.concat(e.errorURLTemplates),e.impressionURLTemplates=t.impressionURLTemplates.concat(e.impressionURLTemplates),e.extensions=t.extensions.concat(e.extensions),e.creatives.forEach((e=>{if(t.trackingEvents&&t.trackingEvents[e.type])for(const n in t.trackingEvents[e.type]){const r=t.trackingEvents[e.type][n];Array.isArray(e.trackingEvents[n])||(e.trackingEvents[n]=[]),e.trackingEvents[n]=e.trackingEvents[n].concat(r)}})),t.videoClickTrackingURLTemplates&&t.videoClickTrackingURLTemplates.length&&e.creatives.forEach((e=>{"linear"===e.type&&(e.videoClickTrackingURLTemplates=e.videoClickTrackingURLTemplates.concat(t.videoClickTrackingURLTemplates))})),t.videoCustomClickURLTemplates&&t.videoCustomClickURLTemplates.length&&e.creatives.forEach((e=>{"linear"===e.type&&(e.videoCustomClickURLTemplates=e.videoCustomClickURLTemplates.concat(t.videoCustomClickURLTemplates))})),t.videoClickThroughURLTemplate&&e.creatives.forEach((e=>{"linear"!==e.type||null!==e.videoClickThroughURLTemplate&&void 0!==e.videoClickThroughURLTemplate||(e.videoClickThroughURLTemplate=t.videoClickThroughURLTemplate)}))}};t.a=i},function(e,t,n){"use strict";t.a=class{constructor(e={}){this.id=e.id||null,this.adId=e.adId||null,this.sequence=e.sequence||null,this.apiFramework=e.apiFramework||null,this.trackingEvents={}}}},function(e,t,n){"use strict";function r(e,t={},n={}){const r=[];t.ASSETURI&&(t.ASSETURI=i(t.ASSETURI)),t.CONTENTPLAYHEAD&&(t.CONTENTPLAYHEAD=i(t.CONTENTPLAYHEAD)),!t.ERRORCODE||n.isCustomCode||/^[0-9]{3}$/.test(t.ERRORCODE)||(t.ERRORCODE=900),t.CACHEBUSTING=o(Math.round(1e8*Math.random()).toString()),t.TIMESTAMP=i((new Date).toISOString()),t.RANDOM=t.random=t.CACHEBUSTING;for(const n in e){let i=e[n];if("string"==typeof i){for(const e in t){const n=t[e],r=`[${e}]`,o=`%%${e}%%`;i=i.replace(r,n),i=i.replace(o,n)}r.push(i)}}return r}function i(e){return encodeURIComponent(e).replace(/[!'()*]/g,(e=>`%${e.charCodeAt(0).toString(16)}`))}function o(e){return e.length<8?s(0,8-e.length,!1).map((()=>"0")).join("")+e:e}function s(e,t,n){const r=[],i=eo;i?t++:t--)r.push(t);return r}const a={track:function(e,t,n){r(e,t,n).forEach((e=>{"undefined"!=typeof window&&null!==window&&((new Image).src=e)}))},resolveURLTemplates:r,encodeURIComponentRFC3986:i,leftpad:o,range:s,isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},flatten:function e(t){return t.reduce(((t,n)=>t.concat(Array.isArray(n)?e(n):n)),[])}};t.a=a},function(e,t,n){"use strict";var r,i="object"==typeof Reflect?Reflect:null,o=i&&"function"==typeof i.apply?i.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};r=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var s=Number.isNaN||function(e){return e!=e};function a(){a.init.call(this)}e.exports=a,e.exports.once=function(e,t){return new Promise((function(n,r){function i(n){e.removeListener(t,o),r(n)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",i),n([].slice.call(arguments))}v(e,t,o,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&v(e,"error",t,n)}(e,i,{once:!0})}))},a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var c=10;function u(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function l(e){return void 0===e._maxListeners?a.defaultMaxListeners:e._maxListeners}function d(e,t,n,r){var i,o,s,a;if(u(n),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),s=o[t]),void 0===s)s=o[t]=n,++e._eventsCount;else if("function"==typeof s?s=o[t]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),(i=l(e))>0&&s.length>i&&!s.warned){s.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=s.length,a=c,console&&console.warn&&console.warn(a)}return e}function h(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=h.bind(r);return i.listener=n,r.wrapFn=i,i}function f(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var c=i[e];if(void 0===c)return!1;if("function"==typeof c)o(c,this,t);else{var u=c.length,l=g(c,u);for(n=0;n=0;o--)if(n[o]===t||n[o].listener===t){s=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1=0;r--)this.removeListener(e,t[r]);return this},a.prototype.listeners=function(e){return f(this,e,!0)},a.prototype.rawListeners=function(e){return f(this,e,!1)},a.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):m.call(e,t)},a.prototype.listenerCount=m,a.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(e,t,n){"use strict";t.a=class{constructor(){this.id=null,this.width=0,this.height=0,this.type=null,this.staticResource=null,this.htmlResource=null,this.iframeResource=null,this.altText=null,this.companionClickThroughURLTemplate=null,this.companionClickTrackingURLTemplates=[],this.trackingEvents={}}}},function(e,t,n){"use strict";var r=n(1);class i extends r.a{constructor(e={}){super(e),this.type="linear",this.duration=0,this.skipDelay=null,this.mediaFiles=[],this.videoClickThroughURLTemplate=null,this.videoClickTrackingURLTemplates=[],this.videoCustomClickURLTemplates=[],this.adParameters=null,this.icons=[]}}t.a=i},function(e,t,n){"use strict";t.a=class{constructor(){this.id=null,this.width=0,this.height=0,this.expandedWidth=0,this.expandedHeight=0,this.scalable=!0,this.maintainAspectRatio=!0,this.minSuggestedDuration=0,this.apiFramework="static",this.type=null,this.staticResource=null,this.htmlResource=null,this.iframeResource=null,this.nonlinearClickThroughURLTemplate=null,this.nonlinearClickTrackingURLTemplates=[],this.adParameters=null}}},function(e,t,n){"use strict";var r=n(17),i=n(3),o=(n.n(i),n(0)),s=n(21),a=n(2),c=n(27);const u={ERRORCODE:900,extensions:[]};class l extends i.EventEmitter{constructor(){super(),this.remainingAds=[],this.parentURLs=[],this.errorURLTemplates=[],this.rootErrorURLTemplates=[],this.maxWrapperDepth=null,this.URLTemplateFilters=[],this.fetchingOptions={}}addURLTemplateFilter(e){"function"==typeof e&&this.URLTemplateFilters.push(e)}removeURLTemplateFilter(){this.URLTemplateFilters.pop()}countURLTemplateFilters(){return this.URLTemplateFilters.length}clearURLTemplateFilters(){this.URLTemplateFilters=[]}trackVastError(e,t,...n){this.emit("VAST-error",Object.assign({},u,t,...n)),a.a.track(e,t)}getErrorURLTemplates(){return this.rootErrorURLTemplates.concat(this.errorURLTemplates)}fetchVAST(e,t,n){return new Promise(((r,i)=>{this.URLTemplateFilters.forEach((t=>{e=t(e)})),this.parentURLs.push(e),this.emit("VAST-resolving",{url:e,wrapperDepth:t,originalUrl:n}),this.urlHandler.get(e,this.fetchingOptions,((t,n)=>{this.emit("VAST-resolved",{url:e,error:t}),t?i(t):r(n)}))}))}initParsingStatus(e={}){this.rootURL="",this.remainingAds=[],this.parentURLs=[],this.errorURLTemplates=[],this.rootErrorURLTemplates=[],this.maxWrapperDepth=e.wrapperLimit||10,this.fetchingOptions={timeout:e.timeout,withCredentials:e.withCredentials},this.urlHandler=e.urlHandler||e.urlhandler||s.a,this.vastVersion=null}getRemainingAds(e){if(0===this.remainingAds.length)return Promise.reject(new Error("No more ads are available for the given VAST"));const t=e?a.a.flatten(this.remainingAds):this.remainingAds.shift();return this.errorURLTemplates=[],this.parentURLs=[],this.resolveAds(t,{wrapperDepth:0,originalUrl:this.rootURL}).then((e=>this.buildVASTResponse(e)))}getAndParseVAST(e,t={}){return this.initParsingStatus(t),this.rootURL=e,this.fetchVAST(e).then((n=>(t.originalUrl=e,t.isRootVAST=!0,this.parse(n,t).then((e=>this.buildVASTResponse(e))))))}parseVAST(e,t={}){return this.initParsingStatus(t),t.isRootVAST=!0,this.parse(e,t).then((e=>this.buildVASTResponse(e)))}buildVASTResponse(e){const t=new c.a;return t.ads=e,t.errorURLTemplates=this.getErrorURLTemplates(),t.version=this.vastVersion,this.completeWrapperResolving(t),t}parseVastXml(e,{isRootVAST:t=!1}){if(!e||!e.documentElement||"VAST"!==e.documentElement.nodeName)throw new Error("Invalid VAST XMLDocument");const i=[],s=e.documentElement.childNodes;if(t){const t=e.documentElement.getAttribute("version");t&&(this.vastVersion=t)}for(const e in s){const a=s[e];if("Error"===a.nodeName){const e=o.a.parseNodeText(a);t?this.rootErrorURLTemplates.push(e):this.errorURLTemplates.push(e)}if("Ad"===a.nodeName){const e=n.i(r.a)(a);e?i.push(e):this.trackVastError(this.getErrorURLTemplates(),{ERRORCODE:101})}}return i}parse(e,{resolveAll:t=!0,wrapperSequence:n=null,originalUrl:r=null,wrapperDepth:i=0,isRootVAST:s=!1}){let a=[];try{a=this.parseVastXml(e,{isRootVAST:s})}catch(e){return Promise.reject(e)}const c=a.length,u=a[c-1];return 1===c&&null!=n&&u&&!u.sequence&&(u.sequence=n),!1===t&&(this.remainingAds=o.a.splitVAST(a),a=this.remainingAds.shift()),this.resolveAds(a,{wrapperDepth:i,originalUrl:r})}resolveAds(e=[],{wrapperDepth:t,originalUrl:n}){const r=[];return e.forEach((e=>{const i=this.resolveWrappers(e,t,n);r.push(i)})),Promise.all(r).then((e=>{const r=a.a.flatten(e);if(!r&&this.remainingAds.length>0){const e=this.remainingAds.shift();return this.resolveAds(e,{wrapperDepth:t,originalUrl:n})}return r}))}resolveWrappers(e,t,n){return new Promise((r=>{if(t++,!e.nextWrapperURL)return delete e.nextWrapperURL,r(e);if(t>=this.maxWrapperDepth||-1!==this.parentURLs.indexOf(e.nextWrapperURL))return e.errorCode=302,delete e.nextWrapperURL,r(e);e.nextWrapperURL=o.a.resolveVastAdTagURI(e.nextWrapperURL,n);const i=e.sequence;n=e.nextWrapperURL,this.fetchVAST(e.nextWrapperURL,t,n).then((s=>this.parse(s,{originalUrl:n,wrapperSequence:i,wrapperDepth:t}).then((t=>{if(delete e.nextWrapperURL,0===t.length)return e.creatives=[],r(e);t.forEach((t=>{t&&o.a.mergeWrapperAdData(t,e)})),r(t)})))).catch((t=>{e.errorCode=301,e.errorMessage=t.message,r(e)}))}))}completeWrapperResolving(e){if(0===e.ads.length)this.trackVastError(e.errorURLTemplates,{ERRORCODE:303});else for(let t=e.ads.length-1;t>=0;t--){const n=e.ads[t];(n.errorCode||0===n.creatives.length)&&(this.trackVastError(n.errorURLTemplates.concat(e.errorURLTemplates),{ERRORCODE:n.errorCode||303},{ERRORMESSAGE:n.errorMessage||""},{extensions:n.extensions},{system:n.system}),e.ads.splice(t,1))}}}t.a=l},function(e,t,n){"use strict";var r=n(15),i=n(30);const o={debug:!1,flash:!1,vpaidjs:!0,canPlay:["video/mp4"],vastClient:{timeout:6e3,withCredentials:!0}};class s extends Error{constructor(e,t){super(t),this.code=e}getCode(){return this.code}}t.a=class{constructor(e){this.settings=Object.assign({},o,e),this.vastClient=new r.a}debugLog(){this.settings.debug&&console.log(...arguments)}resolve(e){return this.adconfig=e,this.currentIndex=0,this.previous_time=(new Date).getTime(),this.tracked={},this.tcfv2_data=!1,this.adconfig.config&&this.adconfig.config.tcfv2proxy&&this._query_tcfv2_proxy(),new Promise(((e,t)=>{this._smallDelay(200).then((()=>{this._getAd().then((t=>{e({found:!0,waterfallIndex:this.currentIndex,vastxml:this._buildVast(t)})})).catch((n=>{if(n.getCode&&1==n.getCode())return e({found:!1});t(n)}))}))}))}_smallDelay(e){return new Promise((t=>setTimeout((()=>t()),e)))}_query_tcfv2_proxy(){var e,t=this,n=window;const r={};for(;n;){try{if(n.frames.__tcfapiLocator){e=n;break}}catch(e){}if(n===window.top)break;n=n.parent}window.__tcfapi=window.__tcfapi||function(t,n,i,o){if(e){var s=Math.random()+"",a={__tcfapiCall:{command:t,parameter:o,version:n,callId:s}};r[s]=i,e.postMessage(a,"*")}else i({msg:"CMP not found"},!1)},window.addEventListener("message",(function(e){var t={};try{t="string"==typeof e.data?JSON.parse(e.data):e.data}catch(e){}var n=t.__tcfapiReturn;n&&"function"==typeof r[n.callId]&&(r[n.callId](n.returnValue,n.success),r[n.callId]=null)}),!1),window.__tcfapi("getTCData",2,(function(e,n){n&&(t.tcfv2_data=e)}))}_track(e,t,n){var r=e+t;"string"==typeof n&&void 0===this.tracked[r]&&(this.tracked[r]=new Image,this.tracked[r].src=n)}_trackUse(e){var t=(new Date).getTime(),n=encodeURIComponent(window.location.href)+"&dur="+(t-this.previous_time);this.adconfig.config&&"string"==typeof this.adconfig.config.event_tracking&&this._track(21,e,this.adconfig.config.event_tracking.replace("__ad_id__",e).replace("__zone_id__",this.adconfig.config.zone_id).replace("__event__",21).replace("__random__",Math.random())+n),this.previous_time=t}_getAd(){return new Promise(((e,t)=>{this._nextAd().then((n=>(this.adconfig.waterfall[this.currentIndex].bid&&this._trackUse(this.adconfig.waterfall[this.currentIndex].bid),this._fetchAd(n).then((t=>e(t))).catch((n=>(this.currentIndex++,this._getAd().then(e,t))))))).catch((e=>{t(e)}))}))}_nextAd(){return new Promise(((e,t)=>{if(this.adconfig.waterfall&&this.adconfig.waterfall.length&&this.adconfig.waterfall.length>this.currentIndex){if("VAST"===this.adconfig.waterfall[this.currentIndex].type)return e(this.adconfig.waterfall[this.currentIndex]);t(new s(2,"stop on none VAST"))}t(new s(1,"stop on end of waterfall"))}))}_fetchAd(e){return new Promise(((t,n)=>{this.debugLog("fetchAds: Attempting",e);var r=e.url,i=this.tcfv2_data&&this.tcfv2_data.tcString,o="0",s=o.indexOf("0")>=0?"1":"0";r=(r=(r=r.replace("{v2consent}",""+(i?this.tcfv2_data.tcString:""))).replace("{v2gdpr}",""+(i?this.tcfv2_data.gdprApplies?"1":"0":o))).replace("{v2gdpr_inv}",""+(i?this.tcfv2_data.gdprApplies?"0":"1":s)),this.vastClient.get(r,this.settings.vastClient).then((e=>{for(var r=e.ads,i=0;i{const t={id:e.getAttribute("id")||null,adId:p(e),sequence:e.getAttribute("sequence")||null,apiFramework:e.getAttribute("apiFramework")||null};for(const r in e.childNodes){const o=e.childNodes[r];let u;switch(o.nodeName){case"Linear":u=n.i(a.a)(o,t),u&&i.creatives.push(u);break;case"NonLinearAds":u=n.i(c.a)(o,t),u&&i.creatives.push(u);break;case"CompanionAds":u=n.i(s.a)(o,t),u&&i.creatives.push(u)}}}));break;case"Extensions":h(i.extensions,u.a.childrenByName(r,"Extension"));break;case"AdSystem":i.system={value:u.a.parseNodeText(r),version:r.getAttribute("version")||null};break;case"AdTitle":i.title=u.a.parseNodeText(r);break;case"Description":i.description=u.a.parseNodeText(r);break;case"Advertiser":i.advertiser=u.a.parseNodeText(r);break;case"Pricing":i.pricing={value:u.a.parseNodeText(r),model:r.getAttribute("model")||null,currency:r.getAttribute("currency")||null};break;case"Survey":i.survey=u.a.parseNodeText(r)}}return i}function d(e){const t=l(e);let n=u.a.childByName(e,"VASTAdTagURI");if(n?t.nextWrapperURL=u.a.parseNodeText(n):(n=u.a.childByName(e,"VASTAdTagURL"),n&&(t.nextWrapperURL=u.a.parseNodeText(u.a.childByName(n,"URL")))),t.creatives.forEach((e=>{if(-1!==["linear","nonlinear"].indexOf(e.type)){if(e.trackingEvents){t.trackingEvents||(t.trackingEvents={}),t.trackingEvents[e.type]||(t.trackingEvents[e.type]={});for(const n in e.trackingEvents){const r=e.trackingEvents[n];Array.isArray(t.trackingEvents[e.type][n])||(t.trackingEvents[e.type][n]=[]),r.forEach((r=>{t.trackingEvents[e.type][n].push(r)}))}}e.videoClickTrackingURLTemplates&&(Array.isArray(t.videoClickTrackingURLTemplates)||(t.videoClickTrackingURLTemplates=[]),e.videoClickTrackingURLTemplates.forEach((e=>{t.videoClickTrackingURLTemplates.push(e)}))),e.videoClickThroughURLTemplate&&(t.videoClickThroughURLTemplate=e.videoClickThroughURLTemplate),e.videoCustomClickURLTemplates&&(Array.isArray(t.videoCustomClickURLTemplates)||(t.videoCustomClickURLTemplates=[]),e.videoCustomClickURLTemplates.forEach((e=>{t.videoCustomClickURLTemplates.push(e)})))}})),t.nextWrapperURL)return t}function h(e,t){t.forEach((t=>{const n=new i.a,r=t.attributes,s=t.childNodes;if(t.attributes)for(const e in r){const t=r[e];t.nodeName&&t.nodeValue&&(n.attributes[t.nodeName]=t.nodeValue)}for(const e in s){const t=s[e],r=u.a.parseNodeText(t);if("#comment"!==t.nodeName&&""!==r){const e=new o.a;if(e.name=t.nodeName,e.value=r,t.attributes){const n=t.attributes;for(const t in n){const r=n[t];e.attributes[r.nodeName]=r.nodeValue}}n.children.push(e)}}e.push(n)}))}function p(e){return e.getAttribute("AdID")||e.getAttribute("adID")||e.getAttribute("adId")||null}},function(e,t,n){"use strict";t.a=function(e,t){const n=new i.a(t);return o.a.childrenByName(e,"Companion").forEach((e=>{const t=new r.a;t.id=e.getAttribute("id")||null,t.width=e.getAttribute("width"),t.height=e.getAttribute("height"),t.companionClickTrackingURLTemplates=[],o.a.childrenByName(e,"HTMLResource").forEach((e=>{t.type=e.getAttribute("creativeType")||"text/html",t.htmlResource=o.a.parseNodeText(e)})),o.a.childrenByName(e,"IFrameResource").forEach((e=>{t.type=e.getAttribute("creativeType")||0,t.iframeResource=o.a.parseNodeText(e)})),o.a.childrenByName(e,"StaticResource").forEach((n=>{t.type=n.getAttribute("creativeType")||0,o.a.childrenByName(e,"AltText").forEach((e=>{t.altText=o.a.parseNodeText(e)})),t.staticResource=o.a.parseNodeText(n)})),o.a.childrenByName(e,"TrackingEvents").forEach((e=>{o.a.childrenByName(e,"Tracking").forEach((e=>{const n=e.getAttribute("event"),r=o.a.parseNodeText(e);n&&r&&(Array.isArray(t.trackingEvents[n])||(t.trackingEvents[n]=[]),t.trackingEvents[n].push(r))}))})),o.a.childrenByName(e,"CompanionClickTracking").forEach((e=>{t.companionClickTrackingURLTemplates.push(o.a.parseNodeText(e))})),t.companionClickThroughURLTemplate=o.a.parseNodeText(o.a.childByName(e,"CompanionClickThrough")),t.companionClickTrackingURLTemplate=o.a.parseNodeText(o.a.childByName(e,"CompanionClickTracking")),n.variations.push(t)})),n};var r=n(4),i=n(12),o=n(0)},function(e,t,n){"use strict";t.a=function(e,t){let n;const a=new r.a(t);a.duration=s.a.parseDuration(s.a.parseNodeText(s.a.childByName(e,"Duration")));const c=e.getAttribute("skipoffset");if(null==c)a.skipDelay=null;else if("%"===c.charAt(c.length-1)&&-1!==a.duration){const e=parseInt(c,10);a.skipDelay=a.duration*(e/100)}else a.skipDelay=s.a.parseDuration(c);const u=s.a.childByName(e,"VideoClicks");u&&(a.videoClickThroughURLTemplate=s.a.parseNodeText(s.a.childByName(u,"ClickThrough")),s.a.childrenByName(u,"ClickTracking").forEach((e=>{a.videoClickTrackingURLTemplates.push(s.a.parseNodeText(e))})),s.a.childrenByName(u,"CustomClick").forEach((e=>{a.videoCustomClickURLTemplates.push(s.a.parseNodeText(e))})));const l=s.a.childByName(e,"AdParameters");l&&(a.adParameters=s.a.parseNodeText(l)),s.a.childrenByName(e,"TrackingEvents").forEach((e=>{s.a.childrenByName(e,"Tracking").forEach((e=>{let t=e.getAttribute("event");const r=s.a.parseNodeText(e);if(t&&r){if("progress"===t){if(n=e.getAttribute("offset"),!n)return;t="%"===n.charAt(n.length-1)?`progress-${n}`:`progress-${Math.round(s.a.parseDuration(n))}`}Array.isArray(a.trackingEvents[t])||(a.trackingEvents[t]=[]),a.trackingEvents[t].push(r)}}))})),s.a.childrenByName(e,"MediaFiles").forEach((e=>{s.a.childrenByName(e,"MediaFile").forEach((e=>{const t=new o.a;t.id=e.getAttribute("id"),t.fileURL=s.a.parseNodeText(e),t.deliveryType=e.getAttribute("delivery"),t.codec=e.getAttribute("codec"),t.mimeType=e.getAttribute("type"),t.apiFramework=e.getAttribute("apiFramework"),t.bitrate=parseInt(e.getAttribute("bitrate")||0),t.minBitrate=parseInt(e.getAttribute("minBitrate")||0),t.maxBitrate=parseInt(e.getAttribute("maxBitrate")||0),t.width=parseInt(e.getAttribute("width")||0),t.height=parseInt(e.getAttribute("height")||0);let n=e.getAttribute("scalable");n&&"string"==typeof n&&(n=n.toLowerCase(),"true"===n?t.scalable=!0:"false"===n&&(t.scalable=!1));let r=e.getAttribute("maintainAspectRatio");r&&"string"==typeof r&&(r=r.toLowerCase(),"true"===r?t.maintainAspectRatio=!0:"false"===r&&(t.maintainAspectRatio=!1)),a.mediaFiles.push(t)}))}));const d=s.a.childByName(e,"Icons");return d&&s.a.childrenByName(d,"Icon").forEach((e=>{const t=new i.a;var n,r;t.program=e.getAttribute("program"),t.height=parseInt(e.getAttribute("height")||0),t.width=parseInt(e.getAttribute("width")||0),t.xPosition=(r=e.getAttribute("xPosition"),-1!==["left","right"].indexOf(r)?r:parseInt(r||0)),t.yPosition=(n=e.getAttribute("yPosition"),-1!==["top","bottom"].indexOf(n)?n:parseInt(n||0)),t.apiFramework=e.getAttribute("apiFramework"),t.offset=s.a.parseDuration(e.getAttribute("offset")),t.duration=s.a.parseDuration(e.getAttribute("duration")),s.a.childrenByName(e,"HTMLResource").forEach((e=>{t.type=e.getAttribute("creativeType")||"text/html",t.htmlResource=s.a.parseNodeText(e)})),s.a.childrenByName(e,"IFrameResource").forEach((e=>{t.type=e.getAttribute("creativeType")||0,t.iframeResource=s.a.parseNodeText(e)})),s.a.childrenByName(e,"StaticResource").forEach((e=>{t.type=e.getAttribute("creativeType")||0,t.staticResource=s.a.parseNodeText(e)}));const o=s.a.childByName(e,"IconClicks");o&&(t.iconClickThroughURLTemplate=s.a.parseNodeText(s.a.childByName(o,"IconClickThrough")),s.a.childrenByName(o,"IconClickTracking").forEach((e=>{t.iconClickTrackingURLTemplates.push(s.a.parseNodeText(e))}))),t.iconViewTrackingURLTemplate=s.a.parseNodeText(s.a.childByName(e,"IconViewTracking")),a.icons.push(t)})),a};var r=n(5),i=n(14),o=n(16),s=n(0)},function(e,t,n){"use strict";t.a=function(e,t){const n=new r.a(t);return o.a.childrenByName(e,"TrackingEvents").forEach((e=>{let t,r;o.a.childrenByName(e,"Tracking").forEach((e=>{t=e.getAttribute("event"),r=o.a.parseNodeText(e),t&&r&&(Array.isArray(n.trackingEvents[t])||(n.trackingEvents[t]=[]),n.trackingEvents[t].push(r))}))})),o.a.childrenByName(e,"NonLinear").forEach((e=>{const t=new i.a;t.id=e.getAttribute("id")||null,t.width=e.getAttribute("width"),t.height=e.getAttribute("height"),t.expandedWidth=e.getAttribute("expandedWidth"),t.expandedHeight=e.getAttribute("expandedHeight"),t.scalable=o.a.parseBoolean(e.getAttribute("scalable")),t.maintainAspectRatio=o.a.parseBoolean(e.getAttribute("maintainAspectRatio")),t.minSuggestedDuration=o.a.parseDuration(e.getAttribute("minSuggestedDuration")),t.apiFramework=e.getAttribute("apiFramework"),o.a.childrenByName(e,"HTMLResource").forEach((e=>{t.type=e.getAttribute("creativeType")||"text/html",t.htmlResource=o.a.parseNodeText(e)})),o.a.childrenByName(e,"IFrameResource").forEach((e=>{t.type=e.getAttribute("creativeType")||0,t.iframeResource=o.a.parseNodeText(e)})),o.a.childrenByName(e,"StaticResource").forEach((e=>{t.type=e.getAttribute("creativeType")||0,t.staticResource=o.a.parseNodeText(e)}));const r=o.a.childByName(e,"AdParameters");r&&(t.adParameters=o.a.parseNodeText(r)),t.nonlinearClickThroughURLTemplate=o.a.parseNodeText(o.a.childByName(e,"NonLinearClickThrough")),o.a.childrenByName(e,"NonLinearClickTracking").forEach((e=>{t.nonlinearClickTrackingURLTemplates.push(o.a.parseNodeText(e))})),n.variations.push(t)})),n};var r=n(13),i=n(6),o=n(0)},function(e,t,n){"use strict";var r=n(22),i=n(23),o=n(24);const s={get:function(e,t,n){return n||("function"==typeof t&&(n=t),t={}),"undefined"==typeof window||null===window?i.a.get(e,t,n):o.a.supported()?o.a.get(e,t,n):r.a.supported()?r.a.get(e,t,n):n(new Error("Current context is not supported by any of the default URLHandlers. Please provide a custom URLHandler"))}};t.a=s},function(e,t,n){"use strict";function r(){let e;return window.XDomainRequest&&(e=new XDomainRequest),e}const i={get:function(e,t,n){const i="function"==typeof window.ActiveXObject?new window.ActiveXObject("Microsoft.XMLDOM"):void 0;if(!i)return n(new Error("FlashURLHandler: Microsoft.XMLDOM format not supported"));i.async=!1;const o=r();o.open("GET",e),o.timeout=t.timeout||0,o.withCredentials=t.withCredentials||!1,o.send(),o.onprogress=function(){},o.onload=function(){i.loadXML(o.responseText),n(null,i)}},supported:function(){return!!r()}};t.a=i},function(e,t,n){"use strict";const r={get:function(e,t,n){n(new Error("Please bundle the library for node to use the node urlHandler"))}};t.a=r},function(e,t,n){"use strict";function r(){try{const e=new window.XMLHttpRequest;return"withCredentials"in e?e:null}catch(e){return null}}const i={get:function(e,t,n){if("https:"===window.location.protocol&&0===e.indexOf("http://"))return n(new Error("XHRURLHandler: Cannot go from HTTPS to HTTP."));try{const i=r();i.open("GET",e),i.timeout=t.timeout||0,i.withCredentials=t.withCredentials||!1,i.overrideMimeType&&i.overrideMimeType("text/xml"),i.onreadystatechange=function(){4===i.readyState&&(200===i.status?n(null,i.responseXML):n(new Error(`XHRURLHandler: ${i.statusText}`)))},i.send()}catch(e){n(new Error("XHRURLHandler: Unexpected error"))}},supported:function(){return!!r()}};t.a=i},function(e,t,n){"use strict";let r=null;const i={data:{},length:0,getItem(e){return this.data[e]},setItem(e,t){this.data[e]=t,this.length=Object.keys(this.data).length},removeItem(e){delete this.data[e],this.length=Object.keys(this.data).length},clear(){this.data={},this.length=0}};t.a=class{constructor(){this.storage=this.initStorage()}initStorage(){if(r)return r;try{r="undefined"!=typeof window&&null!==window?window.localStorage||window.sessionStorage:null}catch(e){r=null}return r&&!this.isStorageDisabled(r)||(r=i,r.clear()),r}isStorageDisabled(e){const t="__VASTStorage__";try{if(e.setItem(t,t),e.getItem(t)!==t)return e.removeItem(t),!0}catch(e){return!0}return e.removeItem(t),!1}getItem(e){return this.storage.getItem(e)}setItem(e,t){return this.storage.setItem(e,t)}removeItem(e){return this.storage.removeItem(e)}clear(){return this.storage.clear()}}},function(e,t,n){"use strict";var r=n(25),i=n(7);t.a=class{constructor(e,t,n){this.cappingFreeLunch=e||0,this.cappingMinimumTimeInterval=t||0,this.defaultOptions={withCredentials:!1,timeout:0},this.vastParser=new i.a,this.storage=n||new r.a,void 0===this.lastSuccessfulAd&&(this.lastSuccessfulAd=0),void 0===this.totalCalls&&(this.totalCalls=0),void 0===this.totalCallsTimeout&&(this.totalCallsTimeout=0)}getParser(){return this.vastParser}get lastSuccessfulAd(){return this.storage.getItem("vast-client-last-successful-ad")}set lastSuccessfulAd(e){this.storage.setItem("vast-client-last-successful-ad",e)}get totalCalls(){return this.storage.getItem("vast-client-total-calls")}set totalCalls(e){this.storage.setItem("vast-client-total-calls",e)}get totalCallsTimeout(){return this.storage.getItem("vast-client-total-calls-timeout")}set totalCallsTimeout(e){this.storage.setItem("vast-client-total-calls-timeout",e)}hasRemainingAds(){return this.vastParser.remainingAds.length>0}getNextAds(e){return this.vastParser.getRemainingAds(e)}get(e,t={}){const n=Date.now();return(t=Object.assign({},this.defaultOptions,t)).hasOwnProperty("resolveAll")||(t.resolveAll=!1),this.totalCallsTimeout{if(this.cappingFreeLunch>=this.totalCalls)return i(new Error(`VAST call canceled – FreeLunch capping not reached yet ${this.totalCalls}/${this.cappingFreeLunch}`));const o=n-this.lastSuccessfulAd;if(o<0)this.lastSuccessfulAd=0;else if(or(e))).catch((e=>i(e)))}))}}},function(e,t,n){"use strict";t.a=class{constructor(){this.ads=[],this.errorURLTemplates=[],this.version=null}}},function(e,t,n){"use strict";n(4),n(5);var r=n(3);n.n(r),n(6),n(2),r.EventEmitter},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(8);n.d(t,"OUTSTREAMResolver",(function(){return r.a}))},function(e,t,n){"use strict";function r(e){return"number"!=typeof e&&!e}function i(e){if("string"==typeof e)return e;if("number"==typeof e)return e+"";if("boolean"==typeof e)return e+"";if("function"==typeof e)return e();if(e instanceof o)return e.toString();throw Error("Bad Parameter")}class o{constructor(e,t){this.name_regex=/[_:A-Za-z][-._:A-Za-z0-9]*/,this.indent=!!e,this.indentString=this.indent&&"string"==typeof e?e:" ",this.output="",this.stack=[],this.tags=0,this.attributes=0,this.attribute=0,this.texts=0,this.comment=0,this.dtd=0,this.root="",this.pi=0,this.cdata=0,this.started_write=!1,this.writer,this.writer_encoding="UTF-8",this.writer="function"==typeof t?t:function(e,t){this.output+=e}}toString(){return this.flush(),this.output}indenter(){if(this.indent){this.write("\n");for(var e=1;e0;e--)this.endElement();this.tags=0}startDocument(e,t,n){return this.tags||this.attributes||(this.startPI("xml"),this.startAttribute("version"),this.text("string"==typeof e?e:"1.0"),this.endAttribute(),"string"==typeof t&&(this.startAttribute("encoding"),this.text(t),this.endAttribute(),this.writer_encoding=t),n&&(this.startAttribute("standalone"),this.text("yes"),this.endAttribute()),this.endPI(),this.indent||this.write("\n")),this}endDocument(){return this.attributes&&this.endAttributes(),this}writeElement(e,t){return this.startElement(e).text(t).endElement()}writeElementNS(e,t,n,r){return r||(r=n),this.startElementNS(e,t,n).text(r).endElement()}startElement(e){if(!(e=i(e)).match(this.name_regex))throw Error("Invalid Parameter");if(0===this.tags&&this.root&&this.root!==e)throw Error("Invalid Parameter");return this.attributes&&this.endAttributes(),++this.tags,this.texts=0,this.stack.length>0&&(this.stack[this.stack.length-1].containsTag=!0),this.stack.push({name:e,tags:this.tags}),this.started_write&&this.indenter(),this.write("<",e),this.startAttributes(),this.started_write=!0,this}startElementNS(e,t,n){if(e=i(e),t=i(t),!e.match(this.name_regex))throw Error("Invalid Parameter");if(!t.match(this.name_regex))throw Error("Invalid Parameter");return this.attributes&&this.endAttributes(),++this.tags,this.texts=0,this.stack.length>0&&(this.stack[this.stack.length-1].containsTag=!0),this.stack.push({name:e+":"+t,tags:this.tags}),this.started_write&&this.indenter(),this.write("<",e+":"+t),this.startAttributes(),this.started_write=!0,this}endElement(){if(!this.tags)return this;var e=this.stack.pop();return this.attributes>0?(this.attribute&&(this.texts&&this.endAttribute(),this.endAttribute()),this.write("/"),this.endAttributes()):(e.containsTag&&this.indenter(),this.write("")),--this.tags,this.texts=0,this}writeAttribute(e,t){return"function"==typeof t&&(t=t()),r(t)?this:this.startAttribute(e).text(t).endAttribute()}writeAttributeNS(e,t,n,i){return i||(i=n),"function"==typeof i&&(i=i()),r(i)?this:this.startAttributeNS(e,t,n).text(i).endAttribute()}startAttributes(){return this.attributes=1,this}endAttributes(){return this.attributes?(this.attribute&&this.endAttribute(),this.attributes=0,this.attribute=0,this.texts=0,this.write(">"),this):this}startAttribute(e){if(!(e=i(e)).match(this.name_regex))throw Error("Invalid Parameter");return this.attributes||this.pi?(this.attribute||(this.attribute=1,this.write(" ",e,'="')),this):this}startAttributeNS(e,t,n){if(e=i(e),t=i(t),!e.match(this.name_regex))throw Error("Invalid Parameter");if(!t.match(this.name_regex))throw Error("Invalid Parameter");return this.attributes||this.pi?(this.attribute||(this.attribute=1,this.write(" ",e+":"+t,'="')),this):this}endAttribute(){return this.attribute?(this.attribute=0,this.texts=0,this.write('"'),this):this}text(e){return e=i(e),this.tags||this.comment||this.pi||this.cdata?this.attributes&&this.attribute?(++this.texts,this.write(e.replace(/&/g,"&").replace(//g,">")),++this.texts,this.started_write=!0,this):this}writeComment(e){return this.startComment().text(e).endComment()}startComment(){return this.comment||(this.attributes&&this.endAttributes(),this.indenter(),this.write("\x3c!--"),this.comment=1,this.started_write=!0),this}endComment(){return this.comment?(this.write("--\x3e"),this.comment=0,this):this}writeDocType(e,t,n,r){return this.startDocType(e,t,n,r).endDocType()}startDocType(e,t,n,r){if(this.dtd||this.tags)return this;if(e=i(e),t=t?i(t):t,n=n?i(n):n,r=r?i(r):r,!e.match(this.name_regex))throw Error("Invalid Parameter");if(t&&!t.match(/^[\w\-][\w\s\-\/\+\:\.]*/))throw Error("Invalid Parameter");if(n&&!n.match(/^[\w\.][\w\-\/\\\:\.]*/))throw Error("Invalid Parameter");if(r&&!r.match(/[\w\s\<\>\+\.\!\#\-\?\*\,\(\)\|]*/))throw Error("Invalid Parameter");return t=t?' PUBLIC "'+t+'"':n?" SYSTEM":"",n=n?' "'+n+'"':"",r=r?" ["+r+"]":"",this.started_write&&this.indenter(),this.write(""),this):this}writePI(e,t){return this.startPI(e).text(t).endPI()}startPI(e){if(!(e=i(e)).match(this.name_regex))throw Error("Invalid Parameter");return this.pi||(this.attributes&&this.endAttributes(),this.started_write&&this.indenter(),this.write(""),this.pi=0,this):this}writeCData(e){return this.startCData().text(e).endCData()}startCData(){return this.cdata||(this.attributes&&this.endAttributes(),this.indenter(),this.write(""),this.cdata=0,this):this}writeRaw(e){return e=i(e),this.tags||this.comment||this.pi||this.cdata?this.attributes&&this.attribute?(++this.texts,this.write(e.replace("&","&").replace('"',""")),this):(this.attributes&&!this.attribute&&this.endAttributes(),++this.texts,this.write(e),this.started_write=!0,this):this}}t.a=o}])},e.exports=t()},186:function(e,t){"use strict";var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){}return e.prototype.clone=function(){var e=this,t=new this.constructor;return Object.keys(this).forEach((function(n){var r=e.deepClone(e[n]);void 0!==r&&(t[n]=r)})),t},e.prototype.deepClone=function(e){var t,r,i=typeof e;if("number"===i||"string"===i||"boolean"===i)return e;if(null!==e&&"object"===i){if("function"==typeof e.clone)return e.clone();if(e instanceof Date)return new Date(e.getTime());if(void 0!==e[Symbol.iterator]){var o=[];try{for(var s=n(e),a=s.next();!a.done;a=s.next()){var c=a.value;o.push(this.deepClone(c))}}catch(e){t={error:e}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(t)throw t.error}}return e instanceof Array?o:new e.constructor(o)}var u={};for(var l in e)e.hasOwnProperty(l)&&(u[l]=this.deepClone(e[l]));return u}},e}();t.Cloneable=r},61:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function a(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))},s=this&&this.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0){var o=n;t.CACHE.has(o)?(r.populate(t.CACHE.get(o)),r.readyPromise=Promise.resolve()):(i+=t.versionedFilename.replace("[VERSION]",o+""),r.readyPromise=r.fetchJson(i))}else t.CACHE.has(t.LATEST_CACHE_KEY)?(r.populate(t.CACHE.get(t.LATEST_CACHE_KEY)),r.readyPromise=Promise.resolve()):(r.isLatest=!0,r.readyPromise=r.fetchJson(i+t.latestFilename))}return r}return i(t,e),Object.defineProperty(t,"baseUrl",{get:function(){return this.baseUrl_},set:function(e){if(/^https?:\/\/vendorlist\.consensu\.org\//.test(e))throw new c.GVLError("Invalid baseUrl! You may not pull directly from vendorlist.consensu.org and must provide your own cache");e.length>0&&"/"!==e[e.length-1]&&(e+="/"),this.baseUrl_=e},enumerable:!0,configurable:!0}),t.emptyLanguageCache=function(e){var n=!1;return void 0===e&&t.LANGUAGE_CACHE.size>0?(t.LANGUAGE_CACHE=new Map,n=!0):"string"==typeof e&&this.consentLanguages.has(e.toUpperCase())&&(t.LANGUAGE_CACHE.delete(e.toUpperCase()),n=!0),n},t.emptyCache=function(e){var n=!1;return Number.isInteger(e)&&e>=0?(t.CACHE.delete(e),n=!0):void 0===e&&(t.CACHE=new Map,n=!0),n},t.prototype.cacheLanguage=function(){t.LANGUAGE_CACHE.has(this.lang_)||t.LANGUAGE_CACHE.set(this.lang_,{purposes:this.purposes,specialPurposes:this.specialPurposes,features:this.features,specialFeatures:this.specialFeatures,stacks:this.stacks})},t.prototype.fetchJson=function(e){return o(this,void 0,void 0,(function(){var t,n;return s(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),t=this.populate,[4,u.Json.fetch(e)];case 1:return t.apply(this,[r.sent()]),[3,3];case 2:throw n=r.sent(),new c.GVLError(n.message);case 3:return[2]}}))}))},t.prototype.getJson=function(){return JSON.parse(JSON.stringify({gvlSpecificationVersion:this.gvlSpecificationVersion,vendorListVersion:this.vendorListVersion,tcfPolicyVersion:this.tcfPolicyVersion,lastUpdated:this.lastUpdated,purposes:this.purposes,specialPurposes:this.specialPurposes,features:this.features,specialFeatures:this.specialFeatures,stacks:this.stacks,vendors:this.fullVendorList}))},t.prototype.changeLanguage=function(e){return o(this,void 0,void 0,(function(){var n,r,i,o,a;return s(this,(function(s){switch(s.label){case 0:if(n=e.toUpperCase(),!t.consentLanguages.has(n))return[3,6];if(n===this.lang_)return[3,5];if(this.lang_=n,!t.LANGUAGE_CACHE.has(n))return[3,1];for(i in r=t.LANGUAGE_CACHE.get(n))r.hasOwnProperty(i)&&(this[i]=r[i]);return[3,5];case 1:o=t.baseUrl+t.languageFilename.replace("[LANG]",e),s.label=2;case 2:return s.trys.push([2,4,,5]),[4,this.fetchJson(o)];case 3:return s.sent(),this.cacheLanguage(),[3,5];case 4:throw a=s.sent(),new c.GVLError("unable to load language: "+a.message);case 5:return[3,7];case 6:throw new c.GVLError("unsupported language "+e);case 7:return[2]}}))}))},Object.defineProperty(t.prototype,"language",{get:function(){return this.lang_},enumerable:!0,configurable:!0}),t.prototype.isVendorList=function(e){return void 0!==e&&void 0!==e.vendors},t.prototype.populate=function(e){this.purposes=e.purposes,this.specialPurposes=e.specialPurposes,this.features=e.features,this.specialFeatures=e.specialFeatures,this.stacks=e.stacks,this.isVendorList(e)&&(this.gvlSpecificationVersion=e.gvlSpecificationVersion,this.tcfPolicyVersion=e.tcfPolicyVersion,this.vendorListVersion=e.vendorListVersion,this.lastUpdated=e.lastUpdated,"string"==typeof this.lastUpdated&&(this.lastUpdated=new Date(this.lastUpdated)),this.vendors_=e.vendors,this.fullVendorList=e.vendors,this.mapVendors(),this.isReady_=!0,this.isLatest&&t.CACHE.set(t.LATEST_CACHE_KEY,this.getJson()),t.CACHE.has(this.vendorListVersion)||t.CACHE.set(this.vendorListVersion,this.getJson())),this.cacheLanguage()},t.prototype.mapVendors=function(e){var t=this;this.byPurposeVendorMap={},this.bySpecialPurposeVendorMap={},this.byFeatureVendorMap={},this.bySpecialFeatureVendorMap={},Object.keys(this.purposes).forEach((function(e){t.byPurposeVendorMap[e]={legInt:new Set,consent:new Set,flexible:new Set}})),Object.keys(this.specialPurposes).forEach((function(e){t.bySpecialPurposeVendorMap[e]=new Set})),Object.keys(this.features).forEach((function(e){t.byFeatureVendorMap[e]=new Set})),Object.keys(this.specialFeatures).forEach((function(e){t.bySpecialFeatureVendorMap[e]=new Set})),Array.isArray(e)||(e=Object.keys(this.fullVendorList).map((function(e){return+e}))),this.vendorIds=new Set(e),this.vendors_=e.reduce((function(e,n){var r=t.vendors_[""+n];return r&&void 0===r.deletedDate&&(r.purposes.forEach((function(e){t.byPurposeVendorMap[e+""].consent.add(n)})),r.specialPurposes.forEach((function(e){t.bySpecialPurposeVendorMap[e+""].add(n)})),r.legIntPurposes.forEach((function(e){t.byPurposeVendorMap[e+""].legInt.add(n)})),r.flexiblePurposes&&r.flexiblePurposes.forEach((function(e){t.byPurposeVendorMap[e+""].flexible.add(n)})),r.features.forEach((function(e){t.byFeatureVendorMap[e+""].add(n)})),r.specialFeatures.forEach((function(e){t.bySpecialFeatureVendorMap[e+""].add(n)})),e[n]=r),e}),{})},t.prototype.getFilteredVendors=function(e,t,n,r){var i=this,o=e.charAt(0).toUpperCase()+e.slice(1),s={};return("purpose"===e&&n?this["by"+o+"VendorMap"][t+""][n]:this["by"+(r?"Special":"")+o+"VendorMap"][t+""]).forEach((function(e){s[e+""]=i.vendors[e+""]})),s},t.prototype.getVendorsWithConsentPurpose=function(e){return this.getFilteredVendors("purpose",e,"consent")},t.prototype.getVendorsWithLegIntPurpose=function(e){return this.getFilteredVendors("purpose",e,"legInt")},t.prototype.getVendorsWithFlexiblePurpose=function(e){return this.getFilteredVendors("purpose",e,"flexible")},t.prototype.getVendorsWithSpecialPurpose=function(e){return this.getFilteredVendors("purpose",e,void 0,!0)},t.prototype.getVendorsWithFeature=function(e){return this.getFilteredVendors("feature",e)},t.prototype.getVendorsWithSpecialFeature=function(e){return this.getFilteredVendors("feature",e,void 0,!0)},Object.defineProperty(t.prototype,"vendors",{get:function(){return this.vendors_},enumerable:!0,configurable:!0}),t.prototype.narrowVendorsTo=function(e){this.mapVendors(e)},Object.defineProperty(t.prototype,"isReady",{get:function(){return this.isReady_},enumerable:!0,configurable:!0}),t.prototype.clone=function(){return new t(this.getJson())},t.isInstanceOf=function(e){return"object"==typeof e&&"function"==typeof e.narrowVendorsTo},t.LANGUAGE_CACHE=new Map,t.CACHE=new Map,t.LATEST_CACHE_KEY=0,t.DEFAULT_LANGUAGE="EN",t.consentLanguages=new l.ConsentLanguages,t.latestFilename="vendor-list.json",t.versionedFilename="archives/vendor-list-v[VERSION].json",t.languageFilename="purposes-[LANG].json",t}(a.Cloneable);t.GVL=d},56:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){}return e.absCall=function(e,t,n,r){return new Promise((function(i,o){var s=new XMLHttpRequest;s.withCredentials=n,s.addEventListener("load",(function(){if(s.readyState==XMLHttpRequest.DONE)if(s.status>=200&&s.status<300){var e=s.response;if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}i(e)}else o(new Error("HTTP Status: "+s.status+" response type: "+s.responseType))})),s.addEventListener("error",(function(){o(new Error("error"))})),s.addEventListener("abort",(function(){o(new Error("aborted"))})),null===t?s.open("GET",e,!0):s.open("POST",e,!0),s.responseType="json",s.timeout=r,s.ontimeout=function(){o(new Error("Timeout "+r+"ms "+e))},s.send(t)}))},e.post=function(e,t,n,r){return void 0===n&&(n=!1),void 0===r&&(r=0),this.absCall(e,JSON.stringify(t),n,r)},e.fetch=function(e,t,n){return void 0===t&&(t=!1),void 0===n&&(n=0),this.absCall(e,null,t,n)},e}();t.Json=n},382:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(186),s=n(458),a=n(61),c=n(250),u=function(e){function t(t){var n=e.call(this)||this;return n.isServiceSpecific_=!1,n.supportOOB_=!0,n.useNonStandardStacks_=!1,n.purposeOneTreatment_=!1,n.publisherCountryCode_="AA",n.version_=2,n.consentScreen_=0,n.policyVersion_=2,n.consentLanguage_="EN",n.cmpId_=0,n.cmpVersion_=0,n.vendorListVersion_=0,n.numCustomPurposes_=0,n.specialFeatureOptins=new c.Vector,n.purposeConsents=new c.Vector,n.purposeLegitimateInterests=new c.Vector,n.publisherConsents=new c.Vector,n.publisherLegitimateInterests=new c.Vector,n.publisherCustomConsents=new c.Vector,n.publisherCustomLegitimateInterests=new c.Vector,n.vendorConsents=new c.Vector,n.vendorLegitimateInterests=new c.Vector,n.vendorsDisclosed=new c.Vector,n.vendorsAllowed=new c.Vector,n.publisherRestrictions=new c.PurposeRestrictionVector,t&&(n.gvl=t),n.created=new Date,n.updated(),n}return i(t,e),Object.defineProperty(t.prototype,"gvl",{get:function(){return this.gvl_},set:function(e){a.GVL.isInstanceOf(e)||(e=new a.GVL(e)),this.gvl_=e,this.publisherRestrictions.gvl=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"cmpId",{get:function(){return this.cmpId_},set:function(e){if(!(Number.isInteger(+e)&&e>1))throw new s.TCModelError("cmpId",e);this.cmpId_=+e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"cmpVersion",{get:function(){return this.cmpVersion_},set:function(e){if(!(Number.isInteger(+e)&&e>-1))throw new s.TCModelError("cmpVersion",e);this.cmpVersion_=+e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"consentScreen",{get:function(){return this.consentScreen_},set:function(e){if(!(Number.isInteger(+e)&&e>-1))throw new s.TCModelError("consentScreen",e);this.consentScreen_=+e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"consentLanguage",{get:function(){return this.consentLanguage_},set:function(e){this.consentLanguage_=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"publisherCountryCode",{get:function(){return this.publisherCountryCode_},set:function(e){if(!/^([A-z]){2}$/.test(e))throw new s.TCModelError("publisherCountryCode",e);this.publisherCountryCode_=e.toUpperCase()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"vendorListVersion",{get:function(){return this.gvl?this.gvl.vendorListVersion:this.vendorListVersion_},set:function(e){if((e=+e>>0)<0)throw new s.TCModelError("vendorListVersion",e);this.vendorListVersion_=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"policyVersion",{get:function(){return this.gvl?this.gvl.tcfPolicyVersion:this.policyVersion_},set:function(e){if(this.policyVersion_=parseInt(e,10),this.policyVersion_<0)throw new s.TCModelError("policyVersion",e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"version",{get:function(){return this.version_},set:function(e){this.version_=parseInt(e,10)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isServiceSpecific",{get:function(){return this.isServiceSpecific_},set:function(e){this.isServiceSpecific_=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"useNonStandardStacks",{get:function(){return this.useNonStandardStacks_},set:function(e){this.useNonStandardStacks_=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"supportOOB",{get:function(){return this.supportOOB_},set:function(e){this.supportOOB_=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"purposeOneTreatment",{get:function(){return this.purposeOneTreatment_},set:function(e){this.purposeOneTreatment_=e},enumerable:!0,configurable:!0}),t.prototype.setAllVendorConsents=function(){this.vendorConsents.set(this.gvl.vendors)},t.prototype.unsetAllVendorConsents=function(){this.vendorConsents.empty()},t.prototype.setAllVendorsDisclosed=function(){this.vendorsDisclosed.set(this.gvl.vendors)},t.prototype.unsetAllVendorsDisclosed=function(){this.vendorsDisclosed.empty()},t.prototype.setAllVendorsAllowed=function(){this.vendorsAllowed.set(this.gvl.vendors)},t.prototype.unsetAllVendorsAllowed=function(){this.vendorsAllowed.empty()},t.prototype.setAllVendorLegitimateInterests=function(){this.vendorLegitimateInterests.set(this.gvl.vendors)},t.prototype.unsetAllVendorLegitimateInterests=function(){this.vendorLegitimateInterests.empty()},t.prototype.setAllPurposeConsents=function(){this.purposeConsents.set(this.gvl.purposes)},t.prototype.unsetAllPurposeConsents=function(){this.purposeConsents.empty()},t.prototype.setAllPurposeLegitimateInterests=function(){this.purposeLegitimateInterests.set(this.gvl.purposes)},t.prototype.unsetAllPurposeLegitimateInterests=function(){this.purposeLegitimateInterests.empty()},t.prototype.setAllSpecialFeatureOptins=function(){this.specialFeatureOptins.set(this.gvl.specialFeatures)},t.prototype.unsetAllSpecialFeatureOptins=function(){this.specialFeatureOptins.empty()},t.prototype.setAll=function(){this.setAllVendorConsents(),this.setAllPurposeLegitimateInterests(),this.setAllSpecialFeatureOptins(),this.setAllPurposeConsents(),this.setAllVendorLegitimateInterests()},t.prototype.unsetAll=function(){this.unsetAllVendorConsents(),this.unsetAllPurposeLegitimateInterests(),this.unsetAllSpecialFeatureOptins(),this.unsetAllPurposeConsents(),this.unsetAllVendorLegitimateInterests()},Object.defineProperty(t.prototype,"numCustomPurposes",{get:function(){var e=this.numCustomPurposes_;if("object"==typeof this.customPurposes){var t=Object.keys(this.customPurposes).sort((function(e,t){return+e-+t}));e=parseInt(t.pop(),10)}return e},set:function(e){if(this.numCustomPurposes_=parseInt(e,10),this.numCustomPurposes_<0)throw new s.TCModelError("numCustomPurposes",e)},enumerable:!0,configurable:!0}),t.prototype.updated=function(){this.lastUpdated=new Date},t.consentLanguages=a.GVL.consentLanguages,t}(o.Cloneable);t.TCModel=u},381:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(170),i=n(250),o=n(82),s=n(382),a=function(){function e(){}return e.encode=function(e,t){var n,i,o="";return e=r.SemanticPreEncoder.process(e,t),(i=Array.isArray(null===(n=t)||void 0===n?void 0:n.segments)?t.segments:new r.SegmentSequence(e,t)[""+e.version]).forEach((function(t,n){var s="";n{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(458),i=function(){function e(){}return e.encode=function(e){if(!/^[0-1]+$/.test(e))throw new r.EncodingError("Invalid bitField");var t=e.length%this.LCM;e+=t?"0".repeat(this.LCM-t):"";for(var n="",i=0;i{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(250),i=function(){function e(){}var t,n,i,o,s,a,c,u,l,d,h,p,f,m,g,v,y,E;return t=r.Fields.cmpId,n=r.Fields.cmpVersion,i=r.Fields.consentLanguage,o=r.Fields.consentScreen,s=r.Fields.created,a=r.Fields.isServiceSpecific,c=r.Fields.lastUpdated,u=r.Fields.policyVersion,l=r.Fields.publisherCountryCode,d=r.Fields.publisherLegitimateInterests,h=r.Fields.publisherConsents,p=r.Fields.purposeConsents,f=r.Fields.purposeLegitimateInterests,m=r.Fields.purposeOneTreatment,g=r.Fields.specialFeatureOptins,v=r.Fields.useNonStandardStacks,y=r.Fields.vendorListVersion,E=r.Fields.version,e[t]=12,e[n]=12,e[i]=12,e[o]=6,e[s]=36,e[a]=1,e[c]=36,e[u]=6,e[l]=12,e[d]=24,e[h]=24,e[p]=24,e[f]=24,e[m]=1,e[g]=12,e[v]=1,e[y]=12,e[E]=6,e.anyBoolean=1,e.encodingType=1,e.maxId=16,e.numCustomPurposes=6,e.numEntries=12,e.numRestrictions=12,e.purposeId=6,e.restrictionType=2,e.segmentType=3,e.singleOrRange=1,e.vendorId=16,e}();t.BitLength=i},314:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(479),i=n(219),o=n(836),s=n(780),a=n(458),c=n(731),u=n(250),l=function(){function e(){}return e.encode=function(e,t){var n,s=this;try{n=this.fieldSequence[""+e.version][t]}catch(n){throw new a.EncodingError("Unable to encode version: "+e.version+", segment: "+t)}var l="";return t!==u.Segment.CORE&&(l=o.IntEncoder.encode(u.SegmentIDs.KEY_TO_ID[t],i.BitLength.segmentType)),n.forEach((function(n){var r=e[n],u=o.FieldEncoderMap[n],d=i.BitLength[n];void 0===d&&s.isPublisherCustom(n)&&(d=+e[c.Fields.numCustomPurposes]);try{l+=u.encode(r,d)}catch(e){throw new a.EncodingError("Error encoding "+t+"->"+n+": "+e.message)}})),r.Base64Url.encode(l)},e.decode=function(e,t,n){var s=this,l=r.Base64Url.decode(e),d=0;return n===u.Segment.CORE&&(t.version=o.IntEncoder.decode(l.substr(d,i.BitLength[c.Fields.version]),i.BitLength[c.Fields.version])),n!==u.Segment.CORE&&(d+=i.BitLength.segmentType),this.fieldSequence[""+t.version][n].forEach((function(e){var n=o.FieldEncoderMap[e],r=i.BitLength[e];if(void 0===r&&s.isPublisherCustom(e)&&(r=+t[c.Fields.numCustomPurposes]),0!==r){var u=l.substr(d,r);if(n===o.VendorVectorEncoder?t[e]=n.decode(u,t.version):t[e]=n.decode(u,r),Number.isInteger(r))d+=r;else{if(!Number.isInteger(t[e].bitLength))throw new a.DecodingError(e);d+=t[e].bitLength}}})),t},e.isPublisherCustom=function(e){return 0===e.indexOf("publisherCustom")},e.fieldSequence=new s.FieldSequence,e}();t.SegmentEncoder=l},818:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(458),i=n(250),o=function(){function e(){}return e.process=function(e,t){var n,i,o=e.gvl;if(!o)throw new r.EncodingError("Unable to encode TCModel without a GVL");if(!o.isReady)throw new r.EncodingError("Unable to encode TCModel tcModel.gvl.readyPromise is not resolved");(e=e.clone()).consentLanguage=o.language.toUpperCase(),(null===(n=t)||void 0===n?void 0:n.version)>0&&(null===(i=t)||void 0===i?void 0:i.version)<=this.processor.length?e.version=t.version:e.version=this.processor.length;var s=e.version-1;if(!this.processor[s])throw new r.EncodingError("Invalid version: "+e.version);return this.processor[s](e,o)},e.processor=[function(e){return e},function(e,t){e.publisherRestrictions.gvl=t,e.purposeLegitimateInterests.unset(1);var n=new Map;return n.set("legIntPurposes",e.vendorLegitimateInterests),n.set("purposes",e.vendorConsents),n.forEach((function(n,r){n.forEach((function(o,s){if(o){var a=t.vendors[s];if(!a||a.deletedDate)n.unset(s);else if(0===a[r].length)if(e.isServiceSpecific)if(0===a.flexiblePurposes.length)n.unset(s);else{for(var c=e.publisherRestrictions.getRestrictions(s),u=!1,l=0,d=c.length;l{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){}return e.encode=function(e){return+e+""},e.decode=function(e){return"1"===e},e}();t.BooleanEncoder=n},101:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(82),i=n(458),o=function(){function e(){}return e.encode=function(e,t){return r.IntEncoder.encode(Math.round(e.getTime()/100),t)},e.decode=function(e,t){if(t!==e.length)throw new i.DecodingError("invalid bit length");var n=new Date;return n.setTime(100*r.IntEncoder.decode(e,t)),n},e}();t.DateEncoder=o},286:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(250),i=n(632),o=n(101),s=n(937),a=n(82),c=n(835),u=n(889),l=n(283),d=function(){function e(){}var t,n,d,h,p,f,m,g,v,y,E,b,w,T,_,L,C,A,I,R,x,S,O,N,P,k;return t=r.Fields.version,n=r.Fields.created,d=r.Fields.lastUpdated,h=r.Fields.cmpId,p=r.Fields.cmpVersion,f=r.Fields.consentScreen,m=r.Fields.consentLanguage,g=r.Fields.vendorListVersion,v=r.Fields.policyVersion,y=r.Fields.isServiceSpecific,E=r.Fields.useNonStandardStacks,b=r.Fields.specialFeatureOptins,w=r.Fields.purposeConsents,T=r.Fields.purposeLegitimateInterests,_=r.Fields.purposeOneTreatment,L=r.Fields.publisherCountryCode,C=r.Fields.vendorConsents,A=r.Fields.vendorLegitimateInterests,I=r.Fields.publisherRestrictions,R=r.Fields.vendorsDisclosed,x=r.Fields.vendorsAllowed,S=r.Fields.publisherConsents,O=r.Fields.publisherLegitimateInterests,N=r.Fields.numCustomPurposes,P=r.Fields.publisherCustomConsents,k=r.Fields.publisherCustomLegitimateInterests,e[t]=a.IntEncoder,e[n]=o.DateEncoder,e[d]=o.DateEncoder,e[h]=a.IntEncoder,e[p]=a.IntEncoder,e[f]=a.IntEncoder,e[m]=c.LangEncoder,e[g]=a.IntEncoder,e[v]=a.IntEncoder,e[y]=i.BooleanEncoder,e[E]=i.BooleanEncoder,e[b]=s.FixedVectorEncoder,e[w]=s.FixedVectorEncoder,e[T]=s.FixedVectorEncoder,e[_]=i.BooleanEncoder,e[L]=c.LangEncoder,e[C]=l.VendorVectorEncoder,e[A]=l.VendorVectorEncoder,e[I]=u.PurposeRestrictionVectorEncoder,e.segmentType=a.IntEncoder,e[R]=l.VendorVectorEncoder,e[x]=l.VendorVectorEncoder,e[S]=s.FixedVectorEncoder,e[O]=s.FixedVectorEncoder,e[N]=a.IntEncoder,e[P]=s.FixedVectorEncoder,e[k]=s.FixedVectorEncoder,e}();t.FieldEncoderMap=d},937:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(632),i=n(458),o=n(250),s=function(){function e(){}return e.encode=function(e,t){for(var n="",i=1;i<=t;i++)n+=r.BooleanEncoder.encode(e.has(i));return n},e.decode=function(e,t){if(e.length!==t)throw new i.DecodingError("bitfield encoding length mismatch");for(var n=new o.Vector,s=1;s<=t;s++)r.BooleanEncoder.decode(e[s-1])&&n.set(s);return n.bitLength=e.length,n},e}();t.FixedVectorEncoder=s},82:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(458),i=function(){function e(){}return e.encode=function(e,t){var n;if("string"==typeof e&&(e=parseInt(e,10)),(n=e.toString(2)).length>t||e<0)throw new r.EncodingError(e+" too large to encode into "+t);return n.length{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(82),i=n(458),o=function(){function e(){}return e.encode=function(e,t){var n=(e=e.toUpperCase()).charCodeAt(0)-65,o=e.charCodeAt(1)-65;if(n<0||n>25||o<0||o>25)throw new i.EncodingError("invalid language code: "+e);if(t%2==1)throw new i.EncodingError("numBits must be even, "+t+" is not valid");return t/=2,r.IntEncoder.encode(n,t)+r.IntEncoder.encode(o,t)},e.decode=function(e,t){if(t!==e.length||e.length%2)throw new i.DecodingError("invalid bit length for language");var n=e.length/2,o=r.IntEncoder.decode(e.slice(0,n),n)+65,s=r.IntEncoder.decode(e.slice(n),n)+65;return String.fromCharCode(o)+String.fromCharCode(s)},e}();t.LangEncoder=o},889:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(219),i=n(632),o=n(458),s=n(82),a=n(250),c=function(){function e(){}return e.encode=function(e){var t=s.IntEncoder.encode(e.numRestrictions,r.BitLength.numRestrictions);return e.isEmpty()||e.getRestrictions().forEach((function(n){t+=s.IntEncoder.encode(n.purposeId,r.BitLength.purposeId),t+=s.IntEncoder.encode(n.restrictionType,r.BitLength.restrictionType);for(var o=e.getVendors(n),a=o.length,c=0,u=0,l="",d=0;dh+1){var p=!(h===u);l+=i.BooleanEncoder.encode(p),l+=s.IntEncoder.encode(u,r.BitLength.vendorId),p&&(l+=s.IntEncoder.encode(h,r.BitLength.vendorId)),u=0}}t+=s.IntEncoder.encode(c,r.BitLength.numEntries),t+=l})),t},e.decode=function(e){var t=0,n=new a.PurposeRestrictionVector,c=s.IntEncoder.decode(e.substr(t,r.BitLength.numRestrictions),r.BitLength.numRestrictions);t+=r.BitLength.numRestrictions;for(var u=0;u{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),(n=t.VectorEncodingType||(t.VectorEncodingType={}))[n.FIELD=0]="FIELD",n[n.RANGE=1]="RANGE"},283:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(250),i=n(170),o=n(82),s=n(632),a=n(937),c=n(938),u=n(458),l=function(){function e(){}return e.encode=function(e){var t,n=[],r=[],a=o.IntEncoder.encode(e.maxId,i.BitLength.maxId),u="",l=i.BitLength.maxId+i.BitLength.encodingType,d=l+e.maxId,h=2*i.BitLength.vendorId+i.BitLength.singleOrRange+i.BitLength.numEntries,p=l+i.BitLength.numEntries;return e.forEach((function(o,a){u+=s.BooleanEncoder.encode(o),(t=e.maxId>h&&p{"use strict";function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),r(n(632)),r(n(101)),r(n(286)),r(n(937)),r(n(82)),r(n(835)),r(n(889)),r(n(938)),r(n(283))},170:(e,t,n)=>{"use strict";function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),r(n(479)),r(n(219)),r(n(314)),r(n(818)),r(n(836)),r(n(780))},14:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(250);t.FieldSequence=function(){var e,t;this[1]=((e={})[r.Segment.CORE]=[r.Fields.version,r.Fields.created,r.Fields.lastUpdated,r.Fields.cmpId,r.Fields.cmpVersion,r.Fields.consentScreen,r.Fields.consentLanguage,r.Fields.vendorListVersion,r.Fields.purposeConsents,r.Fields.vendorConsents],e),this[2]=((t={})[r.Segment.CORE]=[r.Fields.version,r.Fields.created,r.Fields.lastUpdated,r.Fields.cmpId,r.Fields.cmpVersion,r.Fields.consentScreen,r.Fields.consentLanguage,r.Fields.vendorListVersion,r.Fields.policyVersion,r.Fields.isServiceSpecific,r.Fields.useNonStandardStacks,r.Fields.specialFeatureOptins,r.Fields.purposeConsents,r.Fields.purposeLegitimateInterests,r.Fields.purposeOneTreatment,r.Fields.publisherCountryCode,r.Fields.vendorConsents,r.Fields.vendorLegitimateInterests,r.Fields.publisherRestrictions],t[r.Segment.PUBLISHER_TC]=[r.Fields.publisherConsents,r.Fields.publisherLegitimateInterests,r.Fields.numCustomPurposes,r.Fields.publisherCustomConsents,r.Fields.publisherCustomLegitimateInterests],t[r.Segment.VENDORS_ALLOWED]=[r.Fields.vendorsAllowed],t[r.Segment.VENDORS_DISCLOSED]=[r.Fields.vendorsDisclosed],t)}},333:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(250);t.SegmentSequence=function(e,t){if(this[1]=[r.Segment.CORE],this[2]=[r.Segment.CORE],2===e.version)if(e.isServiceSpecific)this[2].push(r.Segment.PUBLISHER_TC);else{var n=!(!t||!t.isForVendors);n&&!0!==e[r.Fields.supportOOB]||this[2].push(r.Segment.VENDORS_DISCLOSED),n&&(e[r.Fields.supportOOB]&&e[r.Fields.vendorsAllowed].size>0&&this[2].push(r.Segment.VENDORS_ALLOWED),this[2].push(r.Segment.PUBLISHER_TC))}}},780:(e,t,n)=>{"use strict";function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),r(n(14)),r(n(333))},265:function(e,t){"use strict";var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(t){var n=e.call(this,t)||this;return n.name="DecodingError",n}return r(t,e),t}(Error);t.DecodingError=i},181:function(e,t){"use strict";var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(t){var n=e.call(this,t)||this;return n.name="EncodingError",n}return r(t,e),t}(Error);t.EncodingError=i},565:function(e,t){"use strict";var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(t){var n=e.call(this,t)||this;return n.name="GVLError",n}return r(t,e),t}(Error);t.GVLError=i},995:function(e,t){"use strict";var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(t,n,r){void 0===r&&(r="");var i=e.call(this,"invalid value "+n+" passed for "+t+" "+r)||this;return i.name="TCModelError",i}return r(t,e),t}(Error);t.TCModelError=i},458:(e,t,n)=>{"use strict";function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),r(n(265)),r(n(181)),r(n(565)),r(n(995))},88:(e,t,n)=>{"use strict";function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),r(n(170)),r(n(458)),r(n(250)),r(n(186)),r(n(61)),r(n(56)),r(n(382)),r(n(381))},867:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.root=null,t}return i(t,e),t.prototype.isEmpty=function(){return!this.root},t.prototype.add=function(e){var t,n={value:e,left:null,right:null};if(this.isEmpty())this.root=n;else for(t=this.root;;)if(et.value))break;if(null===t.right){t.right=n;break}t=t.right}},t.prototype.get=function(){for(var e=[],t=this.root;t;)if(t.left){for(var n=t.left;n.right&&n.right!=t;)n=n.right;n.right==t?(n.right=null,e.push(t.value),t=t.right):(n.right=t,t=t.left)}else e.push(t.value),t=t.right;return e},t.prototype.contains=function(e){for(var t=!1,n=this.root;n;){if(n.value===e){t=!0;break}e>n.value?n=n.right:et.value)n=t,t=t.right,r="right";else{if(t.left||t.right)if(t.left)if(t.right){var i=this.min(t.right);this.remove(i,t.right),t.value=i}else n?n[r]=t.left:this.root=t.left;else n?n[r]=t.right:this.root=t.right;else n?n[r]=null:this.root=null;t=null}},t}(n(186).Cloneable);t.BinarySearchTree=o},301:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){}return e.prototype.has=function(t){return e.langSet.has(t)},e.prototype.forEach=function(t){e.langSet.forEach(t)},Object.defineProperty(e.prototype,"size",{get:function(){return e.langSet.size},enumerable:!0,configurable:!0}),e.langSet=new Set(["BG","CA","CS","DA","DE","EL","EN","ES","ET","FI","FR","HR","HU","IT","JA","LT","LV","MT","NL","NO","PL","PT","RO","RU","SK","SL","SV","TR","ZH"]),e}();t.ConsentLanguages=n},731:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){}return e.cmpId="cmpId",e.cmpVersion="cmpVersion",e.consentLanguage="consentLanguage",e.consentScreen="consentScreen",e.created="created",e.supportOOB="supportOOB",e.isServiceSpecific="isServiceSpecific",e.lastUpdated="lastUpdated",e.numCustomPurposes="numCustomPurposes",e.policyVersion="policyVersion",e.publisherCountryCode="publisherCountryCode",e.publisherCustomConsents="publisherCustomConsents",e.publisherCustomLegitimateInterests="publisherCustomLegitimateInterests",e.publisherLegitimateInterests="publisherLegitimateInterests",e.publisherConsents="publisherConsents",e.publisherRestrictions="publisherRestrictions",e.purposeConsents="purposeConsents",e.purposeLegitimateInterests="purposeLegitimateInterests",e.purposeOneTreatment="purposeOneTreatment",e.specialFeatureOptins="specialFeatureOptins",e.useNonStandardStacks="useNonStandardStacks",e.vendorConsents="vendorConsents",e.vendorLegitimateInterests="vendorLegitimateInterests",e.vendorListVersion="vendorListVersion",e.vendorsAllowed="vendorsAllowed",e.vendorsDisclosed="vendorsDisclosed",e.version="version",e}();t.Fields=n},626:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(186),s=n(458),a=n(473),c=function(e){function t(t,n){var r=e.call(this)||this;return void 0!==t&&(r.purposeId=t),void 0!==n&&(r.restrictionType=n),r}return i(t,e),t.unHash=function(e){var n=e.split(this.hashSeparator),r=new t;if(2!==n.length)throw new s.TCModelError("hash",e);return r.purposeId=parseInt(n[0],10),r.restrictionType=parseInt(n[1],10),r},Object.defineProperty(t.prototype,"hash",{get:function(){if(!this.isValid())throw new Error("cannot hash invalid PurposeRestriction");return""+this.purposeId+t.hashSeparator+this.restrictionType},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"purposeId",{get:function(){return this.purposeId_},set:function(e){this.purposeId_=e},enumerable:!0,configurable:!0}),t.prototype.isValid=function(){return Number.isInteger(this.purposeId)&&this.purposeId>0&&(this.restrictionType===a.RestrictionType.NOT_ALLOWED||this.restrictionType===a.RestrictionType.REQUIRE_CONSENT||this.restrictionType===a.RestrictionType.REQUIRE_LI)},t.prototype.isSameAs=function(e){return this.purposeId===e.purposeId&&this.restrictionType===e.restrictionType},t.hashSeparator="-",t}(o.Cloneable);t.PurposeRestriction=c},96:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(626),s=n(867),a=n(473),c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.bitLength=0,t.map=new Map,t}return i(t,e),t.prototype.has=function(e){return this.map.has(e)},t.prototype.isOkToHave=function(e,t,n){var r,i=!0;if(null===(r=this.gvl)||void 0===r?void 0:r.vendors){var o=this.gvl.vendors[n];if(o)if(e===a.RestrictionType.NOT_ALLOWED)i=o.legIntPurposes.includes(t)||o.purposes.includes(t);else if(o.flexiblePurposes.length)switch(e){case a.RestrictionType.REQUIRE_CONSENT:i=o.flexiblePurposes.includes(t)&&o.legIntPurposes.includes(t);break;case a.RestrictionType.REQUIRE_LI:i=o.flexiblePurposes.includes(t)&&o.purposes.includes(t)}else i=!1;else i=!1}return i},t.prototype.add=function(e,t){if(this.isOkToHave(t.restrictionType,t.purposeId,e)){var n=t.hash;this.has(n)||(this.map.set(n,new s.BinarySearchTree),this.bitLength=0),this.map.get(n).add(e)}},t.prototype.getVendors=function(e){var t=[];if(e){var n=e.hash;this.has(n)&&(t=this.map.get(n).get())}else{var r=new Set;this.map.forEach((function(e){e.get().forEach((function(e){r.add(e)}))})),t=Array.from(r)}return t},t.prototype.getRestrictionType=function(e,t){var n;return this.getRestrictions(e).forEach((function(e){e.purposeId===t&&(void 0===n||n>e.restrictionType)&&(n=e.restrictionType)})),n},t.prototype.vendorHasRestriction=function(e,t){for(var n=!1,r=this.getRestrictions(e),i=0;i{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),(n=t.RestrictionType||(t.RestrictionType={}))[n.NOT_ALLOWED=0]="NOT_ALLOWED",n[n.REQUIRE_CONSENT=1]="REQUIRE_CONSENT",n[n.REQUIRE_LI=2]="REQUIRE_LI"},858:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),(n=t.Segment||(t.Segment={})).CORE="core",n.VENDORS_DISCLOSED="vendorsDisclosed",n.VENDORS_ALLOWED="vendorsAllowed",n.PUBLISHER_TC="publisherTC"},130:(e,t,n)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0});var i=n(858),o=function(){function e(){}return e.ID_TO_KEY=[i.Segment.CORE,i.Segment.VENDORS_DISCLOSED,i.Segment.VENDORS_ALLOWED,i.Segment.PUBLISHER_TC],e.KEY_TO_ID=((r={})[i.Segment.CORE]=0,r[i.Segment.VENDORS_DISCLOSED]=1,r[i.Segment.VENDORS_ALLOWED]=2,r[i.Segment.PUBLISHER_TC]=3,r),e}();t.SegmentIDs=o},315:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0},t.prototype.isSet=function(e){var t=!1;return e instanceof Set&&(t=Array.from(e).every(this.isValidNumber)),t},t.prototype.set=function(e){var t=this;if(Array.isArray(e))e.forEach((function(e){return t.set(e)}));else if(this.isSet(e))this.set(Array.from(e));else if(this.isIntMap(e))this.set(Object.keys(e).map((function(e){return+e})));else{if(!this.isValidNumber(e))throw new a.TCModelError("set()",e,"must be positive integer array, positive integer, Set, or IntMap");this.set_.add(e),this.maxId_=Math.max(this.maxId,e),this.bitLength=0}},t.prototype.empty=function(){this.set_=new Set},t.prototype.forEach=function(e){for(var t=1;t<=this.maxId;t++)e(this.has(t),t)},Object.defineProperty(t.prototype,"size",{get:function(){return this.set_.size},enumerable:!0,configurable:!0}),t.prototype.setAll=function(e){this.set(e)},t}(s.Cloneable);t.Vector=c},250:(e,t,n)=>{"use strict";function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),r(n(867)),r(n(301)),r(n(731)),r(n(626)),r(n(96)),r(n(473)),r(n(858)),r(n(130)),r(n(315))},535:(e,t,n)=>{"use strict";t.dQ=t.Q$=void 0;var r,i=n(88);function o(){for(var e=[],t=0;t{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";var e=n(660),t=n(615),r=n(535);void 0===window.OADTS_InLine&&(window.OADTS_InLine=function(n){var i,o,s,a,c,u,l,d,h,p=5,f=1,m=!1,g=function(){f--,i=!1,o=!1,s=!1,a=!1,u=!1,c=!0,l=!1,h=!1,d={}};g();var v=window,y=n.zoneid?parseInt(n.zoneid):0,E=v,b=!1,w=!1,T=!1,_=!1,L="atg"+Math.floor(9999999999*Math.random()),C=parseInt("0"),A="9:16",I="media.oadts.com",R="/www/delivery/",x=!1,S=!1,O=!1,N=!1,P=n.pipView||[].indexOf&&"3528,3939,4540,4576,5080".split(",").indexOf(""+y)>=0,k=parseInt("0"),V=350,F=620,U=0,D=0,M=0,B=0,j=0,H=0,W=!!parseInt("0"),G=!("WebkitAppearance"in document.documentElement.style),q=!1,X=function(t){if(C){if(C>1){if(!q){var n=q=E.document.createElement("DIV");(n=n.style).position="fixed",n.top=n.left="0px",n.width="100%",n.height="100px",n.zIndex="9999999",n.overflow="scroll",n.border="2px solid red",n.backgroundColor="white",E.document.body.appendChild(q)}try{q.appendChild(E.document.createTextNode(t)),q.appendChild(E.document.createElement("BR"))}catch(e){}}try{(new e.Console).log(t)}catch(e){}}},z=function(e,t){if(C)for(var n=0;n0){var a=(0,e.getClipRect)(i,t);if(a){if(!(a.top||a.left||a.width||a.height))return-1;var c=a.top-n,u=a.top+s,l=$(),d=(0,e.getDocumentScrollTop)(i);return c>d+l.h||ud+l.h&&(u=d+l.h),u>=c&&(o=Math.round(100*(u-c)/s))>100&&(o=100),X(r+o+" y1="+c+" y2="+u),o)}}}return X(r+"0"),0},Y=function(e){if(!1!==T){X("send: "+e);try{e="atg://"+JSON.stringify({dir:"in",cmd:e}),"function"==typeof T.postMessage?T.postMessage(e,"*"):"function"==typeof T.contentWindow.postMessage&&T.contentWindow.postMessage(e,"*")}catch(e){X(e)}}},K=function(e){if(X("playPauseVideo: setPlay="+e),c===e)if(X("playPauseVideo: is_paused="+c),e&&!1!==T&&!a)try{var t=!1;if(P)for(var n=E.document.getElementsByTagName("video"),r=0;!t&&r=s&&c)return c}else if(l.top>r)return c}}return c},ae=function(e){return"string"==typeof e?Math.floor(parseInt(e)*screen.width/100):e},ce=function(e,t){var n,r=A.match(/vertical/),i="string"==typeof(n=t.maxHeight)?Math.floor(parseInt(n)*screen.height/100):n;F=e,V=r?Math.floor(16*e/9):Math.floor(9*e/16),i>0&&V>i&&(V=i,F=r?Math.floor(9*V/16):Math.floor(16*V/9)),b.width=F,b.height=V,w.style.width=F+"px",w.style.height=V+"px"};({minWidth:parseInt("300"),defaultPosition:parseInt("150"),allowedNodes:"",allowedRegex:!1,restrictNodes:"",restrictRegex:!1,css:!1,endFunc:!1,maxWidth:0,maxHeight:0,iOS:/iPad|iPhone|iPod/.test(navigator.userAgent)&&!v.MSStream,adv:!1,openVideo:function(){X("openVideo: is_paused="+(c=!1)),this.css&&(w.className=this.css),w.style.display="block",_&&(w.style.marginBottom="10px");var t=this,n=parseInt(w.style.height)||0,r=E.setInterval((function(){var e,i;(n+=16)>V&&(E.clearInterval(r),n=V,!1!==ie&&(e=ie.dom=E.document.createElement("DIV"),i=e.style,e.id="ad_banner_adv",e.appendChild(E.document.createTextNode(ie.text)),i.width=F+"px",w.parentNode.insertBefore(e,"top"==ie.pos?w:w.nextSibling)),u=!0,K(!1),t.isScrolledIntoView(),O&&N&&(N.style.display="inline-block"),P&&Y("pip")),w.style.height=n+"px";try{E.dispatchEvent(new Event("resize"))}catch(e){}}),3);G&&Z(),H=function(){u&&t.resize_frame()},(0,e.addEvent)(E,"resize",H)},closeVideo:function(e){var t=this,n=w.style,r="0px"!=n.height?parseInt(w.style.height)||V:0,i=function(){if(b.src="about:_blank",_&&(n.margin="0px"),n.display="none",w.className="atg-outstream-closed",t.cleanup(),!1!==t.endFunc)try{t.endFunc(e)}catch(e){}if(P){for(var r=!1,i=0;i0&&E.setTimeout((function(){t.restartInit()}),1e3*p)};if(u=!1,ie.dom&&(ie.dom.parentNode.removeChild(ie.dom),ie.dom=!1),N&&(N.style.display="none"),r)var o=E.setInterval((function(){(r-=8)<0&&(E.clearInterval(o),i(),r=0),n.height=r+"px";try{E.dispatchEvent(new Event("resize"))}catch(e){}}),3);else i()},closeButton:function(){var t=this,n=(N=E.document.createElement("DIV")).style;n.color="#fff",n.position="absolute",n.right="5px",n.textDecoration="none",n.top="5px",n.fontWeight="bold",n.cursor="pointer",n.zIndex="999999",n.backgroundColor="#605F61",n.border="1px solid #AEAEAE",n.borderRadius="30px",n.fontSize="29px",n.lineHeight="0px",n.padding="13px 5px",n.fontFamily="sans-serif",n.display="none",N.appendChild(E.document.createTextNode("x")),(0,e.addEvent)(N,"click",(function(){t.closeVideo()})),w.style.position="relative",w.appendChild(N)},onTouched:function(){!i||!o||a||h||this.iOS||(h=!0,X("onTouch"),K(!0),X("onTouched: is_paused="+(c=!1)))},onMessage:function(e){try{if("atg://"===e.data.substr(0,6)){var t=JSON.parse(e.data.substr(6)),n=!1;if(t&&t.id===L&&"out"===t.dir){var r=e.origin,i="//"+E.location.hostname;if(X("M: "+e.data),r.indexOf(i)<4)return;if("fire"===t.cmd&&(n=t.fire),"tell"===t.cmd&&(n=t.tell),!1!==n){var c=this;if("end"===n||"novideo"===n){var u="novideo"===n;!u&&N?(c.cleanup(),N.style.display="inline-block"):c.closeVideo(u)}else o||"loaded"!==n?s||"ready"!==n?a||"start"!==n&&"ad.start"!==n||(X("GOT: got_videoStart"),a=!0,"flexible"===x&&"ad.start"===n&&t.vWidth&&t.vHeight&&(A=t.vHeight>t.vWidth?"vertical":"16:9",ce(F,c)),c.openVideo()):(s=!0,X("GOT: has_ready")):(o=!0,X("GOT: has_loaded"))}else X("M: "+e.data)}}}catch(e){}},isScrolledIntoView:function(){function r(){var e=Q(b,V);return e<0&&(e=Q(w,V))<0&&"none"==w.style.display&&(w.style.display="block",e=Q(w,V),w.style.display="none"),e}var o,c;i?a?Q(w)>50?(re(13),K(!0)):P||K(!1):s&&r()>50&&K(!0):r()>=70&&(X("isScrolledIntoView: loading"),i=!0,P?function(){b.style.display="none",w.id="videoDiv";var t=function(){var t,n=document.createElement("script");n.src=ne("asv")+"&domid=videoDiv&pipView=outstream-"+P,n.type="text/javascript",n.async=!0,n.setAttribute&&(n.setAttribute("async","true"),n.setAttribute("type","text/javascript")),t=function(){(0,e.delEvent)(n,"load",t),T=E},(0,e.addEvent)(n,"load",t),document.documentElement.lastChild.appendChild(n)};E.document.body?t():(0,e.addEvent)(E,"load",t)}():(o=ne("avc"),c=e=>{b.contentDocument.open(),b.contentDocument.write(e),b.contentDocument.close()},o+="&autostart="+(o.indexOf("&startmuted=1&")>0?"1":"0"),(0,e.miniajax)({url:o,withCredentials:!0},(function(r,i){if(200==r&&""!=i){var o=JSON.parse(i),s=o.b,a=JSON.parse((0,e.b64decode)(o.c)),u=new t.OUTSTREAMResolver({debug:!0}),l=new e.Console;l.log(a),u.resolve(a).then((function(t){if(t.found)a.config.index=t.waterfallIndex,a.waterfall[a.config.index].xml=t.vastxml,s=s.replace(o.c,(0,e.b64encode)(JSON.stringify(a))),c(s);else if(!1!==n.endFunc)try{n.endFunc(!0)}catch(e){}}),(function(e){l.warn(e),c(s)}))}}))),re(12))},getNodeIndex:function(e){if(e&&e.parentNode)for(var t=0;t=t.parentNode.childNodes.length)return!1;t=t.parentNode.childNodes[n]}while("#text"==t.nodeName&&""==(0,e.strTrim)(t.nodeValue));return n},allowedNode:function(e,t){if(e){var n,r=this.getNodeIndex(e);if(!1!==r)for(;!1!==(n=this.nextNode(e,r,t));){var i,o=e.parentNode.childNodes[n];if(i=t<0?o.nodeName+","+e.nodeName:e.nodeName+","+o.nodeName,this.testNodePair(i))return e;e=o,r=n}}return!1},testLocation:function(t){var n=$().h,r=E.document,i=(0,e.getClipRect)(r,t),o=Math.floor(n*this.defaultPosition/100);i&&o>=t.clientHeight&&(o=i.top+i.height/2);for(var s=o-.25*n,a=o+.75*n,c=se(t,s,a,0);c;){var u=this.allowedNode(c,-1),l=this.allowedNode(c,1);if(u||l){if(u&&l){var d=(0,e.getClipRect)(r,u).top+u.clientHeight/2,h=(0,e.getClipRect)(r,l).top+l.clientHeight/2,p=(s+a)/2;return Math.abs(p-d)=this.minWidth){var c=9999,u=(0,e.getClipRect)(E.document,a);u&&(c=Math.abs(r-u.top)),(!1===i||o>c)&&(i=a,o=c)}}return i&&z([i],"green"),i},resize_frame:function(){var e=this,t=w.parentNode,n=t.offsetWidth;try{n-=parseInt(J(t,"padding-left"))}catch(e){}try{n-=parseInt(J(t,"padding-right"))}catch(e){}if(n>=150&&nF){var r=ae(e.maxWidth);r>e.minWidth&&n>r&&(n=r),n>F&&ce(n,e)}},setup:function(e,t){var n,r=this,o=ae(r.maxWidth);X("setup"),F=e.parentNode.offsetWidth||e.offsetWidth;try{F-=parseInt(J(e.parentNode,"padding-left"))}catch(e){}try{F-=parseInt(J(e.parentNode,"padding-right"))}catch(e){}return F=this.minWidth){t.push(c);break}c=c.parentNode}}catch(e){}return t},postinit:function(){var t=this;U=function(e){t.onMessage(e)},D=function(){t.isScrolledIntoView()},M=function(e){t.onTouched(e)},E!=v&&(0,e.addEvent)(v,"message",U),(0,e.addEvent)(E,"message",U),(0,e.addEvent)(E,"scroll",D),(0,e.addEvent)(E,"touchmove",M),(S||O)&&t.closeButton(),v.setTimeout(D,0)},init:function(t){var n=this;if(3567==y&&function(){try{var e=E.document.getElementsByTagName("meta");for(var t in e)if("primarycategory"===e[t].name&&"string"==typeof e[t].content&&("Tech"===e[t].content||"Style"===e[t].content))return!0}catch(e){}return!1}())return 0;if(""!==n.allowedNodes)try{n.allowedRegex=new RegExp(n.allowedNodes)}catch(e){}if(""!==n.restrictNodes)try{n.restrictRegex=new RegExp(n.restrictNodes)}catch(e){}if(!t)return 0;X("inline"),X(t),re(10);var r=!1;if(t.location&&(r=n.getLocation(t.location)),!r){var i=!!t.placement&&function(t){var n=E.document,r=n.getElementById(t);if(r)return r;var i,o,s,a=function(e,t){for(;t&&t!==e;)t=t.parentNode;return t===e},c=function(t,r,i){var o=(0,e.getElements)(n,t);if(o){var s,c,u=(0,e.getElements)(n,r);if(u)for(c=0;c/),p=l[o].split(/0?e[t]:"string"===r&&e[t].match(/^[0-9]+%?$/)?e[t].indexOf("%")<0?parseInt(e[t]):e[t]:n}if(n.maxWidth=o(t,"maxWidth",0),n.maxHeight=o(t,"maxHeight",0),k&&(n.maxHeight="80%",void 0!==t.mobile&&(n.maxWidth=o(t.mobile,"maxWidth",n.maxWidth),n.maxHeight=o(t.mobile,"maxHeight",n.maxHeight))),!E)return 0;if(!r||!n.setup(r,!!t.behind))return 0;if(void 0!==t.cust){try{ee=function(e){var t="";if(e.hasOwnProperty)for(var n in e)e.hasOwnProperty(n)&&n.match(/^[\w\d]+$/)&&(t+="&cust-"+n+"="+E.encodeURIComponent(e[n]));return t}(t.cust)}catch(e){}X("custom="+n.cust)}if(["euconsent","eu"].map((function(e){void 0!==t[e]&&(ee+="&"+e+"="+E.encodeURIComponent(t[e]))})),n.css="string"==typeof t.css?t.css+" ":"","function"==typeof t.endFunc&&(n.endFunc=t.endFunc),void 0!==t.advertisment&&(ie={text:"reklamy",pos:"top",dom:!1}),"number"==typeof t.repeatCount&&t.repeatCount>=1)try{f=parseInt(t.repeatCount)-1}catch(e){}if("number"==typeof t.repeatDelay&&t.repeatDelay>=0)try{p=parseInt(t.repeatDelay)}catch(e){}void 0!==t.dontClose&&(S=1),void 0!==t.canClose&&(O=1),void 0!==t.display&&(x=t.display),re(11),y&&!isNaN(y)&&n.postinit()},tcfv2Init:function(e){var t=this;(0,r.dQ)(e,(function(n){switch(n){case r.Q$.None:return void("function"==typeof e.endFunc&&e.endFunc());case r.Q$.NoCookie:m=!0}t.init(e)}))},restartInit:function(){g(),re(9),re(10),re(11),E!=v&&(0,e.addEvent)(v,"message",U),(0,e.addEvent)(E,"message",U),(0,e.addEvent)(E,"scroll",D),(0,e.addEvent)(E,"touchmove",M),v.setTimeout(D,0)},contentLoaded:function(e,t){var n=!1,r=!0,i=e.document,o=i.documentElement,s=i.addEventListener,a=s?"addEventListener":"attachEvent",c=s?"removeEventListener":"detachEvent",u=s?"":"on",l=function(r){"readystatechange"==r.type&&"complete"!=i.readyState||(("load"==r.type?e:i)[c](u+r.type,l,!1),!n&&(n=!0)&&t.call(e,r.type||r))},d=function(){try{o.doScroll("left")}catch(e){return void setTimeout(d,50)}l("poll")};if("complete"==i.readyState)t.call(e,"lazy");else{if(!s&&o.doScroll){try{r=!e.frameElement}catch(e){}r&&d()}i[a](u+"DOMContentLoaded",l,!1),i[a](u+"readystatechange",l,!1),e[a](u+"load",l,!1)}},domReady:function(e){var t=this;re(9),(E=e.window?e.window:top).document.body&&e.skipdomtest?t.tcfv2Init(e):t.contentLoaded(E,(function(){t.tcfv2Init(e)}))}}).domReady(n)})})()})();