',scrollWrapInner:'
',withScroll:!0};class g extends n.TVDialogAbstract{constructor(t={}){super({...p,...t}),this.$scrollWrap=this.$content.hasClass("js-dialog__scroll-wrap")?this.$content:this.$content.find(".js-dialog__scroll-wrap"),this.$scrollWrap.length?this.$scrollWrapInner=this.$scrollWrap.children().first():(this.$scrollWrap=this.$content.wrap(l(this.options.scrollWrap)).parent(),this.$scrollWrapInner=this.$content.wrap(l(this.options.scrollWrapInner)).parent()),this.$actions&&this.$scrollWrap.addClass("i-with-actions"),this.options.withScroll&&(this.scroll=new r.SidebarCustomScroll(this.$scrollWrap[0],this.$scrollWrapInner[0]),this.scroll.scrolled.subscribe(null,()=>this.trigger("scroll"))),this.$scrollWrap.css("overflow","");const e=this.getDialogId();this.$el.addClass("tv-dialog--popup i-closed i-hidden"),this.options.width&&this.$el.css({width:"calc(100% - 20px)","max-width":this.options.width}),this._hotkeys=a.createGroup({desc:"Dialog",isDisabled:()=>!this.opened,modal:!1}),this.options.closeOnEsc&&this._hotkeys.add({desc:"Close",hotkey:27,handler:()=>this.close()}),this.$el.on("mousedown touchstart",this.toTop.bind(this)),this.options.closeOnOutsideClick&&(this._preventClick=!0,this.on("beforeOpen",()=>{setTimeout(()=>{this.opened&&(l(document).on("mousedown touchstart",()=>{this._preventClick=!1}),l(document).on("click.tv-popup-"+e,t=>{if(this._preventClick)return;const e=l(t.target).closest(".js-dialog");(this.options.closeOnClickAtOtherDialogs||0===e.length)&&this.isEventOut(t)&&this.close()}))},0)}),this.on("beforeClose",()=>l(document).off("click.tv-popup-"+e))),this.on("change:zIndex",()=>{
this.$el.css("z-index",this.zIndex)}),this.on("destroy",()=>{const t=()=>{this.$el.remove(),this._hotkeys.destroy()};this.opened?(this.close(),setTimeout(t,s.dur/2)):t()})}open(){return this.opened||(this.opened=!0,this.trigger("beforeOpen",[this]),this.$el.appendTo(this.$wrap).removeClass("i-hidden").css((()=>{this.calcHeight();const t=c.height(),e=c.width(),i=this.$el.height(),s=this.$el.width();let o=this.options.position;return o||(o={top:t/2-i/2,left:e/2-s/2}),o.top>t-i&&(o.top=t-i),o.left>e-s&&(o.left=e-s),o.top<10&&(o.top=10),o.left<10&&(o.left=10),o})()),this.focus(),this.toTop(),this._doOpenAnimation().then(()=>{this.opened&&(this.$el.removeClass("i-closed"),this.options.draggable&&((0,h.lazyJqueryUI)(this.$el).draggable({handle:".js-dialog__drag",cancel:"input, textarea, button, select, option, .js-dialog__no-drag, .js-dialog__close",containment:"window",cursor:"-webkit-grabbing",stop:(t,e)=>{this.trigger("dragEnd",[this])}}),this.$el.find(".js-dialog__drag").addClass("tv-dialog__grab")),this.trigger("afterOpen",[this]))}),c.on("resize.tv-popup-"+this.getDialogId(),()=>{this.calcHeight(),this.fixPos()})),this}close(){if(this.opened)return this.trigger("beforeClose",[this]),this.$el.addClass("i-closed"),this.opened=!1,this._doCloseAnimation().then(()=>{this.opened||((0,h.lazyJqueryUI)(this.$el).draggable("instance").then(t=>{t&&t.destroy()}),this.$el.addClass("i-hidden").detach(),d.css("cursor","auto"),this.trigger("afterClose",[this]),this.options.destroyOnClose&&this.destroy())}),c.off("resize.tv-popup-"+this.getDialogId()),this}hide(){this.$el.addClass("i-hidden")}show(){this.$el.removeClass("i-hidden")}fixPos(){const t=this.$el[0].getBoundingClientRect(),e={};t.bottom>o.mediaState.height-10&&(e.top=o.mediaState.height-10-t.height,e.top<10&&(e.top=10)),t.right>o.mediaState.width-10&&(e.left=o.mediaState.width-10-t.width,e.left<10&&(e.left=10)),(e.top||e.left)&&this.$el.css(e)}calcHeight(){const t=this.$el[0].getBoundingClientRect(),e=this.$scrollWrapInner[0].getBoundingClientRect(),i=this.$scrollWrap[0].getBoundingClientRect();let s=this.options.height&&this.options.heights)&&(s-=t.height-i.height,s<60&&(s=60),this.$scrollWrap.css({height:s})),this.options.withScroll&&this.scroll.resize();const r=s{i.d(e,{breakpoints:()=>s,mobileFirstBreakpoints:()=>o,mobileFirstLegacyBreakpoints:()=>n});const s={desktop:1/0,desktopHd:1919,phone:767,"phone-vertical":479,tablet:1019},o={base:0,
"media-mf-phone-vertical":320,"media-mf-phone-landscape":568,"media-mf-tablet-vertical":768,"media-mf-tablet-landscape":1024,"media-mf-laptop":1280,"media-mf-desktop-medium":1440,"media-mf-desktop-large":1920,"media-mf-desktop-extra-large":2560},n={"media-mf-legacy-phone-vertical":330,"media-mf-legacy-phone":480,"media-mf-legacy-notebook":1020,"media-mf-legacy-desktop-medium":1480,"media-mf-legacy-desktop":1531}},68722:(t,e,i)=>{i.d(e,{getScrollbarWidth:()=>s,matchMediaMinMax:()=>o,setStyle:()=>n,getCSSProperty:()=>r,getCSSPropertyNumericValue:()=>h});const s=(()=>{let t;return()=>{var e;if(void 0===t){const i=document.createElement("div"),s=i.style;s.visibility="hidden",s.width="100px",s.msOverflowStyle="scrollbar",document.body.appendChild(i);const o=i.offsetWidth;i.style.overflow="scroll";const n=document.createElement("div");n.style.width="100%",i.appendChild(n);const r=n.offsetWidth;null===(e=i.parentNode)||void 0===e||e.removeChild(i),t=o-r}return t}})();function o(t,e){return e===1/0?window.matchMedia(`(min-width: ${t}px)`):window.matchMedia(`(min-width: ${t}px) and (max-width: ${e}px)`)}function n(t,e,i){null!==t&&t.style.setProperty(e,i)}function r(t,e){return getComputedStyle(t,null).getPropertyValue(e)}function h(t,e){return parseInt(r(t,e))}},52150:(t,e,i)=>{i.d(e,{mediaState:()=>l});var s=i(85459),o=i.n(s),n=i(69677),r=i(74664),h=i(68722);class a extends(o()){constructor(){super(),this.width=0,this.height=0,this.device=null,this.breakpoints=r.breakpoints,this._checkDevice(),window.addEventListener("resize",this._checkDevice),Object.entries(r.breakpoints).sort(([t,e],[i,s])=>e-s).forEach(([t,e],i,s)=>{let o;if(0!==i){const[,t]=s[i-1];o=t+1}else o=0;const n=(0,h.matchMediaMinMax)(o,e);n.matches&&this._setNewDevice(t),n.addListener(e=>{e.matches&&(this._checkDevice(),this._setNewDevice(t))})}),(0,n.whenDocumentReady)(this._checkDevice.bind(this)),this.isPhoneSizeDevice.bind(this)}isPhoneSizeDevice(){return"phone"===this.device||"phone-vertical"===this.device}_checkDevice(){this.width=window.innerWidth,this.height=window.innerHeight}_setNewDevice(t){const e=this.device;this.device=t,this.trigger("changeDevice",[t,e])}}const l=new a},43989:(t,e,i)=>{i.d(e,{setFixedBodyState:()=>r});var s=i(68722);let o=0,n=!1;function r(t){const{body:e}=document,i=e.querySelector(".widgetbar-wrap");if(t&&1==++o){const t=(0,s.getCSSProperty)(e,"overflow"),o=(0,s.getCSSPropertyNumericValue)(e,"padding-right");"hidden"!==t.toLowerCase()&&e.scrollHeight>e.offsetHeight&&((0,s.setStyle)(i,"right",(0,s.getScrollbarWidth)()+"px"),e.style.paddingRight=o+(0,s.getScrollbarWidth)()+"px",n=!0),e.classList.add("i-no-scroll")}else if(!t&&o>0&&0==--o&&(e.classList.remove("i-no-scroll"),n)){(0,s.setStyle)(i,"right","0px");let t=0;0,e.scrollHeight<=e.clientHeight&&(t-=(0,s.getScrollbarWidth)()),e.style.paddingRight=(t<0?0:t)+"px",n=!1}}},88216:(t,e,i)=>{i.d(e,{OverlapManager:()=>n,getRootOverlapManager:()=>h});var s=i(88537);class o{constructor(){this._storage=[]}add(t){this._storage.push(t)}remove(t){
this._storage=this._storage.filter(e=>t!==e)}has(t){return this._storage.includes(t)}getItems(){return this._storage}}class n{constructor(t=document){this._storage=new o,this._windows=new Map,this._index=0,this._document=t,this._container=t.createDocumentFragment()}setContainer(t){const e=this._container,i=null===t?this._document.createDocumentFragment():t;!function(t,e){Array.from(t.childNodes).forEach(t=>{t.nodeType===Node.ELEMENT_NODE&&e.appendChild(t)})}(e,i),this._container=i}registerWindow(t){this._storage.has(t)||this._storage.add(t)}ensureWindow(t,e={position:"fixed",direction:"normal"}){const i=this._windows.get(t);if(void 0!==i)return i;this.registerWindow(t);const s=this._document.createElement("div");if(s.style.position=e.position,s.style.zIndex=this._index.toString(),s.dataset.id=t,void 0!==e.index){const t=this._container.childNodes.length;if(e.index>=t)this._container.appendChild(s);else if(e.index<=0)this._container.insertBefore(s,this._container.firstChild);else{const t=this._container.childNodes[e.index];this._container.insertBefore(s,t)}}else"reverse"===e.direction?this._container.insertBefore(s,this._container.firstChild):this._container.appendChild(s);return this._windows.set(t,s),++this._index,s}unregisterWindow(t){this._storage.remove(t);const e=this._windows.get(t);void 0!==e&&(null!==e.parentElement&&e.parentElement.removeChild(e),this._windows.delete(t))}getZindex(t){const e=this.ensureWindow(t);return parseInt(e.style.zIndex||"0")}moveToTop(t){if(this.getZindex(t)!==this._index){this.ensureWindow(t).style.zIndex=(++this._index).toString()}}removeWindow(t){this.unregisterWindow(t)}}const r=new WeakMap;function h(t=document){const e=t.getElementById("overlap-manager-root");if(null!==e)return(0,s.ensureDefined)(r.get(e));{const e=new n(t),i=function(t){const e=t.createElement("div");return e.style.position="absolute",e.style.zIndex=150..toString(),e.style.top="0px",e.style.left="0px",e.id="overlap-manager-root",e}(t);return r.set(i,e),e.setContainer(i),t.body.appendChild(i),e}}}}]);