var __defProp=Object.defineProperty,__defNormalProp=(e,t,n)=>t in e?__defProp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,__publicField=(e,t,n)=>__defNormalProp(e,"symbol"!=typeof t?t+"":t,n);(function(){"use strict";var _documentCurrentScript="undefined"!=typeof document?document.currentScript:null;const isActiveTabBrowser=function(){var e,t,n={hidden:"visibilitychange",webkitHidden:"webkitvisibilitychange",mozHidden:"mozvisibilitychange",msHidden:"msvisibilitychange"};for(e in n)if(e in document){t=n[e];break}return function(n){return n&&document.addEventListener(t,n),!document[e]}}();function getBrowserWidth(){return Math.max(document.body.scrollWidth,document.documentElement.scrollWidth,document.body.offsetWidth,document.documentElement.offsetWidth,document.documentElement.clientWidth)}function findParentWithClass(e,t){let n="";if(null!=e&&(n=e.className,n.indexOf(t)>0))return e;for(;(e=e.parentNode)&&(e.className||"").indexOf(t)<0;);return e}function checkVisible(e){const t=getViewportHeight(),n=getScrollY(),i=getOffsetTop(e),a=e.offsetHeight,s=.75*a;return i+s<=t+n&&n<=i+a-s}function getViewportHeight(){const e=document.documentElement;return window.innerWidth?window.innerHeight:e&&!isNaN(e.clientHeight)?e.clientHeight:0}function getScrollY(){return window.pageYOffset?window.pageYOffset:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}function getOffsetTop(e){let t=e,n=0;for(;t&&"body"!==t.tagName.toLowerCase();)n+=t.offsetTop,t=t.offsetParent;return n}function ref(e){requestAnimationFrame((()=>{requestAnimationFrame((()=>{e()}))}))}function getMilliseconds(){return(new Date).getTime()}const prefix="OC:",console$1={log:window.console.log.bind(window.console,prefix+" %s"),error:window.console.error.bind(window.console,prefix+" %s"),info:window.console.info.bind(window.console,prefix+" %s"),warn:window.console.warn.bind(window.console,prefix+" %s")};function kebabCase(e){return e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,((e,t)=>(t?"-":"")+e.toLowerCase()))}function decodeB64(e){return decodeURIComponent(atob(e).split("").map((e=>"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2))).join(""))}function getStorageItem(e,t=!0){const n=window.localStorage.getItem(e)||"";return n?t?JSON.parse(n):n:""}function setStorageItem(e,t,n=!0){window.localStorage.setItem(e,n?JSON.stringify(t):t)}function isMobileOrTabletDevice(){let e=!1;var t;return t=navigator.userAgent||navigator.vendor||window.opera,(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substr(0,4)))&&(e=!0),e||getBrowserWidth()<1e3}class DevFeatures{constructor(e){__publicField(this,"url"),this.url=e}updateUrlScript(){if(""==this.url){const e=document.getElementsByTagName("script");for(let t=0;t=0){const e=n.split("//")[0],t=n.split("//")[1].split("/")[0];this.url=e+"//"+t,console$1.log(`updateUrlScript - ${this.url}`);break}}return this.url}return this.url}}var commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function getDefaultExportFromCjs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var freeGlobal$1="object"==typeof commonjsGlobal&&commonjsGlobal&&commonjsGlobal.Object===Object&&commonjsGlobal,_freeGlobal=freeGlobal$1,freeGlobal=_freeGlobal,freeSelf="object"==typeof self&&self&&self.Object===Object&&self,root$4=freeGlobal||freeSelf||Function("return this")(),_root=root$4,root$3=_root,Symbol$4=root$3.Symbol,_Symbol=Symbol$4,Symbol$3=_Symbol,objectProto$5=Object.prototype,hasOwnProperty$4=objectProto$5.hasOwnProperty,nativeObjectToString$1=objectProto$5.toString,symToStringTag$1=Symbol$3?Symbol$3.toStringTag:void 0;function getRawTag$1(e){var t=hasOwnProperty$4.call(e,symToStringTag$1),n=e[symToStringTag$1];try{e[symToStringTag$1]=void 0;var i=!0}catch(s){}var a=nativeObjectToString$1.call(e);return i&&(t?e[symToStringTag$1]=n:delete e[symToStringTag$1]),a}var _getRawTag=getRawTag$1,objectProto$4=Object.prototype,nativeObjectToString=objectProto$4.toString;function objectToString$1(e){return nativeObjectToString.call(e)}var _objectToString=objectToString$1,Symbol$2=_Symbol,getRawTag=_getRawTag,objectToString=_objectToString,nullTag="[object Null]",undefinedTag="[object Undefined]",symToStringTag=Symbol$2?Symbol$2.toStringTag:void 0;function baseGetTag$2(e){return null==e?void 0===e?undefinedTag:nullTag:symToStringTag&&symToStringTag in Object(e)?getRawTag(e):objectToString(e)}var _baseGetTag=baseGetTag$2;function isObject$5(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}var isObject_1=isObject$5,baseGetTag$1=_baseGetTag,isObject$4=isObject_1,asyncTag="[object AsyncFunction]",funcTag="[object Function]",genTag="[object GeneratorFunction]",proxyTag="[object Proxy]";function isFunction$1(e){if(!isObject$4(e))return!1;var t=baseGetTag$1(e);return t==funcTag||t==genTag||t==asyncTag||t==proxyTag}var isFunction_1=isFunction$1,root$2=_root,coreJsData$1=root$2["__core-js_shared__"],_coreJsData=coreJsData$1,coreJsData=_coreJsData,maskSrcKey=(uid=/[^.]+$/.exec(coreJsData&&coreJsData.keys&&coreJsData.keys.IE_PROTO||""),uid?"Symbol(src)_1."+uid:""),uid;function isMasked$1(e){return!!maskSrcKey&&maskSrcKey in e}var _isMasked=isMasked$1,funcProto$1=Function.prototype,funcToString$1=funcProto$1.toString;function toSource$1(e){if(null!=e){try{return funcToString$1.call(e)}catch(t){}try{return e+""}catch(t){}}return""}var _toSource=toSource$1,isFunction=isFunction_1,isMasked=_isMasked,isObject$3=isObject_1,toSource=_toSource,reRegExpChar=/[\\^$.*+?()[\]{}|]/g,reIsHostCtor=/^\[object .+?Constructor\]$/,funcProto=Function.prototype,objectProto$3=Object.prototype,funcToString=funcProto.toString,hasOwnProperty$3=objectProto$3.hasOwnProperty,reIsNative=RegExp("^"+funcToString.call(hasOwnProperty$3).replace(reRegExpChar,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function baseIsNative$1(e){return!(!isObject$3(e)||isMasked(e))&&(isFunction(e)?reIsNative:reIsHostCtor).test(toSource(e))}var _baseIsNative=baseIsNative$1;function getValue$1(e,t){return null==e?void 0:e[t]}var _getValue=getValue$1,baseIsNative=_baseIsNative,getValue=_getValue;function getNative$3(e,t){var n=getValue(e,t);return baseIsNative(n)?n:void 0}var _getNative=getNative$3,getNative$2=_getNative,defineProperty$1=function(){try{var e=getNative$2(Object,"defineProperty");return e({},"",{}),e}catch(t){}}(),_defineProperty=defineProperty$1,defineProperty=_defineProperty;function baseAssignValue$1(e,t,n){"__proto__"==t&&defineProperty?defineProperty(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var _baseAssignValue=baseAssignValue$1;function eq$2(e,t){return e===t||e!=e&&t!=t}var eq_1=eq$2,baseAssignValue=_baseAssignValue,eq$1=eq_1,objectProto$2=Object.prototype,hasOwnProperty$2=objectProto$2.hasOwnProperty;function assignValue$1(e,t,n){var i=e[t];hasOwnProperty$2.call(e,t)&&eq$1(i,n)&&(void 0!==n||t in e)||baseAssignValue(e,t,n)}var _assignValue=assignValue$1,isArray$3=Array.isArray,isArray_1=isArray$3;function isObjectLike$1(e){return null!=e&&"object"==typeof e}var isObjectLike_1=isObjectLike$1,baseGetTag=_baseGetTag,isObjectLike=isObjectLike_1,symbolTag="[object Symbol]";function isSymbol$4(e){return"symbol"==typeof e||isObjectLike(e)&&baseGetTag(e)==symbolTag}var isSymbol_1=isSymbol$4,isArray$2=isArray_1,isSymbol$3=isSymbol_1,reIsDeepProp=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,reIsPlainProp=/^\w*$/;function isKey$1(e,t){if(isArray$2(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!isSymbol$3(e))||(reIsPlainProp.test(e)||!reIsDeepProp.test(e)||null!=t&&e in Object(t))}var _isKey=isKey$1,getNative$1=_getNative,nativeCreate$4=getNative$1(Object,"create"),_nativeCreate=nativeCreate$4,nativeCreate$3=_nativeCreate;function hashClear$1(){this.__data__=nativeCreate$3?nativeCreate$3(null):{},this.size=0}var _hashClear=hashClear$1;function hashDelete$1(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var _hashDelete=hashDelete$1,nativeCreate$2=_nativeCreate,HASH_UNDEFINED$1="__lodash_hash_undefined__",objectProto$1=Object.prototype,hasOwnProperty$1=objectProto$1.hasOwnProperty;function hashGet$1(e){var t=this.__data__;if(nativeCreate$2){var n=t[e];return n===HASH_UNDEFINED$1?void 0:n}return hasOwnProperty$1.call(t,e)?t[e]:void 0}var _hashGet=hashGet$1,nativeCreate$1=_nativeCreate,objectProto=Object.prototype,hasOwnProperty=objectProto.hasOwnProperty;function hashHas$1(e){var t=this.__data__;return nativeCreate$1?void 0!==t[e]:hasOwnProperty.call(t,e)}var _hashHas=hashHas$1,nativeCreate=_nativeCreate,HASH_UNDEFINED="__lodash_hash_undefined__";function hashSet$1(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=nativeCreate&&void 0===t?HASH_UNDEFINED:t,this}var _hashSet=hashSet$1,hashClear=_hashClear,hashDelete=_hashDelete,hashGet=_hashGet,hashHas=_hashHas,hashSet=_hashSet;function Hash$1(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1}var _listCacheHas=listCacheHas$1,assocIndexOf=_assocIndexOf;function listCacheSet$1(e,t){var n=this.__data__,i=assocIndexOf(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this}var _listCacheSet=listCacheSet$1,listCacheClear=_listCacheClear,listCacheDelete=_listCacheDelete,listCacheGet=_listCacheGet,listCacheHas=_listCacheHas,listCacheSet=_listCacheSet;function ListCache$1(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&e{globalState[e]=globalState[e].filter((e=>e!==t))})):globalState[e]=n?globalState[e].filter((e=>_get(e,n).toString()!==t.toString())):globalState[e].filter((e=>e.toString()!==t.toString()))}}let StateInstance=Object.freeze(new State);const config={getZone:{method:"GET",transformResponse:"getTeasers",url:"/ocean/zone"},getCreatives:{method:"GET",url:"/ocean/creatives"},sendView:e=>({method:"GET",url:e})};function getTeasers(e){var t,n,i,a,s,o,r;const l=e.settings;return(null==(t=null==l?void 0:l.closeItem)?void 0:t.delay)<=9&&(l.closeItem.delay=10),"off"!==(null==(n=null==l?void 0:l.display)?void 0:n.animation.effect)&&(null==(i=null==l?void 0:l.display)?void 0:i.animation.speed)<=9&&(l.display.animation.effect="off"),(null==(a=null==l?void 0:l.minimalImpressionInterval)?void 0:a.amount)&&"Click"===(null==(s=null==l?void 0:l.minimalImpressionInterval)?void 0:s.type)&&(l.minimalImpressionInterval.amount=l.minimalImpressionInterval.amount-1),(null==(o=null==l?void 0:l.showDelay)?void 0:o.amount)&&"Click"===(null==(r=null==l?void 0:l.showDelay)?void 0:r.type)&&(l.showDelay.amount=l.showDelay.amount-1),{...e,settings:l}}function transformResponse(e,t){return"getTeasers"===t?getTeasers(e):e}class API{constructor(){__publicField(this,"url"),__publicField(this,"fingerprint"),this.url=StateInstance.getPropertyByName("baseUrl"),this.fingerprint=StateInstance.getPropertyByName("fingerprint")}getZone(e){const t={...config.getZone};return t.url+=`?zoneId=${e}`,this.createRequest(t)}getCreatives(e){var t;const n=StateInstance.getPropertyByKey(`advertising.${e}`),i={uid:StateInstance.getPropertyByName("userToken"),ClientRequestId:StateInstance.getPropertyByName("clientRequestId"),zoneId:e,fingerprint:null==(t=this.fingerprint)?void 0:t.hash,previous_referrer:document.referrer,referrer:this.getReferrer()};"boolean"==typeof(null==n?void 0:n.isWap)&&(i.alternative=n.isWap?"include":"exclude");const a="?"+new URLSearchParams(i).toString(),s={...config.getCreatives};return s.url+=a,this.createRequest(s)}getReferrer(){const e=window.location.href;try{return encodeURI(e)}catch(t){return e}}sendView(e){return this.createRequest({...config.sendView,body:e})}async createRequest(e){const t={};if(null==e?void 0:e.headers){const n=new Headers;Object.keys(e.headers).forEach((t=>{n.append(t,e.headers[t])})),t.headers=n}(null==e?void 0:e.method)&&(t.method=null==e?void 0:e.method);let n=await fetch(this.url+e.url,t);if(n.ok){const t=await n.json();return e.transformResponse?transformResponse(t,e.transformResponse):t}return Promise.reject(n)}}function checkDeviceMode(e){var t;const n=null==(t=StateInstance.getPropertyByKey(`advertising.${e}`).settings)?void 0:t.deviceMode;return!!("all"===n||"desktop"===n&&!isMobileOrTabletDevice()||"mobile"===n&&isMobileOrTabletDevice())||(console$1.warn(`invalid device mode for zoneID: ${e}, deviceMode: ${n}`),!1)}function checkBaseValidation(e){const t=StateInstance.getPropertyByKey(`advertising.${e}`);return!!checkDeviceMode(e)&&(!!t.creatives.general.length||t.isWap&&t.creatives.alternative.length)}const sizes$1={md:768,sm:430,xs:350};function addStyles(e,t){var n;if(e+=`\n \n ",a.insertAdjacentHTML("beforeend",s),"manual"===(null==(t=this.settings.closeItem)?void 0:t.mode)&&a.querySelector(".oc-page-push__close").addEventListener("click",(()=>{this.closePush()})),a}createIFrame(e){const t=document.createElement("iframe");return t.srcdoc=this.addUrlToHtmlVariables(decodeB64(e))+"\n \n ",t.title="octoclick advertisement",t.className="oc-page-push__frame",t.onload=()=>{t.contentWindow.document.addEventListener("click",(()=>{this.sendViewCounter()})),this.showPush()},t}async sendViewCounter(){await this.sendView(this.creatives[0].id),this.afterSendViewCounter()}afterSendViewCounter(){0!==this.settings.minimalImpressionInterval.amount&&UpdateAdvertising$1.createTimeoutForUpdate(this.zoneId)}startWatcherForCheckIsViewed(){const e=()=>{setTimeout((()=>this.sendViewCounter()),DELAY_BEFORE_SENDING_IMPRESSION)};isActiveTabBrowser(void 0)?e():this.intervalForWatchVisibility=window.setInterval((()=>{isActiveTabBrowser(void 0)&&(clearInterval(this.intervalForWatchVisibility),e())}),300)}initBuildPagePush(){var e;this.inPagePushBlock=this.createPushHtml(),(null==(e=this.settings.display)?void 0:e.attention_effect)&&(this.inPagePushBackground=this.createAttentionBackground(),document.body.insertAdjacentElement("afterbegin",this.inPagePushBackground)),document.body.insertAdjacentElement("afterbegin",this.inPagePushBlock)}removeAttentionBackground(){const e=()=>{this.inPagePushBackground.removeEventListener("transitionend",e),this.inPagePushBackground.remove()};this.inPagePushBackground.addEventListener("transitionend",e),this.inPagePushBackground.classList.remove("show")}createAttentionBackground(){const e=(new DOMParser).parseFromString('\n
\n ',"text/html").body.firstElementChild;return e.insertAdjacentHTML("beforeend","\n \n "),e}showPush(){if(this.inPagePushBackground&&(ref((()=>this.inPagePushBackground.classList.add("show"))),setTimeout((()=>this.removeAttentionBackground()),2500)),this.settings.closeItem){const e=()=>{var t;this.inPagePushBlock.classList.add("oc-page-push_progress-end"),this.inPagePushBlock.querySelector(".oc-page-push__progress").removeEventListener("transitionend",e),"manual"!==(null==(t=this.settings.closeItem)?void 0:t.mode)&&this.closePush()};this.inPagePushBlock.querySelector(".oc-page-push__progress").addEventListener("transitionend",e)}"off"!==this.settings.display.animation.effect?(this.endAnimationCallback.push((()=>this.inPagePushBlock.classList.add("oc-page-push_loaded"))),this.runInAnimation()):ref((()=>this.inPagePushBlock.classList.add("oc-page-push_loaded")))}runAnimation(){this.inPagePushBlock.style.display="block",this.inPagePushBlock.classList.add("oc-page-push_animation-start");const e=()=>{var t;this.inPagePushBlock.classList.remove("oc-page-push_animation-start","oc-page-push_animation-end"),(null==(t=this.endAnimationCallback)?void 0:t.length)&&this.endAnimationCallback.forEach((e=>e())),this.endAnimationCallback=[],this.inPagePushBlock.removeEventListener("transitionend",e)};ref((()=>{this.inPagePushBlock.addEventListener("transitionend",e),this.inPagePushBlock.classList.add("oc-page-push_animation-end")}))}runInAnimation(){this.inPagePushBlock.classList.add(`oc-page-push_${this.settings.display.animation.effect}-in`),this.endAnimationCallback.push((()=>this.inPagePushBlock.classList.remove(`oc-page-push_${this.settings.display.animation.effect}-in`))),this.runAnimation()}runOutAnimation(){this.inPagePushBlock.classList.add(`oc-page-push_${this.settings.display.animation.effect}-out`),this.endAnimationCallback.push((()=>this.inPagePushBlock.classList.remove(`oc-page-push_${this.settings.display.animation.effect}-out`))),this.runAnimation()}closePush(){this.intervalForWatchVisibility&&clearInterval(this.intervalForWatchVisibility),this.inPagePushBackground&&this.removeAttentionBackground(),"off"!==this.settings.display.animation.effect?(this.endAnimationCallback.push((()=>{this.inPagePushBlock.style.display="none",this.inPagePushBlock.remove()})),this.runOutAnimation()):this.inPagePushBlock.remove()}}const TEASER_TEXT_PADDING_TOP=3,TEASER_ROW_GAP=5,sizes={md:768,sm:430};function getJustifyByAlign(e){switch(e){case"center":return"center";case"left":return"flex-start";case"right":return"flex-end"}}function generateBorder(e){return`${e.width}px ${e.style} ${e.color}`}function getTotal({horizontal:e=1,vertical:t=1}){return+e*+t}function calculateTeaserSizes(e){return{blockPadding:e.display.cell.margin/2,rowPadding:e.display.cell.margin/2,rowGap:TEASER_ROW_GAP,colPadding:e.display.cell.padding,textPaddingTop:TEASER_TEXT_PADDING_TOP,imageWidth:e.display.image.size}}function calculatePaddingForPlaceholder(e,t,n){let i=t.rowPadding+(n-1)*t.rowGap,a=e.elements.vertical*(e.display.cell.border.width+t.colPadding),s=(e.display.font.size+t.textPaddingTop)*n;return t.blockPadding+i+a+s}function getAdaptiveStyleForPlaceholder(e,t,n,i,a){var s,o;const r={desktop:`(min-width: ${sizes.md+1}px)`,tablet:`(max-width: ${sizes.md}px) and (min-width: ${sizes.sm+1}px)`,smartphone:`(max-width: ${sizes.sm}px)`};return(null==(s=t.elements[i])?void 0:s.horizontal)&&(null==(o=t.elements[i])?void 0:o.vertical)?` \n @media screen and ${r[i]} {\n #${a}${e} .oc-teaser-placeholder {\n height: ${n.imageWidth*t.elements[i].vertical}px;\n padding: ${calculatePaddingForPlaceholder(t,n,t.elements[i].vertical)}px;\n }\n }\n `:""}function teaserPlaceholderStyles(e,t,n){const i=calculateTeaserSizes(e);let a=""}function teaserStyles(e,t,n){var i,a,s,o,r,l,c,d,u,h,p,g;const m=calculateTeaserSizes(e);let f=""}class Teaser extends baseFormat{constructor(e){super(e),__publicField(this,"rootDiv"),__publicField(this,"isWasFirstView"),this.rootDiv=null,this.isWasFirstView=!1,this.create()}onCreate(){this.initBuildTeaser(),!StateInstance.getPropertyByName("previewMode")&&this.runObserverWatcher()}onUpdate(){super.onUpdate();this.blockElement.querySelector(".oc-teasers")&&this.destroy(),this.isWasFirstView=!1,this.initBuildTeaser(),!StateInstance.getPropertyByName("previewMode")&&this.runObserverWatcher()}onDestroy(){var e;super.onDestroy(),this.viewObserver.disconnect(),null==(e=this.rootDiv)||e.remove()}initBuildTeaser(){var e;this.rootDiv=document.createElement("div"),this.rootDiv.classList.add("oc-teasers"),this.rootDiv.prepend(document.createComment("noindex")),this.rootDiv.append(this.getTeasers());const t=StateInstance.getPropertyByName("blockClass"),n=(null==(e=this.blockElement.id)?void 0:e.includes("bc_teasers_block_"))?"bc_teasers_block_":`${t}-`;this.rootDiv.insertAdjacentHTML("beforeend",teaserStyles(this.settings,this.zoneId,n)),this.rootDiv.append(document.createComment("/noindex")),this.blockElement.append(this.rootDiv)}runObserverWatcher(){this.viewObserver=new IntersectionObserver(this.observerCallback.bind(this),{rootMargin:"0px",threshold:.5}),[...this.blockElement.querySelectorAll(`[data-zone-id="${this.zoneId}"`)].forEach((e=>{e.addEventListener("click",(()=>{StateInstance.getPropertyByName("isClicksDisabled")||e.classList.contains("viewed")||this.runViewLogic(e)})),this.viewObserver.observe(e)}))}observerCallback(e,t){e.forEach((e=>{e.isIntersecting&&!e.target.classList.contains("viewed")?e.target.timeoutId=setTimeout((()=>{if(isActiveTabBrowser(void 0))t.unobserve(e.target),this.runViewLogic(e.target);else{const n=window.setInterval((()=>{isActiveTabBrowser(void 0)&&(t.unobserve(e.target),this.runViewLogic(e.target),window.clearInterval(n))}),300)}}),DELAY_BEFORE_SENDING_IMPRESSION):!e.isIntersecting&&e.target.timeoutId&&(clearTimeout(e.target.timeoutId),e.target.timeoutId=null)}))}getTeasers(){const e=document.createElement("div");return e.classList.add("oc-teaser-row"),this.creatives.forEach((t=>{e.append(this.createTeaserHtml(t))})),e}generateMediaString(e){if("Image"===e.media.type)return`${e.title}`}createTeaserHtml(e){let t=`\n
\n \n \n
\n ${this.generateMediaString(e)}\n
\n

\n ${e.title}\n

\n \n
\n \n `;return(new DOMParser).parseFromString(t,"text/html").body.firstElementChild}async runViewLogic(e){e.classList.add("viewed"),await this.sendView(+e.dataset.teaserId),this.isWasFirstView||(this.isWasFirstView=!0,UpdateAdvertising$1.createTimeoutForUpdate(this.zoneId))}}class Popunder extends baseFormat{constructor(e){super(e),__publicField(this,"elementsForListening"),this.elementsForListening=[],this.popunderHandler=this.popunderHandler.bind(this),this.create()}onCreate(){this.initPopunder()}onUpdate(){super.onUpdate(),this.initPopunder()}onDestroy(){super.onDestroy(),this.elementsForListening.forEach((e=>{e.classList.remove("listener-popunder"),e.removeEventListener("click",this.popunderHandler)}))}initPopunder(){var e,t,n;let i=["body"];(null==(t=null==(e=this.settings)?void 0:e.targetsList)?void 0:t.length)&&(i=null==(n=this.settings)?void 0:n.targetsList),this.elementsForListening=[...document.querySelectorAll(i.join(", "))],this.elementsForListening.forEach((e=>{e.classList.contains("listener-popunder")||(e.classList.add("listener-popunder"),e.addEventListener("click",this.popunderHandler))})),this.elementsForListening.length||console$1.error(`not found popunder targetsList fro zone id: ${this.zoneId}`)}popunderHandler(e){var t;if(!this.validator.isAllowShowAdvertising(!0))return void console$1.log("click failed validation");const n=e.target,i=n.closest("a");if(findParentWithClass(n,"oc-disabled-clicks")||findParentWithClass(n,"oc-page-push")||findParentWithClass(n,"oc-teasers")||findParentWithClass(n,"bigClickTeasersBlock"))return void console$1.warn("trying to open cli while clicking teaser");const a=this.creatives[0].adm,s=(null==i?void 0:i.getAttribute("href"))||location.href,o=this.settings.alwaysOpenInBackground||(null==(t=this.creatives[0].ext)?void 0:t.openInBackground);let r=o?window.open(s):window.open(a,"_blank");if(r){if(o){if(s==location.href){let e='window[window.addEventListener?"addEventListener":"attachEvent"]("DOMContentLoaded",scrollBc);var timeout_id=setTimeout(scrollBc,4444);';e+="function scrollBc(){try{window.scrollTo(SX,SY)}catch(i){}clearTimeout(timeout_id)}",e=e.replace("SX",Math.round(window.scrollX)).replace("SY",Math.round(window.scrollY)),r.eval(e)}location.href=a,e.preventDefault()}r.focus()}this.afterClickEvents()}afterClickEvents(){storageCounters.incrementViewCounter(this.zoneId),this.destroy(),0!==this.settings.minimalImpressionInterval.amount&&UpdateAdvertising$1.createTimeoutForUpdate(this.zoneId)}}class createAdvertising{constructor(e){__publicField(this,"zoneId"),__publicField(this,"advertising"),this.zoneId=e,this.advertising=StateInstance.getPropertyByName("advertising")[e],this.init()}init(){console$1.log(`create format fo zone id: ${this.zoneId}`),this.buildAdvertising()}buildAdvertising(){let e=StateInstance.getPropertyByKey(`advertisingInstances.${this.zoneId}`);if(e)return e.update();switch(this.advertising.format){case"InPagePush":e=new InPagePush(this.zoneId);break;case"Teaser":e=new Teaser(this.zoneId);break;case"Popunder":e=new Popunder(this.zoneId);break;default:console$1.error("no valid format name: ",this.advertising.format)}storageCounters.incrementViewCounter(this.zoneId,!0),StateInstance.setPropertyValueByKey(`advertisingInstances.${this.zoneId}`,e)}}class CreatePlaceholder{constructor(e){__publicField(this,"zoneId"),__publicField(this,"settings"),__publicField(this,"blockElement"),this.zoneId=e;const t=StateInstance.getPropertyByName("blockClass");this.blockElement=document.getElementById(`${t}-${this.zoneId}`)||document.getElementById(`bc_teasers_block_${this.zoneId}`),this.settings=StateInstance.getPropertyByKey(`advertising.${this.zoneId}.settings`),this.createPlaceholder()}createPlaceholder(){var e;const t=document.createElement("div");t.classList.add("oc-teaser-placeholder");const n=StateInstance.getPropertyByName("blockClass"),i=(null==(e=this.blockElement.id)?void 0:e.includes("bc_teasers_block_"))?"bc_teasers_block_":`${n}-`;this.blockElement.insertAdjacentHTML("beforeend",teaserPlaceholderStyles(this.settings,this.zoneId,i)),this.blockElement.append(t)}}class RestrictorBC{constructor(){__publicField(this,"is_debug"),__publicField(this,"rules"),__publicField(this,"rules_indexed"),__publicField(this,"groups")}initRules(e){this.rules=[],this.rules_indexed={},this.groups={};const t=(e=e.trim().replace(/\r\n/g,"\n").replace(/\r/g,"\n").replace(/\n/g,"||")).split("||"),n=t.length;for(let i=0;i1)switch(a){case"group":this.groups[n[1]]=n[2].split(/\s*,\s*/);break;case"filter":e.type=2===n.length?"simple":"context",e.exprs_restricted=[],s=n["simple"===e.type?1:2].split(/\s*,\s*/);for(let t=0;t1&&e.exprs_restricted.push(s[t]);if(e.exprs_restricted.forEach(((t,n)=>{let i={};-1!==t.indexOf(" ")?(i.words=t.split(" "),i.words.forEach(((e,t)=>{i.words[t]={word:e.replace("=",""),is_strong:e.indexOf("=")>=0}}))):i={word:t.replace("=",""),is_strong:t.indexOf("=")>=0},i.expr_original=t,e.exprs_restricted[n]=i})),e.id=e.type,"context"===e.type&&(e.words_offset=parseInt(n[0].replace(/[^0-9]/g,""))||3,e.words_context=this.groups[n[1]]||n[1].split(/\s*,\s*/),e.id+=n[1].substr(0,50)+e.words_offset),null!=this.rules_indexed[e.id]){const t=this.rules_indexed[e.id];t.exprs_restricted=t.exprs_restricted.concat(e.exprs_restricted)}else this.rules.push(e),this.rules_indexed[e.id]=e}}!this.is_debug||console.log(this.groups,this.rules)}hasRestricted(e){e=void 0===e?this.getElementText(document):e;const t=this.getWordsFromText(e);let n=!1;for(let i=0;i=t||n<0||u&&e-c>=s}function m(){var e=now();if(g(e))return f(e);r=setTimeout(m,function(e){var n=t-(e-l);return u?nativeMin(n,s-(e-c)):n}(e))}function f(e){return r=void 0,h&&i?p(e):(i=a=void 0,o)}function v(){var e=now(),n=g(e);if(i=arguments,a=this,l=e,n){if(void 0===r)return function(e){return c=e,r=setTimeout(m,t),d?p(e):o}(l);if(u)return clearTimeout(r),r=setTimeout(m,t),p(l)}return void 0===r&&(r=setTimeout(m,t)),o}return t=toNumber(t)||0,isObject(n)&&(d=!!n.leading,s=(u="maxWait"in n)?nativeMax(toNumber(n.maxWait)||0,t):s,h="trailing"in n?!!n.trailing:h),v.cancel=function(){void 0!==r&&clearTimeout(r),c=0,i=l=a=r=void 0},v.flush=function(){return void 0===r?o:f(now())},v}var debounce_1=debounce;const _debounce=getDefaultExportFromCjs(debounce_1);class ScrollAdManager{constructor(){__publicField(this,"zones"),__publicField(this,"lastScrollTop",0),__publicField(this,"lastTime",0),this.handleScroll=this.handleScroll.bind(this),window.addEventListener("scroll",_debounce(this.handleScroll,50)),this.zones=[]}addZone(e,t,n){this.checkIsInViewport(t)?(n(),this.zones.push({zoneId:e,element:t,callbacks:[]})):this.zones.push({zoneId:e,element:t,callbacks:[n]})}getZone(e){return this.zones.find((t=>t.zoneId===e))}pushCallback(e,t){var n;const i=this.getZone(e);null==(n=null==i?void 0:i.callbacks)||n.push(t)}handleScroll(){const e=window.pageYOffset||document.documentElement.scrollTop,t=Date.now(),n=t-this.lastTime,i=e-this.lastScrollTop,a=Math.abs(i)/(n||1);this.lastScrollTop=e,this.lastTime=t,this.zones.forEach((t=>{t.callbacks.length&&this.checkIsNeedTriggerCallback(t.element,e,a,i)&&(t.callbacks.forEach((e=>e())),t.callbacks=[])}))}checkIsNeedTriggerCallback(e,t,n,i){const a=e.getBoundingClientRect(),s=a.top+t,o=a.bottom+t,r=s-(t+window.innerHeight),l=t-o,c=i>0&&r>0&&r/n0&&l/n0;return c||d||u}checkIsInViewport(e){const t=e.getBoundingClientRect(),n=window.innerHeight;return t.top-200}}class AdZoneInitializer{constructor(){__publicField(this,"$api"),__publicField(this,"restrictor"),__publicField(this,"blocks",[]),this.$api=new API,this.restrictor=new RestrictorBC}async init(){try{if(this.blocks=this.getBlocksFromDocument(),!this.blocks.length)return void console$1.log("blocks not found");await this.loadZones(this.blocks),await this.initZones(this.blocks)}catch(e){console$1.error(e)}}getBlocksFromDocument(){const e=StateInstance.getPropertyByName("blockClass");let t=this.getBlocksByClass(e);const n=this.getBlocksByClass("bigClickTeasersBlock");n.length&&(t.push(...n),console$1.warn("Warning: The class 'bigClickTeasersBlock' is deprecated. Please update to the new format."));const i=this.getBlocksByClass("DdSLjqfTOw3t");return i.length&&(t.push(...i),console$1.warn("Warning: The class 'DdSLjqfTOw3t' is deprecated. Please update to the new format.")),t.sort(((e,t)=>e.offsetTop-t.offsetTop)),t}getBlocksByClass(e){return[...document.getElementsByClassName(e)]}async loadZones(e){const t=e.map(this.getZoneId);if(!t.length)throw new Error("not found zoneIds in blocks");try{await Promise.all(t.map((e=>this.loadZoneSettings(e))))}catch(n){throw new Error("error loading the zones")}}getZoneId(e){const t=e.id,n=t.includes("_")?"_":"-";return t.split(n).pop()}async loadZoneSettings(e){const t=await this.$api.getZone(e);StateInstance.setPropertyValueByKey(`advertising.${e}`,t)}async loadCreatives(e){const t=await this.$api.getCreatives(e);StateInstance.setPropertyValueByKey(`advertising.${e}.creatives`,t)}async initZones(e){const t=new ScrollAdManager;StateInstance.setPropertyValue("scrollAdManager",t);const n=e.map((async e=>{const n=this.getZoneId(e),i=StateInstance.getPropertyByKey(`advertising.${n}`).format===Formats.Teaser;i&&checkDeviceMode(n)&&new CreatePlaceholder(n),i?t.addZone(n,e,(async()=>{await this.loadCreatives(n),this.initAdvertising(n,e)})):(await this.loadCreatives(n),this.initAdvertising(n,e))}));await Promise.all(n)}initAdvertising(e,t){const n=StateInstance.getPropertyByKey(`advertising.${e}`),i=this.checkWapRestrictions(n);StateInstance.setPropertyValueByKey(`advertising.${e}.isWap`,i);const a=t.querySelector(".oc-teaser-placeholder");null==a||a.remove(),this.createAdOrCaption(e,n,i),ZonesUpdateModule$1.incrementZoneTimeStamp(e)}checkWapRestrictions(e){var t;if(null==(t=e.wap)?void 0:t.stopWords){this.restrictor.initRules(e.wap.stopWords);const t=this.restrictor.hasRestricted();if(t)return console$1.warn("has restricted words ",t,", advertising: ",e),!0}return!1}createAdOrCaption(e,t,n){var i,a;if(n&&!(null==(a=null==(i=t.creatives)?void 0:i.alternative)?void 0:a.length))return console$1.error("has restricted words but no alternative creatives");checkBaseValidation(e)?new createAdvertising(e):this.shouldCreateCaption(t)?(console$1.log(`create caption zone id: ${e}`),new CreateCaption(e)):console$1.error(`advertising has no creatives and caption. zone id: ${e}`)}shouldCreateCaption(e){const t=e.cap;return(null==t?void 0:t.content)&&(!(null==t?void 0:t.disable_if_desktop)||(null==t?void 0:t.disable_if_desktop)&&isMobileOrTabletDevice())}}class disableClicksFirstTime{constructor(){this.disableClicks()}disableClicks(){const e=[...document.querySelectorAll(".oc-teasers")];StateInstance.setPropertyValue("isClicksDisabled",!0),e.forEach((e=>{e.addEventListener("click",this.disableEvent),setTimeout((()=>{StateInstance.setPropertyValue("isClicksDisabled",!1),e.removeEventListener("click",this.disableEvent)}),1e3)}))}disableEvent(e){e.preventDefault()}}class ThirdPartyCookieManager{constructor(e){__publicField(this,"iframeUrl"),__publicField(this,"iframe"),__publicField(this,"iframeLoaded"),__publicField(this,"eventsQueue"),__publicField(this,"messagesQueue"),this.iframeUrl=e,this.iframe=null,this.iframeLoaded=!1,this.eventsQueue=[],this.messagesQueue={}}init(){this.iframe=document.createElement("iframe"),this.iframe.style.display="none",this.iframe.src=this.iframeUrl,document.body.appendChild(this.iframe),this.iframe.onload=()=>{this.iframeLoaded=!0,this.eventsQueue.forEach((e=>{this.iframe.contentWindow.postMessage(e,"*")})),this.eventsQueue=[]},window.addEventListener("message",(e=>this.handleIframeResponse(e.data)))}handleIframeResponse(e){const{messageId:t,value:n}=e;t&&this.messagesQueue[t]&&(this.messagesQueue[t].resolve(n),clearTimeout(this.messagesQueue[t].rejectTimeout),delete this.messagesQueue[t])}send(e,t,n){return new Promise(((i,a)=>{const s=(Math.random()+1).toString(36).substring(5);this.iframeLoaded?this.iframe.contentWindow.postMessage({action:e,messageId:s,key:t,value:n},"*"):this.eventsQueue.push({action:e,messageId:s,key:t,value:n}),this.messagesQueue[s]={resolve:e=>i(e),rejectTimeout:setTimeout((()=>a(new Error("iFrame did not respond"))),5e3)}}))}set(e,t){return this.send("SET",e,t)}get(e){return this.send("GET",e)}remove(e){return this.send("REMOVE",e)}clear(){return this.send("CLEAR")}}class ERR_INVALID_ARG_TYPE extends TypeError{constructor(e,t,n){super(`${e} variable is not of type ${t} (value: '${n}')`),__publicField(this,"code","ERR_INVALID_ARG_TYPE")}}function validateBoolean(e,t){if("boolean"!=typeof e)throw new ERR_INVALID_ARG_TYPE(t,"boolean",e)}function validateObject(e,t){if(null===e||Array.isArray(e)||"object"!=typeof e)throw new ERR_INVALID_ARG_TYPE(t,"Object",e)}const randomFillSync="undefined"==typeof window?require("crypto").randomFillSync:window.crypto.getRandomValues.bind(window.crypto),kHexDigits=[48,49,50,51,52,53,54,55,56,57,97,98,99,100,101,102],kBatchSize=128;let uuidData,uuidNotBuffered,uuid,uuidBatch=0;function getBufferedUUID(){return void 0===uuidData&&(uuidData=new Uint8Array(16*kBatchSize)),0===uuidBatch&&randomFillSync(uuidData),uuidBatch=(uuidBatch+1)%kBatchSize,uuidData.slice(16*uuidBatch,16*uuidBatch+16)}function randomUUID(e){void 0!==e&&validateObject(e,"options");const{disableEntropyCache:t=!1}={...e};let n;validateBoolean(t,"options.disableEntropyCache"),void 0===uuid&&(uuid=new Uint8Array(36),uuid[8]=uuid[13]=uuid[18]=uuid[23]="-".charCodeAt(0),uuid[14]=52),t?(n=uuidNotBuffered,void 0===n&&(n=uuidNotBuffered=new Uint8Array(16)),randomFillSync(n)):n=getBufferedUUID(),n[8]=63&n[8]|128;let i=0;return uuid[0]=kHexDigits[n[i]>>4],uuid[1]=kHexDigits[15&n[i++]],uuid[2]=kHexDigits[n[i]>>4],uuid[3]=kHexDigits[15&n[i++]],uuid[4]=kHexDigits[n[i]>>4],uuid[5]=kHexDigits[15&n[i++]],uuid[6]=kHexDigits[n[i]>>4],uuid[7]=kHexDigits[15&n[i++]],uuid[9]=kHexDigits[n[i]>>4],uuid[10]=kHexDigits[15&n[i++]],uuid[11]=kHexDigits[n[i]>>4],uuid[12]=kHexDigits[15&n[i++]],uuid[15]=kHexDigits[15&n[i++]],uuid[16]=kHexDigits[n[i]>>4],uuid[17]=kHexDigits[15&n[i++]],uuid[19]=kHexDigits[n[i]>>4],uuid[20]=kHexDigits[15&n[i++]],uuid[21]=kHexDigits[n[i]>>4],uuid[22]=kHexDigits[15&n[i++]],uuid[24]=kHexDigits[n[i]>>4],uuid[25]=kHexDigits[15&n[i++]],uuid[26]=kHexDigits[n[i]>>4],uuid[27]=kHexDigits[15&n[i++]],uuid[28]=kHexDigits[n[i]>>4],uuid[29]=kHexDigits[15&n[i++]],uuid[30]=kHexDigits[n[i]>>4],uuid[31]=kHexDigits[15&n[i++]],uuid[32]=kHexDigits[n[i]>>4],uuid[33]=kHexDigits[15&n[i++]],uuid[34]=kHexDigits[n[i]>>4],uuid[35]=kHexDigits[15&n[i]],String.fromCharCode.apply(null,uuid)}!function(e){var t,n=function(){try{if(e.URLSearchParams&&"bar"===new e.URLSearchParams("foo=bar").get("foo"))return e.URLSearchParams}catch(t){}return null}(),i=n&&"a=1"===new n({a:1}).toString(),a=n&&"+"===new n("s=%2B").get("s"),s=n&&"size"in n.prototype,o="__URLSearchParams__",r=!n||((t=new n).append("s"," &"),"s=+%26"===t.toString()),l=p.prototype,c=!(!e.Symbol||!e.Symbol.iterator);if(!(n&&i&&a&&r&&s)){l.append=function(e,t){_(this[o],e,t)},l.delete=function(e){delete this[o][e]},l.get=function(e){var t=this[o];return this.has(e)?t[e][0]:null},l.getAll=function(e){var t=this[o];return this.has(e)?t[e].slice(0):[]},l.has=function(e){return b(this[o],e)},l.set=function(e,t){this[o][e]=[""+t]},l.toString=function(){var e,t,n,i,a=this[o],s=[];for(t in a)for(n=g(t),e=0,i=a[t];e>>16,65535&e[0],e[1]>>>16,65535&e[1]],t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]];var n=[0,0,0,0];return n[3]+=e[3]+t[3],n[2]+=n[3]>>>16,n[3]&=65535,n[2]+=e[2]+t[2],n[1]+=n[2]>>>16,n[2]&=65535,n[1]+=e[1]+t[1],n[0]+=n[1]>>>16,n[1]&=65535,n[0]+=e[0]+t[0],n[0]&=65535,[n[0]<<16|n[1],n[2]<<16|n[3]]},t=function(e,t){e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]],t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]];var n=[0,0,0,0];return n[3]+=e[3]*t[3],n[2]+=n[3]>>>16,n[3]&=65535,n[2]+=e[2]*t[3],n[1]+=n[2]>>>16,n[2]&=65535,n[2]+=e[3]*t[2],n[1]+=n[2]>>>16,n[2]&=65535,n[1]+=e[1]*t[3],n[0]+=n[1]>>>16,n[1]&=65535,n[1]+=e[2]*t[2],n[0]+=n[1]>>>16,n[1]&=65535,n[1]+=e[3]*t[1],n[0]+=n[1]>>>16,n[1]&=65535,n[0]+=e[0]*t[3]+e[1]*t[2]+e[2]*t[1]+e[3]*t[0],n[0]&=65535,[n[0]<<16|n[1],n[2]<<16|n[3]]},n=function(e,t){return 32==(t%=64)?[e[1],e[0]]:t<32?[e[0]<>>32-t,e[1]<>>32-t]:(t-=32,[e[1]<>>32-t,e[0]<>>32-t])},i=function(e,t){return 0==(t%=64)?e:t<32?[e[0]<>>32-t,e[1]<>>1]),e=t(e,[4283543511,3981806797]),e=a(e,[0,e[0]>>>1]),e=t(e,[3301882366,444984403]),a(e,[0,e[0]>>>1])},o={preprocessor:null,audio:{timeout:1e3,excludeIOS11:!0},fonts:{swfContainerId:"fingerprintjs2",swfPath:"flash/compiled/FontList.swf",userDefinedFonts:[],extendedJsFonts:!1},screen:{detectScreenOrientation:!0},plugins:{sortPluginsFor:[/palemoon/i],excludeIE:!1},extraComponents:[],excludes:{enumerateDevices:!0,pixelRatio:!0,doNotTrack:!0,fontsFlash:!0},NOT_AVAILABLE:"not available",ERROR:"error",EXCLUDED:"excluded"},r=function(e,t){var n=[];return null==e?n:Array.prototype.map&&e.map===Array.prototype.map?e.map(t):(function(e,t){if(Array.prototype.forEach&&e.forEach===Array.prototype.forEach)e.forEach(t);else if(e.length===+e.length)for(var n=0,i=e.length;nt.name?1:e.name=e.components.length)t(n.data);else{var o=e.components[i];if(e.excludes[o.key])a(!1);else{if(!s&&o.pauseBefore)return i-=1,void setTimeout((function(){a(!0)}),1);try{o.getData((function(e){n.addPreprocessedComponent(o.key,e),a(!1)}),e)}catch(r){n.addPreprocessedComponent(o.key,String(r)),a(!1)}}}};a(!1)},h.x64hash128=function(o,r){r=r||0;for(var l=(o=o||"").length%16,c=o.length-l,d=[0,r],u=[0,r],h=[0,0],p=[0,0],g=[2277735313,289559509],m=[1291169091,658871167],f=0;f>>0).toString(16)).slice(-8)+("00000000"+(d[1]>>>0).toString(16)).slice(-8)+("00000000"+(u[0]>>>0).toString(16)).slice(-8)+("00000000"+(u[1]>>>0).toString(16)).slice(-8)},h},"undefined"!=typeof window&&"function"==typeof window.define&&window.define.amd?window.define(i):"undefined"!=typeof module&&module.exports?module.exports=i():n.exports?n.exports=i():n.Fingerprint2=i()}catch(a){}var n,i;window.Fingerprint2.get({excludes:{localStorage:!0,sessionStorage:!0,indexedDb:!0,openDatabase:!0,adBlock:!0,audio:!0,webgl:!0,canvas:!0,plugins:!0,enumerateDevices:!0}},(e=>{const n={};for(let t=0;te.value)).join(),31),s=new DevFeatures(t);t=s.updateUrlScript();const o=document.querySelector('meta[name="oc-meta-js-lib"]');o&&null!==o.getAttribute("cypress")&&(StateInstance.setPropertyValue("testingMode",!0),StateInstance.setPropertyValue("baseUrl","https://js.bc-servers.me")),StateInstance.setPropertyValue("fingerprint",{hash:a,json:i}),(new AdZoneInitializer).init().then((()=>{new disableClicksFirstTime}))}))}function setClientRequestId(){StateInstance.setPropertyValue("clientRequestId",window.crypto.randomUUID()),setInterval((()=>{StateInstance.setPropertyValue("clientRequestId",window.crypto.randomUUID())}),1e4)}function setGeneralSettings(){var e,t,n;let i="",a="",s=document.currentScript;if(isDev)a="c4ca42-75849b",i="https://sjs.bc-servers.me";else if(s){const o=new URL(s.src);i=(null==(e=s.dataset)?void 0:e.domain)?null==(t=s.dataset)?void 0:t.domain:`${o.protocol}//${o.hostname}`,a=null==(n=document.currentScript.dataset)?void 0:n.id}a||console.warn("Warning: The initialization script is outdated. Please update it."),StateInstance.setPropertyValue("baseUrl",i),StateInstance.setPropertyValue("blockClass",a)}async function initCookieManager(){const e=new ThirdPartyCookieManager(isDev?"https://tracker.bc-servers.me/":"https://octotracking.com/");e.init();let t=await e.get("userToken");t||(t=window.crypto.randomUUID(),await e.set("userToken",t)),StateInstance.setPropertyValue("userToken",t)}setGeneralSettings();const ocMeta=document.querySelector('meta[name="oc-meta-js-lib"]');ocMeta&&null!==ocMeta.getAttribute("preview")?(StateInstance.setPropertyValue("previewMode",!0),window.initIPP=e=>new InPagePush(e),window.addZone=(e,t)=>{StateInstance.setPropertyValueByKey(`advertising.${t}`,e)}):window.requestIdleCallback?requestIdleCallback((async function(){await init()})):setTimeout((async function(){await init()}),500)})();