PageSourceSearch

https://lavtvshow.com/wp-content/cache/min/1/caramel.js?ver=1790512228

js lavtvshow.com collected 2026-10-04 03:46:13 UTC 174,709 bytes, 1 lines download raw bytes

1(()=>{"use strict";var t={729:(t,e,n)=>{n.d(e,{A:()=>s});var o=n(601),i=n.n(o),r=n(314),a=n.n(r)()(i());a.push([t.id,'.caramel-banner{max-width:max-content;max-height:max-content;min-width:100%}.caramel-banner:has(div[id*=_custom]){position:relative;overflow:hidden}.caramel-banner>div.caramel--hidden{position:absolute !important;opacity:0;visibility:hidden;pointer-events:none}.caramel-bottomLine{position:fixed;left:0;right:0;bottom:0;opacity:0;pointer-events:none;z-index:9998;font-family:sans-serif !important;transform:translateY(100%);transition-duration:.7s;transition-property:transform,opacity;transition-timing-function:ease-in-out}.caramel-bottomLine.open{opacity:1;pointer-events:all;transform:translateY(0%)}.caramel-bottomLine__inner{display:flex;align-items:center;justify-content:center;overflow:hidden;position:relative}.caramel-bottomLine__inner>div{opacity:1;min-width:160px;visibility:visible;margin:0 auto;transition:opacity .3s ease-in}.caramel-bottomLine__inner>div:has(.needsclick){width:100%}.caramel-bottomLine__inner>div.caramel--hidden{position:absolute !important;left:-9999px;opacity:0;visibility:hidden;pointer-events:none}.caramel-bottomLine__toggle{display:flex;align-items:center;justify-content:center;cursor:pointer;top:-25px;width:50px;height:25px;position:absolute;font-size:16px !important;border-top-left-radius:5px;border-top-right-radius:5px}.caramel-bottomLine__toggle--right{right:0px}.caramel-bottomLine__toggle--left{left:0px}.caramel-bottomLine__toggle svg{width:20px;height:20px}.caramel-combo{max-width:max-content;max-height:max-content}.caramel-cube{display:flex;align-items:center;justify-content:center;transform:scale(0.8);max-width:max-content}.caramel-cube.rotating{animation-duration:1s;animation-name:Caramel_CubeScale;animation-timing-function:linear}.caramel-cube__sides{position:relative;transform-style:preserve-3d;transition-duration:1s;transition-property:transform;transition-timing-function:linear;animation-timing-function:linear;animation-iteration-count:infinite}.caramel-cube__side{display:flex;align-items:center;justify-content:center;position:absolute;width:100%;height:100%;overflow:hidden;box-sizing:border-box}.caramel-cube__side>div{width:100%;height:100%}@keyframes Caramel_CubeScale{0%{transform:scale(0.8)}50%{transform:scale(48%)}100%{transform:scale(0.8)}}.caramel-fadeInBox{position:fixed;z-index:9998;opacity:0;pointer-events:none;font-family:sans-serif !important;transition-duration:.5s;transition-property:opacity;transition-timing-function:linear}.caramel-fadeInBox.open{opacity:1;pointer-events:all}.caramel-fadeInBox__inner{display:flex;align-items:center;flex-direction:column;justify-content:center;box-sizing:border-box;overflow:hidden;width:100%;height:100%;background-color:rgba(0,0,0,0)}.caramel-fadeInBox__inner [id^=yandex_rtb_]{max-width:300px}.caramel-fadeInBox__inner:has(div[id*=_custom]){position:relative}.caramel-fadeInBox__inner>div.caramel--hidden{opacity:0;visibility:hidden;pointer-events:none;position:absolute !important}.caramel-fadeInBox__close{cursor:pointer;display:flex;align-items:center;justify-content:center;width:50px;height:25px;position:absolute;overflow:hidden;color:#fff}.caramel-fadeInBox__close svg{width:20px;height:20px}.caramel-fadeInBox__close--tl{top:0;left:0;transform:translate(0, -100%);border-top-left-radius:5px;border-top-right-radius:5px}.caramel-fadeInBox__close--tr{top:0;right:0;transform:translate(0, -100%);border-top-left-radius:5px;border-top-right-radius:5px}.caramel-fadeInBox__close--bl{left:0;bottom:0;transform:translate(0, 100%);border-bottom-left-radius:5px;border-bottom-right-radius:5px}.caramel-fadeInBox__close--br{right:0;bottom:0;transform:translate(0, 100%);border-bottom-left-radius:5px;border-bottom-right-radius:5px}.caramel-freeze{position:static !important;overflow:hidden !important;transform:unset !important}.caramel-fullscreen{position:fixed;top:0;left:0;z-index:2147483647 !important;width:100vw !important;height:100vh !important;font-family:sans-serif !important;opacity:0;visibility:hidden;transition:opacity 1s ease,visibility 1s}.caramel-fullscreen.open{opacity:1;visibility:visible}.caramel-fullscreen__wrapper{display:flex;align-items:center;justify-content:center;width:100%;height:100%}.caramel-fullscreen__load-bar{display:flex;width:100%;position:absolute;top:0;left:0}.caramel-fullscreen__load-bar__text{font-family:sans-serif;cursor:pointer;position:absolute;top:0;right:0;z-index:9999 !important;display:flex;align-items:center;justify-content:center;width:30px;height:100%;color:#fff;font-size:16px}.caramel-fullscreen__load-bar__text svg{width:24px;height:24px}.caramel-fullscreen__load-bar__line{width:100%;height:100%}.caramel-fullscreen__load-bar__line.active .caramel-fullscreen__load-bar__progress{width:100%}
1.caramel-fullscreen__load-bar__progress{width:0;height:100%;transition-property:width;transition-timing-function:linear}.caramel-fullscreen__close{width:20px}[data-fullscreen-element-name=close-btn]>div:not(:nth-child(1)){display:none !important}[data-fullscreen-element-name=close-btn]:has(.caramel-fullscreen__customClose){pointer-events:none !important}.caramel-fullscreen__customClose{display:flex !important;align-items:center !important;justify-content:center !important;color:#949cb0 !important;font-size:16px !important}@media screen and (min-width: 768px){.caramel-fullscreen__customClose{font-size:18px !important;width:40px !important;height:40px !important}}.caramel-interscroller{position:relative;overflow:hidden;width:100%}@media screen and (max-width: 600px){.caramel-interscroller{width:100vw;margin-left:calc((100vw - 100%)/-2)}}.caramel-interscroller__inner{position:absolute;top:0;left:0;width:100%;height:100%;clip:rect(0, auto, auto, 0)}@media screen and (-webkit-min-device-pixel-ratio: 0){.caramel-interscroller__inner{-webkit-mask-image:-webkit-linear-gradient(top, #ffffff 0%, #ffffff 100%)}}.caramel-interscroller__banner{display:flex;align-items:center;justify-content:center;position:fixed;overflow-y:scroll;top:50%;left:50%;width:100%;height:100%;transform:translateZ(0) translate(-50%, -50%);-webkit-transform:translateZ(0) translate(-50%, -50%)}.caramel-interscroller__banner>div{opacity:1;visibility:visible;margin:0 auto;transition:opacity .3s ease-in}.caramel-interscroller__banner>div.caramel--hidden{position:absolute !important;left:-9999px;opacity:0;visibility:hidden;pointer-events:none}.caramel-smartCatfish__item{position:fixed;left:0;z-index:9998 !important;display:flex;align-items:center;justify-content:center;width:100%;overflow:hidden;transition-duration:.5s;transition-property:transform;transition-timing-function:ease-in-out}.caramel-smartCatfish__item--top{top:0;transform:translateY(-100%)}.caramel-smartCatfish__item--top.active{transform:translateY(0)}.caramel-smartCatfish__item--bottom{bottom:0;transform:translateY(100%)}.caramel-smartCatfish__item--bottom.active{transform:translateY(0)}.caramel-smartSticky{position:fixed;top:50%;z-index:9998;color:#000;font-family:sans-serif !important;transition-duration:.7s;transition-property:transform;transition-timing-function:ease-in-out}.caramel-smartSticky--left{left:0;transform:translateX(-100%) translateY(-50%)}.caramel-smartSticky--left .caramel-smartSticky__toggle{right:-40px}.caramel-smartSticky--left .caramel-smartSticky__toggle svg{transform:rotate(-90deg)}.caramel-smartSticky--left.open{transform:translateX(0) translateY(-50%)}.caramel-smartSticky--left.open .caramel-smartSticky__toggle{right:0}.caramel-smartSticky--left.open .caramel-smartSticky__toggle svg{transform:rotate(90deg)}.caramel-smartSticky--right{right:0;transform:translateX(100%) translateY(-50%)}.caramel-smartSticky--right .caramel-smartSticky__toggle{left:-40px}.caramel-smartSticky--right .caramel-smartSticky__toggle svg{transform:rotate(90deg)}.caramel-smartSticky--right.open{transform:translateX(0) translateY(-50%)}.caramel-smartSticky--right.open .caramel-smartSticky__toggle{left:0}.caramel-smartSticky--right.open .caramel-smartSticky__toggle svg{transform:rotate(-90deg)}.caramel-smartSticky__toggle{display:flex;align-items:center;justify-content:center;position:relative;cursor:pointer;width:30px;height:30px;font-size:16px;color:#fff;position:absolute;border-radius:50%;transition-property:all;transition-duration:.7s;transition-timing-function:ease-in-out}.caramel-smartSticky__toggle--top{top:-40px}.caramel-smartSticky__toggle--bottom{bottom:-40px}.caramel-smartSticky__toggle svg{width:20px;height:20px;transition-duration:.3s;transition-property:transform;transition-timing-function:linear}.caramel-story{position:relative;cursor:pointer;max-width:max-content;font-family:sans-serif}.caramel-story--sticky{position:fixed;box-shadow:rgba(0,0,0,.25) 0px 3px 8px;border-radius:5px}.caramel-story--sticky .caramel-story__wrapper{padding:15px}.caramel-story__wrapper:hover .caramel-story__progress__item{animation-play-state:paused}.caramel-story .paused{animation-play-state:paused}.caramel-story__close{display:flex;align-items:center;justify-content:center;border-radius:50%;width:30px;height:30px;position:absolute;z-index:2;color:#fff;background-color:gray;box-shadow:rgba(0,0,0,.25) 0px 3px 8px}.caramel-story__close--tl{top:0;left:0;transform:translate(-100%, -100%)}.caramel-story__close--tr{top:0;right:0;transform:translate(100%, -100%)}.caramel-story__close--bl{left:0;bottom:0;transform:translate(-100%, 100%)}.caramel-story__close--br{right:0;bottom:0;transform:translate(100%, 100%)}.caramel-story__close svg{width:24px;height:24px}.caramel-story__progress{display:flex;flex-direction:row;align-items:center;justify-content:space-between;padding-bottom:10px;gap:5px}.caramel-story__progress__item{flex-grow:1;margin:0 2px;border-radius:3px;background-size:200%;background-repeat:no-repeat;background-position:100% 50%;animation-delay:.1s;animation-timing-function:linear}.caramel-story__progress__item.active{animation-name:Caramel_StoryLoader}.caramel-story__progress__item.passed{background-position:0 0}.caramel-story__banners{position:relative}.caramel-story__banners .caramel-story__banner{visibility:hidden;opacity:0;position:absolute;bottom:0;z-index:-1;width:100%;transition:opacity 1s ease,visibility 1s}.caramel-story__banners .caramel-story__banner.active{position:relative;visibility:visible;opacity:1;z-index:3}@keyframes Caramel_StoryLoader{0%{background-position:100% 0}100%{background-position:0 0}}.caramel-topLine{position:fixed;top:0;left:0;right:0;opacity:0;pointer-events:none;z-index:9998;font-family:sans-serif !important;transform:translateY(-100%);transition-duration:.7s;transition-property:transform,opacity;transition-timing-function:ease-in-out}.caramel-topLine.open{opacity:1;pointer-events:all;transform:translateY(0%)}.caramel-topLine__inner{display:flex;align-items:center;justify-content:center}.caramel-topLine__toggle{display:flex;align-items:center;justify-content:center;cursor:pointer;bottom:-25px;width:50px;height:25px;color:#fff;position:absolute;border-bottom-left-radius:5px;border-bottom-right-radius:5px}.caramel-topLine__toggle--right{right:0px}.caramel-topLine__toggle--left{left:0px}.caramel-topLine__toggle svg{width:20px;height:20px}.caramel-videoOverlay{position:relative;max-width:max-content;max-height:max-content;font-family:sans-serif !important}.caramel-videoOverlay__background{position:absolute;inset:0;z-index:10;cursor:pointer}.caramel-videoOverlay__banner{position:absolute;
1left:50%;z-index:20;transform:translateX(-50%);transition-duration:.5s;transition-property:opacity;transition-timing-function:linear;opacity:0;pointer-events:none}.caramel-videoOverlay__banner.open{opacity:1;pointer-events:all !important}.caramel-videoOverlay__close{display:flex;align-items:center;justify-content:center;cursor:pointer;top:-25px;width:50px;height:25px;color:#fff;position:absolute;border-top-left-radius:5px;border-top-right-radius:5px}.caramel-videoOverlay__close--right{right:0px}.caramel-videoOverlay__close--left{left:0px}.caramel-videoOverlay__close svg{width:20px;height:20px}.caramel-streamLine{margin:0 auto;position:relative;font-family:sans-serif !important}.caramel-streamLine--stickyAlways,.caramel-streamLine--stickyOnScroll.active{position:fixed;z-index:9998}.caramel-streamLine--closed{opacity:0;pointer-events:none}@supports selector(.caramel-streamLine:has(*)){.caramel-streamLine:not(:has(.caramel-streamLine__block[data-state=filled])){opacity:0;pointer-events:none}}@supports selector(.caramel-streamLine:has(*)){.caramel-streamLine:has(.caramel-streamLine__block[data-state=filled]):not(:has(.caramel-streamLine__block[data-state=filled] *)){opacity:0;pointer-events:none}}.caramel-streamLine__inner{position:relative;overflow:hidden;width:100%;height:100%}.caramel-streamLine__block{position:relative;inset:0;width:100%;height:100%;background-color:#fff;opacity:1;pointer-events:auto;z-index:1}.caramel-streamLine__block[data-state=empty]{position:absolute;opacity:0;pointer-events:none;z-index:0}.caramel-streamLine__block[data-state=probing]{position:absolute;top:0;left:0;min-width:300px;min-height:250px;opacity:.01 !important;visibility:visible !important;display:block !important;pointer-events:none;z-index:0}.caramel-streamLine.probing{opacity:1 !important;visibility:visible !important;display:block !important;pointer-events:none !important}@supports selector(.caramel-streamLine:has(*)){.caramel-streamLine:has(.caramel-streamLine__block[data-state=probing]){opacity:1 !important;pointer-events:none}}.caramel-streamLine__close{cursor:pointer;display:flex;align-items:center;justify-content:center;width:50px;height:25px;position:absolute;overflow:hidden;color:#fff}.caramel-streamLine__close svg{width:20px;height:20px}.caramel-streamLine__close--tl{top:0;left:0;transform:translate(0, -100%);border-top-left-radius:5px;border-top-right-radius:5px}.caramel-streamLine__close--tr{top:0;right:0;transform:translate(0, -100%);border-top-left-radius:5px;border-top-right-radius:5px}.caramel-streamLine__close--bl{left:0;bottom:0;transform:translate(0, 100%);border-bottom-left-radius:5px;border-bottom-right-radius:5px}.caramel-streamLine__close--br{right:0;bottom:0;transform:translate(0, 100%);border-bottom-left-radius:5px;border-bottom-right-radius:5px}.caramel-infobox{position:absolute;top:0;left:0;z-index:2147483647;color:#fff;background-color:rgba(0,0,0,.75);padding:2px 10px;font-size:12px;white-space:nowrap;font-family:sans-serif}.caramel-infobox--vast{top:auto;bottom:0}div[id^=Caramel_VideoAd]{position:absolute;inset:0;z-index:10;background-color:#212121}[caramel-id]:has([id^=Caramel_VideoAd]){position:relative}[caramel-id] a.vast-blocker{z-index:10}body.dt>iframe[src="about:blank"]:last-of-type,body.dt>iframe[src*=acint]:last-of-type{display:none !important}',""]);const s=a},314:t=>{t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n="",o=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),o&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),o&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n})).join("")},e.i=function(t,n,o,i,r){"string"==typeof t&&(t=[[null,t,void 0]]);var a={};if(o)for(var s=0;s<this.length;s++){var c=this[s][0];null!=c&&(a[c]=!0)}for(var l=0;l<t.length;l++){var d=[].concat(t[l]);o&&a[d[0]]||(void 0!==r&&(void 0===d[5]||(d[1]="@layer".concat(d[5].length>0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=r),n&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=n):d[2]=n),i&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=i):d[4]="".concat(i)),e.push(d))}},e}},601:t=>{t.exports=function(t){return t[1]}},72:t=>{var e=[];function n(t){for(var n=-1,o=0;o<e.length;o++)if(e[o].identifier===t){n=o;break}return n}function o(t,o){for(var r={},a=[],s=0;s<t.length;s++){var c=t[s],l=o.base?c[0]+o.base:c[0],d=r[l]||0,u="".concat(l," ").concat(d);r[l]=d+1;var p=n(u),m={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==p)e[p].references++,e[p].updater(m);else{var h=i(m,o);o.byIndex=s,e.splice(s,0,{identifier:u,updater:h,references:1})}a.push(u)}return a}function i(t,e){var n=e.domAPI(e);n.update(t);return function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap&&e.supports===t.supports&&e.layer===t.layer)return;n.update(t=e)}else n.remove()}}t.exports=function(t,i){var r=o(t=t||[],i=i||{});return function(t){t=t||[];for(var a=0;a<r.length;a++){var s=n(r[a]);e[s].references--}for(var c=o(t,i),l=0;l<r.length;l++){var d=n(r[l]);0===e[d].references&&(e[d].updater(),e.splice(d,1))}r=c}}},659:t=>{var e={};t.exports=function(t,n){var o=function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}e[t]=n}return e[t]}(t);if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invali
1d.");o.appendChild(n)}},540:t=>{t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},56:(t,e,n)=>{t.exports=function(t){var e=n.nc;e&&t.setAttribute("nonce",e)}},825:t=>{t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=t.insertStyleElement(t);return{update:function(n){!function(t,e,n){var o="";n.supports&&(o+="@supports (".concat(n.supports,") {")),n.media&&(o+="@media ".concat(n.media," {"));var i=void 0!==n.layer;i&&(o+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),o+=n.css,i&&(o+="}"),n.media&&(o+="}"),n.supports&&(o+="}");var r=n.sourceMap;r&&"undefined"!=typeof btoa&&(o+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(r))))," */")),e.styleTagTransform(o,t,e.options)}(e,t,n)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)}}}},113:t=>{t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}}},e={};function n(o){var i=e[o];if(void 0!==i)return i.exports;var r=e[o]={id:o,exports:{}};return t[o](r,r.exports,n),r.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var o in e)n.o(e,o)&&!n.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.nc=void 0;var o=["roxot","betweenDigital","myTarget"],i={"royallib.com":10},r={fullscreen:"fullscreen",banner:"banner",interscroller:"interscroller",fadeInBox:"fadeInBox",combo:"combo",topLine:"topLine",bottomLine:"bottomLine",smartCatfish:"smartCatfish",smartSticky:"smartSticky",cube:"cube",story:"story",videoOverlay:"videoOverlay",streamLine:"streamLine"},a=[r.banner,r.interscroller,r.story,r.streamLine],s=[r.bottomLine,r.topLine,r.smartCatfish,r.smartSticky,r.story,r.interscroller],c=[r.fullscreen],l=[r.topLine,r.bottomLine,r.fadeInBox],d="dc-feed",u=n(72),p=n.n(u),m=n(825),h=n.n(m),f=n(659),v=n.n(f),y=n(56),b=n.n(y),w=n(540),g=n.n(w),_=n(113),C=n.n(_),S=n(729),E={};E.styleTagTransform=C(),E.setAttributes=b(),E.insert=v().bind(null,"head"),E.domAPI=h(),E.insertStyleElement=g();p()(S.A,E);S.A&&S.A.locals&&S.A.locals;var x=25;const I=function(){function t(){this.eventHandlers={}}return t.getInstance=function(){return t.instance||(t.instance=new t),t.instance},t.prototype.on=function(t,e){this.eventHandlers[t]||(this.eventHandlers[t]=[]),this.eventHandlers[t].push(e)},t.prototype.once=function(t,e){var n=this,o=function(){for(var i=[],r=0;r<arguments.length;r++)i[r]=arguments[r];e.apply(void 0,i),n.removeListener(t,o)};this.on(t,o)},t.prototype.emit=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var o=this.eventHandlers[t];o&&o.forEach((function(t){return t.apply(void 0,e)}))},t.prototype.removeListener=function(t,e){var n=this.eventHandlers[t];n&&(this.eventHandlers[t]=n.filter((function(t){return t!==e})))},t.prototype.removeAllListeners=function(t){delete this.eventHandlers[t]},t}();var A={0:"Unknown error.",1:"No bid or response.",2:"Incorrect response.",3:"Timeout.",4:"HTTP error.",5:"Incorrect user data in the configuration script.",6:"Incorrect monetizer settings.",7:"The container ID received from the monetizer differs from the ID listed in the request.",8:"A correct response with no status is received from the monetizer.",9:"The monetizer's response has no or an incorrect CodeType."},T={default:"default",benchmark:"benchmark"};const L=function(){function t(){}return t.appendElement=function(t,e,n){var o=document.createElement(t);if(document.querySelector(n)){if(e)for(var i in e)o.setAttribute(i,e[i]);return document.querySelector(n).appendChild(o),o}},t}();const z={colors:{info:"#0986E6",error:"#E31A10",success:"#0FFC03",warning:"#E69509"}};var k=function(t,e,n){if(n||2===arguments.length)for(var o,i=0,r=e.length;i<r;i++)!o&&i in e||(o||(o=Array.prototype.slice.call(e,0,i)),o[i]=e[i]);return t.concat(o||Array.prototype.slice.call(e))};const O=function(){function t(){}return t.success=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];console.log.apply(console,k(["%c [".concat(t,"]"),"color: ".concat(z.colors.success)],e,!1))},t.error=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];console.log.apply(console,k(["%c [".concat(t,"]"),"color: ".concat(z.colors.error)],e,!1))},t.info=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];console.log.apply(console,k(["%c [".concat(t,"]"),"color: ".concat(z.colors.info)],e,!1))},t.warning=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];console.log.apply(console,k(["%c [".concat(t,"]"),"color: ".concat(z.colors.warning)],e,!1))},t.group=function(t,e){for(var n=[],o=2;o<arguments.length;o++)n[o-2]=arguments[o];console.group.apply(console,k(["%c [".concat(t,"]"),"color: ".concat(z.colors[e])],n,!1))},t.groupEnd=function(){console.groupEnd()},t}();const P=function(){function t(){}return t.format=function(e){var n=e/1e3,o=Math.floor(n/60),i=Math.floor(n%60),r=Math.ceil(n%1*1e3),a=t.padZero(o),s=t.padZero(i),c=t.padZero(r,3);return"".concat(a,":").concat(s,".").concat(c)}
1,t.padZero=function(t,e){return void 0===e&&(e=2),String(t).padStart(e,"0")},t}();var B=function(){return B=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},B.apply(this,arguments)},j=function(t,e,n){if(n||2===arguments.length)for(var o,i=0,r=e.length;i<r;i++)!o&&i in e||(o||(o=Array.prototype.slice.call(e,0,i)),o[i]=e[i]);return t.concat(o||Array.prototype.slice.call(e))};const D=function(){function t(){this.mode="default"}return t.getInstance=function(){return t.instance||(t.instance=new t),t.instance},t.prototype.on=function(){q.get("logger")?O.info("LOGGER","Is already enabled"):(q.save("logger",!0),window.Ya.enableAdConsole(),O.info("LOGGER","Enabled. Refresh the page to see the logs"))},t.prototype.off=function(){q.get("logger")?(q.remove("logger"),localStorage.removeItem("adfoxDebugConsoleEnabled"),O.info("LOGGER","Disabled")):O.info("LOGGER","Is already disabled")},t.prototype.setMode=function(t){this.mode===t?O.info("LOGGER",'Is already in "'.concat(t,'" mode')):Object.values(T).includes(t)?(q.save("loggerMode",t),O.info("LOGGER",'Mode has been set to "'.concat(t,'"'))):O.error("LOGGER",'Unknown mode: "'.concat(t,'"'))},t.prototype.init=function(){var t=this;window.Caramel.Logger={on:this.on,off:this.off,setMode:this.setMode},window.addEventListener("keydown",(function(e){e.ctrlKey&&e.altKey&&"l"===e.key.toLowerCase()&&(q.get("logger")?t.off():t.on(),window.location.reload(),e.preventDefault())}));var e=q.get("logger");this.mode=q.get("loggerMode")||"default",e&&(O.info("LOGGER","Logger is enabled in mode:",this.mode),window.Caramel.EventEmitter.on("debug",(function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return O.info.apply(O,j(["DEBUG"],t,!1))})),"benchmark"===this.mode&&(window.Caramel.EventEmitter.on("benchmark:log",(function(t,e){for(var n=[],o=2;o<arguments.length;o++)n[o-2]=arguments[o];return O.info.apply(O,j(["BENCHMARK","".concat(e," | ").concat(P.format(t))],n,!1))})),window.Caramel.EventEmitter.on("benchmark:error",(function(t){return O.error("BENCHMARK",t)}))),window.Caramel.EventEmitter.on("app:websiteConfigConnectSuccess",(function(){return O.success("APP","Website config has been connected")})),window.Caramel.EventEmitter.on("app:websiteConfigConnectError",(function(){return O.error("APP","Failed to connect website config")})),window.Caramel.EventEmitter.on("yandex:headerBiddingScriptConnectSuccess",(function(){return O.success("YANDEX","HB script successfully initialized")})),window.Caramel.EventEmitter.on("yandex:headerBiddingScriptConnectError",(function(){return O.error("YANDEX","Failed to initialize HB script")})),window.Caramel.EventEmitter.on("yandex:contextScriptConnectSuccess",(function(){return O.success("YANDEX","Context script successfully initialized")})),window.Caramel.EventEmitter.on("yandex:contextScriptConnectError",(function(){return O.error("YANDEX","Failed to initialize Context script")})),window.Caramel.EventEmitter.on("yandex:headerBiddingSettingsSetup",(function(t){return O.info("YANDEX","HB settings has been set",t)})),window.Caramel.EventEmitter.on("yandex:headerBiddingBidsReceived",(function(t){return O.info("YANDEX","HB received bids:",t.map((function(t){var e,n=window.Caramel.config.zones.find((function(e){return e.banners.some((function(e){return t.containerId.includes(e.id)}
1))}));if(!n)return null;var o=!!(null===(e=null==t?void 0:t.cost)||void 0===e?void 0:e.cpm),i=!!(null==t?void 0:t.error);return B(B({zone:n.name,status:o?"Bid":"Failure",bidder:t.adapterName,duration:t.requestDuration},i?{error:Object.values(A)[t.error.code]}:{}),o?{cpm:t.cost.cpm}:{})})).filter(Boolean))})),window.Caramel.EventEmitter.on("prebid:prebidScriptConnectSuccess",(function(){return O.success("PREBID","Prebid script successfully initialized")})),window.Caramel.EventEmitter.on("prebid:prebidScriptConnectError",(function(){return O.error("PREBID","Failed to initialize Prebid script")})),window.Caramel.EventEmitter.on("streamLine:log",(function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];O[t].apply(O,j(["STREAMLINE"],e,!1))})),window.Caramel.EventEmitter.on("videoSDK:connectSuccess",(function(){return O.info("VIDEO SDK","Video SDK has been successfully connected")})),window.Caramel.EventEmitter.on("videoSDK:connectError",(function(){return O.error("VIDEO SDK","Failed to connect Video SDK")})),window.Caramel.EventEmitter.on("videoSDK:error",(function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return O.error.apply(O,j(["VIDEO SDK"],t,!1))})),window.Caramel.EventEmitter.on("config:validationError",(function(t){console.error(t)})),window.Caramel.EventEmitter.on("zone:init",(function(t){O.info("ZONE",'"'.concat(t.name,'" successfully initialized'),t)})),window.Caramel.EventEmitter.on("zone:validationError",(function(t){O.group("ZONE: ".concat(t.message),"error"),t.errors.forEach((function(t){return O.error("ZONE",t)})),O.groupEnd()})),window.Caramel.EventEmitter.on("zone:tryToCallVideoAd",(function(t,e){return O.info("ZONE",'"'.concat(t.name,'" trying to call VAST from:'),e)})),window.Caramel.EventEmitter.on("banner:validationError",(function(t){O.group("BANNER: ".concat(t.message),"error"),t.errors.forEach((function(t){return O.error("BANNER",t)})),O.groupEnd()})))},t}();var F="Caramel";const q=function(){function t(){}return t.save=function(t,e){sessionStorage.setItem("".concat(F,"_").concat(t),JSON.stringify(e))},t.get=function(t){var e=sessionStorage.getItem("".concat(F,"_").concat(t));return e?JSON.parse(e):null},t.remove=function(t){sessionStorage.removeItem("".concat(F,"_").concat(t))},t.clear=function(){sessionStorage.clear()},t}();var M=function(t){return new Promise((function(e){return setTimeout(e,t)}))},R=function(t,e){e&&(e.innerHTML=t,e.querySelectorAll("script").forEach((function(t){var e,n=document.createElement("script");Array.from(t.attributes).forEach((function(t){n.setAttribute(t.name,t.value)})),n.text=t.text,null===(e=t.parentNode)||void 0===e||e.replaceChild(n,t)})))},H=function(t){var e={"adfox_yandex_adplay-adv":["p1","p2"],adfox_NAMENAME:["p1","p2"],pb_digitalcaramel:["siteId","placementId"],pb_vox:["placement","placementId"],pb_between:["s"],pb_rtbsape:["placeId"]};return e[t.bidder]?e[t.bidder].every((function(e){return t.params[e]&&!!t.params[e]})):!!t.params.placementId},N=function(t){var e,n,o,i,r,a,s,c,l,d,u;switch(t.bidder){case"adfox_yandex_adplay-adv":return{p1:null===(e=t.params)||void 0===e?void 0:e.p1,p2:null===(n=t.params)||void 0===n?void 0:n.p2};case"adfox_NAMENAME":return{p1:null===(o=t.params)||void 0===o?void 0:o.p1,p2:null===(i=t.params)||void 0===i?void 0:i.p2};case"pb_digitalcaramel":return{siteId:null===(r=t.params)||void 0===r?void 0:r.siteId,placementId:null===(a=t.params)||void 0===a?void 0:a.placementId.split(",").at(-1).trim()};case"pb_vox":return{placement:null===(s=t.params)||void 0===s?void 0:s.placement,placementId:null===(c=t.params)||void 0===c?void 0:c.placementId.split(",").at(-1).trim()};case"pb_between":return{s:null===(l=t.params)||void 0===l?void 0:l.s};case"pb_rtbsape":return{placeId:+(null===(d=t.params)||void 0===d?void 0:d.placeId)};default:return{placementId:null===(u=t.params)||void 0===u?void 0:u.placementId.split(",").at(-1).trim()}}};const V=function(){function t(t){this.isFeedInView=!1,this.element=null,this.isDestroyed=!1,this.feedMutationObserver=null,this.feedIntersectionObserver=null,this.resizeHandler=null,this.zone=t,l.includes(t.formatType)&&this.setupFeedObservation()}return t.prototype.destroy=function(){var t,e;this.isDestroyed=!0,null===(t=this.feedMutationObserver)||void 0===t||t.disconnect(),this.feedMutationObserver=null,null===(e=this.feedIntersectionObserver)||void 0===e||e.disconnect(),this.feedIntersectionObserver=null,this.resizeHandler&&(window.removeEventListener("resize",this.resizeHandler),this.resizeHandler=null)},t.prototype.setupFeedObservation=function(){var t=this,e=document.querySelector(".".concat(d));if(e)this.initializeFeedObserver(e);else{var n=new MutationObserver((function(e){for(var o=0,i=e;o<i.length;o++){if("childList"===i[o].type){var r=document.querySelector(".".concat(d));if(r)return n.disconnect(),t.feedMutationObserver=null,void(t.isDestroyed||t.initializeFeedObserver(r))}}}));this.feedMutationObserver=n,n.observe(document.body,{childList:!0,subtree:!0})}},t.prototype.initializeFeedObserver=function(t){var e,n,o,i,r=this,a=new IntersectionObserver((function(t){t.forEach((function(t){if(t.isIntersecting){var e=r.isFeedInView;r.isFeedInView=!0,e||(window.Caramel.EventEmitter.emit("debug","Feed entered viewport"),window.Caramel.EventEmitter.emit("format:feedViewEnter"))}else{e=r.isFeedInView;r.isFeedInView=!1,e&&(window.Caramel.EventEmitter.emit("debug","Feed left viewport"),window.Caramel.EventEmitter.emit("format:feedViewLeave"))}}))}),{root:null,rootMargin:"0px",threshold:0});this.isFeedInView=(e=document.querySelector(".".concat(d)),n=e.getBoundingClientRect(),o=window.innerWidth||document.documentElement.clientWidth,i=window.innerHeight||document.documentElement.clientHeight,n.bottom>=0&&n.top<=i&&n.right>=0&&n.left<=o),this.feedIntersectionObserver=a,a.observe(t)},t.prototype.setupResizeObservation=function(){var t=this,e=function(){if(t.element){var e=t.canShowForDevice();t.element.style.transition="none",t.element.style.visibility=e?"visible":"hidden",t.element.offsetHeight,t.element.style.transition=""}};e(),this.resizeHandler=e,window.addEventListener("resize",e)},t.prototype.canShowForDevice=function(){if(!this.zone.params.isAdaptive)return!0;var t,e=this.zone.params.adaptiveOptions.sizes;return t=window.innerWidth>e.tabletWidth?"desktop":window.innerWidth<=e.tabletWidth&&window.innerWidth>e.phoneWidth?"tablet":"phone",this.zone.params.adaptiveOptions.devices.includes(t)},t}();var W=function(){return W=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},W.apply(this,arguments)}
1,U=function(t,e,n,o){return new(n||(n=Promise))((function(i,r){function a(t){try{c(o.next(t))}catch(t){r(t)}}function s(t){try{c(o.throw(t))}catch(t){r(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}c((o=o.apply(t,e||[])).next())}))},Y=function(t,e){var n,o,i,r,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return r={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;r&&(r=0,s[0]&&(a=0)),a;)try{if(n=1,o&&(i=2&s[0]?o.return:s[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,s[1])).done)return i;switch(o=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,o=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],o=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},G=function(){function t(t){var e,n;this.player=null,this.videoElement=null,this.hiddenSiblings=[],this.id=Math.random().toString(16).slice(2,8),this.vastUrl=t.vastUrl,this.partnerId=t.partnerId,this.category=t.category,this.container=t.container,this.zone=t.zone,this.source=t.source,this.timeout=null!==(e=t.timeout)&&void 0!==e?e:8e3,this.percentage=t.percentage,this.wrapperStyle=null!==(n=t.wrapperStyle)&&void 0!==n?n:"",this.src=t.src,this.startDelay=t.startDelay,this.onStart=t.onStart,this.onEnd=t.onEnd,this.onError=t.onError}return t.prototype.call=function(){return U(this,void 0,void 0,(function(){var t,e,n,o,i,r=this;return Y(this,(function(a){switch(a.label){case 0:return this.createVideoElement(),this.startDelay&&this.videoElement?(this.src&&this.videoElement.play().catch((function(){})),[4,new Promise((function(t){return setTimeout(t,1e3*r.startDelay)}))]):[3,2];case 1:a.sent(),a.label=2;case 2:return this.videoElement&&this.wrapper?window.ya.videoAd&&"function"==typeof window.ya.videoAd.loadModule?(e=this.videoElement,n=this.wrapper,[2,new Promise((function(t){var o=!1,i=function(e){o||(o=!0,null!==s&&clearTimeout(s),t(e))},a=r.timeout,s=window.setTimeout((function(){var t,e={type:"YANDEX_TIMEOUT",message:"Yandex Video Ads SDK did not start within ".concat(a," ms")};r.emitEvent("videoSDK:error",e),null===(t=r.onError)||void 0===t||t.call(r,e),r.cleanup(),i(!1)}),a);window.ya.videoAd.loadModule("AdLoader").then((function(t){var n={adBreakType:"preroll"};return r.vastUrl&&(n.vastUrl=r.vastUrl),r.partnerId&&(n.partnerId=r.partnerId),void 0!==r.category&&null!==r.category&&(n.category=r.category),r.src&&(n.videoContentUrl=r.src),e&&!isNaN(e.duration)&&(n.videoContentDuration=e.duration),n.targetRef=window.location.href,t.AdLoader.create(n)})).then((function(t){return t.loadAd()})).then((function(t){return t.preload({videoSlot:e}).then((function(){return t})).catch((function(){return t}))})).then((function(t){var a,s=t.createPlaybackController(e,n);r.player=s;var c=function(t,e){s&&"function"==typeof s.subscribe&&s.subscribe(t,e)},l=function(){var t;r.emitEvent("videoSDK:start"),null===(t=r.onStart)||void 0===t||t.call(r),q.get("logger")&&r.syncInfobox(),i(!0)};c("AdStarted",(function(){l()})),c("AdPodImpression",(function(){o||l()}));if(c("AllAdPodVideoComplete",(function(){var t;r.emitEvent("videoSDK:end"),null===(t=r.onEnd)||void 0===t||t.call(r),r.cleanup()})),c("AdPodError",(function(t){var e,n={type:"YANDEX_AD_ERROR",error:(null==t?void 0:t.errorMessage)||"Yandex Video Ads AdPod error",raw:t};r.emitEvent("videoSDK:error",n),null===(e=r.onError)||void 0===e||e.call(r,n),r.cleanup(),i(!1)})),c("AdStartRejected",(function(t){var e,n={type:"AUTOPLAY_BLOCKED",message:"Autoplay rejected by browser (AdStartRejected)",raw:t};r.emitEvent("videoSDK:error",n),null===(e=r.onError)||void 0===e||e.call(r,n),r.cleanup(),i(!1)})),c("AdClickThru",(function(){})),"function"==typeof s.playAd)s.playAd();
1else{var d={type:"YANDEX_CONTROLLER_INVALID",message:"AdPlaybackController.playAd is not a function"};r.emitEvent("videoSDK:error",d),null===(a=r.onError)||void 0===a||a.call(r,d),r.cleanup(),i(!1)}})).catch((function(t){var e,n={type:"YANDEX_SDK_ERROR",message:"Failed to initialize or load Yandex Video Ads SDK",innerError:t};r.emitEvent("videoSDK:error",n),null===(e=r.onError)||void 0===e||e.call(r,n),r.cleanup(),i(!1)}))}))]):(t={type:"YANDEX_SDK_NOT_LOADED",message:"Yandex Video Ads SDK is not available on window.ya.videoAd"},this.emitEvent("videoSDK:error",t),null===(i=this.onError)||void 0===i||i.call(this,t),this.cleanup(),[2,!1]):(t={type:"VIDEO_SLOT_NOT_CREATED",message:"Failed to create video slot"},this.emitEvent("videoSDK:error",t),null===(o=this.onError)||void 0===o||o.call(this,t),this.cleanup(),[2,!1])}}))}))},t.prototype.pause=function(){if(this.player)try{"function"==typeof this.player.pauseAd?this.player.pauseAd():"function"==typeof this.player.pause&&this.player.pause()}catch(t){}},t.prototype.resume=function(){if(this.player)try{"function"==typeof this.player.resumeAd?this.player.resumeAd():"function"==typeof this.player.playAd?this.player.playAd():"function"==typeof this.player.play&&this.player.play()}catch(t){}},t.prototype.stop=function(){if(this.player)try{"function"==typeof this.player.stopAd?this.player.stopAd():"function"==typeof this.player.pause&&this.player.pause()}catch(t){}this.cleanup()},t.prototype.destroy=function(){this.stop()},t.prototype.createVideoElement=function(){var t=this;if(!this.videoElement){var e=window.innerWidth<768?300:400,n=this.container.clientWidth>e?this.container.clientWidth:e,o=this.container.clientHeight>100?this.container.clientHeight:250,i="bottomLine"===this.zone.formatType,r="fadeInBox"===this.zone.formatType,a=i?".caramel-bottomLine__inner":r?".caramel-fadeInBox__inner":null,s=a?this.container.querySelector(a):null,c=s||this.container,l=s?this.wrapperStyle.replace("absolute","relative"):this.wrapperStyle;s&&(Array.from(s.children).forEach((function(e){e.classList.contains("caramel--hidden")||(e.classList.add("caramel--hidden"),t.hiddenSiblings.push(e))})),!i||"function"!=typeof this.zone.format.show||this.zone.format.isStatusClosedManually&&this.zone.format.hasShowAfterClose||this.zone.format.show()),c.insertAdjacentHTML("beforeend",'\n        <div id="Caramel_VideoAd_'.concat(this.id,'" style="width: ').concat(n,"px; height: ").concat(o,"px; overflow: hidden; position: relative; ").concat(l,'">\n          <video\n            id="Caramel_VideoAd_Player_').concat(this.id,'"\n            ').concat(this.src?'src="'.concat(this.src,'" controls'):"",'\n            playsinline\n            webkit-playsinline\n            muted\n            style="width: 100%; height: 100%;"\n          ></video>\n        </div>\n      ')),this.wrapper=document.getElementById("Caramel_VideoAd_".concat(this.id)),this.videoElement=document.getElementById("Caramel_VideoAd_Player_".concat(this.id))}},t.prototype.cleanup=function(){if(this.player=null,this.wrapper)try{this.wrapper.remove()}catch(t){}this.hiddenSiblings.length>0&&(this.hiddenSiblings.forEach((function(t){return t.classList.remove("caramel--hidden")})),this.hiddenSiblings=[]),this.wrapper=null,this.videoElement=null},t.prototype.emitEvent=function(t,e){var n,o,i,r,a=W({zone:null===(n=this.zone)||void 0===n?void 0:n.name,source:this.source,vastUrl:this.vastUrl},e);null===(r=null===(i=null===(o=window.Caramel)||void 0===o?void 0:o.EventEmitter)||void 0===i?void 0:i.emit)||void 0===r||r.call(i,t,a)},t.prototype.syncInfobox=function(){var t;if(this.container){var e=this.container.querySelector("#Caramel_VideoAd_".concat(this.id));e&&e.insertAdjacentHTML("afterbegin",'<span class="caramel-infobox caramel-infobox--vast">'.concat(null!==(t=this.source)&&void 0!==t?t:"","</span>"))}},t}();const K=G;var Z,X=(Z=function(t,e){return Z=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},Z(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}Z(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),J=function(){return J=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},J.apply(this,arguments)};const Q=function(t){function e(e){var n=t.call(this,e)||this;return n.CUSTOM_CODE_LOADING_RANGE=2,n.params=J(J({customCode:"",customCodeDelay:3,customCodePriority:!1,customCodeFrequencyTime:0,customCodeFrequencyCount:0,customCodeReadySelector:"",customCodeReadyTimeout:3,yandexInstreamPartnerId:"",yandexInstreamDelay:15,yandexInstreamSrc:""},e.params),e.formatParams),n}return X(e,t),e.prototype.init=function(){var t=this;
1this.draw(),this.zone.banners.forEach((function(e,n){e.call({onRender:function(){0===n&&t.start()},onStub:function(){0===n&&t.start()}})}))},e.prototype.start=function(){var t,e=this;if(this.params.yandexInstreamPartnerId){this.setStep(this.params.customCodePriority?2:1);var n=document.getElementById("".concat(this.zone.banners[0].containerId,"_instream"));n.innerHTML="";var o=function(){e.setStep(1)},i=new K({partnerId:parseInt(this.params.yandexInstreamPartnerId,10),category:0,container:n,zone:this.zone,source:"yandexInstream",timeout:3e3,onEnd:o,onError:o,src:this.params.yandexInstreamSrc,startDelay:5}),r=this.params.customCodePriority?0:this.params.yandexInstreamDelay;if(setTimeout((function(){e.params.customCodePriority||e.setStep(2),i.call()}),1e3*r),this.params.customCodePriority){var a="".concat(this.zone.banners[0].containerId,"_instream"),s=setInterval((function(){e.hasContent(a)&&(clearInterval(s),setTimeout((function(){e.setStep(1)}),1e3*e.params.yandexInstreamDelay))}),100);setTimeout((function(){e.hasContent(a)||(clearInterval(s),e.setStep(1))}),3e3)}}else if(this.params.customCode&&!(this.zone.banners.length>1)&&this.checkCustomCodeFrequency()){this.setStep(this.params.customCodePriority?2:1);var c=this.params.customCodePriority?0:Math.max(0,1e3*(this.params.customCodeDelay-this.CUSTOM_CODE_LOADING_RANGE));setTimeout((function(){R(e.params.customCode,document.getElementById("".concat(e.zone.banners[0].c
1ontainerId,"_custom")))}),c);var l="".concat(this.zone.banners[0].containerId,"_custom");if(this.params.customCodePriority){var d=setInterval((function(){e.hasContent(l)&&(clearInterval(d),setTimeout((function(){e.setStep(1)}),1e3*e.params.customCodeDelay))}),100);setTimeout((function(){e.hasContent(l)||(clearInterval(d),e.setStep(1))}),1e3*(null!==(t=this.params.customCodeReadyTimeout)&&void 0!==t?t:3))}else setTimeout((function(){e.hasContent(l)&&e.setStep(2)}),1e3*this.params.customCodeDelay)}},e.prototype.hasContent=function(t){var e=document.getElementById(t);if(!e)return!1;if(this.params.customCodeReadySelector)return!!e.querySelector(this.params.customCodeReadySelector);if(e.querySelector(".caramel-moeVideo"))return!!e.querySelector(".caramel-moeVideo--started");if(e.querySelector("div[id^='adt_']"))return!!e.querySelector("div[id^='adt_'].started");var n=!!(e.querySelector("iframe")||e.querySelector("img")||e.querySelector("video")||e.querySelector(".adm-banner-container *")||e.querySelector('[id*="yandex_rtb_R-A"]:has(div)')),o=document.querySelector('[id*="traff_container"]'),i=!!o&&o.offsetHeight>x;return n||i},e.prototype.setStep=function(t){if(Array.from(this.element.querySelectorAll(".caramel-banner >
1 div")).forEach((function(e,n){n===t-1?e.classList.remove("caramel--hidden"):e.classList.add("caramel--hidden")})),1===t&&this.params.customCode){var e=document.getElementById("".concat(this.zone.banners[0].containerId,"_custom"));e&&(e.innerHTML="")}if(1===t&&this.params.yandexInstreamPartnerId){var n=document.getElementById("".concat(this.zone.banners[0].containerId,"_instream"));n&&(n.innerHTML="")}},e.prototype.draw=function(){var t,e,n=!!this.params.yandexInstreamPartnerId,o=!!this.params.customCode&&this.zone.banners.length<=1&&!n,i='\n      <div class="caramel-banner">\n        '.concat(this.zone.banners.map((function(t){return'<div id="'.concat(t.containerId,'"></div>')})).join(""),"\n        ").concat(o?'<div id="'.concat(null===(t=this.zone.banners[0])||void 0===t?void 0:t.containerId,'_custom"></div>'):"","\n        ").concat(n?'<div id="'.concat(null===(e=this.zone.banners[0])||void 0===e?void 0:e.containerId,'_instream"></div>'):"","\n      </div>\n    ");this.zone.container&&(this.zone.container.innerHTML="",this.zone.container.insertAdjacentHTML("beforeend",i),this.element=this.zone.container.querySelector(".caramel-banner"))},e.prototype.checkCustomCodeFrequency=function(){var t=this.params,e=t.customCodeFrequencyTime,n=t.customCodeFrequencyCount,o="Caramel_".concat(this.zone.id,"_customCodeFrequency");if(!e||!n)return localStorage.removeItem(o),!0;var i=Date.now(),r=60*e*1e3,a=[];try{var s=localStorage.getItem(o);a=s?JSON.parse(s):[]}catch(t){a=[]}return(a=a.filter((function(t){return i-t<r}))).length>=n?(localStorage.setItem(o,JSON.stringify(a)),!1):(a.push(i),localStorage.setItem(o,JSON.stringify(a)),!0)},e}(V);const $={close:'\n    <svg viewBox="0 0 24 24" xmlns="https://www.w3.org/2000/svg">\n      <path fill="currentColor" d="M18.3 5.71a.996.996 0 0 0-1.41 0L12 10.59L7.11 5.7A.996.996 0 1 0 5.7 7.11L10.59 12L5.7 16.89a.996.996 0 1 0 1.41 1.41L12 13.41l4.89 4.89a.996.996 0 1 0 1.41-1.41L13.41 12l4.89-4.89c.38-.38.38-1.02 0-1.4">\n      </path>\n    </svg>\n  ',chevron:'\n    <svg viewBox="0 0 512 512" xmlns="https://www.w3.org/2000/svg">\n      <path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="48" d="m112 184l144 144l144-144">\n      </path>\n    </svg>\n  '};var tt="https://yandex.ru/ads/system/context.js";const et=function(){function t(){}return t.start=function(t){this.timers[t]?window.Caramel.EventEmitter.emit("benchmark:error",'Timer "'.concat(t,'" is already running')):this.timers[t]=performance.now()},t.lap=function(t){if(this.timers[t])return performance.now()-this.timers[t];window.Caramel.EventEmitter.emit("benchmark:error",'Timer "'.concat(t,'" was not started'))},t.end=function(t){if(this.timers[t]){var e=performance.now()-this.timers[t];return delete this.timers[t],e}window.Caramel.EventEmitter.emit("benchmark:error",'Timer "'.concat(t,'" was not started'))},t.timers={},t}();var nt=function(){return nt=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},nt.apply(this,arguments)},ot=function(){function t(){}return t.initQueues=function(){window.Ya||(window.Ya={}),window.yaContextCb=window.yaContextCb||[],window.Ya.adfoxCode||(window.Ya.adfoxCode={}),window.Ya.adfoxCode.hbCallbacks||(window.Ya.adfoxCode.hbCallbacks=[])},t.getDynamicTimeout=function(){if(["mult-fan.tv","anime-bit.ru","academic.ru","smotret.tv","vtome.ru","vsepredohraniteli.ru","makeword.ru","moluch.ru","китайавто.рус","4ege.ru"].includes(window.location.hostname))return 1e3;if(!["fantvox.org","uknig.com"].includes(window.location.hostname))return 600;try{var t=navigator.connection||navigator.mozConnection||navigator.webkitConnection;if(t){var e=t.effectiveType,n=t.downlink;if("2g"===e||"slow-2g"===e||n<=1)return 2e3;if("3g"===e||n>1&&n<=4)return 1200}}catch(t){}return 600},t.connectHeaderBiddingScript=function(){var t=L.appendElement("script",{async:"true",src:"https://yandex.ru/ads/system/header-bidding.js"},"head");t.onload=function(){window.Caramel.headerBiddingScriptConnected=!0,window.Caramel.EventEmitter.emit("benchmark:log",et.lap("app:init"),"HB script successfully initialized"),window.Caramel.EventEmitter.emit("yandex:headerBiddingScriptConnectSuccess")},t.onerror=function(){window.Caramel.EventEmitter.emit("yandex:headerBiddingScriptConnectError")}},t.connectContextScript=function(){if(document.querySelector('script[src="'.concat(tt,'"]')))return window.Caramel.contextScriptConnected=!0,void window.Caramel.EventEmitter.emit("yandex:contextScriptConnectSuccess");var t=L.appendElement("script",{async:"true",src:tt},"head");t.onload=function(){window.Caramel.contextScriptConnected=!0,window.Caramel.EventEmitter.emit("benchmark:log",et.lap("app:init"),"Context script successfully initialized"),window.Caramel.EventEmitter.emit("yandex:contextScriptConnectSuccess")},t.onerror=function(){window.Caramel.EventEmitter.emit("yandex:contextScriptConnectError")}},t.setupHeaderBiddingSettings=function(e,n,o,i,r){void 0===r&&(r=!1);var a=Object.fromEntries(Object.entries(null!=n?n:{}).filter((function(t){return 1!==t[1]}))),s=nt(nt(nt(nt({},r&&{pbjs:window.pbjs}),{adUnits:o,biddersMap:e}),Object.keys(a).length>0&&{biddersCpmAdjustmentMap:a}),{callbacks:{onBidsReceived:function(t){void 0===t&&(t=[]),window.Caramel.EventEmitter.emit("yandex:headerBiddingBidsReceived",t)}},timeout:t.getDynamicTimeout(),syncPixels:[{bidder:"betweenDigital",pixels:["https://ads.betweendigital.com/sspmatch?p=42917&r=".concat((new Date).getTime()),"https://ads.betweendigital.com/sspmatch?p=41985&r=".concat((new Date).getTime())]}
1,{bidder:"sape",pixels:["https://acint.net/cmatch/?dp=14&pi=1753819"]},{bidder:"solta",pixels:["https://kimberlite.io/rtb/syncd"]},{bidder:"UMG",pixels:["https://a.ussp.io/sync?ssp=2529"]},{bidder:"techdig",pixels:["https://sync.opendsp.ru/match/sp.img"]}]});window.YaHeaderBiddingSettings=s,window.Caramel.EventEmitter.emit("yandex:headerBiddingSettingsSetup",s)},t.createAsyncBanner=function(t){window.yaContextCb.push((function(){window.Ya.adfoxCode.create(nt({ownerId:ke.config.adfox.ownerId},t))}))},t.createAdaptiveBanner=function(t,e,n,o){void 0===o&&(o=!1),window.yaContextCb.push((function(){window.Ya.adfoxCode.createAdaptive(nt({ownerId:ke.config.adfox.ownerId},t),e,nt(nt({},n),{isAutoReloads:o}))}))},t.reloadBanner=function(t,e){void 0===e&&(e=!1),window.Ya.adfoxCode.reload(t,{onlyIfWasVisible:e})},t.reloadAllVisibleBanners=function(){window.Ya.adfoxCode.reload(null,{onlyIfWasVisible:!0})},t.destroyBanner=function(t){window.Ya.adfoxCode.destroy(t)},t.clearSession=function(){window.Ya.adfoxCode.clearSession()},t.getPlatform=function(){return window.innerWidth>768?"desktop":"touch"},t.getLastWinnerBid=function(t){var e,n=window.Ya.headerBidding.getBidsReceived().filter((function(e){return e.containerId===t&&e.hasOwnProperty("cost")})),o=n.reduce((function(t,e){return e.cost.cpm>t.cost.cpm?e:t}),n[0]);return{adapterName:null==o?void 0:o.adapterName,cpm:null===(e=null==o?void 0:o.cost)||void 0===e?void 0:e.cpm}},t}();const it=ot;var rt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),at=function(){return at=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},at.apply(this,arguments)};const st=function(t){function e(e){var n=t.call(this,e)||this;return n.countdownTimer=null,n.countdownLeft=0,n.isManuallyClosed=!1,n.suppressNextDirectFloorAd=!1,n.directFloorAdTimer=null,n.params=at(at({isYandex:!1,showAfter:1,canCloseAfter:3,showAfterClose:0,removeAfterClose:!1,button:{position:"right",color:"#212121"},blur:5,textColor:"#FFFFFF",borderColor:"#212121",backgroundColor:"#21212150",recommendationWidgetId:"",recommendationWidgetDelay:15,directAdvertisementId:"",directAdvertisementFloorAdId:"",directAdvertisementDelay:15,customCode:"",customCodeDelay:15,customCodePriority:!1,customCodeFrequencyTime:0,customCodeFrequencyCount:0,customCodeReadySelector:"",customCodeReadyTimeout:3},e.params),e.formatParams),n}return rt(e,t),e.prototype.init=function(){var t=this;this.params.isYandex?(this.draw(),this.isFeedInView||this.zone.banners.forEach((function(e){return e.call({type:"floorAd",platform:it.getPlatform(),onClose:function(){t.params.removeAfterClose&&t.element.remove()}})}))):setTimeout((function(){t.draw(),t.isFeedInView?t.hide():t.zone.banners.forEach((function(e,n){return e.call({onRender:function(){0!==n||t.isFeedInView||t.start()},onStub:function(){var o;e.onStub(),0===n&&(null===(o=null==e?void 0:e.stub)||void 0===o?void 0:o.isActive)&&!t.isFeedInView&&t.start()}})})),t.params.recommendationWidgetId&&window.yaContextCb.push((function(){window.Ya.Context.AdvManager.renderWidget({renderTo:"".concat(t.zone.banners[0].c
1ontainerId,"_widget"),blockId:t.params.recommendationWidgetId})}))}),this.params.showAfter?1e3*this.params.showAfter:0),this.zone.listen("format:feedViewEnter",(function(){t.params.isYandex?t.zone.banners.forEach((function(t){return t.destroy()})):t.hide()})),this.zone.listen("format:feedViewLeave",(function(){t.params.isYandex?t.zone.banners.forEach((function(t){return t.call({type:"floorAd",platform:it.getPlatform()})})):t.canShowForDevice()&&!t.isManuallyClosed&&t.start()}))},e.prototype.draw=function(){var t,e,n,o,i,r,a=this,s=this.params,c=s.isYandex,l=s.button,d=s.canCloseAfter,u=s.removeAfterClose,p=s.blur,m=s.textColor,h=s.borderColor,f=s.backgroundColor,v=c?'\n        <div id="'.concat(null===(t=this.zone.banners[0])||void 0===t?void 0:t.containerId,'"></div>\n      '):'\n        <div class="caramel-bottomLine">\n          <div class="caramel-bottomLine__toggle caramel-bottomLine__toggle--'.concat(l.position,'" style="color: ').concat(m,"; background-color: ").concat(l.color,';">\n            ').concat(d||$.close,'\n          </div>\n          <div class="caramel-bottomLine__inner" style="border-top: 2px solid ').concat(h,"; backdrop-filter: blur(").concat(p,"px); background-color: ").concat(f,';">\n            <div id="').concat(null===(e=this.zone.banners[0])||void 0===e?void 0:e.containerId,'"></div>\n            ').concat(this.params.recommendationWidgetId?'<div id="'.concat(null===(n=this.zone.banners[0])||void 0===n?void 0:n.containerId,'_widget"></div>'):"","\n            ").concat(this.params.directAdvertisementId?'<div id="'.concat(null===(o=this.zone.banners[0])||void 0===o?void 0:o.containerId,'_direct"></div>'):"","\n            ").concat(this.params.customCode?'<div id="'.concat(null===(i=this.zone.banners[0])||void 0===i?void 0:i.containerId,'_custom"></div>'):"","\n          </div>\n        </div>\n      ");if(this.zone.container){this.zone.container.innerHTML="",this.zone.container.insertAdjacentHTML("beforeend",v),this.element=c?document.getElementById(null===(r=this.zone.banners[0])||void 0===r?void 0:r.containerId):this.zone.container.querySelector(".caramel-bottomLine");var y=this.zone.container.querySelector(".caramel-bottomLine__toggle");y&&y.addEventListener("click",(function(){y.innerHTML.includes("</svg>")&&(u?(a.hide(),setTimeout((function(){a.element.remove()}),700)):a.toggle())}))}},e.prototype.start=function(){var t,e=this;if(this.setStep(1),!this.isFeedInView){if(this.params.showAfterClose&&this.isManuallyClosed||this.show(),this.params.canCloseAfter&&this.startCountdown(),this.params.recommendationWidgetId)setTimeout((function(){e.setStep(2)}),1e3*this.params.recommendationWidgetDelay);else if(this.params.directAdvertisementId)setTimeout((function(){var t="".concat(e.zone.banners[0].c
1ontainerId,"_direct"),n=document.getElementById(t);n&&(n.innerHTML="",window.yaContextCb.push((function(){window.Ya.Context.AdvManager.render({renderTo:t,blockId:e.params.directAdvertisementId,onRender:function(){e.setStep(2)}})})))}),1e3*this.params.directAdvertisementDelay);else if(this.params.customCode){if(!this.checkCustomCodeFrequency())return;if(this.setStep(this.params.customCodePriority?2:1),R(this.params.customCode,document.getElementById("".concat(this.zone.banners[0].containerId,"_custom"))),this.params.customCodePriority){var n=setInterval((function(){e.hasCustomContent()&&(clearInterval(n),setTimeout((function(){e.setStep(1)}),1e3*e.params.customCodeDelay))}),100);setTimeout((function(){e.hasCustomContent()||(clearInterval(n),e.setStep(1))}),1e3*(null!==(t=this.params.customCodeReadyTimeout)&&void 0!==t?t:3))}else setTimeout((function(){e.hasCustomContent()&&e.setStep(2)}),1e3*this.params.customCodeDelay)}!this.params.isYandex&&this.params.directAdvertisementFloorAdId&&(this.suppressNextDirectFloorAd?this.suppressNextDirectFloorAd=!1:(this.clearDirectFloorAdTimer(),this.destroyDirectFloorAd(),this.directFloorAdTimer=window.setTimeout((function(){e.callDirectFloorAd()}),1e3*this.params.directAdvertisementDelay)))}},e.prototype.hasCustomContent=function(){var t=this.zone.banners[0].c
1ontainerId;if(this.params.customCodeReadySelector)return!!document.querySelector("#".concat(t,"_custom ").concat(this.params.customCodeReadySelector));if(document.querySelector("#".concat(t,"_custom .caramel-moeVideo")))return!!document.querySelector("#".concat(t,"_custom .caramel-moeVideo--started"));if(document.querySelector("#".concat(t,"_custom div[id^='adt_']")))return!!document.querySelector("#".concat(t,"_custom div[id^='adt_'].started"));var e=!!(document.querySelector("#".concat(t,"_custom iframe"))||document.querySelector("#".concat(t,"_custom img"))||document.querySelector("#".concat(t,"_custom video"))||document.querySelector(".adm-banner-container *")),n=document.querySelector('[id*="traff_container"]'),o=!!n&&n.offsetHeight>x;return e||o},e.prototype.stopCountdown=function(){null!==this.countdownTimer&&(clearInterval(this.countdownTimer),this.countdownTimer=null)},e.prototype.startCountdown=function(){var t,e=this;this.stopCountdown();var n=this.element.querySelector(".caramel-bottomLine__toggle");if(n){var o=null!==(t=this.params.canCloseAfter)&&void 0!==t?t:0;o&&(this.countdownLeft=o,n.innerHTML=String(this.countdownLeft),this.countdownTimer=window.setInterval((function(){if(e.countdownLeft-=1,e.countdownLeft<=0)return e.stopCountdown(),void(n.innerHTML=$.close);n.innerHTML=String(e.countdownLeft)}),1e3))}},e.prototype.setStep=function(t){Array.from(this.element.querySelectorAll(".caramel-bottomLine__inner >
1 div")).forEach((function(e,n){n===t-1?e.classList.remove("caramel--hidden"):e.classList.add("caramel--hidden")}))},e.prototype.callDirectFloorAd=function(){var t=this;this.clearDirectFloorAdTimer(),this.zone.container.querySelector(".caramel-bottomLine")&&window.yaContextCb.push((function(){window.Ya.Context.AdvManager.render({blockId:t.params.directAdvertisementFloorAdId,type:"floorAd",platform:it.getPlatform(),onRender:function(){t.hide()},onClose:function(){t.params.removeAfterClose&&(t.destroyDirectFloorAd(),t.element.remove())}})}))},e.prototype.destroyDirectFloorAd=function(){var t=this;this.clearDirectFloorAdTimer(),window.yaContextCb.push((function(){window.Ya.Context.AdvManager.destroy({blockId:t.params.directAdvertisementFloorAdId})}));var e=document.querySelector('[class*="csr-uniq"]:has(div[data-'.concat(this.params.directAdvertisementFloorAdId.toLowerCase(),"-floorad])"));e&&e.remove()},e.prototype.clearDirectFloorAdTimer=function(){null!==this.directFloorAdTimer&&(clearTimeout(this.directFloorAdTimer),this.directFloorAdTimer=null)},Object.defineProperty(e.prototype,"isStatusClosedManually",{get:function(){return this.isManuallyClosed},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasShowAfterClose",{get:function(){return!!this.params.showAfterClose},enumerable:!1,configurable:!0}),e.prototype.show=function(){this.params.directAdvertisementFloorAdId&&this.destroyDirectFloorAd(),this.isManuallyClosed=!1,this.isFeedInView||this.element.classList.add("open")},e.prototype.hide=function(){this.stopCountdown(),this.clearDirectFloorAdTimer(),this.element.classList.remove("open")},e.prototype.toggle=function(){var t=this;this.element.classList.contains("open")?(this.suppressNextDirectFloorAd=!!this.params.showAfterClose,this.hide(),this.isManuallyClosed=!0,this.params.showAfterClose&&setTimeout((function(){t.show(),t.start()}),1e3*this.params.showAfterClose)):this.show()},e.prototype.checkCustomCodeFrequency=function(){var t=this.params,e=t.customCodeFrequencyTime,n=t.customCodeFrequencyCount,o="Caramel_".concat(this.zone.id,"_customCodeFrequency");if(!e||!n)return localStorage.removeItem(o),!0;var i=Date.now(),r=60*e*1e3,a=[];try{var s=localStorage.getItem(o);a=s?JSON.parse(s):[]}catch(t){a=[]}return(a=a.filter((function(t){return i-t<r}))).length>=n?(localStorage.setItem(o,JSON.stringify(a)),!1):(a.push(i),localStorage.setItem(o,JSON.stringify(a)),!0)},e}(V);var ct=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();const lt=function(t){function e(e){return t.call(this,e)||this}return ct(e,t),e.prototype.init=function(){this.draw(),this.zone.banners.forEach((function(t){return t.call()}))},e.prototype.draw=function(){var t,e='\n      <div class="caramel-combo">\n        <div id="'.concat(null===(t=this.zone.banners[0])||void 0===t?void 0:t.containerId,'"></div>\n      </div>\n    ');this.zone.container&&(this.zone.container.innerHTML="",this.zone.container.insertAdjacentHTML("beforeend",e),this.element=this.zone.container.querySelector(".caramel-combo"))},e}(V);var dt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),ut=function(){return ut=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},ut.apply(this,arguments)};const pt=function(t){function e(e){var n=t.call(this,e)||this;return n.currentStep=1,n.params=ut(ut({width:300,height:250,rotateAfter:10,color:"#212121"},e.params),e.formatParams),n}return dt(e,t),e.prototype.init=function(){this.draw(),this.zone.banners.forEac
1h((function(t){return t.call()})),this.start()},e.prototype.draw=function(){var t,e,n,o,i,r,a,s,c=this.params.color,l=Math.floor(1*this.params.width),d=Math.floor(1*this.params.height),u='\n      <div class="caramel-cube" style="perspective: calc('.concat(l,'px * 2.5);">\n        <div class="caramel-cube__sides" style="width: ').concat(l,"px; height: ").concat(d,'px; transform: rotateY(0deg);">\n          <div data-step="2" class="caramel-cube__side caramel-cube__side--left" style="transform: translateX(-').concat(l/2,"px) rotateY(-90deg); background-color: ").concat(c,';">\n            <div id="').concat(null===(e=null===(t=this.zone.banners)||void 0===t?void 0:t[1])||void 0===e?void 0:e.containerId,'"></div>\n          </div>\n          <div data-step="4" class="caramel-cube__side caramel-cube__side--right" style="transform: translateX(').concat(l/2,"px) rotateY(90deg); background-color: ").concat(c,';">\n            <div id="').concat(null===(o=null===(n=this.zone.banners)||void 0===n?void 0:n[3])||void 0===o?void 0:o.containerId,'"></div>\n          </div>\n          <div data-step="1" class="caramel-cube__side caramel-cube__side--front" style="transform: translateZ(').concat(l/2,"px); background-color: ").concat(c,';">\n            <div id="').concat(null===(r=null===(i=this.zone.banners)||void 0===i?void 0:i[0])||void 0===r?void 0:r.containerId,'"></div>\n          </div>\n          <div data-step="3" class="caramel-cube__side caramel-cube__side--back" style="transform: translateZ(-').concat(l/2,"px) rotateY(180deg); background-color: ").concat(c,';">\n            <div id="').concat(null===(s=null===(a=this.zone.banners)||void 0===a?void 0:a[2])||void 0===s?void 0:s.containerId,'"></div>\n          </div>\n        </div>\n      </div>\n    ');this.zone.container&&(this.zone.container.innerHTML="",this.zone.container.insertAdjacentHTML("beforeend",u),this.element=this.zone.container.querySelector(".caramel-cube"))},e.prototype.start=function(){var t=this,e=setInterval((function(){t.rotate()}),1e3*this.params.rotateAfter),n=function(){document.hidden?clearInterval(e):e=setInterval((function(){t.rotate()}),1e3*t.params.rotateAfter)};document.addEventListener("visibilitychange",n),this.zone.onDestroy((function(){clearInterval(e),document.removeEventListener("visibilitychange",n)}))},e.prototype.rotate=function(){var t=this,e=this.element.querySelector(".caramel-cube__sides"),n=parseFloat(e.style.transform.match(/rotateY\(([-\d.]+)deg\)/)[1]);this.element.classList.add("rotating"),e.style.transform="rotateY(".concat(n+90,"deg)"),4===this.currentStep?this.currentStep=1:this.currentStep+=1,setTimeout((function(){t.element.classList.remove("rotating"),2===t.zone.banners.length&&t.replace(t.currentStep)}),1e3)},e.prototype.replace=function(t){var e=this.element.querySelector('[data-step="'.concat(t%2!=0?"2":"1",'"]')),n=this.element.querySelector('[data-step="'.concat(t%2!=0?"4":"3",'"]'));if(e&&n){var o=e.cloneNode(!0),i=n.cloneNode(!0);e.parentNode.replaceChild(i,e),n.parentNode.replaceChild(o,n)}},e}(V);var mt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();const ht=function(t){function e(e){return t.call(this,e)||this}return mt(e,t),e.prototype.init=function(){this.draw()},e.prototype.draw=function(){var t="";this.zone.banners.forEach((function(e){t+='<div id="'.concat(e.containerId,'"></div>')})),this.zone.container&&(this.zone.container.innerHTML="",this.zone.container.insertAdjacentHTML("beforeend",t))},e}(V);var ft=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),vt=function(){return vt=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},vt.apply(this,arguments)};const yt=function(t){function e(e){var n=t.call(this,e)||this;return n.isShowedFirstTime=!1,n.params=vt(vt({showAfter:0,canCloseAfter:3,showAfterClose:0,removeAfterClose:!1,closeButton:{position:"tl",color:"#d05858"},position:{top:null,left:null,right:5,bottom:5},customCode:"",customCodeDelay:15,customCodePriority:!1,customCodeFrequencyTime:0,customCodeFrequencyCount:0,customCodeReadySelector:"",customCodeReadyTimeout:3},e.params),e.formatParams),n}return ft(e,t),e.prototype.init=function(){var t=this;
1setTimeout((function(){t.draw(),t.zone.banners.forEach((function(e){return e.call({onRender:function(){t.start()},onStub:function(){var n;e.onStub(),(null===(n=null==e?void 0:e.stub)||void 0===n?void 0:n.isActive)&&t.start()}})}))}),this.params.showAfter?1e3*this.params.showAfter:0),this.zone.listen("format:feedViewEnter",(function(){t.disappear()})),this.zone.listen("format:feedViewLeave",(function(){t.appear()}))},e.prototype.draw=function(){var t,e,n=this,o=this.params,i=o.canCloseAfter,r=o.closeButton,a=o.position,s=" \n      ".concat(null!==a.top?"top: ".concat(a.top,"px;"):""," \n      ").concat(null!==a.left?"left: ".concat(a.left,"px;"):"","\n      ").concat(null!==a.right?"right: ".concat(a.right,"px;"):""," \n      ").concat(null!==a.bottom?"bottom: ".concat(a.bottom,"px;"):""," \n    "),c='\n      <div class="caramel-fadeInBox" style="'.concat(s,'">\n        <div class="caramel-fadeInBox__close caramel-fadeInBox__close--').concat(r.position,'" style="background-color: ').concat(r.color,';">\n          ').concat(i||$.close,'\n        </div>\n        <div class="caramel-fadeInBox__inner">\n          <div id="').concat(null===(t=this.zone.banners[0])||void 0===t?void 0:t.containerId,'"></div>\n          ').concat(this.params.customCode?'<div id="'.concat(null===(e=this.zone.banners[0])||void 0===e?void 0:e.containerId,'_custom"></div>'):"","\n        </div>\n      </div>\n    ");if(this.zone.container){this.zone.container.innerHTML="",this.zone.container.insertAdjacentHTML("beforeend",c),this.element=this.zone.container.querySelector(".caramel-fadeInBox");var l=this.zone.container.querySelector(".caramel-fadeInBox__close");l&&l.addEventListener("click",(function(){l.innerHTML.includes("</svg>")&&(n.params.removeAfterClose?n.close():n.hide())}))}},e.prototype.start=function(){var t,e=this;if(this.isShowedFirstTime&&0!==this.params.showAfterClose||this.show(),this.isShowedFirstTime||(this.isShowedFirstTime=!0),this.params.canCloseAfter&&this.startCountdown(),this.params.customCode){if(!this.checkCustomCodeFrequency())return;if(this.setStep(this.params.customCodePriority?2:1),R(this.params.customCode,document.getElementById("".concat(this.zone.banners[0].c
1ontainerId,"_custom"))),this.params.customCodePriority){var n=setInterval((function(){e.hasCustomContent()&&(clearInterval(n),setTimeout((function(){e.setStep(1)}),1e3*e.params.customCodeDelay))}),100);setTimeout((function(){e.hasCustomContent()||(clearInterval(n),e.setStep(1))}),1e3*(null!==(t=this.params.customCodeReadyTimeout)&&void 0!==t?t:3))}else setTimeout((function(){e.hasCustomContent()&&e.setStep(2)}),1e3*this.params.customCodeDelay)}},e.prototype.hasCustomContent=function(){var t=this.zone.banners[0].containerId;if(this.params.customCodeReadySelector)return!!document.querySelector("#".concat(t,"_custom ").concat(this.params.customCodeReadySelector));if(document.querySelector("#".concat(t,"_custom .caramel-moeVideo")))return!!document.querySelector("#".concat(t,"_custom .caramel-moeVideo--started"));if(document.querySelector("#".concat(t,"_custom div[id^='adt_']")))return!!document.querySelector("#".concat(t,"_custom div[id^='adt_'].started"));var e=!!(document.querySelector("#".concat(t,"_custom iframe"))||document.querySelector("#".concat(t,"_custom img"))||document.querySelector("#".concat(t,"_custom video"))||document.querySelector(".adm-banner-container *")),n=document.querySelector('[id*="traff_container"]'),o=!!n&&n.offsetHeight>x;return e||o},e.prototype.setStep=function(t){Array.from(this.element.querySelectorAll(".caramel-fadeInBox__inner >
1 div")).forEach((function(e,n){n===t-1?e.classList.remove("caramel--hidden"):e.classList.add("caramel--hidden")}))},e.prototype.startCountdown=function(){var t=this.element.querySelector(".caramel-fadeInBox__close");t.innerHTML=this.params.canCloseAfter.toString();var e=this.params.canCloseAfter,n=setInterval((function(){(e-=1)<=0?(clearInterval(n),t.innerHTML=$.close):t.innerHTML=e.toString()}),1e3)},e.prototype.show=function(){this.element.classList.add("open")},e.prototype.hide=function(){var t=this;this.element.classList.remove("open"),this.params.showAfterClose||setTimeout((function(){var e=document.getElementById(t.zone.banners[0].containerId);e&&(e.innerHTML="")}),1e3),this.params.showAfterClose&&setTimeout((function(){t.show(),t.startCountdown()}),1e3*this.params.showAfterClose)},e.prototype.close=function(){var t=this;this.element.classList.remove("open"),setTimeout((function(){t.zone.banners[0].destroy(),t.element.remove()}),1e3)},e.prototype.appear=function(){this.element&&this.show()},e.prototype.disappear=function(){this.element&&this.element.classList.remove("open")},e.prototype.checkCustomCodeFrequency=function(){var t=this.params,e=t.customCodeFrequencyTime,n=t.customCodeFrequencyCount,o="Caramel_".concat(this.zone.id,"_customCodeFrequency");if(!e||!n)return localStorage.removeItem(o),!0;var i=Date.now(),r=60*e*1e3,a=[];try{var s=localStorage.getItem(o);a=s?JSON.parse(s):[]}catch(t){a=[]}return(a=a.filter((function(t){return i-t<r}))).length>=n?(localStorage.setItem(o,JSON.stringify(a)),!1):(a.push(i),localStorage.setItem(o,JSON.stringify(a)),!0)},e}(V);var bt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),wt=function(){return wt=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},wt.apply(this,arguments)};const gt=function(t){function e(e){var n=t.call(this,e)||this;return n.params=wt(wt({isYandex:!1,showAfter:0,canCloseAfter:5,backgroundOpacityPercentage:80,bar:{height:30,buttonColor:"#363636",progress:{activeColor:"#d05858",backgroundColor:"#212121"}}},e.params),e.formatParams),n}return bt(e,t),e.prototype.init=function(){var t=this;this.draw();var e=function(){t.zone.banners.forEach((function(e){return e.call(wt(wt({fullscreen:!0},t.params.isYandex?{type:"fullscreen"}:{fullscreen:!0}),{platform:it.getPlatform(),onLoad:function(e){if(e&&(null==e?void 0:e.bundleParams)){var n=e.bundleParams,o=n.blockId,i=void 0===o?"":o,r=n.campaignId,a=["1823276","1820275"].includes(void 0===r?"":r);t.params.isYandex||i.startsWith("R-A")||a||document.querySelector(".caramel-fullscreen")||(t.drawCustomFullscreen(),setTimeout((function(){t.start()}),1))}},onRender:function(){t.params.isYandex&&requestAnimationFrame((function(){t.startYandexCountdown()}))}}))}))};this.params.showAfter?setTimeout((function(){e()}),1e3*this.params.showAfter):e()},e.prototype.draw=function(){var t,e='\n      <div id="'.concat(null===(t=this.zone.banners[0])||void 0===t?void 0:t.containerId,'"></div>\n    ');this.zone.container&&(this.zone.container.innerHTML="",this.zone.container.insertAdjacentHTML("beforeend",e))},e.prototype.drawCustomFullscreen=function(){var t='\n      <div class="caramel-fullscreen" style="background: rgba(0, 0, 0, '.concat(this.params.backgroundOpacityPercentage,'%);">\n        <div class="caramel-fullscreen__wrapper">\n          <div class="caramel-fullscreen__load-bar" style="height: ').concat(this.params.bar.height,'px">\n            <div class="caramel-fullscreen__load-bar__line" style="background-color: ').concat(this.params.bar.progress.backgroundColor,';">\n              <div class="caramel-fullscreen__load-bar__progress" style="background-color: ').concat(this.params.bar.progress.activeColor,"; transition-duration: ").concat(this.params.canCloseAfter,'s"></div>\n            </div>\n            <div class="caramel-fullscreen__load-bar__text" style="background-color: ').concat(this.params.bar.buttonColor,';">\n              ').concat(this.params.canCloseAfter?this.params.canCloseAfter:$.close,'\n            </div>\n          </div>  \n          <div class="caramel-fullscreen__content"></div>\n        </div>\n      </div>\n    ');this.zone.container&&(this.zone.container.insertAdjacentHTML("beforeend",t),this.element=this.zone.container.querySelector(".caramel-fullscreen"),document.getElementById(this.zone.banners[0].c
1ontainerId)&&this.element.querySelector(".caramel-fullscreen__content").appendChild(document.getElementById(this.zone.banners[0].containerId)))},e.prototype.start=function(){this.show(),this.startCountdown(this.params.canCloseAfter)},e.prototype.startCountdown=function(t){var e=this,n=this.element.querySelector(".caramel-fullscreen__load-bar__line"),o=this.element.querySelector(".caramel-fullscreen__load-bar__text");this.bodyFreeze(),n.classList.add("active");var i=t,r=setInterval((function(){(i-=1)<=0?(clearInterval(r),o.innerHTML=$.close,o.addEventListener("click",(function(){e.bodyUnfreeze(),e.close()}))):o.textContent=i.toString()}),1e3)},e.prototype.startYandexCountdown=function(){if(0!==this.params.canCloseAfter){var t=document.querySelector('[data-fullscreen-element-name="close-btn"]');if(t){var e=t.innerHTML,n=this.params.canCloseAfter;t.innerHTML='<span class="caramel-fullscreen__customClose">'.concat(n.toString(),"</span>");var o=setInterval((function(){(n-=1)<=0?(clearInterval(o),t.innerHTML=e):t.innerHTML='<span class="caramel-fullscreen__customClose">'.concat(n.toString(),"</span>")}),1e3)}}},e.prototype.show=function(){this.element.classList.add("open")},e.prototype.close=function(){var t=this;this.element.classList.remove("open"),setTimeout((function(){t.zone.banners[0].destroy(),t.zone.container.remove()}),1e3)},e.prototype.bodyFreeze=function(){document.body.classList.add("caramel-freeze")},e.prototype.bodyUnfreeze=function(){document.body.classList.remove("caramel-freeze")},e}(V);var _t=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),Ct=function(){return Ct=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},Ct.apply(this,arguments)};const St=function(t){function e(e){var n=t.call(this,e)||this;return n.params=Ct(Ct({height:"100vh",feedId:"",feedDelay:15,feedCardCount:6},e.params),e.formatParams),n}return _t(e,t),e.prototype.init=function(){var t=this;this.draw(),this.zone.banners.forEach((function(e){return e.call({onRender:function(){t.start()}})}))},e.prototype.draw=function(){var t,e,n=this.params.height,o='\n      <div class="caramel-interscroller" style="height: '.concat(this.canShowForDevice()?n:"0px",';">\n        <div class="caramel-interscroller__inner">\n          <div class="caramel-interscroller__banner">\n             <div id="').concat(null===(t=this.zone.banners[0])||void 0===t?void 0:t.containerId,'"></div>\n             ').concat(this.params.feedId?'<div id="'.concat(null===(e=this.zone.banners[0])||void 0===e?void 0:e.containerId,'_feed" class="caramel--hidden" style="height: 100%;"></div>'):"","\n          </div>\n        </div>\n      </div>\n    ");this.zone.container&&(this.zone.container.innerHTML="",this.zone.container.insertAdjacentHTML("beforeend",o),this.element=this.zone.container.querySelector(".caramel-interscroller"))},e.prototype.start=function(){var t=this;this.setStep(1),this.params.feedId&&(window.yaContextCb.push((function(){window.Ya.Context.AdvManager.render({type:"feed",blockId:t.params.feedId,feedCardCount:t.params.feedCardCount,renderTo:"".concat(t.zone.banners[0].c
1ontainerId,"_feed")})})),setTimeout((function(){var e=t.element.querySelector("#".concat(t.zone.banners[0].containerId,"_feed > div"));e&&e.clientHeight>0&&t.setStep(2)}),1e3*this.params.feedDelay))},e.prototype.setStep=function(t){Array.from(this.element.querySelectorAll(".caramel-interscroller__banner > div")).forEach((function(e,n){n===t-1?e.classList.remove("caramel--hidden"):e.classList.add("caramel--hidden")}))},e}(V);var Et=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),xt=function(){return xt=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},xt.apply(this,arguments)};const It=function(t){function e(e){var n=t.call(this,e)||this;return n.params=xt(xt({showAfter:1},e.params),e.formatParams),n}return Et(e,t),e.prototype.init=function(){this.draw(),this.zone.banners.forEach((function(t){return t.call()})),this.params.showAfter?setTimeout(this.start.bind(this),1e3*this.params.showAfter):this.start()},e.prototype.draw=function(){var t,e,n='\n      <div class="caramel-smartCatfish">\n        <div class="caramel-smartCatfish__item caramel-smartCatfish__item--top">\n          <div id="'.concat(null===(t=this.zone.banners[0])||void 0===t?void 0:t.containerId,'"></div>\n        </div>\n        <div class="caramel-smartCatfish__item caramel-smartCatfish__item--bottom">\n          <div id="').concat(null===(e=this.zone.banners[1])||void 0===e?void 0:e.containerId,'"></div>\n        </div>\n      </div>\n    ');this.zone.container&&(this.zone.container.innerHTML="",this.zone.container.insertAdjacentHTML("beforeend",n),this.element=this.zone.container.querySelector(".caramel-smartCatfish"),this.topElement=this.zone.container.querySelector(".caramel-smartCatfish__item--top"),this.bottomElement=this.zone.container.querySelector(".caramel-smartCatfish__item--bottom"))},e.prototype.start=function(){var t=this,e=null,n=window.scrollY||document.documentElement.scrollTop;if(!this.zone.isDestroyed){var o=function(){return i()};window.addEventListener("scroll",o),this.zone.onDestroy((function(){return window.removeEventListener("scroll",o)})),this.topElement.classList.add("active"),this.bottomElement.classList.add("active");var i=function(){var o=window.scrollY||document.documentElement.scrollTop;"up"===(e=o>n?"down":"up")?(t.topElement.classList.remove("active"),t.bottomElement.classList.add("active")):"down"===e&&(t.bottomElement.classList.remove("active"),t.topElement.classList.add("active")),n=o<=0?0:o}}},e}(V);var At=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),Tt=function(){return Tt=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},Tt.apply(this,arguments)};const Lt=function(t){function e(e){var n=t.call(this,e)||this;return n.params=Tt(Tt({showAfter:1,canCloseAfter:3,position:"left",button:{position:"top",color:"#212121"}},e.params),e.formatParams),n}return At(e,t),e.prototype.init=function(){var t=this;setTimeout((function(){t.draw(),t.zone.banners.forEach((function(e){return e.call({onRender:function(){t.start()}})}))}),this.params.showAfter?1e3*this.params.showAfter:0)},e.prototype.draw=function(){var t,e=this,n=this.params,o=n.canCloseAfter,i=n.position,r=n.button,a='\n      <div class="caramel-smartSticky caramel-smartSticky--'.concat(i,'">\n        <div class="caramel-smartSticky__toggle caramel-smartSticky__toggle--').concat(r.position,'" style="background-color: ').concat(r.color,'">\n          ').concat(o||$.chevron,'\n        </div>\n        <div class="caramel-smartSticky__inner">\n          <div id="').concat(null===(t=this.zone.banners[0])||void 0===t?void 0:t.containerId,'"></div>\n        </div>\n      </div>\n    ');if(this.zone.container){this.zone.container.innerHTML="",this.zone.container.insertAdjacentHTML("beforeend",a),this.element=this.zone.container.querySelector(".caramel-smartSticky");var s=this.zone.container.querySelector(".caramel-smartSticky__toggle");s&&s.addEventListener("click",(function(){s.innerHTML.includes("</svg>
1")&&e.toggle()}))}},e.prototype.start=function(){this.show(),this.params.canCloseAfter&&this.startCountdown()},e.prototype.startCountdown=function(){var t=this.element.querySelector(".caramel-smartSticky__toggle");t.innerHTML=this.params.canCloseAfter.toString();var e=this.params.canCloseAfter,n=setInterval((function(){0===(e-=1)?(clearInterval(n),t.innerHTML=$.chevron):t.innerHTML=e.toString()}),1e3)},e.prototype.show=function(){this.element.classList.add("open")},e.prototype.hide=function(){this.element.classList.remove("open")},e.prototype.toggle=function(){this.element.classList.contains("open")?this.hide():this.show()},e}(V);var zt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),kt=function(){return kt=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},kt.apply(this,arguments)};const Ot=function(t){function e(e){var n=t.call(this,e)||this;return n.params=kt(kt({backgroundColor:"transparent",progress:{height:3.5,activeColor:"#d05858",backgroundColor:"#212121"},isSticky:!1,sticky:{top:null,left:null,right:20,bottom:20},isClosable:!1,canCloseAfter:5,closeButton:{position:"tr",color:"#212121"}},e.params),e.formatParams),n}return zt(e,t),e.prototype.init=function(){this.draw(),this.zone.banners.forEach((function(t){return t.call()})),this.start()},e.prototype.draw=function(){var t=this.params,e=t.backgroundColor,n=t.progress,o=t.isSticky,i=t.sticky,r=t.isClosable,a=t.canCloseAfter,s=t.closeButton,c="caramel-story ".concat(o?"caramel-story--sticky":""),l="".concat(i?"\n            background-color: ".concat(e,"; \n            ").concat(o&&null!==i.top?"top: ".concat(i.top,"px;"):""," \n            ").concat(o&&null!==i.left?"left: ".concat(i.left,"px;"):""," \n            ").concat(o&&null!==i.right?"right: ".concat(i.right,"px;"):""," \n            ").concat(o&&null!==i.bottom?"bottom: ".concat(i.bottom,"px;"):""):""),d='\n      <div class="'.concat(c,'" style="').concat(l,'">\n        ').concat(r?'\n              <div class="caramel-story__close caramel-story__close--'.concat(s.position,'" style="background-color: ').concat(s.color,';">\n                ').concat(a,"\n              </div>\n            "):"",'\n        <div class="caramel-story__wrapper">\n          <div class="caramel-story__progress">\n            ').concat(this.zone.banners.map((function(){return'\n                  <div class="caramel-story__progress__item" style="height: '.concat(n.height,"px; background-image: -webkit-linear-gradient(left, ").concat(n.activeColor," 0%, ").concat(n.activeColor," 50%, ").concat(n.backgroundColor," 50.1%, ").concat(n.backgroundColor,' 100%); animation-duration: 10s"></div>\n                ')})).join(""),'\n          </div>\n          <div class="caramel-story__banners">\n            ').concat(this.zone.banners.map((function(t){return'\n                  <div class="caramel-story__banner">\n                    <div id="'.concat(t.containerId,'"></div>\n                  </div>\n                ')})).join(""),"\n          </div>\n        </div>\n      </div>\n    ");this.zone.container&&(this.zone.container.innerHTML="",this.zone.container.insertAdjacentHTML("beforeend",d),this.element=this.zone.container.querySelector(".caramel-story"))},e.prototype.start=function(){var t=this,e=this.params,n=e.isClosable,o=e.canCloseAfter,i=this.element,r=Array.from(this.element.querySelectorAll(".caramel-story__banner")),a=this.element.querySelector(".caramel-story__close"),s=Array.from(this.element.querySelectorAll(".caramel-story__progress__item")),c=!1,l=!1;if(this.zone.listen("zoneOnViewEnter",(function(e){e===t.zone.id&&s.forEac
1h((function(t){return t.classList.remove("paused")}))})),this.zone.listen("zoneOnViewLeave",(function(e){e===t.zone.id&&s.forEach((function(t){return t.classList.add("paused")}))})),a&&a.addEventListener("click",(function(){return p()})),n)var d=o,u=setInterval((function(){0===(d-=1)?(c=!0,a.innerHTML=$.close,clearInterval(u)):a.innerHTML=d.toString()}),1e3);var p=function(){c&&(t.zone.banners.forEach((function(t){return t.destroy()})),t.element.innerHTML="")},m=function(e){var n,o,a=e.target,c=s.indexOf(a);n=c<s.length-2?c+2:c===s.length-2?0:1;var d=10,u=setInterval((function(){!i.matches(":hover")&&t.zone.isInView&&(d-=1),3===d&&l&&(t.zone.banners[n].reload(),clearInterval(u)),0===d&&clearInterval(u)}),1e3);c+1===s.length-1&&(l=!0),c+1<s.length?(o=c+1,a.classList.remove("active"),a.classList.add("passed")):(o=0,s.forEach((function(t){t.classList.remove("active"),t.classList.remove("passed")})),r.forEach((function(t){t.classList.remove("active")}))),s[o].classList.add("active"),r[o].classList.add("active"),r[c].classList.remove("active")};s.forEach((function(t){return t.addEventListener("animationend",m,!1)})),r[0].classList.add("active"),s[0].classList.add("active")},e}(V);var Pt=function(t,e,n,o){return new(n||(n=Promise))((function(i,r){function a(t){try{c(o.next(t))}catch(t){r(t)}}function s(t){try{c(o.throw(t))}catch(t){r(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}c((o=o.apply(t,e||[])).next())}))},Bt=function(t,e){var n,o,i,r,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return r={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;r&&(r=0,s[0]&&(a=0)),a;)try{if(n=1,o&&(i=2&s[0]?o.return:s[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,s[1])).done)return i;switch(o=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,o=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],o=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},jt=function(){function t(t,e,n){var o=this;this.type="html",this.container=null,this.id=t.id,this.source=t.source,this.code=t.params.code,this.duration=t.duration,this.frequency=t.frequency,this.frequencyCount=t.frequencyCount,this.attemptTimeout=t.attemptTimeout,this.cooldownFails=t.cooldownFails,this.cooldownTimeout=t.cooldownTimeout,this.readySelector=t.readySelector,this.width=t.width,this.height=t.height,this.maxWidth=t.maxWidth,this.maxHeight=t.maxHeight,this.zone=n,this.container=e,q.get("logger")&&setInterval((function(){o.syncInfobox()}),200)}return t.prototype.call=function(){return Pt(this,void 0,void 0,(function(){var t,e=this;return Bt(this,(function(n){return this.container?(this.container.innerHTML="",R(this.code,this.container),this.readySelector?[2,new Promise((function(t){var n=e.container,o=!1,i=function(e){o||(o=!0,r.disconnect(),clearTimeout(a),t(e))};if(n.querySelector(e.readySelector))i(!0);else{var r=new MutationObserver((function(){n.querySelector(e.readySelector)&&i(!0)}));r.observe(n,{childList:!0,subtree:!0,attributes:!0,attributeOldValue:!1});var a=window.setTimeout((function(){i(!1)}),e.attemptTimeout)}}))]:(t=Date.now(),[2,new Promise((function(n){var o=setInterval((function(){e.checkIsBlockEmpty(e.container)?Date.now()-t>=e.attemptTimeout&&(clearInterval(o),n(!1)):(clearInterval(o),n(!0))}),250)}))])):[2,!1]}))}))},t.prototype.checkIsBlockEmpty=function(t){var e=""!==t.innerHTML.trim(),n=t.children.length>0,o=!!Array.from(t.querySelectorAll("iframe, img, video")).filter((function(t){return t.scrollHeight>x})).length,i=!!t.querySelector('div[id*="yandex_rtb"]')&&t.querySelector('div[id*="yandex_rtb"]').scrollHeight>x||!!t.querySelector('div[class*="csr-uniq"]');return!e||!n||!i&&!o},t.prototype.show=function(){this.container.setAttribute("data-state","filled")},t.prototype.hide=function(){this.container.setAttribute("data-state","empty"),this.container.innerHTML=""},t.prototype.syncInfobox=function(){var t,e;this.container&&"empty"!==this.container.getAttribute("data-state")&&("static"===window.getComputedStyle(this.container).position&&(this.zone.container.style.position="relative"),null===(t=this.container.querySelector(".caramel-infobox"))||void 0===t||t.remove(),null===(e=this.container)||void 0===e||e.insertAdjacentHTML("afterbegin",'<span class="caramel-infobox caramel-infobox--vast">'.concat(this.source,"</span>")))},t}();const Dt=jt;
1var Ft=function(t,e,n,o){return new(n||(n=Promise))((function(i,r){function a(t){try{c(o.next(t))}catch(t){r(t)}}function s(t){try{c(o.throw(t))}catch(t){r(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}c((o=o.apply(t,e||[])).next())}))},qt=function(t,e){var n,o,i,r,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return r={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;r&&(r=0,s[0]&&(a=0)),a;)try{if(n=1,o&&(i=2&s[0]?o.return:s[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,s[1])).done)return i;switch(o=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,o=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],o=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},Mt=function(){function t(t,e,n){this.type="vast",this.container=null,this.id=t.id,this.source=t.source,this.vastUrl=t.params.vastUrl,this.duration=t.duration,this.frequency=t.frequency,this.frequencyCount=t.frequencyCount,this.attemptTimeout=t.attemptTimeout,this.cooldownFails=t.cooldownFails,this.cooldownTimeout=t.cooldownTimeout,this.readySelector=t.readySelector,this.width=t.width,this.height=t.height,this.maxWidth=t.maxWidth,this.maxHeight=t.maxHeight,this.zone=n,this.container=e}return t.prototype.call=function(){return Ft(this,void 0,void 0,(function(){return qt(this,(function(t){switch(t.label){case 0:return this.container?(this.container.innerHTML="",[4,new K({vastUrl:this.vastUrl,container:this.container,zone:this.zone,source:this.source,timeout:this.attemptTimeout}).call()]):[2,!1];case 1:return[2,t.sent()]}}))}))},t.prototype.show=function(){this.container.setAttribute("data-state","filled")},t.prototype.hide=function(){this.container.setAttribute("data-state","empty"),this.container.innerHTML=""},t}();const Rt=Mt;var Ht=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),Nt=function(){return Nt=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},Nt.apply(this,arguments)},Vt=function(t,e,n,o){return new(n||(n=Promise))((function(i,r){function a(t){try{c(o.next(t))}catch(t){r(t)}}function s(t){try{c(o.throw(t))}catch(t){r(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}c((o=o.apply(t,e||[])).next())}))},Wt=function(t,e){var n,o,i,r,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return r={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;r&&(r=0,s[0]&&(a=0)),a;)try{if(n=1,o&&(i=2&s[0]?o.return:s[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,s[1])).done)return i;switch(o=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,o=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],o=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},Ut=function(t,e,n){if(n||2===arguments.length)for(var o,i=0,r=e.length;i<r;i++)!o&&i in e||(o||(o=Array.prototype.slice.call(e,0,i)),o[i]=e[i]);return t.concat(o||Array.prototype.slice.call(e))};const Yt=function(t){function e(e){var n,o,i=t.call(this,e)||this;i.blockInstances=[],i.currentBlock=null,i.pool=[],i.preselectedNext=null,i.preloadTimeoutId=null,i.PREFETCH_OFFSET_MS=2e3,i.isRemoved=!1,i.isRotationStarted=!1,i.countdownTimer=null,i.isTemporarilyClosed=!1,i.isPaused=!1,i.resumeWaiters=[],i.isWaitingLogSilenced=!1,i.pendingProbes=new Map,i.showAfterCloseTimerId=null,i.handleVisibilityChange=function(){document.hidden?i.pauseRotation():i.resumeRotation()};var r=null!==(o=null===(n=e.formatParams)||void 0===n?void 0:n.blocks)&&void 0!==o?o:[],a=r.length>0?r:[];return i.params=Nt(Nt(Nt({width:"auto",height:"auto",maxWidth:"max-content",maxHeight:"max-content",type:"static",canCloseAfter:3,closeButton:{position:"tl",color:"#d05858"},position:{top:null,left:null,right:0,bottom:0},poolMethod:"multiple",adaptivePriority:!1,greedyPool:!1,showAfter:0,showAfterClose:0},e.params),e.formatParams),{blocks:a.map((function(t){var e,n,o,i,r,a,s,c,l,d,u,p,m,h,f,v,y,b,w,g,_;return Nt(Nt({},t),{id:t.id,type:null!==(e=null==t?void 0:t.type)&&void 0!==e?e:"html",source:null!==(n=null==t?void 0:t.source)&&void 0!==n?n:"",sourceType:null!==(o=null==t?void 0:t.sourceType)&&void 0!==o?o:"",matchingId:null!==(i=null==t?void 0:t.matchingId)&&void 0!==i?i:"",duration:(null==t?void 0:t.duration)||13,allowedCountries:null!==(r=null==t?void 0:t.allowedCountries)&&void 0!==r?r:[],blockedCountries:null!==(a=null==t?void 0:t.blockedCountries)&&void 0!==a?a:[],frequency:null!==(s=null==t?void 0:t.frequency)&&void 0!==s?s:0,frequencyCount:null!==(c=null==t?void 0:t.frequencyCount)&&void 0!==c?c:1,attemptTimeout:null!==(l=null==t?void 0:t.attemptTimeout)&&void 0!==l?l:3e3,cooldownFails:null!==(d=null==t?void 0:t.cooldownFails)&&void 0!==d?d:5,c
1ooldownTimeout:null!==(u=null==t?void 0:t.cooldownTimeout)&&void 0!==u?u:6e4,readySelector:null!==(p=null==t?void 0:t.readySelector)&&void 0!==p?p:"",width:null!==(m=null==t?void 0:t.width)&&void 0!==m?m:"100%",height:null!==(h=null==t?void 0:t.height)&&void 0!==h?h:"100%",maxWidth:null!==(f=null==t?void 0:t.maxWidth)&&void 0!==f?f:"max-content",maxHeight:null!==(v=null==t?void 0:t.maxHeight)&&void 0!==v?v:"max-content",isActive:null===(y=null==t?void 0:t.isActive)||void 0===y||y,params:{vastUrl:null!==(w=null===(b=null==t?void 0:t.params)||void 0===b?void 0:b.vastUrl)&&void 0!==w?w:null,code:null!==(_=null===(g=null==t?void 0:t.params)||void 0===g?void 0:g.code)&&void 0!==_?_:""}})}))}),i}return Ht(e,t),e.prototype.init=function(){return Vt(this,void 0,void 0,(function(){var t,e,n,o=this;return Wt(this,(function(i){return this.params.blocks.length?(this.draw(),this.createInstances(),this.blockInstances.length?(this.attachVisibilityListener(),"stickyOnScroll"===this.params.type&&this.initScrollObservation(),"stickyAlways"===this.params.type&&this.start(),this.log("info","🔄 Initialized with ".concat(this.blockInstances.length," blocks.")),t=function(){return Vt(o,void 0,void 0,(function(){return Wt(this,(function(t){switch(t.label){case 0:return[4,this.waitUntilResumed()];case 1:return t.sent(),[4,this.startRotation()];case 2:return t.sent(),[2]}}))}))},e=function(){o.params.showAfter?window.setTimeout((function(){t()}),1e3*o.params.showAfter):t()},(null===(n=null===window||void 0===window?void 0:window.ya)||void 0===n?void 0:n.videoAd)?e():(this.log("info","🔄 Waiting for Video SDK connect..."),window.Caramel.EventEmitter.once("videoSDK:connectSuccess",(function(){return Vt(o,void 0,void 0,(function(){return Wt(this,(function(t){return this.log("success","✅ Video SDK connected, starting rotation."),e(),[2]}))}))}))),[2]):(this.log("info","No eligible blocks after filtering, aborting StreamLine."),[2])):[2]}))}))},e.prototype.draw=function(){var t=this,e=this.params,n=e.width,o=e.height,i=e.type,r=e.canCloseAfter,a=e.closeButton,s=e.position,c=e.blocks,l="\n      width: ".concat(n,";\n      height: ").concat(o,";\n      max-width: ").concat(this.params.maxWidth,";\n      max-height: ").concat(this.params.maxHeight,";\n      ").concat("static"!==i&&null!==s.top?"top: ".concat(s.top,"px;"):"","\n      ").concat("static"!==i&&null!==s.left?"left: ".concat(s.left,"px;"):"","\n      ").concat("static"!==i&&null!==s.right?"right: ".concat(s.right,"px;"):""," \n      ").concat("static"!==i&&null!==s.bottom?"bottom: ".concat(s.bottom,"px;"):""," \n    "),d='\n      <div class="caramel-streamLine caramel-streamLine--'.concat(i,'" style="').concat(l,'">\n        ').concat("stickyAlways"===i?'\n            <div class="caramel-streamLine__close caramel-streamLine__close--'.concat(a.position,'" style="background-color: ').concat(a.color,';">\n              ').concat(r||$.close,"\n            </div>\n          "):"",'\n        <div class="caramel-streamLine__inner">\n          ').concat(c.filter((function(t){return t.isActive})).map((function(t){return'\n                <div\n                  id="Caramel_'.concat(t.id,'"\n                  class="caramel-streamLine__block"\n                  data-type="').concat(t.type,'"\n                  data-state="empty"\n                  style="width: ').concat(t.width,"; height: ").concat(t.height,"; max-width: ").concat(t.maxWidth,"; max-height: ").concat(t.maxHeight,';"\n                ></div>\n              ')})).join(""),"\n        </div>\n      </div>\n    ");if(this.zone.container){this.zone.container.innerHTML="",this.zone.container.insertAdjacentHTML("beforeend",d),this.element=this.zone.container.querySelector(".caramel-streamLine");var u=this.zone.container.querySelector(".caramel-streamLine__close");u&&(this.hideCloseButton(),u.addEventListener("click",(function(){var e=u.innerHTML.trim();!Number.isNaN(Number(e))||(e.includes("<svg")||e.includes("</svg>"))&&t.close()})))}},e.prototype.createInstances=function(){var t=this;this.blockInstances=this.params.blocks.filter((function(t){return t.isActive})).filter((function(t){var e=t.allowedCountries.map((function(t){return t.toLowerCase()})),n=t.blockedCountries.map((function(t){return t.toLowerCase()}));return e.length?e.includes(window.Caramel.Geo.countryCode):!n.length||!n.includes(window.Caramel.Geo.countryCode)}
1)).filter((function(t){return"html"===t.type||"vast"===t.type})).map((function(e){var n,o=document.getElementById("Caramel_".concat(e.id));if(!o)return null;if("html"===e.type)n=new Dt(e,o,t.zone);else{if("vast"!==e.type)return null;n=new Rt(e,o,t.zone)}return n.matchingId=e.matchingId,n})).filter(Boolean)},e.prototype.pauseRotation=function(){var t,e;this.isPaused||(this.isPaused=!0,this.log("info","Rotation paused (tab hidden). current = ".concat(null!==(e=null===(t=this.currentBlock)||void 0===t?void 0:t.source)&&void 0!==e?e:"none")),null!==this.preloadTimeoutId&&(clearTimeout(this.preloadTimeoutId),this.preloadTimeoutId=null),this.preselectedNext=null,null!==this.countdownTimer&&(clearInterval(this.countdownTimer),this.countdownTimer=null))},e.prototype.resumeRotation=function(){var t,e;this.isPaused&&(this.isPaused=!1,this.log("info","Rotation resumed (tab visible). current = ".concat(null!==(e=null===(t=this.currentBlock)||void 0===t?void 0:t.source)&&void 0!==e?e:"none")),this.resumeWaiters.splice(0).forEach((function(t){return t()})),"stickyAlways"===this.params.type&&this.params.canCloseAfter&&this.currentBlock&&this.startCountdown(),this.currentBlock&&this.scheduleNextPrefetch(this.currentBlock))},e.prototype.waitUntilResumed=function(){return Vt(this,void 0,void 0,(function(){var t=this;return Wt(this,(function(e){switch(e.label){case 0:return this.isPaused?[4,new Promise((function(e){return t.resumeWaiters.push(e)}))]:[2];case 1:return e.sent(),[2]}}))}))},e.prototype.attachVisibilityListener=function(){document.addEventListener("visibilitychange",this.handleVisibilityChange),document.hidden&&this.pauseRotation()},e.prototype.detachVisibilityListener=function(){document.removeEventListener("visibilitychange",this.handleVisibilityChange)},e.prototype.clearShowAfterCloseTimer=function(){null!==this.showAfterCloseTimerId&&(clearTimeout(this.showAfterCloseTimerId),this.showAfterCloseTimerId=null)},e.prototype.hideAllBlocks=function(t){this.blockInstances.forEach((function(e){t&&e===t||e.hide()})),this.hideInterferringElements()},e.prototype.hideInterferringElements=function(){Ut(Ut(Ut(Ut([],Array.from(document.querySelectorAll(".grf-mobile-fullscreen")),!0),Array.from(document.querySelectorAll(".buzz-container.buzzplayer-touch.buzz_fullscreen")),!0),Array.from(document.querySelectorAll(".alfadart-fullscreen")),!0),Array.from(document.querySelectorAll("#fl_btw_ad_centercenter")),!0).forEach((function(t){return t.remove()}))},e.prototype.hideCloseButton=function(){if(this.element){var t=this.element.querySelector(".caramel-streamLine__close");t&&(t.style.display="none")}},e.prototype.showCloseButton=function(){if(this.element){var t=this.element.querySelector(".caramel-streamLine__close");t&&(t.style.display="")}},e.prototype.reopenIfClosed=function(){this.element&&this.isTemporarilyClosed&&(this.element.classList.remove("caramel-streamLine--closed"),this.isTemporarilyClosed=!1)},e.prototype.startCountdown=function(){var t=this;if(this.element&&this.params.canCloseAfter&&!this.isPaused&&!document.hidden){var e=this.element.querySelector(".caramel-streamLine__close");if(e){null!==this.countdownTimer&&(clearInterval(this.countdownTimer),this.countdownTimer=null);var n=this.params.canCloseAfter;e.innerHTML=n.toString(),this.countdownTimer=window.setInterval((function(){t.isPaused||document.hidden?null!==t.countdownTimer&&(clearInterval(t.countdownTimer),t.countdownTimer=null):(n-=1)<=0?(null!==t.countdownTimer&&(clearInterval(t.countdownTimer),t.countdownTimer=null),e.innerHTML=$.close):e.innerHTML=n.toString()}),1e3)}}},e.prototype.start=function(){this.params.canCloseAfter&&this.startCountdown()},e.prototype.close=function(){var t=this;if(null!==this.countdownTimer&&(clearInterval(this.countdownTimer),this.countdownTimer=null),null!==this.preloadTimeoutId&&(clearTimeout(this.preloadTimeoutId),this.preloadTimeoutId=null),this.hideAllBlocks(),this.element){if("stickyAlways"===this.params.type)return this.element.classList.add("caramel-streamLine--closed"),this.isTemporarilyClosed=!0,void(this.params.showAfterClose&&this.params.showAfterClose>0&&(this.pauseRotation(),this.clearShowAfterCloseTimer(),this.showAfterCloseTimerId=window.setTimeout((function(){t.resumeRotation()}),1e3*this.params.showAfterClose)));this.element.remove(),this.isRemoved=!0,this.clearShowAfterCloseTimer(),this.detachVisibilityListener(),this.resumeWaiters.splice(0).forEac
1h((function(t){return t()}))}},e.prototype.isFrequencyBlocked=function(t){if(!t.frequency)return!1;var e={frequencyTime:t.frequency,frequencyCount:t.frequencyCount},n=e.frequencyTime,o=e.frequencyCount,i="Caramel_streamline_block_".concat(t.id,"_frequency");if(!n||!o)return!1;var r=Date.now(),a=60*n*1e3,s=[];try{var c=localStorage.getItem(i);s=c?JSON.parse(c):[]}catch(t){s=[]}return(s=s.filter((function(t){return r-t<a}))).length>=o},e.prototype.markBlockShown=function(t){if(t.frequency&&t.frequencyCount){var e=Date.now(),n=60*t.frequency*1e3,o="Caramel_streamline_block_".concat(t.id,"_frequency"),i=[];try{var r=localStorage.getItem(o);i=r?JSON.parse(r):[]}catch(t){i=[]}(i=i.filter((function(t){return e-t<n}))).push(e),localStorage.setItem(o,JSON.stringify(i))}},e.prototype.probeBlock=function(t){return Vt(this,void 0,void 0,(function(){var e,n,o=this;return Wt(this,(function(i){return(e=this.pendingProbes.get(t))?[2,e]:(n=Vt(o,void 0,void 0,(function(){var e,n,o,i,r;return Wt(this,(function(a){switch(a.label){case 0:t._isProbing=!0,e=t.container,"filled"!==(n=e.getAttribute("data-state")||"empty")&&(e.setAttribute("data-state","probing"),null===(i=this.element)||void 0===i||i.classList.add("probing")),a.label=1;case 1:return a.trys.push([1,3,4,5]),[4,t.call()];case 2:return o=a.sent(),t._lastStatus=o,o||"filled"===n||e.setAttribute("data-state","empty"),[2,o];case 3:return a.sent(),t._lastStatus=!1,"filled"!==n&&e.setAttribute("data-state","empty"),[2,!1];case 4:return t._isProbing=!1,"filled"!==n&&(null===(r=this.element)||void 0===r||r.classList.remove("probing")),this.pendingProbes.delete(t),[7];case 5:return[2]}}
1))})),this.pendingProbes.set(t,n),[2,n])}))}))},e.prototype.selectFromPool=function(){return Vt(this,arguments,void 0,(function(t){var e,n,o,i,r,a,s,c,l=this;return void 0===t&&(t=!1),Wt(this,(function(d){switch(d.label){case 0:return e=t?"PREFETCH":"ROTATION",this.isWaitingLogSilenced||this.log("info","🔍 Probing Pool (".concat(e,")...")),this.pool.length||(this.pool=Ut([],this.blockInstances,!0)),n=Date.now(),o=[],i=this.pool.filter((function(e){return t&&e===l.currentBlock?(o.push("".concat(e.source," (is current)")),!1):l.isFrequencyBlocked(e)?(o.push("".concat(e.source," (frequency locked)")),!1):!(e._cooldownUntil&&e._cooldownUntil>n)||(o.push("".concat(e.source," (cooldown: ").concat(Math.ceil((e._cooldownUntil-n)/1e3),"s left)")),!1)})),o.length>0&&!this.isWaitingLogSilenced&&this.log("info","➖ Candidates excluded: ".concat(o.join(", "))),i.length?[3,2]:(t||this.isWaitingLogSilenced||(this.log("info","⏳ All blocks are unavailable. Reasons: ".concat(o.join(" | ")||"unknown",". Waiting.")),this.isWaitingLogSilenced=!0),this.pool=Ut([],this.blockInstances,!0),t||!this.currentBlock||this.isFrequencyBlocked(this.currentBlock)?[4,M(200)]:[2,this.currentBlock]);case 1:return d.sent(),[2,null];case 2:return r=i.length,a=this.params.adaptivePriority?Ut([],i,!0).sort((function(t,e){return l.getFillRate(e)-l.getFillRate(t)})):this.blockInstances.filter((function(t){return i.includes(t)})),s=new Map,c=Math.max.apply(Math,Ut(Ut([],a.map((function(t){return t.attemptTimeout})),!1),[5e3],!1)),[2,new Promise((function(t){var e=!1,n=null,o=function(o){if(!e){e=!0,clearTimeout(d),n&&(clearTimeout(n),n=null);var i=[];a.forEach((function(t){var e=s.get(t);e&&i.push("".concat(t.source,": ").concat(e.isShown?"filled":"empty"," in ").concat(e.time,"ms"))}));var c=i.join(" | ");if(!o)return l.log("info","❌ No winners in pool, resetting. Candidates = ".concat(r,". Attempts: ").concat(c||"no attempts finished")),l.pool=Ut([],l.blockInstances,!0),void t(null);l.applyGreedyPool(o,r)?l.log("success","✅ Winner: ".concat(o.source," (greedy — kept in pool, fill rate ").concat((100*l.getFillRate(o)).toFixed(0),"%). Details: ").concat(c)):r>1?l.log("success","✅ Winner: ".concat(o.source," (removed from pool). Pool size before = ").concat(r,", after = ").concat(l.pool.length,". Details: ").concat(c)):l.log("success","✅ Winner: ".concat(o.source," (single in pool, restarting pool). Details: ").concat(c)),t(o)}},i=function(t){if(void 0===t&&(t=!1),!e){var r=a.filter((function(t){var e=s.get(t);return(null==e?void 0:e.done)&&e.isShown}));if(r.length){var c=r[0],d=a.indexOf(c),u=a.slice(0,d).some((function(t){var e;return!(null===(e=s.get(t))||void 0===e?void 0:e.done)}));if(u&&!t){if(!n){n=window.setTimeout((function(){n=null;var t=a.slice(0,d).filter((function(t){var e;return!(null===(e=s.get(t))||void 0===e?void 0:e.done)})).map((function(t){return t.source}));t.length>0&&l.log("warning","⏱️ Grace period (".concat(1e3,"ms) expired! Slower priority blocks (").concat(t.join(", "),") didn't finish. Forcing choice to ").concat(c.source,".")),i(!0)}),1e3)}}else o(c)}else{var p=a.every((function(t){var e;return null===(e=s.get(t))||void 0===e?void 0:e.done}));(p||t)&&o(null)}}},d=window.setTimeout((function(){i(!0)}),c);a.forEach((function(t){var e=Date.now();l.log("info","  - ".concat(t.source," (").concat(t.type,"): probing started...")),l.probeBlock(t).then((function(n){var o,r,a,c,d,u=Date.now()-e;n?(t._totalCount=(null!==(c=t._totalCount)&&void 0!==c?c:0)+1,t._fillCount=(null!==(d=t._fillCount)&&void 0!==d?d:0)+1,t._failCount=0,t._cooldownUntil=0):(t._totalCount=(null!==(o=t._totalCount)&&void 0!==o?o:0)+1,t._failCount=(null!==(r=t._failCount)&&void 0!==r?r:0)+1,t.cooldownFails>0&&(null!==(a=t._failCount)&&void 0!==a?a:0)>=t.cooldownFails&&(l.log("error","❌ Block ".concat(t.source," entered cooldown for ").concat(t.cooldownTimeout,"ms after ").concat(t._failCount," consecutive empty attempts.")),t._cooldownUntil=Date.now()+t.cooldownTimeout,t._failCount=0));var p=n?"✅ filled":"➖ empty",m="(Stats: fails ".concat(t._failCount,", fill rate ").concat((100*l.getFillRate(t)).toFixed(0),"%)");l.log("info","  > ".concat(t.source," (").concat(t.type,"): ").concat(p," in ").concat(u,"ms. ").concat(m)),s.set(t,{isShown:n,time:u,done:!0}),i(!1)})).catch((function(){var n,o,r,a=Date.now()-e;t._totalCount=(null!==(n=t._totalCount)&&void 0!==n?n:0)+1,t._failCount=(null!==(o=t._failCount)&&void 0!==o?o:0)+1,t.cooldownFails>0&&(null!==(r=t._failCount)&&void 0!==r?r:0)>=t.cooldownFails&&(l.log("error","❌ Block ".concat(t.source," entered cooldown for ").concat(t.cooldownTimeout,"ms after ").concat(t._failCount," consecutive empty attempts (probe threw).")),t._cooldownUntil=Date.now()+t.cooldownTimeout,t._failCount=0),l.log("info","  > ".concat(t.source," (").concat(t.type,"): ❌ error in ").concat(a,"ms.")),s.set(t,{isShown:!1,time:a,done:!0}),i(!1)}))}))}))]}}))}))},e.prototype.selectFromPoolSingle=function(){return Vt(this,arguments,void 0,(function(t){var e,n,o,i,r,a,s,c,l,d,u,p,m,h,f,v=this;return void 0===t&&(t=!1),Wt(this,(function(y){switch(y.label){case 0:return e=t?"PREFETCH":"ROTATION",this.isWaitingLogSilenced||this.log("info","🔍 Probing Pool (".concat(e,")...")),this.pool.length||(this.pool=Ut([],this.blockInstances,!0)),n=Date.now(),o=[],b=v.blockInstances.filter((function(e){return!(!v.pool.includes(e)||(t&&e===v.currentBlock?(o.push("".concat(e.source," (is current)")),1):v.isFrequencyBlocked(e)?(o.push("".concat(e.source," (frequency locked)")),1):e._cooldownUntil&&e._cooldownUntil>n&&(o.push("".concat(e.source," (cooldown: ").concat(Math.ceil((e._cooldownUntil-n)/1e3),"s left)")),1
1)))})),i=v.params.adaptivePriority?Ut([],b,!0).sort((function(t,e){return v.getFillRate(e)-v.getFillRate(t)})):b,o.length>0&&!this.isWaitingLogSilenced&&this.log("info","➖ Candidates excluded: ".concat(o.join(", "))),i.length?[3,2]:(t||this.isWaitingLogSilenced||(this.log("info","⏳ All blocks are unavailable. Reasons: ".concat(o.join(" | ")||"unknown",". Waiting.")),this.isWaitingLogSilenced=!0),this.pool=Ut([],this.blockInstances,!0),t||!this.currentBlock||this.isFrequencyBlocked(this.currentBlock)?[4,M(200)]:[2,this.currentBlock]);case 1:return y.sent(),[2,null];case 2:r=0,a=i,y.label=3;case 3:return r<a.length?(s=a[r],c=Date.now(),[4,this.probeBlock(s)]):[3,6];case 4:if(l=y.sent(),d=Date.now()-c,l)return s._totalCount=(null!==(u=s._totalCount)&&void 0!==u?u:0)+1,s._fillCount=(null!==(p=s._fillCount)&&void 0!==p?p:0)+1,s._failCount=0,s._cooldownUntil=0,this.applyGreedyPool(s,i.length)?this.log("success","✅ Winner: ".concat(s.source," (greedy — kept in pool). Details: filled in ").concat(d,"ms.")):this.log("success","✅ Winner: ".concat(s.source,". Details: filled in ").concat(d,"ms.")),[2,s];s._totalCount=(null!==(m=s._totalCount)&&void 0!==m?m:0)+1,s._failCount=(null!==(h=s._failCount)&&void 0!==h?h:0)+1,s.cooldownFails>0&&(null!==(f=s._failCount)&&void 0!==f?f:0)>=s.cooldownFails&&(this.log("error","❌ Block ".concat(s.source," entered cooldown for ").concat(s.cooldownTimeout,"ms after ").concat(s._failCount," consecutive empty attempts.")),s._cooldownUntil=Date.now()+s.cooldownTimeout,s._failCount=0),this.log("info","➖ Block ".concat(s.source," (").concat(s.type,") empty in ").concat(d,"ms. (Stats: fails ").concat(s._failCount,", fill rate ").concat((100*this.getFillRate(s)).toFixed(0),"%)")),y.label=5;case 5:return r++,[3,3];case 6:return this.log("info","❌ No winner in pass (".concat(i.length," tried), resetting pool.")),this.pool=Ut([],this.blockInstances,!0),[2,null]}var b}))}))},e.prototype.select=function(t){return void 0===t&&(t=!1),"single"===this.params.poolMethod?this.selectFromPoolSingle(t):this.selectFromPool(t)},e.prototype.getFillRate=function(t){var e,n,o=null!==(e=t._totalCount)&&void 0!==e?e:0;return 0===o?.5:(null!==(n=t._fillCount)&&void 0!==n?n:0)/o},e.prototype.applyGreedyPool=function(t,e){var n=this;if(this.params.greedyPool&&e>1){var o=this.blockInstances.reduce((function(t,e){return t+n.getFillRate(e)}),0)/this.blockInstances.length;if(this.getFillRate(t)>o)return!0}return this.pool=e>1?this.pool.filter((function(e){return e!==t})):Ut([],this.blockInstances,!0),!1},e.prototype.scheduleNextPrefetch=function(t){var e,n=this;if(null!==this.preloadTimeoutId&&(clearTimeout(this.preloadTimeoutId),this.preloadTimeoutId=null),!this.isPaused&&!document.hidden){var o=1e3*(null!==(e=t.duration)&&void 0!==e?e:0);if(o){var i=Math.max(0,o-this.PREFETCH_OFFSET_MS);this.preloadTimeoutId=window.setTimeout((function(){return Vt(n,void 0,void 0,(function(){var e;return Wt(this,(function(n){switch(n.label){case 0:return this.isRemoved||(this.isPaused||document.hidden||this.currentBlock!==t)?[2]:[4,this.select(!0)];case 1:return(e=n.sent())?(this.preselectedNext=e,this.log("info","⏭️ Prepared next block: ".concat(e.source,".")),[2]):(this.preselectedNext=null,[2])}}))}))}),i)}}},e.prototype.startRotation=function(){return Vt(this,void 0,void 0,(function(){var t,e,n;return Wt(this,(function(o){switch(o.label){case 0:if(this.isRotationStarted||this.isRemoved)return[2];if(!this.blockInstances.length)return[2];this.isRotationStarted=!0,this.pool=Ut([],this.blockInstances,!0),t=null,o.label=1;case 1:return this.isRemoved||t?[3,4]:[4,this.waitUntilResumed()];case 2:return o.sent(),this.isRemoved?[3,4]:[4,this.select(!1)];case 3:return(t=o.sent())||this.isWaitingLogSilenced||(this.log("info","No initial winner, retrying."),this.isWaitingLogSilenced=!0),[3,1];case 4:if(!t||this.isRemoved)return[2];this.hideAllBlocks(t),this.reopenIfClosed(),t.show(),this.currentBlock=t,this.markBlockShown(t),this.showCloseButton(),"stickyAlways"===this.params.type&&this.params.canCloseAfter&&this.startCountdown(),this.scheduleNextPrefetch(t),o.label=5;case 5:return this.isRemoved?[3,14]:[4,this.waitUntilResumed()];case 6:return o.sent(),this.isRemoved?[3,14]:(e=this.currentBlock)?[4,M(1e3*e.duration)]:[3,8];case 7:if(o.sent(),this.isRemoved)return[3,14];o.label=8;case 8:return[4,this.waitUntilResumed()];case 9:return o.sent(),this.isRemoved?[3,14]:(n=this.preselectedNext)?[3,11]:[4,this.select(!1)];case 10:n=o.sent(),o.label=11;case 11:return n?[3,13]:(this.currentBlock||(this.hideAllBlocks(),this.hideCloseButton()),this.isWaitingLogSilenced||(this.log("info","No filled blocks available at rotation point, keeping current."),this.isWaitingLogSilenced=!0),[4,M(1e3)]);case 12:return o.sent(),[3,5];case 13:return this.isWaitingLogSilenced=!1,this.hideAllBlocks(n),this.reopenIfClosed(),n.show(),this.currentBlock=n,this.preselectedNext=null,this.markBlockShown(n),this.showCloseButton(),this.log("success","🔘 Switched to: ".concat(n.source," | duration = ").concat(n.duration,"s.")),"stickyAlways"===this.params.type&&this.params.canCloseAfter&&this.startCountdown(),this.scheduleNextPrefetch(n),[3,5];case 14:return[2]}}
1))}))},e.prototype.initScrollObservation=function(){var t=this;if(this.zone.container&&this.element){var e=this.element.offsetHeight;new IntersectionObserver((function(n){n.forEach((function(n){n.isIntersecting?(t.zone.container.style.height="",t.element.classList.remove("active")):(t.zone.container.style.height="".concat(e,"px"),t.element.classList.add("active"))}))}),{threshold:0}).observe(this.zone.container)}},e.prototype.log=function(t,e){for(var n,o=[],i=2;i<arguments.length;i++)o[i-2]=arguments[i];(n=window.Caramel.EventEmitter).emit.apply(n,Ut(["streamLine:log",t,e],o,!1))},e}(V);var Gt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),Kt=function(){return Kt=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},Kt.apply(this,arguments)};const Zt=function(t){function e(e){var n=t.call(this,e)||this;return n.isShowedFirstTime=!1,n.params=Kt(Kt({isYandex:!1,showAfter:1,canCloseAfter:3,showAfterClose:0,removeAfterClose:!1,button:{position:"right",color:"#212121"},blur:5,textColor:"#FFFFFF",borderColor:"#212121",backgroundColor:"#21212150"},e.params),e.formatParams),n}return Gt(e,t),e.prototype.init=function(){var t=this;this.params.isYandex?(this.draw(),this.isFeedInView||this.zone.banners.forEach((function(e){return e.call({type:"topAd",platform:it.getPlatform(),onClose:function(){t.params.removeAfterClose&&t.element.remove()}})}))):(this.zone.banners.forEach((function(t){return t.call()})),setTimeout((function(){t.draw(),t.isFeedInView&&t.hide(),t.zone.banners.forEach((function(e){return e.call({onRender:function(){t.start()},onStub:function(){var n;e.onStub(),(null===(n=null==e?void 0:e.stub)||void 0===n?void 0:n.isActive)&&t.start()}})}))}),this.params.showAfter?1e3*this.params.showAfter:0)),this.zone.listen("format:feedViewEnter",(function(){t.params.isYandex?t.zone.banners.forEach((function(t){return t.destroy()})):t.hide()})),this.zone.listen("format:feedViewLeave",(function(){t.params.isYandex?t.zone.banners.forEach((function(t){return t.call({type:"topAd",platform:it.getPlatform()})})):t.show()}))},e.prototype.draw=function(){var t,e,n,o=this,i=this.params,r=i.canCloseAfter,a=i.isYandex,s=i.button,c=i.removeAfterClose,l=i.blur,d=i.textColor,u=i.borderColor,p=i.backgroundColor,m=a?'\n        <div id="'.concat(null===(t=this.zone.banners[0])||void 0===t?void 0:t.containerId,'"></div>\n      '):'\n        <div class="caramel-topLine">\n          <div class="caramel-topLine__toggle caramel-topLine__toggle--'.concat(s.position,'" style="color: ').concat(d,"; background-color: ").concat(s.color,'">\n            ').concat(r||$.close,'\n          </div>\n          <div class="caramel-topLine__inner" style="border-bottom: 2px solid ').concat(u,"; backdrop-filter: blur(").concat(l,"px); background-color: ").concat(p,';">\n            <div id="').concat(null===(e=this.zone.banners[0])||void 0===e?void 0:e.containerId,'"></div>\n          </div>\n        </div>\n      ');if(this.zone.container){this.zone.container.innerHTML="",this.zone.container.insertAdjacentHTML("beforeend",m),this.element=a?document.getElementById(null===(n=this.zone.banners[0])||void 0===n?void 0:n.containerId):this.zone.container.querySelector(".caramel-topLine");var h=this.zone.container.querySelector(".caramel-topLine__toggle");h&&h.addEventListener("click",(function(){h.innerHTML.includes("</svg>")&&(c?(o.hide(),setTimeout((function(){o.element.remove()}),700)):o.toggle())}))}},e.prototype.start=function(){this.isShowedFirstTime&&0!==this.params.showAfterClose||this.show(),this.isShowedFirstTime||(this.isShowedFirstTime=!0),this.params.canCloseAfter&&this.startCountdown()},e.prototype.startCountdown=function(){var t=this.element.querySelector(".caramel-topLine__toggle");t.innerHTML=this.params.canCloseAfter.toString();var e=this.params.canCloseAfter,n=setInterval((function(){0===(e-=1)?(clearInterval(n),t.innerHTML=$.close):t.innerHTML=e.toString()}),1e3)},e.prototype.show=function(){this.element.classList.add("open")},e.prototype.hide=function(){var t=this;this.element.classList.remove("open"),this.params.showAfterClose&&setTimeout((function(){t.show(),t.startCountdown()}),1e3*this.params.showAfterClose)},e.prototype.toggle=function(){this.element.classList.contains("open")?this.hide():this.show()},e}(V);var Xt="vk",Jt="vimeo",Qt="twitter",$t="youtube",te="telegram",ee="htmlVideo",ne=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),oe=function(){return oe=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},oe.apply(this,arguments)};const ie=function(t){function e(e){var n=t.call(this,e)||this;return n.targetElement=null,n.bannerElement=null,n.playerStarted=!1,n.playerElement=null,n.playerType=null,n.params=oe(oe({showAfter:3,showAfterClick:!1,canCloseAfter:10,offsetBottom:50,button:{position:"right",color:"#212121"}},e.params),e.formatParams),n}return ne(e,t),e.prototype.init=function(){this.canShowForDevice()&&(this.targetElement=document.querySelector(this.zone.params.cssPath.targetSelector),this.setupObservers(),this.detectPlayerType(),this.detectPlayerElement(),this.params.showAfterClick?this.initPlayerBasedOnType():this.showOverlayAfterDelay())},e.prototype.setupObservers=function(){var t=this;window.addEventListener("blur",(function(){return window.focus()})),document.addEventListener("mousemove",(function(e){t.clientX=e.clientX,t.clientY=e.clientY}))},e.prototype.showOverlayAfterDelay=function(){var t=this;this.draw(),requestAnimationFrame((function(){t.callBanners()})),setTimeout((function(){t.show(),t.startCountdown()}),1e3*this.params.showAfter)},e.prototype.draw=function(t){var e;void 0===t&&(t=!1);var n=this.params,o=n.offsetBottom,i=n.button,r='\n      <div class="caramel-videoOverlay">\n        '.concat(t?'<div class="caramel-videoOverlay__background"></div>':"",'\n        <div class="caramel-videoOverlay__banner" style="bottom: ').concat(o,'px;">\n          <div class="caramel-videoOverlay__close caramel-videoOverlay__close--').concat(i.position,'" style="background-color: ').concat(i.color,'">\n            ').concat($.close,'\n          </div>\n          <div class="caramel-videoOverlay__inner">\n            <div id="').concat(null===(e=this.zone.banners[0])||void 0===e?void 0:e.containerId,'"></div>\n          </div>\n        </div>\n      </div>\n    ');this.zone.container&&(this.zone.container.innerHTML="",this.zone.container.insertAdjacentHTML("beforeend",r),this.element=this.zone.container.querySelector(".caramel-videoOverlay"),this.bannerElement=this.zone.container.querySelector(".caramel-videoOverlay__banner"),this.element&&this.targetElement&&this.element.appendChild(this.targetElement))},e.prototype.startCountdown=function(){var t=this,e=this.element.querySelector(".caramel-videoOverlay__close");if(this.params.canCloseAfter){e.innerHTML=this.params.canCloseAfter.toString();var n=this.params.canCloseAfter,o=setInterval((function(){0===(n-=1)?(clearInterval(o),e.innerHTML=$.close,e.addEventListener("click",(function(){t.close()}))):e.innerHTML=n.toString()}),1e3)}else e.addEventListener("click",(function(){t.close()}))},e.prototype.show=function(){this.bannerElement.classList.add("open")},e.prototype.close=function(){var t=this;this.bannerElement.classList.remove("open"),setTimeout((function(){t.zone.banners[0].destroy(),t.bannerElement.remove()}),1e3)},e.prototype.detectPlayerType=function(){var t,e=(null===(t=this.targetElement)||void 0===t?void 0:t.outerHTML)||"";e.includes("</video>")?this.playerType=ee:e.includes("youtube.com")?this.playerType=$t:e.includes("twitter.com")?this.playerType=Qt:e.includes("vk.com")?this.playerType=Xt:e.includes("vimeo.com")?this.playerType=Jt:e.includes("t.me")&&(this.playerType=te)},e.prototype.detectPlayerElement=function(){if(this.targetElement)switch(this.playerType){case ee:this.playerElement=this.getElementIfTagMatches("VIDEO");break;case $t:case Xt:case Jt:case te:this.playerElement=this.getElementIfTagMatches("IFRAME");break;case Qt:this.playerElement=this.targetElement.querySelector('iframe[id^="twitter"]')}},e.prototype.getElementIfTagMatches=function(t){var e,n;return(null===(e=this.targetElement)||void 0===e?void 0:e.nodeName)===t?this.targetElement:null===(n=this.targetElement)||void 0===n?void 0:n.querySelector(t.toLowerCase())},e.prototype.initPlayerBasedOnType=function(){var t;(((t={})[ee]=this.initHtmlVideo.bind(this),t[$t]=this.initYoutube.bind(this),t[Qt]=this.initTwitter.bind(this),t[Xt]=this.initVk.bind(this),t[Jt]=this.initVimeo.bind(this),t[te]=this.initTelegram.bind(this),t)[this.playerType]||this.defaultInit.bind(this))()},e.prototype.initHtmlVideo=function(){var t,e=this;this.draw(),this.callBanners(),null===(t=this.playerElement)||void 0===t||t.addEventListener("play",(function(){e.playerStarted||(e.playerStarted=!0,e.show(),e.startCountdown())}))},e.prototype.initYoutube=function(){var t=this;this.draw(!0),this.callBanners();var e=this.element.querySelector(".caramel-videoOverlay__background");if(this.bannerElement.style.pointerEvents="none",e){e.addEventListener("click",(function(){t.show(),t.startCountdown(),e.remove(),t.playerElement.setAttribute("src",t.playerElement.getAttribute("src")+(t.playerElement.getAttribute("src").includes("?")?"&autoplay=1":"?autoplay=1"))}))}},e.prototype.initTwitter=function(){this.draw(),this.callBanners(),this.detectPlayerElementOnInterval()},e.prototype.initVk=function(){this.draw(),this.callBanners(),this.detectPlayerElementOnInterval()},e.prototype.initVimeo=function(){this.draw(),this.callBanners(),this.detectPlayerElementOnInterval()},e.prototype.initTelegram=function(){this.draw(),this.callBanners(),this.detectPlayerElementOnInterval()},e.prototype.defaultInit=function(){var t,e=this;this.draw(!0),this.callBanners();var n=null===(t=this.element)||void 0===t?void 0:t.querySelector(".caramel-videoOverlay__background");null==n||n.addEventListener("click",(function(){e.show(),e.startCountdown(),n.remove()}))}
1,e.prototype.callBanners=function(){this.zone.banners.forEach((function(t){return t.call()}))},e.prototype.detectPlayerElementOnInterval=function(){var t=this,e=setInterval((function(){t.detectPlayerElement(),t.playerElement&&(clearInterval(e),t.detectPlayerStartOnInterval())}),500)},e.prototype.detectPlayerStartOnInterval=function(){var t=this,e=setInterval((function(){if(!t.playerStarted&&document.activeElement===(null==t?void 0:t.playerElement)){if(!(/Mobi|Android|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)||(n=t.playerElement,o=t.clientX,i=t.clientY,r=n.getBoundingClientRect(),o>=r.left&&o<=r.right&&i>=r.top&&i<=r.bottom)))return;clearInterval(e),t.playerStarted=!0,t.show(),t.startCountdown()}var n,o,i,r}),100)},e}(V);const re=function(){function t(){}return t.createFormat=function(t,e){switch(t){case r.fullscreen:return new gt(e);case r.banner:return new Q(e);case r.interscroller:return new St(e);case r.fadeInBox:return new yt(e);case r.combo:return new lt(e);case r.topLine:return new Zt(e);case r.bottomLine:return new st(e);case r.smartCatfish:return new It(e);case r.smartSticky:return new Lt(e);case r.cube:return new pt(e);case r.story:return new Ot(e);case r.videoOverlay:return new ie(e);case r.streamLine:return new Yt(e);default:return new ht(e)}},t}();var ae=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();const se=function(t){function e(e){var n=t.call(this,"Validation error")||this;return n.errors=e,n}return ae(e,t),e}(Error);var ce=function(){function t(){}return t.validate=function(t){var e=[];if((!t.params||"object"!=typeof t.params||Object.keys(t.params).length<2)&&e.push("Invalid params"),t.bidding&&t.bidding.bids.length&&t.bidding.sizes.length||e.push("Invalid bidding params"),e.length>0)throw new se(e)},t}();const le=ce;const de=function(){function t(){}return t.validate=function(t){var e,n,o,i=[];if(window.CaramelDomain||t.domain.main&&(t.domain.main===window.location.hostname||(e=t.domain.main,n=window.location.hostname,o=e.replace(/\./g,"\\."),new RegExp("^([a-zA-Z0-9-]+\\.)*".concat(o,"$"),"i").test(n)))||i.push("Invalid domain"),i.length>0)throw new se(i)},t}();!function(){function t(){}t.validate=function(t){var e=[];if(t.vastUrl&&"string"==typeof t.vastUrl||e.push("Invalid VAST url"),(!t.percentage||"number"!=typeof t.percentage||t.percentage<0||t.percentage>100)&&e.push("Invalid percentage"),e.length>0)throw new se(e)}}();var ue=function(){function t(){}return t.validate=function(t){var e=[];if(t.id&&"string"==typeof t.id||e.push("Invalid ID"),t.name&&"string"==typeof t.name||e.push("Invalid name"),t.format&&"string"==typeof t.format&&Object.values(r).includes(t.format)||e.push("Invalid format"),t.params&&"object"==typeof t.params&&0!==Object.keys(t.params).length||e.push("Invalid params"),e.length>0)throw new se(e)},t}();const pe=ue;const me=function(){function t(){}return t.connectPixelIframe=function(){document.body&&(document.body.insertAdjacentHTML("beforeend",'<iframe style="display:none" async="true" src="https://ads.betweendigital.com/sspmatch-iframe?country=RU&p=42917"></iframe>'),document.body.insertAdjacentHTML("beforeend",'<iframe style="display:none" async="true" src="https://ads.betweendigital.com/sspmatch-iframe?country=RU&p=41985"></iframe>'))},t}();const he=function(){function t(){}return t.connectPixelImage=function(){document.body&&document.body.insertAdjacentHTML("beforeend",'<img loading="lazy" style="visibility: hidden; width: 1px; height: 1px; position: absolute; left: -9999px;" src="https://ssp.bidvol.com/usersync?chain=142,80,14,226,42">')},t}();const fe=function(){function t(){}return t.connectScript=function(){L.appendElement("script",{src:"https://tube.buzzoola.com/js/lib/buzzoola_ext.js"},"head")}
1,t}();const ve=function(){function t(){}return t.connectSyncLoaderScript=function(){var t=document.createElement("script");t.src="https://privacy-cs.mail.ru/static/sync-loader.js",t.async=!0,document.head.appendChild(t)},t.getSyncId=function(){try{var t=localStorage.getItem("rb_sync_id");return t&&JSON.parse(t).fpid||""}catch(t){return""}},t}();!function(){function t(){}t.connectPixelScript=function(){L.appendElement("script",{src:"https://sync.dmp.otm-r.com/match/aotm.js",async:"true"},"head")}}();const ye=function(){function t(){}return t.connectManagerScript=function(){L.appendElement("script",{src:"https://cdn.skcrtxr.com/roxot-wrapper/js/roxot-manager.js?pid=19e08d82-9ec3-4dda-b15f-01ab2c95e167"},"head")},t}();const be=function(){function t(){}return t.connectPixelScript=function(){var t=document.createElement("script");t.textContent='\n      var dfwjbfVbvgUFIUopho = window;\n      if (!Object.prototype.hasOwnProperty.call(dfwjbfVbvgUFIUopho, \'_acic\') || typeof window._acic !== \'object\') {\n        var _acic={dataProvider: 14,publisherId: 1753819};(function(){var e=document.createElement("script");e.type="text/javascript";e.async=true;e.src="https://www.acint.net/aci.js";var t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(e,t)})()\n      }\n    ',document.head.appendChild(t)},t.connectMatchingScript=function(){var t=document.createElement("script");t.src="https://cdn-rtb.sape.ru/js/uids.js",t.async=!0,document.head.appendChild(t)},t.getRrbFpUids=function(){return window.sapeRrbFpUids||function(){try{return JSON.parse(window.localStorage.getItem("srtb_uid___uids"))||[]}catch(t){return[]}}()},t}();const we=function(){function t(){}return t.connectScript=function(){var t=document.createElement("script");t.src="https://kimberlite.io/rtb/ujs?ymss=digitalcaramel",t.async=!0,document.head.appendChild(t)},t.getSoltaId=function(){try{var t=localStorage.getItem("cached_thumbmark");if(t)return t}catch(t){}try{var e=document.cookie.match(/(?:^|;\s*)_sltm=([^;]+)/);if(e)return e[1]}catch(t){}return""},t}();var ge=function(){return ge=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},ge.apply(this,arguments)},_e=function(){function t(t,e){var n=this;this.isEmpty=!1,this.isInView=!0,this.isDisposed=!1,this.lastWinBidderCpm=0,this.lastWinBidderName="",this.viewableTimer=null,this.viewableFired=!1,this.viewableObserver=null,this.timers=[],this.observers=[],this.cleanups=[],this.infoboxTimer=null,le.validate(t),this.zone=e,this.stub=t.stub,this.params=t.params,this.bidding=t.bidding,this.containerId=this.getContainerId(t,e),q.get("logger")&&(this.infoboxTimer=window.setInterval((function(){n.syncInfobox()}),200))}return t.prototype.getContainerId=function(t,e){var n="".concat(F,"_").concat(t.id);return e.params.isRepeatable&&(n+="_".concat(String(Math.random()).split(".")[1].slice(0,4))),n},t.prototype.call=function(t){var e,n,r,a=this;if(void 0===t&&(t={}),!this.isDisposed){var s=ge({containerId:this.containerId,params:ge(ge({},this.params.reduce((function(t,e){var n=e.key,o=e.value;return t[n]=o,t}),{})),we.getSoltaId()&&{puid28:we.getSoltaId()}),lazyLoad:!!this.zone.params.hasLazyLoad&&this.zone.params.lazyLoad,onClose:this.onClose.bind(this),onError:this.onError.bind(this),onLoad:this.onLoad.bind(this),onRender:this.onRender.bind(this),onStub:this.onStub.bind(this),onVideoEnd:this.onVideoEnd.bind(this)},t),l=function(){var t;a.isDisposed||(window.Caramel.EventEmitter.emit("benchmark:log",et.lap("app:init"),'Banner "'.concat(a.containerId,'" called')),a.zone.params.isAdaptive?it.createAdaptiveBanner(s,a.zone.params.adaptiveOptions.devices,a.zone.params.adaptiveOptions.sizes,null!==(t=a.zone.params.adaptiveOptions.isAutoReloads)&&void 0!==t&&t):it.createAsyncBanner(s))};if(this.zone.params.hasPushAdUnits){var d=document.getElementById(this.containerId);d&&(d.innerHTML="")}var u=Object.keys(null===(r=null===(n=null===(e=window.Caramel)||void 0===e?void 0:e.config)||void 0===n?void 0:n.adfox)||void 0===r?void 0:r.biddersMap);this.zone.params.isRepeatable||this.zone.params.hasPushAdUnits?window.Ya.adfoxCode.hbCallbacks.push((function(){a.isDisposed||(window.Ya.headerBidding.pushAdUnits([ge(ge({code:a.containerId},a.zone.params.isCombo?{codeType:"combo"}:a.zone.params.isInstream?{codeType:"instream"}
1:a.zone.params.isInpage?{codeType:"inpage"}:{}),{sizes:a.bidding.sizes.map((function(t){return[t.width,t.height]})),bids:a.bidding.bids.filter((function(t){return t.bidder&&t.status&&H(t)})).filter((function(t){return u.includes(t.bidder)})).map((function(t){return{bidder:t.bidder,params:ge(ge(ge(ge(ge(ge(ge({sendTargetRef:o.includes(t.bidder)},N(t)),"mediasniper"===t.bidder?{additional:{ext:{luid:localStorage.getItem("tf_lid")}}}:{}),"roxot"===t.bidder?{additional:{ext:{rxtUid:localStorage.getItem("rxt_uid")}}}:{}),"buzzoola"===t.bidder?{additional:{fpuids:function(){try{return window.Buzzoola.User.getAllData()}catch(t){return{}}}()}}:{}),"sape"===t.bidder?{additional:{sapeFpUids:be.getRrbFpUids()}}:{}),"solta"===t.bidder?{additional:{solta_stable:we.getSoltaId()}}:{}),"adriver"===t.bidder?function(){var t,e=i[window.location.hostname];if(!e)return{};var n=null!==(t=localStorage.getItem("adrcid"))&&void 0!==t?t:"";return{additional:{ext:{query:"efp=".concat(e,"&cid=").concat(n)}}}}():{})}}))})]),l())})):l(),this.setupObservation(),this.setupViewabilityObservation(),!c.includes(this.zone.formatType)&&this.zone.params.hasAutoReload&&this.zone.params.autoReloadInterval?this.initAutoReload(t):c.includes(this.zone.formatType)||this.schedule((function(){window.Caramel.EventEmitter.emit("zone:tryToStartVideoAds",a.zone.id)}),15e3)}},t.prototype.setupObservation=function(){var t=this,e=document.getElementById(this.containerId);if(e){var n=new IntersectionObserver((function(e){e.forEach((function(e){e.isIntersecting?(t.isInView=!0,window.Caramel.EventEmitter.emit("banner:viewEnter",t.containerId)):(t.isInView=!1,window.Caramel.EventEmitter.emit("banner:viewLeave",t.containerId))}))}),{threshold:.3}),o=new MutationObserver((function(n){n.forEach((function(){t.isEmpty=e.scrollHeight<x}))}));n.observe(e),o.observe(e,{childList:!0,subtree:!0,attributes:!0}),this.observers.push(n,o)}},t.prototype.setupViewabilityObservation=function(){var t,e=this,n=document.getElementById(this.containerId);if(n){null===(t=this.viewableObserver)||void 0===t||t.disconnect(),this.viewableObserver=null,null!==this.viewableTimer&&(clearTimeout(this.viewableTimer),this.viewableTimer=null),this.viewableFired=!1;this.viewableObserver=new IntersectionObserver((function(t){for(var n=0,o=t;n<o.length;n++){o[n].intersectionRatio>=.5&&!document.hidden?e.viewableFired||null===e.viewableTimer&&(e.viewableTimer=window.setTimeout((function(){e.viewableTimer=null,document.hidden||(e.viewableFired=!0,e.lastWinBidderName&&e.lastWinBidderCpm&&Oe.fire({event:"view",source:e.lastWinBidderName,cpm:e.lastWinBidderCpm,site:window.location.hostname,zone:e.zone.id,format:e.zone.formatType}))}),2e3)):null!==e.viewableTimer&&(clearTimeout(e.viewableTimer),e.viewableTimer=null)}}),{threshold:[0,.5,1]}),this.viewableObserver.observe(n)}},t.prototype.initAutoReload=function(t){var e=this;this.isDisposed||(this.schedule((function(){window.Caramel.EventEmitter.emit("zone:tryToStartVideoAds",e.zone.id)}),15e3),this.scheduleAutoReload(t))},t.prototype.scheduleAutoReload=function(t){var e=this;this.schedule((function(){if(!e.zone.container||e.zone.container.isConnected)if(["4ege.ru","fantvox.org","uknig.com"].includes(window.location.hostname))if(e.isInView&&!document.hidden||s.includes(e.zone.formatType))e.zone.params.hasPushAdUnits?e.call(t):(e.reload(),e.initAutoReload(t));else{window.Caramel.EventEmitter.emit("debug","[Smart Refresh] Paused for ".concat(e.containerId,". InView: ").concat(e.isInView,", Hidden: ").concat(document.hidden));var n=function(){window.Caramel.EventEmitter.removeListener("banner:viewEnter",o),document.removeEventListener("visibilitychange",o),e.cleanups=e.cleanups.filter((function(t){return t!==n}))},o=function(o){o&&"object"==typeof o&&"visibilitychange"===o.type&&(document.hidden?window.Caramel.EventEmitter.emit("debug","[Smart Refresh] ".concat(e.containerId,": User left the tab.")):window.Caramel.EventEmitter.emit("debug","[Smart Refresh] ".concat(e.containerId,": User returned to the tab."))),e.isInView&&!document.hidden&&(window.Caramel.EventEmitter.emit("debug","[Smart Refresh] Resuming reload for ".concat(e.containerId)),n(),e.zone.params.hasPushAdUnits?e.call(t):(e.reload(),e.initAutoReload(t)))};window.Caramel.EventEmitter.on("banner:viewEnter",o),document.addEventListener("visibilitychange",o),e.cleanups.push(n)}else if(e.isInView||s.includes(e.zone.formatType))e.zone.params.hasPushAdUnits?e.call(t):(e.reload(),e.initAutoReload(t));else{var i=function(){window.Caramel.EventEmitter.removeListener("banner:viewEnter",r),e.cleanups=e.cleanups.filter((function(t){return t!==i}))},r=function(n){e.containerId===n&&(e.zone.params.hasPushAdUnits?e.call(t):(e.reload(),e.initAutoReload(t)),i())};window.Caramel.EventEmitter.on("banner:viewEnter",r),e.cleanups.push(i)}else e.scheduleAutoReload(t)}),1e3*this.zone.params.autoReloadInterval)},t.prototype.reload=function(){var t=this;this.isDisposed||(this.viewableFired=!1,null!==this.viewableTimer&&(clearTimeout(this.viewableTimer),this.viewableTimer=null),this.zone.videoAds.length&&this.zone.videoAds.forEach((function(t){return t.destroy()})),it.reloadBanner(this.containerId),requestAnimationFrame((function(){requestAnimationFrame((function(){t.isDisposed||t.setupViewabilityObservation()}))})))},t.prototype.syncInfobox=function(){var t;if(this.zone.container&&!this.isEmpty){"static"===window.getComputedStyle(this.zone.container).position&&(this.zone.container.style.position="relative"),null===(t=this.zone.container.querySelector(".caramel-infobox"))||void 0===t||t.remove();var e=this.zone.container;"bottomLine"===this.zone.formatType?e=this.zone.container.querySelector(".caramel-bottomLine"):"topLine"===this.zone.formatType?e=this.zone.container.querySelector(".caramel-topLine"):"fadeInBox"===this.zone.formatType&&(e=this.zone.container.querySelector(".caramel-fadeInBox")),null==e||e.insertAdjacentHTML("afterbegin",'\n        <sp
1an class="caramel-infobox">\n          '.concat(this.zone.name," / ").concat(this.lastWinBidderName," ").concat(this.lastWinBidderCpm?"(".concat(this.lastWinBidderCpm," RUB)"):"","</span>\n      "))}},t.prototype.destroy=function(){var t;null===(t=this.viewableObserver)||void 0===t||t.disconnect(),this.viewableObserver=null,null!==this.viewableTimer&&(clearTimeout(this.viewableTimer),this.viewableTimer=null),it.destroyBanner(this.containerId)},t.prototype.dispose=function(){if(!this.isDisposed){this.isDisposed=!0,this.timers.forEach((function(t){return clearTimeout(t)})),this.timers=[],null!==this.infoboxTimer&&(clearInterval(this.infoboxTimer),this.infoboxTimer=null);var t=this.cleanups;this.cleanups=[],t.forEach((function(t){return t()})),this.observers.forEach((function(t){return t.disconnect()})),this.observers=[];try{this.destroy()}catch(t){window.Caramel.EventEmitter.emit("debug","[Banner] ".concat(this.containerId,": destroy on dispose failed: ").concat(t))}}},t.prototype.schedule=function(t,e){var n=this;if(!this.isDisposed){var o=window.setTimeout((function(){n.timers=n.timers.filter((function(t){return t!==o})),t()}),e);this.timers.push(o)}},t.prototype.detectWinBidder=function(t){var e,n,o,i,r,a,s,c;if(!t)return this.lastWinBidderName=(null===(e=this.stub)||void 0===e?void 0:e.sourceType)?"".concat(null===(n=this.stub)||void 0===n?void 0:n.sourceType," Stub"):"Unknown",void(this.lastWinBidderCpm=0);var l=t.bundleName,d=t.bundleParams;if(null===(o=null==d?void 0:d.bids)||void 0===o?void 0:o.length){var u=d.bids.find((function(t){return t.campaign_id==d.campaignId}));if(u){var p=null!==(r=null===(i=it.getLastWinnerBid(this.containerId))||void 0===i?void 0:i.cpm)&&void 0!==r?r:0;if((null===(a=this.stub)||void 0===a?void 0:a.isActive)&&(null===(s=this.stub)||void 0===s?void 0:s.cpmThreshold)&&p<(null===(c=this.stub)||void 0===c?void 0:c.cpmThreshold))return void this.renderStub();Oe.fire({event:"win",source:u.bidderName,cpm:p,site:window.location.hostname,zone:this.zone.id,format:this.zone.formatType}),this.lastWinBidderName=u.bidderName,this.lastWinBidderCpm=p}}else"banner.direct"===l?(this.lastWinBidderName="РСЯ",this.lastWinBidderCpm=0):(this.lastWinBidderName="Unknown",this.lastWinBidderCpm=0)},t.prototype.renderStub=function(){var t,e,n=this;if(this.stub&&(null===(t=this.stub)||void 0===t?void 0:t.isActive)){setTimeout((function(){n.detectWinBidder()}),100);var o=document.getElementById(this.containerId);o&&R(null===(e=this.stub)||void 0===e?void 0:e.code,o)}},t.prototype.onClose=function(){window.Caramel.EventEmitter.emit("banner:onClose",this)},t.prototype.onError=function(t){window.Caramel.EventEmitter.emit("banner:onError",this,t)},t.prototype.onLoad=function(t){var e=this;setTimeout((function(){e.detectWinBidder(t)}),100),window.Caramel.EventEmitter.emit("benchmark:log",et.lap("app:init"),'Banner "'.concat(this.containerId,'" loaded'),document.querySelector("#".concat(this.containerId))),window.Caramel.EventEmitter.emit("banner:onLoad",this,t)},t.prototype.onRender=function(){window.Caramel.EventEmitter.emit("benchmark:log",et.lap("app:init"),'Banner "'.concat(this.containerId,'" rendered'),document.querySelector("#".concat(this.containerId))),window.Caramel.EventEmitter.emit("banner:onRender",this)},t.prototype.onStub=function(){this.renderStub(),window.Caramel.EventEmitter.emit("banner:onStub",this)},t.prototype.onVideoEnd=function(){window.Caramel.EventEmitter.emit("banner:onStub",this)},t}();const Ce=_e;var Se=function(t,e,n,o){return new(n||(n=Promise))((function(i,r){function a(t){try{c(o.next(t))}catch(t){r(t)}}function s(t){try{c(o.throw(t))}catch(t){r(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}c((o=o.apply(t,e||[])).next())}))},Ee=function(t,e){var n,o,i,r,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return r={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;r&&(r=0,s[0]&&(a=0)),a;)try{if(n=1,o&&(i=2&s[0]?o.return:s[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,s[1])).done)return i;switch(o=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,o=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],o=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},xe=function(){function t(t,e,n){void 0===n&&(n=0);var o=this;this.banners=[],this.videoAds=[],this.index=0,this.isInView=!1,this.isDestroyed=!1,this.cleanups=[],pe.validate(t),this.id=t.id,this.name=t.name,this.container=e,this.params=t.params,this.formatType=t.format,this.formatParams=Array.isArray(t.formatParams)?{}:t.formatParams,this.format=re.createFormat(t.format,this),this.device=t.device,this.size=t.size,this.index=n,this.canShowBy
1Frequency()&&this.canShowForLocation()&&this.format.canShowForDevice()&&(null==t?void 0:t.banners)&&(null==t?void 0:t.banners.length)&&t.banners.forEach((function(t){try{var e=new Ce(t,o);o.banners.push(e)}catch(t){window.Caramel.EventEmitter.emit("banner:validationError",t)}})),this.canShowByFrequency()&&this.canShowForLocation()&&this.format.canShowForDevice()&&(null==t?void 0:t.videoAds)&&(null==t?void 0:t.videoAds.length)&&t.videoAds.forEach((function(t){try{var e=new K({vastUrl:t.vastUrl,container:o.container,zone:o,source:t.source,percentage:t.percentage,wrapperStyle:"position: absolute; inset: 0; z-index: 10;"});o.videoAds.push(e)}catch(t){window.Caramel.EventEmitter.emit("videoAd:validationError",t)}})),window.Caramel.headerBiddingScriptConnected&&window.Caramel.contextScriptConnected?this.init():window.Caramel.headerBiddingScriptConnected?this.listen("yandex:contextScriptConnectSuccess",this.init.bind(this)):this.listen("yandex:headerBiddingScriptConnectSuccess",this.init.bind(this))}return t.prototype.listen=function(t,e){this.isDestroyed||(window.Caramel.EventEmitter.on(t,e),this.cleanups.push((function(){return window.Caramel.EventEmitter.removeListener(t,e)})))},t.prototype.onDestroy=function(t){this.isDestroyed?this.safely(t):this.cleanups.push(t)},t.prototype.destroy=function(){var t=this;if(!this.isDestroyed){this.isDestroyed=!0;var e=this.cleanups;this.cleanups=[],e.forEach((function(e){return t.safely(e)})),this.banners.forEach((function(e){return t.safely((function(){return e.dispose()}))})),this.videoAds.forEach((function(e){return t.safely((function(){return e.destroy()}))})),this.safely((function(){return t.format.destroy()}))}},t.prototype.safely=function(t){try{t()}catch(t){window.Caramel.EventEmitter.emit("debug","[Zone ".concat(this.id,"] destroy step failed: ").concat(t))}},t.prototype.init=function(){var t,e,n,o,i,r=this;if(!this.isDestroyed&&(window.Caramel.EventEmitter.emit("zone:init",{id:this.id,name:this.name,formatType:this.formatType,containerIds:this.banners.map((function(t){return t.containerId})).join(", ")}),this.setupObservation(),this.canShowByFrequency()&&this.canShowForLocation()&&this.format.canShowForDevice())){if(this.index){var a=window.setTimeout((function(){r.format.init()}),300*this.index);this.onDestroy((function(){return clearTimeout(a)}))}else this.format.init();(null===(t=this.params)||void 0===t?void 0:t.frequency)&&(e="Caramel_".concat(this.id,"_shown"),n="1",o=this.params.frequency,(i=new Date).setTime(i.getTime()+60*o*1e3),document.cookie="".concat(e,"=").concat(n,";expires=").concat(i.toUTCString(),";path=/")),this.params.jsCode&&!document.getElementById("Caramel_".concat(this.id,"_script"))&&this.appendScript(),this.params.cssCode&&!document.getElementById("Caramel_".concat(this.id,"_style"))&&this.appendStyle(),this.params.isAdaptive&&this.params.adaptiveOptions&&!["videoOverlay","streamLine"].includes(this.formatType)&&this.format.setupResizeObservation(),this.videoAds.length&&this.setupVideoAdsObservation()}},t.prototype.setupObservation=function(){var t=this;this.listen("banner:viewEnter",(function(e){t.banners.some((function(t){return t.containerId===e}))&&(t.isInView=t.banners.some((function(t){return t.isInView})))})),this.listen("banner:viewLeave",(function(e){t.banners.some((function(t){return t.containerId===e}))&&(t.isInView=t.banners.some((function(t){return t.isInView})))}))},t.prototype.setupVideoAdsObservation=function(){var t=this;this.listen("zone:tryToStartVideoAds",(function(e){return Se(t,void 0,void 0,(function(){var t,n,o,i,r,a;return Ee(this,(function(s){switch(s.label){case 0:if(e!==this.id||this.isDestroyed)return[2];this.videoAds.forEach((function(t){return t.destroy()})),t=[],this.videoAds.forEach((function(e){for(var n=1;n<=e.percentage;n++)t.push(e)})),n=function(){return t[Math.floor(Math.random()*t.length)]},o=function(e){var o;return Ee(this,(function(e){switch(e.label){case 0:return i.isDestroyed?[2,{value:void 0}]:(o=n(),window.Caramel.EventEmitter.emit("zone:tryToCallVideoAd",i,o.source),[4,o.call()]);case 1:return e.sent()?[2,"break"]:(t=t.filter((function(t){return t!==o})),[2])}}))},i=this,r=0,s.label=1;case 1:return r<this.videoAds.length?[5,o(r)]:[3,4];case 2:if("object"==typeof(a=s.sent()))return[2,a.value];if("break"===a)return[3,4];s.label=3;case 3:return r++,[3,1];case 4:return[2]}}
1))}))}))},t.prototype.appendScript=function(){this.scriptNode=document.createElement("script"),this.scriptNode.id="Caramel_".concat(this.id,"_script"),this.scriptNode.textContent=this.params.jsCode,document.head.appendChild(this.scriptNode)},t.prototype.appendStyle=function(){this.styleNode=document.createElement("style"),this.styleNode.id="Caramel_".concat(this.id,"_style"),this.styleNode.textContent=this.params.cssCode,this.styleNode.setAttribute("rel","stylesheet"),document.head.appendChild(this.styleNode)},t.prototype.canShowForLocation=function(){var t,e,n,o,i,r,a,s,c,l,d=!0;return(null===(e=null===(t=this.params)||void 0===t?void 0:t.allowedCountries)||void 0===e?void 0:e.length)?d=null===(i=null===(o=null===(n=this.params)||void 0===n?void 0:n.allowedCountries)||void 0===o?void 0:o.map((function(t){return t.toLowerCase()})))||void 0===i?void 0:i.includes(window.Caramel.Geo.countryCode):(null===(a=null===(r=this.params)||void 0===r?void 0:r.blockedCountries)||void 0===a?void 0:a.length)&&(d=!(null===(l=null===(c=null===(s=this.params)||void 0===s?void 0:s.blockedCountries)||void 0===c?void 0:c.map((function(t){return t.toLowerCase()})))||void 0===l?void 0:l.includes(window.Caramel.Geo.countryCode))),d},t.prototype.canShowByFrequency=function(){var t,e,n;return!((null===(t=this.params)||void 0===t?void 0:t.frequency)&&(e="Caramel_".concat(this.id,"_shown"),n="; ".concat(document.cookie).split("; ".concat(e,"=")),2===n.length&&n.pop().split(";").shift()))},t}();const Ie=xe;const Ae=function(){function t(){}return t.init=function(t){this.configure(t),this.connectScript()},t.configure=function(t){window.pbjs=window.pbjs||{},window.pbjs.que=window.pbjs.que||[],window.pbjs.que.push((function(){window.pbjs.setConfig({enableTIDs:!0,userSync:{iframeEnabled:!0,pixelEnabled:!0,filterSettings:{iframe:{bidders:this.getBidders(t),filter:"include"},image:{bidders:this.getBidders(t),filter:"include"}}},activityControls:[{activity:"transmitTid",allow:this.getBidders(t)}]})}))},t.connectScript=function(){var t=L.appendElement("script",{async:"true",src:"https://cdn.digitalcaramel.com/prebid.js"},"head");t.onload=function(){window.Caramel.EventEmitter.emit("prebid:prebidScriptConnectSuccess")},t.onerror=function(){window.Caramel.EventEmitter.emit("prebid:prebidScriptConnectError")}},t.getBidders=function(t){return t.adfox.biddersMap?Object.keys(t.adfox.biddersMap).filter((function(t){return t.startsWith("pb_")})).map((function(t){return t.substring(3)})):[]},t}();var Te=function(){return Te=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},Te.apply(this,arguments)},Le=function(t,e,n,o){return new(n||(n=Promise))((function(i,r){function a(t){try{c(o.next(t))}catch(t){r(t)}}function s(t){try{c(o.throw(t))}catch(t){r(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}c((o=o.apply(t,e||[])).next())}))},ze=function(t,e){var n,o,i,r,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return r={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;r&&(r=0,s[0]&&(a=0)),a;)try{if(n=1,o&&(i=2&s[0]?o.return:s[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,s[1])).done)return i;switch(o=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,o=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],o=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}};const ke=function(){function t(){this.zones=[]}return t.getInstance=function(){return t.instance||(t.instance=new t),t.instance},t.prototype.init=function(t){de.validate(t),this.config=t,this.hasPrebid()&&Ae.init(this.config),it.connectHeaderBiddingScript(),it.initQueues(),this.initZones(),(this.config.zones.some((function(t){var e;return null===(e=null==t?void 0:t.videoAds)||void 0===e?void 0:e.length}))||this.config.zones.some((function(t){return"streamLine"===t.format}))||this.config.zones.some((function(t){var e;return"banner"===t.format&&!!(null===(e=t.formatParams)||void 0===e?void 0:e.yandexInstreamPartnerId)})))&&this.connectVideoSDK(),this.connectBidderScripts(),it.setupHeaderBiddingSettings(Array.isArray(t.adfox.biddersMap)?{}:t.adfox.biddersMap,t.adfox.biddersCpmAdjustmentMap,this.getAdUnits(),t.adfox.timeout,this.hasPrebid()),it.connectContextScript()},t.prototype.initZones=function(){return Le(this,void 0,void 0,(function(){var t=this;return ze(this,(function(e){switch(e.label){case 0:return n=t.config.zones.some((function(t){var e,n,o,i;return(null===(n=null===(e=t.params)||void 0===e?void 0:e.allowedCountries)||void 0===n?void 0:n.length)||(null===(i=null===(o=t.params)||void 0===o?void 0:o.blockedCountries)||void 0===i?void 0:i.length)})),o=t.config.zones.some((function(t){var e,n;return t.format===r.streamLine&&(null===(n=null===(e=t.formatParams)||void 0===e?void 0:e.blocks)||void 0===n?void 0:n.some((function(t){var e,n;return(null===(e=null==t?void 0:t.allowedCountries)||void 0===e?void 0:e.length)||(null===(n=null==t?void 0:t.blockedCountries)||void 0===n?void 0:n.length)})))})),n||o?[4,this.detectLocation()]:[3,2];case 1:e.sent(),e.label=2;case 2:return"loading"!==document.readyState?[3,4]:[4,new Promise((function(t){return document.addEventListener("DOMContentLoaded",(function(){return t()}),{once:!0})}))];case 3:e.sent(),e.label=4;
1case 4:return this.config.zones.forEach((function(e){"canceled"!==e.status&&("pending"!==e.status||"#caramel_preview"===window.location.hash||new URLSearchParams(window.location.search).has("caramel_preview")||q.get("logger"))&&t.canShowForLocation(e)&&(e.params.hasCssPath&&(t.insertInitialElements(e),a.includes(e.format)&&t.observeDynamicElements(e)),t.initZone(e),t.observeZoneContainers(e))})),[2]}var n,o}))}))},t.prototype.initZone=function(t){var e=this;if(t.params.isRepeatable){Array.from(document.querySelectorAll('[caramel-id="'.concat(t.id,'"]'))).forEach((function(n,o){e.createZone(t,n,o)}))}else{var n=document.querySelector('[caramel-id="'.concat(t.id,'"]'));n&&this.createZone(t,n)}},t.prototype.insertInitialElements=function(t){var e,n=Array.from(document.querySelectorAll(null===(e=t.params)||void 0===e?void 0:e.cssPath.targetSelector));this.canInsertZoneForDevice(t)&&n.forEach((function(e){var n;e.insertAdjacentHTML(null===(n=t.params)||void 0===n?void 0:n.cssPath.placement,'<div caramel-id="'.concat(t.id,'"></div>'))}))},t.prototype.canInsertZoneForDevice=function(t){if(!t.params.isAdaptive)return!0;var e,n=t.params.adaptiveOptions.sizes;return e=window.innerWidth>n.tabletWidth?"desktop":window.innerWidth<=n.tabletWidth&&window.innerWidth>n.phoneWidth?"tablet":"phone",t.params.adaptiveOptions.devices.includes(e)},t.prototype.canShowForLocation=function(t){var e,n,o,i,r,a,s=!!(null===(n=null===(e=t.params)||void 0===e?void 0:e.allowedCountries)||void 0===n?void 0:n.length),c=!!(null===(i=null===(o=t.params)||void 0===o?void 0:o.blockedCountries)||void 0===i?void 0:i.length);if(!s&&!c)return!0;var l=null===(a=null===(r=window.Caramel.Geo)||void 0===r?void 0:r.countryCode)||void 0===a?void 0:a.toLowerCase();return!!l&&(s?t.params.allowedCountries.map((function(t){return t.toLowerCase()})).includes(l):!c||!t.params.blockedCountries.map((function(t){return t.toLowerCase()})).includes(l))},t.prototype.observeDynamicElements=function(t){var e=new MutationObserver((function(e){for(var n=0,o=e;n<o.length;n++){var i=o[n];"childList"===i.type&&Array.from(i.addedNodes).forEach((function(e){var n,o;if((null==e?void 0:e.nodeType)===Node.ELEMENT_NODE){var i=[];e.matches(null===(n=t.params)||void 0===n?void 0:n.cssPath.targetSelector)?i.push(e):e.querySelectorAll(null===(o=t.params)||void 0===o?void 0:o.cssPath.targetSelector).forEach((function(t){return i.push(t)})),i.forEach((function(e){var n;e.insertAdjacentHTML(null===(n=t.params)||void 0===n?void 0:n.cssPath.placement,'<div caramel-id="'.concat(t.id,'"></div>'))}))}}))}}));"loading"===document.readyState?document.body?e.observe(document.body,{childList:!0,subtree:!0}):document.addEventListener("DOMContentLoaded",(function(){e.observe(document.body,{childList:!0,subtree:!0})})):e.observe(document.body,{childList:!0,subtree:!0})},t.prototype.observeZoneContainers=function(t){var e=this,n=new MutationObserver((function(n){for(var o=0,i=n;o<i.length;o++){var r=i[o];"childList"===r.type&&Array.from(r.addedNodes).forEach((function(n){if((null==n?void 0:n.nodeType)===Node.ELEMENT_NODE){var o="DIV"===(null==n?void 0:n.tagName)&&(null==n?void 0:n.getAttribute("caramel-id"))===t.id,i=!!n.querySelector('[caramel-id="'.concat(t.id,'"]')),r=e.zones.some((function(e){return e.id===t.id}));if(o||i){if(!t.params.isRepeatable&&r){if(t.params.preventReinitialization)return;var a=e.zones.find((function(e){return e.id===t.id}));a&&(e.destroyZone(a),a.container.remove())}var s=o?n:n.querySelector('[caramel-id="'.concat(t.id,'"]'));e.createZone(t,s)}}}))}}));"loading"===document.readyState?document.body?n.observe(document.body,{childList:!0,subtree:!0}):document.addEventListener("DOMContentLoaded",(function(){n.observe(document.body,{childList:!0,subtree:!0})})):n.observe(document.body,{childList:!0,subtree:!0})},t.prototype.getAdUnits=function(){var t=this.config.zones;"#caramel_preview"===window.location.hash||new URLSearchParams(window.location.search).has("caramel_preview")||q.get("logger")||(t=t.filter((function(t){return"approved"===t.status})));var e=Object.keys(this.config.adfox.biddersMap);return t.flatMap((function(t){return t.banners.flatMap((function(n){return Te(Te({code:"Caramel_".concat(n.id)},t.params.isCombo?{codeType:"combo"}:t.params.isInstream?{codeType:"instream"}
1:t.params.isInpage?{codeType:"inpage"}:{}),{bids:n.bidding.bids.filter((function(t){return t.bidder&&t.status&&H(t)})).filter((function(t){return e.includes(t.bidder)})).map((function(t){return{bidder:t.bidder,params:Te(Te(Te(Te(Te(Te(Te(Te({sendTargetRef:o.includes(t.bidder)},N(t)),"mediasniper"===t.bidder?{additional:{ext:{luid:localStorage.getItem("tf_lid")}}}:{}),"roxot"===t.bidder?{additional:{ext:{rxtUid:localStorage.getItem("rxt_uid")}}}:{}),"buzzoola"===t.bidder?{additional:{fpuids:function(){try{return window.Buzzoola.User.getAllData()}catch(t){return{}}}()}}:{}),"sape"===t.bidder?{additional:{sapeFpUids:be.getRrbFpUids()}}:{}),"mytarget"===t.bidder?{additional:{fpid:ve.getSyncId()}}:{}),"solta"===t.bidder?{additional:{solta_stable:we.getSoltaId()}}:{}),"adriver"===t.bidder?function(){var t,e=i[window.location.hostname];if(!e)return{};var n=null!==(t=localStorage.getItem("adrcid"))&&void 0!==t?t:"";return{additional:{ext:{query:"efp=".concat(e,"&cid=").concat(n)}}}}():{})}})),sizes:n.bidding.sizes.map((function(t){return[t.width,t.height]}))})}))}))},t.prototype.createZone=function(t,e,n){void 0===n&&(n=0);try{var o=new Ie(t,e,n);this.zones.push(o)}catch(t){window.Caramel.EventEmitter.emit("zone:validationError",t)}},t.prototype.destroyZone=function(t){t.destroy(),this.zones=this.zones.filter((function(e){return e!==t}))},t.prototype.connectBidderScripts=function(){this.bidderExists("roxot")&&ye.connectManagerScript(),this.bidderExists("betweendigital")&&me.connectPixelIframe(),this.bidderExists("sape")&&(be.connectPixelScript(),be.connectMatchingScript()),this.bidderExists("bidvol")&&he.connectPixelImage(),this.bidderExists("buzzoola")&&fe.connectScript(),this.bidderExists("solta")&&we.connectScript(),this.bidderExists("mytarget")&&ve.connectSyncLoaderScript()},t.prototype.bidderExists=function(t){return Object.keys(this.config.adfox.biddersMap).includes(t)},t.prototype.hasPrebid=function(){var t=Object.keys(this.config.adfox.biddersMap).some((function(t){return t&&t.startsWith("pb_")})),e=this.config.zones.filter((function(t){return"canceled"!==t.status})).some((function(t){return t.banners.some((function(t){return t.bidding.bids.some((function(t){return t.status&&t.bidder&&t.bidder.startsWith("pb_")&&H(t)}))}))}));return t&&e},t.prototype.connectVideoSDK=function(){var t=L.appendElement("script",{src:"https://yandex.ru/ads/system/adsdk.js",async:"true"},"head");t.onerror=function(){window.Caramel.EventEmitter.emit("videoSDK:connectError")},t.onload=function(){window.Caramel.EventEmitter.emit("videoSDK:connectSuccess")}},t.prototype.detectLocation=function(){return Le(this,void 0,void 0,(function(){var t,e,n,o,i,r,a,s;return ze(this,(function(c){switch(c.label){case 0:if(t=null===(s=document.cookie.split("; ").find((function(t){return t.startsWith("caramel_geo=")})))||void 0===s?void 0:s.split("=")[1])try{return window.Caramel.Geo=JSON.parse(decodeURIComponent(t)),window.Caramel.EventEmitter.emit("debug","Cached country code is: ".concat(window.Caramel.Geo.countryCode)),[2]}catch(t){console.warn("Failed to parse geo cookie",t)}e=new AbortController,n=setTimeout((function(){return e.abort()}),3e3),c.label=1;case 1:return c.trys.push([1,4,5,6]),[4,fetch("https://api.country.is/",{signal:e.signal})];case 2:return[4,c.sent().json()];case 3:if(!(o=c.sent()))throw new Error("Failed to retrieve location data");return i=o.country,r={countryCode:i.toLowerCase()},window.Caramel.Geo=r,window.Caramel.EventEmitter.emit("debug","Detected country code is: ".concat(window.Caramel.Geo.countryCode)),document.cookie="caramel_geo=".concat(encodeURIComponent(JSON.stringify(r)),"; path=/; max-age=10800"),[3,6];case 4:return a=c.sent(),console.error("Error detecting location:",a),[3,6];case 5:return clearTimeout(n),[7];case 6:return[2]}}
1))}))},t}().getInstance();const Oe=function(){function t(){}return t.fire=function(e){if(t.ALLOWED_HOSTS.includes(window.location.hostname)){var n=t.BASE_SRC,o=new URLSearchParams;Object.keys(e).forEach((function(t){var n=e[t];null!=n&&o.append(t,String(n))}));var i=o.toString();i&&(n+="?".concat(i)),(new Image).src=n}},t.BASE_SRC="https://metrics.digitalcaramel.com/pixel.gif",t.ALLOWED_HOSTS=[],t}();var Pe=function(t,e,n,o){return new(n||(n=Promise))((function(i,r){function a(t){try{c(o.next(t))}catch(t){r(t)}}function s(t){try{c(o.throw(t))}catch(t){r(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}c((o=o.apply(t,e||[])).next())}))},Be=function(t,e){var n,o,i,r,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return r={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;r&&(r=0,s[0]&&(a=0)),a;)try{if(n=1,o&&(i=2&s[0]?o.return:s[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,s[1])).done)return i;switch(o=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,o=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],o=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}};(function(){function t(){}return t.getInstance=function(){return t.instance||(t.instance=new t),t.instance},t.prototype.init=function(){window.Caramel={EventEmitter:I.getInstance(),headerBiddingScriptConnected:!1,contextScriptConnected:!1,Geo:{countryCode:""}},et.start("app:init"),D.getInstance().init(),this.connectWebsiteConfig()},t.prototype.connectWebsiteConfig=function(){return Pe(this,void 0,void 0,(function(){var t;return Be(this,(function(e){try{t=window.CaramelDomain||window.location.hostname.replace(/^www\./,""),fetch("".concat("https://cdn.digitalcaramel.com/configs","/").concat(t,".json").concat("#caramel_preview"===window.location.hash||q.get("logger")?"?ts=".concat((new Date).getTime()):"")).then((function(t){return t.json()})).then((function(t){try{ke.init(t)}catch(t){window.Caramel.EventEmitter.emit("config:validationError",t)}window.Caramel.config=t,window.Caramel.EventEmitter.emit("app:websiteConfigConnectSuccess",t)}))}catch(t){window.Caramel.EventEmitter.emit("app:websiteConfigConnectError")}return[2]}))}))},t})().getInstance().init()})()

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.