PageSourceSearch

https://www.makalius.lt/wp-content/plugins/bwp-minify/min/?f=wp-co…/js/scripts.js&ver=1790370528

js makalius.lt collected 2026-09-26 03:18:21 UTC 172,874 bytes, 479 lines download raw bytes

1jQuery(document).ready(function(){function saveGoogleClickId()
2{saveToCookie('tg',getParamFromUrl('gclid'));saveToCookie('td',getParamFromUrl('dclid'));}
3function saveToCookie(key,value)
4{if(!value||0===value.length){return false;}
5jQuery.cookie(key,value,{path:'/'});return true;}
6function getParamFromUrl(name)
7{return decodeURIComponent((new RegExp('[?|&]'+name+'='+'([^&;]+?)(&|#|;|$)').exec(location.search)||[null,''])[1].replace(/\+/g,'%20'))||null;}
8function runWhenMarketingAllowed()
9{saveGoogleClickId();}
10window.addEventListener('CookieScriptAcceptAll',runWhenMarketingAllowed);window.addEventListener('CookieScriptCategory-targeting',runWhenMarketingAllowed);window.addEventListener('CookieScriptAccept',function(e){var categories=(e&&e.detail&&e.detail.categories)?e.detail.categories:[];if(categories.indexOf('targeting')!==-1){runWhenMarketingAllowed();}});});;jQuery(document).ready(function(){let numberOfMonths=2;if(jQuery(window).width()<700){numberOfMonths=1;}
11jQuery('#calendar-booking').datepicker({numberOfMonths:numberOfMonths,dateFormat:'yy-mm-dd',dayNames:['Sekmadienis','Pirmadienis','Antradienis','Trečiadienis','Ketvirtadienis','Penktadienis','Šeštadienis'],dayNamesMin:['Sk','Pr','An','Tr','Kt','Pn','Št'],monthNames:['Sausis','Vasaris','Kovas','Balandis','Gegužė','Birželis','Liepa','Rugpjūtis','Rugsėjis','Spalis','Lapkritis','Gruodis'],firstDay:1,defaultDate:null,beforeShowDay:function(date){return[availableDays.indexOf(jQuery.datepicker.formatDate('yy-mm-dd',date))!=-1];},onSelect:function(date){let dateFrom=new Date(date);let dateTo=new Date(date);dateTo.setDate(dateTo.getDate()+parseInt(numberOfNights));let months=['sausio','vasario','kovo','balandžio','gegužės','birželio','liepos','rugpjūčio','rugsėjo','spalio','lapkričio','gruodžio'];jQuery('input[name=check_in_date]').val(date);jQuery('#calendar-booking-from span').text(dateFrom.getFullYear()+' '+months[dateFrom.getMonth()]+' '+dateFrom.getDate()+' d.');jQuery('#calendar-booking-to span').text(dateTo.getFullYear()+' '+months[dateTo.getMonth()]+' '+dateTo.getDate()+' d.');jQuery('.booking-calendar-arrival').show();},}).find('a.ui-state-active').removeClass('ui-state-active');jQuery('#is_arrival_date').change(function(){if(jQuery(this).prop('checked')){jQuery('#calendar-box').hide();}else{jQuery('#calendar-box').show();}});});;jQuery(document).ready(function(){jQuery('#browsing-history-open').on('click',function(event){openModal();});jQuery('body').on('click','#browsing-history-modal .modal-box-close',function(){closeModal();});jQuery('#browsing-history-delete').on('click',function(e){deleteHistory();});jQuery('#browsing-history-ignore').on('click',function(e){ignoreHistory();});jQuery('body').on('click','#browsing-history-send',function(){send();});jQuery('#browsing-history-modal .info-text strong').on('click',function(e){closeModal();jQuery('.main-line .open-ask-us').click();});function openModal()
12{jQuery('#browsing-history-modal').show();jQuery('#modal-bg').show();jQuery('.client-info:checkbox').change();jQuery('#browsing-history-ignore').change();ga('send','event','browsing history','open');}
13function closeModal()
14{jQuery('#browsing-history-modal').hide();jQuery('#modal-bg').hide();}
15function deleteHistory()
16{lockButton('#browsing-history-delete','Kraunais...');swal({title:'',text:'Ar tikrai norite ištrinti?',type:'warning',showCancelButton:true,cancelButtonColor:'#838186',cancelButtonText:'Ne, atšaukti',confirmButtonColor:'#e77366',confirmButtonText:'Taip, ištrinti'},function(){jQuery.post(ajaxurl,{action:'makalius-browsing-history-delete'},function(response){setEmptyPostListStatus();unlockButton('#browsing-history-delete','Ištrinti peržiūras');jQuery(window).scrollTop(0);displayResponseMessage('Apsilankymų istorija ištrinta');ga('send','event','browsing history','delete');});});unlockButton('#browsing-history-delete','Ištrinti peržiūras');}
17function setEmptyPostListStatus()
18{jQuery('#browsing-history-modal #browsing-history-empty').show();jQuery('#browsing-history-modal .offers-list').remove();jQuery('#browsing-history-modal .email-action-block').remove();jQuery('#browsing-history-modal #browsing-history-delete').remove();updateTotalView(0);}
19function ignoreHistory()
20{swal({title:'',text:'Ar tikrai norite pakeisti statusą?',type:'warning',showCancelButton:true,cancelButtonColor:'#838186',cancelButtonText:'Ne, atšaukti',confirmButtonColor:'#41c0f0',confirmButtonText:'Taip, pakeisti'},function(dismiss){var ignore=jQuery('#browsing-history-ignore').prop('checked')?1:0;if(dismiss){jQuery.post(ajaxurl,{ignore:ignore,action:'makalius-browsing-history-ignore'},function(response){if(ignore){setEmptyPostListStatus();ga('send','event','browsing history','ignore');}
21jQuery(window).scrollTop(0);displayResponseMessage('Apsilankymų statusas sėkmingai pakeistas');});}else{jQuery('#browsing-history-ignore').prop('checked',!ignore);jQuery('#browsing-history-ignore').change();}});}
22function send()
23{lockButton('#browsing-history-send','Kraunais...');var name=jQuery('#browsing-history-name').val();var email=jQuery('#browsing-history-email').val();var emailReply=jQuery('#browsing-history-email-reply').val();var intro=jQuery('#browsing-history-intro-text').val();var posts=[];var errors=[];jQuery('.browsing-history-post:checkbox:checked').each(function(){posts.push(jQuery(this).val());});if(!name){errors.push('<li>Tavo vardas</li>');}
24if(!isValidEMail(emailReply)){errors.push('<li>Tavo el. paštas</li>');}
25if(!isValidEMail(email)){errors.push('<li>Gavėjo el. paštas</li>');}
26if(posts.length===0){errors.push('<li>Nepasirinkti pasilūlymai</li>');}
27if(!intro){errors.push('<li>
27Pristatymo tekstas</li>');}
28if(errors.length!==0){swal({title:'Klaida!',text:'Prašome patikrinti formos laukelius:<div class="alert-error-list">'+errors.join('')+'</div>',type:'error',html:true,confirmButtonColor:'#41c0f0',confirmButtonText:'SUPRATAU'});unlockButton('#browsing-history-send','Išsiųsti');return false;}
29jQuery.post(ajaxurl,{name:name,email:email,emailReply:emailReply,intro:intro,posts:posts,action:'makalius-browsing-history-send'},function(response){displayResponseMessage('Laiškas sėkmingai išsiųstas');unlockButton('#browsing-history-send','Išsiųsti');ga('send','event','browsing history','send');});return true;}
30function updateTotalView(total)
31{jQuery('#browsing-history-open').text(total);}
32function displayResponseMessage(message)
33{jQuery('#browsing-history-ignore-response .success-message-box').text(message);jQuery('#browsing-history-ignore-response').show().delay(4000).hide(0);}});;const contactToggle=document.getElementById('contactToggle');const contactPanel=document.getElementById('contactPanel');const contactTriggerText=document.getElementById('contactTriggerText');function updateCrispChatButton(isOpen){const crispChatButton=document.getElementById('open-crisp-chat');if(!crispChatButton){return;}
34if(!isOpen||!window.$crisp){crispChatButton.style.display='none';return;}
35try{if($crisp.is('website:available')){crispChatButton.style.display='flex';return;}}catch(e){}
36crispChatButton.style.display='none';}
37function ensureCrispLoaded(onReady){if(!window.makaliusCrisp){return;}
38window.makaliusCrisp.requestOpen(function(){if(typeof onReady==='function'){onReady();}});}
39if(contactToggle&&contactPanel&&contactTriggerText){function setContactState(isOpen){contactPanel.classList.toggle('is-open',isOpen);contactToggle.classList.toggle('is-open',isOpen);contactToggle.setAttribute('aria-expanded',isOpen?'true':'false');contactTriggerText.textContent=isOpen?'Uždaryti':'Susisiek';if(isOpen){ensureCrispLoaded(function(){if(contactPanel.classList.contains('is-open')){updateCrispChatButton(true);}});}else if(window.$crisp){$crisp.push(['do','chat:close']);updateCrispChatButton(false);}else{updateCrispChatButton(false);}
40if(!isOpen){document.getElementById('contact-sticky-agent-online').style.display='none';}else{const workHoursEl=document.getElementById('var-is-work-hours');if(workHoursEl&&workHoursEl.textContent=='1'){document.getElementById('contact-sticky-agent-online').style.display='flex';}}}
41contactToggle.addEventListener('click',()=>{const isOpen=!contactPanel.classList.contains('is-open');setContactState(isOpen);});document.addEventListener('keydown',(e)=>{if(e.key==='Escape'){setContactState(false);}});}
42jQuery(document).ready(function(){jQuery('#open-crisp-chat').on('click',function(e){e.preventDefault();ensureCrispLoaded(function(){if(!window.$crisp){return;}
43$crisp.push(['do','chat:show']);$crisp.push(['do','chat:open']);});return false;});});;jQuery(document).ready(function(){jQuery(document).on('change','#ci-children',function(e){var childrenQty=jQuery('#ci-children').val();var ageList=jQuery('#ci-children-age').html();ageList=ageList.replace('children_age_DEFAULT_SELECT','children_age');jQuery('#ci-children-age-list').empty();if(childrenQty==0){return true;}
44for(var i=1;i<=childrenQty;i++){jQuery('#ci-children-age-list').append(ageList);}
45jQuery('#ci-children-age-list select').selectric('refresh');jQuery('#ci-children-age-list select').selectric({disableOnMobile:false,nativeOnMobile:false});});jQuery('input[name="action_inquiries_xls"]').click(function(){let page='ClientInquiriesToXls';if(jQuery('input[name="type"]').val()=='ask_us'){page='AskUsToXls';}
46window.location.href='/wp-content/plugins/makalius-customer-inquiry/controller/'+page+'.php?'+jQuery('form').serialize();return false;});});;eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('h.i[\'1a\']=h.i[\'z\'];h.O(h.i,{y:\'D\',z:9(x,t,b,c,d){6 h.i[h.i.y](x,t,b,c,d)},17:9(x,t,b,c,d){6 c*(t/=d)*t+b},D:9(x,t,b,c,d){6-c*(t/=d)*(t-2)+b},13:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t+b;6-c/2*((--t)*(t-2)-1)+b},X:9(x,t,b,c,d){6 c*(t/=d)*t*t+b},U:9(x,t,b,c,d){6 c*((t=t/d-1)*t*t+1)+b},R:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t+b;6 c/2*((t-=2)*t*t+2)+b},N:9(x,t,b,c,d){6 c*(t/=d)*t*t*t+b},M:9(x,t,b,c,d){6-c*((t=t/d-1)*t*t*t-1)+b},L:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t*t+b;6-c/2*((t-=2)*t*t*t-2)+b},K:9(x,t,b,c,d){6 c*(t/=d)*t*t*t*t+b},J:9(x,t,b,c,d){6 c*((t=t/d-1)*t*t*t*t+1)+b},I:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t*t*t+b;6 c/2*((t-=2)*t*t*t*t+2)+b},G:9(x,t,b,c,d){6-c*8.C(t/d*(8.g/2))+c+b}
46,15:9(x,t,b,c,d){6 c*8.n(t/d*(8.g/2))+b},12:9(x,t,b,c,d){6-c/2*(8.C(8.g*t/d)-1)+b},Z:9(x,t,b,c,d){6(t==0)?b:c*8.j(2,10*(t/d-1))+b},Y:9(x,t,b,c,d){6(t==d)?b+c:c*(-8.j(2,-10*t/d)+1)+b},W:9(x,t,b,c,d){e(t==0)6 b;e(t==d)6 b+c;e((t/=d/2)<1)6 c/2*8.j(2,10*(t-1))+b;6 c/2*(-8.j(2,-10*--t)+2)+b},V:9(x,t,b,c,d){6-c*(8.o(1-(t/=d)*t)-1)+b},S:9(x,t,b,c,d){6 c*8.o(1-(t=t/d-1)*t)+b},Q:9(x,t,b,c,d){e((t/=d/2)<1)6-c/2*(8.o(1-t*t)-1)+b;6 c/2*(8.o(1-(t-=2)*t)+1)+b},P:9(x,t,b,c,d){f s=1.l;f p=0;f a=c;e(t==0)6 b;e((t/=d)==1)6 b+c;e(!p)p=d*.3;e(a<8.w(c)){a=c;f s=p/4}m f s=p/(2*8.g)*8.r(c/a);6-(a*8.j(2,10*(t-=1))*8.n((t*d-s)*(2*8.g)/p))+b},H:9(x,t,b,c,d){f s=1.l;f p=0;f a=c;e(t==0)6 b;e((t/=d)==1)6 b+c;e(!p)p=d*.3;e(a<8.w(c)){a=c;f s=p/4}m f s=p/(2*8.g)*8.r(c/a);6 a*8.j(2,-10*t)*8.n((t*d-s)*(2*8.g)/p)+c+b},T:9(x,t,b,c,d){f s=1.l;f p=0;f a=c;e(t==0)6 b;e((t/=d/2)==2)6 b+c;e(!p)p=d*(.3*1.5);e(a<8.w(c)){a=c;f s=p/4}m f s=p/(2*8.g)*8.r(c/a);e(t<1)6-.5*(a*8.j(2,10*(t-=1))*8.n((t*d-s)*(2*8.g)/p))+b;6 a*8.j(2,-10*(t-=1))*8.n((t*d-s)*(2*8.g)/p)*.5+c+b},F:9(x,t,b,c,d,s){e(s==u)s=1.l;6 c*(t/=d)*t*((s+1)*t-s)+b},E:9(x,t,b,c,d,s){e(s==u)s=1.l;6 c*((t=t/d-1)*t*((s+1)*t+s)+1)+b},16:9(x,t,b,c,d,s){e(s==u)s=1.l;e((t/=d/2)<1)6 c/2*(t*t*(((s*=(1.B))+1)*t-s))+b;6 c/2*((t-=2)*t*(((s*=(1.B))+1)*t+s)+2)+b},A:9(x,t,b,c,d){6 c-h.i.v(x,d-t,0,c,d)+b},v:9(x,t,b,c,d){e((t/=d)<(1/2.k)){6 c*(7.q*t*t)+b}m e(t<(2/2.k)){6 c*(7.q*(t-=(1.5/2.k))*t+.k)+b}m e(t<(2.5/2.k)){6 c*(7.q*(t-=(2.14/2.k))*t+.11)+b}m{6 c*(7.q*(t-=(2.18/2.k))*t+.19)+b}},1b:9(x,t,b,c,d){e(t<d/2)6 h.i.A(x,t*2,0,c,d)*.5+b;6 h.i.v(x,t*2-d,0,c,d)*.5+c*.5+b}});',62,74,'||||||return||Math|function|||||if|var|PI|jQuery|easing|pow|75|70158|else|sin|sqrt||5625|asin|||undefined|easeOutBounce|abs||def|swing|easeInBounce|525|cos|easeOutQuad|easeOutBack|easeInBack|easeInSine|easeOutElastic|easeInOutQuint|easeOutQuint|easeInQuint|easeInOutQuart|easeOutQuart|easeInQuart|extend|easeInElastic|easeInOutCirc|easeInOutCubic|easeOutCirc|easeInOutElastic|easeOutCubic|easeInCirc|easeInOutExpo|easeInCubic|easeOutExpo|easeInExpo||9375|easeInOutSine|easeInOutQuad|25|easeOutSine|easeInOutBack|easeInQuad|625|984375|jswing|easeInOutBounce'.split('|'),0,{}));;(function($){var tmp,loading,overlay,wrap,outer,content,close,title,nav_left,nav_right,selectedIndex=0,selectedOpts={},selectedArray=[],currentIndex=0,currentOpts={},currentArray=[],ajaxLoader=null,imgPreloader=new Image(),imgRegExp=/\.(jpg|gif|png|bmp|jpeg)(.*)?$/i,swfRegExp=/[^\.]\.(swf)\s*$/i,loadingTimer,loadingFrame=1,titleHeight=0,titleStr='',start_pos,final_pos,busy=false,fx=$.extend($('<div/>')[0],{prop:0}),isIE6=false,_abort=function(){loading.hide();imgPreloader.onerror=imgPreloader.onload=null;if(ajaxLoader){ajaxLoader.abort();}
47tmp.empty();},_error=function(){if(false===selectedOpts.onError(selectedArray,selectedIndex,selectedOpts)){loading.hide();busy=false;return;}
48selectedOpts.titleShow=false;selectedOpts.width='auto';selectedOpts.height='auto';tmp.html('<p id="fancybox-error">The requested content cannot be loaded.<br />Please try again later.</p>');_process_inline();},_start=function(){var obj=selectedArray[selectedIndex],href,type,title,str,emb,ret;_abort();selectedOpts=$.extend({},$.fn.fancybox.defaults,(typeof $(obj).data('fancybox')=='undefined'?selectedOpts:$(obj).data('fancybox')));ret=selectedOpts.onStart(selectedArray,selectedIndex,selectedOpts);if(ret===false){busy=false;return;}else if(typeof ret=='object'){selectedOpts=$.extend(selectedOpts,ret);}
49title=selectedOpts.title||(obj.nodeName?$(obj).attr('title'):obj.title)||'';if(obj.nodeName&&!selectedOpts.orig){selectedOpts.orig=$(obj).children("img:first").length?$(obj).children("img:first"):$(obj);}
50if(title===''&&selectedOpts.orig&&selectedOpts.titleFromAlt){title=selectedOpts.orig.attr('alt');}
51href=selectedOpts.href||(obj.nodeName?$(obj).attr('href'):obj.href)||null;if((/^(?:javascript)/i).test(href)||href=='#'){href=null;}
52if(selectedOpts.type){type=selectedOpts.type;if(!href){href=selectedOpts.content;}}else if(selectedOpts.content){type='html';}else if(href){if(href.match(imgRegExp)){type='image';}else if(href.match(swfRegExp)){type='swf';}else if($(obj).hasClass("iframe")){type='iframe';}else if(href.indexOf("#")===0){type='inline';}else{type='ajax';}}
53if(!type){_error();return;}
54if(type=='inline'){obj=href.substr(href.indexOf("#"));type=$(obj).length>0?'inline':'ajax';}
55selectedOpts.type=type;selectedOpts.href=href;selectedOpts.title=title;if(selectedOpts.autoDimensions){if(selectedOpts.type=='html'||selectedOpts.type=='inline'||selectedOpts.type=='ajax'){selectedOpts.width='auto';selectedOpts.height='auto';}else{selectedOpts.autoDimensions=false;}}
56if(selectedOpts.modal){selectedOpts.overlayShow=true;selectedOpts.hideOnOverlayClick=false;selectedOpts.hideOnContentClick=false;selectedOpts.enableEscapeButton=false;selectedOpts.showCloseButton=false;}
57selectedOpts.padding=parseInt(selectedOpts.padding,10);selectedOpts.margin=parseInt(selectedOpts.margin,10);tmp.css('padding',(selectedOpts.padding+selectedOpts.margin));$('.fancybox-inline-tmp').unbind('fancybox-cancel').bind('fancybox-change',function(){$(this).replaceWith(content.children());});switch(type){case'html':tmp.html(selectedOpts.content);_process_inline();break;case'inline':if($(obj).parent().is('#fancybox-content')===true){busy=false;return;}
58$('<div class="fancybox-inline-tmp" />').hide().insertBefore($(obj)).bind('fancybox-cleanup',function(){$(this).replaceWith(content.children());}).bind('fancybox-cancel',function(){$(this).replaceWith(tmp.children());});$(obj).appendTo(tmp);_process_inline();break;case'image':busy=false;$.fancybox.showActivity();imgPreloader=new Image();imgPreloader.onerror=function(){_error();};imgPreloader.onload=function(){busy=true;imgPreloader.onerror=imgPreloader.onload=null;_process_image();};imgPreloader.src=href;break;case'swf':selectedOpts.scrolling='no';str='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+selectedOpts.width+'" height="'+selectedOpts.height+'"><param name="movie" value="'+href+'"></param>';emb='';$.each(selectedOpts.swf,function(name,val){str+='<param name="'+name+'" value="'+val+'"></param>';emb+=' '+name+'="'+val+'"';});str+='<embed src="'+href+'" type="application/x-shockwave-flash" width="'+selectedOpts.width+'" height="'+selectedOpts.height+'"'+emb+'></embed></object>';tmp.html(str);_process_inline();break;case'ajax':busy=false;$.fancybox.showActivity();selectedOpts.ajax.win=selectedOpts.ajax.success;ajaxLoader=$.ajax($.extend({},selectedOpts.ajax,{url:href,data:selectedOpts.ajax.data||{},error:function(XMLHttpRequest,textStatus,errorThrown){if(XMLHttpRequest.status>0){_error();}},success:function(data,textStatus,XMLHttpRequest){var o=typeof XMLHttpRequest=='object'?XMLHttpRequest:ajaxLoader;
58if(o.status==200){if(typeof selectedOpts.ajax.win=='function'){ret=selectedOpts.ajax.win(href,data,textStatus,XMLHttpRequest);if(ret===false){loading.hide();return;}else if(typeof ret=='string'||typeof ret=='object'){data=ret;}}
59tmp.html(data);_process_inline();}}}));break;case'iframe':_show();break;}},_process_inline=function(){var
60w=selectedOpts.width,h=selectedOpts.height;if(w.toString().indexOf('%')>-1){w=parseInt(($(window).width()-(selectedOpts.margin*2))*parseFloat(w)/100,10)+'px';}else{w=w=='auto'?'auto':w+'px';}
61if(h.toString().indexOf('%')>-1){h=parseInt(($(window).height()-(selectedOpts.margin*2))*parseFloat(h)/100,10)+'px';}else{h=h=='auto'?'auto':h+'px';}
62tmp.wrapInner('<div style="width:'+w+';height:'+h+';overflow: '+(selectedOpts.scrolling=='auto'?'auto':(selectedOpts.scrolling=='yes'?'scroll':'hidden'))+';position:relative;"></div>');selectedOpts.width=tmp.width();selectedOpts.height=tmp.height();_show();},_process_image=function(){selectedOpts.width=imgPreloader.width;selectedOpts.height=imgPreloader.height;$("<img />").attr({'id':'fancybox-img','src':imgPreloader.src,'alt':selectedOpts.title}).appendTo(tmp);_show();},_show=function(){var pos,equal;loading.hide();if(wrap.is(":visible")&&false===currentOpts.onCleanup(currentArray,currentIndex,currentOpts)){$.event.trigger('fancybox-cancel');busy=false;return;}
63busy=true;$(content.add(overlay)).unbind();$(window).unbind("resize.fb scroll.fb");$(document).unbind('keydown.fb');if(wrap.is(":visible")&&currentOpts.titlePosition!=='outside'){wrap.css('height',wrap.height());}
64currentArray=selectedArray;currentIndex=selectedIndex;currentOpts=selectedOpts;if(currentOpts.overlayShow){overlay.css({'background-color':currentOpts.overlayColor,'opacity':currentOpts.overlayOpacity,'cursor':currentOpts.hideOnOverlayClick?'pointer':'auto','height':$(document).height()});if(!overlay.is(':visible')){if(isIE6){$('select:not(#fancybox-tmp select)').filter(function(){return this.style.visibility!=='hidden';}).css({'visibility':'hidden'}).one('fancybox-cleanup',function(){this.style.visibility='inherit';});}
65overlay.show();}}else{overlay.hide();}
66final_pos=_get_zoom_to();_process_title();if(wrap.is(":visible")){$(close.add(nav_left).add(nav_right)).hide();pos=wrap.position(),start_pos={top:pos.top,left:pos.left,width:wrap.width(),height:wrap.height()};equal=(start_pos.width==final_pos.width&&start_pos.height==final_pos.height);content.fadeTo(currentOpts.changeFade,0.3,function(){var finish_resizing=function(){content.html(tmp.contents()).fadeTo(currentOpts.changeFade,1,_finish);};$.event.trigger('fancybox-change');content.empty().removeAttr('filter').css({'border-width':currentOpts.padding,'width':final_pos.width-currentOpts.padding*2,'height':selectedOpts.autoDimensions?'auto':final_pos.height-titleHeight-currentOpts.padding*2});if(equal){finish_resizing();}else{fx.prop=0;$(fx).animate({prop:1},{duration:currentOpts.changeSpeed,easing:currentOpts.easingChange,step:_draw,complete:finish_resizing});}});return;}
67wrap.removeAttr("style");content.css('border-width',currentOpts.padding);if(currentOpts.transitionIn=='elastic'){start_pos=_get_zoom_from();content.html(tmp.contents());wrap.show();if(currentOpts.opacity){final_pos.opacity=0;}
68fx.prop=0;$(fx).animate({prop:1},{duration:currentOpts.speedIn,easing:currentOpts.easingIn,step:_draw,complete:_finish});return;}
69if(currentOpts.titlePosition=='inside'&&titleHeight>0){title.show();}
70content.css({'width':final_pos.width-currentOpts.padding*2,'height':selectedOpts.autoDimensions?'auto':final_pos.height-titleHeight-currentOpts.padding*2}).html(tmp.contents());wrap.css(final_pos).fadeIn(currentOpts.transitionIn=='none'?0:currentOpts.speedIn,_finish);},_format_title=function(title){if(title&&title.length){if(currentOpts.titlePosition=='float'){return'<table id="fancybox-title-float-wrap" cellpadding="0" cellspacing="0"><tr><td id="fancybox-title-float-left"></td><td id="fancybox-title-float-main">'+title+'</td><td id="fancybox-title-float-right"></td></tr></table>';}
71return'<div id="fancybox-title-'+currentOpts.titlePosition+'">'+title+'</div>';}
72return false;},_process_title=function(){titleStr=currentOpts.title||'';titleHeight=0;title.empty().removeAttr('style').removeClass();if(currentOpts.titleShow===false){title.hide();return;}
73titleStr=$.isFunction(currentOpts.titleFormat)?currentOpts.titleFormat(titleStr,currentArray,currentIndex,currentOpts):_format_title(titleStr);if(!titleStr||titleStr===''){title.hide();return;}
74title.addClass('fancybox-title-'+currentOpts.titlePosition).html(titleStr).appendTo('body').show();switch(currentOpts.titlePosition){case'inside':title.css({'width':final_pos.width-(currentOpts.padding*2),'marginLeft':currentOpts.padding,'marginRight':currentOpts.padding});titleHeight=title.outerHeight(true);title.appendTo(outer);final_pos.height+=titleHeight;break;case'over':title.css({'marginLeft':currentOpts.padding,'width':final_pos.width-(currentOpts.padding*2),'bottom':currentOpts.padding}).appendTo(outer);break;case'float':title.css('left',parseInt((title.width()-final_pos.width-40)/2,10)*-1).appendTo(wrap
74);break;default:title.css({'width':final_pos.width-(currentOpts.padding*2),'paddingLeft':currentOpts.padding,'paddingRight':currentOpts.padding}).appendTo(wrap);break;}
75title.hide();},_set_navigation=function(){if(currentOpts.enableEscapeButton||currentOpts.enableKeyboardNav){$(document).bind('keydown.fb',function(e){if(e.keyCode==27&&currentOpts.enableEscapeButton){e.preventDefault();$.fancybox.close();}else if((e.keyCode==37||e.keyCode==39)&&currentOpts.enableKeyboardNav&&e.target.tagName!=='INPUT'&&e.target.tagName!=='TEXTAREA'&&e.target.tagName!=='SELECT'){e.preventDefault();$.fancybox[e.keyCode==37?'prev':'next']();}});}
76if(!currentOpts.showNavArrows){nav_left.hide();nav_right.hide();return;}
77if((currentOpts.cyclic&&currentArray.length>1)||currentIndex!==0){nav_left.show();}
78if((currentOpts.cyclic&&currentArray.length>1)||currentIndex!=(currentArray.length-1)){nav_right.show();}},_finish=function(){if(!$.support.opacity){}
79if(selectedOpts.autoDimensions){content.css('height','auto');}
80wrap.css('height','auto');if(titleStr&&titleStr.length){title.show();}
81if(currentOpts.showCloseButton){close.show();}
82_set_navigation();if(currentOpts.hideOnContentClick){content.bind('click',$.fancybox.close);}
83if(currentOpts.hideOnOverlayClick){overlay.bind('click',$.fancybox.close);}
84$(window).bind("resize.fb",$.fancybox.resize);if(currentOpts.centerOnScroll){$(window).bind("scroll.fb",$.fancybox.center);}
85if(currentOpts.type=='iframe'){$('<iframe id="fancybox-frame" name="fancybox-frame'+new Date().getTime()+'" frameborder="0" hspace="0" scrolling="'+selectedOpts.scrolling+'" src="'+currentOpts.href+'"></iframe>').appendTo(content);}
86wrap.show();busy=false;$.fancybox.center();currentOpts.onComplete(currentArray,currentIndex,currentOpts);_preload_images();},_preload_images=function(){var href,objNext;if((currentArray.length-1)>currentIndex){href=currentArray[currentIndex+1].href;if(typeof href!=='undefined'&&href.match(imgRegExp)){objNext=new Image();objNext.src=href;}}
87if(currentIndex>0){href=currentArray[currentIndex-1].href;if(typeof href!=='undefined'&&href.match(imgRegExp)){objNext=new Image();objNext.src=href;}}},_draw=function(pos){var dim={width:parseInt(start_pos.width+(final_pos.width-start_pos.width)*pos,10),height:parseInt(start_pos.height+(final_pos.height-start_pos.height)*pos,10),top:parseInt(start_pos.top+(final_pos.top-start_pos.top)*pos,10),left:parseInt(start_pos.left+(final_pos.left-start_pos.left)*pos,10)};if(typeof final_pos.opacity!=='undefined'){dim.opacity=pos<0.5?0.5:pos;}
88wrap.css(dim);content.css({'width':dim.width-currentOpts.padding*2,'height':dim.height-(titleHeight*pos)-currentOpts.padding*2});},_get_viewport=function(){return[$(window).width()-(currentOpts.margin*2),$(window).height()-(currentOpts.margin*2),$(document).scrollLeft()+currentOpts.margin,$(document).scrollTop()+currentOpts.margin];},_get_zoom_to=function(){var view=_get_viewport(),to={},resize=currentOpts.autoScale,double_padding=currentOpts.padding*2,ratio;if(currentOpts.width.toString().indexOf('%')>-1){to.width=parseInt((view[0]*parseFloat(currentOpts.width))/100,10);}else{to.width=currentOpts.width+double_padding;}
89if(currentOpts.height.toString().indexOf('%')>-1){to.height=parseInt((view[1]*parseFloat(currentOpts.height))/100,10);}else{to.height=currentOpts.height+double_padding;}
90if(resize&&(to.width>view[0]||to.height>view[1])){if(selectedOpts.type=='image'||selectedOpts.type=='swf'){ratio=(currentOpts.width)/(currentOpts.height);if((to.width)>view[0]){to.width=view[0];to.height=parseInt(((to.width-double_padding)/ratio)+double_padding,10);}
91if((to.height)>view[1]){to.height=view[1];to.width=parseInt(((to.height-double_padding)*ratio)+double_padding,10);}}else{to.width=Math.min(to.width,view[0]);to.height=Math.min(to.height,view[1]);}}
92to.top=parseInt(Math.max(view[3]-20,view[3]+((view[1]-to.height-40)*0.5)),10);to.left=parseInt(Math.max(view[2]-20,view[2]+((view[0]-to.width-40)*0.5)),10);return to;},_get_obj_pos=function(obj){var pos=obj.offset();pos.top+=parseInt(obj.css('paddingTop'),10)||0;pos.left+=parseInt(obj.css('paddingLeft'),10)||0;pos.top+=parseInt(obj.css('border-top-width'),10)||0;pos.left+=parseInt(obj.css('border-left-width'),10)||0;pos.width=obj.width();pos.height=obj.height();return pos;},_get_zoom_from=function(){var orig=selectedOpts.orig?$(selectedOpts.orig):false,from={},pos,view;if(orig&&orig.length){pos=_get_obj_pos(orig);from={width:pos.width+(currentOpts.padding*2),height:pos.height+(currentOpts.padding*2),top:pos.top-currentOpts.padding-20,left
92:pos.left-currentOpts.padding-20};}else{view=_get_viewport();from={width:currentOpts.padding*2,height:currentOpts.padding*2,top:parseInt(view[3]+view[1]*0.5,10),left:parseInt(view[2]+view[0]*0.5,10)};}
93return from;},_animate_loading=function(){if(!loading.is(':visible')){clearInterval(loadingTimer);return;}
94$('div',loading).css('top',(loadingFrame*-40)+'px');loadingFrame=(loadingFrame+1)%12;};$.fn.fancybox=function(options){if(!$(this).length){return this;}
95$(this).data('fancybox',$.extend({},options,($.metadata?$(this).metadata():{}))).unbind('click.fb').bind('click.fb',function(e){e.preventDefault();if(busy){return;}
96busy=true;$(this).blur();selectedArray=[];selectedIndex=0;var rel=$(this).attr('rel')||'';if(!rel||rel==''||rel==='nofollow'){selectedArray.push(this);}else{selectedArray=$("a[rel="+rel+"], area[rel="+rel+"]");selectedIndex=selectedArray.index(this);}
97_start();return;});return this;};$.fancybox=function(obj){var opts;if(busy){return;}
98busy=true;opts=typeof arguments[1]!=='undefined'?arguments[1]:{};selectedArray=[];selectedIndex=parseInt(opts.index,10)||0;if($.isArray(obj)){for(var i=0,j=obj.length;i<j;i++){if(typeof obj[i]=='object'){$(obj[i]).data('fancybox',$.extend({},opts,obj[i]));}else{obj[i]=$({}).data('fancybox',$.extend({content:obj[i]},opts));}}
99selectedArray=jQuery.merge(selectedArray,obj);}else{if(typeof obj=='object'){$(obj).data('fancybox',$.extend({},opts,obj));}else{obj=$({}).data('fancybox',$.extend({content:obj},opts));}
100selectedArray.push(obj);}
101if(selectedIndex>selectedArray.length||selectedIndex<0){selectedIndex=0;}
102_start();};$.fancybox.showActivity=function(){clearInterval(loadingTimer);loading.show();loadingTimer=setInterval(_animate_loading,66);};$.fancybox.hideActivity=function(){loading.hide();};$.fancybox.next=function(){return $.fancybox.pos(currentIndex+1);};$.fancybox.prev=function(){return $.fancybox.pos(currentIndex-1);};$.fancybox.pos=function(pos){if(busy){return;}
103pos=parseInt(pos);selectedArray=currentArray;if(pos>-1&&pos<currentArray.length){selectedIndex=pos;_start();}else if(currentOpts.cyclic&&currentArray.length>1){selectedIndex=pos>=currentArray.length?0:currentArray.length-1;_start();}
104return;};$.fancybox.cancel=function(){if(busy){return;}
105busy=true;$.event.trigger('fancybox-cancel');_abort();selectedOpts.onCancel(selectedArray,selectedIndex,selectedOpts);busy=false;};$.fancybox.close=function(){if(busy||wrap.is(':hidden')){return;}
106busy=true;if(currentOpts&&false===currentOpts.onCleanup(currentArray,currentIndex,currentOpts)){busy=false;return;}
107_abort();$(close.add(nav_left).add(nav_right)).hide();$(content.add(overlay)).unbind();$(window).unbind("resize.fb scroll.fb");$(document).unbind('keydown.fb');content.find('iframe').attr('src',isIE6&&/^https/i.test(window.location.href||'')?'javascript:void(false)':'about:blank');if(currentOpts.titlePosition!=='inside'){title.empty();}
108wrap.stop();function _cleanup(){overlay.fadeOut('fast');title.empty().hide();wrap.hide();$.event.trigger('fancybox-cleanup');content.empty();currentOpts.onClosed(currentArray,currentIndex,currentOpts);currentArray=selectedOpts=[];currentIndex=selectedIndex=0;currentOpts=selectedOpts={};busy=false;}
109if(currentOpts.transitionOut=='elastic'){start_pos=_get_zoom_from();var pos=wrap.position();final_pos={top:pos.top,left:pos.left,width:wrap.width(),height:wrap.height()};if(currentOpts.opacity){final_pos.opacity=1;}
110title.empty().hide();fx.prop=1;$(fx).animate({prop:0},{duration:currentOpts.speedOut,easing:currentOpts.easingOut,step:_draw,complete:_cleanup});}else{wrap.fadeOut(currentOpts.transitionOut=='none'?0:currentOpts.speedOut,_cleanup);}};$.fancybox.resize=function(){if(overlay.is(':visible')){overlay.css('height',$(document).height());}
111$.fancybox.center(true);};$.fancybox.center=function(){var view,align;if(busy){return;}
112align=arguments[0]===true?1:0;view=_get_viewport();if(!align&&(wrap.width()>view[0]||wrap.height()>view[1])){return;}
113wrap.stop().animate({'top':parseInt(Math.max(view[3]-20,view[3]+((view[1]-content.height()-40)*0.5)-currentOpts.padding)),'left':parseInt(Math.max(view[2]-20,view[2]+((view[0]-content.width()-40)*0.5)-currentOpts.padding))},typeof arguments[0]=='number'?arguments[0]:200);};$.fancybox.init=function(){if($("#fancybox-wrap").length){return;}
114$('body').append(tmp=$('<div id="fancybox-tmp"></div>'),loading=$('<div id="fancybox-loading"><div></div></div>'),overlay=$('<div id="fancybox-overlay"></div>'),wrap=$('<div id="fancybox-wrap"></div>'));outer=$('<div id="fancybox-outer"></div>').append('<div class="fancybox-bg" id="fancybox-bg-n"></div><div class="fancybox-bg" id="fancybox-bg-ne"></div><div class="fancybox-bg" id="fancybox-bg-e"></div><div class="fancybox-bg" id="fancybox-bg-se"></div><div class="fancybox-bg" id="fancybox-bg-s"></div><div class="fancybox-bg" id="fancybox-bg-sw"></div><div class="fancybox-bg" id="fancybox-bg-w"></div><div class="fancybox-bg" id="fancybox-bg-nw"></div>
114').appendTo(wrap);outer.append(content=$('<div id="fancybox-content"></div>'),close=$('<a id="fancybox-close"></a>'),title=$('<div id="fancybox-title"></div>'),nav_left=$('<a href="javascript:;" id="fancybox-left"><span class="fancy-ico" id="fancybox-left-ico"></span></a>'),nav_right=$('<a href="javascript:;" id="fancybox-right"><span class="fancy-ico" id="fancybox-right-ico"></span></a>'));close.click($.fancybox.close);loading.click($.fancybox.cancel);nav_left.click(function(e){e.preventDefault();$.fancybox.prev();});nav_right.click(function(e){e.preventDefault();$.fancybox.next();});if($.fn.mousewheel){wrap.bind('mousewheel.fb',function(e,delta){if(busy){e.preventDefault();}else if($(e.target).get(0).clientHeight==0||$(e.target).get(0).scrollHeight===$(e.target).get(0).clientHeight){e.preventDefault();$.fancybox[delta>0?'prev':'next']();}});}
115if(!$.support.opacity){wrap.addClass('fancybox-ie');}
116if(isIE6){loading.addClass('fancybox-ie6');wrap.addClass('fancybox-ie6');$('<iframe id="fancybox-hide-sel-frame" src="'+(/^https/i.test(window.location.href||'')?'javascript:void(false)':'about:blank')+'" scrolling="no" border="0" frameborder="0" tabindex="-1"></iframe>').prependTo(outer);}};$.fn.fancybox.defaults={padding:10,margin:40,opacity:false,modal:false,cyclic:false,scrolling:'auto',width:560,height:340,autoScale:true,autoDimensions:true,centerOnScroll:false,ajax:{},swf:{wmode:'transparent'},hideOnOverlayClick:true,hideOnContentClick:false,overlayShow:true,overlayOpacity:0.7,overlayColor:'#777',titleShow:false,titlePosition:'float',titleFormat:null,titleFromAlt:false,transitionIn:'fade',transitionOut:'fade',speedIn:300,speedOut:300,changeSpeed:300,changeFade:'fast',easingIn:'swing',easingOut:'swing',showCloseButton:true,showNavArrows:true,enableEscapeButton:true,enableKeyboardNav:true,onStart:function(){},onCancel:function(){},onComplete:function(){},onCleanup:function(){},onClosed:function(){},onError:function(){}};$(document).ready(function(){$.fancybox.init();});})(jQuery);;jQuery(function($){function nextgen_lightbox_filter_selector($,selector)
117{if(typeof nextgen_lightbox_settings!='undefined'&&nextgen_lightbox_settings&&nextgen_lightbox_settings.context){var context=nextgen_lightbox_settings.context;if(context=='all_images'){selector=selector.add($('a > img').parent());}
118else if(context=='all_images_direct'){selector=selector.add($('a[href] > img').parent().filter(function(){var href=$(this).attr('href').toLowerCase();var ext=href.substring(href.length-3);var ext2=href.substring(href.length-4);return(ext=='jpg'||ext=='gif'||ext=='png'||ext2=='tiff'||ext2=='jpeg');}));}
119else if(context=='nextgen_and_wp_images'){selector=selector.add($('a > img[class*="wp-image-"]').parent());}
120selector=selector.not('.gallery_link');}
121return selector;}
122var nextgen_fancybox_init=function(){if($(window).width()>560){var selector=nextgen_lightbox_filter_selector($,$(".ngg-fancybox"));selector.fancybox({titlePosition:'inside',padding:0});}else{$(".ngg-fancybox").click(function(){return false;});}};$(this).bind('refreshed',nextgen_fancybox_init);nextgen_fancybox_init();});;jQuery(document).ready(function(){let slidesToShow=3;if(isSmallDevice()){slidesToShow=1;}
123jQuery('.hot-deals-slick').slick({lazyLoad:'ondemand',mobileFirst:false,infinite:false,slidesToShow:slidesToShow,slidesToScroll:1,adaptiveHeight:true});});;jQuery(document).ready(function(){if(jQuery('#hot-deals-filter').length>0){if(!loadFilterFromUrl()){filterDeals();}
124jQuery(document).on('change','#hot-deals-filter select, #hot-deals-filter input',function(e){filterDeals();});jQuery(document).on('change','#hot-deals-filter input[name="date_from"]',function(e){jQuery('input[name="date_to"]').datepickerBootstrap('setStartDate',jQuery(this).val());});}});function filterDeals()
125{const catalogBox=jQuery('.catalog .offer');const filterCountryId=jQuery('select[name="country_id"]').val();const filterPriceId=jQuery('select[name="price_id"]').val();const filterDateFrom=jQuery('input[name="date_from"]').val();const filterDateTo=jQuery('input[name="date_to"]').val();let statisticsCountry=getStatisticsDefaultValues('country_id');let statisticsPrice=getStatisticsDefaultValues('price_id');let statisticsCountryOk=true;let statisticsPriceOk=true;addFilterParamsToUrl(filterCountryId,filterPriceId,filterDateFrom,filterDateTo);let date=new Date(filterDateFrom+'T00:00:00Z');const filterDateFromUnix=Math.floor(date.getTime()/1000);date=new Date(filterDateTo+'T00:00:00Z');const filterDateToUnix=Math.floor(date.getTime()/1000);jQuery('#hot-deals-filter-none').hide();catalogBox.show();catalogBox.each(function(){let countryIds=jQuery(this).attr('data-country-id').split(',');let dateFrom=jQuery(this).attr('data-date-from');let priceId=jQuery(this).attr('data-price-id');statisticsCountryOk=true;statisticsPriceOk=true;if(filterCountryId>0&&!countryIds.includes(filterCountryId)){jQuery(this).hide();statisticsPriceOk=false;}
126if(filterPriceId>0&&filterPriceId!=priceId){jQuery(this).hide();statisticsCountryOk=false;}
127if(filterDateFrom.length>0&&dateFrom<filterDateFromUnix){jQuery(this).hide();statisticsCountryOk=false;statisticsPriceOk=false;}
128if(filterDateTo.length>0&&dateFrom>filterDateToUnix){jQuery(this).hide();statisticsCountryOk=false;statisticsPriceOk=false;}
129if(statisticsCountryOk&&countryIds.length>0){statisticsCountry=addToStatistics(statisticsCountry,countryIds);}
130if(statisticsPriceOk){statisticsPrice=addToStatistics(statisticsPrice,priceId);}});statisticsCountry.map(function(value,key){if(key>0){let select=jQuery('select[name="country_id"] option[value="'+key+'"]');select.text(select.attr('data-name')+' ('+value+')');jQuery('select[name="country_id"]').selectric('refresh');}});statisticsPrice.map(function(value,key){if(key>0){let select=jQuery('select[name="price_id"] option[value="'+key+'"]');select.text(select.attr('data-name')+' ('+value+')');jQuery('select[name="price_id"]').selectric('refresh');}});if(jQuery('.catalog .offer:visible').length==0){jQuery('#hot-deals-filter-none').show();}}
131function addFilterParamsToUrl(countryId,price,dateFrom,dateTo)
132{const pageUrl=jQuery('#hot-deal-page-url').text();if(countryId==0&&price==0&&dateFrom==''&&dateTo==''){history.pushState(null,null,pageUrl);return;}
133history.pushState(null,null,pageUrl+'?kryptis='+countryId+'&kaina='+price+'&data-nuo='+dateFrom+'&data-iki='+dateTo);}
134function loadFilterFromUrl()
135{const countryId=getUrlParam('kryptis');const priceId=getUrlParam('kaina');const dateFrom=getUrlParam('data-nuo');const dateTo=getUrlParam('data-iki');if(!countryId&&!priceId&&!dateFrom&&!dateTo){return false;}
136jQuery('select[name="country_id"]').val(countryId).selectric('refresh');jQuery('select[name="price_id"]').val(priceId).selectric('refresh');jQuery('input[name="date_from"]').val(dateFrom);jQuery('input[name="date_to"]').val(dateTo);filterDeals();return true;}
137function addToStatistics(statistics,id)
138{if(statistics[id]==undefined){statistics[id]=0;}
139if(Array.isArray(id)){id.forEach((i)=>{statistics[i]++;});}else{statistics[id]++;}
140return statistics;}
141function getStatisticsDefaultValues(field)
142{let statisticsCountry=[];jQuery('select[name="'+field+'"] option').each(function(){if(jQuery(this).val()<1){return;}
143statisticsCountry[jQuery(this).val()]=0;});return statisticsCountry;};jQuery(document).ready(function(){jQuery('.hotel-block .conditions-link').on('click',function(event){var name=jQuery(this).attr('data-conditions-type');var hotelId=jQuery(this).attr('data-hotel');var iOS=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream;if(!iOS){jQuery('#modal-bg').show();}
144if(jQuery('#modal-conditions-'+name+'-'+hotelId).height()>300){jQuery('#modal-conditions-'+name+'-'+hotelId).css({'top':jQuery(window).scrollTop()+100});}
145jQuery('#modal-conditions-'+name+'-'+hotelId).show();ga('send','event','open hotel conditions',name);});jQuery('.modal-hotel-conditions .modal-box-close').on('click',function(event){jQuery('.modal-hotel-conditions').hide(200);jQuery('#modal-bg').hide();});});;jQuery(document).ready(function(){jQuery('.sidebar-individual-offer a').on('click',function(e){ga('send','event','IndividualOfferClick',jQuery(this).attr('href'));});});;jQuery(document).ready(function(){let slidesToShow=4;if(isSmallDevice()){slidesToShow=2;}
146jQuery('.post-fade').slick({lazyLoad:'ondemand',mobileFirst:false,infinite:false,slidesToShow:slidesToShow,slidesToScroll:1});jQuery('.photo-contest-box .tag-list img').on('click',function(){jQuery('#modal-bg-ic').show();jQuery('#instagram-image-big-show').show();jQuery('#instagram-image-big-show .instagram-image-big-content').html('<img src="'+jQuery(this).attr('src').replace('/small/','/big/')+'"/>');});jQuery('#instagram-image-big-show .modal-box-close').on('click',function(){jQuery('#instagram-image-big-show').hide();jQuery('#modal-bg-ic').hide();});});;jQuery(document).ready(function(){jQuery('.menu-top-action-voucher').on('click',function(event){ga('send','event','top_menu','voucher');});jQuery('.menu-top-action-promo').on('click',function(event){ga('send','event','top_menu','promo','ka-veikti-lietuvoje');});jQuery('.main-menu-line .menu-city-box a').on('click',function(event){ga('send','event','top_menu','item',jQuery(this).text());});jQuery('.more-categories li a').on('click',function(event){ga('send','event','mobile_menu','item',jQuery(this).text());});jQuery('.menu-mobile .all-directions').click(function(){jQuery('.menu-mobile .all-directions-list').toggle('fast',function(){if(jQuery(this).is(":visible")){jQuery('.all-directions .show-more-dark').css('transform','rotate(180deg)');}else{jQuery('.all-directions .show-more-dark').css('transform','rotate(0deg)');}});});});;jQuery(document).ready(function(){function openModal(){if(jQuery.cookie('modal-action')==1||!jQuery('#modal-with-post').length){return false;}
147setTimeout(function(){let scrollTop=(window.pageYOffset||document.documentElement.scrollTop)+100;jQuery('#modal-with-post').css('top',scrollTop+'px');jQuery('#modal-with-post').show();jQuery('#modal-bg').show();jQuery.cookie('modal-action',1,{expires:30,path:'/'});},3100);}
148jQuery('.modal-core .modal-box-close').on('click',function(event){closeModalCore();});jQuery('.modal-core #modal-contact-form').on('click',function(event){ga('send','event','modal-action','submit');jQuery.post(ajaxurl,{message:jQuery('#modal-with-post textarea').val(),email:jQuery('#modal-with-post input[name="email"]').val(),postId:0,action:'makalius-contact-sidebar-submit'},function(response){if(response.success==1){ga('send','event','Greitoji užklausa modal','modal submit');jQuery('#modal-with-post #message-box').html('<div class="success-message-box">'+'<p>'+jQuery('#makalius_contact_send_ok').text()+'</p>'+'</div>').slideDown();setTimeout(function(){closeModalCore();},2000);}else{jQuery('#modal-with-post #message-box').html('<div class="alert-message-box">'+'<p>'+jQuery('#makalius_contact_send_error').html()+'</p>'+'</div>').slideDown();}});});function closeModalCore()
149{jQuery('.modal-core').hide(300);jQuery('#modal-bg').hide();}});;jQuery(document).ready(function(){openModal();jQuery('.action-icon-newsletter').on('click',function(event){jQuery('#newsletter-modal').show();jQuery('#modal-bg').show();});jQuery('#newsletter-footer').on('submit',function(event){event.preventDefault();var email=jQuery('#newsletter-footer-email').val();var messages=jQuery('#newsletter-footer #messages');if(isValidEMail(email)){jQuery('#newsletter-footer').prop('disabled',true);}
150saveEmail(email,messages,'form_footer','Newsletter','Footer submit','');jQuery('#newsletter-footer').prop('disabled',false);});jQuery('#newsletter-modal-save').on('click',function(event){event.preventDefault();var email=jQuery('#newsletter-modal-email').val();var name=jQuery('#newsletter-modal-name').val();var messages=jQuery('#newsletter-modal #messages');if(!jQuery('#newsletter-modal input[name="modal_add_to_newsletter"]').is(':checked')){swal({title:'Dėmesio!',text:'Norint užsiprenumeruoti naujienlaiškį, privalomas sutikimas gauti rinkodaros pranešimus.',type:'error',html:true,confirmButtonColor:'#41c0f0',confirmButtonText:'SUPRATAU'});jQuery('.sweet-alert').css({'box-shadow':'rgba(0, 0, 0, 0.35) 0px 5px 15px'});return false;}
151const $termsAccept=jQuery('#newsletter-modal input[name="modal_terms_accept"]');if($termsAccept.length&&!$termsAccept.is(':checked')){swal({title:'Dėmesio!',text:'Norint užsiprenumeruoti naujienlaiškį, privaloma sutikti su žaidimo taisyklėmis.',type:'error',html:true,confirmButtonColor:'#41c0f0',confirmButtonText:'SUPRATAU'});jQuery('.sweet-alert').css({'box-shadow':'rgba(0, 0, 0, 0.35) 0px 5px 15px'});return false;}
152if(isValidEMail(email)){jQuery('#newsletter-modal-save').html('Kraunasi...');jQuery('#newsletter-modal-save').prop('disabled',true);}
153saveEmail(email,messages,'ml-modal','m-newsletter-modal-post','submit',name);jQuery('#newsletter-modal-save').prop('disabled',false);return true;});jQuery('#newsletter-modal-sold-out .modal-box-close').on('click',function(event){event.preventDefault();closeModal();ga('send','event','m-newsletter-modal-post','close');});jQuery('#newsletter-modal-close-text, #newsletter-modal .modal-box-close').on('click',function(event){event.preventDefault();closeModal();ga('send','event','m-newsletter-modal','close');});function openModal(){if(jQuery.cookie('newsletter-modal')==27||!jQuery('#newsletter-modal').length){return false;}
154setTimeout(function(){jQuery('#newsletter-modal').show();jQuery('#modal-bg').show();jQuery.cookie('newsletter-modal',27,{expires:30,path:'/'});},2000);}
155function closeModal(){jQuery('#newsletter-modal').hide(300);jQuery('#newsletter-modal-sold-out').hide(300);jQuery('#modal-bg').hide();jQuery('#snowflakes-container').empty();jQuery('#snowflakes-container1').empty();}
156function saveEmail(email,messages,source,eventName,eventType,name)
157{if(!isValidEMail(email)){return false;}
158let isOnlyContestEmail=false;if(jQuery('input[name="modal_add_to_newsletter"]').length>0){isOnlyContestEmail=!jQuery('input[name="modal_add_to_newsletter"]').is(':checked');}
159messages.slideUp();if(!isOnlyContestEmail){messages.hide().html('<div class="success-message-box mt10 pb10">'+'<p>Registracija į konkursą sėkmingai atlikta.</p>'+'</div>'+'<div class="success-message-box mt10 pb10">'+'<p>Naujienlaiškio prenumeratos patvirtinimas išsiųstas tavo nurodytu el.pašto adresu.</p>'+'</div>').slideDown();}else{messages.hide().html('<div class="success-message-box mt10 pb10">'+'<p>Registracija į konkursą sėkmingai atlikta.</p>'+'</div>').slideDown();}
160setTimeout(function(){closeModal();},6000);jQuery.post(ajaxurl,{email:email,name_surname:name,source:source,is_only_contest_email:Number(isOnlyContestEmail),action:'makalius-newsletter-save'},function(response){if(response.success==1){jQuery('#newsletter-footer-email').val('');ga('send','event',eventName,eventType);}else{messages.hide().html('<div class="alert-message-box mt10">'+'<p>
160Klaida. Patikrinkite savo elektroninio pašto adresą!</p>'+'</div>').slideDown();}});}
161function snowflakeLoad()
162{const snowflakesContainer=document.getElementById('snowflakes-container');const snowflakeCount=300;const colors=["#f00","#0f0","#00f","#ff0","#f0f","#0ff","#ff9800","#9c27b0"];for(let i=0;i<snowflakeCount;i++){const snowflake=document.createElement('div');snowflake.classList.add('snowflake');snowflake.textContent=',';snowflake.style.fontSize=Math.random()*20+20+'px';snowflake.style.left=Math.random()*100+'vw';const duration=Math.random()*15+5+'s';const delay=Math.random()*-5+'s';snowflake.style.color=colors[Math.floor(Math.random()*colors.length)];snowflakesContainer.appendChild(snowflake);requestAnimationFrame(()=>{snowflake.style.animation=`snowflakefall ${duration}linear ${delay}infinite`;});}}
163function getRandomColor()
164{const letters='0123456789ABCDEF';let color='#';for(let i=0;i<6;i++){color+=letters[Math.floor(Math.random()*16)];}
165return color;}});;jQuery(document).ready(function(){let slidesToShow=3;if(isSmallDevice()){slidesToShow=1;}
166jQuery('.post-block-group-slick').slick({lazyLoad:'ondemand',mobileFirst:false,infinite:false,slidesToShow:slidesToShow,slidesToScroll:1,adaptiveHeight:true});if(isSmallDevice()){const buttonPosition=jQuery('#group-box_'+jQuery('.post-blocks-group').first().data('pbg-id')+'_0 img').height()/2-25+33;if(buttonPosition>50){jQuery('button.slick-arrow').css('top',buttonPosition+'px');}}else{jQuery.each(jQuery('.post-blocks-group'),function(i,val){let groupId=jQuery(this).data('pbg-id');let heightParent=jQuery('#post-blocks-group_'+groupId+' .slick-list').height();jQuery.each(jQuery('#post-blocks-group_'+groupId+' .group-box'),function(i,val){});});}});;jQuery(document).ready(function(){jQuery('.survey input').on('change',function(){var id=jQuery(this).attr('id');if(typeof id==='undefined'){return false;}
167var idParts=id.split('_');var extraField=jQuery('input[name='+idParts[0]+'-value]').val();if(typeof extraField==='undefined'){return false;}
168var withExtraField='#'+idParts[0]+'_'+extraField;if(jQuery(withExtraField).is(':checked')){jQuery(withExtraField+'-text').show();}else{jQuery(withExtraField+'-text').hide();}});jQuery('.survey .open-action').on('change',function(){var id=jQuery(this).attr('id');var idParts=id.split('_');jQuery('.survey .type-block').hide();jQuery('#'+idParts[0]).show();jQuery('#my-gift-rest-container').show();});jQuery('form[name="survey"]').on('submit',function(e){var fields=[];var errors=[];jQuery('textarea').removeClass('input_error');jQuery('.survey input[type="radio"]:visible, .survey input[type="checkbox"]:visible').each(function(){var name=jQuery(this).attr('name');if(fields.indexOf(name)===-1){fields.push(name);}});jQuery(fields).each(function(i,name){const vote=jQuery('input[name="'+name+'"]:checked').val();const isAllowEmpty=jQuery('input[name="'+name+'"]').attr('data-is_allow_empty');if(typeof isAllowEmpty!=='undefined'&&isAllowEmpty==1){return;}
169if(typeof vote==='undefined'){errors.push(jQuery('.survey .question-'+name.replace(/\[|\]/g,'')+' .form-group-title').text());}else if(name!='price_quality_proportion'){if(vote<8&&jQuery('textarea[name="'+name+'_comment"]').length){if(jQuery('textarea[name="'+name+'_comment"]').val().length===0){errors.push('Nenurodyta kas nepatiko: '+jQuery('.survey .question-'+name+' .form-group-title').text());jQuery('textarea[name="'+name+'_comment"]').addClass('input_error');}else if(jQuery('textarea[name="'+name+'_comment"]').val().length<12){errors.push('Detaliau aprašyk kas nepatiko (min. 3 žodžiai): '+jQuery('.survey .question-'+name+' .form-group-title').text());jQuery('textarea[name="'+name+'_comment"]').addClass('input_error');}}}});if(errors.length==0){jQuery('.survey input[name="survey"]').prop('disabled',true);jQuery('.survey input[name="survey"]').attr('value','Kraunasi...');return true;}
170showAlert(errors);return false;});jQuery('.survey-ignore-action').on('change',function(){let isVisible=0;if(jQuery(this).is(':checked')){isVisible=1;}
171jQuery('#survey-'+jQuery(this).attr('data-name')+'-stars').toggle('fast',function(){});jQuery('input[name="'+name+'"]').attr('data-is_allow_empty',isVisible);jQuery('textarea[name="'+name+'_comment"]').attr('data-is_allow_empty',isVisible);});jQuery('.rating-with-numbers input[type="radio"]').on('change',function(){const name=jQuery(this).attr('name');const rating=jQuery(this).val();let title='Kadangi įvertinai žemu balu, nurodyk kas nepatiko <span class="required-field">*</span>:';if(name=='price_quality_proportion'){return;}
172if(rating>=8){title='Gali nurodyti detaliau:';}
173jQuery('#'+name+'-comment-box .title').html(title);jQuery('#'+name+'-comment-box').show();});function showAlert(errors)
174{var html='<ul>';for(var key in errors){html+='<li>'+errors[key]+'</li>';}
175html+='<ul>';swal({title:'Klaida!',text:'Prašome patikrinti laukelius:<div class="alert-error-list" style="margin-left: 51px;">'+html+'</div>',type:'error',html:true,confirmButtonColor:'#41dd9f',confirmButtonText:'SUPRATAU'});}});;jQuery(document).ready(function(){function getDateRange(start,end)
176{let result=[],current=new Date(start);while(current<=end){result.push(current.getFullYear()+'-'+(parseInt(current.getMonth())+1).toString().padStart(2,'0')+'-'+current.getDate().toString().padStart(2,'0'))&&(current=new Date(current))&&current.setDate(current.getDate()+1);}
177return result;}
178function getMonths()
179{return['Sausis','Vasaris','Kovas','Balandis','Gegužė','Birželis','Liepa','Rugpjūtis','Rugsėjis','Spalis','Lapkritis','Gruodis'];}
180function getMonthsNameForDateRange()
181{return['Sausio','Vasario','Kovo','Balandžio','Gegužės','Birželio','Liepos','Rugpjūčio','Rugsėjo','Spalio','Lapkričio','Gruodžio'];}
182jQuery('.option-filter-select').on('click',function(){var active=[];var combinationsList={};var parentLabel=jQuery(this).parents('label.option-title');var currentOptionCategoryId=jQuery(this).attr('data-category_id');var currentOptionId=jQuery(this).attr('data-option_id');if(currentOptionCategoryId==7||currentOptionCategoryId==8||currentOptionCategoryId==9){jQuery('input[data-category_id="'+currentOptionCategoryId+'"]').each(function(){var optionId=jQuery(this).attr('data-option_id');if(optionId!=currentOptionId){jQuery(this).attr('checked',false).change();jQuery(this).parents('label.option-title').removeClass('option-title-selected');}});}
183jQuery('input.option-filter-select[type=checkbox]:checked').each(function(){var categoryId=jQuery(this).attr('data-category_id');var optionId=jQuery(this).attr('data-option_id');active.push(categoryId+'-'+optionId);});var totalActive=active.length;if(jQuery(this).is(':checked')){parentLabel.addClass('option-title-selected');}else{parentLabel.removeClass('option-title-selected');}
184if(totalActive<1){jQuery('.offers-list .block-selector').show();return true;}
185jQuery(active).each(function(key,optionId){jQuery.each(jQuery('.option-'+optionId).parents('.block-selector'),function(key,combination){var combinationId=jQuery(combination).attr('id');if(combinationsList[combinationId]){combinationsList[combinationId]++;}else{combinationsList[combinationId]=1;}});});jQuery('.offers-list .block-selector').hide();jQuery('#offers-list').show();jQuery('#offers-list-filter-empty').hide();jQuery.each(combinationsList,function(combinationId,total){if(total==totalActive){jQuery('.offers-list #'+combinationId).show();}});if(jQuery('.offers-list .block:visible').length<2){jQuery('#offers-list').hide();jQuery('#offers-list-filter-empty').show();}
186return true;});jQuery('.modal-combination-full-description').on('click',function(){var combinationId=jQuery(this).attr('id').split('_');var topPosition=100;if(isSmallDevice()){topPosition=20;}
187jQuery('#combination-full-description_new_'+combinationId[1]).css({'top':jQuery(window).scrollTop()+topPosition});jQuery('#combination-full-description_new_'+combinationId[1]).show();});jQuery('body').on('click','.offers-list-tab .tab',function(){const tabId=jQuery(this).attr('data-tid');changeTab(tabId);ga('send','event','combination-tab',jQuery('.offer-top h1').text().trim(),tabId);});function changeTab(tabId)
188{jQuery('.offers-list-tab .tab-more .tab-drop-list').hide();jQuery('.offers-list-tab .tab').removeClass('tab-active');jQuery('#tab_'+tabId).addClass('tab-active');jQuery('.offers-list-lt-deals .block').hide();jQuery('.offers-list-lt-deals .filter-night-'+tabId+(isShowMoreCombinationButton()?':lt(3)':'')).show();if(!jQuery('.combination-filter').length){jQuery('.offers-list-lt-deals .block').removeClass('hide-top-border');jQuery('.offers-list-lt-deals .block:visible:first').first().addClass('hide-top-border');}
189updatePageUrl(tabId);filterCombinations(tabId);const checkInDate=jQuery('input[name=check_in_date]').val();if(checkInDate.length>0){const calendarDateTo=dateAddDays(checkInDate,tabId);const dateFrom=new Date(checkInDate);const dateTo=new Date(calendarDateTo);const months=getMonths();jQuery('#calendar-to span').text(dateTo.getFullYear()+' '+months[dateTo.getMonth()]+' '+dateTo.getDate()+' d.');jQuery('.calendar-edit-button-box .date-selected').text(months[dateFrom.getMonth()]+' '+dateFrom.getDate()+' - '+months[dateTo.getMonth()]+' '+dateTo.getDate());}
190disableInactiveFilters(tabId);}
191function disableInactiveFilters(tabId)
192{jQuery('.combination-filter label').removeClass('week-day-filter-inactive');jQuery('.combination-filter input').removeAttr('disabled');jQuery('.combination-filter input[name="week-day-filter"]').each(function(){let filterId=jQuery(this).val();if(!jQuery('.filter-night-'+tabId).hasClass('filter-weekday-'+filterId)){
192jQuery('#week-day-filter-'+filterId).addClass('week-day-filter-inactive');jQuery('#week-day-filter-'+filterId+' input').attr('disabled',true);}});}
193function updatePageUrl(tabId)
194{let url=jQuery('link[rel="canonical"]').attr('href');if(url===undefined){return false;}
195if(url.length<1){return false;}
196let filters=[];let filterParam='';jQuery('.combination-filter input:checked').each(function(){jQuery(this).val();filters.push(jQuery(this).val());});if(filters.length>0){filterParam='&filter='+filters.join(',');}
197history.pushState(null,null,url+'#tab='+tabId+filterParam);return true;}
198function changeTabByUrl()
199{let pageUrl=new URL(window.location.href.replace(/#/g,"?"));let tabId=pageUrl.searchParams.get('tab');let tabIdFromHtml=0;let filter=pageUrl.searchParams.get('filter');if(jQuery('.offers-list-tab').length>0){tabIdFromHtml=jQuery('.offers-list-tab .tab-active').attr('data-tid');}
200if(tabId===undefined){if(tabIdFromHtml){disableInactiveFilters(tabIdFromHtml);}
201return false;}
202if(!tabId){if(tabIdFromHtml){disableInactiveFilters(tabIdFromHtml);}
203return false;}
204if(filter&&filter.length>0){const filterIds=filter.split(',');filterIds.forEach((i)=>{jQuery('#week-day-filter-'+i).click();});}
205if(jQuery('.offers-list-tab #tab_'+tabId).length===0){if(tabIdFromHtml){disableInactiveFilters(tabIdFromHtml);}
206return false;}
207changeTab(tabId);return true;}
208jQuery('body').on('click','.week-day-filter-inactive',function(){const tabId=jQuery('.offers-list-tab .tab-active').attr('data-tid');const filterId=jQuery(this).attr('data-fid');swal({title:'Rinkis kitą '+jQuery('#hotel-service-type-name').text()+' skaičių',text:jQuery('#tab_'+tabId+' .tab-name').text()+' nėra pasirinkimų „'+jQuery.trim(jQuery('#week-day-filter-'+filterId).text())+'”',type:'warning',customClass:'swal-small-title',confirmButtonColor:'#41dd9f',confirmButtonText:'SUPRATAU'});});jQuery('.combination-filter input[type=checkbox]').on('change',function(e){jQuery('.offers-list-tab .tab-more .tab-drop-list').hide();filterCombinations(jQuery('.offers-list-tab .tab-active').attr('data-tid'));updatePageUrl(jQuery('.offers-list-tab .tab-active').attr('data-tid'));});function filterCombinations(tabId,ignoreCheckInDate)
209{let selected=[];const checkInDate=jQuery('input[name=check_in_date]').val();jQuery('.more-combination-box').hide();if(checkInDate.length>0&&ignoreCheckInDate===undefined){hideCombinationsByDate();updateTabPriceByFilter(tabId);hideSimilarCombinations();return false;}
210jQuery('.combination-filter input:checked').each(function(){selected.push(jQuery(this).val());});jQuery('.offers-list-lt-deals .block').removeClass('active-block');if(selected.length<1){jQuery('.calendar-open-button-box').show();jQuery('.offers-list-lt-deals .filter-night-'+tabId).hide();jQuery('.offers-list-lt-deals .block').filter('.filter-night-'+tabId+(isShowMoreCombinationButton()?':lt(3)':'')).show();jQuery('.offers-list-lt-deals .block').addClass('active-block');updateTabPriceByFilter(tabId);const totalCombination=parseInt(jQuery('.offers-list-lt-deals .block').filter('.filter-night-'+tabId).length);if(isShowMoreCombinationButton()&&totalCombination>3){jQuery('.more-combination-box').show();jQuery('.more-combination-box .btn span').text(totalCombination-3);}
211return false;}
212jQuery('.offers-list-lt-deals .block').hide();jQuery.each(selected,function(id,val){jQuery('.offers-list-lt-deals .block').filter('.filter-night-'+tabId+'.filter-weekday-'+val).show();jQuery('.offers-list-lt-deals .block').filter('.filter-weekday-'+val).addClass('active-block');});updateTabPriceByFilter(tabId);return true;}
213function updateTabPriceByFilter(currentTabId)
214{let tabs=[];jQuery('.offers-list-tab .tab').each(function(){tabs.push(jQuery(this).attr('data-tid'));});jQuery('.filter-empty-combination').hide();jQuery('.tab strong').removeClass('empty-price');jQuery.each(tabs,function(i,tabId){let prices=[];jQuery('.offers-list-lt-deals .block').filter('.filter-night-'+tabId+'.active-block').each(function(){let price=jQuery('#'+jQuery(this).attr('id')+' .price span').text().split(' ');prices.push(parseFloat(price[0]));});let totalPrices=prices.length;jQuery('#tab_'+tabId+' .tab-price-text').show();if(totalPrices>0){if(totalPrices===1||prices.filter(onlyUniqueArray).length===1){jQuery('#tab_'+tabId+' .tab-price-text').hide();}
215prices.sort(function(a,b){return a-b});jQuery('.offers-list-tab #tab_'+tabId).show();jQuery('.offers-list-tab #tab_'+tabId).removeClass('filter-hide');jQuery('.offers-list-tab #tab_'+tabId+' strong .tab-price').text(prices[0]);}else{jQuery('.offers-list-tab #tab_'+tabId).addClass('filter-hide');if(tabId!=currentTabId){jQuery('.offers-list-tab #tab_'+tabId).hide();}else{jQuery('.offers-list-tab #tab_'+tabId+' strong .tab-price').text('-');jQuery('.offers-list-tab #tab_'+tabId+' strong').addClass('empty-price');jQuery('.filter-empty-combination').show();}}});hideTabsToMany(currentTabId,tabs.length);jQuery('#combination-calendar').datepicker('refresh');}
216function hideTabsToMany(currentTabId,totalTabs)
217{if(!isSmallDevice()){return false;}
218let beforeCurrentId=0;let afterCurrentId=0;let beforeCurrentPosition=0;let afterCurrentPosition=0;let totalActive=0;let currentTabPosition=parseInt(jQuery('.offers-list-tab #tab_'+currentTabId).attr('data-position'));jQuery('.offers-list-tab > .tab').each(function(){if(!jQuery(this).hasClass('filter-hide')){totalActive++;let id=jQuery(this).attr('data-tid');let position=parseInt(jQuery(this).attr('data-position'));if(position<currentTabPosition){beforeCurrentId=id;beforeCurrentPosition=position;}
219if(position>currentTabPosition&&afterCurrentPosition===0){afterCurrentId=id;afterCurrentPosition=position;}}});jQuery('.offers-list-tab .tab').hide();jQuery('.offers-list-tab #tab_'+currentTabId).show();if(afterCurrentId!==0){jQuery('.offers-list-tab #tab_'+afterCurrentId).show();}else if(beforeCurrentId!==0){jQuery('.offers-list-tab #tab_'+beforeCurrentId).show();}
220jQuery('.offers-list-tab .tab-more').show();if(totalActive<=1){jQuery('.offers-list-tab .tab-more').hide();}}
221jQuery('.offers-list-tab .open-tsb-sub-menu').on('click',function(){if(jQuery('.offers-list-tab .tab-more .tab-drop-list').is(':visible')){jQuery('.offers-list-tab .tab-more .tab-drop-list').hide();return;}
222jQuery('.tab-drop-list').html('');jQuery('.offers-list-tab .tab').not('.filter-hide').each(function(){let html=jQuery(this)[0].outerHTML;jQuery('.tab-drop-list').append(html);if(jQuery(this).is(':visible')){jQuery('.tab-drop-list #tab_'+jQuery(this).attr('data-tid')).addClass('tab-sub-active');}});jQuery('.offers-list-tab .tab-more .tab').show();jQuery('.offers-list-tab .tab-more .tab-drop-list').show();});changeTabByUrl();combinationCalendar();function combinationCalendar()
223{let numberOfMonths=2;if(jQuery(window).width()<700){numberOfMonths=1;}
224jQuery('#combination-calendar').datepicker({numberOfMonths:numberOfMonths,dateFormat:'yy-mm-dd',dayNames:['Sekmadienis','Pirmadienis','Antradienis','Trečiadienis','Ketvirtadienis','Penktadienis','Šeštadienis'],dayNamesMin:['Sk','Pr','An','Tr','Kt','Pn','Št'],monthNames:getMonths(),firstDay:1,defaultDate:null,beforeShowDay:function(date){let availableDays=getAvailableDays();return[availableDays.indexOf(jQuery.datepicker.formatDate('yy-mm-dd',date))!=-1];},onSelect:function(date){let prices=getActivePrices();jQuery('input[name=check_in_date_temp]').val(date);let numberOfNights=parseInt(jQuery('.offers-list-tab .tab-active').attr('data-tid'));let dateFrom=new Date(date);let dateTo=new Date(date);dateTo.setDate(dateTo.getDate()+numberOfNights);let months=getMonthsNameForDateRange();jQuery('#combination-calendar-modal #selected-date').text(months[dateFrom.getMonth()]+' '+dateFrom.getDate()+' - '+months[dateTo.getMonth()]+' '+dateTo.getDate());updateDatePickerCells();jQuery('#combination-calendar-modal #empty-date-box').hide();jQuery('#combination-calendar-modal #selected-date-box').show();updateDomAfterSelect(dateFrom,dateTo);},onChangeMonthYear:function(month,year,dp){updateDatePickerCells();},});}
225jQuery('body').on('click','#combination-calendar-modal .ui-datepicker-unselectable',function(){swal({title:'',text:'Atvykimas negalimas.<br>Rinkis atvykimo datą su nurodyta kaina.',type:'warning',html:true,confirmButtonColor:'#41dd9f',confirmButtonText:'SUPRATAU'});});jQuery('#combination-calendar-modal #selected-date-box').on('click',function(){const date=jQuery('input[name=check_in_date_temp]').val();filterCombinations(jQuery('.offers-list-tab .tab-active').attr('data-tid'),true);let numberOfNights=jQuery('.offers-list-tab .tab-active').attr('data-tid');let dateFrom=new Date(date);let dateTo=new Date(date);dateTo.setDate(dateTo.getDate()+parseInt(numberOfNights));let months=getMonthsNameForDateRange();unselectSelectedFilters();jQuery('input[name=check_in_date]').val(date);jQuery('.calendar-open-button-box').hide();jQuery('.calendar-edit-button-box .date-selected').text(months[dateFrom.getMonth()]+' '+dateFrom.getDate()+' - '+months[dateTo.getMonth()]+' '+dateTo.getDate());jQuery('.calendar-edit-button-box').show();updateDatePickerCells();showAllCombinations();jQuery('.combination-filter').hide();jQuery('.calendar-edit-button-box').addClass('calendar-edit-button-border-hide');jQuery('.combination-filter input[type="checkbox"]').prop('checked',fal
225se);filterCombinations(jQuery('.offers-list-tab .tab-active').attr('data-tid'));jQuery('a.buy-ticket-action').each(function(){jQuery(this).attr('href',this.href.split('?')[0]+'?d='+date);});jQuery('.block .option-one-line').hide();jQuery('.buy-ticket-action.with-text span').hide();jQuery('.hide-with-date').hide();calendarModalCloe();ga('send','event','reserved-calendar',jQuery('.offer-top h1').text().trim());});function getAvailableDays()
226{let tabId=jQuery('.offers-list-tab .tab-active').attr('data-tid');let combinationId=0;let allDates=[];if(typeof combinationDateAvailable==='undefined'){return allDates;}
227jQuery('.filter-night-'+tabId+'.block').each(function(){combinationId=jQuery(this).attr('id').split('-')[1];allDates.push.apply(allDates,combinationDateAvailable[combinationId]);});return allDates;}
228jQuery('.offers-list-lt-deals-tab .combination-calendar-open').on('click',function(){updateDatePickerCells();getActiveNights();jQuery.cookie('calendar-open',1,{expires:60,path:'/'});jQuery('#combination-calendar-modal').css('margin-top',0);jQuery('#calendar-buy-with-date-mandatory').hide();jQuery('#calendar-buy-without-date').hide();jQuery('#modal-bg-calendar').show();jQuery('#combination-calendar-modal').show();ga('send','event','open-calendar',jQuery('.offer-top h1').text().trim());});jQuery('#combination-calendar-modal-close').on('click',function(){const dateFromEditBox=jQuery('.calendar-edit-button-box .date-selected').text();const dateFromModal=jQuery('#selected-date-box #selected-date').text();let isSimilarDate=false;if(dateFromEditBox.length>0&&dateFromModal.length>0){const dateFromModalOnlyDate=jQuery.trim(dateFromModal.split('(')[0]);if(dateFromEditBox==dateFromModalOnlyDate){isSimilarDate=true;}}
229if(jQuery('.ui-state-active-start').length>0&&!isSimilarDate){swal({title:'',text:'Pasirinkai atvykimo datą, bet jos nerezervavai.<br> Ar tikrai nenori atlikti rezervacijos?',type:'warning',html:true,showCancelButton:true,cancelButtonColor:'#d4d4d4',cancelButtonText:'Nenoriu rezervuoti',confirmButtonColor:'#41dd9f',confirmButtonText:'Noriu rezervuoti'},function(alertAction){if(alertAction){ga('send','event','reserve-modal-calendar',jQuery('.offer-top h1').text().trim());jQuery('#selected-date-box').click();return false;}else{ga('send','event','close-modal-calendar',jQuery('.offer-top h1').text().trim());clearCalendarDateBeforeClose();calendarModalCloe();jQuery('body').bind("DOMNodeInserted",function(){jQuery(this).find('span.ui-state-default').removeClass('ui-state-active');jQuery(this).find('span.ui-state-default').removeClass('ui-state-active-end');});}});}else{clearCalendarDateBeforeClose();calendarModalCloe();}
230ga('send','event','close-calendar',jQuery('.offer-top h1').text().trim());});function clearCalendarDateBeforeClose()
231{if(jQuery('input[name=check_in_date]').val().length===0&&jQuery('#selected-date-box').is(':visible')){jQuery('input[name=check_in_date_temp]').val('');jQuery('#combination-calendar').datepicker('setDate',null);jQuery('#selected-date-box').hide();jQuery('#empty-date-box').show();}}
232function calendarModalCloe()
233{jQuery('#combination-calendar-modal').hide();jQuery('#modal-bg-calendar').hide();}
234jQuery('.combination-calendar-delete-date').on('click',function(){calendarRemoveSelectedDate();jQuery('.buy-ticket-action.with-text span').show();ga('send','event','delete-calendar',jQuery('.offer-top h1').text().trim());});function calendarRemoveSelectedDate()
235{jQuery('input[name=check_in_date_temp]').val('');jQuery('input[name=check_in_date]').val('');jQuery('#combination-calendar').datepicker('setDate',null);jQuery('#calendar-from span').text('');jQuery('#calendar-to span').text('');jQuery('#calendar-arrival').hide();jQuery('.calendar-open-button-box').show();jQuery('.calendar-edit-button-box .date-selected').text('');jQuery('.calendar-edit-button-box').hide();jQuery('.combination-filter').show();jQuery('.calendar-edit-button-box').removeClass('calendar-edit-button-border-hide');jQuery('#selected-date-box').hide();jQuery('#empty-date-box').show();jQuery('a.buy-ticket-action').each(function(){jQuery(this).attr('href',this.href.split('?')[0]);});jQuery('.block .option-one-line').show();jQuery('.hide-with-date').show();jQuery('body').bind("DOMNodeInserted",function(){jQuery(this).find('span.ui-state-default').removeClass('ui-state-active');jQuery(this).find('span.ui-state-default').removeClass('ui-state-active-end');});changeTab(jQuery('.offers-list-tab .tab-active').attr('data-tid'));}
236function updateDatePickerCells()
237{let prices=getActivePrices();const dateFrom=jQuery('input[name=check_in_date_temp]').val();setTimeout(function(){jQuery('.ui-datepicker td > *').each(function(idx,elem){let month=jQuery(this).parent().attr('data-month');if(month!==undefined){month=parseInt(month)+1;let year=jQuery(this).parent().attr('data-year');let day=jQuery(this).text();let dateId=year+'-'+('0'+month).slice(-2)+'-'+('0'+day).slice(-2);if(typeof prices[dateId]!=='undefined'){let className='datepicker-content-'+prices[dateId];addCSSRule('.ui-datepicker td a.'+className+':after {content: "'+prices[dateId]+' €";}');jQuery(this).addClass(className);jQuery(this).attr('data-price',prices[dateId]);}
238jQuery(this).addClass('date-'+dateId);}});jQuery('a.ui-state-default').removeClass('ui-state-active-start');jQuery('a.ui-state-default').removeClass('ui-active-next-day');jQuery('a.ui-state-default').removeClass('ui-state-active-end');jQuery('a.ui-state-default').removeClass('ui-state-active');if(dateFrom.length>0){let numberOfNights=parseInt(jQuery('.offers-list-tab .tab-active').attr('data-tid'));let dateId='';jQuery('.date-'+dateFrom).addClass('ui-state-active-start');for(let i=1;i<=numberOfNights;i++){let dateNew=new Date(dateFrom);dateNew.setDate(dateNew.getDate()+i);let monthNew=dateNew.getMonth()+1;dateId=dateNew.getFullYear()+'-'+('0'+monthNew).slice(-2)+'-'+('0'+dateNew.getDate()).slice(-2);jQuery('.date-'+dateId).addClass('ui-state-active');jQuery('.date-'+dateId).addClass('ui-active-next-day');}
239jQuery('.date-'+dateId).addClass('ui-state-active-end');updateDomAfterSelect(dateFrom,dateId);}},0);}
240let dynamicCSSRules=[];function addCSSRule(rule)
241{if(jQuery.inArray(rule,dynamicCSSRules)==-1){jQuery('head').append('<style>'+rule+'</style>');dynamicCSSRules.push(rule);}}
242function getActivePrices()
243{let tabId=jQuery('.offers-list-tab .tab-active').attr('data-tid');let combinationId=0;let prices=[];if(typeof combinationDatePrice==='undefined'){return prices;}
244jQuery('.filter-night-'+tabId+'.block').each(function(){combinationId=jQuery(this).attr('id').split('-')[1];if(typeof combinationDatePrice[combinationId]!=='undefined'){jQuery.each(combinationDatePrice[combinationId],function(date,price){if(prices[date]===undefined||prices[date]>price){prices[date]=price;}});}});return prices;}
245function getValidCombinationsByDate()
246{const checkInDate=jQuery('input[name=check_in_date]').val();let combinations=[];let combinationsActive=[];jQuery('.offers-list-lt-deals .block').each(function(){combinations.push(jQuery(this).attr('id').split('-')[1]);});if(checkInDate.length===0||combinationDateAvailable===undefined){return combinations;}
247jQuery.each(combinations,function(key,combinationId){if(jQuery.inArray(checkInDate,combinationDateAvailable[combinationId])!==-1){combinationsActive.push(combinationId);}});return combinationsActive;}
248function hideCombinationsByDate()
249{let validCombinations=getValidCombinationsByDate();jQuery('.offers-list-lt-deals .block').each(function(){let combinationId=jQuery(this).attr('id').split('-')[1];if(jQuery.inArray(combinationId,validCombinations)===-1){jQuery('#block-'+combinationId).removeClass('active-block');jQuery('#block-'+combinationId).hide();}});}
250function hideSimilarCombinations()
251{let uniqueCodes=[];let used=[];jQuery('.offers-list-lt-deals .block:visible').each(function(){let uniqueCode=jQuery(this).attr('data-uc');
251if(uniqueCodes.includes(uniqueCode)&&used.includes(uniqueCode)===false){getLowestPriceCombinationByUniqueCode(uniqueCode);used.push(uniqueCode);}else{uniqueCodes.push(jQuery(this).attr('data-uc'))}});}
252function getLowestPriceCombinationByUniqueCode(uniqueCode)
253{let combinationByPrice=[];jQuery("#offers-list .block[data-uc='"+uniqueCode+"']").each(function(i){let blockId=jQuery(this).attr('id');if(jQuery('#'+blockId).is(':visible')){combinationByPrice.push({id:blockId,price:parseFloat(jQuery(this).attr('data-price'))});jQuery('#'+blockId).hide();}});combinationByPrice.sort(function(a,b){return a.price-b.price;});jQuery('#'+combinationByPrice[0]['id']).show();}
254jQuery('.offers-list-lt-deals .more-combination-action').on('click',function(){showAllCombinations();});function showAllCombinations()
255{let tabId=jQuery('.offers-list-tab .tab-active').attr('data-tid');jQuery('.more-combination-box').hide();jQuery('.offers-list-lt-deals .block').filter('.filter-night-'+tabId).show();sessionStorage.setItem('more-combination-button-hide_'+jQuery('#user_online_post_id').text(),1);}
256function isShowMoreCombinationButton()
257{return false;}
258function unselectSelectedFilters()
259{jQuery('.combination-filter input:checked').each(function(){jQuery(this).click();});}
260function onlyUniqueArray(value,index,self){return self.indexOf(value)===index;}
261function updateDomAfterSelect(dateFrom,dateTo)
262{const selectedDateRange=getDateRange(dateFrom,new Date(dateTo));let selectedDateRangeLast='';jQuery('body').bind("DOMNodeInserted",function(){jQuery(this).find('span.ui-state-default').removeClass('ui-state-active');jQuery(this).find('span.ui-state-default').removeClass('ui-state-active-end');});jQuery(selectedDateRange).each(function(key,val){selectedDateRangeLast=val;jQuery('body').bind("DOMNodeInserted",function(){jQuery(this).find('.unselectable-date-'+val).addClass('ui-state-active');});});jQuery('body').bind("DOMNodeInserted",function(){jQuery(this).find('.unselectable-date-'+selectedDateRangeLast).addClass('ui-state-active-end');});}
263function getActiveNights()
264{jQuery('#combination-calendar-night').empty();if(jQuery('.offers-list-tab>.tab').length>1){jQuery('#combination-calendar-change-night-box').css('display','inline-block');}else{jQuery('#combination-calendar-change-night-box').hide();return false;}
265jQuery('.offers-list-tab>.tab').each(function(){const tabId=jQuery(this).attr('data-tid');if(jQuery('.filter-night-'+tabId+' a[data-type="r"]:first').length>0){let html='<option></option>';if(tabId==jQuery('.offers-list-tab .tab-active').attr('data-tid')){html='<option selected></option>';}
266jQuery('#combination-calendar-night').append(jQuery(html).attr('value',tabId).text(tabId));}});jQuery('#combination-calendar-night').selectric('refresh');}
267jQuery('#combination-calendar-night').on('change',function(e){clearCalendarDateBeforeClose();calendarModalCloe();let nights=jQuery(this).val();jQuery('#tab_'+nights).click();jQuery('.filter-night-'+nights+' a[data-type="r"]:first').click();jQuery('#calendar-buy-with-date-mandatory').hide();});});
268;/*! jQuery UI - v1.13.2 - 2022-07-14
269* http://jqueryui.com
270* Includes: widget.js, position.js, data.js, disable-selection.js, effect.js, effects/effect-blind.js, effects/effect-bounce.js, effects/effect-clip.js, effects/effect-drop.js, effects/effect-explode.js, effects/effect-fade.js, effects/effect-fold.js, effects/effect-highlight.js, effects/effect-puff.js, effects/effect-pulsate.js, effects/effect-scale.js, effects/effect-shake.js, effects/effect-size.js, effects/effect-slide.js, effects/effect-transfer.js, focusable.js, form-reset-mixin.js, jquery-patch.js, keycode.js, labels.js, scroll-parent.js, tabbable.js, unique-id.js, widgets/accordion.js, widgets/autocomplete.js, widgets/button.js, widgets/checkboxradio.js, widgets/controlgroup.js, widgets/datepicker.js, widgets/dialog.js, widgets/draggable.js, widgets/droppable.js, widgets/menu.js, widgets/mouse.js, widgets/progressbar.js, widgets/resizable.js, widgets/selectable.js, widgets/selectmenu.js, widgets/slider.js, widgets/sortable.js, widgets/spinner.js, widgets/tabs.js, widgets/tooltip.js
271* Copyright jQuery Foundation and other contributors; Licensed MIT */
272!function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}(function(x){"use strict";var t,e,i,n,W,C,o,s,r,l,a,h,u;function E(t,e,i){return[parseFloat(t[0])*(a.test(t[0])?e/100:1),parseFloat(t[1])*(a.test(t[1])?i/100:1)]}function L(t,e){return parseInt(x.css(t,e),10)||0}function N(t){return null!=t&&t===t.window}x.ui=x.ui||{},x.ui.version="1.13.2",
273/*!
274 * jQuery UI :data 1.13.2
275 * http://jqueryui.com
276 *
277 * Copyright jQuery Foundation and other contributors
278 * Released under the MIT license.
279 * http://jquery.org/license
280 */
281x.extend(x.expr.pseudos,{data:x.expr.createPseudo?x.expr.createPseudo(function(e){return function(t){return!!x.data(t,e)}}
vendor: 4,689 bytes, lines 281-347
281):function(t,e,i){return!!x.data(t,i[3])}}),
282/*!
283 * jQuery UI Disable Selection 1.13.2
284 * http://jqueryui.com
285 *
286 * Copyright jQuery Foundation and other contributors
287 * Released under the MIT license.
288 * http://jquery.org/license
289 */
290x.fn.extend({disableSelection:(t="onselectstart"in document.createElement("div")?"selectstart":"mousedown",function(){return this.on(t+".ui-disableSelection",function(t){t.preventDefault()})}),enableSelection:function(){return this.off(".ui-disableSelection")}}),
291/*!
292 * jQuery UI Focusable 1.13.2
293 * http://jqueryui.com
294 *
295 * Copyright jQuery Foundation and other contributors
296 * Released under the MIT license.
297 * http://jquery.org/license
298 */
299x.ui.focusable=function(t,e){var i,n,o,s=t.nodeName.toLowerCase();return"area"===s?(o=(i=t.parentNode).name,!(!t.href||!o||"map"!==i.nodeName.toLowerCase())&&(0<(i=x("img[usemap='#"+o+"']")).length&&i.is(":visible"))):(/^(input|select|textarea|button|object)$/.test(s)?(n=!t.disabled)&&(o=x(t).closest("fieldset")[0])&&(n=!o.disabled):n="a"===s&&t.href||e,n&&x(t).is(":visible")&&function(t){var e=t.css("visibility");for(;"inherit"===e;)t=t.parent(),e=t.css("visibility");return"visible"===e}(x(t)))},x.extend(x.expr.pseudos,{focusable:function(t){return x.ui.focusable(t,null!=x.attr(t,"tabindex"))}}),x.fn._form=function(){return"string"==typeof this[0].form?this.closest("form"):x(this[0].form)},
300/*!
301 * jQuery UI Form Reset Mixin 1.13.2
302 * http://jqueryui.com
303 *
304 * Copyright jQuery Foundation and other contributors
305 * Released under the MIT license.
306 * http://jquery.org/license
307 */
308x.ui.formResetMixin={_formResetHandler:function(){var e=x(this);setTimeout(function(){var t=e.data("ui-form-reset-instances");x.each(t,function(){this.refresh()})})},_bindFormResetHandler:function(){var t;this.form=this.element._form(),this.form.length&&((t=this.form.data("ui-form-reset-instances")||[]).length||this.form.on("reset.ui-form-reset",this._formResetHandler),t.push(this),this.form.data("ui-form-reset-instances",t))},_unbindFormResetHandler:function(){var t;this.form.length&&((t=this.form.data("ui-form-reset-instances")).splice(x.inArray(this,t),1),t.length?this.form.data("ui-form-reset-instances",t):this.form.removeData("ui-form-reset-instances").off("reset.ui-form-reset"))}},x.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),
309/*!
310 * jQuery UI Support for jQuery core 1.8.x and newer 1.13.2
311 * http://jqueryui.com
312 *
313 * Copyright jQuery Foundation and other contributors
314 * Released under the MIT license.
315 * http://jquery.org/license
316 *
317 */
318x.expr.pseudos||(x.expr.pseudos=x.expr[":"]),x.uniqueSort||(x.uniqueSort=x.unique),x.escapeSelector||(e=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g,i=function(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t},x.escapeSelector=function(t){return(t+"").replace(e,i)}),x.fn.even&&x.fn.odd||x.fn.extend({even:function(){return this.filter(function(t){return t%2==0})},odd:function(){return this.filter(function(t){return t%2==1})}}),
319/*!
320 * jQuery UI Keycode 1.13.2
321 * http://jqueryui.com
322 *
323 * Copyright jQuery Foundation and other contributors
324 * Released under the MIT license.
325 * http://jquery.org/license
326 */
327x.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},
328/*!
329 * jQuery UI Labels 1.13.2
330 * http://jqueryui.com
331 *
332 * Copyright jQuery Foundation and other contributors
333 * Released under the MIT license.
334 * http://jquery.org/license
335 */
336x.fn.labels=function(){var t,e,i;return this.length?this[0].labels&&this[0].labels.length?this.pushStack(this[0].labels):(e=this.eq(0).parents("label"),(t=this.attr("id"))&&(i=(i=this.eq(0).parents().last()).add((i.length?i:this).siblings()),t="label[for='"+x.escapeSelector(t)+"']",e=e.add(i.find(t).addBack(t))),this.pushStack(e)):this.pushStack([])},x.ui.plugin={add:function(t,e,i){var n,o=x.ui[t].prototype;for(n in i)o.plugins[n]=o.plugins[n]||[],o.plugins[n].push([e,i[n]])},call:function(t,e,i,n){var o,s=t.plugins[e];if(s&&(n||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(o=0;o<s.length;o++)t.options[s[o][0]]&&s[o][1].apply(t.element,i)}},
337/*!
338 * jQuery UI Position 1.13.2
339 * http://jqueryui.com
340 *
341 * Copyright jQuery Foundation and other contributors
342 * Released under the MIT license.
343 * http://jquery.org/license
344 *
345 * http://api.jqueryui.com/position/
346 */
347W=Math.max,C=Math.abs,o=/left|center|right/,s=/top|center|bottom/,r=/[\+\-]\d+(\.[\d]+)?%?/,l=/^\w+/,a=/%$/,h=x.fn.position,x.position={scrollbarWidth:function(){var t,e,i;return void 0!==n?n:(i=(e=x("<div style='display:block;position:absolute;
347width:200px;height:200px;overflow:hidden;'><div style='height:300px;width:auto;'></div></div>")).children()[0],x("body").append(e),t=i.offsetWidth,e.css("overflow","scroll"),t===(i=i.offsetWidth)&&(i=e[0].clientWidth),e.remove(),n=t-i)},getScrollInfo:function(t){var e=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),i=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),e="scroll"===e||"auto"===e&&t.width<t.element[0].scrollWidth;return{width:"scroll"===i||"auto"===i&&t.height<t.element[0].scrollHeight?x.position.scrollbarWidth():0,height:e?x.position.scrollbarWidth():0}},getWithinInfo:function(t){var e=x(t||window),i=N(e[0]),n=!!e[0]&&9===e[0].nodeType;return{element:e,isWindow:i,isDocument:n,offset:!i&&!n?x(t).offset():{left:0,top:0},scrollLeft:e.scrollLeft(),scrollTop:e.scrollTop(),width:e.outerWidth(),height:e.outerHeight()}}},x.fn.position=function(f){var c,d,p,g,m,v,y,w,b,_,t,e;return f&&f.of?(v="string"==typeof(f=x.extend({},f)).of?x(document).find(f.of):x(f.of),y=x.position.getWithinInfo(f.within),w=x.position.getScrollInfo(y),b=(f.collision||"flip").split(" "),_={},e=9===(e=(t=v)[0]).nodeType?{width:t.width(),height:t.height(),offset:{top:0,left:0}}:N(e)?{width:t.width(),height:t.height(),offset:{top:t.scrollTop(),left:t.scrollLeft()}}:e.preventDefault?{width:0,height:0,offset:{top:e.pageY,left:e.pageX}}:{width:t.outerWidth(),height:t.outerHeight(),offset:t.offset()},v[0].preventDefault&&(f.at="left top"),d=e.width,p=e.height,m=x.extend({},g=e.offset),x.each(["my","at"],function(){var t,e,i=(f[this]||"").split(" ");(i=1===i.length?o.test(i[0])?i.concat(["center"]):s.test(i[0])?["center"].concat(i):["center","center"]:i)[0]=o.test(i[0])?i[0]:"center",i[1]=s.test(i[1])?i[1]:"center",t=r.exec(i[0]),e=r.exec(i[1]),_[this]=[t?t[0]:0,e?e[0]:0],f[this]=[l.exec(i[0])[0],l.exec(i[1])[0]]}),1===b.length&&(b[1]=b[0]),"right"===f.at[0]?m.left+=d:"center"===f.at[0]&&(m.left+=d/2),"bottom"===f.at[1]?m.top+=p:"center"===f.at[1]&&(m.top+=p/2),c=E(_.at,d,p),m.left+=c[0],m.top+=c[1],this.each(function(){var i,t,r=x(this),l=r.outerWidth(),a=r.outerHeight(),e=L(this,"marginLeft"),n=L(this,"marginTop"),o=l+e+L(this,"marginRight")+w.width,s=a+n+L(this,"marginBottom")+w.height,h=x.extend({},m),u=E(_.my,r.outerWidth(),r.outerHeight());"right"===f.my[0]?h.left-=l:"center"===f.my[0]&&(h.left-=l/2),"bottom"===f.my[1]?h.top-=a:"center"===f.my[1]&&(h.top-=a/2),h.left+=u[0],h.top+=u[1],i={marginLeft:e,marginTop:n},x.each(["left","top"],function(t,e){x.ui.position[b[t]]&&x.ui.position[b[t]][e](h,{targetWidth:d,targetHeight:p,elemWidth:l,elemHeight:a,collisionPosition:i,collisionWidth:o,collisionHeight:s,offset:[c[0]+u[0],c[1]+u[1]],my:f.my,at:f.at,within:y,elem:r})}),f.using&&(t=function(t){var e=g.left-h.left,i=e+d-l,n=g.top-h.top,o=n+p-a,s={target:{element:v,left:g.left,top:g.top,width:d,height:p},element:{element:r,left:h.left,top:h.top,width:l,height:a},horizontal:i<0?"left":0<e?"right":"center",vertical:o<0?"top":0<n?"bottom":"middle"};d<l&&C(e+i)<d&&(s.horizontal="center"),p<a&&C(n+o)<p&&(s.vertical="middle"),W(C(e),C(i))>W(C(n),C(o))?s.important="horizontal":s.important="vertical",f.using.call(this,t,s)}),r.offset(x.extend(h,{using:t}))})):h.apply(this,arguments)},x.ui.position={fit:{left:function(t,e){var i,n=e.within,o=n.isWindow?n.scrollLeft:n.offset.left,n=n.width,s=t.left-e.collisionPosition.marginLeft,r=o-s,l=s+e.collisionWidth-n-o;e.collisionWidth>n?0<r&&l<=0?(i=t.left+r+e.collisionWidth-n-o,t.left+=r-i):t.left=!(0<l&&r<=0)&&l<r?o+n-e.collisionWidth:o:0<r?t.left+=r:0<l?t.left-=l:t.left=W(t.left-s,t.left)},top:function(t,e){var i,n=e.within,n=n.isWindow?n.scrollTop:n.offset.top,o=e.within.height,s=t.top-e.collisionPosition.marginTop,r=n-s,l=s+e.collisionHeight-o-n;e.collisionHeight>o?0<r&&l<=0?(i=t.top+r+e.collisionHeight-o-n,t.top+=r-i):t.top=!(0<l&&r<=0)&&l<r?n+o-e.collisionHeight:n:0<r?t.top+=r:0<l?t.top-=l:t.top=W(t.top-s,t.top)}},flip:{left:function(t,e){var i=e.within,n=i.offset.left+i.scrollLeft,o=i.width,i=i.isWindow?i.scrollLeft:i.offset.left,s=t.left-e.collisionPosition.marginLeft,r=s-i,s=s+e.collisionWidth-o-i,l="left"
vendor: 23,104 bytes, lines 347-401
347===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,a="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,h=-2*e.offset[0];r<0?((o=t.left+l+a+h+e.collisionWidth-o-n)<0||o<C(r))&&(t.left+=l+a+h):0<s&&(0<(n=t.left-e.collisionPosition.marginLeft+l+a+h-i)||C(n)<s)&&(t.left+=l+a+h)},top:function(t,e){var i=e.within,n=i.offset.top+i.scrollTop,o=i.height,i=i.isWindow?i.scrollTop:i.offset.top,s=t.top-e.collisionPosition.marginTop,r=s-i,s=s+e.collisionHeight-o-i,l="top"===e.my[1]?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,a="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,h=-2*e.offset[1];r<0?((o=t.top+l+a+h+e.collisionHeight-o-n)<0||o<C(r))&&(t.top+=l+a+h):0<s&&(0<(n=t.top-e.collisionPosition.marginTop+l+a+h-i)||C(n)<s)&&(t.top+=l+a+h)}},flipfit:{left:function(){x.ui.position.flip.left.apply(this,arguments),x.ui.position.fit.left.apply(this,arguments)},top:function(){x.ui.position.flip.top.apply(this,arguments),x.ui.position.fit.top.apply(this,arguments)}}},x.ui.safeActiveElement=function(e){var i;try{i=e.activeElement}catch(t){i=e.body}return i=(i=i||e.body).nodeName?i:e.body},x.ui.safeBlur=function(t){t&&"body"!==t.nodeName.toLowerCase()&&x(t).trigger("blur")},
348/*!
349 * jQuery UI Scroll Parent 1.13.2
350 * http://jqueryui.com
351 *
352 * Copyright jQuery Foundation and other contributors
353 * Released under the MIT license.
354 * http://jquery.org/license
355 */
356x.fn.scrollParent=function(t){var e=this.css("position"),i="absolute"===e,n=t?/(auto|scroll|hidden)/:/(auto|scroll)/,t=this.parents().filter(function(){var t=x(this);return(!i||"static"!==t.css("position"))&&n.test(t.css("overflow")+t.css("overflow-y")+t.css("overflow-x"))}).eq(0);return"fixed"!==e&&t.length?t:x(this[0].ownerDocument||document)},
357/*!
358 * jQuery UI Tabbable 1.13.2
359 * http://jqueryui.com
360 *
361 * Copyright jQuery Foundation and other contributors
362 * Released under the MIT license.
363 * http://jquery.org/license
364 */
365x.extend(x.expr.pseudos,{tabbable:function(t){var e=x.attr(t,"tabindex"),i=null!=e;return(!i||0<=e)&&x.ui.focusable(t,i)}}),
366/*!
367 * jQuery UI Unique ID 1.13.2
368 * http://jqueryui.com
369 *
370 * Copyright jQuery Foundation and other contributors
371 * Released under the MIT license.
372 * http://jquery.org/license
373 */
374x.fn.extend({uniqueId:(u=0,function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++u)})}),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&x(this).removeAttr("id")})}});
375/*!
376 * jQuery UI Widget 1.13.2
377 * http://jqueryui.com
378 *
379 * Copyright jQuery Foundation and other contributors
380 * Released under the MIT license.
381 * http://jquery.org/license
382 */
383var f,c=0,d=Array.prototype.hasOwnProperty,p=Array.prototype.slice;x.cleanData=(f=x.cleanData,function(t){for(var e,i,n=0;null!=(i=t[n]);n++)(e=x._data(i,"events"))&&e.remove&&x(i).triggerHandler("remove");f(t)}),x.widget=function(t,i,e){var n,o,s,r={},l=t.split(".")[0],a=l+"-"+(t=t.split(".")[1]);return e||(e=i,i=x.Widget),Array.isArray(e)&&(e=x.extend.apply(null,[{}].concat(e))),x.expr.pseudos[a.toLowerCase()]=function(t){return!!x.data(t,a)},x[l]=x[l]||{},n=x[l][t],o=x[l][t]=function(t,e){if(!this||!this._createWidget)return new o(t,e);arguments.length&&this._createWidget(t,e)},x.extend(o,n,{version:e.version,_proto:x.extend({},e),_childConstructors:[]}),(s=new i).options=x.widget.extend({},s.options),x.each(e,function(e,n){function o(){return i.prototype[e].apply(this,arguments)}function s(t){return i.prototype[e].apply(this,t)}r[e]="function"!=typeof n?n:function(){var t,e=this._super,i=this._superApply;return this._super=o,this._superApply=s,t=n.apply(this,arguments),this._super=e,this._superApply=i,t}}),o.prototype=x.widget.extend(s,{widgetEventPrefix:n&&s.widgetEventPrefix||t},r,{constructor:o,namespace:l,widgetName:t,widgetFullName:a}),n?(x.each(n._childConstructors,function(t,e){var i=e.prototype;x.widget(i.namespace+"."+i.widgetName,o,e._proto)}),delete n._childConstructors):i._childConstructors.push(o),x.widget.bridge(t,o),o},x.widget.extend=function(t){for(var e,i,n=p.call(arguments,1),o=0,s=n.length;o<s;o++)for(e in n[o])i=n[o][e],d.call(n[o],e)&&void 0!==i&&(x.isPlainObject(i)?t[e]=x.isPlainObject(t[e])?x.widget.extend({},t[e],i):x.widget.extend({},i):t[e]=i);return t},x.widget.bridge=function(s,e){var r=e.prototype.widgetFullName||s;x.fn[s]=function(i){var t="string"==typeof i,n=p.call(arguments,1),o=this;return t?this.length||"instance"!==i?this.each(function(){var t,e=x.data(this,r);return"instance"===i?(o=e,!1):e?"function"!=typeof e[i]||"_"===i.charAt(0)?x.error("no such method '"+i+"' for "+s+" widget instance"):(t=e[i].apply(e,n))!==e&&void 0!==t?(o=t&&t.jquery?o.pushStack(t.get()):t,!1):void 0:x.error("cannot call methods on "+s+" prior to initialization; attempted to call method '"+i+"'")}):o=void 0:(n.length&&(i=x.widget.extend.apply(null,[i].concat(n))),this.each(function(){var t=x.data(this,r);t?(t.option(i||{}),t._init&&t._init()):x.data(this,r,new e(i,this))})),o}},x.Widget=function(){},x.Widget._childConstructors=[],x.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(t,e){e=x(e||this.defaultElement||this)[0],this.element=x(e),this.uuid=c++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=x(),this.hoverable=x(),this.focusable=x(),this.classesElementLookup={},e!==this&&(x.data(e,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===e&&this.destroy()}}),this.document=x(e.style?e.ownerDocument:e.document||e),this.window=x(this.document[0].defaultView||this.document[0].parentWindow)),this.options=x.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:x.noop,_create:x.noop,_init:x.noop,destroy:function(){var i=this;this._destroy(),x.each(this.classesElementLookup,function(t,e){i._removeClass(e,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:x.noop,widget:function(){return this.element},option:function(t,e){var i,n,o,s=t;if(0===arguments.length)return x.widget.extend({},this.options);if("string"==typeof t)if(s={},t=(i=t.split(".")).shift(),i.length){for(n=s[t]=x.widget.extend({},this.options[t]),o=0;o<i.length-1;o++)n[i[o]]=n[i[o]]||{},n=n[i[o]];if(t=i.pop(),1===arguments.length)return void 0===n[t]?null:n[t];n[t]=e}else{if(1===arguments.length)return void 0===this.options[t]?null:this.options[t];s[t]=e}return this._setOptions(s),this},_setOptions:function(t){for(var e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(t){var e,i,n;for(e in t)n=this.classesElementLookup[e],t[e]!==this.options.classes[e]&&n&&n.length&&(i=x(n.get()),this._removeClass(n,e),i.addClass(this._classes({element:i,keys:e,classes:t,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(o){var s=[],r=this;function t(t,e){for(var i,n=0;n<t.length;n++)i=r.classesElementLookup[t[n]]||x(),i=o.add?(function(){var i=[];o.element.each(function(t,e){x.map(r.classesElementLookup,function(t){return t}).some(function(t){return t.is(e)})||i.push(e)}),r._on(x(i),{remove:"_untrackClassesElement"})}(),x(x.uniqueSort(i.get().concat(o.element.get())))):x(i.not(o.element).get()),r.classesElementLookup[t[n]]=i,s.push(t[n]),e&&o.classes[t[n]]&&s.push(o.classes[t[n]])}return(o=x.extend({element:this.element,classes:this.options.classes||{}},o)).keys&&t(o.keys.match(/\S+/g)||[],!0),o.extra&&t(o.extra.match(/\S+/g)||[]),s.join(" ")},_untrackClassesElement:function(i){var n=this;x.each(n.classesElementLookup,function(t,e){-1!==x.inArray(i.target,e)&&(n.classesElementLookup[t]=x(e.not(i.target).get()))}),this._off(x(i.target))},_removeClass:function(t,e,i){return this._toggleClass(t,e,i,!1)},_addClass:function(t,e,i){return this._toggleClass(t,e,i,!0)},_toggleClass:function(t,e,i,n){var o="string"==typeof t||null===t,e={extra:o?e:i,keys:o?t:e,element:o?this.element:t,add:n="boolean"==typeof n?n:i};return e.element.toggleClass(this._classes(e),n),this},_on:function(o,s,t){var r,l=this;"boolean"!=typeof o&&(t=s,s=o,o=!1),t?(s=r=x(s),this.bindings=this.bindings.add(s)):(t=s,s=this.element,r=this.widget()),x.each(t,function(t,e){function i(){if(o||!0!==l.options.disabled&&!x(this).hasClass("ui-state-disabled"))return("string"==typeof e?l[e]:e).apply(l,arguments)}"string"!=typeof e&&(i.guid=e.guid=e.guid||i.guid||x.guid++);var t=t.match(/^([\w:-]*)\s*(.*)$/),n=t[1]+l.eventNamespace,t=t[2];t?r.on(n,t,i):s.on(n,i)})},_off:function(t,e){e=(e||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.off(e),this.bindings=x(this.bindings.not(t).get()),this.focusable=x(this.focusable.not(t).get()),this.hoverable=x(this.hoverable.not(t).get())},_delay:function(t,e){var i=this;return setTimeout(function(){return("string"==typeof t?i[t]:t).apply(i,arguments)},e||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){this._addClass(x(t.currentTarget),null,"ui-state-hover")},mouseleave:function(t){this._removeClass(x(t.currentTarget),null,"ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){this._addClass(x(t.currentTarget),null,"ui-state-focus")},focusout:function(t){this._removeClass(x(t.currentTarget),null,"ui-state-focus")}})},_trigger:function(t,e,i){var n,o,s=this.options[t];if(i=i||{},(e=x.Event(e)).type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),e.target=this.element[0],o=e.originalEvent)for(n in o)n in e||(e[n]=o[n]);return this.element.trigger(e,i),!("function"==typeof s&&!1===s.apply(this.element[0],[e].concat(i))||e.isDefaultPrevented())}},x.each({show:"fadeIn",hide:"fadeOut"},function(s,r){x.Widget.prototype["_"+s]=function(e,t,i){var n,o=(t="string"==typeof t?{effect:t}:t)?!0!==t&&"number"!=typeof t&&t.effect||r:s;"number"==typeof(t=t||{})?t={duration:t}:!0===t&&(t={}),n=!x.isEmptyObject(t),t.complete=i,t.delay&&e.delay(t.delay),n&&x.effects&&x.effects.effect[o]?e[s](t):o!==s&&e[o]?e[o](t.duration,t.easing,i):e.queue(function(t){x(this)[s](),i&&i.call(e[0]),t()})}})});
384;/*!
385 * jQuery UI Mouse 1.13.2
386 * http://jqueryui.com
387 *
388 * Copyright jQuery Foundation and other contributors
389 * Released under the MIT license.
390 * http://jquery.org/license
391 */
392!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","./core"],e):e(jQuery)}(function(o){"use strict";var n=!1;return o(document).on("mouseup",function(){n=!1}),o.widget("ui.mouse",{version:"1.13.2",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.on("mousedown."+this.widgetName,function(e){return t._mouseDown(e)}).on("click."+this.widgetName,function(e){if(!0===o.data(e.target,t.widgetName+".preventClickEvent"))return o.removeData(e.target,t.widgetName+".preventClickEvent"),e.stopImmediatePropagation(),!1}),this.started=!1},_mouseDestroy:function(){this.element.off("."+this.widgetName),this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(e){var t,s,i;if(!n)return this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(e),s=1===(this._mouseDownEvent=e).which,i=!("string"!=typeof(t=this).options.cancel||!e.target.nodeName)&&o(e.target).closest(this.options.cancel).length,s&&!i&&this._mouseCapture(e)&&(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){t.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=!1!==this._mouseStart(e),!this._mouseStarted)?e.preventDefault():(!0===o.data(e.target,this.widgetName+".preventClickEvent")&&o.removeData(e.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(e){return t._mouseMove(e)},this._mouseUpDelegate=function(e){return t._mouseUp(e)},this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),e.preventDefault(),n=!0)),!0},_mouseMove:function(e){if(this._mouseMoved){if(o.ui.ie&&(!document.documentMode||document.documentMode<9)&&!e.button)return this._mouseUp(e);if(!e.which)if(e.originalEvent.altKey||e.originalEvent.ctrlKey||e.originalEvent.metaKey||e.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(e)}return(e.which||e.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=!1!==this._mouseStart(this._mouseDownEvent,e),this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(e){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&o.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,n=!1,e.preventDefault()},_mouseDistanceMet:function(e){return Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})});
393;/*!
394 * jQuery UI Resizable 1.13.2
395 * http://jqueryui.com
396 *
397 * Copyright jQuery Foundation and other contributors
398 * Released under the MIT license.
399 * http://jquery.org/license
400 */
401!function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery","./mouse","./core"],t):t(jQuery)}(function(z){"use strict";return z.widget("ui.resizable",z.ui.mouse,{version:"1.13.2",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,classes:{"ui-resizable-se":"ui-icon ui-icon-gripsmall-diagonal-se"},containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(t){return parseFloat(t)||0},_isNumber:function(t){return!isNaN(parseFloat(t))},_hasScroll:function(t,i){if("hidden"===z(t).css("overflow"))return!1;var i=i&&"left"===i?"scrollLeft":"scrollTop",e=!1;if(0<t[i])return!0;try{t[i]=1,e=0<t[i],t[i]=0}catch(t){}return e},_create:function(){var t,i=this.options,e=this;this._addClass("ui-resizable"),z.extend(this,{_aspectRatio:!!i.aspectRatio,aspectRatio:i.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:i.helper||i.ghost||i.animate?i.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)&&(this.element.wrap(z("<div class='ui-wrapper'></div>").css({overflow:"hidden",position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,t={marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom"),marginLeft:this.originalElement.css("marginLeft")},this.element.css(t),this.originalElement.css("margin",0),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css(t),this._proportionallyResize()),this._setupHandles(),i.autoHide&&z(this.element).on("mouseenter",function(){i.disabled||(e._removeClass("ui-resizable-autohide"),e._handles.show())}).on("mouseleave",function(){i.disabled||e.resizing||(e._addClass("ui-resizable-autohide"),e._handles.hide())}),this._mouseInit()},_destroy:function(){this._mouseDestroy(),this._addedHandles.remove();function t(t){z(t).removeData("resizable").removeData("ui-resizable").off(".resizable")}var i;return this.elementIsWrapper&&(t(this.element),i=this.element,this.originalElement.css({position:i.css("position"),width:i.outerWidth(),height:i.outerHeight(),top:i.css("top"),left:i.css("left")}).insertAfter(i),i.remove()),this.originalElement.css("resize",this.originalResizeStyle),t(this.originalElement),this},_setOption:function(t,i){switch(this._super(t,i),t){case"handles":this._removeHandles(),this._setupHandles();break;case"aspectRatio":this._aspectRatio=!!i}},_setupHandles:function(){var t,i,e,s,h,n=this.options,o=this;if(this.handles=n.handles||(z(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this._handles=z(),this._addedHandles=z(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),e=this.handles.split(","),this.handles={},i=0;i<e.length;i++)s="ui-resizable-"+(t=String.prototype.trim.call(e[i])),h=z("<div>"),this._addClass(h,"ui-resizable-handle "+s),h.css({zIndex:n.zIndex}),this.handles[t]=".ui-resizable-"+t,this.element.children(this.handles[t]).length||(this.element.append(h),this._addedHandles=this._addedHandles.add(h));this._renderAxis=function(t){var i,e,s;for(i in t=t||this.element,this.handles)this.handles[i].constructor===String?this.handles[i]=this.element.children(this.handles[i]).first().show():(this.handles[i].jquery||this.handles[i].nodeType)&&(this.handles[i]=z(this.handles[i]),this._on(this.handles[i],{mousedown:o._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(s=z(this.handles[i],this.element),s=/sw|ne|nw|se|n|s/.test(i)?s.outerHeight():s.outerWidth(),e=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),t.css(e,s),this._proportionallyResize()),this._handles=this._handles.add(this.handles[i])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.on("mouseover",function(){o.resizing||(this.className&&(h=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),o.axis=h&&h[1]?h[1]:"se")}),n.autoHide&&(this._handles.hide(),this._addClass("ui-resizable-autohide"))},_removeHandles:function(){this._addedHandles.remove()},_mouseCapture:function(t){var i,e,s=!1;for(i in this.handles)(e=z(this.handles[i])[0])!==t.target&&!z.contains(e,t.target)||(s=!0);return!this.options.disabled&&s},_mouseStart:function(t){var i,e,s=this.options,h=this.element;return this.resizing=!0,this._renderProxy(),i=this._num(this.helper.css("left")),e=this._num(this.helper.css("top")),s.containment&&(i+=z(s.containment).scrollLeft()||0,e+=z(s.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:i,top:e},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:h.width(),height:h.height()},this.originalSize=this._helper?{width:h.outerWidth(),height:h.outerHeight()}:{width:h.width(),height:h.height()},this.sizeDiff={width:h.outerWidth()-h.width(),height:h.outerHeight()-h.height()},this.originalPosition={left:i,top:e},this.originalMousePosition={left:t.pageX,top:t.pageY},this.aspectRatio="number"==typeof s.aspectRatio?s.aspectRatio:this.originalSize.width/this.originalSize.height||1,h=z(".ui-resizable-"+this.axis).css("cursor"),z("body").css("cursor","auto"===h?this.axis+"-resize":h),this._addClass("ui-resizable-resizing"),this._propagate("start",t),!0},_mouseDrag:function(t){var i=this.originalMousePosition,e=this.axis,s=t.pageX-i.left||0,i=t.pageY-i.top||0,e=this._change[e];return this._updatePrevProperties(),e&&(e=e.apply(this,[t,s,i]),this._updateVirtualBoundaries(t.shiftKey),(this._aspectRatio||t.shiftKey)&&(e=this._updateRatio(e,t)),e=this._respectSize(e,t),this._updateCache(e),this._propagate("resize",t),s=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),z.isEmptyObject(s)||(this._updatePrevProperties(),this._trigger("resize",t,this.ui()),this._applyChanges())),!1},_mouseStop:function(t){this.resizing=!1;var i,e,s,h=this.options,n=this;return this._helper&&(e=(i=(e=this._proportionallyResizeElements).length&&/textarea/i.test(e[0].nodeName))&&this._hasScroll(e[0],"left")?0:n.sizeDiff.height,i=i?0:n.sizeDiff.width,i={width:n.helper.width()-i,height:n.helper.height()-e},e=parseFloat(n.element.css("left"))+(n.position.left-n.originalPosition.left)||null,s=parseFloat(n.element.css("top"))+(n.position.top-n.originalPosition.top)||null,h.animate||this.element.css(z.extend(i,{top:s,left:e})),n.helper.height(n.size.height),n.helper.width(n.size.width),this._helper&&!h.animate&&this._proportionallyResize()),z("body").css("cursor","auto"),this._removeClass("ui-resizable-resizing"),this._propagate("stop",t),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var t={};return this.position.top!==this.prevPosition.top&&(t.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(t.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(t.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(t.height=this.size.height+"px"),this.helper.css(t),t},_updateVirtualBoundaries:function(t){var i,e,s,h=this.options,h={minWidth:this._isNumber(h.minWidth)?h.minWidth:0,maxWidth:this._isNumber(h.maxWidth)?h.maxWidth:1/0,minHeight:this._isNumber(h.minHeight)?h.minHeight:0,maxHeight:this._isNumber(h.maxHeight)?h.maxHeight:1/0};(this._aspectRatio||t)&&(t=h.minHeight*this.aspectRatio,e=h.minWidth/this.aspectRatio,i=h.maxHeight*this.aspectRatio,s=h.maxWidth/this.aspectRatio,h.minWidth<t&&(h.minWidth=t),h.minHeight<e&&(h.minHeight=e),i<h.maxWidth&&(h.maxWidth=i),s<h.maxHeight&&(h.maxHeight=s)),this._vBoundaries=h},_updateCache:function(t){this.offset=this.helper.offset(),this._isNumber(t.left)&&(this.position.left
vendor: 4,576 bytes, line 401
401=t.left),this._isNumber(t.top)&&(this.position.top=t.top),this._isNumber(t.height)&&(this.size.height=t.height),this._isNumber(t.width)&&(this.size.width=t.width)},_updateRatio:function(t){var i=this.position,e=this.size,s=this.axis;return this._isNumber(t.height)?t.width=t.height*this.aspectRatio:this._isNumber(t.width)&&(t.height=t.width/this.aspectRatio),"sw"===s&&(t.left=i.left+(e.width-t.width),t.top=null),"nw"===s&&(t.top=i.top+(e.height-t.height),t.left=i.left+(e.width-t.width)),t},_respectSize:function(t){var i=this._vBoundaries,e=this.axis,s=this._isNumber(t.width)&&i.maxWidth&&i.maxWidth<t.width,h=this._isNumber(t.height)&&i.maxHeight&&i.maxHeight<t.height,n=this._isNumber(t.width)&&i.minWidth&&i.minWidth>t.width,o=this._isNumber(t.height)&&i.minHeight&&i.minHeight>t.height,a=this.originalPosition.left+this.originalSize.width,l=this.originalPosition.top+this.originalSize.height,r=/sw|nw|w/.test(e),e=/nw|ne|n/.test(e);return n&&(t.width=i.minWidth),o&&(t.height=i.minHeight),s&&(t.width=i.maxWidth),h&&(t.height=i.maxHeight),n&&r&&(t.left=a-i.minWidth),s&&r&&(t.left=a-i.maxWidth),o&&e&&(t.top=l-i.minHeight),h&&e&&(t.top=l-i.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_getPaddingPlusBorderDimensions:function(t){for(var i=0,e=[],s=[t.css("borderTopWidth"),t.css("borderRightWidth"),t.css("borderBottomWidth"),t.css("borderLeftWidth")],h=[t.css("paddingTop"),t.css("paddingRight"),t.css("paddingBottom"),t.css("paddingLeft")];i<4;i++)e[i]=parseFloat(s[i])||0,e[i]+=parseFloat(h[i])||0;return{height:e[0]+e[2],width:e[1]+e[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var t,i=0,e=this.helper||this.element;i<this._proportionallyResizeElements.length;i++)t=this._proportionallyResizeElements[i],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(t)),t.css({height:e.height()-this.outerDimensions.height||0,width:e.width()-this.outerDimensions.width||0})},_renderProxy:function(){var t=this.element,i=this.options;this.elementOffset=t.offset(),this._helper?(this.helper=this.helper||z("<div></div>").css({overflow:"hidden"}),this._addClass(this.helper,this._helper),this.helper.css({width:this.element.outerWidth(),height:this.element.outerHeight(),position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++i.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(t,i){return{width:this.originalSize.width+i}},w:function(t,i){var e=this.originalSize;return{left:this.originalPosition.left+i,width:e.width-i}},n:function(t,i,e){var s=this.originalSize;return{top:this.originalPosition.top+e,height:s.height-e}},s:function(t,i,e){return{height:this.originalSize.height+e}},se:function(t,i,e){return z.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[t,i,e]))},sw:function(t,i,e){return z.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[t,i,e]))},ne:function(t,i,e){return z.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[t,i,e]))},nw:function(t,i,e){return z.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[t,i,e]))}},_propagate:function(t,i){z.ui.plugin.call(this,t,[i,this.ui()]),"resize"!==t&&this._trigger(t,i,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),z.ui.plugin.add("resizable","animate",{stop:function(i){var e=z(this).resizable("instance"),t=e.options,s=e._proportionallyResizeElements,h=s.length&&/textarea/i.test(s[0].nodeName),n=h&&e._hasScroll(s[0],"left")?0:e.sizeDiff.height,h=h?0:e.sizeDiff.width,h={width:e.size.width-h,height:e.size.height-n},n=parseFloat(e.element.css("left"))+(e.position.left-e.originalPosition.left)||null,o=parseFloat(e.element.css("top"))+(e.position.top-e.originalPosition.top)||null;e.element.animate(z.extend(h,o&&n?{top:o,left:n}:{}),{duration:t.animateDuration,easing:t.animateEasing,step:function(){var t={width:parseFloat(e.element.css("width")),height:parseFloat(e.element.css("height")),top:parseFloat(e.element.css("top")),left:parseFloat(e.element.css("left"))};s&&s.length&&z(s[0]).css({width:t.width,height:t.height}),e._updateCache(t),e._propagate("resize",i)}})}}),z.ui.plugin.add("resizable","containment",{start:function(){var e,s,t,i,h=z(this).resizable("instance"),n=h.options,o=h.element,n=n.
vendor: 8,288 bytes, lines 401-410
401containment,o=n instanceof z?n.get(0):/parent/.test(n)?o.parent().get(0):n;o&&(h.containerElement=z(o),/document/.test(n)||n===document?(h.containerOffset={left:0,top:0},h.containerPosition={left:0,top:0},h.parentData={element:z(document),left:0,top:0,width:z(document).width(),height:z(document).height()||document.body.parentNode.scrollHeight}):(e=z(o),s=[],z(["Top","Right","Left","Bottom"]).each(function(t,i){s[t]=h._num(e.css("padding"+i))}),h.containerOffset=e.offset(),h.containerPosition=e.position(),h.containerSize={height:e.innerHeight()-s[3],width:e.innerWidth()-s[1]},n=h.containerOffset,i=h.containerSize.height,t=h.containerSize.width,t=h._hasScroll(o,"left")?o.scrollWidth:t,i=h._hasScroll(o)?o.scrollHeight:i,h.parentData={element:o,left:n.left,top:n.top,width:t,height:i}))},resize:function(t){var i=z(this).resizable("instance"),e=i.options,s=i.containerOffset,h=i.position,t=i._aspectRatio||t.shiftKey,n={top:0,left:0},o=i.containerElement,a=!0;o[0]!==document&&/static/.test(o.css("position"))&&(n=s),h.left<(i._helper?s.left:0)&&(i.size.width=i.size.width+(i._helper?i.position.left-s.left:i.position.left-n.left),t&&(i.size.height=i.size.width/i.aspectRatio,a=!1),i.position.left=e.helper?s.left:0),h.top<(i._helper?s.top:0)&&(i.size.height=i.size.height+(i._helper?i.position.top-s.top:i.position.top),t&&(i.size.width=i.size.height*i.aspectRatio,a=!1),i.position.top=i._helper?s.top:0),o=i.containerElement.get(0)===i.element.parent().get(0),e=/relative|absolute/.test(i.containerElement.css("position")),o&&e?(i.offset.left=i.parentData.left+i.position.left,i.offset.top=i.parentData.top+i.position.top):(i.offset.left=i.element.offset().left,i.offset.top=i.element.offset().top),h=Math.abs(i.sizeDiff.width+(i._helper?i.offset.left-n.left:i.offset.left-s.left)),o=Math.abs(i.sizeDiff.height+(i._helper?i.offset.top-n.top:i.offset.top-s.top)),h+i.size.width>=i.parentData.width&&(i.size.width=i.parentData.width-h,t&&(i.size.height=i.size.width/i.aspectRatio,a=!1)),o+i.size.height>=i.parentData.height&&(i.size.height=i.parentData.height-o,t&&(i.size.width=i.size.height*i.aspectRatio,a=!1)),a||(i.position.left=i.prevPosition.left,i.position.top=i.prevPosition.top,i.size.width=i.prevSize.width,i.size.height=i.prevSize.height)},stop:function(){var t=z(this).resizable("instance"),i=t.options,e=t.containerOffset,s=t.containerPosition,h=t.containerElement,n=z(t.helper),o=n.offset(),a=n.outerWidth()-t.sizeDiff.width,n=n.outerHeight()-t.sizeDiff.height;t._helper&&!i.animate&&/relative/.test(h.css("position"))&&z(this).css({left:o.left-s.left-e.left,width:a,height:n}),t._helper&&!i.animate&&/static/.test(h.css("position"))&&z(this).css({left:o.left-s.left-e.left,width:a,height:n})}}),z.ui.plugin.add("resizable","alsoResize",{start:function(){var t=z(this).resizable("instance").options;z(t.alsoResize).each(function(){var t=z(this);t.data("ui-resizable-alsoresize",{width:parseFloat(t.width()),height:parseFloat(t.height()),left:parseFloat(t.css("left")),top:parseFloat(t.css("top"))})})},resize:function(t,e){var i=z(this).resizable("instance"),s=i.options,h=i.originalSize,n=i.originalPosition,o={height:i.size.height-h.height||0,width:i.size.width-h.width||0,top:i.position.top-n.top||0,left:i.position.left-n.left||0};z(s.alsoResize).each(function(){var t=z(this),s=z(this).data("ui-resizable-alsoresize"),h={},i=t.parents(e.originalElement[0]).length?["width","height"]:["width","height","top","left"];z.each(i,function(t,i){var e=(s[i]||0)+(o[i]||0);e&&0<=e&&(h[i]=e||null)}),t.css(h)})},stop:function(){z(this).removeData("ui-resizable-alsoresize")}}),z.ui.plugin.add("resizable","ghost",{start:function(){var t=z(this).resizable("instance"),i=t.size;t.ghost=t.originalElement.clone(),t.ghost.css({opacity:.25,display:"block",position:"relative",height:i.height,width:i.width,margin:0,left:0,top:0}),t._addClass(t.ghost,"ui-resizable-ghost"),!1!==z.uiBackCompat&&"string"==typeof t.options.ghost&&t.ghost.addClass(this.options.ghost),t.ghost.appendTo(t.helper)},resize:function(){var t=z(this).resizable("instance");t.ghost&&t.ghost.css({position:"relative",height:t.size.height,width:t.size.width})},stop:function(){var t=z(this).resizable("instance");t.ghost&&t.helper&&t.helper.get(0).removeChild(t.ghost.get(0))}}),z.ui.plugin.add("resizable","grid",{resize:function(){var t,i=z(this).resizable("instance"),e=i.options,s=i.size,h=i.originalSize,n=i.originalPosition,o=i.axis,a="number"==typeof e.grid?[e.grid,e.grid]:e.grid,l=a[0]||1,r=a[1]||1,p=Math.round((s.width-h.width)/l)*l,s=Math.round((s.height-h.height)/r)*r,d=h.width+p,g=h.height+s,u=e.maxWidth&&e.maxWidth<d,c=e.maxHeight&&e.maxHeight<g,f=e.minWidth&&e.minWidth>d,m=e.minHeight&&e.minHeight>g;e.grid=a,f&&(d+=l),m&&(g+=r),u&&(d-=l),c&&(g-=r),/^(se|s|e)$/.test(o)?(i.size.width=d,i.size.height=g):/^(ne)$/.test(o)?(i.size.width=d,i.size.height=g,i.position.top=n.top-s):/^(sw)$/.test(o)?(i.size.width=d,i.size.height=g,i.position.left=n.left-p):((g-r<=0||d-l<=0)&&(t=i._getPaddingPlusBorderDimensions(this)),0<g-r?(i.size.height=g,i.position.top=n.top-s):(g=r-t.height,i.size.height=g,i.position.top=n.top+h.height-g),0<d-l?(i.size.width=d,i.position.left=n.left-p):(d=l-t.width,i.size.width=d,i.position.left=n.left+h.width-d))}}),z.ui.resizable});
402;/*!
403 * jQuery UI Draggable 1.13.2
404 * http://jqueryui.com
405 *
406 * Copyright jQuery Foundation and other contributors
407 * Released under the MIT license.
408 * http://jquery.org/license
409 */
410!function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery","./mouse","./core"],t):t(jQuery)}(function(P){"use strict";return P.widget("ui.draggable",P.ui.mouse,{version:"1.13.2",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"===this.options.helper&&this._setPositionRelative(),this.options.addClasses&&this._addClass("ui-draggable"),this._setHandleClassName(),this._mouseInit()},_setOption:function(t,e){this._super(t,e),"handle"===t&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){(this.helper||this.element).is(".ui-draggable-dragging")?this.destroyOnClear=!0:(this._removeHandleClassName(),this._mouseDestroy())},_mouseCapture:function(t){var e=this.options;return!(this.helper||e.disabled||0<P(t.target).closest(".ui-resizable-handle").length)&&(this.handle=this._getHandle(t),!!this.handle&&(this._blurActiveElement(t),this._blockFrames(!0===e.iframeFix?"iframe":e.iframeFix),!0))},_blockFrames:function(t){this.iframeBlocks=this.document.find(t).map(function(){var t=P(this);return P("<div>").css("position","absolute").appendTo(t.parent()).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()).offset(t.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(t){var e=P.ui.safeActiveElement(this.document[0]);P(t.target).closest(e).length||P.ui.safeBlur(e)},_mouseStart:function(t){var e=this.options;return this.helper=this._createHelper(t),this._addClass(this.helper,"ui-draggable-dragging"),this._cacheHelperProportions(),P.ui.ddmanager&&(P.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.hasFixedAncestor=0<this.helper.parents().filter(function(){return"fixed"===P(this).css("position")}).length,this.positionAbs=this.element.offset(),this._refreshOffsets(t),this.originalPosition=this.position=this._generatePosition(t,!1),this.originalPageX=t.pageX,this.originalPageY=t.pageY,e.cursorAt&&this._adjustOffsetFromHelper(e.cursorAt),this._setContainment(),!1===this._trigger("start",t)?(this._clear(),!1):(this._cacheHelperProportions(),P.ui.ddmanager&&!e.dropBehaviour&&P.ui.ddmanager.prepareOffsets(this,t),this._mouseDrag(t,!0),P.ui.ddmanager&&P.ui.ddmanager.dragStart(this,t),!0)},_refreshOffsets:function(t){this.offset={top:this.positionAbs.top-this.margins.top,left
vendor: 5,284 bytes, line 410
410:this.positionAbs.left-this.margins.left,scroll:!1,parent:this._getParentOffset(),relative:this._getRelativeOffset()},this.offset.click={left:t.pageX-this.offset.left,top:t.pageY-this.offset.top}},_mouseDrag:function(t,e){if(this.hasFixedAncestor&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(t,!0),this.positionAbs=this._convertPositionTo("absolute"),!e){e=this._uiHash();if(!1===this._trigger("drag",t,e))return this._mouseUp(new P.Event("mouseup",t)),!1;this.position=e.position}return this.helper[0].style.left=this.position.left+"px",this.helper[0].style.top=this.position.top+"px",P.ui.ddmanager&&P.ui.ddmanager.drag(this,t),!1},_mouseStop:function(t){var e=this,s=!1;return P.ui.ddmanager&&!this.options.dropBehaviour&&(s=P.ui.ddmanager.drop(this,t)),this.dropped&&(s=this.dropped,this.dropped=!1),"invalid"===this.options.revert&&!s||"valid"===this.options.revert&&s||!0===this.options.revert||"function"==typeof this.options.revert&&this.options.revert.call(this.element,s)?P(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){!1!==e._trigger("stop",t)&&e._clear()}):!1!==this._trigger("stop",t)&&this._clear(),!1},_mouseUp:function(t){return this._unblockFrames(),P.ui.ddmanager&&P.ui.ddmanager.dragStop(this,t),this.handleElement.is(t.target)&&this.element.trigger("focus"),P.ui.mouse.prototype._mouseUp.call(this,t)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp(new P.Event("mouseup",{target:this.element[0]})):this._clear(),this},_getHandle:function(t){return!this.options.handle||!!P(t.target).closest(this.element.find(this.options.handle)).length},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element,this._addClass(this.handleElement,"ui-draggable-handle")},_removeHandleClassName:function(){this._removeClass(this.handleElement,"ui-draggable-handle")},_createHelper:function(t){var e=this.options,s="function"==typeof e.helper,t=s?P(e.helper.apply(this.element[0],[t])):"clone"===e.helper?this.element.clone().removeAttr("id"):this.element;return t.parents("body").length||t.appendTo("parent"===e.appendTo?this.element[0].parentNode:e.appendTo),s&&t[0]===this.element[0]&&this._setPositionRelative(),t[0]===this.element[0]||/(fixed|absolute)/.test(t.css("position"))||t.css("position","absolute"),t},_setPositionRelative:function(){/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative")},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),"left"in(t=Array.isArray(t)?{left:+t[0],top:+t[1]||0}:t)&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_isRootNode:function(t){return/(html|body)/i.test(t.tagName)||t===this.document[0]},_getParentOffset:function(){var t=this.offsetParent.offset(),e=this.document[0];return"absolute"===this.cssPosition&&this.scrollParent[0]!==e&&P.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),{top:(t=this._isRootNode(this.offsetParent[0])?{top:0,left:0}:t).top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){var t,e;return"relative"!==this.cssPosition?{top:0,left:0}:(t=this.element.position(),e=this._isRootNode(this.scrollParent[0]),{top:t.top-(parseInt(this.helper.css("top"),10)||0)+(e?0:this.scrollParent.scrollTop()),left:t.left-(parseInt(this.helper.css("left"),10)||0)+(e?0:this.scrollParent.scrollLeft())})},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,e=this.options,s=this.document[0];this.relativeContainer=null,e.containment?"window"===e.containment?this.containment=[P(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,P(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,P(window).scrollLeft()+P(window).width()-this.helperProportions.width-this.margins.left,P(window).scrollTop()+(P(window).height()||s.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]:"document"===e.containment?this.containment=[0,0,P(s).width()-this.helperProportions.width-this.margins.left,(P(s).height()||s.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]:e.containment.constructor===Array?this.containment=e.containment:("parent"===e.containment&&(e.containment=this.helper[0].parentNode),(e=(s=P(e.containment))[0])&&(t=/(scroll|auto)/.test(s.css("overflow")),this.containment=[(parseInt(s.css("borderLeftWidth"),10)||0)+(parseInt(s.css("paddingLeft"),10)||0),(parseInt(s.css("borderTopWidth"),
vendor: 2,864 bytes, line 410
41010)||0)+(parseInt(s.css("paddingTop"),10)||0),(t?Math.max(e.scrollWidth,e.offsetWidth):e.offsetWidth)-(parseInt(s.css("borderRightWidth"),10)||0)-(parseInt(s.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(t?Math.max(e.scrollHeight,e.offsetHeight):e.offsetHeight)-(parseInt(s.css("borderBottomWidth"),10)||0)-(parseInt(s.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=s)):this.containment=null},_convertPositionTo:function(t,e){e=e||this.position;var t="absolute"===t?1:-1,s=this._isRootNode(this.scrollParent[0]);return{top:e.top+this.offset.relative.top*t+this.offset.parent.top*t-("fixed"===this.cssPosition?-this.offset.scroll.top:s?0:this.offset.scroll.top)*t,left:e.left+this.offset.relative.left*t+this.offset.parent.left*t-("fixed"===this.cssPosition?-this.offset.scroll.left:s?0:this.offset.scroll.left)*t}},_generatePosition:function(t,e){var s,i=this.options,o=this._isRootNode(this.scrollParent[0]),n=t.pageX,r=t.pageY;return o&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),e&&(this.containment&&(s=this.relativeContainer?(e=this.relativeContainer.offset(),[this.containment[0]+e.left,this.containment[1]+e.top,this.containment[2]+e.left,this.containment[3]+e.top]):this.containment,t.pageX-this.offset.click.left<s[0]&&(n=s[0]+this.offset.click.left),t.pageY-this.offset.click.top<s[1]&&(r=s[1]+this.offset.click.top),t.pageX-this.offset.click.left>s[2]&&(n=s[2]+this.offset.click.left),t.pageY-this.offset.click.top>s[3]&&(r=s[3]+this.offset.click.top)),i.grid&&(e=i.grid[1]?this.originalPageY+Math.round((r-this.originalPageY)/i.grid[1])*i.grid[1]:this.originalPageY,r=!s||e-this.offset.click.top>=s[1]||e-this.offset.click.top>s[3]?e:e-this.offset.click.top>=s[1]?e-i.grid[1]:e+i.grid[1],t=i.grid[0]?this.originalPageX+Math.round((n-this.originalPageX)/i.grid[0])*i.grid[0]:this.originalPageX,n=!s||t-this.offset.click.left>=s[0]||t-this.offset.click.left>s[2]?t:t-this.offset.click.left>=s[0]?t-i.grid[0]:t+i.grid[0]),"y"===i.axis&&(n=this.originalPageX),"x"===i.axis&&(r=this.originalPageY)),{top:r-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:o?0:this.offset.scroll.top),left:n-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:o?0:this.offset.scroll.left)}},_clear:function(){this._removeClass(this.helper,"ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_trigger:function(t,e,s){return s=s||this._uiHash(),P.ui.plugin.call(this,t,[e,s,this],!0),/^(drag|start|stop
vendor: 4,805 bytes, line 410
410)/.test(t)&&(this.positionAbs=this._convertPositionTo("absolute"),s.offset=this.positionAbs),P.Widget.prototype._trigger.call(this,t,e,s)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),P.ui.plugin.add("draggable","connectToSortable",{start:function(e,t,s){var i=P.extend({},t,{item:s.element});s.sortables=[],P(s.options.connectToSortable).each(function(){var t=P(this).sortable("instance");t&&!t.options.disabled&&(s.sortables.push(t),t.refreshPositions(),t._trigger("activate",e,i))})},stop:function(e,t,s){var i=P.extend({},t,{item:s.element});s.cancelHelperRemoval=!1,P.each(s.sortables,function(){var t=this;t.isOver?(t.isOver=0,s.cancelHelperRemoval=!0,t.cancelHelperRemoval=!1,t._storedCSS={position:t.placeholder.css("position"),top:t.placeholder.css("top"),left:t.placeholder.css("left")},t._mouseStop(e),t.options.helper=t.options._helper):(t.cancelHelperRemoval=!0,t._trigger("deactivate",e,i))})},drag:function(s,i,o){P.each(o.sortables,function(){var t=!1,e=this;e.positionAbs=o.positionAbs,e.helperProportions=o.helperProportions,e.offset.click=o.offset.click,e._intersectsWith(e.containerCache)&&(t=!0,P.each(o.sortables,function(){return this.positionAbs=o.positionAbs,this.helperProportions=o.helperProportions,this.offset.click=o.offset.click,t=this!==e&&this._intersectsWith(this.containerCache)&&P.contains(e.element[0],this.element[0])?!1:t})),t?(e.isOver||(e.isOver=1,o._parent=i.helper.parent(),e.currentItem=i.helper.appendTo(e.element).data("ui-sortable-item",!0),e.options._helper=e.options.helper,e.options.helper=function(){return i.helper[0]},s.target=e.currentItem[0],e._mouseCapture(s,!0),e._mouseStart(s,!0,!0),e.offset.click.top=o.offset.click.top,e.offset.click.left=o.offset.click.left,e.offset.parent.left-=o.offset.parent.left-e.offset.parent.left,e.offset.parent.top-=o.offset.parent.top-e.offset.parent.top,o._trigger("toSortable",s),o.dropped=e.element,P.each(o.sortables,function(){this.refreshPositions()}),o.currentItem=o.element,e.fromOutside=o),e.currentItem&&(e._mouseDrag(s),i.position=e.position)):e.isOver&&(e.isOver=0,e.cancelHelperRemoval=!0,e.options._revert=e.options.revert,e.options.revert=!1,e._trigger("out",s,e._uiHash(e)),e._mouseStop(s,!0),e.options.revert=e.options._revert,e.options.helper=e.options._helper,e.placeholder&&e.placeholder.remove(),i.helper.appendTo(o._parent),o._refreshOffsets(s),i.position=o._generatePosition(s,!0),o._trigger("fromSortable",s),o.dropped=!1,P.each(o.sortables,function(){this.refreshPositions()}))})}}),P.ui.plugin.add("draggable","cursor",{start:function(t,e,s){var i=P("body"),s=s.options;i.css("cursor")&&(s._cursor=i.css("cursor")),i.css("cursor",s.cursor)},stop:function(t,e,s){s=s.options;s._cursor&&P("body").css("cursor",s._cursor)}}),P.ui.plugin.add("draggable","opacity",{start:function(t,e,s){e=P(e.helper),s=s.options;e.css("opacity")&&(s._opacity=e.css("opacity")),e.css("opacity",s.opacity)},stop:function(t,e,s){s=s.options;s._opacity&&P(e.helper).css("opacity",s._opacity)}}),P.ui.plugin.add("draggable","scroll",{start:function(t,e,s){s.scrollParentNotHidden||(s.scrollParentNotHidden=s.helper.scrollParent(!1)),s.scrollParentNotHidden[0]!==s.document[0]&&"HTML"!==s.scrollParentNotHidden[0].tagName&&(s.overflowOffset=s.scrollParentNotHidden.offset())},drag:function(t,e,s){var i=s.options,o=!1,n=s.scrollParentNotHidden[0],r=s.document[0];n!==r&&"HTML"!==n.tagName?(i.axis&&"x"===i.axis||(s.overflowOffset.top+n.offsetHeight-t.pageY<i.scrollSensitivity?n.scrollTop=o=n.scrollTop+i.scrollSpeed:t.pageY-s.overflowOffset.top<i.scrollSensitivity&&(n.scrollTop=o=n.scrollTop-i.scrollSpeed)),i.axis&&"y"===i.axis||(s.overflowOffset.left+n.offsetWidth-t.pageX<i.scrollSensitivity?n.scrollLeft=o=n.scrollLeft+i.scrollSpeed:t.pageX-s.overflowOffset.left<i.scrollSensitivity&&(n.scrollLeft=o=n.scrollLeft-i.scrollSpeed))):(i.axis&&"x"===i.axis||(t.pageY-P(r).scrollTop()<i.scrollSensitivity?o=P(r).scrollTop(P(r).scrollTop()-i.scrollSpeed):P(window).height()-(t.pageY-P(r).scrollTop())<i.scrollSensitivity&&(o=P(r).scrollTop(P(r).scrollTop()+i.scrollSpeed))),i.axis&&"y"===i.axis||(t.pageX-P(r).scrollLeft()<i.scrollSensitivity?o=P(r).scrollLeft(P(r).scrollLeft()-i.scrollSpeed):P(window).width()-(t.pageX-P(r).scrollLeft())<i.scrollSensitivity&&(o=P(r).scrollLeft(P(r).scrollLeft()+i.scrollSpeed)))),!1!==o&&P.ui.ddmanager&&!i.dropBehaviour&&P.ui.ddmanager.prepareOffsets(s,t)}}),P.ui.plugin.add("draggable","snap",{start:function(t,e,s){var i=s.options;s.snapElements=[],P(i.snap.constructor!==String?i.snap.items||":data(ui-draggable)":i.snap).each(function(){var t=P(this),e=t.offset();this!==s.element[0]&&s.snapElements.push({item:this,width:t.outerWidth(),height:t.outerHeight(),top:e.top,left
vendor: 8,636 bytes, lines 410-428
410:e.left})})},drag:function(t,e,s){for(var i,o,n,r,l,a,h,p,c,f=s.options,d=f.snapTolerance,g=e.offset.left,u=g+s.helperProportions.width,m=e.offset.top,v=m+s.helperProportions.height,_=s.snapElements.length-1;0<=_;_--)a=(l=s.snapElements[_].left-s.margins.left)+s.snapElements[_].width,p=(h=s.snapElements[_].top-s.margins.top)+s.snapElements[_].height,u<l-d||a+d<g||v<h-d||p+d<m||!P.contains(s.snapElements[_].item.ownerDocument,s.snapElements[_].item)?(s.snapElements[_].snapping&&s.options.snap.release&&s.options.snap.release.call(s.element,t,P.extend(s._uiHash(),{snapItem:s.snapElements[_].item})),s.snapElements[_].snapping=!1):("inner"!==f.snapMode&&(i=Math.abs(h-v)<=d,o=Math.abs(p-m)<=d,n=Math.abs(l-u)<=d,r=Math.abs(a-g)<=d,i&&(e.position.top=s._convertPositionTo("relative",{top:h-s.helperProportions.height,left:0}).top),o&&(e.position.top=s._convertPositionTo("relative",{top:p,left:0}).top),n&&(e.position.left=s._convertPositionTo("relative",{top:0,left:l-s.helperProportions.width}).left),r&&(e.position.left=s._convertPositionTo("relative",{top:0,left:a}).left)),c=i||o||n||r,"outer"!==f.snapMode&&(i=Math.abs(h-m)<=d,o=Math.abs(p-v)<=d,n=Math.abs(l-g)<=d,r=Math.abs(a-u)<=d,i&&(e.position.top=s._convertPositionTo("relative",{top:h,left:0}).top),o&&(e.position.top=s._convertPositionTo("relative",{top:p-s.helperProportions.height,left:0}).top),n&&(e.position.left=s._convertPositionTo("relative",{top:0,left:l}).left),r&&(e.position.left=s._convertPositionTo("relative",{top:0,left:a-s.helperProportions.width}).left)),!s.snapElements[_].snapping&&(i||o||n||r||c)&&s.options.snap.snap&&s.options.snap.snap.call(s.element,t,P.extend(s._uiHash(),{snapItem:s.snapElements[_].item})),s.snapElements[_].snapping=i||o||n||r||c)}}),P.ui.plugin.add("draggable","stack",{start:function(t,e,s){var i,s=s.options,s=P.makeArray(P(s.stack)).sort(function(t,e){return(parseInt(P(t).css("zIndex"),10)||0)-(parseInt(P(e).css("zIndex"),10)||0)});s.length&&(i=parseInt(P(s[0]).css("zIndex"),10)||0,P(s).each(function(t){P(this).css("zIndex",i+t)}),this.css("zIndex",i+s.length))}}),P.ui.plugin.add("draggable","zIndex",{start:function(t,e,s){e=P(e.helper),s=s.options;e.css("zIndex")&&(s._zIndex=e.css("zIndex")),e.css("zIndex",s.zIndex)},stop:function(t,e,s){s=s.options;s._zIndex&&P(e.helper).css("zIndex",s._zIndex)}}),P.ui.draggable});
411;/*!
412 * jQuery UI Controlgroup 1.13.2
413 * http://jqueryui.com
414 *
415 * Copyright jQuery Foundation and other contributors
416 * Released under the MIT license.
417 * http://jquery.org/license
418 */
419!function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery","./core"],t):t(jQuery)}(function(r){"use strict";var s=/ui-corner-([a-z]){2,6}/g;r.widget("ui.controlgroup",{version:"1.13.2",defaultElement:"<div>",options:{direction:"horizontal",disabled:null,onlyVisible:!0,items:{button:"input[type=button], input[type=submit], input[type=reset], button, a",controlgroupLabel:".ui-controlgroup-label",checkboxradio:"input[type='checkbox'], input[type='radio']",selectmenu:"select",spinner:".ui-spinner-input"}},_create:function(){this._enhance()},_enhance:function(){this.element.attr("role","toolbar"),this.refresh()},_destroy:function(){this._callChildMethod("destroy"),this.childWidgets.removeData("ui-controlgroup-data"),this.element.removeAttr("role"),this.options.items.controlgroupLabel&&this.element.find(this.options.items.controlgroupLabel).find(".ui-controlgroup-label-contents").contents().unwrap()},_initWidgets:function(){var s=this,l=[];r.each(this.options.items,function(n,t){var e,o={};t&&("controlgroupLabel"===n?((e=s.element.find(t)).each(function(){var t=r(this);t.children(".ui-controlgroup-label-contents").length||t.contents().wrapAll("<span class='ui-controlgroup-label-contents'></span>")}),s._addClass(e,null,"ui-widget ui-widget-content ui-state-default"),l=l.concat(e.get())):r.fn[n]&&(o=s["_"+n+"Options"]?s["_"+n+"Options"]("middle"):{classes:{}},s.element.find(t).each(function(){var t=r(this),e=t[n]("instance"),i=r.widget.extend({},o);"button"===n&&t.parent(".ui-spinner").length||((e=e||t[n]()[n]("instance"))&&(i.classes=s._resolveClassesValues(i.classes,e)),t[n](i),i=t[n]("widget"),r.data(i[0],"ui-controlgroup-data",e||t[n]("instance")),l.push(i[0]))})))}),this.childWidgets=r(r.uniqueSort(l)),this._addClass(this.childWidgets,"ui-controlgroup-item")},_callChildMethod:function(e){this.childWidgets.each(function(){var t=r(this).data("ui-controlgroup-data");t&&t[e]&&t[e]()})},_updateCornerClass:function(t,e){e=this._buildSimpleOptions(e,"label").classes.label;this._removeClass(t,null,"ui-corner-top ui-corner-bottom ui-corner-left ui-corner-right ui-corner-all"),this._addClass(t,null,e)},_buildSimpleOptions:function(t,e){var i="vertical"===this.options.direction,n={classes:{}};return n.classes[e]={middle:"",first:"ui-corner-"+(i?"top":"left"),last:"ui-corner-"+(i?"bottom":"right"),only:"ui-corner-all"}[t],n},_spinnerOptions:function(t){t=this._buildSimpleOptions(t,"ui-spinner");return t.classes["ui-spinner-up"]="",t.classes["ui-spinner-down"]="",t},_buttonOptions:function(t){return this._buildSimpleOptions(t,"ui-button")},_checkboxradioOptions:function(t){return this._buildSimpleOptions(t,"ui-checkboxradio-label")},_selectmenuOptions:function(t){var e="vertical"===this.options.direction;return{width:e&&"auto",classes:{middle:{"ui-selectmenu-button-open":"","ui-selectmenu-button-closed":""},first:{"ui-selectmenu-button-open":"ui-corner-"+(e?"top":"tl"),"ui-selectmenu-button-closed":"ui-corner-"+(e?"top":"left")},last:{"ui-selectmenu-button-open":e?"":"ui-corner-tr","ui-selectmenu-button-closed":"ui-corner-"+(e?"bottom":"right")},only:{"ui-selectmenu-button-open":"ui-corner-top","ui-selectmenu-button-closed":"ui-corner-all"}}[t]}},_resolveClassesValues:function(i,n){var o={};return r.each(i,function(t){var e=n.options.classes[t]||"",e=String.prototype.trim.call(e.replace(s,""));o[t]=(e+" "+i[t]).replace(/\s+/g," ")}),o},_setOption:function(t,e){"direction"===t&&this._removeClass("ui-controlgroup-"+this.options.direction),this._super(t,e),"disabled"===t?this._callChildMethod(e?"disable":"enable"):this.refresh()},refresh:function(){var o,s=this;this._addClass("ui-controlgroup ui-controlgroup-"+this.options.direction),"horizontal"===this.options.direction&&this._addClass(null,"ui-helper-clearfix"),this._initWidgets(),o=this.childWidgets,(o=this.options.onlyVisible?o.filter(":visible"):o).length&&(r.each(["first","last"],function(t,e){var i,n=o[e]().data("ui-controlgroup-data");n&&s["_"+n.widgetName+"Options"]?((i=s["_"+n.widgetName+"Options"](1===o.length?"only":e)).classes=s._resolveClassesValues(i.classes,n),n.element[n.widgetName](i)):s._updateCornerClass(o[e](),e)}),this._callChildMethod("refresh"))}})});
420;/*!
421 * jQuery UI Checkboxradio 1.13.2
422 * http://jqueryui.com
423 *
424 * Copyright jQuery Foundation and other contributors
425 * Released under the MIT license.
426 * http://jquery.org/license
427 */
428!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","./core"],e):e(jQuery)}(function(t){"use strict";return t.widget("ui.checkboxradio",[t.ui.formResetMixin,{version:"1.13.2",options:{disabled:null,label:null,icon:!0,classes:{"ui-checkboxradio-label":"ui-corner-all","ui-checkboxradio-icon":"ui-corner-all"}},_getCreateOptions:function(){var e,i=this._super()||{};return this._readType(),e=this.element.labels(),this.label=t(e[e.length-1]),this.label.length||t.error("No label found for checkboxradio widget"),this.originalLabel="",(e=this.label.contents().not(this.element[0])).length&&(this.originalLabel+=e.clone().wrapAll("<div></div>").parent().html()),this.originalLabel&&(i.label=this.originalLabel),null!=(e=this.element[0].disabled)&&(i.disabled=e),i},_create:function(){var e=this.element[0].checked;this._bindFormResetHandler(),null==this.options.disabled&&(this.options.disabled=this.element[0].disabled),this._setOption("disabled",this.options.disabled),this._addClass("ui-checkboxradio","ui-helper-hidden-accessible"),this._addClass(this.label,"ui-checkboxradio-label","ui-button ui-widget"),"radio"===this.type&&this._addClass(this.label,"ui-checkboxradio-radio-label"),this.options.label&&this.options.label!==this.originalLabel?this._updateLabel():this.originalLabel&&(this.options.label=this.originalLabel),this._enhance(),e&&this._addClass(this.label,"ui-checkboxradio-checked","ui-state-active"),this._on({change:"_toggleClasses",focus:function(){this._addClass(this.label,null,"ui-state-focus ui-visual-focus")},blur:function(){this._removeClass(this.label,null,"ui-state-focus ui-visual-focus")}})},_readType:function(){var e=this.element[0].nodeName.toLowerCase();
vendor: 1,411 bytes, line 428
428this.type=this.element[0].type,"input"===e&&/radio|checkbox/.test(this.type)||t.error("Can't create checkboxradio on element.nodeName="+e+" and element.type="+this.type)},_enhance:function(){this._updateIcon(this.element[0].checked)},widget:function(){return this.label},_getRadioGroup:function(){var e=this.element[0].name,i="input[name='"+t.escapeSelector(e)+"']";return e?(this.form.length?t(this.form[0].elements).filter(i):t(i).filter(function(){return 0===t(this)._form().length})).not(this.element):t([])},_toggleClasses:function(){var e=this.element[0].checked;this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",e),this.options.icon&&"checkbox"===this.type&&this._toggleClass(this.icon,null,"ui-icon-check ui-state-checked",e)._toggleClass(this.icon,null,"ui-icon-blank",!e),"radio"===this.type&&this._getRadioGroup().each(function(){var e=t(this).checkboxradio("instance");e&&e._removeClass(e.label,"ui-checkboxradio-checked","ui-state-active")})},_destroy:function(){this._unbindFormResetHandler(),this.icon&&(this.icon.remove(),this.iconSpace.remove())},_setOption:function(e,i){"label"===e&&!i||(this._super(e,i),"disabled"===e?(this._toggleClass(this.label,null,"ui-state-disabled",i),this.element[0].disabled=i):this.refresh())},_updateIcon:function(e){var i="ui-icon ui-icon-background ";this.options.icon?(this.icon||(this.icon=t("<span>"),this.iconSpace=t("<span> </span>
vendor: 9,285 bytes, lines 428-446
428"),this._addClass(this.iconSpace,"ui-checkboxradio-icon-space")),"checkbox"===this.type?(i+=e?"ui-icon-check ui-state-checked":"ui-icon-blank",this._removeClass(this.icon,null,e?"ui-icon-blank":"ui-icon-check")):i+="ui-icon-blank",this._addClass(this.icon,"ui-checkboxradio-icon",i),e||this._removeClass(this.icon,null,"ui-icon-check ui-state-checked"),this.icon.prependTo(this.label).after(this.iconSpace)):void 0!==this.icon&&(this.icon.remove(),this.iconSpace.remove(),delete this.icon)},_updateLabel:function(){var e=this.label.contents().not(this.element[0]);this.icon&&(e=e.not(this.icon[0])),(e=this.iconSpace?e.not(this.iconSpace[0]):e).remove(),this.label.append(this.options.label)},refresh:function(){var e=this.element[0].checked,i=this.element[0].disabled;this._updateIcon(e),this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",e),null!==this.options.label&&this._updateLabel(),i!==this.options.disabled&&this._setOptions({disabled:i})}}]),t.ui.checkboxradio});
429;/*!
430 * jQuery UI Button 1.13.2
431 * http://jqueryui.com
432 *
433 * Copyright jQuery Foundation and other contributors
434 * Released under the MIT license.
435 * http://jquery.org/license
436 */
437!function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery","./controlgroup","./checkboxradio","./core"],t):t(jQuery)}(function(e){"use strict";var h;return e.widget("ui.button",{version:"1.13.2",defaultElement:"<button>",options:{classes:{"ui-button":"ui-corner-all"},disabled:null,icon:null,iconPosition:"beginning",label:null,showLabel:!0},_getCreateOptions:function(){var t,i=this._super()||{};return this.isInput=this.element.is("input"),null!=(t=this.element[0].disabled)&&(i.disabled=t),this.originalLabel=this.isInput?this.element.val():this.element.html(),this.originalLabel&&(i.label=this.originalLabel),i},_create:function(){!this.option.showLabel&!this.options.icon&&(this.options.showLabel=!0),null==this.options.disabled&&(this.options.disabled=this.element[0].disabled||!1),this.hasTitle=!!this.element.attr("title"),this.options.label&&this.options.label!==this.originalLabel&&(this.isInput?this.element.val(this.options.label):this.element.html(this.options.label)),this._addClass("ui-button","ui-widget"),this._setOption("disabled",this.options.disabled),this._enhance(),this.element.is("a")&&this._on({keyup:function(t){t.keyCode===e.ui.keyCode.SPACE&&(t.preventDefault(),this.element[0].click?this.element[0].click():this.element.trigger("click"))}})},_enhance:function(){this.element.is("button")||this.element.attr("role","button"),this.options.icon&&(this._updateIcon("icon",this.options.icon),this._updateTooltip())},_updateTooltip:function(){this.title=this.element.attr("title"),this.options.showLabel||this.title||this.element.attr("title",this.options.label)},_updateIcon:function(t,i){var t="iconPosition"!==t,o=t?this.options.iconPosition:i,s="top"===o||"bottom"===o;this.icon?t&&this._removeClass(this.icon,null,this.options.icon):(this.icon=e("<span>"),this._addClass(this.icon,"ui-button-icon","ui-icon"),this.options.showLabel||this._addClass("ui-button-icon-only")),t&&this._addClass(this.icon,null,i),this._attachIcon(o),s?(this._addClass(this.icon,null,"ui-widget-icon-block"),this.iconSpace&&this.iconSpace.remove()):(this.iconSpace||(this.iconSpace=e("<span> </span>"),this._addClass(this.iconSpace,"ui-button-icon-space")),this._removeClass(this.icon,null,"ui-wiget-icon-block"),this._attachIconSpace(o))},_destroy:function(){this.element.removeAttr("role"),this.icon&&this.icon.remove(),this.iconSpace&&this.iconSpace.remove(),this.hasTitle||this.element.removeAttr("title")},_attachIconSpace:function(t){this.icon[/^(?:end|bottom)/.test(t)?"before":"after"](this.iconSpace)},_attachIcon:function(t){this.element[/^(?:end|bottom)/.test(t)?"append":"prepend"](this.icon)},_setOptions:function(t){var i=(void 0===t.showLabel?this.options:t).showLabel,o=(void 0===t.icon?this.options:t).icon;i||o||(t.showLabel=!0),this._super(t)},_setOption:function(t,i){"icon"===t&&(i?this._updateIcon(t,i):this.icon&&(this.icon.remove(),this.iconSpace&&this.iconSpace.remove())),"iconPosition"===t&&this._updateIcon(t,i),"showLabel"===t&&(this._toggleClass("ui-button-icon-only",null,!i),this._updateTooltip()),"label"===t&&(this.isInput?this.element.val(i):(this.element.html(i),this.icon&&(this._attachIcon(this.options.iconPosition),this._attachIconSpace(this.options.iconPosition)))),this._super(t,i),"disabled"===t&&(this._toggleClass(null,"ui-state-disabled",i),(this.element[0].disabled=i)&&this.element.trigger("blur"))},refresh:function(){var t=this.element.is("input, button")?this.element[0].disabled:this.element.hasClass("ui-button-disabled");t!==this.options.disabled&&this._setOptions({disabled:t}),this._updateTooltip()}}),!1!==e.uiBackCompat&&(e.widget("ui.button",e.ui.button,{options:{text:!0,icons:{primary:null,secondary:null}},_create:function(){this.options.showLabel&&!this.options.text&&(this.options.showLabel=this.options.text),!this.options.showLabel&&this.options.text&&(this.options.text=this.options.showLabel),this.options.icon||!this.options.icons.primary&&!this.options.icons.secondary?this.options.icon&&(this.options.icons.primary=this.options.icon):this.options.icons.primary?this.options.icon=this.options.icons.primary:(this.options.icon=this.options.icons.secondary,this.options.iconPosition="end"),this._super()},_setOption:function(t,i){"text"===t?this._super("showLabel",i):("showLabel"===t&&(this.options.text=i),"icon"===t&&(this.options.icons.primary=i),"icons"===t&&(i.primary?(this._super("icon",i.primary),this._super("iconPosition","beginning")):i.secondary&&(this._super("icon",i.secondary),this._super("iconPosition","end"))),this._superApply(arguments))}}),e.fn.button=(h=e.fn.button,function(o){var t="string"==typeof o,s=Array.prototype.slice.call(arguments,1),n=this;return t?this.length||"instance"!==o?this.each(function(){var t,i=e(this).attr("type"),i=e.data(this,"ui-"+("checkbox"!==i&&"radio"!==i?"button":"checkboxradio"));return"instance"===o?(n=i,!1):i?"function"!=typeof i[o]||"_"===o.charAt(0)?e.error("no such method '"+o+"' for button widget instance"):(t=i[o].apply(i,s))!==i&&void 0!==t?(n=t&&t.jquery?n.pushStack(t.get()):t,!1):void 0:e.error("cannot call methods on button prior to initialization; attempted to call method '"+o+"'")}):n=void 0:(s.length&&(o=e.widget.extend.apply(null,[o].concat(s))),this.each(function(){var t=e(this).attr("type"),t="checkbox"!==t&&"radio"!==t?"button":"checkboxradio",i=e.data(this,"ui-"+t);i?(i.option(o||{}),i._init&&i._init()):"button"==t?h.call(e(this),o):e(this).checkboxradio(e.extend({icon:!1},o))})),n}),e.fn.buttonset=function(){return e.ui.controlgroup||e.error("Controlgroup widget missing"),"option"===arguments[0]&&"items"===arguments[1]&&arguments[2]?this.controlgroup.apply(this,[arguments[0],"items.button",arguments[2]]):"option"===arguments[0]&&"items"===arguments[1]?this.controlgroup.apply(this,[arguments[0],"items.button"]):("object"==typeof arguments[0]&&arguments[0].items&&(arguments[0].items={button:arguments[0].items}),this.controlgroup.apply(this,arguments))}),e.ui.button});
438;/*!
439 * jQuery UI Dialog 1.13.2
440 * http://jqueryui.com
441 *
442 * Copyright jQuery Foundation and other contributors
443 * Released under the MIT license.
444 * http://jquery.org/license
445 */
446!function(i){"use strict";"function"==typeof define&&define.amd?define(["jquery","./button","./draggable","./mouse","./resizable","./core"],i):i(jQuery)}(function(l){"use strict";return l.widget("ui.dialog",{version:"1.13.2",options:{appendTo:"body",autoOpen:!0,buttons:[],classes:{"ui-dialog":"ui-corner-all","ui-dialog-titlebar":"ui-corner-all"},closeOnEscape:!0,closeText:"Close",draggable:!0,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(i){var t=l(this).css(i).offset().top;t<0&&l(this).css("top",i.top-t)}},resizable:!0,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},sizeRelatedOptions:{buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},resizableRelatedOptions:{maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height},this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.originalTitle=this.element.attr("title"),null==this.options.title&&null!=this.originalTitle&&(this.options.title=this.originalTitle),this.options.disabled&&(this.options.disabled=!1),this._createWrapper(),this.element.show().removeAttr("title").appendTo(this.uiDialog),this._addClass("ui-dialog-content","ui-widget-content"),this._createTitlebar(),this._createButtonPane(),this.options.draggable&&l.fn.draggable&&this._makeDraggable(),this.options.resizable&&l.fn.resizable&&this._makeResizable(),this._isOpen=!1,this._trackFocus()},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var i=this.options.appendTo;
vendor: 9,676 bytes, line 446
446return i&&(i.jquery||i.nodeType)?l(i):this.document.find(i||"body").eq(0)},_destroy:function(){var i,t=this.originalPosition;this._untrackInstance(),this._destroyOverlay(),this.element.removeUniqueId().css(this.originalCss).detach(),this.uiDialog.remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),(i=t.parent.children().eq(t.index)).length&&i[0]!==this.element[0]?i.before(this.element):t.parent.append(this.element)},widget:function(){return this.uiDialog},disable:l.noop,enable:l.noop,close:function(i){var t=this;this._isOpen&&!1!==this._trigger("beforeClose",i)&&(this._isOpen=!1,this._focusedElement=null,this._destroyOverlay(),this._untrackInstance(),this.opener.filter(":focusable").trigger("focus").length||l.ui.safeBlur(l.ui.safeActiveElement(this.document[0])),this._hide(this.uiDialog,this.options.hide,function(){t._trigger("close",i)}))},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(i,t){var e=!1,o=this.uiDialog.siblings(".ui-front:visible").map(function(){return+l(this).css("z-index")}).get(),o=Math.max.apply(null,o);return o>=+this.uiDialog.css("z-index")&&(this.uiDialog.css("z-index",o+1),e=!0),e&&!t&&this._trigger("focus",i),e},open:function(){var i=this;this._isOpen?this._moveToTop()&&this._focusTabbable():(this._isOpen=!0,this.opener=l(l.ui.safeActiveElement(this.document[0])),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this.overlay&&this.overlay.css("z-index",this.uiDialog.css("z-index")-1),this._show(this.uiDialog,this.options.show,function(){i._focusTabbable(),i._trigger("focus")}),this._makeFocusTarget(),this._trigger("open"))},_focusTabbable:function(){var i=this._focusedElement;(i=(i=(i=(i=(i=i||this.element.find("[autofocus]")).length?i:this.element.find(":tabbable")).length?i:this.uiDialogButtonPane.find(":tabbable")).length?i:this.uiDialogTitlebarClose.filter(":tabbable")).length?i:this.uiDialog).eq(0).trigger("focus")},_restoreTabbableFocus:function(){var i=l.ui.safeActiveElement(this.document[0]);this.uiDialog[0]===i||l.contains(this.uiDialog[0],i)||this._focusTabbable()},_keepFocus:function(i){i.preventDefault(),this._restoreTabbableFocus(),this._delay(this._restoreTabbableFocus)},_createWrapper:function(){this.uiDialog=l("<div>").hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo()),this._addClass(this.uiDialog,"ui-dialog","ui-widget ui-widget-content ui-front"),this._on(this.uiDialog,{keydown:function(i){var t,e,o;this.options.closeOnEscape&&!i.isDefaultPrevented()&&i.keyCode&&i.keyCode===l.ui.keyCode.ESCAPE?(i.preventDefault(),this.close(i)):i.keyCode!==l.ui.keyCode.TAB||i.isDefaultPrevented()||(t=this.uiDialog.find(":tabbable"),e=t.first(),o=t.last(),i.target!==o[0]&&i.target!==this.uiDialog[0]||i.shiftKey?i.target!==e[0]&&i.target!==this.uiDialog[0]||!i.shiftKey||(this._delay(function(){o.trigger("focus")}),i.preventDefault()):(this._delay(function(){e.trigger("focus")}),i.preventDefault()))},mousedown:function(i){this._moveToTop(i)&&this._focusTabbable()}}),this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var i;this.uiDialogTitlebar=l("<div>"),this._addClass(this.uiDialogTitlebar,"ui-dialog-titlebar","ui-widget-header ui-helper-clearfix"),this._on(this.uiDialogTitlebar,{mousedown:function(i){l(i.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.trigger("focus")}}),this.uiDialogTitlebarClose=l("<button type='button'></button>").button({label:l("<a>").text(this.options.closeText).html(),icon:"ui-icon-closethick",showLabel:!1}).appendTo(this.uiDialogTitlebar),this._addClass(this.uiDialogTitlebarClose,"ui-dialog-titlebar-close"),this._on(this.uiDialogTitlebarClose,{click:function(i){i.preventDefault(),this.close(i)}}),i=l("<span>").uniqueId().prependTo(this.uiDialogTitlebar),this._addClass(i,"ui-dialog-title"),this._title(i),this.uiDialogTitlebar.prependTo(this.uiDialog),this.uiDialog.attr({"aria-labelledby":i.attr("id")})},_title:function(i){this.options.title?i.text(this.options.title):i.html("&#160;")},_createButtonPane:function(){this.uiDialogButtonPane=l("<div>"),this._addClass(this.uiDialogButtonPane,"ui-dialog-buttonpane","ui-widget-content ui-helper-clearfix"),this.uiButtonSet=l("<div>").appendTo(this.uiDialogButtonPane),this._addClass(this.uiButtonSet,"ui-dialog-buttonset"),this._createButtons()},_createButtons:function(){var o=this,i=this.options.buttons;this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),l.isEmptyObject(i)||Array.isArray(i)&&!i.length?this._removeClass(this.uiDialog,"ui-dialog-buttons"):(l.each(i,function(i,t){var e;t=l.extend({type:"button"},t="function"==typeof t?{click:t,text:i}:t),e=t.click,i={icon:t.icon,iconPosition:t.iconPosition,showLabel:t.showLabel,icons:t.icons,text:t.text},delete t.click,delete t.icon,delete t.iconPosition,delete t.showLabel,delete t.icons,"boolean"==typeof t.text&&delete t.text,l("<button></button>",t).button(i).appendTo(o.uiButtonSet).on("click",function(){e.apply(o.element[0],arguments)})}),this._addClass(this.uiDialog,"ui-dialog-buttons"),this.uiDialogButtonPane.appendTo(this.uiDialog))},_makeDraggable:function(){var s=this,n=this.options;function a(i){return{position:i.position,offset:i.offset}}this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(i,t){s._addClass(l(this),"ui-dialog-dragging"),s._blockFrames(),s._trigger("dragStart",i,a(t))},drag:function(i,t){s._trigger("drag",i,a(t))},stop:function(i,t){var e=t.offset.left-s.document.scrollLeft(),o=t.offset.top-s.document.scrollTop();n.position={my:"left top",at:"left"+(0<=e?"+":"")+e+" top"+(0<=o?"+":"")+o,of:s.window},s._removeClass(l(this),"ui-dialog-dragging"),s._unblockFrames(),s._trigger("dragStop",i,a(t))}})},_makeResizable:function(){var s=this,n=this.options,i=n.resizable,t=this.uiDialog.css("position"),i="string"==typeof i?i:"n,e,s,w,se,sw,ne,nw";function a(i){return{originalPosition:i.originalPosition,originalSize:i.originalSize,position:i.position,size:i.size}}this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:n.maxWidth,maxHeight:n.maxHeight,minWidth:n.minWidth,minHeight:this._minHeight(),handles:i,start:function(i,t){s._addClass(l(this),"ui-dialog-resizing"),s._blockFrames(),s._trigger("resizeStart",i,a(t))},resize:function(i,t){s._trigger("resize",i,a(t))},stop:function(i,t){var e=s.uiDialog.offset(),o=e.left-s.document.scrollLeft(),e=e.top-s.document.scrollTop();n.height=s.uiDialog.height(),n.width=s.uiDialog.width(),n.position={my:"left top",at:"left"+(0<=o?"+":"")+o+" top"+(0<=e?"+":"")+e,of:s.window},s._removeClass(l(this),"ui-dialog-resizing"),s._unblockFrames(),s._trigger("resizeStop",i,a(t))}}).css("position",t)},_trackFocus:function(){this._on(this.widget(),{focusin:function(i){this._makeFocusTarget(),this._focusedElement=l(i.target)}})},_makeFocusTarget:function(){this._untrackInstance(),this._trackingInstances().unshift(this)},_untrackInstance:function(){var i=this._trackingInstances(),t=l.inArray(this,i);-1!==t&&i.splice(t,1)},_trackingInstances:function(){var i=this.document.data("ui-dialog-instances");return i||this.document.data("ui-dialog-instances",i=[]),i},_minHeight:function(){var i=this.options;return"auto"===i.height?i.minHeight:Math.min(i.minHeight,i.height)},_position:function(){var i=this.uiDialog.is(":visible");i||this.uiDialog.show(),this.uiDialog.position(this.options.position),i||this.uiDialog.hide()},_setOptions:function(i){var e=this,o=!1,s={};l.each(i,function(i,t){e._setOption(i,t),i in e.sizeRelatedOptions&&(o=!0),i in e.resizableRelatedOptions&&(s[i]=t)}),o&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",s)},_setOption:function(i,t){var e,o=this.uiDialog;"disabled"!==i&&(this._super(i,t),"appendTo"===i&&this.uiDialog.appendTo(this._appendTo()),"buttons"===i&&this._createButtons(),"closeText"===i&&this.uiDialogTitlebarClose.button({label:l("<a>").text(""+this.options.closeText).html()}),"draggable"===i&&((e=o.is(":data(ui-draggable)"))&&!t&&o.draggable("destroy"),!e&&t&&this._makeDraggable()),"position"===i&&this._position(),"resizable"===i&&((e=o.is(":data(ui-resizable)"))&&!t&&o.resizable("destroy"),e&&"string"==typeof t&&o.resizable("option","handles",t),e||!1===t||this._makeResizable()),"title"===i&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var i,t,e,o=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),o.minWidth>o.width&&(o.width=o.minWidth),i=this.uiDialog.css({height:"auto",width:o.width}).outerHeight(),t=Math.max(0,o.minHeight-i),e="number"==typeof o.maxHeight?Math.max(0,o.maxHeight-i):"none","auto"===o.height?this.element.css({minHeight:t,maxHeight:e,height:"auto"}):this.element.height(Math.max(0,o.height-i)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var i=l(this);return l("<div>").css({position:"absolute",width:i.outerWidth(),height:i.outerHeight()}).appendTo(i.parent()).offset(i.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(i){return!!l(i.target).closest(".ui-dialog").length||!!l(i.target).closest(".ui-datepicker").length},_createOverlay:function(){var e,o;this.options.modal&&(e=l.fn.jquery.substring(0,4),o=!0,this._delay(function(){o=!1}
446),this.document.data("ui-dialog-overlays")||this.document.on("focusin.ui-dialog",function(i){var t;o||((t=this._trackingInstances()[0])._allowInteraction(i)||(i.preventDefault(),t._focusTabbable(),"3.4."!==e&&"3.5."!==e||t._delay(t._restoreTabbableFocus)))}.bind(this)),this.overlay=l("<div>").appendTo(this._appendTo()),this._addClass(this.overlay,null,"ui-widget-overlay ui-front"),this._on(this.overlay,{mousedown:"_keepFocus"}),this.document.data("ui-dialog-overlays",(this.document.data("ui-dialog-overlays")||0)+1))},_destroyOverlay:function(){var i;this.options.modal&&this.overlay&&((i=this.document.data("ui-dialog-overlays")-1)?this.document.data("ui-dialog-overlays",i):(this.document.off("focusin.ui-dialog"),this.document.removeData("ui-dialog-overlays")),this.overlay.remove(),this.overlay=null)}}),!1!==l.uiBackCompat&&l.widget("ui.dialog",l.ui.dialog,{options:{dialogClass:""},_createWrapper:function(){this._super(),this.uiDialog.addClass(this.options.dialogClass)},_setOption:function(i,t){"dialogClass"===i&&this.uiDialog.removeClass(this.options.dialogClass).addClass(t),this._superApply(arguments)}}),l.ui.dialog});
447;jQuery(document).ready(function(){jQuery('#travel-companion-form').on('submit',function(e){let error=[];const name=jQuery('input[name="traveler_name"]').val();const gender=jQuery('select[name="gender"]').val();const email=jQuery('input[name="email"]').val();const phone=jQuery('input[name="phone"]').val();jQuery('input, select, div').removeClass('input_error');jQuery('div').removeClass('input_error_text');if(jQuery('input[name="country_ids[]"]:checked').length===0){error.push('Kelionės kryptis');jQuery('#destination-validation').addClass('input_error_text');}
448if(name.length===0){error.push('Vardas ir pavardė');jQuery('input[name="traveler_name"]').addClass('input_error');}
449if(gender===''){error.push('Lytis');jQuery('#gender-validation').addClass('input_error');}
450if(email.length===0){error.push('El. paštas');jQuery('input[name="email"]').addClass('input_error');}
451if(phone.length===0){error.push('Telefono numeris');jQuery('input[name="phone"]').addClass('input_error');}
452if(jQuery('input[name="terms"]:checked').length===0){error.push('Reikia susipažinti su sąlygomis ir tą patvirtinti');jQuery('#terms-validation').addClass('input_error_text');}
453if(error.length!==0){let html='<ul>';for(let key in error){html+='<li>'+error[key]+'</li>';}
454html+='<ul>';swal({title:'Klaida!',text:'Patikrink informaciją, nurodytą laukeliuose:<div class="alert-error-list-mob">'+html+'</div>',type:'error',html:true,confirmButtonColor:'#41c0f0',confirmButtonText:'SUPRATAU'});return false;}});jQuery('.action-country').change(function(){jQuery('.action-post').hide();jQuery('.action-country:checked').each(function(){jQuery('.post-country-'+jQuery(this).val()).show();});if(jQuery('.action-post:visible').length>0){jQuery('#post-list-box').show();}else{jQuery('#post-list-box').hide();}});});;jQuery(document).ready(function(){ticketSearchIFrameMessage();function ticketSearchIFrameMessage(){if(!isTicketSearchIframe()){return false;}
455if(window.addEventListener){window.addEventListener("message",messageHandler);}else{window.attachEvent("onmessage",messageHandler);}
456return true;}
457function messageHandler(e){try{var data=JSON.parse(e.data);}catch(e){return false;}
458if(typeof data.action==="undefined"||typeof data.path==="undefined"){return false;}
459if(data.action!='url_change'){return false;}
460jQuery.ajax({url:'/wp-content/plugins/makalius-user-action-tracking/api/ParseUrl.php',cache:false,method:'POST',data:{url:data.path,type:jQuery('#search-iframe-type').text()},success:function(data){if(jQuery(window).width()<500||jQuery.cookie('user-action-related-post')==1){return false;}
461if(isSmallDevice()){return false;}
462jQuery('#user-action-related-post').remove();if(typeof data.post==="undefined"){return false;}
463jQuery('.footer').append(data.post);jQuery('#user-action-related-post').fadeIn(1200);jQuery('#user-action-related-post .modal-close').on('click',function(event){jQuery('#user-action-related-post').hide();jQuery.cookie('user-action-related-post',1,{expires:1/3,path:'/'});});jQuery('#user-action-related-post .filter-url').on('click',function(event){});jQuery('#user-action-related-post .post-url').on('click',function(event){jQuery('#user-action-related-post').hide();});},error:function(jqXHR,textStatus,errorThrown){}});}
464function isTicketSearchIframe(){var id=jQuery('#search-iframe-type').text();if(typeof id==="undefined"){return false;}
465return true;}}
465);;window.makaliusCrisp={available:false,loading:false,loaded:false,pendingOpen:false,websiteId:'b9c44698-9faf-4d4c-be49-ca637b8dc8e5',_readyCallbacks:[],markAvailable:function(){this.available=true;if(this.pendingOpen){this.load();}},requestOpen:function(onReady){this.pendingOpen=true;if(typeof onReady==='function'){this._readyCallbacks.push(onReady);}
466if(this.available){this.load();return true;}
467return false;},load:function(onReady){var self=this;if(!this.available){return false;}
468if(typeof onReady==='function'){this._readyCallbacks.push(onReady);}
469if(this.loaded){this._flushReadyCallbacks();return true;}
470if(this.loading){return true;}
471this.loading=true;window.$crisp=window.$crisp||[];window.CRISP_WEBSITE_ID=this.websiteId;$crisp.push(['do','chat:hide']);$crisp.push(['on','chat:closed',function(){$crisp.push(['do','chat:hide']);}]);$crisp.push(['on','session:loaded',function(){self.loaded=true;self.loading=false;self._flushReadyCallbacks();}]);var script=document.createElement('script');script.src='https://client.crisp.chat/l.js';script.async=true;document.getElementsByTagName('head')[0].appendChild(script);return true;},_flushReadyCallbacks:function(){var callbacks=this._readyCallbacks.slice();this._readyCallbacks=[];callbacks.forEach(function(callback){callback();});}};jQuery(document).ready(function(){function userOnlineBox(){var sidebarPost=[];jQuery('.sidebar  .sidebar-post').each(function(){var postId=this.id.split('-');sidebarPost.push(postId[2]);});jQuery.ajax({url:'/wp-content/plugins/makalius-useronline/api/online.php',method:'post',data:{online_user_ajax:"1",uo_id:jQuery("#user_online_post_id").text(),sidebarPost:sidebarPost},dataType:'json',success:function(response){if(response!=null&&response.proposalOwner!=null&&response.proposalOwner.length>1){jQuery('.front_proposal_owner').html(response.proposalOwner).show();}
472browsingHistory(response.browsingHistory);if(response!=null&&response.chatStatus!=null&&response.chatStatus==1){window.makaliusCrisp.markAvailable();}
473if(response!=null&&response.isWorkHours!=null&&response.isWorkHours==1){jQuery('#contact-sticky-agent-online').show();jQuery('#var-is-work-hours').text('1');}
474if(isSmallDevice()){return false;}
475if(response!=null&&response.userOffer!=null&&response.userOffer.length>1){jQuery('#sidebar-user-individual-offer').after(response.userOffer);}
476if(response!=null&&response.userOnline!=null){jQuery("#user_online_box").html(response.userOnline);}
477jQuery('#last-order-display').delay(1500).fadeIn(1000).delay(5000).fadeOut(1000).fadeOut(1000,function(){});jQuery('#block-up-order').delay(4200).animate({bottom:'85px'});jQuery('#user-online-count').delay(4500).fadeIn(1000).delay(6000).fadeOut(1000).fadeOut(1000,function(){});jQuery('#user-online-count-close-button, .user-online-count-close').on('click',function(){jQuery('#user-online-count').hide();});jQuery('#last-order-display-close-button, .block-up-order-close').on('click',function(){jQuery('#last-order-display').hide();});}});}
478userOnlineBox();function browsingHistory(data)
479{jQuery('#browsing-history-open').text(data.totalView).fadeTo('slow',1);jQuery('#modal-bg').after(data.modal);jQuery('#browsing-history-modal input[type="checkbox"]').ezMark();}});

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.