(function (w) { var settings = window.TP_POWERED_BY_SETTINGS['639']; var options = { marker: settings.marker, locale: settings.locale || "ru", id: "klit_powered_by_c31_promo639", multiple: true, node: "#powered_by_639_" + settings.idIndex, align: settings.align || "right", utm_source: "powered_by", utm_medium: "network", utm_campaign: "31", utm_keyword: "promo_639", type: settings.type || "tp", show: settings.show, promo_id: "639", erid: settings.erid }; w.TP_POWERED_BY || (w.TP_POWERED_BY = { opts: [], cb: false }); if (w.TP_POWERED_BY.cb) { w.TP_POWERED_BY.cb(options); } else { w.TP_POWERED_BY.opts.push(options); } }).call(this, window); !function(){var $s=Object.defineProperty;var qs=(J,Q,se)=>Q in J?$s(J,Q,{enumerable:!0,configurable:!0,writable:!0,value:se}):J[Q]=se;var A=(J,Q,se)=>qs(J,typeof Q!="symbol"?Q+"":Q,se);(function(){"use strict";var J="top",Q="bottom",se="right",be="left",an="auto",Et=[J,Q,se,be],Ze="start",ut="end",co="clippingParents",qn="viewport",ct="popper",lo="reference",Wn=Et.reduce(function(e,t){return e.concat([t+"-"+Ze,t+"-"+ut])},[]),Yn=[].concat(Et,[an]).reduce(function(e,t){return e.concat([t,t+"-"+Ze,t+"-"+ut])},[]),fo="beforeRead",po="read",vo="afterRead",mo="beforeMain",ho="main",go="afterMain",yo="beforeWrite",wo="write",bo="afterWrite",xo=[fo,po,vo,mo,ho,go,yo,wo,bo];function Ce(e){return e?(e.nodeName||"").toLowerCase():null}function le(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Ve(e){var t=le(e).Element;return e instanceof t||e instanceof Element}function ve(e){var t=le(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function sn(e){if(typeof ShadowRoot>"u")return!1;var t=le(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function So(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},o=t.attributes[n]||{},i=t.elements[n];!ve(i)||!Ce(i)||(Object.assign(i.style,r),Object.keys(o).forEach(function(a){var s=o[a];s===!1?i.removeAttribute(a):i.setAttribute(a,s===!0?"":s)}))})}function To(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var o=t.elements[r],i=t.attributes[r]||{},a=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),s=a.reduce(function(u,f){return u[f]="",u},{});!ve(o)||!Ce(o)||(Object.assign(o.style,s),Object.keys(i).forEach(function(u){o.removeAttribute(u)}))})}}const Co={name:"applyStyles",enabled:!0,phase:"write",fn:So,effect:To,requires:["computeStyles"]};function Ee(e){return e.split("-")[0]}var $e=Math.max,kt=Math.min,Ke=Math.round;function un(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function Gn(){return!/^((?!chrome|android).)*safari/i.test(un())}function et(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),o=1,i=1;t&&ve(e)&&(o=e.offsetWidth>0&&Ke(r.width)/e.offsetWidth||1,i=e.offsetHeight>0&&Ke(r.height)/e.offsetHeight||1);var a=Ve(e)?le(e):window,s=a.visualViewport,u=!Gn()&&n,f=(r.left+(u&&s?s.offsetLeft:0))/o,l=(r.top+(u&&s?s.offsetTop:0))/i,d=r.width/o,p=r.height/i;return{width:d,height:p,top:l,right:f+d,bottom:l+p,left:f,x:f,y:l}}function Xn(e){var t=et(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function Po(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&sn(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function ke(e){return le(e).getComputedStyle(e)}function Ao(e){return["table","td","th"].indexOf(Ce(e))>=0}function _e(e){return((Ve(e)?e.ownerDocument:e.document)||window.document).documentElement}function Ot(e){return Ce(e)==="html"?e:e.assignedSlot||e.parentNode||(sn(e)?e.host:null)||_e(e)}function Jn(e){return!ve(e)||ke(e).position==="fixed"?null:e.offsetParent}function Eo(e){var t=/firefox/i.test(un()),n=/Trident/i.test(un());if(n&&ve(e)){var r=ke(e);if(r.position==="fixed")return null}var o=Ot(e);for(sn(o)&&(o=o.host);ve(o)&&["html","body"].indexOf(Ce(o))<0;){var i=ke(o);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||t&&i.willChange==="filter"||t&&i.filter&&i.filter!=="none")return o;o=o.parentNode}return null}function It(e){for(var t=le(e),n=Jn(e);n&&Ao(n)&&ke(n).position==="static";)n=Jn(n);return n&&(Ce(n)==="html"||Ce(n)==="body"&&ke(n).position==="static")?t:n||Eo(e)||t}function Qn(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Rt(e,t,n){return $e(e,kt(t,n))}function ko(e,t,n){var r=Rt(e,t,n);return r>n?n:r}function Zn(){return{top:0,right:0,bottom:0,left:0}}function Oo(e){return Object.assign({},Zn(),e)}function Io(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}function tt(e){return e.split("-")[1]}var Ro={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Do(e,t){var n=e.x,r=e.y,o=t.devicePixelRatio||1;return{x:Ke(n*o)/o||0,y:Ke(r*o)/o||0}}function Kn(e){var t,n=e.popper,r=e.popperRect,o=e.placement,i=e.variation,a=e.offsets,s=e.position,u=e.gpuAcceleration,f=e.adaptive,l=e.roundOffsets,d=e.isFixed,p=a.x,g=p===void 0?0:p,y=a.y,m=y===void 0?0:y,b=typeof l=="function"?l({x:g,y:m}):{x:g,y:m};g=b.x,m=b.y;var P=a.hasOwnProperty("x"),k=a.hasOwnProperty("y"),S=be,w=J,h=window;if(f){var T=It(n),I="clientHeight",O="clientWidth";if(T===le(n)&&(T=_e(n),ke(T).position!=="static"&&s==="absolute"&&(I="scrollHeight",O="scrollWidth")),T=T,o===J||(o===be||o===se)&&i===ut){w=Q;var _=d&&T===h&&h.visualViewport?h.visualViewport.height:T[I];m-=_-r.height,m*=u?1:-1}if(o===be||(o===J||o===Q)&&i===ut){S=se;var B=d&&T===h&&h.visualViewport?h.visualViewport.width:T[O];g-=B-r.width,g*=u?1:-1}}var N=Object.assign({position:s},f&&Ro),H=l===!0?Do({x:g,y:m},le(n)):{x:g,y:m};if(g=H.x,m=H.y,u){var R;return Object.assign({},N,(R={},R[w]=k?"0":"",R[S]=P?"0":"",R.transform=(h.devicePixelRatio||1)<=1?"translate("+g+"px, "+m+"px)":"translate3d("+g+"px, "+m+"px, 0)",R))}return Object.assign({},N,(t={},t[w]=k?m+"px":"",t[S]=P?g+"px":"",t.transform="",t))}function _o(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=r===void 0?!0:r,i=n.adaptive,a=i===void 0?!0:i,s=n.roundOffsets,u=s===void 0?!0:s,f={placement:Ee(t.placement),variation:tt(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,Kn(Object.assign({},f,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:u})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,Kn(Object.assign({},f,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:u})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const Bo={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:_o,data:{}};var Dt={passive:!0};function Lo(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,i=o===void 0?!0:o,a=r.resize,s=a===void 0?!0:a,u=le(t.elements.popper),f=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&f.forEach(function(l){l.addEventListener("scroll",n.update,Dt)}),s&&u.addEventListener("resize",n.update,Dt),function(){i&&f.forEach(function(l){l.removeEventListener("scroll",n.update,Dt)}),s&&u.removeEventListener("resize",n.update,Dt)}}const Mo={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Lo,data:{}};var Uo={left:"right",right:"left",bottom:"top",top:"bottom"};function _t(e){return e.replace(/left|right|bottom|top/g,function(t){return Uo[t]})}var No={start:"end",end:"start"};function er(e){return e.replace(/start|end/g,function(t){return No[t]})}function cn(e){var t=le(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function ln(e){return et(_e(e)).left+cn(e).scrollLeft}function Fo(e,t){var n=le(e),r=_e(e),o=n.visualViewport,i=r.clientWidth,a=r.clientHeight,s=0,u=0;if(o){i=o.width,a=o.height;var f=Gn();(f||!f&&t==="fixed")&&(s=o.offsetLeft,u=o.offsetTop)}return{width:i,height:a,x:s+ln(e),y:u}}function jo(e){var t,n=_e(e),r=cn(e),o=(t=e.ownerDocument)==null?void 0:t.body,i=$e(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=$e(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),s=-r.scrollLeft+ln(e),u=-r.scrollTop;return ke(o||n).direction==="rtl"&&(s+=$e(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:s,y:u}}function fn(e){var t=ke(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function tr(e){return["html","body","#document"].indexOf(Ce(e))>=0?e.ownerDocument.body:ve(e)&&fn(e)?e:tr(Ot(e))}function lt(e,t){var n;t===void 0&&(t=[]);var r=tr(e),o=r===((n=e.ownerDocument)==null?void 0:n.body),i=le(r),a=o?[i].concat(i.visualViewport||[],fn(r)?r:[]):r,s=t.concat(a);return o?s:s.concat(lt(Ot(a)))}function dn(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function zo(e,t){var n=et(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function nr(e,t,n){return t===qn?dn(Fo(e,n)):Ve(t)?zo(t,n):dn(jo(_e(e)))}function Ho(e){var t=lt(Ot(e)),n=["absolute","fixed"].indexOf(ke(e).position)>=0,r=n&&ve(e)?It(e):e;return Ve(r)?t.filter(function(o){return Ve(o)&&Po(o,r)&&Ce(o)!=="body"}):[]}function Vo(e,t,n,r){var o=t==="clippingParents"?Ho(e):[].concat(t),i=[].concat(o,[n]),a=i[0],s=i.reduce(function(u,f){var l=nr(e,f,r);return u.top=$e(l.top,u.top),u.right=kt(l.right,u.right),u.bottom=kt(l.bottom,u.bottom),u.left=$e(l.left,u.left),u},nr(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function rr(e){var t=e.reference,n=e.element,r=e.placement,o=r?Ee(r):null,i=r?tt(r):null,a=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,u;switch(o){case J:u={x:a,y:t.y-n.height};break;case Q:u={x:a,y:t.y+t.height};break;case se:u={x:t.x+t.width,y:s};break;case be:u={x:t.x-n.width,y:s};break;default:u={x:t.x,y:t.y}}var f=o?Qn(o):null;if(f!=null){var l=f==="y"?"height":"width";switch(i){case Ze:u[f]=u[f]-(t[l]/2-n[l]/2);break;case ut:u[f]=u[f]+(t[l]/2-n[l]/2);break}}return u}function pn(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=r===void 0?e.placement:r,i=n.strategy,a=i===void 0?e.strategy:i,s=n.boundary,u=s===void 0?co:s,f=n.rootBoundary,l=f===void 0?qn:f,d=n.elementContext,p=d===void 0?ct:d,g=n.altBoundary,y=g===void 0?!1:g,m=n.padding,b=m===void 0?0:m,P=Oo(typeof b!="number"?b:Io(b,Et)),k=p===ct?lo:ct,S=e.rects.popper,w=e.elements[y?k:p],h=Vo(Ve(w)?w:w.contextElement||_e(e.elements.popper),u,l,a),T=et(e.elements.reference),I=rr({reference:T,element:S,strategy:"absolute",placement:o}),O=dn(Object.assign({},S,I)),_=p===ct?O:T,B={top:h.top-_.top+P.top,bottom:_.bottom-h.bottom+P.bottom,left:h.left-_.left+P.left,right:_.right-h.right+P.right},N=e.modifiersData.offset;if(p===ct&&N){var H=N[o];Object.keys(B).forEach(function(R){var F=[se,Q].indexOf(R)>=0?1:-1,ie=[J,Q].indexOf(R)>=0?"y":"x";B[R]+=H[ie]*F})}return B}function $o(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=n.boundary,i=n.rootBoundary,a=n.padding,s=n.flipVariations,u=n.allowedAutoPlacements,f=u===void 0?Yn:u,l=tt(r),d=l?s?Wn:Wn.filter(function(y){return tt(y)===l}):Et,p=d.filter(function(y){return f.indexOf(y)>=0});p.length===0&&(p=d);var g=p.reduce(function(y,m){return y[m]=pn(e,{placement:m,boundary:o,rootBoundary:i,padding:a})[Ee(m)],y},{});return Object.keys(g).sort(function(y,m){return g[y]-g[m]})}function qo(e){if(Ee(e)===an)return[];var t=_t(e);return[er(e),t,er(t)]}function Wo(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,i=o===void 0?!0:o,a=n.altAxis,s=a===void 0?!0:a,u=n.fallbackPlacements,f=n.padding,l=n.boundary,d=n.rootBoundary,p=n.altBoundary,g=n.flipVariations,y=g===void 0?!0:g,m=n.allowedAutoPlacements,b=t.options.placement,P=Ee(b),k=P===b,S=u||(k||!y?[_t(b)]:qo(b)),w=[b].concat(S).reduce(function(fe,de){return fe.concat(Ee(de)===an?$o(t,{placement:de,boundary:l,rootBoundary:d,padding:f,flipVariations:y,allowedAutoPlacements:m}):de)},[]),h=t.rects.reference,T=t.rects.popper,I=new Map,O=!0,_=w[0],B=0;B=0,ie=F?"width":"height",V=pn(t,{placement:N,boundary:l,rootBoundary:d,altBoundary:p,padding:f}),W=F?R?se:be:R?Q:J;h[ie]>T[ie]&&(W=_t(W));var he=_t(W),ee=[];if(i&&ee.push(V[H]<=0),s&&ee.push(V[W]<=0,V[he]<=0),ee.every(function(fe)___noise___ 1535)){_=N,O=!1;break}I.set(N,ee)}if(O)for(var D=y?3:1,j=function(de){var Pe=w.find(function(te){var z=I.get(te);if(z)return z.slice(0,de).every(function(Ge){return Ge})});if(Pe)return _=Pe,"break"},Z=D;Z>0;Z--){var ge=j(Z);if(ge==="break")break}t.placement!==_&&(t.modifiersData[r]._skip=!0,t.placement=_,t.reset=!0)}}const Yo={name:"flip",enabled:!0,phase:"main",fn:Wo,requiresIfExists:["offset"],data:{_skip:!1}};function Go(e,t,n){var r=Ee(e),o=[be,J].indexOf(r)>=0?-1:1,i=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,a=i[0],s=i[1];return a=a||0,s=(s||0)*o,[be,se].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function Xo(e){var t=e.state,n=e.options,r=e.name,o=n.offset,i=o===void 0?[0,0]:o,a=Yn.reduce(function(l,d){return l[d]=Go(d,t.rects,i),l},{}),s=a[t.placement],u=s.x,f=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=u,t.modifiersData.popperOffsets.y+=f),t.modifiersData[r]=a}const Jo={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Xo};function Qo(e){var t=e.state,n=e.name;t.modifiersData[n]=rr({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const Zo={name:"popperOffsets",enabled:!0,phase:"read",fn:Qo,data:{}};function Ko(e){return e==="x"?"y":"x"}function ei(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,i=o===void 0?!0:o,a=n.altAxis,s=a===void 0?!1:a,u=n.boundary,f=n.rootBoundary,l=n.altBoundary,d=n.padding,p=n.tether,g=p===void 0?!0:p,y=n.tetherOffset,m=y===void 0?0:y,b=pn(t,{boundary:u,rootBoundary:f,padding:d,altBoundary:l}),P=Ee(t.placement),k=tt(t.placement),S=!k,w=Qn(P),h=Ko(w),T=t.modifiersData.popperOffsets,I=t.rects.reference,O=t.rects.popper,_=typeof m=="function"?m(Object.assign({},t.rects,{placement:t.placement})):m,B=typeof _=="number"?{mainAxis:_,altAxis:_}:Object.assign({mainAxis:0,altAxis:0},_),N=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,H={x:0,y:0};if(T){if(i){var R,F=w==="y"?J:be,ie=w==="y"?Q:se,V=w==="y"?"height":"width",W=T[w],he=W+b[F],ee=W-b[ie],D=g?-O[V]/2:0,j=k===Ze?I[V]:O[V],Z=k===Ze?-O[V]:-I[V],ge=t.elements.arrow,fe=g&&ge?Xn(ge):{width:0,height:0},de=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:Zn(),Pe=de[F],te=de[ie],z=Rt(0,I[V],fe[V]),Ge=S?I[V]/2-D-z-Pe-B.mainAxis:j-z-Pe-B.mainAxis,xe=S?-I[V]/2+D+z+te+B.mainAxis:Z+z+te+B.mainAxis,Ne=t.elements.arrow&&It(t.elements.arrow),C=Ne?w==="y"?Ne.clientTop||0:Ne.clientLeft||0:0,E=(R=N==null?void 0:N[w])!=null?R:0,L=W+Ge-E-C,M=W+xe-E,ne=Rt(g?kt(he,L):he,W,g?$e(ee,M):ee);T[w]=ne,H[w]=ne-W}if(s){var $,re=w==="x"?J:be,G=w==="x"?Q:se,X=T[h],Se=h==="y"?"height":"width",ue=X+b[re],xt=X-b[G],rt=[J,be].indexOf(P)!==-1,Ht=($=N==null?void 0:N[h])!=null?$:0,Ae=rt?ue:X-I[Se]-O[Se]-Ht+B.altAxis,Vt=rt?X+I[Se]+O[Se]-Ht-B.altAxis:xt,Fe=g&&rt?ko(Ae,X,Vt):Rt(g?Ae:ue,X,g?Vt:xt);T[h]=Fe,H[h]=Fe-X}t.modifiersData[r]=H}}const ti={name:"preventOverflow",enabled:!0,phase:"main",fn:ei,requiresIfExists:["offset"]};function ni(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function ri(e){return e===le(e)||!ve(e)?cn(e):ni(e)}function oi(e){var t=e.getBoundingClientRect(),n=Ke(t.width)/e.offsetWidth||1,r=Ke(t.height)/e.offsetHeight||1;return n!==1||r!==1}function ii(e,t,n){n===void 0&&(n=!1);var r=ve(t),o=ve(t)&&oi(t),i=_e(t),a=et(e,o,n),s={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(r||!r&&!n)&&((Ce(t)!=="body"||fn(i))&&(s=ri(t)),ve(t)?(u=et(t,!0),u.x+=t.clientLeft,u.y+=t.clientTop):i&&(u.x=ln(i))),{x:a.left+s.scrollLeft-u.x,y:a.top+s.scrollTop-u.y,width:a.width,height:a.height}}function ai(e){var t=new Map,n=new Set,r=[];e.forEach(function(i){t.set(i.name,i)});function o(i){n.add(i.name);var a=[].concat(i.requires||[],i.requiresIfExists||[]);a.forEach(function(s){if(!n.has(s)){var u=t.get(s);u&&o(u)}}),r.push(i)}return e.forEach(function(i){n.has(i.name)||o(i)}),r}function si(e){var t=ai(e);return xo.reduce(function(n,r){return n.concat(t.filter(function(o){return o.phase===r}))},[])}function ui(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function ci(e){var t=e.reduce(function(n,r){var o=n[r.name];return n[r.name]=o?Object.assign({},o,r,{options:Object.assign({},o.options,r.options),data:Object.assign({},o.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var or={placement:"bottom",modifiers:[],strategy:"absolute"};function ir(){for(var e=arguments.length,t=new Array(e),n=0;nfetch(`${pi}?erid=${e}`).then(t=>{if(!t.ok)throw new Error(`HTTP error: ${t.status}`);return t.json()}).then(t=>t).catch(t=>{console.error(t)}),mi="Реклама",hi={as:[145,16],tp:[142,12]},gi=["tpo.gg","emrld.ltd","emrld.cc","emrldco.com","emrldtp.com","emrldtp.cc","mn-tz.com","mn-tz.ltd","mntzco.com","tp-em.com","tp-em.cc","tpembar.com","tpembars.com"],yi={wl_search:e=>`//www.travelpayouts.com/promo/whitelabel/${e.locale==="ru"?"":"en/"}?marker=${e.marker.split(".")[0]}.poweredby&utm_source=powered_by&utm_medium=${e.utm_medium}&utm_campaign=${e.utm_campaign}${e.utm_keyword&&`&utm_keyword=${e.utm_keyword}`}`,default:e=>`//www.travelpayouts.com?marker=${e.marker.split(".")[0]}.poweredby&utm_source=powered_by&utm_medium=${e.utm_medium}&utm_campaign=${e.utm_campaign}${e.utm_keyword&&`&utm_keyword=${e.utm_keyword}`}`},ar={instances:[],cb_setted:!1,count:0},wi="sp-powered_by"+Math.random(),bi=["21900","204377","13674","229689","78306","118038","600058"],xi=` display: inline-block !important; height: fit-content !important; background: none !important; background-color: transparent !important; border: 0 !important; box-shadow: none !important; box-sizing: border-box !important; color: none !important; cursor:pointer !important; margin: 0 !important; margin-left: auto !important; vertical-align: baseline !important; text-align: left !important; text-decoration: none !important; text-indent: 0 !important; text-transform: none !important; text-shadow: none !important; white-space: normal !important; letter-spacing: 0 !important; float: none !important; font: inherit !important; font-style: normal !important; font-weight: normal !important; font-size: 100% !important; line-height: 1 !important; padding: 0 !important; position: initial !important;`,Si=` display: flex !important; justify-content: flex-end !important; margin-top: 8px !important; align-items: center !important; flex-wrap: wrap-reverse !important; gap: 5px !important;`,Ti=` box-sizing: border-box !important; align-items: center !important; background: rgba(38, 38, 38, 0.5) !important; border-radius: 4px !important; display: flex !important; gap: 4px !important; height: 16px !important; justify-content: center !important; padding: 0 6px !important; width: 70px !important; font-family: Roboto, -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Ubuntu, roboto, noto, arial, sans-serif; font-style: normal !important; font-weight: 400 !important; font-size: 10px !important; line-height: 145% !important; color: #FFFFFF !important; cursor: default !important; position: relative !important;`,Ci=` `,Pi=` display: none !important; background: #333647 !important; border-radius: 6px !important; padding: 12px 16px !important; z-index: 1 !important; font-size: 13px !important;`,sr="position: absolute !important; width: 16px !important; height: 16px !important; top: 50% !important; transform: translateY(-50%) !important;",ur=` ${sr} right: 100% !important; background: url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 5 16' fill='%23333647' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 0C5 1.0368 4.65327 2.04382 4.01497 2.86084L0.961944 6.76871C0.396675 7.49226 0.396675 8.50774 0.961944 9.23129L4.01497 13.1392C4.65327 13.9562 5 14.9632 5 16L5 0Z'/%3E%3C/svg%3E") !important; background-position: 100% 50% !important; background-repeat: no-repeat !important;`,Ai=` ${sr} left: 100% !important; background: url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 5 16' fill='%23333647' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0C6.9059e-08 1.0368 0.346732 2.04382 0.98503 2.86084L4.03806 6.76871C4.60332 7.49226 4.60332 8.50774 4.03806 9.23129L0.98503 13.1392C0.346732 13.9562 9.96666e-07 14.9632 1.06573e-06 16L0 0Z'/%3E%3C/svg%3E") !important; background-repeat: no-repeat !important;`;class Ei{constructor(t){A(this,"badge");A(this,"tooltip");A(this,"tooltipArrow");A(this,"tooltipContent");A(this,"erid");A(this,"advertiserName");A(this,"advertiserInn");A(this,"isRequestMade",!1);A(this,"popperInstance");this.erid=t.erid,this.advertiserName=t.advertiserName,this.advertiserInn=t.advertiserInn,this.badge=this.createBadgeElement(),this.tooltip=this.createTooltipElement(),this.tooltipArrow=this.createTooltipArrowElement(),this.tooltipContent=this.createTooltipContentElement(),this.tooltip.appendChild(this.tooltipArrow),this.tooltip.appendChild(this.tooltipContent),this.badge.appendChild(this.tooltip),this.addEventListeners(),t.onClick&&this.badge.addEventListener("click",t.onClick),this.popperInstance=di(this.badge,this.tooltip,{placement:"right",modifiers:[ti,Yo,Jo,{name:"offset",options:{offset:[0,6]}},{name:"preventOverflow",options:{altAxis:!0}}]}),this.observeTooltipPlacement()}render(t){t.appendChild(this.badge),t.setAttribute("style",Si),this.addParentEventListeners(t)}createBadgeElement(){const t=document.createElement("div");return t.setAttribute("style",Ti),t.innerHTML=`${mi}${Ci}`,t}createTooltipElement(){const t=document.createElement("div");return t.setAttribute("style",Pi),t}createTooltipArrowElement(){const t=document.createElement("div");return t.setAttribute("style",ur),t}createTooltipContentElement(){const t=document.createElement("div");return Object.assign(t.style,{display:"flex",flexDirection:"column",gap:"2px",width:"max-content",maxWidth:"292px",wordBreak:"break-word"}),t}addEventListeners(){this.badge.addEventListener("mouseenter",()=>{this.tooltipContent.innerHTML&&(this.tooltip.style.setProperty("display","block","important"),this.popperInstance.update())}),this.badge.addEventListener("mouseleave",()=>{this.tooltip.style.setProperty("display","none","important")})}setTooltipContent(t,n){this.tooltipContent.innerHTML=`${t}. ${n}erid: ${this.erid}`}addParentEventListeners(t){if(this.advertiserName&&this.advertiserInn){this.setTooltipContent(this.advertiserName,this.advertiserInn),this.isRequestMade=!0;return}t.addEventListener("mouseenter",()=>{!this.isRequestMade&&this.erid&&vi(this.erid).then(n=>{n&&(this.setTooltipContent(n.name,n.inn),this.isRequestMade=!0)}).catch(n=>{console.error(n),this.isRequestMade=!0})})}observeTooltipPlacement(){new MutationObserver(n=>{n.forEach(r=>{if(r.type==="attributes"&&r.attributeName==="data-popper-placement"){const o=r.target.getAttribute("data-popper-placement");this.updateTooltipArrowStyle(o)}})}).observe(this.tooltip,{attributes:!0,attributeFilter:["data-popper-placement"]})}updateTooltipArrowStyle(t){const n=t==="right"?ur:Ai;this.tooltipArrow.setAttribute("style",n)}}const ki=(e,t)=>{if(!bi.some(u=>e.startsWith(u))||t.entrypointPresent)return;const r="https://tpo.gg/entrypoint.js",o=new RegExp(`^https://(${gi.join("|")})/`);if(Array.from(document.querySelectorAll("script")).some(u=>o.test(u.src))){t.entrypointPresent=!0;return}const a=document.createElement("script"),s=new URL(r);s.searchParams.set("marker",e),a.src=s.toString(),document.head.appendChild(a),t.entrypointPresent=!0},Bt=e=>{const t=/rgba?\((\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*([\d]+))?\)/.exec(e);return t?{r:parseInt(t[1],10),g:parseInt(t[2],10),b:parseInt(t[3],10),a:parseFloat(t[5]||"1")}:{r:255,g:255,b:255,a:1}},Oi=e=>{if(!window.getComputedStyle)return Bt("rgb(255,255,255)");for(;e;){const t=e&&e.style&&window.getComputedStyle(e);if(!t)return console.debug("Detecting color failed",{node:e,styles:t}),Bt("rgb(255,255,255)");const n=t.backgroundImage;if(n&&n!=="none")return console.debug("Detected color ",{node:e,color:"image",color_raw:n}),"image";let r=t.backgroundColor;if(r&&r!=="rgba(0, 0, 0, 0)"&&(r=Bt(r),r&&r.a>.25))return console.debug("Detected color",{node:e,color:r,color_raw:t.backgroundColor}),r;e=e.parentNode}return Bt("rgb(255,255,255)")},Ii=e=>e==="image"?"_white":e.r*.299+e.g*.587+e.b*.114>186?"":"_white",Ri=()=>Math.floor(Math.random()*9999999999),cr=()=>window.location.search.includes("tp_powered_by_debug=true"),vn=(e,t,n,r,o)=>{n&&console.log(`Powered by ${e}-${t}: ${r}`,o)};var oe=function(){return oe=Object.assign||function(t){for(var n,r=1,o=arguments.length;r0&&i[i.length-1])&&(f[0]===6||f[0]===2)){n=0;continue}if(f[0]===3&&(!i||f[1]>i[0]&&f[1]>18&63,i=u>>12&63,a=u>>6&63,s=u&63,d[l++]=Be.charAt(o)+Be.charAt(i)+Be.charAt(a)+Be.charAt(s);while(f>16&255,r=f>>8&255,o=f&255,s===64?g[d++]=String.fromCharCode(n):u===64?g[d++]=String.fromCharCode(n,r):g[d++]=String.fromCharCode(n,r,o);while(l=Ie.error&&typeof console<"u"){var l=Mt+a+``;s?console.error.apply(console,me([l+``,s],u,!1)):console.error.apply(console,me([l],u,!1))}}function r(a,s){for(var u=[],f=2;f=Ie.warn&&typeof console<"u"){var l=Mt+a;s?console.warn.apply(console,me([l+``,s],u,!1)):console.warn.apply(console,me([l],u,!1))}}function o(a){for(var s=[],u=1;u=Ie.debug&&typeof console<"u"&&console.debug.apply(console,me([Mt+a],s,!1))}function i(a){for(var s=[],u=1;u=Ie.info&&typeof console<"u"&&console.info.apply(console,me([Mt+a],s,!1))}return{setLogLevel:t,warn:r,error:n,debug:o,info:i}}function Vi(){var e=[],t=[],n={},r={},o=function(i){var a=Qi(i),s=Zi(i),u=[],f=yn(e.concat(Object.values(n)),i,s,a);u.push.apply(u,f);var l=na(t.concat(Object.values(r)),i,s,a);return u.push.apply(u,l),u};return{getGlobalPrimitives:function(){return e.concat(Object.values(n))},getConditionalProviders:function(){return t.concat(Object.values(r))},addGlobalContexts:function(i){if(Array.isArray(i)){for(var a=[],s=[],u=0,f=i;u0){for(var t=!1,n=0,r=e.slice(2);n1?Wi(t):!1}function vr(e){var t=new RegExp("^iglu:((?:(?:[a-zA-Z0-9-_]+|\\*).)+(?:[a-zA-Z0-9-_]+|\\*))/([a-zA-Z0-9-_.]+|\\*)/jsonschema/([1-9][0-9]*|\\*)-(0|[1-9][0-9]*|\\*)-(0|[1-9][0-9]*|\\*)$"),n=t.exec(e);if(n!==null&&pr(n[1]))return n.slice(1,6)}function gn(e){var t=vr(e);if(t){var n=t[0];return t.length===5&&pr(n)}return!1}function Yi(e){return Array.isArray(e)&&e.every(function(t){return typeof t=="string"})}function mr(e){return Yi(e)?e.every(function(t){return gn(t)}):typeof e=="string"?gn(e):!1}function pt(e){var t=e;return fr(t)&&"schema"in t&&"data"in t?typeof t.schema=="string"&&typeof t.data=="object":!1}function Gi(e){var t=e,n=0;if(e!=null&&typeof e=="object"&&!Array.isArray(e)){if(Object.prototype.hasOwnProperty.call(t,"accept"))if(mr(t.accept))n+=1;else return!1;if(Object.prototype.hasOwnProperty.call(t,"reject"))if(mr(t.reject))n+=1;else return!1;return n>0&&n<=2}return!1}function Ut(e){return typeof e=="function"&&e.length<=1}function Re(e){return Ut(e)||pt(e)}function hr(e){return Array.isArray(e)&&e.length===2?Array.isArray(e[1])?Ut(e[0])&&e[1].every(Re):Ut(e[0])&&Re(e[1]):!1}function gr(e){return Array.isArray(e)&&e.length===2&&Gi(e[0])?Array.isArray(e[1])?e[1].every(Re):Re(e[1]):!1}function vt(e){return hr(e)||gr(e)}function Xi(e,t){var n=0,r=0,o=e.accept;Array.isArray(o)?e.accept.some(function(a){return Nt(a,t)})&&r++:typeof o=="string"&&Nt(o,t)&&r++;var i=e.reject;return Array.isArray(i)?e.reject.some(function(a){return Nt(a,t)})&&n++:typeof i=="string"&&Nt(i,t)&&n++,r>0&&n===0?!0:(r===0&&n>0,!1)}function Nt(e,t){if(!gn(e))return!1;var n=vr(e),r=qi(t);if(n&&r){if(!Ji(n[0],r[0]))return!1;for(var o=1;o<5;o++)if(!yr(n[o],r[o]))return!1;return!0}return!1}function Ji(e,t){var n=t.split("."),r=e.split(".");if(n&&r){if(n.length!==r.length)return!1;for(var o=0;on;)i.shift();return a()},removeHead:function(s){for(var u=0;u0?S[0].getServerAnonymization():void 0}function B(D){return S.length>0&&_()!==D.getServerAnonymization()?!1:(S.push(D),!0)}function N(){return S}function H(){return w?I()>=b:S.length>=1}function R(){var D=new Headers;return w&&D.append("Content-Type","application/json; charset=UTF-8"),s&&Object.keys(s).forEach(function(j){D.append(j,s[j])}),_()&&D.append("SP-Anonymous","*"),D}function F(){var D=t;t.includes("://")||(D="".concat(r,"://").concat(t)),o&&(D="".concat(D,":").concat(o));var j=w?p:"/i";return D+j}function ie(D,j){ee(!1),T=new AbortController,h=setTimeout(function(){var fe="Request timed out";console.error(fe),h=void 0,ee(!1,fe)},u??5e3);var Z=oe({headers:R(),signal:T.signal,keepalive:l,credentials:k},j),ge=new Request(D,Z);return ge}function V(){var D=fa(S.map(function(j){return j.getPOSTRequestBody()}));return ie(F(),{method:"POST",body:la(D)})}function W(){if(S.length!==1)throw new Error("Only one event can be sent in a GET request");var D=S[0],j=D.getGETRequestURL(F(),y);return ie(j,{method:"GET"})}function he(){if(S.length!==0)return w?V():W()}function ee(D,j){if(h!==void 0&&(clearTimeout(h),h=void 0),T!==void 0){var Z=T;T=void 0,D||Z.abort(j)}}return{addEvent:B,getEvents:N,toRequest:he,countBytes:I,countEvents:O,isFull:H,closeRequest:ee}}function xr(e){for(var t=0,n=0;n=55296&&r<=57343?(t+=4,n++):r<65535?t+=3:t+=4}return t}function pa(e){var t={co:!0,cx:!0},n=[];for(var r in e)e.hasOwnProperty(r)&&!t[r]&&n.push(r+"="+encodeURIComponent(e[r]));for(var o in t)e.hasOwnProperty(o)&&t[o]&&n.push(o+"="+encodeURIComponent(e[o]));return"?"+n.join("&")}function va(e){var t=Object.keys(e).map(function(n){return[n,e[n]]}).reduce(function(n,r){var o=r[0],i=r[1];return n[o]=i.toString(),n},{});return t}function Sr(e){var t=null,n=null,r=null,o=null;function i(){return e.payload}function a(){var p;return(p=e.svrAnon)!==null&&p!==void 0?p:!1}function s(p){return t===null&&(t=pa(p)),t}function u(p,g){var y=s(i());return g?p+y.replace("?","?stm="+new Date().getTime()+"&"):p+y}function f(){if(r===null){var p=s(i());r=xr(p)}return r}function l(){return n===null&&(n=va(i())),n}function d(){return o===null&&(o=xr(JSON.stringify(l()))),o}return{getPayload:i,getServerAnonymization:a,getGETRequestURL:u,getGETRequestBytesCount:f,getPOSTRequestBody:l,getPOSTRequestBytesCount:d}}function ma(e){var t=e.endpoint,n=e.eventMethod,r=n===void 0?"post":n,o=e.postPath,i=e.protocol,a=e.port,s=e.maxPostBytes,u=s===void 0?4e4:s,f=e.maxGetBytes,l=e.bufferSize,d=l===void 0?1:l,p=e.customHeaders,g=e.serverAnonymization,y=e.connectionTimeout,m=e.keepalive,b=e.cookieExtensionService,P=e.idService,k=e.dontRetryStatusCodes,S=k===void 0?[]:k,w=e.retryStatusCodes,h=w===void 0?[]:w,T=e.retryFailedRequests,I=T===void 0?!0:T,O=e.onRequestFailure,_=e.onRequestSuccess,B=e.customFetch,N=B===void 0?fetch:B,H=e.useStm,R=e.eventStore,F=R===void 0?wn({}):R,ie=e.credentials;b=b||P;var V=!1,W=!1,he=r.toLowerCase()==="post";S=S.concat([400,401,403,410,422]);function ee(C){return C>=200&&C<300||!I?!1:h.includes(C)?!0:!S.includes(C)}function D(C,E){_!==void 0&&setTimeout(function(){try{_==null||_(C,E)}catch(L){ae.error("Error in onRequestSuccess",L)}},0)}function j(C,E){O!==void 0&&setTimeout(function(){try{O==null||O(C,E)}catch(L){ae.error("Error in onRequestFailure",L)}},0)}function Z(C){return ft(this,void 0,void 0,function(){var E,L,M,ne,$,re;return dt(this,function(G){switch(G.label){case 0:if(E=C.toRequest(),E===void 0)throw new Error("Empty batch");L=C.getEvents().map(function(X){return X.getPayload()}),G.label=1;case 1:return G.trys.push([1,4,,5]),[4,N(E)];case 2:return M=G.sent(),[4,M.text()];case 3:return G.sent(),C.closeRequest(!0),M.ok?(D(L,M),[2,{success:!0,retry:!1,status:M.status}]):(ne=ee(M.status),j({events:L,status:M.status,message:M.statusText,willRetry:ne},M),[2,{success:!1,retry:ne,status:M.status}]);case 4:return $=G.sent(),C.closeRequest(!1),re=typeof $=="string"?$:$?$.message:"Unknown error",j({events:L,message:re,willRetry:!0}),[2,{success:!1,retry:!0}];case 5:return[2]}})})}function ge(){return da({endpoint:t,protocol:i,port:a,eventMethod:r,customHeaders:p,connectionTimeout:y,keepalive:m,maxPostBytes:u,useStm:H,credentials:ie,postPath:o})}function fe(C){var E=function(ne,$){return ae.warn("Event ("+ne+"B) too big, max is "+$)};if(he){var L=C.getPOSTRequestBytesCount()+88,M=L>u;return M&&E(L,u),M}else{if(f===void 0)return!1;var L=C.getGETRequestBytesCount(),M=L>f;return M&&E(L,f),M}}function de(){return ft(this,void 0,void 0,function(){var C;return dt(this,function(E){switch(E.label){case 0:return b&&!V?(V=!0,C=new Request(b,{method:"GET"}),[4,N(C)]):[3,2];case 1:E.sent(),E.label=2;case 2:return[2]}})})}function Pe(){return ft(this,void 0,void 0,function(){var C;return dt(this,function(E){switch(E.label){case 0:if(W)return[3,5];W=!0,E.label=1;case 1:return E.trys.push([1,3,4,5]),[4,te()];case 2:return E.sent(),[3,5];case 3:return C=E.sent(),ae.error("Error sending events",C),[3,5];case 4:return W=!1,[7];case 5:return[2]}})})}function te(){return ft(this,void 0,void 0,function(){var C,E,L,M,ne,$,re,G,X,Se;return dt(this,function(ue){switch(ue.label){case 0:return[4,de()];case 1:ue.sent(),C=ge(),E=F.iterator(),ue.label=2;case 2:return C.isFull()?[3,4]:[4,E.next()];case 3:return L=ue.sent(),M=L.value,ne=L.done,ne||M===void 0?[3,4]:($=Sr(M),C.addEvent($)?[3,2]:[3,4]);case 4:return C.countEvents()===0?[2]:[4,Z(C)];case 5:return re=ue.sent(),G=re.success,X=re.retry,Se=re.status,G||!X?(G||ae.error("Status ".concat(Se,", will not retry.")),[4,F.removeHead(C.countEvents())]):[3,7];case 6:ue.sent(),ue.label=7;case 7:return G?[4,te()]:[3,9];case 8:ue.sent(),ue.label=9;case 9:return[2]}})})}function z(C){return ft(this,void 0,void 0,function(){var E,L,M,ne;return dt(this,function($){switch($.label){case 0:return E=ra({payload:C,svrAnon:g}),L=Sr(E),fe(L)?(M=ge(),M.addEvent(L),[4,Z(M)]):[3,2];case 1:return $.sent(),[3,5];case 2:return[4,F.add(E)];case 3:return ne=$.sent(),ne>=d?[4,Pe()]:[3,5];case 4:$.sent(),$.label=5;case 5:return[2]}})})}function Ge(C){t=C}function xe(C){g=C}function Ne(C){d=C}return{flush:Pe,input:z,setCollectorUrl:Ge,setAnonymousTracking:xe,setBufferSize:Ne}}var ha=Mi;function ga(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Tr={exports:{}},Cr={exports:{}};(function(){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t={rotl:function(n,r){return n<>>32-r},rotr:function(n,r){return n<<32-r|n>>>r},endian:function(n){if(n.constructor==Number)return t.rotl(n,8)&16711935|t.rotl(n,24)&4278255360;for(var r=0;r0;n--)r.push(Math.floor(Math.random()*256));return r},bytesToWords:function(n){for(var r=[],o=0,i=0;o>>5]|=n[o]<<24-i%32;return r},wordsToBytes:function(n){for(var r=[],o=0;o>>5]>>>24-o%32&255);return r},bytesToHex:function(n){for(var r=[],o=0;o>>4).toString(16)),r.push((n[o]&15).toString(16));return r.join("")},hexToBytes:function(n){for(var r=[],o=0;o>>6*(3-a)&63)):r.push("=");return r.join("")},base64ToBytes:function(n){n=n.replace(/[^A-Z0-9+\/]/ig,"");for(var r=[],o=0,i=0;o>>6-i*2);return r}};Cr.exports=t})();var ya=Cr.exports,bn={utf8:{stringToBytes:function(e){return bn.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(bn.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],n=0;n>5]|=128<<24-s%32,a[(s+64>>>9<<4)+15]=s;for(var y=0;y>>31}var T=(f<<5|f>>>27)+g+(u[w]>>>0)+(w<20?(l&d|~l&p)+1518500249:w<40?(l^d^p)+1859775393:w<60?(l&d|l&p|d&p)-1894007588:(l^d^p)-899497514);g=p,p=d,d=l<<30|l>>>2,l=f,f=T}f+=m,l+=b,d+=P,p+=k,g+=S}return[f,l,d,p,g]},o=function(i,a){var s=e.wordsToBytes(r(i));return a&&a.asBytes?s:a&&a.asString?n.bytesToString(s):e.bytesToHex(s)};o._blocksize=16,o._digestsize=20,Tr.exports=o})();var wa=Tr.exports;const ba=ga(wa);/*! * Core functionality for Snowplow Browser trackers v4.6.3 (http://bit.ly/sp-js) * Copyright 2022 Snowplow Analytics Ltd, 2010 Anthon Pang * Licensed under BSD-3-Clause */function xa(e){try{var t=window.localStorage,n=t.getItem(e+".expires");if(n===null||+n>Date.now())return t.getItem(e);t.removeItem(e),t.removeItem(e+".expires");return}catch{return}}function Sa(e,t,n){n===void 0&&(n=63072e3);try{var r=window.localStorage,o=Date.now()+n*1e3;return r.setItem("".concat(e,".expires"),o.toString()),r.setItem(e,t),!0}catch{return!1}}function Ar(e){try{var t=window.localStorage;return t.removeItem(e),t.removeItem(e+".expires"),!0}catch{return!1}}function Er(e){try{return window.sessionStorage.getItem(e)}catch{return}}function Ta(e,t){try{return window.sessionStorage.setItem(e,t),!0}catch{return!1}}var Ca={sessionId:!0,sourceId:!0,sourcePlatform:!1,userId:!1,reason:!1};function Pa(e,t,n){var r,o,i=new Date().getTime(),a=oe(oe({},Ca),t),s=n.domainUserId,u=n.userId,f=n.sessionId,l=n.sourceId,d=n.sourcePlatform,p=n.event,g=p.currentTarget,y=typeof a.reason=="function"?a.reason(p):(r=g==null?void 0:g.textContent)===null||r===void 0?void 0:r.trim();return e?o=[s,i,a.sessionId&&f,a.userId&&xn(u||""),a.sourceId&&xn(l||""),a.sourcePlatform&&d,a.reason&&xn(y||"")].map(function(m){return m||""}).join(".").replace(/([.]*$)/,""):o=n.domainUserId+"."+i,o}function xn(e){return btoa(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/\=+$/,"")}function Aa(e){return!!(e&&typeof e.valueOf()=="string")}function kr(e){return Number.isInteger&&Number.isInteger(e)||typeof e=="number"&&isFinite(e)&&Math.floor(e)===e}function Ea(){if(typeof Intl=="object"&&typeof Intl.DateTimeFormat=="function"){var e=new Intl.DateTimeFormat().resolvedOptions();return e.timeZone}}function Or(e){if(!Aa(e)){e=e.text||"";var t=document.getElementsByTagName("title");t&&t[0]!=null&&(e=t[0].text)}return e}function Sn(e){var t=new RegExp("^(?:(?:https?|ftp):)/*(?:[^@]+@)?([^:/#]+)"),n=t.exec(e);return n?n[1]:e}function Ir(e){var t=e.length;return e.charAt(--t)==="."&&(e=e.slice(0,t)),e.slice(0,2)==="*."&&(e=e.slice(1)),e}function Tn(e){var t=window,n=mt("referrer",t.location.href)||mt("referer",t.location.href);if(n)return n;if(e)return e;try{if(t.top)return t.top.document.referrer;if(t.parent)return t.parent.document.referrer}catch{}return document.referrer}function nt(e,t,n,r){if(e.addEventListener)return e.addEventListener(t,n,r),!0;if(e.attachEvent)return e.attachEvent("on"+t,n);e["on"+t]=n}function mt(e,t){var n=new RegExp("^[^#]*[?&]"+e+"=([^&#]*)").exec(t);return n?decodeURIComponent(n[1].replace(/\+/g," ")):null}function ka(e,t,n){var r=t+"="+n,o=e.split("#"),i=o[0].split("?"),a=i.shift(),s=i.join("?");if(!s)s=r;else{for(var u=!0,f=s.split("&"),l=0;l=0;s--){var u=a.slice(s).join(".");if(Le(o,i,0,"/",u,e,t),Le(o)===i){jt(o,"/",u,e,t);for(var f=Ia(r),l=0;l1?document.cookie=e+"="+encodeURIComponent(t??"")+(n?"; Expires="+new Date(+new Date+n*1e3).toUTCString():"")+(r?"; Path="+r:"")+(o?"; Domain="+o:"")+(i?"; SameSite="+i:"")+(a?"; Secure":""):decodeURIComponent((("; "+document.cookie).split("; "+e+"=")[1]||"").split(";")[0])}function Ra(e){var t=e.trackerId,n=e.maxLocalStorageQueueSize,r=n===void 0?1e3:n,o=e.useLocalStorage,i=o===void 0?!0:o,a="snowplowOutQueue_".concat(t);function s(){if(i){var b=window.localStorage.getItem(a),P=b?JSON.parse(b):[];return wn({maxSize:r,events:P})}else return wn({maxSize:r})}var u=s(),f=u.getAll,l=u.getAllPayloads,d=u.add,p=u.count,g=u.iterator,y=u.removeHead;function m(){return i?f().then(function(b){window.localStorage.setItem(a,JSON.stringify(b))}):Promise.resolve()}return{count:p,add:function(b){return d(b),m().then(p)},removeHead:function(b){return y(b),m()},iterator:g,getAll:f,getAllPayloads:l,setUseLocalStorage:function(b){i=b}}}function Da(e,t){var n,r=(n=e.eventStore)!==null&&n!==void 0?n:Ra(e);e.eventStore=r;var o=ma(e);return t.bufferFlushers.push(o.flush),{enqueueRequest:o.input,executeQueue:o.flush,setAnonymousTracking:o.setAnonymousTracking,setCollectorUrl:o.setCollectorUrl,setBufferSize:o.setBufferSize,setUseLocalStorage:function(i){if(r.hasOwnProperty("setUseLocalStorage")){var a=r;a.setUseLocalStorage(i)}}}}function _a(e,t){var n=new RegExp("^(?:https?|ftp)(?::/*(?:[^?]+))([?][^#]+)"),r=n.exec(e);return r&&(r==null?void 0:r.length)>1?mt(t,r[1]):null}function Rr(e,t,n){var r;return e==="translate.googleusercontent.com"?(n===""&&(n=t),t=(r=_a(t,"u"))!==null&&r!==void 0?r:"",e=Sn(t)):(e==="cc.bingj.com"||e==="webcache.googleusercontent.com")&&(t=document.links[0].href,e=Sn(t)),[e,t,n]}var Dr=0,Me=1,Ba=2,ht=3,Cn=4,_r=5,Ue=6,qe=7,We=8,Ye=9,De=10;function La(){var e=["1","",0,0,0,void 0,"","","",void 0,0];return e}function Ma(e,t,n,r){var o=new Date,i=Math.round(o.getTime()/1e3),a;e?(a=e.split("."),a.unshift("0")):a=["1",t,i,r,i,"",n],(!a[Ue]||a[Ue]==="undefined")&&(a[Ue]=Oe()),(!a[qe]||a[qe]==="undefined")&&(a[qe]=""),(!a[We]||a[We]==="undefined")&&(a[We]=""),(!a[Ye]||a[Ye]==="undefined")&&(a[Ye]=""),(!a[De]||a[De]==="undefined")&&(a[De]=0);var s=function(l,d){var p=parseInt(l);return isNaN(p)?d:p},u=function(l){return l?s(l,void 0):void 0},f=[a[Dr],a[Me],s(a[Ba],i),s(a[ht],r),s(a[Cn],i),u(a[_r]),a[Ue],a[qe],a[We],u(a[Ye]),s(a[De],0)];return f}function Ua(e,t){var n;return e[Me]?n=e[Me]:t?(n="",e[Me]=n):(n=Oe(),e[Me]=n),n}function gt(e,t){t===void 0&&(t={memorizedVisitCount:1});var n=t.memorizedVisitCount;kn(e)?(e[qe]=e[Ue],e[_r]=e[Cn],e[ht]++):e[ht]=n;var r=Oe();return e[Ue]=r,e[De]=0,e[We]="",e[Ye]=void 0,r}function Pn(e){e[Cn]=Math.round(new Date().getTime()/1e3)}function Na(e,t){if(e[De]===0){var n=t.build();e[We]=n.eid;var r=n.dtm||n.ttm;e[Ye]=r?parseInt(r):void 0}}function Fa(e){e[De]+=1}function ja(e,t){var n=me([],e,!0);return t&&(n[Me]="",n[qe]=""),n.shift(),n.join(".")}function Br(e,t,n){var r=e[Ye],o={userId:n?"00000000-0000-0000-0000-000000000000":e[Me],sessionId:e[Ue],eventIndex:e[De],sessionIndex:e[ht],previousSessionId:n?null:e[qe]||null,storageMechanism:t=="localStorage"?"LOCAL_STORAGE":"COOKIE_1",firstEventId:e[We]||null,firstEventTimestamp:r?new Date(r).toISOString():null};return o}function An(e){return e[Ue]}function za(e){return e[Me]}function En(e){return e[ht]}function kn(e){return e[Dr]==="0"}function Lr(e){return e[De]}var Ha="iglu:com.snowplowanalytics.snowplow/web_page/jsonschema/1-0-0",Va="iglu:com.snowplowanalytics.snowplow/browser_context/jsonschema/2-0-0",$a="iglu:com.snowplowanalytics.snowplow/client_session/jsonschema/1-0-2",qa="iglu:com.snowplowanalytics.snowplow/application/jsonschema/1-0-0";function Wa(){return"ResizeObserver"in window}var Mr=!1,On=null;function Ya(){if(!Mr&&!(!document||!document.body||!document.documentElement)){Mr=!0;var e=new ResizeObserver(function(){On||(On=requestAnimationFrame(function(){On=null,zt=Rn()}))});e.observe(document.body),e.observe(document.documentElement)}}var zt,yt="x";function In(){return Wa()?(zt||(zt=Rn()),Ya(),zt):Rn()}function Rn(){return{viewport:Dn(Ga()),documentSize:Dn(Xa()),resolution:Dn(Ja()),colorDepth:screen.colorDepth,devicePixelRatio:window.devicePixelRatio,cookiesEnabled:window.navigator.cookieEnabled,online:window.navigator.onLine,browserLanguage:window.navigator.language||window.navigator.userLanguage,documentLanguage:document.documentElement.lang,webdriver:window.navigator.webdriver,deviceMemory:window.navigator.deviceMemory,hardwareConcurrency:window.navigator.hardwareConcurrency}}function Ga(){var e,t;if("innerWidth"in window)e=window.innerWidth,t=window.innerHeight;else{var n=document.documentElement||document.body;e=n.clientWidth,t=n.clientHeight}return Math.max(0,e)+yt+Math.max(0,t)}function Xa(){var e=document.documentElement,t=document.body,n=t?Math.max(t.offsetHeight,t.scrollHeight):0,r=Math.max(e.clientWidth,e.offsetWidth,e.scrollWidth),o=Math.max(e.clientHeight,e.offsetHeight,e.scrollHeight,n);return isNaN(r)||isNaN(o)?"":r+yt+o}function Ja(){return screen.width+yt+screen.height}function Dn(e){return e&&e.split(yt).map(function(t){return Math.floor(Number(t))}).join(yt)}function Qa(e){var t,n,r,o=!0,i=10,a=.05;function s(){var d;return n&&(!r||r>new Date)&&(d=n[0])!==null&&d!==void 0?d:Le(e)}function u(d,p,g,y,m,b){return n=[d,p,g,y,m,b],o=!1,t===void 0&&(t=setTimeout(function(){t=void 0,l()},i)),r=new Date(Date.now()+Math.min(a,p??a)*1e3),!0}function f(d,p,g,y){n=void 0,o=!0,t!==void 0&&(clearTimeout(t),t=void 0),jt(e,d,p,g,y)}function l(){if(t!==void 0&&(clearTimeout(t),t=void 0),!o&&(o=!0,n!==void 0)){var d=n[0],p=n[1],g=n[2],y=n[3],m=n[4],b=n[5];Le(e,d,p,g,y,m,b)}}return{getValue:s,setValue:u,deleteValue:f,flush:l}}function Za(){var e={};function t(s){return e[s]||(e[s]=Qa(s)),e[s]}function n(s){return t(s).getValue()}function r(s,u,f,l,d,p,g){return t(s).setValue(u,f,l,d,p,g)}function o(s,u,f,l,d){t(s).deleteValue(u,f,l,d)}function i(){e={}}function a(){for(var s=0,u=Object.values(e);s=0&&(c=c.slice(0,U)),(U=c.lastIndexOf("/"))!==c.length-1&&(c=c.slice(0,U+1)),c+v)}function Os(c){jr||Zt||ze.enqueueRequest(c.build())}function it(c){return Ht+c+"."+Vr}function tn(c){var v=it(c);if(q=="localStorage")return xa(v);if(q=="cookie"||q=="cookieAndLocalStorage")return te.getCookie(v)}function Gr(){Je(),Vr=ba((Ae||Ne)+(Fe||"/")).slice(0,4)}function St(){var c=new Date;Wt=c.getTime()}function Is(){Rs(),St()}function Xr(){var c=document.documentElement;return c?[c.scrollLeft||window.pageXOffset,c.scrollTop||window.pageYOffset]:[0,0]}function Jr(){var c=Xr(),v=c[0];Yt=v,Gt=v;var x=c[1];Xt=x,Jt=x}function Rs(){var c=Xr(),v=c[0];vGt&&(Gt=v);var x=c[1];xJt&&(Jt=x)}function nn(c){return Math.round(c)}function rn(){var c=it("ses"),v="*";return Qr(c,v,Hr)}function jn(c){var v=it("id"),x=ja(c,ye);return Qr(v,x,zr)}function Qr(c,v,x){return ye&&!Xe?!1:q=="localStorage"?Sa(c,v,x):q=="cookie"||q=="cookieAndLocalStorage"?te.setCookie(c,v,x,Fe,Ae,$t,qt):!1}function Zr(c){var v=it("id"),x=it("ses");Ar(v),Ar(x),te.deleteCookie(v,Fe,Ae,$t,qt),te.deleteCookie(x,Fe,Ae,$t,qt),c!=null&&c.preserveSession||(we=Oe(),Te=1),c!=null&&c.preserveUser||(Qt=ye?"":Oe(),je=null)}function Kr(c){c&&c.stateStorageStrategy&&(m.stateStorageStrategy=c.stateStorageStrategy,q=D(m)),ye=ge(m),Xe=j(m),Ln=Z(m),ze.setUseLocalStorage(q=="localStorage"||q=="cookieAndLocalStorage"),ze.setAnonymousTracking(Ln)}function eo(){if(!(ye&&!Xe)){var c=q!="none"&&!!tn("ses"),v=Tt();Qt=Ua(v,ye),c?we=An(v):we=gt(v),Te=En(v),q!="none"&&(rn(),Pn(v),jn(v),Lr(v)||te.flush())}}function Tt(){if(q=="none")return La();var c=tn("id")||void 0;return Ma(c,Qt,we,Te)}function to(c){return c.indexOf("http")===0?c:(document.location.protocol==="https:"?"https":"http")+"://"+c}function no(){(!Un||y.pageViewId==null)&&(y.pageViewId=Oe(),y.pageViewUrl=re||C)}function Ct(){return Ds()&&(y.pageViewId=Oe(),y.pageViewUrl=re||C),y.pageViewId}function Ds(){if(y.pageViewId==null)return!0;if(Un||!ot)return!1;if(y.pageViewUrl===void 0)return!0;var c=re||C;if(ot===!0||ot=="full"||!("URL"in window))return y.pageViewUrl!=c;var v=new URL(c),x=new URL(y.pageViewUrl);return ot=="pathname"?v.pathname!=x.pathname:ot=="pathnameAndSearch"?v.pathname!=x.pathname||v.search!=x.search:!1}function ro(){if(q==="none"||ye||!de)return null;var c="_sp_tab_id",v=Er(c);return v||(Ta(c,Oe()),v=Er(c)),v||null}function _s(){return{contexts:function(){return[{schema:Ha,data:{id:Ct()}}]}}}function Bs(){return{contexts:function(){return[{schema:Va,data:oe(oe({},In()),{tabId:ro()})}]}}}function Ls(){var c=function(x){return ye?null:x},v=function(x){return Xe?x:c(x)};return{beforeTrack:function(x){var U=tn("ses"),Y=Tt(),He=Lr(Y)===0;if(Bn?Zt=!!te.getCookie(Bn):Zt=!1,jr||Zt){Zr();return}kn(Y)?(!U&&q!="none"?we=gt(Y):we=An(Y),Te=En(Y)):new Date().getTime()-Mn>Hr*1e3&&(Te++,we=gt(Y,{memorizedVisitCount:Te})),Pn(Y),Na(Y,x),Fa(Y);var pe=In(),at=pe.viewport,Pt=pe.documentSize;x.add("vp",at),x.add("ds",Pt),x.add("vid",v(Te)),x.add("sid",v(we)),x.add("duid",c(za(Y))),x.add("uid",c(je)),Je(),x.add("refr",Qe(L||E)),x.add("url",Qe(re||C));var At=Br(Y,q,ye);if(bs&&(!ye||Xe)&&Ms(x,At),q!="none"){jn(Y);var Hn=rn();(!U||He)&&Hn&&Kt&&!Fn&&(te.flush(),Kt(At),Fn=!1)}Mn=new Date().getTime()}}}function Ms(c,v){var x={schema:$a,data:v};c.addContextEntity(x)}function Us(){var c=Tt();if(kn(c)?(q!="none"?we=gt(c):we=An(c),Te=En(c)):(Te++,we=gt(c,{memorizedVisitCount:Te})),Pn(c),q!="none"){var v=Br(c,q,ye);jn(c);var x=rn();te.flush(),x&&Kt&&(Fn=!0,Kt(v))}Mn=new Date().getTime()}function zn(c,v){return(c||[]).concat(v?v():[])}function Ns(c){var v=c.title,x=c.context,U=c.timestamp,Y=c.contextCallback;Je(),Nn&&Nn==Ct()&&no(),Nn=Ct(),G=document.title,v?(X=v,Se=!0):Se&&(X=null);var He=Or(X||G);z.track(aa({pageUrl:Qe(re||C),pageTitle:He,referrer:Qe(L||E)}),zn(x,Y),U);var pe=new Date,at=!1;if(ce.enabled&&!ce.installed){ce.installed=!0,at=!0;var Pt={update:function(){if(typeof window<"u"&&typeof window.addEventListener=="function"){var st=!1,on=Object.defineProperty({},"passive",{get:function(){st=!0},set:function(){}}),so=function(){};window.addEventListener("testPassiveEventSupport",so,on),window.removeEventListener("testPassiveEventSupport",so,on),Pt.hasSupport=st}}};Pt.update();var At="onwheel"in document.createElement("div")?"wheel":document.onmousewheel!==void 0?"mousewheel":"DOMMouseScroll";Object.prototype.hasOwnProperty.call(Pt,"hasSupport")?nt(document,At,St,{passive:!0}):nt(document,At,St),Jr();var Hn=["click","mouseup","mousedown","mousemove","keypress","keydown","keyup","touchend","touchstart"],Hs=["resize","focus","blur"],Vn=function(Vs,st){return st===void 0&&(st=St),function(on){return nt(document,on,st)}};Hn.forEach(Vn(document)),Hs.forEach(Vn(window)),Vn(window,Is)("scroll")}if(ce.enabled&&(ue||at)){Wt=pe.getTime();var ao=void 0;for(ao in ce.configurations){var $n=ce.configurations[ao];$n&&(window.clearInterval($n.activityInterval),Fs($n,x,Y))}}}function Fs(c,v,x){var U=function(pe,at){Je(),pe({context:at,pageViewId:Ct(),minXOffset:Yt,minYOffset:Xt,maxXOffset:Gt,maxYOffset:Jt}),Jr()},Y=function(){var pe=new Date;Wt+c.configMinimumVisitLength>pe.getTime()&&U(c.callback,zn(v,x)),c.activityInterval=window.setInterval(He,c.configHeartBeatTimer)},He=function(){var pe=new Date;Wt+c.configHeartBeatTimer>pe.getTime()&&U(c.callback,zn(v,x))};c.configMinimumVisitLength===0?c.activityInterval=window.setInterval(He,c.configHeartBeatTimer):c.activityInterval=window.setTimeout(Y,c.configMinimumVisitLength)}function oo(c){var v=c.minimumVisitLength,x=c.heartbeatDelay,U=c.callback;if(kr(v)&&kr(x))return{configMinimumVisitLength:v*1e3,configHeartBeatTimer:x*1e3,callback:U};ae.error("Activity tracking minimumVisitLength & heartbeatDelay must be integers")}function js(c){var v=c.context,x=c.minXOffset,U=c.minYOffset,Y=c.maxXOffset,He=c.maxYOffset,pe=document.title;pe!==G&&(G=pe,X=void 0),z.track(sa({pageUrl:Qe(re||C),pageTitle:Or(X||G),referrer:Qe(L||E),minXOffset:nn(x),maxXOffset:nn(Y),minYOffset:nn(U),maxYOffset:nn(He)}),v)}function io(c){var v=ce.configurations[c];(v==null?void 0:v.configMinimumVisitLength)===0?window.clearTimeout(v==null?void 0:v.activityInterval):window.clearInterval(v==null?void 0:v.activityInterval),ce.configurations[c]=void 0}var zs={getDomainSessionIndex:function(){return Te},getPageViewId:Ct,getTabId:ro,newSession:Us,getCookieName:function(c){return it(c)},getUserId:function(){return je},getDomainUserId:function(){return Tt()[1]},getDomainUserInfo:function(){return Tt()},setReferrerUrl:function(c){L=c},setCustomUrl:function(c){Je(),re=ks(C,c)},setDocumentTitle:function(c){G=document.title,X=c,Se=!1},discardHashTag:function(c){xt=c},discardBrace:function(c){rt=c},setCookiePath:function(c){Fe=c,Gr()},setVisitorCookieTimeout:function(c){zr=c},crossDomainLinker:function(c){Wr(c)},enableActivityTracking:function(c){ce.configurations.pagePing||(ce.enabled=!0,ce.configurations.pagePing=oo(oe(oe({},c),{callback:js})))},enableActivityTrackingCallback:function(c){ce.configurations.callback||(ce.enabled=!0,ce.configurations.callback=oo(c))},disableActivityTracking:function(){io("pagePing")},disableActivityTrackingCallback:function(){io("callback")},updatePageActivity:function(){St()},setOptOutCookie:function(c){Bn=c},setUserId:function(c){je=c},setUserIdFromLocation:function(c){Je(),je=mt(c,C)},setUserIdFromReferrer:function(c){Je(),je=mt(c,E)},setUserIdFromCookie:function(c){je=te.getCookie(c)},setCollectorUrl:function(c){ze.setCollectorUrl(to(c))},setBufferSize:function(c){ze.setBufferSize(c)},flushBuffer:function(c){c===void 0&&(c={}),ze.executeQueue(),c.newBufferSize&&ze.setBufferSize(c.newBufferSize)},trackPageView:function(c){c===void 0&&(c={}),Ns(c)},preservePageViewId:function(){Un=!0},preservePageViewIdForUrl:function(c){ot=c},disableAnonymousTracking:function(c){var v=(c==null?void 0:c.stateStorageStrategy)&&c.stateStorageStrategy!==q&&(!ye||Xe)&&tn("ses");m.anonymousTracking=!1,Kr(c),v&&rn(),eo(),ze.executeQueue()},enableAnonymousTracking:function(c){var v;m.anonymousTracking=(v=c&&(c==null?void 0:c.options))!==null&&v!==void 0?v:!0,Kr(c),Xe||no()},clearUserData:Zr};return oe(oe({},zs),{id:l,namespace:d,core:z,sharedState:y})},u=s(e,t,n,r,o,i),f=oe(oe({},u),{addPlugin:function(l){var d,p;f.core.addPlugin(l),(p=(d=l.plugin).activateBrowserPlugin)===null||p===void 0||p.call(d,f)}});return a.forEach(function(l){var d;(d=l.activateBrowserPlugin)===null||d===void 0||d.call(l,f)}),f}var wt={};function ns(e,t){try{os(e??is()).forEach(t)}catch(n){ae.error("Function failed",n)}}function rs(e,t,n,r,o,i){return wt.hasOwnProperty(e)?null:(wt[e]=ts(e,t,n,r,o,i),wt[e])}function os(e){return as(e,wt)}function is(){return Object.keys(wt)}function as(e,t){for(var n=[],r=0,o=e;r{if(!(!e||!(e instanceof HTMLScriptElement)))try{const t=e.src;return new URL(t).origin}catch{return}};function ps({type:e,bg:t},n){const r=new window.Image(...hi[e]);r.alt="powered_by";const o=Ii(t);r.src=`${n}/powered_by/img/${e}${o}.png`;const i=t==="image"?.8:o==="_white"?.6:.4,a=t==="image"?"background-color: rgba(0,0,0,0.4) !important; border-radius: 3px !important; padding:2px 8px !important; box-sizing: content-box !important; vertical-align: bottom !important;":"padding:0 5px !important;box-sizing: content-box !important;";return r.setAttribute("style",`opacity:${i};${a}`),r.setAttribute("onmouseover","this.style['opacity'] = 1"),r.setAttribute("onmouseout",`this.style['opacity'] = ${i}`),r}function vs({href:e,onClick:t}){const n=document.createElement("a");return n.setAttribute("style",xi),n.setAttribute("href",e),n.setAttribute("rel","nofollow"),n.setAttribute("target","_blank"),n.classList.add("pb_link"),n.addEventListener("click",t),n}const ms="na_medium",hs="",gs="na_campaign",ys="100",Nr={AS:"as",TP:"tp"},bt={RU:"ru",EN:"en"};window.TP_POWERED_BY_DATA||(window.TP_POWERED_BY_DATA=ar);class ws{constructor(t){A(this,"options");A(this,"debug");A(this,"index");A(this,"id");A(this,"marker");A(this,"promo_id");A(this,"erid");A(this,"advertiser_name");A(this,"advertiser_inn");A(this,"origin_promo_id");A(this,"user_id");A(this,"utm_medium");A(this,"utm_keyword");A(this,"utm_campaign");A(this,"locale");A(this,"type");A(this,"align");A(this,"wrapperStyles");A(this,"send_metrics");A(this,"node");A(this,"deeplinksConfig");A(this,"shown");A(this,"entrypointPresent");A(this,"wrapper",null);A(this,"bg","image");A(this,"analyticsTracker");const{id:n,debug:r,marker:o,promo_id:i,erid:a,advertiser_name:s,advertiser_inn:u,origin_promo_id:f,user_id:l,utm_medium:d,utm_keyword:p,utm_campaign:g,locale:y,align:m,wrapper_styles:b,send_metrics:P,node:k}=t;this.options=t,this.debug=!!r||cr(),this.index=ar.count++,this.id=n||`powered_by${Ri()}`,vn(this.id,this.index,this.debug,"constructor",t),this.marker=""+o,this.promo_id=i,this.erid=a,this.advertiser_name=s,this.advertiser_inn=u,this.origin_promo_id=f,this.user_id=l,this.utm_medium=d||ms,this.utm_keyword=p||hs,this.utm_campaign=g||n||gs,this.locale=y&&y===bt.RU?bt.RU:bt.EN,this.type=this.locale===bt.RU&&g===ys?Nr.AS:Nr.TP,this.align=m||"right",this.wrapperStyles=b||`display: block; text-align: ${this.align} !important; margin-top:8px !important;`,this.send_metrics=P!==void 0?P:!1,typeof k=="string"?this.node=document.querySelector(k):this.node=k,this.deeplinksConfig=yi,this.shown=cr()||t.show===!0||t.show==="true",this.entrypointPresent=!1,this.analyticsTracker=new fs(this.send_metrics,this.marker,this.options.ab_branch,this.promo_id,this.origin_promo_id,this.user_id);const S=ds(document.currentScript)??"https://tpemb.com";this.init(S)}createWrapper(){const t=document.createElement("div");return t.setAttribute("style",this.wrapperStyles),t.classList.add("tp_powered_by"),t}resolveColorNode(){var t;return this.options.check_parent_color?(t=this.node)==null?void 0:t.parentNode:this.node}updateWrapperDisplay(){if(this.wrapper)if(this.wrapper.children.length>1){const t=this.wrapper.querySelector(".pb_link");t&&(t.style.setProperty("display",this.shown?"inline-block":"none","important"),this.wrapper.style.setProperty("justify-content",this.shown?"flex-end":"flex-start","important"))}else this.wrapper.style.setProperty("display",this.shown?"block":"none","important")}getLink(){return(this.deeplinksConfig[this.id]||this.deeplinksConfig.default)(this.options)}renderBadge(){const t=new Ei({erid:this.erid,advertiserName:this.advertiser_name,advertiserInn:this.advertiser_inn});this.wrapper&&t.render(this.wrapper)}createLinkElement(t){const n=ps({type:this.type,bg:this.bg},t),r=vs({href:this.getLink(),onClick:()=>this.analyticsTracker.sendMetric("lead")});return r.appendChild(n),r}render(t){var r;this.wrapper=this.createWrapper(),this.erid&&this.locale===bt.RU&&this.renderBadge();const n=this.createLinkElement(t);this.wrapper.appendChild(n),(r=this.node)==null||r.appendChild(this.wrapper)}show(t){vn(this.id,this.index,this.debug,"show",this.node),!(!this.node||this.wrapper)&&(this.bg=Oi(this.resolveColorNode()),this.render(t),vn(this.id,this.index,this.debug,"appended",this.node),this.analyticsTracker.sendMetric("init"),this.update({show:this.shown}))}update(t){t.show!==void 0&&(this.shown=t.show===!0||t.show==="true",this.updateWrapperDisplay())}init(t){this.show(t),ki(this.marker,{entrypointPresent:this.entrypointPresent})}}var _n=function(e){new ws(e)};window.TP_POWERED_BY||(window.TP_POWERED_BY={opts:[],cb:_n}),window.TP_POWERED_BY.cb||(window.TP_POWERED_BY.cb=_n),window.TP_POWERED_BY.opts.length&&(window.TP_POWERED_BY.opts.forEach(_n),window.TP_POWERED_BY.opts=[])})();}()