jQuery(document).on("click","a.um-toggle-gdpr",function(e){var e=jQuery(e.currentTarget),t=e.closest(".um-field-area"),g=t.find(".um-gdpr-content");g.is(":visible")?(t.find("a.um-toggle-gdpr").text(e.data("toggle-show")),g.hide().find("a.um-toggle-gdpr").remove(),e.length&&e.get(0).scrollIntoView()):(t.find("a.um-toggle-gdpr").text(e.data("toggle-hide")),g.show().prepend(e.clone()))});
var captchaRes='';var sibErrMsg;var gCaptchaSibWidget;var ajax_sib_front_object;var sibVerifyCallback=function(response){captchaRes=response;var formIdInvisible=sessionStorage.getItem("formIdRecapcha");if(captchaRes){var validationErr=0;jQuery.each(jQuery(formIdInvisible).find('input[required=required]'),function(){if(jQuery(this).val().trim()==''||(jQuery(this).attr('type')=="checkbox"&&jQuery(this).prop("checked")==false)){validationErr++;var form=jQuery(this).closest('form');var requiredField=jQuery(this).closest('form').find('input[name="sib_form_alert_notice"]').val();if(requiredField!==undefined){sibErrMsg.requiredField=requiredField;}
form.find('.sib_msg_disp').html('<p class="sib-alert-message sib-alert-message-warning ">'+sibErrMsg.requiredField+'</p>').show();return;}});}
if(validationErr==0){jQuery(formIdInvisible).trigger('submit');}};jQuery(document).ready(function(){jQuery('.sib_signup_form').find('input[required=required]').on("invalid",function(){if(jQuery(this).val().trim()=='')
{var alert_msg=jQuery(this).closest('form').find('input[name="sib_form_alert_notice"]').val();this.setCustomValidity(alert_msg);}
else{this.setCustomValidity('');}});jQuery(document).on('submit','form',function(e){var invalidEmail=jQuery(this).closest('form').find('input[name="sib_form_invalid_email_notice"]').val();var requiredField=jQuery(this).closest('form').find('input[name="sib_form_alert_notice"]').val();if(invalidEmail!==undefined){sibErrMsg.invalidMail=invalidEmail;}
if(requiredField!==undefined){sibErrMsg.requiredField=requiredField;}
if(!jQuery(this).hasClass('sib_signup_form')){var email=jQuery(this).find('input[type=email]').val();var emailPattern=/^([a-zA-Z0-9_.+-])+\@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/;if(typeof sendinblue!='undefined'&&email!=null&&emailPattern.test(email)){var postData=jQuery('input[type!=password]',this).serializeObject();sendinblue.identify(email,postData);}}
else
{e.preventDefault();var form=jQuery(this).closest('form');jQuery.each(form.find('.sib-sms'),function(){var sms=jQuery(this).val();var sms_prefix=jQuery(this).closest('.sib-sms-field').find('input[name="sib_SMS_prefix"]').val();if(sms==sms_prefix&&!jQuery(this).prop('required')){jQuery(this).val('');}});var required_fileds=[];var err_index=0;var multi_lists=form.find(jQuery('.sib-multi-lists'));if(multi_lists!=undefined&&multi_lists.data('require')=='required')
{if(multi_lists.find('input:checked').length==0)
{err_index++;multi_lists.addClass('sib_error');}}
if(err_index>0)
{form.find('.sib_msg_disp').html('<p class="sib-alert-message sib-alert-message-warning ">'+sibErrMsg.requiredField+'</p>').show();return;}
err_index=0;jQuery.each(form.find('input[type="email"]'),function(){var Email=/^([a-zA-Z0-9_.+-])+@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/i;if(!Email.test(jQuery(this).val()))
{err_index++;}});if(err_index>0)
{form.find('.sib_msg_disp').html('<p class="sib-alert-message sib-alert-message-warning ">'+sibErrMsg.invalidMail+'</p>').show();return;}
err_index=0;jQuery.each(form.find('.sib-sms'),function(){var sms=jQuery(this).val();if(is_valid_sms(sms)==false&&sms!=''){err_index++;}});if(err_index>0)
{form.find('.sib_msg_disp').html('<p class="sib-alert-message sib-alert-message-warning ">'+sibErrMsg.invalidSMSFormat+'</p>').show();return;}
jQuery(".sib-default-btn").attr("disabled",true);form.find('.sib_loader').show();jQuery('.sib_msg_disp').hide();var postData=form.serializeArray();if(captchaRes!='')
{postData.push({"name":"g-recaptcha-response","value":captchaRes});}
captchaRes='';if(jQuery('.sib-multi-lists').length)
{var interesting_lists=[];jQuery('.sib-interesting-lists').each(function(){postData.push({"name":"interestingLists[]","value":jQuery(this).val()})});}
var formURL=form.attr("action");form.addClass('sib_processing');postData.push({"name":"security","value":ajax_sib_front_object.ajax_nonce});jQuery.ajax({url:formURL,type:"POST",dataType:"json",data:postData,success:function(data,textStatus,jqXHR){jQuery(".sib-default-btn").attr("disabled",false);jQuery('.sib_loader').hide();if(jQuery('.sib-multi-lists').length)
{jQuery('.sib-multi-lists').removeClass('sib_error');}
if(data.status==='success'||data.status==='update'){var cdata='<p class="sib-alert-message sib-alert-message-success ">'+data.msg.successMsg+'</p>';form.find('.sib_msg_disp').html(cdata).show();}else if(data.status==='failure'){var cdata='<p class="sib-alert-message sib-alert-message-error ">'+data.msg.errorMsg+'</p>';form.find('.sib_msg_disp').html(cdata).show();}else if(data.status==='already_exist'){var cdata='<p class="sib-alert-message sib-alert-message-warning ">'+data.msg.existMsg+'</p>';form.find('.sib_msg_disp').html(cdata).show();}else if(data.status==='invalid'){var cdata='<p class="sib-alert-message sib-alert-message-error ">'+data.msg.invalidMsg+'</p>';form.find('.sib_msg_disp').html(cdata).show();}else if(data.status==='gcaptchaEmpty'){var cdata='<p class="sib-alert-message sib-alert-message-error ">'+data.msg+'</p>';form.find('.sib_msg_disp').html(cdata).show();}else if(data.status==='gcaptchaFail'){var cdata='<p class="sib-alert-message sib-alert-message-error ">'+data.msg+'</p>';form.find('.sib_msg_disp').html(cdata).show();}
form[0].reset();if(data.redirect&&(data.status==='success'||data.status==='update')){window.location.href=data.redirect;}
if(typeof data.turnstileCaptcha!=='undefined'&&data.turnstileCaptcha){jQuery.each(form.find('.cf-turnstile'),function(){var siteKey=jQuery(this).data("sitekey");var cfResponse=jQuery('input[name="cf-turnstile-response"]').val();if(cfResponse){var idToBeRendered="#cf-turnstile-"+siteKey;turnstile.render(idToBeRendered,{sitekey:siteKey,callback:function(token){console.log("Challenge Success");},});}});}
var previous_code=form.find('.sib-cflags').data('dial-code');if(previous_code)
{form.find('.sib-sms').val('+'+previous_code);form.find('input[name="sib_SMS_prefix"]').val('+'+previous_code);}
if(typeof sendinblue!='undefined'){var email=form.find('input[name=email]').val();var postData=form.serializeObject();if(data.status==='success'||data.status==='update'||data.status==='already_exist'){sendinblue.identify(email,postData);}}
jQuery(".sib-alert-message").delay(2000).hide('slow');form.removeClass('sib_processing');if(typeof grecaptcha!='undefined')
{grecaptcha.reset(gCaptchaSibWidget);}},error:function(jqXHR,textStatus,errorThrown){form.find('.sib_msg_disp').html(jqXHR).show();jQuery(".sib-default-btn").attr("disabled",false);if(typeof grecaptcha!='undefined')
{grecaptcha.reset(gCaptchaSibWidget);}}});}});jQuery('.sib-country-block').on('click',function(){jQuery('.sib-country-list').toggle();});if(jQuery('.sib-country-list').length>0)
{jQuery('.sib-country-list').ready(function(){var data={action:'sib_get_country_prefix',security:ajax_sib_front_object.ajax_nonce,};jQuery.post(ajax_sib_front_object.ajax_url,data,function(respond){jQuery('.sib-country-list').html(respond);});});}
jQuery('body').on('click',function(e){if(jQuery('.sib-sms-field .sib-country-list').length>0&&!jQuery('.sib-sms-field .sib-country-list').is(e.target)&&jQuery('.sib-sms-field .sib-country-list').has(e.target).length===0&&jQuery('.sib-sms-field .sib-country-block').has(e.target).length===0){jQuery('.sib-sms-field .sib-country-list').hide();}});jQuery('.sib-country-list').on('click','li',function(){var country_code=jQuery(this).data('country-code').toLowerCase();var dial_code=jQuery(this).data('dial-code');jQuery(this).closest('.sib-sms-field').find('.sib-sms').val('+'+dial_code);jQuery(this).closest('.sib-sms-field').find('input[name="sib_SMS_prefix"]').val('+'+dial_code);jQuery(this).closest('.sib-sms-field').find('.sib-cflags').css('background-image','url('+ajax_sib_front_object.flag_url+country_code+'.png)');jQuery(this).closest('.sib-sms-field').find('.sib-cflags').data('dial-code',dial_code);jQuery(this).closest('.sib-country-list').hide();});jQuery(".sib-sms").on('keypress',function(event){validateInteger(event,'sms');});jQuery(".sib-date").on('keypress',function(event){validateInteger(event,'date');});function is_valid_sms(sms){sms=sms.replace(/\b(0(?!\b))+/g,"");var tempSms=sms.replace(/( |\(|\)|\.|\-)/g,'');if(tempSms.length>19||tempSms.length<6||tempSms.charAt(0)!='+'){return false;}
return true;}
function validateInteger(evt,type){var theEvent=evt||window.event;var key=theEvent.charCode||theEvent.which;key=String.fromCharCode(key);var regex=/[ +0-9()-]/;var smsLength=0;if(type=='date'){regex=/[ 0-9-/]/;}
if(!regex.test(key)){theEvent.returnValue=false;key=theEvent.keyCode;if(theEvent.preventDefault&&key!=9&&key!=8)theEvent.preventDefault();}}});jQuery.fn.serializeObject=function()
{var o={};var a=this.serializeArray();jQuery.each(a,function(){if(this.name=='sib_form_action'||this.name=='sib_form_id'||this.name=='email')
return true;if(o[this.name]!==undefined){if(!o[this.name].push){o[this.name]=[o[this.name]];}
o[this.name].push(this.value||'');}else{o[this.name]=this.value||'';}});return o;};jQuery(document).ready(function(){jQuery(".sib-default-btn").on("click",function(){var row=jQuery(this).closest(".sib_signup_form");sessionStorage.setItem("formIdRecapcha","#"+jQuery(row).attr('id'));})})
function errorCallbackForTurnstileErrors(){};
jQuery(function($){const OpenClose=document.querySelector('.rtoc_open_close');const listWrapper=document.querySelector('.level-1');const listTitle=document.getElementById('rtoc-mokuji-title');if(OpenClose!=null){if(OpenClose.classList.contains('rtoc_open')){OpenClose.textContent=rtocCloseText.rtocCloseText;}else if(OpenClose.classList.contains('rtoc_close')){OpenClose.textContent=rtocOpenText.rtocOpenText;listWrapper.classList.add('is_close');listTitle.classList.add('is_close');}
OpenClose.addEventListener('click',()=>{listWrapper.classList.toggle('is_close');listTitle.classList.toggle('is_close');if(listWrapper.classList.contains('is_close')){OpenClose.textContent=rtocOpenText.rtocOpenText;}else{OpenClose.textContent=rtocCloseText.rtocCloseText;}});}});
jQuery(function($){let headerHight=100;if(rtocScrollAnimation){if(rtocScrollAnimation.rtocScrollAnimation=='on'){$('#rtoc-mokuji-wrapper a[href^="#"]').click(function(){let speed=480;let href=$(this).attr("href");let target=$(href=="#"||href==""?'html':href);let position=target.offset().top;$("html, body").animate({scrollTop:position-headerHight},speed,"swing");return false;});}}});
(function(){let rtocList=[];let lastScrollY=0;let lastBodyClientHeight=0;let sidebar_rtoc_wrapper=document.querySelector('.sidebar #rtoc-mokuji-widget-wrapper');if(!sidebar_rtoc_wrapper){sidebar_rtoc_wrapper=document.querySelector('.widget #rtoc-mokuji-widget-wrapper');}
if(!sidebar_rtoc_wrapper){sidebar_rtoc_wrapper=document.querySelector('.c-widget #rtoc-mokuji-widget-wrapper');}
if(!sidebar_rtoc_wrapper){sidebar_rtoc_wrapper=document.querySelector('#scrollad #rtoc-mokuji-widget-wrapper');}
if(!sidebar_rtoc_wrapper){sidebar_rtoc_wrapper=document.querySelector('#sideBarTracking #rtoc-mokuji-widget-wrapper');}
if(!sidebar_rtoc_wrapper){sidebar_rtoc_wrapper=document.querySelector('#sidebar1 #rtoc-mokuji-widget-wrapper');}
if(sidebar_rtoc_wrapper){sidebar_rtoc_wrapper.classList.add('rtoc-sidebar-contents');}
function rtoc_init(){rtocList=[];rtocParentList=[];if(sidebar_rtoc_wrapper){const itemList=sidebar_rtoc_wrapper.querySelectorAll('a');const itemAllList=sidebar_rtoc_wrapper.querySelectorAll('.level-1 > .rtoc-item > a');for(let i=0;i<itemList.length;i++){const a=itemList[i];const linkAnker=a.href.substring(a.href.lastIndexOf('#'));const itemElement=document.querySelector(decodeURI(linkAnker));if(itemElement!=null){let top=itemElement.offsetTop;let parent=itemElement.offsetParent;while(parent!=null){top+=parent.offsetTop;parent=parent.offsetParent;}
rtocList.push({top:top,bottom:1e30,itemdom:a.parentElement});if(i>0){if(rtocList[i]){rtocList[i-1].bottom=rtocList[i].top;}}}}
for(let i=0;i<itemAllList.length;i++){const a=itemAllList[i];const linkAnker=a.href.substring(a.href.lastIndexOf('#'));const itemAllElement=document.querySelector(decodeURI(linkAnker));let top=itemAllElement.offsetTop;let parent=itemAllElement.offsetParent;while(parent!=null){top+=parent.offsetTop;parent=parent.offsetParent;}
rtocParentList.push({top:top,bottom:1e30,itemdom:a.parentElement});if(i>0){rtocParentList[i-1].bottom=rtocParentList[i].top;}}}}
rtoc_init();function rtocUpdateSection(scrollY){if(document.body.clientHeight!==lastBodyClientHeight){rtoc_init();}
for(let sec of rtocList){sec.itemdom.classList.remove('rtoc-current');}
for(let sec of rtocParentList){sec.itemdom.classList.remove('rtoc-show');}
for(let i=0;i<rtocList.length;i++){const sec=rtocList[i];if(sec.top<=scrollY&&scrollY<sec.bottom){sec.itemdom.classList.add('rtoc-current');break;}}
for(let i=0;i<rtocParentList.length;i++){const sec=rtocParentList[i];if(sec.top<=scrollY&&scrollY<sec.bottom){sec.itemdom.classList.add('rtoc-show');break;}}}
function widgetScroll(hiddenDOM){const highlightContents=sidebar_rtoc_wrapper.querySelector('.rtoc-current');}
if(sidebar_rtoc_wrapper){let ticking=false;const scrollHeight=sidebar_rtoc_wrapper.querySelector('.rtoc-mokuji').scrollHeight;const displayHeight=sidebar_rtoc_wrapper.querySelector('.rtoc-mokuji').offsetHeight;document.addEventListener('scroll',function(){lastScrollY=window.scrollY;if(ticking===false){window.requestAnimationFrame(function(){rtocUpdateSection(lastScrollY+300);ticking=false;});ticking=true;}
if(scrollHeight>displayHeight){widgetScroll(scrollHeight-displayHeight);}});}})();
var astraGetParents=function(e,t){Element.prototype.matches||(Element.prototype.matches=Element.prototype.matchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||Element.prototype.oMatchesSelector||Element.prototype.webkitMatchesSelector||function(e){for(var t=(this.document||this.ownerDocument).querySelectorAll(e),a=t.length;0<=--a&&t.item(a)!==this;);return-1<a});for(var a=[];e&&e!==document;e=e.parentNode)(!t||e.matches(t))&&a.push(e);return a},getParents=function(e,t){console.warn("getParents() function has been deprecated since version 2.5.0 or above of Astra Theme and will be removed in the future. Use astraGetParents() instead."),astraGetParents(e,t)},astraToggleClass=function(e,t){e.classList.contains(t)?e.classList.remove(t):e.classList.add(t)},toggleClass=function(e,t){console.warn("toggleClass() function has been deprecated since version 2.5.0 or above of Astra Theme and will be removed in the future. Use astraToggleClass() instead."),astraToggleClass(e,t)},astraTriggerEvent=((()=>{function e(e,t){t=t||{bubbles:!1,cancelable:!1,detail:void 0};var a=document.createEvent("CustomEvent");return a.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),a}"function"!=typeof window.CustomEvent&&(e.prototype=window.Event.prototype,window.CustomEvent=e)})(),function(e,t){t=new CustomEvent(t,2<arguments.length&&void 0!==arguments[2]?arguments[2]:{});e.dispatchEvent(t)});astraSmoothScroll=function(e,t){e.preventDefault(),window.scrollTo({top:t,left:0,behavior:"smooth"})},astScrollToTopHandler=function(e,t){var a=getComputedStyle(t).content,n=t.dataset.onDevices,a=a.replace(/[^0-9]/g,"");"both"==n||"desktop"==n&&"769"==a||"mobile"==n&&""==a?(n=window.pageYOffset||document.body.scrollTop,e&&e.length?n>e.offsetHeight+100?t.style.display="block":t.style.display="none":300<window.pageYOffset?t.style.display="block":t.style.display="none"):t.style.display="none"},(()=>{var r=document.querySelectorAll("#masthead .main-header-menu-toggle"),c=document.getElementById("masthead"),i={},d="",u=document.body,m="";function e(e){d=e.detail.type;var t=document.querySelectorAll(".menu-toggle");if("dropdown"===d&&(document.getElementById("ast-mobile-popup").classList.remove("active","show"),g("updateHeader")),"off-canvas"===d)for(var a=0;a<t.length;a++)void 0!==t[a]&&t[a].classList.contains("toggled")&&t[a].click();n(d)}function g(e){m=c.querySelector("#ast-mobile-header");if(null==m||"dropdown"!==m.dataset.type||"updateHeader"===e){(void 0!==e&&"updateHeader"!==e?e.closest(".ast-mobile-popup-inner"):document.querySelector("#ast-mobile-popup")).querySelectorAll(".menu-item-has-children").forEach(e=>{e.classList.remove("ast-submenu-expanded"),Array.from(e.querySelectorAll(".sub-menu")).forEach(e=>{e.hasAttribute("data-initial-display")||e.setAttribute("data-initial-display",window.getComputedStyle(e).display),"block"===e.getAttribute("data-initial-display")?e.style.display="block":e.style.display="none"})});var t=document.querySelectorAll(".menu-toggle");document.body.classList.remove("ast-main-header-nav-open","ast-popup-nav-open"),document.documentElement.classList.remove("ast-off-canvas-active");for(var a=0;a<t.length;a++)t[a].classList.remove("toggled"),t[a].style.display="flex"}}function n(e){var t=document.querySelectorAll("#ast-mobile-header .menu-toggle"),a=document.querySelectorAll("#ast-desktop-header .menu-toggle");if(void 0===e&&null!==c)if(m=c.querySelector("#ast-mobile-header"))e=m.dataset.type;else{var n=c.querySelector("#ast-desktop-header");if(!n)return;e=n.dataset.toggleType}if("off-canvas"===e){var n=document.getElementById("menu-toggle-close"),o=document.querySelector(".ast-mobile-popup-inner");if(null==o)return;popupLinks=o.getElementsByTagName("a");for(var s=0;s<t.length;s++)t[s].removeEventListener("click",astraNavMenuToggle,!1),t[s].addEventListener("click",popupTriggerClick,!1),t[s].trigger_type="mobile";for(s=0;s<a.length;s++)a[s].removeEventListener("click",astraNavMenuToggle,!1),a[s].addEventListener("click",popupTriggerClick,!1),a[s].trigger_type="desktop";n.addEventListener("click",function(e){document.getElementById("ast-mobile-popup").classList.remove("active","show"),g(this)}),document.addEventListener("keyup",function(e){27===e.keyCode&&(e.preventDefault(),document.getElementById("ast-mobile-popup").classList.remove("active","show"),g())}),document.addEventListener("click",function(e){e.target===document.querySelector(".ast-mobile-popup-drawer.active .ast-mobile-popup-overlay")&&(document.getElementById("ast-mobile-popup").classList.remove("active","show"),g())});for(let e=0,t=popupLinks.length;e<t;e++)null!==popupLinks[e].getAttribute("href")&&(popupLinks[e].getAttribute("href").startsWith("#")||-1!==popupLinks[e].getAttribute("href").search("#"))&&(!popupLinks[e].parentElement.classList.contains("menu-item-has-children")||popupLinks[e].parentElement.classList.contains("menu-item-has-children")&&document.querySelector("header.site-header").classList.contains("ast-builder-menu-toggle-icon"))&&(popupLinks[e].addEventListener("click",p,!0),popupLinks[e].headerType="off-canvas");AstraToggleSetup()}else if("dropdown"===e){var r=document.querySelectorAll(".ast-mobile-header-content")||!1,o=document.querySelector(".ast-desktop-header-content")||!1;if(0<r.length)for(let e=0;e<r.length;e++){var l=r[e].getElementsByTagName("a");for(link=0,len=l.length;link<len;link++)null!==l[link].getAttribute("href")&&(l[link].getAttribute("href").startsWith("#")||-1!==l[link].getAttribute("href").search("#"))&&(!l[link].parentElement.classList.contains("menu-item-has-children")||l[link].parentElement.classList.contains("menu-item-has-children")&&document.querySelector("header.site-header").classList.contains("ast-builder-menu-toggle-icon"))&&(l[link].addEventListener("click",p,!0),l[link].headerType="dropdown")}if(o){var i=o.getElementsByTagName("a");for(link=0,len=i.length;link<len;link++)i[link].addEventListener("click",p,!0),i[link].headerType="dropdown"}for(s=0;s<t.length;s++)t[s].removeEventListener("click",popupTriggerClick,!1),t[s].addEventListener("click",astraNavMenuToggle,!1),t[s].trigger_type="mobile";for(s=0;s<a.length;s++)a[s].removeEventListener("click",popupTriggerClick,!1),a[s].addEventListener("click",astraNavMenuToggle,!1),a[s].trigger_type="desktop";AstraToggleSetup()}v()}function p(e){switch(e.currentTarget.headerType){case"dropdown":for(var t=document.querySelectorAll(".menu-toggle.toggled"),a=0;a<t.length;a++)t[a].click();break;case"off-canvas":document.getElementById("menu-toggle-close").click()}}""!==(m=null!=c?c.querySelector("#ast-mobile-header"):m)&&null!==m&&(d=m.dataset.type),document.addEventListener("astMobileHeaderTypeChange",e,!1),popupTriggerClick=function(e){var e=e.currentTarget.trigger_type,t=document.getElementById("ast-mobile-popup"),a=document.getElementById("menu-toggle-close");a&&a.focus(),u.classList.contains("ast-popup-nav-open")||u.classList.add("ast-popup-nav-open"),u.classList.contains("ast-main-header-nav-open")||"mobile"===e||u.classList.add("ast-main-header-nav-open"),document.documentElement.classList.contains("ast-off-canvas-active")||document.documentElement.classList.add("ast-off-canvas-active"),"desktop"===e&&(t.querySelector(".ast-mobile-popup-content").style.display="none",t.querySelector(".ast-desktop-popup-content").style.display="block"),"mobile"===e&&(t.querySelector(".ast-desktop-popup-content").style.display="none",t.querySelector(".ast-mobile-popup-content").style.display="block"),this.style.display="none",t.classList.add("active","show")},window.addEventListener("load",function(){n()}),document.addEventListener("astLayoutWidthChanged",function(){n()}),document.addEventListener("astPartialContentRendered",function(){r=document.querySelectorAll(".main-header-menu-toggle"),u.classList.remove("ast-main-header-nav-open"),document.addEventListener("astMobileHeaderTypeChange",e,!1),n(),v()});var o=null!==navigator.userAgent.match(/Android/i)&&"Android"===navigator.userAgent.match(/Android/i)[0]?window.visualViewport.width:window.innerWidth;window.addEventListener("resize",function(){var e,t,a,n;"INPUT"!==document.activeElement.tagName&&(e=document.getElementById("menu-toggle-close"),t=document.querySelector(".menu-toggle.toggled"),a=document.querySelector("#masthead > #ast-desktop-header .ast-desktop-header-content"),n=document.querySelector(".elementor-editor-active"),a&&(a.style.display="none"),(null!==navigator.userAgent.match(/Android/i)&&"Android"===navigator.userAgent.match(/Android/i)[0]?window.visualViewport.width:window.innerWidth)!==o&&(t&&null===n&&t.click(),document.body.classList.remove("ast-main-header-nav-open","ast-popup-nav-open"),e)&&null==n&&e.click(),h(),AstraToggleSetup())}),document.addEventListener("DOMContentLoaded",function(){if(AstraToggleSetup(),null!==(e=u.classList.contains("ast-header-break-point")?document.getElementById("ast-mobile-header"):document.getElementById("ast-desktop-header"))){var e,t=e.querySelector(".navigation-accessibility");if(t&&e){var a=e.getElementsByTagName("button")[0];if(void 0===a){if(!0===(a=e.getElementsByTagName("a")[0]).classList.contains("astra-search-icon"))return;if(void 0===a)return}var n=t.getElementsByTagName("ul")[0];if(void 0===n)a.style.display="none";else{if(-1===n.className.indexOf("nav-menu")&&(n.className+=" nav-menu"),document.addEventListener("DOMContentLoaded",function(){var e;"off-canvas"===d&&(e=document.getElementById("menu-toggle-close"))&&(e.onclick=function(){-1!==t.className.indexOf("toggled")?(t.className=t.className.replace(" toggled",""),a.setAttribute("aria-expanded","false"),n.setAttribute("aria-expanded","false")):(t.className+=" toggled",a.setAttribute("aria-expanded","true"),n.setAttribute("aria-expanded","true"))})}),a.onclick=function(){-1!==t.className.indexOf("toggled")?(t.className=t.className.replace(" toggled",""),a.setAttribute("aria-expanded","false"),n.setAttribute("aria-expanded","false")):(t.className+=" toggled",a.setAttribute("aria-expanded","true"),n.setAttribute("aria-expanded","true"))},!astra.is_header_footer_builder_active){for(var o=n.getElementsByTagName("a"),s=n.getElementsByTagName("ul"),r=0,l=s.length;r<l;r++)s[r].parentNode.setAttribute("aria-haspopup","true");for(r=0,l=o.length;r<l;r++)o[r].addEventListener("focus",E,!0),o[r].addEventListener("blur",E,!0),o[r].addEventListener("click",L,!0)}astra.is_header_footer_builder_active&&(()=>{let t=document.querySelectorAll("nav.site-navigation .menu-item-has-children > a .ast-header-navigation-arrow"),a=document.querySelectorAll("nav.site-navigation .sub-menu"),n=document.querySelectorAll("nav.site-navigation .menu-item-has-children"),o=document.querySelectorAll(".astra-full-megamenu-wrapper");t&&(t.forEach(e=>{e.addEventListener("keydown",function(a){"Enter"===a.key&&(a.target.closest("li").querySelector(".sub-menu").classList.contains("astra-megamenu")?setTimeout(()=>{var e=a.target.closest("li").querySelector(".sub-menu"),t=a.target.closest("li").querySelector(".astra-full-megamenu-wrapper");e&&e.classList.toggle("astra-megamenu-focus"),t&&t.classList.toggle("astra-megamenu-wrapper-focus"),a.target.closest("li").classList.toggle("ast-menu-hover"),"false"!==a.target.getAttribute("aria-expanded")&&a.target.getAttribute("aria-expanded")?a.target.setAttribute("aria-expanded","false"):a.target.setAttribute("aria-expanded","true")},10):setTimeout(()=>{a.target.closest("li").querySelector(".sub-menu").classList.toggle("toggled-on"),a.target.closest("li").classList.toggle("ast-menu-hover"),"false"!==a.target.getAttribute("aria-expanded")&&a.target.getAttribute("aria-expanded")?a.target.setAttribute("aria-expanded","false"):a.target.setAttribute("aria-expanded","true")},10))})}),(a||n)&&document.addEventListener("click",function(e){b(a,t,n,o)},!1),a||n)&&document.addEventListener("keydown",function(e){"Escape"===e.key&&b(a,t,n,o)},!1);var e=document.querySelectorAll("nav.site-navigation .ast-nav-menu > .menu-item-has-children > a .ast-header-navigation-arrow");e&&e.forEach(e=>{e.addEventListener("keydown",function(e){e.target.closest("li").classList.contains("ast-menu-hover")||"Enter"!==e.key||b(a,t,n,o)},!1)})})()}}}});for(var t,a,s,l,h=function(){var e=u.style.overflow,t=(u.style.overflow="hidden",document.documentElement.clientWidth);if(u.style.overflow=e,astra.break_point<t||0===t){if(0<r.length)for(var a=0;a<r.length;a++)null!==r[a]&&r[a].classList.remove("toggled");u.classList.remove("ast-header-break-point"),u.classList.add("ast-desktop"),astraTriggerEvent(u,"astra-header-responsive-enabled")}else u.classList.add("ast-header-break-point"),u.classList.remove("ast-desktop"),astraTriggerEvent(u,"astra-header-responsive-disabled")},v=function(){var e,a=document.querySelectorAll(".ast-account-action-login");if(a.length){let t=document.querySelector("#ast-hb-account-login-wrap");t&&(e=document.querySelector("#ast-hb-login-close"),a.forEach(function(e){e.addEventListener("click",function(e){e.preventDefault(),t.classList.add("show")})}),e)&&e.addEventListener("click",function(e){e.preventDefault(),t.classList.remove("show")})}},f=(h(),AstraToggleSubMenu=function(e){e.preventDefault(),"false"!==e.target.getAttribute("aria-expanded")&&e.target.getAttribute("aria-expanded")?e.target.setAttribute("aria-expanded","false"):e.target.setAttribute("aria-expanded","true");for(var t=this.parentNode,a=(t.classList.contains("ast-submenu-expanded")&&document.querySelector("header.site-header").classList.contains("ast-builder-menu-toggle-link")&&(this.classList.contains("ast-menu-toggle")||""!==(e=t.querySelector("a").getAttribute("href"))&&"#"!==e&&(window.location=e)),t.querySelectorAll(".menu-item-has-children")),n=0;n<a.length;n++){a[n].classList.remove("ast-submenu-expanded");var o=a[n].querySelector(".sub-menu, .children");null!==o&&(o.style.display="none")}for(var s=t.parentNode.querySelectorAll(".menu-item-has-children"),n=0;n<s.length;n++)if(s[n]!=t){s[n].classList.remove("ast-submenu-expanded");for(var r=s[n].querySelectorAll(".sub-menu"),l=0;l<r.length;l++)r[l].style.display="none"}t.classList.contains("menu-item-has-children")&&(astraToggleClass(t,"ast-submenu-expanded"),t.classList.contains("ast-submenu-expanded")?t.querySelector(".sub-menu").style.display="block":t.querySelector(".sub-menu").style.display="none")},AstraToggleSetup=function(){if("undefined"!=typeof astraAddon&&"function"==typeof astraToggleSetupPro)astraToggleSetupPro(d,u,i);else{var e,t,a,n=!1;if(0<(e="off-canvas"===d||"full-width"===d?(t=document.querySelectorAll("#ast-mobile-popup, #ast-mobile-header"),(a=document.querySelectorAll("#ast-mobile-header .main-header-menu-toggle")).length):(t=document.querySelectorAll("#ast-mobile-header"),(n=!(0<(e=(a=document.querySelectorAll("#ast-mobile-header .main-header-menu-toggle")).length)))?1:e))||n)for(var o=0;o<e;o++)if(n||(a[o].setAttribute("data-index",o),i[o])||(i[o]=a[o],a[o].addEventListener("click",astraNavMenuToggle,!1)),void 0!==t[o])for(var s,r=0;r<t.length;r++)if(0<(s=document.querySelector("header.site-header").classList.contains("ast-builder-menu-toggle-link")?t[r].querySelectorAll("ul.main-header-menu .menu-item-has-children > .menu-link, ul.main-header-menu .ast-menu-toggle"):t[r].querySelectorAll("ul.main-header-menu .ast-menu-toggle")).length)for(var l=0;l<s.length;l++)s[l].addEventListener("click",AstraToggleSubMenu,!1)}},astraNavMenuToggle=function(e){if("undefined"!=typeof astraAddon)astraNavMenuTogglePro(e,u,d,this);else{e.preventDefault();var e=document.querySelectorAll("#masthead > #ast-mobile-header .main-header-bar-navigation"),t=(r=document.querySelectorAll("#masthead > #ast-mobile-header .main-header-menu-toggle"),"0");if(null!==this.closest("#ast-fixed-header")&&(e=document.querySelectorAll("#ast-fixed-header > #ast-mobile-header .main-header-bar-navigation"),r=document.querySelectorAll("#ast-fixed-header .main-header-menu-toggle"),t="0"),void 0===e[t])return!1;for(var a=e[t].querySelectorAll(".menu-item-has-children"),n=0;n<a.length;n++){a[n].classList.remove("ast-submenu-expanded");for(var o=a[n].querySelectorAll(".sub-menu"),s=0;s<o.length;s++)o[s].style.display="none"}-1!==(this.getAttribute("class")||"").indexOf("main-header-menu-toggle")&&(astraToggleClass(e[t],"toggle-on"),astraToggleClass(r[t],"toggled"),e[t].classList.contains("toggle-on")?(e[t].style.display="block",u.classList.add("ast-main-header-nav-open")):(e[t].style.display="",u.classList.remove("ast-main-header-nav-open")))}},u.addEventListener("astra-header-responsive-enabled",function(){var e=document.querySelectorAll(".main-header-bar-navigation");if(0<e.length)for(var t=0;t<e.length;t++){null!=e[t]&&(e[t].classList.remove("toggle-on"),e[t].style.display="");for(var a=e[t].getElementsByClassName("sub-menu"),n=0;n<a.length;n++)a[n].style.display="";for(var o=e[t].getElementsByClassName("children"),s=0;s<o.length;s++)o[s].style.display="";for(var r=e[t].getElementsByClassName("ast-search-menu-icon"),l=0;l<r.length;l++)r[l].classList.remove("ast-dropdown-active"),r[l].style.display=""}},!1),w=navigator.userAgent,a=w.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i)||[],/trident/i.test(a[1])?t=/\brv[ :]+(\d+)/g.exec(w)||[]:"Chrome"===a[1]&&null!=(t=w.match(/\bOPR|Edge\/(\d+)/))||(a=a[2]?[a[1],a[2]]:[navigator.appName,navigator.appVersion,"-?"],null!=(t=w.match(/version\/(\d+)/i))&&a.splice(1,1,t[1]),"Safari"===a[0]&&a[1]<11&&document.body.classList.add("ast-safari-browser-less-than-11")),document.getElementsByClassName("astra-search-icon")),y=0;y<f.length;y++)f[y].onclick=function(e){var t;this.classList.contains("slide-search")&&(e.preventDefault(),(t=this.parentNode.parentNode.parentNode.querySelector(".ast-search-menu-icon")).classList.contains("ast-dropdown-active")?(""!==(t.querySelector(".search-field").value||"")&&t.querySelector(".search-form").submit(),t.classList.remove("ast-dropdown-active")):(t.classList.add("ast-dropdown-active"),t.querySelector(".search-field").setAttribute("autocomplete","off"),setTimeout(function(){t.querySelector(".search-field").focus()},200)))};function b(e,t,a,n){e&&e.forEach(e=>{e.classList.remove("astra-megamenu-focus"),e.classList.remove("toggled-on")}),a&&a.forEach(e=>{e.classList.remove("ast-menu-hover")}),n&&n.forEach(e=>{e.classList.remove("astra-megamenu-wrapper-focus")}),t&&t.forEach(e=>{e.setAttribute("aria-expanded","false")})}function L(){var e=this||"";if(e&&!e.classList.contains("astra-search-icon")&&null===e.closest(".ast-builder-menu")&&-1!==String(e).indexOf("#")){var t=e.parentNode;if(u.classList.contains("ast-header-break-point"))document.querySelector("header.site-header").classList.contains("ast-builder-menu-toggle-link")&&t.classList.contains("menu-item-has-children")||(document.querySelector(".main-header-menu-toggle").classList.remove("toggled"),(t=document.querySelector(".main-header-bar-navigation")).classList.remove("toggle-on"),t.style.display="none",astraTriggerEvent(document.querySelector("body"),"astraMenuHashLinkClicked"));else for(;-1===e.className.indexOf("nav-menu");)"li"===e.tagName.toLowerCase()&&-1!==e.className.indexOf("focus")&&(e.className=e.className.replace(" focus","")),e=e.parentElement}}function E(){for(var e=this;-1===e.className.indexOf("navigation-accessibility");)"li"===e.tagName.toLowerCase()&&e.classList.toggle("focus"),e=e.parentElement}if(document.querySelectorAll(".search-field").forEach(e=>{e.addEventListener("focus",function(e){var t=this.parentNode.parentNode.parentNode.querySelector(".ast-search-menu-icon");t&&astraToggleClass(t,"ast-dropdown-active")}),e.addEventListener("blur",function(e){var t=this.parentNode.parentNode.parentNode.querySelector(".ast-search-menu-icon");t&&(t.classList.remove("ast-dropdown-active"),astraToggleClass(t,"ast-dropdown-active"))})}),u.onclick=function(e){if(void 0!==e.target.classList&&!e.target.classList.contains("ast-search-menu-icon")&&0===astraGetParents(e.target,".ast-search-menu-icon").length&&0===astraGetParents(e.target,".ast-search-icon").length)for(var t=document.getElementsByClassName("ast-search-menu-icon"),a=0;a<t.length;a++)t[a].classList.remove("ast-dropdown-active")},astra.is_header_footer_builder_active||"querySelector"in document&&"addEventListener"in window&&(u.addEventListener("mousedown",function(){u.classList.add("ast-mouse-clicked")}),u.addEventListener("keydown",function(){u.classList.remove("ast-mouse-clicked")})),astra.is_scroll_to_id){function S(e){let t=0;var a=document.querySelector(".site-header");a&&((a=a.querySelectorAll("div[data-stick-support]"))&&a.forEach(e=>{t+=e.clientHeight}),a=this.hash)&&(a=document.querySelector(a))&&(a=k(a)-t)&&astraSmoothScroll(e,a)}function k(e){let t=0;for(;e;)t+=e.offsetTop,e=e.offsetParent;return t}let t=[];var w=document.querySelectorAll('a[href*="#"]:not([href="#"]):not([href="#0"]):not([href*="uagb-tab"]):not(.uagb-toc-link__trigger):not(.skip-link):not(.nav-links a):not([href*="tab-"])');if(w)for(let e of w)e.href.split("#")[0]!==location.href.split("#")[0]?t.push({hash:e.hash,url:e.href.split("#")[0]}):""!==e.hash&&e.addEventListener("click",S);window.addEventListener("DOMContentLoaded",e=>{for(var a of t)if(window.location.href.split("#")[0]===a.url){var n=document.querySelector(".site-header");let t=0;n=n.querySelectorAll("div[data-stick-support]"),n=(n&&n.forEach(e=>{t+=e.clientHeight}),document.querySelector(a.hash));n&&(a=k(n)-t)&&astraSmoothScroll(e,a)}})}astra.is_scroll_to_top&&(s=document.querySelector("#page header"),l=document.getElementById("ast-scroll-top"),astScrollToTopHandler(s,l),window.addEventListener("scroll",function(){astScrollToTopHandler(s,l)}),l.onclick=function(e){astraSmoothScroll(e,0)},l.addEventListener("keydown",function(e){"Enter"===e.key&&astraSmoothScroll(e,0)})),window.addEventListener("DOMContentLoaded",e=>{var t=document.querySelector(".ast-woocommerce-store-notice-hanged");let a=()=>{var e=document.querySelector('.woocommerce-store-notice[data-position="hang-over-top"]');document.body.style.marginTop=`${e?.clientHeight||0}px`};t&&(window.addEventListener("resize",a),setTimeout(()=>a(),0)),document.querySelector(".woocommerce-store-notice__dismiss-link")?.addEventListener("click",()=>{wp?.customize||(document.body.classList.remove("ast-woocommerce-store-notice-hanged"),window.removeEventListener("resize",a),document.body.style.marginTop=0)})})})(),document.addEventListener("DOMContentLoaded",function(){function t(e){var e=e.closest(".menu-link"),t=e.nextElementSibling.classList.contains("toggled-on");e.setAttribute("aria-expanded",t?"true":"false")}document.querySelectorAll(".menu-link .dropdown-menu-toggle").forEach(e=>{e.addEventListener("focus",function(){t(this)}),e.addEventListener("blur",function(){t(this)}),e.addEventListener("keydown",function(e){var t;"Enter"===e.key&&(e=(e=this).closest(".menu-link"),t=e.getAttribute("aria-expanded"),e.setAttribute("aria-expanded","true"===t?"false":"true"))})}),document.addEventListener("keydown",function(e){"Escape"===e.key&&document.querySelectorAll(".menu-link .dropdown-menu-toggle").forEach(function(e){t(e)})})}),document.addEventListener("DOMContentLoaded",()=>{document.querySelectorAll(".astra-shop-thumbnail-wrap").forEach(t=>{let a=t.querySelectorAll("a, span");a.forEach(e=>{e.addEventListener("focus",()=>{t.querySelectorAll(".ast-on-card-button, .ast-quick-view-trigger").forEach(e=>{e.style.opacity="1",e.style.visibility="visible",e.style.borderStyle="none"})}),e.addEventListener("blur",()=>{Array.from(a).some(e=>e===document.activeElement)||t.querySelectorAll(".ast-on-card-button, .ast-quick-view-trigger").forEach(e=>{e.style.opacity="",e.style.visibility=""})})})})});
(()=>{var e={n:t=>{var a=t&&t.__esModule?()=>t.default:()=>t;return e.d(a,{a}),a},d:(t,a)=>{for(var o in a)e.o(a,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:a[o]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};(()=>{"use strict";const t=window.wp.domReady;var a=e.n(t);const o=()=>window.location.href!==window.parent.location.href,n="starter-templates-iframe-preview-data",r=()=>{let e="";const t=document.querySelector(".site-logo-img img");return t&&(e=t.src),e};let s=r();const l=(e,t)=>{if(!e)return"";if(e){const a=e.match(/'([^']+)'/);return a?a[1]:"inherit"===e?t:e}return t||void 0},i=e=>{switch(e.value.param){case"siteLogo":const t=document.querySelectorAll(".site-logo-img img");""===s&&(s=r());let a=e.value.data.url||s;if(a=e.value.data.dataUri||a,0===t.length&&""!==a){const t=document.createElement("span");t.classList.add("site-logo-img");const o=document.createElement("a");o.setAttribute("class","custom-logo-link"),o.setAttribute("href","#"),o.setAttribute("aria-current","page"),t.appendChild(o);const n=document.createElement("img");n.classList.add("custom-logo"),n.setAttribute("src",a),o.appendChild(n);const r=document.getElementById("ast-desktop-header").querySelectorAll(".ast-site-identity")[0],s=r.querySelectorAll(".ast-site-title-wrap")[0];r.insertBefore(t,s);const l=e.value.data.width||"";""!==l&&(n.style.width=l+"px",n.style.maxWidth=l+"px")}else if(""!==a)for(const[o,n]of Object.entries(t)){n.removeAttribute("srcset"),n.setAttribute("src",a);const t=e.value.data.width;""!==t&&(n.style.width=t+"px",n.style.maxWidth=t+"px")}break;case"colorPalette":const o=e.value.data.colors||[],n=starter_templates_zip_preview.AstColorPaletteVarPrefix,i=starter_templates_zip_preview.AstEleColorPaletteVarPrefix;if(0===o.length){document.querySelector("body").classList.remove("starter-templates-preview-palette");const e=document.getElementsByClassName("starter-templates-preview-palette");return void(e.length>0&&e[0].remove())}document.querySelector("body").classList.add("starter-templates-preview-palette");const d=Object.entries(o).map(((e,t)=>[`--e-global-color-${i[t].replace(/-/g,"")}: ${e[1]};`,`${n}${t}: ${e[1]};`])).map((e=>e.join(""))).join("");let c=document.getElementById("starter-templates-preview-palette-css");c||(c=document.createElement("style"),c.id="starter-templates-preview-palette-css",c.setAttribute("rel","stylesheet"),document.head.appendChild(c)),c.innerHTML=`.starter-templates-preview-palette{ ${d} }`;break;case"siteTypography":if(!Object.keys(e.value.data).length){const e=document.getElementById("starter-templates-typography");return void(e&&e.remove())}(e=>{if(!e)return;if(!document.getElementById("google-fonts-domain")){const e=document.createElement("link");e.id="google-fonts-domain",e.setAttribute("rel","preconnect"),e.setAttribute("href","https://fonts.gstatic.com"),document.head.appendChild(e)}let t=document.getElementById("st-previw-google-fonts-url");t||(t=document.createElement("link"),t.id="st-previw-google-fonts-url",t.setAttribute("rel","stylesheet"),document.head.appendChild(t));const a=[];let o=e["body-font-family"]||"",n=parseInt(e["body-font-weight"])||"";n&&(n=`:wght@${n}`),o&&(o=l(o),o=o.replace(" ","+"),a.push(`family=${o}${n}`));let r=e["headings-font-family"]||"",s=parseInt(e["headings-font-weight"])||"";s&&(s=`:wght@${s}`),r&&(r=l(r,o),r=r.replace(" ","+"),a.push(`family=${r}${s}`));const i=`https://fonts.googleapis.com/css2?${a.join("&")}&display=swap`;t.setAttribute("href",i)})(e.value.data),(e=>{if(!e)return;let t=document.getElementById("starter-templates-typography");t||(t=document.createElement("style"),t.id="starter-templates-typography",t.setAttribute("rel","stylesheet"),document.head.appendChild(t));let a="";a+="body, button, input, select, textarea, .ast-button, .ast-custom-button {",a+="\tfont-family: "+e["body-font-family"]+";",a+="\tfont-weight: "+e["body-font-weight"]+";",a+="\tfont-size: "+e["font-size-body"].desktop+e["font-size-body"]["desktop-unit"]+";",a+="\tline-height: "+e["body-line-height"]+";",a+="}",a+="h1, .entry-content h1, h2, .entry-content h2, h3, .entry-content h3, h4, .entry-content h4, h5, .entry-content h5, h6, .entry-content h6, .site-title, .site-title a {",a+="\tfont-family: "+e["headings-font-family"]+";",a+="\tline-height: "+e["headings-line-height"]+";",a+="\tfont-weight: "+e["headings-font-weight"]+";",a+="}",["h1","h2","h3","h4","h5","h6"].forEach((t=>{const o="inherit"===e["font-family-"+t]?e["headings-font-family"]:e["font-family-"+t],n="inherit"===e["font-weight-"+t]?e["headings-font-weight"]:e["font-weight-"+t];let r="";void 0!==o&&""!==o&&(r+=`${t}, .entry-content ${t} {`,r+="\tfont-family: "+o+";"),void 0!==e["line-height-"+t]&&""!==e["line-height-"+t]&&(r+="\tline-height: "+e["line-height-"+t]+";"),void 0!==n&&""!==n&&(r+="\tfont-weight: "+n+";"),a+=""!==r?r+"}":""})),t.innerHTML=a})(e.value.data);break;case"siteTitle":(e=>{const t=document.getElementById("ast-desktop-header"),a=t&&t.querySelectorAll(".ast-site-identity")[0],o=a&&a.querySelectorAll(".ast-site-title-wrap")[0];o&&(o.style.display=e?"block":"none")})(e.value.data);break;case"clearPreviewAssets":const m=document.getElementById("starter-templates-typography");m&&m.remove(),document.querySelector("body").classList.remove("starter-templates-preview-palette");const p=document.getElementsByClassName("starter-templates-preview-palette");p.length>0&&p[0].remove();break;case"completeOnboarding":localStorage.removeItem("starter-templates-iframe-preview-data")}};window.addEventListener("message",(function(e){if(o()&&(console.log("addEventListener message: ",e),"object"==typeof e.data&&"starterTemplatePreviewDispatch"===e.data.call)){const t=e.data;let a=JSON.parse(localStorage.getItem(n));null===a&&(a={},a.data={}),a.data[t.value.param]=t.value.data,delete a.data.clearPreviewAssets,t.url=window.location.origin,a.url=window.location.origin,"cleanStorage"===t.value.param?(delete a.data.cleanStorage,a.data.siteLogo=t.value.data,a.data.colorPalette={},a.data.siteTypography={},Object.keys(a.data).map((e=>i({value:{param:e,data:a.data[e]}})))):i(t),localStorage.setItem(n,JSON.stringify(a))}}),!1),a()((()=>{if(!o())return;const e=document.createElement("style");e.id="starter-templates-logo-css",document.getElementsByTagName("head")[0].appendChild(e),e.innerHTML=".site-logo-img img { transition: unset; } #wpadminbar { display: none; } html{  margin-top: 0 !important; }}";const t=(a=n,JSON.parse(localStorage.getItem(a)));var a;t&&Object.keys(t.data).map((e=>i({value:{param:e,data:t.data[e]}})))}))})()})();
jQuery(document).ready(function($){var history=[];var back=false;if($('ul#choices li').length){display_back_button();var qid=parseInt($('.yesno_q').attr('id').replace('q',''));history.push(qid);}
$(document).on('click','#choices button',function(event){event.preventDefault();var items={'action':'YESNO_next_question','qid':$(this).val()}
if($(this).attr('id')=='back_button'){back=true;if(history.length>1){history.pop();}
else{return false;}}
else{back=false;}
$.ajax({type:'POST',url:ajaxurl,data:items,success:function(response){;}}).done(function(result){if(result.url!=''){$('#question_wrap, #choices').animate({opacity:'0.0'},1000,'swing',function(){window.location.href=result.url;});}
else{if(back){$('#question_wrap').css({opacity:'0.0'},1000);$('.yesno_q').attr('id','q'+result.qid);if(result.title!=''){$('.yesno_q dt span').text(result.title);}
else{$('.yesno_q dt span').text('Q'+result.qnum);}
$('.yesno_q dd').html(result.question);$('#question_wrap').animate({marginLeft:-1200},0);$('#question_wrap').animate({opacity:'1'},0);$('#question_wrap').animate({marginLeft:0},500,'swing',function(){if(result.choices.length>0){$('#choices').children().remove();for(var i=0;i<result.choices.length;i++){$('#choices').append('<li><button value="'+result.choices[i].goto+'">'+result.choices[i].label+'</button></li>');};display_back_button();}
else{$('#choices').animate({opacity:'0.0'},1000,function(){$('#choices').children().remove();});}
scroll_to_yseno_head();});}
else{$('#question_wrap').animate({marginLeft:-1200},500,'swing',function(){$('.yesno_q').attr('id','q'+result.qid);history.push(parseInt(result.qid));if(result.title!=''){$('.yesno_q dt span').text(result.title);}
else{$('.yesno_q dt span').text('Q'+result.qnum);}
$('.yesno_q dd').html(result.question);$('#question_wrap').css({opacity:'0.0'});$('#question_wrap').animate({marginLeft:0},0);$('#question_wrap').animate({opacity:'1'},1000);if(result.choices.length>0){$('#choices').children().remove();for(var i=0;i<result.choices.length;i++){$('#choices').append('<li><button value="'+result.choices[i].goto+'">'+result.choices[i].label+'</button></li>');};display_back_button();}
else{$('#choices').animate({opacity:'0.0'},1000,function(){$('#choices').children().remove();});}
scroll_to_yseno_head();});}}});})
function display_back_button(){$('ul#choices').append('<li id="back">');$('ul#choices li#back').hide();$('ul#choices li#back').append('<button id="back_button" value="">'+yesno_text.back+'</button>');if(history.length>1){$('#back_button').val(history[history.length-2]);$('ul#choices li#back').show();}}
function scroll_to_yseno_head(){return;var yn_wrap=$('#yesno_wrap').offset();console.log(yn_wrap);$('html, body').animate({scrollTop:yn_wrap.top-32},'slow','swing');}});
!function(a){function l(t,e){return"function"==typeof t?t.call(e):t}function h(t,e){this.$element=a(t),this.options=e,this.enabled=!0,this.fixTitle()}h.prototype={show:function(){var t=this.getTitle();if(t&&this.enabled){var e,i=this.tip(),s=(i.find(".tipsy-inner")[this.options.html?"html":"text"](t),i[0].className="tipsy",i.remove().css({top:0,left:0,visibility:"hidden",display:"block"}).prependTo(document.body),a.extend({},this.$element.offset(),{width:this.$element[0].offsetWidth,height:this.$element[0].offsetHeight})),n=i[0].offsetWidth,o=i[0].offsetHeight,t=l(this.options.gravity,this.$element[0]);switch(t.charAt(0)){case"n":e={top:s.top+s.height+this.options.offset,left:s.left+s.width/2-n/2};break;case"s":e={top:s.top-o-this.options.offset,left:s.left+s.width/2-n/2};break;case"e":e={top:s.top+s.height/2-o/2,left:s.left-n-this.options.offset};break;case"w":(extra_gap=0)<a("body").css("position").length&&"relative"==a("body").css("position")&&a("#wpadminbar").length&&(extra_gap=a("#wpadminbar").height()),e={top:s.top+s.height/2-o/2-extra_gap,left:s.left+s.width+this.options.offset}}2==t.length&&("w"==t.charAt(1)?e.left=s.left+s.width/2-15:e.left=s.left+s.width/2-n+15),i.css(e).addClass("tipsy-"+t),i.find(".tipsy-arrow")[0].className="tipsy-arrow tipsy-arrow-"+t.charAt(0),this.options.className&&i.addClass(l(this.options.className,this.$element[0])),this.options.fade?i.stop().css({opacity:0,display:"block",visibility:"visible"}).animate({opacity:this.options.opacity}):i.css({visibility:"visible",opacity:this.options.opacity})}},hide:function(){this.options.fade?this.tip().stop().fadeOut(function(){a(this).remove()}):this.tip().remove()},fixTitle:function(){var t=this.$element;!t.attr("title")&&"string"==typeof t.attr("original-title")||t.attr("original-title",t.attr("title")||"").removeAttr("title")},getTitle:function(){var t,e=this.$element,i=this.options;return this.fixTitle(),"string"==typeof(i=this.options).title?t=e.attr("title"==i.title?"original-title":i.title):"function"==typeof i.title&&(t=i.title.call(e[0])),(t=(""+t).replace(/(^\s*|\s*$)/,""))||i.fallback},tip:function(){return this.$tip||(this.$tip=a('<div class="tipsy"></div>').html('<div class="tipsy-arrow"></div><div class="tipsy-inner"></div>'),this.$tip.data("tipsy-pointee",this.$element[0])),this.$tip},validate:function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},toggleEnabled:function(){this.enabled=!this.enabled}},a.fn.tipsy=function(i){var t,e;return!0===i?this.data("tipsy"):("string"==typeof i?(t=this.data("tipsy"))&&t[i]():((i=a.extend({},a.fn.tipsy.defaults,i)).on||this.each(function(){s(this)}),"manual"!=i.trigger&&(t="hover"==i.trigger?"mouseenter":"focus",e="hover"==i.trigger?"mouseleave":"blur",i.on?a(document).on(t,this.selector,n).on(e,this.selector,o):this.on(t,n).on(e,o))),this);function s(t){var e=a.data(t,"tipsy");return e||(e=new h(t,a.fn.tipsy.elementOptions(t,i)),a.data(t,"tipsy",e)),e}function n(){var t=s(this);t.hoverState="in",0==i.delayIn?t.show():(t.fixTitle(),setTimeout(function(){"in"==t.hoverState&&t.show()},i.delayIn))}function o(){var t=s(this);t.hoverState="out",0==i.delayOut?t.hide():setTimeout(function(){"out"==t.hoverState&&t.hide()},i.delayOut)}},a.fn.tipsy.defaults={className:null,delayIn:0,delayOut:0,fade:!1,fallback:"",gravity:"n",html:!1,live:!1,offset:0,opacity:.8,title:"title",trigger:"hover"},a.fn.tipsy.revalidate=function(){a(".tipsy").each(function(){var t=a.data(this,"tipsy-pointee");t&&function(t){for(;t=t.parentNode;)if(t==document)return 1}(t)||a(this).remove()})},a.fn.tipsy.elementOptions=function(t,e){return a.metadata?a.extend({},e,a(t).metadata()):e},a.fn.tipsy.autoNS=function(){return a(this).offset().top>a(document).scrollTop()+a(window).height()/2?"s":"n"},a.fn.tipsy.autoWE=function(){return a(this).offset().left>a(document).scrollLeft()+a(window).width()/2?"e":"w"},a.fn.tipsy.autoBounds=function(n,o){return function(){var t={ns:o[0],ew:1<o.length&&o[1]},e=a(document).scrollTop()+n,i=a(document).scrollLeft()+n,s=a(this);return s.offset().top<e&&(t.ns="n"),s.offset().left<i&&(t.ew="w"),a(window).width()+a(document).scrollLeft()-s.offset().left<n&&(t.ew="e"),a(window).height()+a(document).scrollTop()-s.offset().top<n&&(t.ns="s"),t.ns+(t.ew||"")}}}(jQuery);
!function(t){var i,n={message:"",yes_label:"Yes",no_label:"No"},m={init:function(o){i=t.extend({},n,o),t(this).each(function(){t(this).data("options",i),m.build.apply(t(this),[i]),t(this).click(function(o){var i=t(this).data("options");t("#um_confirm_message").html(i.message),t("#um_confirm_button_yes").html(i.yes_label),t("#um_confirm_button_no").html(i.no_label),m.show.apply(this),o.stopPropagation()})})},build:function(o){m.is_builded.apply(this)||(t('<div id="um_confirm_block"></div>').appendTo("body").html('<div class="um_confirm"><div id="um_confirm_title">Confirmation</div><div id="um_confirm_message"></div><div id="um_confirm_buttons"><div id="um_confirm_button_yes" class="um_confirm_button">Yes</div><div id="um_confirm_button_no" class="um_confirm_button">No</div></div></div><div id="um_confirm_block_back"></div>'),t(document).on("click","#um_confirm_button_yes",function(){var o=t("#um_confirm_block").data("obj");m.yes.apply(o)}),t(document).on("click","#um_confirm_button_no",function(){var o=t("#um_confirm_block").data("obj");m.no.apply(o)}),t(document).on("click","#um_confirm_block_back",function(){var o=t("#um_confirm_block").data("obj");m.close.apply(o)}))},is_builded:function(){return t("#um_confirm_block").length},show:function(){t("#um_confirm_block").data("obj",this).show();var o=t(".um_confirm").width(),i=t(".um_confirm").height();t(".um_confirm").css("margin","-"+i/2+"px 0 0 -"+o/2+"px")},close:function(){var o=t(this).data("options");t("#um_confirm_message").html(""),t("#um_confirm_block").hide(),"function"==typeof o.onClose&&o.onClose.apply(this)},yes:function(){var o=t(this).data("options"),i={};if(t("#um_confirm_block").find("form").length){var n=t("#um_confirm_block").find("form").serializeArray();for(key in n)i[n[key].name]=n[key].value}m.close.apply(this),"function"==typeof o.onYes&&o.onYes.apply(this,[i])},no:function(){var o=t(this).data("options"),i={};if(t("#um_confirm_block").find("form").length){var n=t("#um_confirm_block").find("form").serializeArray();for(key in n)i[n[key].name]=n[key].value}m.close.apply(this),"function"==typeof o.onNo&&o.onNo.apply(this,[i])}};t.fn.um_confirm=function(o){return m[o]?m[o].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof o&&o?void t.error("Method "+o+" does not exist for jQuery.um_confirm plugin"):m.init.apply(this,arguments)},t.um_confirm=function(o){i=t.extend({},n,o),t(o.object).data("options",i),m.build.apply(t(o.object),[i]),i.title&&t("#um_confirm_title").html(i.title),t("#um_confirm_message").html(i.message),t("#um_confirm_button_yes").html(i.yes_label),t("#um_confirm_button_no").html(i.no_label),m.show.apply(o.object)}}(jQuery);
!function(e){"function"==typeof define&&define.amd?define("picker",["jquery"],e):"object"==typeof exports?module.exports=e(require("jquery")):this.Picker=e(jQuery)}(function(h){var o=h(window),m=h(document),r=h(document.documentElement),g=null!=document.documentElement.style.transition;function v(r,t,n,e){var o,d,s,i,c,u;return r?(o=!1,d={id:r.id||"P"+Math.abs(~~(Math.random()*new Date))},s=n?h.extend(!0,{},n.defaults,e):e||{},i=h.extend({},v.klasses(),s.klass),c=h(r),u=(e=function(){return this.start()}).prototype={constructor:e,$node:c,start:function(){var e;return d&&d.start?u:(d.methods={},d.start=!0,d.open=!1,d.type=r.type,r.autofocus=r==b(),r.readOnly=!s.editable,r.id=r.id||d.id,"text"!=r.type&&(r.type="text"),u.component=new n(u,s),u.$root=h('<div class="'+i.picker+'" id="'+r.id+'_root" />'),$(u.$root[0],"hidden",!0),u.$holder=h(a()).appendTo(u.$root),l(),s.formatSubmit&&(!0===s.hiddenName?(e=r.name,r.name=""):e=(e=["string"==typeof s.hiddenPrefix?s.hiddenPrefix:"","string"==typeof s.hiddenSuffix?s.hiddenSuffix:"_submit"])[0]+r.name+e[1],u._hidden=h('<input type=hidden name="'+e+'"'+(c.data("value")||r.value?' value="'+u.get("select",s.formatSubmit)+'"':"")+">")[0],c.on("change."+d.id,function(){u._hidden.value=r.value?u.get("select",s.formatSubmit):""})),c.data(t,u).addClass(i.input).val(c.data("value")?u.get("select",s.format):r.value).on("focus."+d.id+" click."+d.id,function(o,r,i){var a;return function(){var e=this,t=arguments,n=i&&!a;clearTimeout(a),a=setTimeout(function(){a=null,i||o.apply(e,t)},r),n&&o.apply(e,t)}}(function(e){e.preventDefault(),u.open()},100)),s.editable||c.on("keydown."+d.id,p),$(r,{haspopup:!0,expanded:!1,readonly:!1,owns:r.id+"_root"}),s.containerHidden?h(s.containerHidden).append(u._hidden):c.after(u._hidden),s.container?h(s.container).append(u.$root):c.after(u.$root),u.on({start:u.component.onStart,render:u.component.onRender,stop:u.component.onStop,open:u.component.onOpen,close:u.component.onClose,set:u.component.onSet}).on({start:s.onStart,render:s.onRender,stop:s.onStop,open:s.onOpen,close:s.onClose,set:s.onSet}),o=function(e){var t,n="position";e.currentStyle?t=e.currentStyle[n]:window.getComputedStyle&&(t=getComputedStyle(e)[n]);return"fixed"==t}(u.$holder[0]),r.autofocus&&u.open(),u.trigger("start").trigger("render"))},render:function(e){return e?(u.$holder=h(a()),l(),u.$root.html(u.$holder)):u.$root.find("."+i.box).html(u.component.nodes(d.open)),u.trigger("render")},stop:function(){return d.start&&(u.close(),u._hidden&&u._hidden.parentNode.removeChild(u._hidden),u.$root.remove(),c.removeClass(i.input).removeData(t),setTimeout(function(){c.off("."+d.id)},0),r.type=d.type,r.readOnly=!1,u.trigger("stop"),d.methods={},d.start=!1),u},open:function(e){return d.open?u:(c.addClass(i.active),$(r,"expanded",!0),setTimeout(function(){u.$root.addClass(i.opened),$(u.$root[0],"hidden",!1)},0),!1!==e&&(d.open=!0,o&&h("body").css("overflow","hidden").css("padding-right","+="+y()),o&&g?u.$holder.find("."+i.frame).one("transitionend",function(){u.$holder.eq(0).focus()}):setTimeout(function(){u.$holder.eq(0).focus()},0),m.on("click."+d.id+" focusin."+d.id,function(e){var t=_(e,r);e.isSimulated||t==r||t==document||3==e.which||u.close(t===u.$holder[0])}).on("keydown."+d.id,function(e){var t=e.keyCode,n=u.component.key[t],o=_(e,r);27==t?u.close(!0):o!=u.$holder[0]||!n&&13!=t?h.contains(u.$root[0],o)&&13==t&&(e.preventDefault(),o.click()):(e.preventDefault(),n?v._.trigger(u.component.key.go,u,[v._.trigger(n)]):u.$root.find("."+i.highlighted).hasClass(i.disabled)||(u.set("select",u.component.item.highlight),s.closeOnSelect&&u.close(!0)))})),u.trigger("open"))},close:function(e){return e&&(s.editable?r.focus():(u.$holder.off("focus.toOpen").focus(),setTimeout(function(){u.$holder.on("focus.toOpen",f)},0))),c.removeClass(i.active),$(r,"expanded",!1),setTimeout(function(){u.$root.removeClass(i.opened+" "+i.focused),$(u.$root[0],"hidden",!0)},0),d.open?(d.open=!1,o&&h("body").css("overflow","").css("padding-right","-="+y()),m.off("."+d.id),u.trigger("close")):u},clear:function(e){return u.set("clear",null,e)},set:function(e,t,n){var o,r,i=h.isPlainObject(e),a=i?e:{};if(n=i&&h.isPlainObject(t)?t:n||{},e){for(o in i||(a[e]=t),a)r=a[o],o in u.component.item&&(void 0===r&&(r=null),u.component.set(o,r,n)),"select"!=o&&"clear"!=o||!s.updateInput||c.val("clear"==o?"":u.get(o,s.format)).trigger("change");u.render()}return n.muted?u:u.trigger("set",a)},get:function(e,t){if(null!=d[e=e||"value"])return d[e];if("valueSubmit"==e){if(u._hidden)return u._hidden.value;e="value"}var n;return"value"==e?r.value:e in u.component.item?"string"==typeof t?(n=u.component.get(e))?v._.trigger(u.component.formats.toString,u.component,[t,n]):"":u.component.get(e):void 0},on:function(e,t,n){var o,r,i=h.isPlainObject(e),a=i?e:{};if(e)for(o in i||(a[e]=t),a)r=a[o],d.methods[o=n?"_"+o:o]=d.methods[o]||[],d.methods[o].push(r);return u},off:function(){var e,t=arguments,n=0;for(namesCount=t.length;n<namesCount;n+=1)(e=t[n])in d.methods&&delete d.methods[e];return u},trigger:function(e,t){function n(e){(e=d.methods[e])&&e.map(function(e){v._.trigger(e,u,[t])})}return n("_"+e),n(e),u}},new e):v;function a(){return v._.node("div",v._.node("div",v._.node("div",v._.node("div",u.component.nodes(d.open),i.box),i.wrap),i.frame),i.holder,'tabindex="-1"')}function l(){u.$holder.on({keydown:p,"focus.toOpen":f,blur:function(){c.removeClass(i.target)},focusin:function(e){u.$root.removeClass(i.focused),e.stopPropagation()},"mousedown click":function(e){var t=_(e,r);t!=u.$holder[0]&&(e.stopPropagation(),"mousedown"!=e.type||h(t).is("input, select, textarea, button, option")||(e.preventDefault(),u.$holder.eq(0).focus()))}}).on("click","[data-pick], [data-nav], [data-clear], [data-close]",function(){var e=h(this),t=e.data(),e=e.hasClass(i.navDisabled)||e.hasClass(i.disabled),n=(n=b())&&(n.type||n.href?n:null);(e||n&&!h.contains(u.$root[0],n))&&u.$holder.eq(0).focus(),!e&&t.nav?u.set("highlight",u.component.item.highlight,{nav:t.nav}):!e&&"pick"in t?(u.set("select",t.pick),s.closeOnSelect&&u.close(!0)):t.clear?(u.clear(),s.closeOnClear&&u.close(!0)):t.close&&u.close(!0)})}function f(e){e.stopPropagation(),c.addClass(i.target),u.$root.addClass(i.focused),u.open()}function p(e){var t=e.keyCode,n=/^(8|46)$/.test(t);if(27==t)return u.close(!0),!1;(32==t||n||!d.open&&u.component.key[t])&&(e.preventDefault(),e.stopPropagation(),n?u.clear().close():u.open())}}function y(){if(r.height()<=o.height())return 0;var e=h('<div style="visibility:hidden;width:100px" />').appendTo("body"),t=e[0].offsetWidth;e.css("overflow","scroll");var n=h('<div style="width:100%" />').appendTo(e)[0].offsetWidth;return e.remove(),t-n}function _(e,t){var n=[];return e.path&&(n=e.path),(n=e.originalEvent&&e.originalEvent.path?e.originalEvent.path:n)&&0<n.length?t&&0<=n.indexOf(t)?t:n[0]:e.target}function $(e,t,n){if(h.isPlainObject(t))for(var o in t)i(e,o,t[o]);else i(e,t,n)}function i(e,t,n){e.setAttribute(("role"==t?"":"aria-")+t,n)}function b(){try{return document.activeElement}catch(e){}}return v.klasses=function(e){return{picker:e=e||"picker",opened:e+"--opened",focused:e+"--focused",input:e+"__input",active:e+"__input--active",target:e+"__input--target",holder:e+"__holder",frame:e+"__frame",wrap:e+"__wrap",box:e+"__box"}},v._={group:function(e){for(var t,n="",o=v._.trigger(e.min,e);o<=v._.trigger(e.max,e,[o]);o+=e.i)t=v._.trigger(e.item,e,[o]),n+=v._.node(e.node,t[0],t[1],t[2]);return n},node:function(e,t,n,o){return t?"<"+e+(n=n?' class="'+n+'"':"")+(o=o?" "+o:"")+">"+(t=h.isArray(t)?t.join(""):t)+"</"+e+">":""},lead:function(e){return(e<10?"0":"")+e},trigger:function(e,t,n){return"function"==typeof e?e.apply(t,n||[]):e},digits:function(e){return/\d/.test(e[1])?2:1},isDate:function(e){return-1<{}.toString.call(e).indexOf("Date")&&this.isInteger(e.getDate())},isInteger:function(e){return-1<{}.toString.call(e).indexOf("Number")&&e%1==0},ariaAttr:function(e,t){h.isPlainObject(e)||(e={attribute:t});for(var n in t="",e){var o=("role"==n?"":"aria-")+n,r=e[n];t+=null==r?"":o+'="'+e[n]+'"'}return t}},v.extend=function(o,r){h.fn[o]=function(e,t){var n=this.data(o);return"picker"==e?n:n&&"string"==typeof e?v._.trigger(n[e],n,[t]):this.each(function(){h(this).data(o)||new v(this,o,r,e)})},h.fn[o].defaults=r.defaults},v});
!function(e){"function"==typeof define&&define.amd?define(["./picker","jquery"],e):"object"==typeof exports?module.exports=e(require("./picker.js"),require("jquery")):e(Picker,jQuery)}(function(e,p){var t,y=e._;function a(t,a){function e(){return r.currentStyle?"rtl"==r.currentStyle.direction:"rtl"==getComputedStyle(t.$root[0]).direction}var n,i=this,r=t.$node[0],o=r.value,s=t.$node.data("value"),o=s||o,s=s?a.formatSubmit:a.format;i.settings=a,i.$node=t.$node,i.queue={min:"measure create",max:"measure create",now:"now create",select:"parse create validate",highlight:"parse navigate create validate",view:"parse create validate viewset",disable:"deactivate",enable:"activate"},i.item={},i.item.clear=null,i.item.disable=(a.disable||[]).slice(0),i.item.enable=-(!0===(n=i.item.disable)[0]?n.shift():-1),i.set("min",a.min).set("max",a.max).set("now"),o?i.set("select",o,{format:s,defaultValue:!0}):i.set("select",null).set("highlight",i.item.now),i.key={40:7,38:-7,39:function(){return e()?-1:1},37:function(){return e()?1:-1},go:function(e){var t=i.item.highlight,t=new Date(t.year,t.month,t.date+e);i.set("highlight",t,{interval:e}),this.render()}},t.on("render",function(){t.$root.find("."+a.klass.selectMonth).on("change",function(){var e=this.value;e&&(t.set("highlight",[t.get("view").year,e,t.get("highlight").date]),t.$root.find("."+a.klass.selectMonth).trigger("focus"))}),t.$root.find("."+a.klass.selectYear).on("change",function(){var e=this.value;e&&(t.set("highlight",[e,t.get("view").month,t.get("highlight").date]),t.$root.find("."+a.klass.selectYear).trigger("focus"))})},1).on("open",function(){var e="";i.disabled(i.get("now"))&&(e=":not(."+a.klass.buttonToday+")"),t.$root.find("button"+e+", select").attr("disabled",!1)},1).on("close",function(){t.$root.find("button, select").attr("disabled",!0)},1)}function n(e,t,a){e=e.match(/[^\x00-\x7F]+|\w+/)[0];return a.mm||a.m||(a.m=t.indexOf(e)+1),e.length}function i(e){return e.match(/\w+/)[0].length}a.prototype.set=function(t,a,n){var i=this,e=i.item;return null===a?e[t="clear"==t?"select":t]=a:(e["enable"==t?"disable":"flip"==t?"enable":t]=i.queue[t].split(" ").map(function(e){return a=i[e](t,a,n)}).pop(),"select"==t?i.set("highlight",e.select,n):"highlight"==t?i.set("view",e.highlight,n):t.match(/^(flip|min|max|disable|enable)$/)&&(e.select&&i.disabled(e.select)&&i.set("select",e.select,n),e.highlight)&&i.disabled(e.highlight)&&i.set("highlight",e.highlight,n)),i},a.prototype.get=function(e){return this.item[e]},a.prototype.create=function(e,t,a){var n,i=this;return(t=void 0===t?e:t)==-1/0||t==1/0?n=t:t=p.isPlainObject(t)&&y.isInteger(t.pick)?t.obj:p.isArray(t)?(t=new Date(t[0],t[1],t[2]),y.isDate(t)?t:i.create().obj):y.isInteger(t)||y.isDate(t)?i.normalize(new Date(t),a):i.now(e,t,a),{year:n||t.getFullYear(),month:n||t.getMonth(),date:n||t.getDate(),day:n||t.getDay(),obj:n||t,pick:n||t.getTime()}},a.prototype.createRange=function(e,t){function a(e){return!0===e||p.isArray(e)||y.isDate(e)?n.create(e):e}var n=this;return y.isInteger(e)||(e=a(e)),y.isInteger(t)||(t=a(t)),y.isInteger(e)&&p.isPlainObject(t)?e=[t.year,t.month,t.date+e]:y.isInteger(t)&&p.isPlainObject(e)&&(t=[e.year,e.month,e.date+t]),{from:a(e),to:a(t)}},a.prototype.withinRange=function(e,t){return e=this.createRange(e.from,e.to),t.pick>=e.from.pick&&t.pick<=e.to.pick},a.prototype.overlapRanges=function(e,t){var a=this;return e=a.createRange(e.from,e.to),t=a.createRange(t.from,t.to),a.withinRange(e,t.from)||a.withinRange(e,t.to)||a.withinRange(t,e.from)||a.withinRange(t,e.to)},a.prototype.now=function(e,t,a){return t=new Date,a&&a.rel&&t.setDate(t.getDate()+a.rel),this.normalize(t,a)},a.prototype.navigate=function(e,t,a){var n,i,r,o=p.isArray(t),s=p.isPlainObject(t),l=this.item.view;if(o||s){for(r=s?(n=t.year,i=t.month,t.date):(n=+t[0],i=+t[1],+t[2]),a&&a.nav&&l&&l.month!==i&&(n=l.year,i=l.month),n=(o=new Date(n,i+(a&&a.nav?a.nav:0),1)).getFullYear(),i=o.getMonth();new Date(n,i,r).getMonth()!==i;)--r;t=[n,i,r]}return t},a.prototype.normalize=function(e){return e.setHours(0,0,0,0),e},a.prototype.measure=function(e,t){return y.isInteger(t)?t=this.now(e,t,{rel:t}):t?"string"==typeof t&&(t=this.parse(e,t)):t="min"==e?-1/0:1/0,t},a.prototype.viewset=function(e,t){return this.create([t.year,t.month,1])},a.prototype.validate=function(e,a,t){var n,i,r,o,s=this,l=a,c=t&&t.interval?t.interval:1,d=-1===s.item.enable,u=s.item.min,h=s.item.max,m=d&&s.item.disable.filter(function(e){var t;return p.isArray(e)&&((t=s.create(e).pick)<a.pick?n=!0:t>a.pick&&(i=!0)),y.isInteger(e)}).length;if((!t||!t.nav&&!t.defaultValue)&&(!d&&s.disabled(a)||d&&s.disabled(a)&&(m||n||i)||!d&&(a.pick<=u.pick||a.pick>=h.pick)))for(d&&!m&&(!i&&0<c||!n&&c<0)&&(c*=-1);s.disabled(a)&&(1<Math.abs(c)&&(a.month<l.month||a.month>l.month)&&(a=l,c=0<c?1:-1),a.pick<=u.pick?(r=!0,c=1,a=s.create([u.year,u.month,u.date+(a.pick===u.pick?0:-1)])):a.pick>=h.pick&&(o=!0,c=-1,a=s.create([h.year,h.month,h.date+(a.pick===h.pick?0:1)])),!r||!o);)a=s.create([a.year,a.month,a.date+c]);return a},a.prototype.disabled=function(t){var a=this,e=(e=a.item.disable.filter(function(e){return y.isInteger(e)?t.day===(a.settings.firstDay?e:e-1)%7:p.isArray(e)||y.isDate(e)?t.pick===a.create(e).pick:p.isPlainObject(e)?a.withinRange(e,t):void 0})).length&&!e.filter(function(e){return p.isArray(e)&&"inverted"==e[3]||p.isPlainObject(e)&&e.inverted}).length;return-1===a.item.enable?!e:e||t.pick<a.item.min.pick||t.pick>a.item.max.pick},a.prototype.parse=function(e,n,t){var i=this,r={};return n&&"string"==typeof n?(t&&t.format||((t=t||{}).format=i.settings.format),i.formats.toArray(t.format).map(function(e){var t=i.formats[e],a=t?y.trigger(t,i,[n,r]):e.replace(/^!/,"").length;t&&(r[e]=n.substr(0,a)),n=n.substr(a)}),[r.yyyy||r.yy,+(r.mm||r.m)-1,r.dd||r.d]):n},a.prototype.formats={d:function(e,t){return e?y.digits(e):t.date},dd:function(e,t){return e?2:y.lead(t.date)},ddd:function(e,t){return e?i(e):this.settings.weekdaysShort[t.day]},dddd:function(e,t){return e?i(e):this.settings.weekdaysFull[t.day]},m:function(e,t){return e?y.digits(e):t.month+1},mm:function(e,t){return e?2:y.lead(t.month+1)},mmm:function(e,t){var a=this.settings.monthsShort;return e?n(e,a,t):a[t.month]},mmmm:function(e,t){var a=this.settings.monthsFull;return e?n(e,a,t):a[t.month]},yy:function(e,t){return e?2:(""+t.year).slice(2)},yyyy:function(e,t){return e?4:t.year},toArray:function(e){return e.split(/(d{1,4}|m{1,4}|y{4}|yy|!.)/g)},toString:function(e,t){var a=this;return a.formats.toArray(e).map(function(e){return y.trigger(a.formats[e],a,[0,t])||e.replace(/^!/,"")}).join("")}},a.prototype.isDateExact=function(e,t){return y.isInteger(e)&&y.isInteger(t)||"boolean"==typeof e&&"boolean"==typeof t?e===t:(y.isDate(e)||p.isArray(e))&&(y.isDate(t)||p.isArray(t))?this.create(e).pick===this.create(t).pick:!(!p.isPlainObject(e)||!p.isPlainObject(t))&&this.isDateExact(e.from,t.from)&&this.isDateExact(e.to,t.to)},a.prototype.isDateOverlap=function(e,t){var a=this.settings.firstDay?1:0;return y.isInteger(e)&&(y.isDate(t)||p.isArray(t))?(e=e%7+a)===this.create(t).day+1:y.isInteger(t)&&(y.isDate(e)||p.isArray(e))?(t=t%7+a)===this.create(e).day+1:!(!p.isPlainObject(e)||!p.isPlainObject(t))&&this.overlapRanges(e,t)},a.prototype.flipEnable=function(e){var t=this.item;t.enable=e||(-1==t.enable?1:-1)},a.prototype.deactivate=function(e,t){var n=this,i=n.item.disable.slice(0);return"flip"==t?n.flipEnable():!1===t?(n.flipEnable(1),i=[]):!0===t?(n.flipEnable(-1),i=[]):t.map(function(e){for(var t,a=0;a<i.length;a+=1)if(n.isDateExact(e,i[a])){t=!0;break}t||(y.isInteger(e)||y.isDate(e)||p.isArray(e)||p.isPlainObject(e)&&e.from&&e.to)&&i.push(e)}),i},a.prototype.activate=function(e,t){var r=this,o=r.item.disable,s=o.length;return"flip"==t?r.flipEnable():!0===t?(r.flipEnable(1),o=[]):!1===t?(r.flipEnable(-1),o=[]):t.map(function(e){for(var t,a,n,i=0;i<s;i+=1){if(a=o[i],r.isDateExact(a,e)){n=!(t=o[i]=null);break}if(r.isDateOverlap(a,e)){p.isPlainObject(e)?(e.inverted=!0,t=e):p.isArray(e)?(t=e)[3]||t.push("inverted"):y.isDate(e)&&(t=[e.getFullYear(),e.getMonth(),e.getDate(),"inverted"]);break}}if(t)for(i=0;i<s;i+=1)if(r.isDateExact(o[i],e)){o[i]=null;break}if(n)for(i=0;i<s;i+=1)if(r.isDateOverlap(o[i],e)){o[i]=null;break}t&&o.push(t)}),o.filter(function(e){return null!=e})},a.prototype.nodes=function(o){function e(e){return y.node("div"," ",l.klass["nav"+(e?"Next":"Prev")]+(e&&h.year>=f.year&&h.month>=f.month||!e&&h.year<=p.year&&h.month<=p.month?" "+l.klass.navDisabled:""),"data-nav="+(e||-1)+" "+y.ariaAttr({role:"button",controls:s.$node[0].id+"_table"})+' title="'+(e?l.labelMonthNext:l.labelMonthPrev)+'"')}function t(){var t=l.showMonthsShort?l.monthsShort:l.monthsFull;return l.selectMonths?y.node("select",y.group({min:0,max:11,i:1,node:"option",item:function(e){return[t[e],0,"value="+e+(h.month==e?" selected":"")+(h.year==p.year&&e<p.month||h.year==f.year&&e>f.month?" disabled":"")]}}),l.klass.selectMonth,(o?"":"disabled")+" "+y.ariaAttr({controls:s.$node[0].id+"_table"})+' title="'+l.labelMonthSelect+'"'):y.node("div",t[h.month],l.klass.month)}function a(){var e,t,a,n,i=h.year,r=!0===l.selectYears?5:~~(l.selectYears/2);return r?(a=p.year,e=f.year,t=i+r,(r=i-r)<a&&(t+=a-r,r=a),e<t&&(r-=(n=t-e)<(a=r-a)?n:a,t=e),y.node("select",y.group({min:r,max:t,i:1,node:"option",item:function(e){return[e,0,"value="+e+(i==e?" selected":"")]}}),l.klass.selectYear,(o?"":"disabled")+" "+y.ariaAttr({controls:s.$node[0].id+"_table"})+' title="'+l.labelYearSelect+'"')):y.node("div",i,l.klass.year)}var n,i,s=this,l=s.settings,r=s.item,c=r.now,d=r.select,u=r.highlight,h=r.view,m=r.disable,p=r.min,f=r.max,r=(n=(l.showWeekdaysFull?l.weekdaysFull:l.weekdaysShort).slice(0),i=l.weekdaysFull.slice(0),l.firstDay&&(n.push(n.shift()),i.push(i.shift())),y.node("thead",y.node("tr",y.group({min:0,max:6,i:1,node:"th",item:function(e){return[n[e],l.klass.weekdays,'scope=col title="'+i[e]+'"']}}))));return y.node("div",(l.selectYears?a()+t():t()+a())+e()+e(1),l.klass.header)+y.node("table",r+y.node("tbody",y.group({min:0,max:5,i:1,node:"tr",item:function(e){var t=l.firstDay&&0===s.create([h.year,h.month,1]).day?-7:0;return[y.group({min:7*e-h.day+t+1,max:function(){return this.min+7-1},i:1,node:"td",item:function(e){e=s.create([h.year,h.month,e+(l.firstDay?1:0)]);var t,a=d&&d.pick==e.pick,n=u&&u.pick==e.pick,i=m&&s.disabled(e)||e.pick<p.pick||e.pick>f.pick,r=y.trigger(s.formats.toString,s,[l.format,e]);return[y.node("div",e.date,((t=[l.klass.day]).push(h.month==e.month?l.klass.infocus:l.klass.outfocus),c.pick==e.pick&&t.push(l.klass.now),a&&t.push(l.klass.selected),n&&t.push(l.klass.highlighted),i&&t.push(l.klass.disabled),t.join(" ")),"data-pick="+e.pick+" "+y.ariaAttr({role:"gridcell",label:r,selected:!(!a||s.$node.val()!==r)||null,activedescendant:!!n||null,disabled:!!i||null})),"",y.ariaAttr({role:"presentation"})]}})]}})),l.klass.table,'id="'+s.$node[0].id+'_table" '+y.ariaAttr({role:"grid",controls:s.$node[0].id,readonly:!0}))+y.node("div",y.node("button",l.today,l.klass.buttonToday,"type=button data-pick="+c.pick+(o&&!s.disabled(c)?"":" disabled")+" "+y.ariaAttr({controls:s.$node[0].id}))+y.node("button",l.clear,l.klass.buttonClear,"type=button data-clear=1"+(o?"":" disabled")+" "+y.ariaAttr({controls:s.$node[0].id}))+y.node("button",l.close,l.klass.buttonClose,"type=button data-close=true "+(o?"":" disabled")+" "+y.ariaAttr({controls:s.$node[0].id})),l.klass.footer)},a.defaults={labelMonthNext:"Next month",labelMonthPrev:"Previous month",labelMonthSelect:"Select a month",labelYearSelect:"Select a year",monthsFull:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],weekdaysFull:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],today:"Today",clear:"Clear",close:"Close",closeOnSelect:!0,closeOnClear:!0,updateInput:!0,format:"d mmmm, yyyy",klass:{table:(t=e.klasses().picker+"__")+"table",header:t+"header",navPrev:t+"nav--prev",navNext:t+"nav--next",navDisabled:t+"nav--disabled",month:t+"month",year:t+"year",selectMonth:t+"select--month",selectYear:t+"select--year",weekdays:t+"weekday",day:t+"day",disabled:t+"day--disabled",selected:t+"day--selected",highlighted:t+"day--highlighted",now:t+"day--today",infocus:t+"day--infocus",outfocus:t+"day--outfocus",footer:t+"footer",buttonClear:t+"button--clear",buttonToday:t+"button--today",buttonClose:t+"button--close"}},e.extend("pickadate",a)});
!function(t){"function"==typeof define&&define.amd?define(["./picker","jquery"],t):"object"==typeof exports?module.exports=t(require("./picker.js"),require("jquery")):t(Picker,jQuery)}(function(t,l){var e,m=60,n=1440,h=t._;function i(n,a){var t,e=this,i=n.$node[0].value,r=n.$node.data("value"),i=r||i,r=r?a.formatSubmit:a.format;e.settings=a,e.$node=n.$node,e.queue={interval:"i",min:"measure create",max:"measure create",now:"now create",select:"parse create validate",highlight:"parse create validate",view:"parse create validate",disable:"deactivate",enable:"activate"},e.item={},e.item.clear=null,e.item.interval=a.interval||30,e.item.disable=(a.disable||[]).slice(0),e.item.enable=-(!0===(t=e.item.disable)[0]?t.shift():-1),e.set("min",a.min).set("max",a.max).set("now"),i?e.set("select",i,{format:r}):e.set("select",null).set("highlight",e.item.now),e.key={40:1,38:-1,39:1,37:-1,go:function(t){e.set("highlight",e.item.highlight.pick+t*e.item.interval,{interval:t*e.item.interval}),this.render()}},n.on("render",function(){function t(e,i){r("transform").map(function(t){e.css(t,i)}),r("transition").map(function(t){e.css(t,i)})}var e=n.$root.children(),i=e.find("."+a.klass.viewset),r=function(e){return["webkit","moz","ms","o",""].map(function(t){return(t?"-"+t+"-":"")+e})};i.length&&(t(e,"none"),e[0].scrollTop=~~i.position().top-2*i[0].clientHeight,t(e,""))},1).on("open",function(){n.$root.find("button").attr("disabled",!1)},1).on("close",function(){n.$root.find("button").attr("disabled",!0)},1)}i.prototype.set=function(e,i,r){var n=this,t=n.item;return null===i?t[e="clear"==e?"select":e]=i:(t["enable"==e?"disable":"flip"==e?"enable":e]=n.queue[e].split(" ").map(function(t){return i=n[t](e,i,r)}).pop(),"select"==e?n.set("highlight",t.select,r):"highlight"==e?n.set("view",t.highlight,r):"interval"==e?n.set("min",t.min,r).set("max",t.max,r):e.match(/^(flip|min|max|disable|enable)$/)&&(t.select&&n.disabled(t.select)&&n.set("select",i,r),t.highlight&&n.disabled(t.highlight)&&n.set("highlight",i,r),"min"==e)&&n.set("max",t.max,r)),n},i.prototype.get=function(t){return this.item[t]},i.prototype.create=function(t,e,i){var r=this;return h.isDate(e=void 0===e?t:e)&&(e=[e.getHours(),e.getMinutes()]),l.isPlainObject(e)&&h.isInteger(e.pick)?e=e.pick:l.isArray(e)?e=+e[0]*m+ +e[1]:h.isInteger(e)||(e=r.now(t,e,i)),"max"==t&&e<r.item.min.pick&&(e+=n),"min"!=t&&"max"!=t&&(e-r.item.min.pick)%r.item.interval!=0&&(e+=r.item.interval),{hour:~~(24+(e=r.normalize(t,e,i))/m)%24,mins:(m+e%m)%m,time:(n+e)%n,pick:e%n}},i.prototype.createRange=function(t,e){function i(t){return!0===t||l.isArray(t)||h.isDate(t)?r.create(t):t}var r=this;return h.isInteger(t)||(t=i(t)),h.isInteger(e)||(e=i(e)),h.isInteger(t)&&l.isPlainObject(e)?t=[e.hour,e.mins+t*r.settings.interval]:h.isInteger(e)&&l.isPlainObject(t)&&(e=[t.hour,t.mins+e*r.settings.interval]),{from:i(t),to:i(e)}},i.prototype.withinRange=function(t,e){return t=this.createRange(t.from,t.to),e.pick>=t.from.pick&&e.pick<=t.to.pick},i.prototype.overlapRanges=function(t,e){var i=this;return t=i.createRange(t.from,t.to),e=i.createRange(e.from,e.to),i.withinRange(t,e.from)||i.withinRange(t,e.to)||i.withinRange(e,t.from)||i.withinRange(e,t.to)},i.prototype.now=function(t,e){var i,r=this.item.interval,n=new Date,n=n.getHours()*m+n.getMinutes();return n-=n%r,i=e<0&&r*e+n<=-r,n+="min"==t&&i?0:r,h.isInteger(e)&&(n+=r*(i&&"max"!=t?e+1:e)),n},i.prototype.normalize=function(t,e){var i=this.item.interval,r=this.item.min&&this.item.min.pick||0;return e-="min"==t?0:(e-r)%i},i.prototype.measure=function(t,e,i){return"string"==typeof(e=e||("min"==t?[0,0]:[23,59]))?e=this.parse(t,e):!0===e||h.isInteger(e)?e=this.now(t,e,i):l.isPlainObject(e)&&h.isInteger(e.pick)&&(e=this.normalize(t,e.pick,i)),e},i.prototype.validate=function(t,e,i){var r=this,i=(i&&i.interval?i:r.item).interval;return r.disabled(e)&&(e=r.shift(e,i)),e=r.scope(e),e=r.disabled(e)?r.shift(e,-1*i):e},i.prototype.disabled=function(e){var i=this,t=(t=i.item.disable.filter(function(t){return h.isInteger(t)?e.hour==t:l.isArray(t)||h.isDate(t)?e.pick==i.create(t).pick:l.isPlainObject(t)?i.withinRange(t,e):void 0})).length&&!t.filter(function(t){return l.isArray(t)&&"inverted"==t[2]||l.isPlainObject(t)&&t.inverted}).length;return-1===i.item.enable?!t:t||e.pick<i.item.min.pick||e.pick>i.item.max.pick},i.prototype.shift=function(t,e){var i=this,r=i.item.min.pick,n=i.item.max.pick;for(e=e||i.item.interval;i.disabled(t)&&!((t=i.create(t.pick+=e)).pick<=r||t.pick>=n););return t},i.prototype.scope=function(t){var e=this.item.min.pick,i=this.item.max.pick;return this.create(t.pick>i?i:t.pick<e?e:t)},i.prototype.parse=function(t,r,e){var i,n,a,s,o,l=this,c={};if(!r||"string"!=typeof r)return r;for(s in e&&e.format||((e=e||{}).format=l.settings.format),l.formats.toArray(e.format).map(function(t){var e=l.formats[t],i=e?h.trigger(e,l,[r,c]):t.replace(/^!/,"").length;e&&(e=r.substr(0,i),c[t]=e.match(/^\d+$/)?+e:e),r=r.substr(i)}),c)o=c[s],h.isInteger(o)?s.match(/^(h|hh)$/i)?(i=o,"h"!=s&&"hh"!=s||(i%=12)):"i"==s&&(n=o):s.match(/^a$/i)&&o.match(/^p/i)&&("h"in c||"hh"in c)&&(a=!0);return(a?i+12:i)*m+n},i.prototype.formats={h:function(t,e){return t?h.digits(t):e.hour%12||12},hh:function(t,e){return t?2:h.lead(e.hour%12||12)},H:function(t,e){return t?h.digits(t):""+e.hour%24},HH:function(t,e){return t?h.digits(t):h.lead(e.hour%24)},i:function(t,e){return t?2:h.lead(e.mins)},a:function(t,e){return t?4:e.time%n<720?"a.m.":"p.m."},A:function(t,e){return t?2:e.time%n<720?"AM":"PM"},toArray:function(t){return t.split(/(h{1,2}|H{1,2}|i|a|A|!.)/g)},toString:function(t,e){var i=this;return i.formats.toArray(t).map(function(t){return h.trigger(i.formats[t],i,[0,e])||t.replace(/^!/,"")}).join("")}},i.prototype.isTimeExact=function(t,e){return h.isInteger(t)&&h.isInteger(e)||"boolean"==typeof t&&"boolean"==typeof e?t===e:(h.isDate(t)||l.isArray(t))&&(h.isDate(e)||l.isArray(e))?this.create(t).pick===this.create(e).pick:!(!l.isPlainObject(t)||!l.isPlainObject(e))&&this.isTimeExact(t.from,e.from)&&this.isTimeExact(t.to,e.to)},i.prototype.isTimeOverlap=function(t,e){return h.isInteger(t)&&(h.isDate(e)||l.isArray(e))?t===this.create(e).hour:h.isInteger(e)&&(h.isDate(t)||l.isArray(t))?e===this.create(t).hour:!(!l.isPlainObject(t)||!l.isPlainObject(e))&&this.overlapRanges(t,e)},i.prototype.flipEnable=function(t){var e=this.item;e.enable=t||(-1==e.enable?1:-1)},i.prototype.deactivate=function(t,e){var r=this,n=r.item.disable.slice(0);return"flip"==e?r.flipEnable():!1===e?(r.flipEnable(1),n=[]):!0===e?(r.flipEnable(-1),n=[]):e.map(function(t){for(var e,i=0;i<n.length;i+=1)if(r.isTimeExact(t,n[i])){e=!0;break}e||(h.isInteger(t)||h.isDate(t)||l.isArray(t)||l.isPlainObject(t)&&t.from&&t.to)&&n.push(t)}),n},i.prototype.activate=function(t,e){var a=this,s=a.item.disable,o=s.length;return"flip"==e?a.flipEnable():!0===e?(a.flipEnable(1),s=[]):!1===e?(a.flipEnable(-1),s=[]):e.map(function(t){for(var e,i,r,n=0;n<o;n+=1){if(i=s[n],a.isTimeExact(i,t)){r=!(e=s[n]=null);break}if(a.isTimeOverlap(i,t)){l.isPlainObject(t)?(t.inverted=!0,e=t):l.isArray(t)?(e=t)[2]||e.push("inverted"):h.isDate(t)&&(e=[t.getFullYear(),t.getMonth(),t.getDate(),"inverted"]);break}}if(e)for(n=0;n<o;n+=1)if(a.isTimeExact(s[n],t)){s[n]=null;break}if(r)for(n=0;n<o;n+=1)if(a.isTimeOverlap(s[n],t)){s[n]=null;break}e&&s.push(e)}),s.filter(function(t){return null!=t})},i.prototype.i=function(t,e){return h.isInteger(e)&&0<e?e:this.item.interval},i.prototype.nodes=function(t){var o=this,l=o.settings,c=o.item.select,m=o.item.highlight,u=o.item.view,p=o.item.disable;return h.node("ul",h.group({min:o.item.min.pick,max:o.item.max.pick,i:o.item.interval,node:"li",item:function(t){var e,i=(t=o.create(t)).pick,r=c&&c.pick==i,n=m&&m.pick==i,a=p&&o.disabled(t),s=h.trigger(o.formats.toString,o,[l.format,t]);return[h.trigger(o.formats.toString,o,[h.trigger(l.formatLabel,o,[t])||l.format,t]),(e=[l.klass.listItem],r&&e.push(l.klass.selected),n&&e.push(l.klass.highlighted),u&&u.pick==i&&e.push(l.klass.viewset),a&&e.push(l.klass.disabled),e.join(" ")),"data-pick="+t.pick+" "+h.ariaAttr({role:"option",label:s,selected:!(!r||o.$node.val()!==s)||null,activedescendant:!!n||null,disabled:!!a||null})]}})+h.node("li",h.node("button",l.clear,l.klass.buttonClear,"type=button data-clear=1"+(t?"":" disabled")+" "+h.ariaAttr({controls:o.$node[0].id})),"",h.ariaAttr({role:"presentation"})),l.klass.list,h.ariaAttr({role:"listbox",controls:o.$node[0].id}))},i.defaults={clear:"Clear",format:"h:i A",interval:30,closeOnSelect:!0,closeOnClear:!0,updateInput:!0,klass:{picker:(e=t.klasses().picker)+" "+e+"--time",holder:e+"__holder",list:e+"__list",listItem:e+"__list-item",disabled:e+"__list-item--disabled",selected:e+"__list-item--selected",highlighted:e+"__list-item--highlighted",viewset:e+"__list-item--viewset",now:e+"__list-item--now",buttonClear:e+"__button--clear"}},t.extend("pickatime",i)});
jQuery.extend(jQuery.fn.pickadate.defaults,{monthsFull:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],monthsShort:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],weekdaysFull:["日曜日","月曜日","火曜日","水曜日","木曜日","金曜日","土曜日"],weekdaysShort:["日","月","火","水","木","金","土"],today:"今日",clear:"消去",firstDay:1,format:"yyyy mm dd",formatSubmit:"yyyy/mm/dd"}),jQuery.extend(jQuery.fn.pickatime.defaults,{clear:"消去"});
"object"!=typeof window.UM&&(window.UM={}),"object"!=typeof UM.common&&(UM.common={}),UM.common={tipsy:{init:function(){"function"==typeof jQuery.fn.tipsy&&(jQuery(".um-tip-n").tipsy({gravity:"n",opacity:1,live:"a.live",offset:3}),jQuery(".um-tip-w").tipsy({gravity:"w",opacity:1,live:"a.live",offset:3}),jQuery(".um-tip-e").tipsy({gravity:"e",opacity:1,live:"a.live",offset:3}),jQuery(".um-tip-s").tipsy({gravity:"s",opacity:1,live:"a.live",offset:3}))},hide:function(){"function"==typeof jQuery.fn.tipsy&&(jQuery(".um-tip-n").tipsy("hide"),jQuery(".um-tip-w").tipsy("hide"),jQuery(".um-tip-e").tipsy("hide"),jQuery(".um-tip-s").tipsy("hide"),jQuery(".um .tipsy").remove(),jQuery(".um-page .tipsy").remove())}},datetimePicker:{init:function(){jQuery(".um-datepicker:not(.picker__input)").each(function(){e=void 0!==(elem=jQuery(this)).attr("data-disabled_weekdays")&&""!=elem.attr("data-disabled_weekdays")&&JSON.parse(elem.attr("data-disabled_weekdays"));var e,t=null,i=(void 0!==elem.attr("data-years")&&(t=elem.attr("data-years")),elem.attr("data-date_min")),a=elem.attr("data-date_max"),n=[],o=[],i=(void 0!==i&&(n=i.split(",")),void 0!==a&&(o=a.split(",")),n.length?new Date(n):null),a=n.length?new Date(o):null,o=(i&&"Invalid Date"==i.toString()&&3==n.length&&(n=n[1]+"/"+n[2]+"/"+n[0],i=new Date(Date.parse(n))),a&&"Invalid Date"==a.toString()&&3==o.length&&(n=o[1]+"/"+o[2]+"/"+o[0],a=new Date(Date.parse(n))),{disable:e,format:elem.attr("data-format"),formatSubmit:"yyyy/mm/dd",hiddenName:!0,onOpen:function(){elem.blur(),elem.parents("body").hasClass("wp-admin")&&elem.siblings(".picker").find(".picker__button--close").addClass("button")},onClose:function(){elem.blur()}});null!==t&&(o.selectYears=t),null!==i&&(o.min=i),null!==a&&(o.max=a),elem.pickadate(o)}),jQuery(".um-timepicker:not(.picker__input)").each(function(){(elem=jQuery(this)).pickatime({format:elem.attr("data-format"),interval:parseInt(elem.attr("data-intervals")),formatSubmit:"HH:i",hiddenName:!0,onOpen:function(){elem.blur()},onClose:function(){elem.blur()}})})}},select:{isSelected:function(e,t){return e===t?' selected="selected"':""}},form:{vanillaSerialize:function(e){var t,i,e=document.querySelector("#"+e),a={};for([t,i]of new FormData(e))void 0!==a[t]?(Array.isArray(a[t])||(a[t]=[a[t]]),a[t].push(i)):a[t]=i;return a}}},jQuery(document).on("ajaxStart",function(){UM.common.tipsy.hide()}),jQuery(document).on("ajaxSuccess",function(){UM.common.tipsy.init()}),jQuery(document).ready(function(){UM.common.tipsy.init(),UM.common.datetimePicker.init()});
/*!
 * Cropper.js v1.6.1
 * https://fengyuanchen.github.io/cropperjs
 *
 * Copyright 2015-present Chen Fengyuan
 * Released under the MIT license
 *
 * Date: 2023-09-17T03:44:19.860Z
 */
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).Cropper=e()}(this,function(){"use strict";function C(e,t){var i,a=Object.keys(e);return Object.getOwnPropertySymbols&&(i=Object.getOwnPropertySymbols(e),t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),a.push.apply(a,i)),a}function S(a){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?C(Object(n),!0).forEach(function(t){var e,i;e=a,i=n[t=t],(t=P(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(n)):C(Object(n)).forEach(function(t){Object.defineProperty(a,t,Object.getOwnPropertyDescriptor(n,t))})}return a}function D(t){return(D="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function j(t,e){for(var i=0;i<e.length;i++){var a=e[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,P(a.key),a)}}function A(t){return function(t){if(Array.isArray(t))return a(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){var i;if(t)return"string"==typeof t?a(t,e):"Map"===(i="Object"===(i=Object.prototype.toString.call(t).slice(8,-1))&&t.constructor?t.constructor.name:i)||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?a(t,e):void 0}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,a=new Array(e);i<e;i++)a[i]=t[i];return a}function P(t){t=function(t,e){if("object"!=typeof t||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0===i)return("string"===e?String:Number)(t);if("object"!=typeof(i=i.call(t,e||"default")))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}(t,"string");return"symbol"==typeof t?t:String(t)}var t="undefined"!=typeof window&&void 0!==window.document,h=t?window:{},e=!(!t||!h.document.documentElement)&&"ontouchstart"in h.document.documentElement,i=t&&"PointerEvent"in h,c="cropper",I="all",U="crop",q="move",$="zoom",B="e",k="w",O="s",T="n",E="ne",W="nw",H="se",N="sw",Q="".concat(c,"-crop"),K="".concat(c,"-disabled"),L="".concat(c,"-hidden"),Z="".concat(c,"-hide"),G="".concat(c,"-invisible"),n="".concat(c,"-modal"),V="".concat(c,"-move"),d="".concat(c,"Action"),m="".concat(c,"Preview"),F="crop",J="move",_="none",tt="crop",et="cropend",it="cropmove",at="cropstart",nt="dblclick",ot=i?"pointerdown":e?"touchstart":"mousedown",ht=i?"pointermove":e?"touchmove":"mousemove",rt=i?"pointerup pointercancel":e?"touchend touchcancel":"mouseup",st="zoom",ct="image/jpeg",dt=/^e|w|s|n|se|sw|ne|nw|all|crop|move|zoom$/,lt=/^data:/,pt=/^data:image\/jpeg;base64,/,mt=/^img|canvas$/i,ut={viewMode:0,dragMode:F,initialAspectRatio:NaN,aspectRatio:NaN,data:null,preview:"",responsive:!0,restore:!0,checkCrossOrigin:!0,checkOrientation:!0,modal:!0,guides:!0,center:!0,highlight:!0,background:!0,autoCrop:!0,autoCropArea:.8,movable:!0,rotatable:!0,scalable:!0,zoomable:!0,zoomOnTouch:!0,zoomOnWheel:!0,wheelZoomRatio:.1,cropBoxMovable:!0,cropBoxResizable:!0,toggleDragModeOnDblclick:!0,minCanvasWidth:0,minCanvasHeight:0,minCropBoxWidth:0,minCropBoxHeight:0,minContainerWidth:200,minContainerHeight:100,ready:null,cropstart:null,cropmove:null,cropend:null,crop:null,zoom:null},gt=Number.isNaN||h.isNaN;function p(t){return"number"==typeof t&&!gt(t)}function ft(t){return 0<t&&t<1/0}function vt(t){return void 0===t}function o(t){return"object"===D(t)&&null!==t}var wt=Object.prototype.hasOwnProperty;function u(t){if(!o(t))return!1;try{var e=t.constructor,i=e.prototype;return e&&i&&wt.call(i,"isPrototypeOf")}catch(t){return!1}}function l(t){return"function"==typeof t}var bt=Array.prototype.slice;function yt(t){return Array.from?Array.from(t):bt.call(t)}function z(i,a){return i&&l(a)&&(Array.isArray(i)||p(i.length)?yt(i).forEach(function(t,e){a.call(i,t,e,i)}):o(i)&&Object.keys(i).forEach(function(t){a.call(i,i[t],t,i)})),i}var g=Object.assign||function(i){for(var t=arguments.length,e=new Array(1<t?t-1:0),a=1;a<t;a++)e[a-1]=arguments[a];return o(i)&&0<e.length&&e.forEach(function(e){o(e)&&Object.keys(e).forEach(function(t){i[t]=e[t]})}),i},xt=/\.\d*(?:0|9){12}\d*$/;function Y(t,e){e=1<arguments.length&&void 0!==e?e:1e11;return xt.test(t)?Math.round(t*e)/e:t}var Mt=/^width|height|left|top|marginLeft|marginTop$/;function f(t,e){var i=t.style;z(e,function(t,e){Mt.test(e)&&p(t)&&(t="".concat(t,"px")),i[e]=t})}function v(t,e){var i;e&&(p(t.length)?z(t,function(t){v(t,e)}):t.classList?t.classList.add(e):(i=t.className.trim())?i.indexOf(e)<0&&(t.className="".concat(i," ").concat(e)):t.className=e)}function X(t,e){e&&(p(t.length)?z(t,function(t){X(t,e)}):t.classList?t.classList.remove(e):0<=t.className.indexOf(e)&&(t.className=t.className.replace(e,"")))}function r(t,e,i){e&&(p(t.length)?z(t,function(t){r(t,e,i)}):(i?v:X)(t,e))}var Ct=/([a-z\d])([A-Z])/g;function Dt(t){return t.replace(Ct,"$1-$2").toLowerCase()}function Bt(t,e){return o(t[e])?t[e]:t.dataset?t.dataset[e]:t.getAttribute("data-".concat(Dt(e)))}function w(t,e,i){o(i)?t[e]=i:t.dataset?t.dataset[e]=i:t.setAttribute("data-".concat(Dt(e)),i)}var kt,Ot,Tt=/\s\s*/,Et=(Ot=!1,t&&(kt=!1,i=function(){},e=Object.defineProperty({},"once",{get:function(){return Ot=!0,kt},set:function(t){kt=t}}),h.addEventListener("test",i,e),h.removeEventListener("test",i,e)),Ot);function s(i,t,a,e){var n=3<arguments.length&&void 0!==e?e:{},o=a;t.trim().split(Tt).forEach(function(t){var e;Et||(e=i.listeners)&&e[t]&&e[t][a]&&(o=e[t][a],delete e[t][a],0===Object.keys(e[t]).length&&delete e[t],0===Object.keys(e).length)&&delete i.listeners,i.removeEventListener(t,o,n)})}function b(o,t,h,e){var r=3<arguments.length&&void 0!==e?e:{},s=h;t.trim().split(Tt).forEach(function(a){var t,n;r.once&&!Et&&(t=o.listeners,s=function(){delete n[a][h],o.removeEventListener(a,s,r);for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];h.apply(o,e)},(n=void 0===t?{}:t)[a]||(n[a]={}),n[a][h]&&o.removeEventListener(a,n[a][h],r),n[a][h]=s,o.listeners=n),o.addEventListener(a,s,r)})}function y(t,e,i){var a;return l(Event)&&l(CustomEvent)?a=new CustomEvent(e,{detail:i,bubbles:!0,cancelable:!0}):(a=document.createEvent("CustomEvent")).initCustomEvent(e,!0,!0,i),t.dispatchEvent(a)}function Wt(t){t=t.getBoundingClientRect();return{left:t.left+(window.pageXOffset-document.documentElement.clientLeft),top:t.top+(window.pageYOffset-document.documentElement.clientTop)}}var Ht=h.location,Nt=/^(\w+:)\/\/([^:/?#]*):?(\d*)/i;function Lt(t){t=t.match(Nt);return null!==t&&(t[1]!==Ht.protocol||t[2]!==Ht.hostname||t[3]!==Ht.port)}function zt(t){var e="timestamp=".concat((new Date).getTime());return t+(-1===t.indexOf("?")?"?":"&")+e}function x(t){var e=t.rotate,i=t.scaleX,a=t.scaleY,n=t.translateX,t=t.translateY,o=[],n=(p(n)&&0!==n&&o.push("translateX(".concat(n,"px)")),p(t)&&0!==t&&o.push("translateY(".concat(t,"px)")),p(e)&&0!==e&&o.push("rotate(".concat(e,"deg)")),p(i)&&1!==i&&o.push("scaleX(".concat(i,")")),p(a)&&1!==a&&o.push("scaleY(".concat(a,")")),o.length?o.join(" "):"none");return{WebkitTransform:n,msTransform:n,transform:n}}function M(t,e){var i=t.pageX,t=t.pageY,a={endX:i,endY:t};return e?a:S({startX:i,startY:t},a)}function R(t,e){var i,a=t.aspectRatio,n=t.height,t=t.width,e=1<arguments.length&&void 0!==e?e:"contain",o=ft(t),h=ft(n);return o&&h?(i=n*a,"contain"===e&&t<i||"cover"===e&&i<t?n=t/a:t=n*a):o?n=t/a:h&&(t=n*a),{width:t,height:n}}var Yt=String.fromCharCode;var Xt=/^data:.*,/;function Rt(t){var e,i,a,n,o,h,r,s=new DataView(t);try{if(255===s.getUint8(0)&&216===s.getUint8(1))for(var c=s.byteLength,d=2;d+1<c;){if(255===s.getUint8(d)&&225===s.getUint8(d+1)){i=d;break}d+=1}if(a=i&&(n=i+10,"Exif"===function(t,e,i){var a="";i+=e;for(var n=e;n<i;n+=1)a+=Yt(t.getUint8(n));return a}(s,i+4,4))&&((r=18761===(o=s.getUint16(n)))||19789===o)&&42===s.getUint16(n+2,r)&&8<=(h=s.getUint32(n+4,r))?n+h:a)for(var l,p=s.getUint16(a,r),m=0;m<p;m+=1)if(l=a+12*m+2,274===s.getUint16(l,r)){l+=8,e=s.getUint16(l,r),s.setUint16(l,1,r);break}}catch(t){e=1}return e}var t={render:function(){this.initContainer(),this.initCanvas(),this.initCropBox(),this.renderCanvas(),this.cropped&&this.renderCropBox()},initContainer:function(){var t=this.element,e=this.options,i=this.container,a=this.cropper,n=Number(e.minContainerWidth),e=Number(e.minContainerHeight),n=(v(a,L),X(t,L),{width:Math.max(i.offsetWidth,0<=n?n:200),height:Math.max(i.offsetHeight,0<=e?e:100)});f(a,{width:(this.containerData=n).width,height:n.height}),v(t,L),X(a,L)},initCanvas:function(){var t=this.containerData,e=this.imageData,i=this.options.viewMode,a=Math.abs(e.rotate)%180==90,n=a?e.naturalHeight:e.naturalWidth,a=a?e.naturalWidth:e.naturalHeight,e=n/a,o=t.width,h=t.height,e=(t.height*e>t.width?3===i?o=t.height*e:h=t.width/e:3===i?h=t.width/e:o=t.height*e,{aspectRatio:e,naturalWidth:n,naturalHeight:a,width:o,height:h});this.canvasData=e,this.limited=1===i||2===i,this.limitCanvas(!0,!0),e.width=Math.min(Math.max(e.width,e.minWidth),e.maxWidth),e.height=Math.min(Math.max(e.height,e.minHeight),e.maxHeight),e.left=(t.width-e.width)/2,e.top=(t.height-e.height)/2,e.oldLeft=e.left,e.oldTop=e.top,this.initialCanvasData=g({},e)},limitCanvas:function(t,e){var i=this.options,a=this.containerData,n=this.canvasData,o=this.cropBoxData,h=i.viewMode,r=n.aspectRatio,s=this.cropped&&o;t&&(t=Number(i.minCanvasWidth)||0,i=Number(i.minCanvasHeight)||0,1<h?(t=Math.max(t,a.width),i=Math.max(i,a.height),3===h&&(t<i*r?t=i*r:i=t/r)):0<h&&(t?t=Math.max(t,s?o.width:0):i?i=Math.max(i,s?o.height:0):s&&((t=o.width)<(i=o.height)*r?t=i*r:i=t/r)),t=(r=R({aspectRatio:r,width:t,height:i})).width,i=r.height,n.minWidth=t,n.minHeight=i,n.maxWidth=1/0,n.maxHeight=1/0),e&&((s?0:1)<h?(r=a.width-n.width,t=a.height-n.height,n.minLeft=Math.min(0,r),n.minTop=Math.min(0,t),n.maxLeft=Math.max(0,r),n.maxTop=Math.max(0,t),s&&this.limited&&(n.minLeft=Math.min(o.left,o.left+(o.width-n.width)),n.minTop=Math.min(o.top,o.top+(o.height-n.height)),n.maxLeft=o.left,n.maxTop=o.top,2===h)&&(n.width>=a.width&&(n.minLeft=Math.min(0,r),n.maxLeft=Math.max(0,r)),n.height>=a.height)&&(n.minTop=Math.min(0,t),n.maxTop=Math.max(0,t))):(n.minLeft=-n.width,n.minTop=-n.height,n.maxLeft=a.width,n.maxTop=a.height))},renderCanvas:function(t,e){var i,a,n,o,h=this.canvasData,r=this.imageData;e&&(e={width:r.naturalWidth*Math.abs(r.scaleX||1),height:r.naturalHeight*Math.abs(r.scaleY||1),degree:r.rotate||0},r=e.width,o=e.height,e=e.degree,i=90==(e=Math.abs(e)%180)?{width:o,height:r}:(a=e%90*Math.PI/180,i=Math.sin(a),n=r*(a=Math.cos(a))+o*i,r=r*i+o*a,90<e?{width:r,height:n}:{width:n,height:r}),a=h.width*((o=i.width)/h.naturalWidth),n=h.height*((e=i.height)/h.naturalHeight),h.left-=(a-h.width)/2,h.top-=(n-h.height)/2,h.width=a,h.height=n,h.aspectRatio=o/e,h.naturalWidth=o,h.naturalHeight=e,this.limitCanvas(!0,!1)),(h.width>h.maxWidth||h.width<h.minWidth)&&(h.left=h.oldLeft),(h.height>h.maxHeight||h.height<h.minHeight)&&(h.top=h.oldTop),h.width=Math.min(Math.max(h.width,h.minWidth),h.maxWidth),h.height=Math.min(Math.max(h.height,h.minHeight),h.maxHeight),this.limitCanvas(!1,!0),h.left=Math.min(Math.max(h.left,h.minLeft),h.maxLeft),h.top=Math.min(Math.max(h.top,h.minTop),h.maxTop),h.oldLeft=h.left,h.oldTop=h.top,f(this.canvas,g({width:h.width,height:h.height},x({translateX:h.left,translateY:h.top}))),this.renderImage(t),this.cropped&&this.limited&&this.limitCropBox(!0,!0)},renderImage:function(t){var e=this.canvasData,i=this.imageData,a=i.naturalWidth*(e.width/e.naturalWidth),n=i.naturalHeight*(e.height/e.naturalHeight);g(i,{width:a,height:n,left:(e.width-a)/2,top:(e.height-n)/2}),f(this.image,g({width:i.width,height:i.height},x(g({translateX:i.left,translateY:i.top},i)))),t&&this.output()},initCropBox:function(){var t=this.options,e=this.canvasData,i=t.aspectRatio||t.initialAspectRatio,t=Number(t.autoCropArea)||.8,a={width:e.width,height:e.height};i&&(e.height*i>e.width?a.height=a.width/i:a.width=a.height*i),this.cropBoxData=a,this.limitCropBox(!0,!0),a.width=Math.min(Math.max(a.width,a.minWidth),a.maxWidth),a.height=Math.min(Math.max(a.height,a.minHeight),a.maxHeight),a.width=Math.max(a.minWidth,a.width*t),a.height=Math.max(a.minHeight,a.height*t),a.left=e.left+(e.width-a.width)/2,a.top=e.top+(e.height-a.height)/2,a.oldLeft=a.left,a.oldTop=a.top,this.initialCropBoxData=g({},a)},limitCropBox:function(t,e){var i,a,n=this.options,o=this.containerData,h=this.canvasData,r=this.cropBoxData,s=this.limited,c=n.aspectRatio;t&&(t=Number(n.minCropBoxWidth)||0,n=Number(n.minCropBoxHeight)||0,i=s?Math.min(o.width,h.width,h.width+h.left,o.width-h.left):o.width,a=s?Math.min(o.height,h.height,h.height+h.top,o.height-h.top):o.height,t=Math.min(t,o.width),n=Math.min(n,o.height),c&&(t&&n?t<n*c?n=t/c:t=n*c:t?n=t/c:n&&(t=n*c),i<a*c?a=i/c:i=a*c),r.minWidth=Math.min(t,i),r.minHeight=Math.min(n,a),r.maxWidth=i,r.maxHeight=a),e&&(s?(r.minLeft=Math.max(0,h.left),r.minTop=Math.max(0,h.top),r.maxLeft=Math.min(o.width,h.left+h.width)-r.width,r.maxTop=Math.min(o.height,h.top+h.height)-r.height):(r.minLeft=0,r.minTop=0,r.maxLeft=o.width-r.width,r.maxTop=o.height-r.height))},renderCropBox:function(){var t=this.options,e=this.containerData,i=this.cropBoxData;(i.width>i.maxWidth||i.width<i.minWidth)&&(i.left=i.oldLeft),(i.height>i.maxHeight||i.height<i.minHeight)&&(i.top=i.oldTop),i.width=Math.min(Math.max(i.width,i.minWidth),i.maxWidth),i.height=Math.min(Math.max(i.height,i.minHeight),i.maxHeight),this.limitCropBox(!1,!0),i.left=Math.min(Math.max(i.left,i.minLeft),i.maxLeft),i.top=Math.min(Math.max(i.top,i.minTop),i.maxTop),i.oldLeft=i.left,i.oldTop=i.top,t.movable&&t.cropBoxMovable&&w(this.face,d,i.width>=e.width&&i.height>=e.height?q:I),f(this.cropBox,g({width:i.width,height:i.height},x({translateX:i.left,translateY:i.top}))),this.cropped&&this.limited&&this.limitCanvas(!0,!0),this.disabled||this.output()},output:function(){this.preview(),y(this.element,tt,this.getData())}},i={initPreview:function(){var t=this.element,i=this.crossOrigin,e=this.options.preview,a=i?this.crossOriginUrl:this.url,n=t.alt||"The image to preview",o=document.createElement("img");i&&(o.crossOrigin=i),o.src=a,o.alt=n,this.viewBox.appendChild(o),this.viewBoxImage=o,e&&("string"==typeof(o=e)?o=t.ownerDocument.querySelectorAll(e):e.querySelector&&(o=[e]),z(this.previews=o,function(t){var e=document.createElement("img");w(t,m,{width:t.offsetWidth,height:t.offsetHeight,html:t.innerHTML}),i&&(e.crossOrigin=i),e.src=a,e.alt=n,e.style.cssText='display:block;width:100%;height:auto;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;image-orientation:0deg!important;"',t.innerHTML="",t.appendChild(e)}))},resetPreview:function(){z(this.previews,function(e){var i=Bt(e,m),i=(f(e,{width:i.width,height:i.height}),e.innerHTML=i.html,e),e=m;if(o(i[e]))try{delete i[e]}catch(t){i[e]=void 0}else if(i.dataset)try{delete i.dataset[e]}catch(t){i.dataset[e]=void 0}else i.removeAttribute("data-".concat(Dt(e)))})},preview:function(){var h=this.imageData,t=this.canvasData,e=this.cropBoxData,r=e.width,s=e.height,c=h.width,d=h.height,l=e.left-t.left-h.left,p=e.top-t.top-h.top;this.cropped&&!this.disabled&&(f(this.viewBoxImage,g({width:c,height:d},x(g({translateX:-l,translateY:-p},h)))),z(this.previews,function(t){var e=Bt(t,m),i=e.width,e=e.height,a=i,n=e,o=1;r&&(n=s*(o=i/r)),s&&e<n&&(a=r*(o=e/s),n=e),f(t,{width:a,height:n}),f(t.getElementsByTagName("img")[0],g({width:c*o,height:d*o},x(g({translateX:-l*o,translateY:-p*o},h))))}))}},e={bind:function(){var t=this.element,e=this.options,i=this.cropper;l(e.cropstart)&&b(t,at,e.cropstart),l(e.cropmove)&&b(t,it,e.cropmove),l(e.cropend)&&b(t,et,e.cropend),l(e.crop)&&b(t,tt,e.crop),l(e.zoom)&&b(t,st,e.zoom),b(i,ot,this.onCropStart=this.cropStart.bind(this)),e.zoomable&&e.zoomOnWheel&&b(i,"wheel",this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),e.toggleDragModeOnDblclick&&b(i,nt,this.onDblclick=this.dblclick.bind(this)),b(t.ownerDocument,ht,this.onCropMove=this.cropMove.bind(this)),b(t.ownerDocument,rt,this.onCropEnd=this.cropEnd.bind(this)),e.responsive&&b(window,"resize",this.onResize=this.resize.bind(this))},unbind:function(){var t=this.element,e=this.options,i=this.cropper;l(e.cropstart)&&s(t,at,e.cropstart),l(e.cropmove)&&s(t,it,e.cropmove),l(e.cropend)&&s(t,et,e.cropend),l(e.crop)&&s(t,tt,e.crop),l(e.zoom)&&s(t,st,e.zoom),s(i,ot,this.onCropStart),e.zoomable&&e.zoomOnWheel&&s(i,"wheel",this.onWheel,{passive:!1,capture:!0}),e.toggleDragModeOnDblclick&&s(i,nt,this.onDblclick),s(t.ownerDocument,ht,this.onCropMove),s(t.ownerDocument,rt,this.onCropEnd),e.responsive&&s(window,"resize",this.onResize)}},St={resize:function(){var t,e,i,a,n,o,h;this.disabled||(t=this.options,a=this.container,e=this.containerData,i=a.offsetWidth/e.width,a=a.offsetHeight/e.height,1!=(n=Math.abs(i-1)>Math.abs(a-1)?i:a)&&(t.restore&&(o=this.getCanvasData(),h=this.getCropBoxData()),this.render(),t.restore)&&(this.setCanvasData(z(o,function(t,e){o[e]=t*n})),this.setCropBoxData(z(h,function(t,e){h[e]=t*n}))))},dblclick:function(){var t,e;this.disabled||this.options.dragMode===_||this.setDragMode((t=this.dragBox,e=Q,(t.classList?t.classList.contains(e):-1<t.className.indexOf(e))?J:F))},wheel:function(t){var e=this,i=Number(this.options.wheelZoomRatio)||.1,a=1;this.disabled||(t.preventDefault(),this.wheeling)||(this.wheeling=!0,setTimeout(function(){e.wheeling=!1},50),t.deltaY?a=0<t.deltaY?1:-1:t.wheelDelta?a=-t.wheelDelta/120:t.detail&&(a=0<t.detail?1:-1),this.zoom(-a*i,t))},cropStart:function(t){var e,i=t.buttons,a=t.button;this.disabled||("mousedown"===t.type||"pointerdown"===t.type&&"mouse"===t.pointerType)&&(p(i)&&1!==i||p(a)&&0!==a||t.ctrlKey)||(i=this.options,e=this.pointers,t.changedTouches?z(t.changedTouches,function(t){e[t.identifier]=M(t)}):e[t.pointerId||0]=M(t),a=1<Object.keys(e).length&&i.zoomable&&i.zoomOnTouch?$:Bt(t.target,d),dt.test(a)&&!1!==y(this.element,at,{originalEvent:t,action:a})&&(t.preventDefault(),this.action=a,this.cropping=!1,a===U)&&(this.cropping=!0,v(this.dragBox,n)))},cropMove:function(t){var e,i=this.action;!this.disabled&&i&&(e=this.pointers,t.preventDefault(),!1!==y(this.element,it,{originalEvent:t,action:i}))&&(t.changedTouches?z(t.changedTouches,function(t){g(e[t.identifier]||{},M(t,!0))}):g(e[t.pointerId||0]||{},M(t,!0)),this.change(t))},cropEnd:function(t){var e,i;this.disabled||(e=this.action,i=this.pointers,t.changedTouches?z(t.changedTouches,function(t){delete i[t.identifier]}):delete i[t.pointerId||0],e&&(t.preventDefault(),Object.keys(i).length||(this.action=""),this.cropping&&(this.cropping=!1,r(this.dragBox,n,this.cropped&&this.options.modal)),y(this.element,et,{originalEvent:t,action:e})))}},jt={change:function(t){function e(t){switch(t){case B:f+D.x>y&&(D.x=y-f);break;case k:p+D.x<w&&(D.x=w-p);break;case T:m+D.y<b&&(D.y=b-m);break;case O:v+D.y>x&&(D.y=x-v)}}var i,a,o,n=this.options,h=this.canvasData,r=this.containerData,s=this.cropBoxData,c=this.pointers,d=this.action,l=n.aspectRatio,p=s.left,m=s.top,u=s.width,g=s.height,f=p+u,v=m+g,w=0,b=0,y=r.width,x=r.height,M=!0,C=(!l&&t.shiftKey&&(l=u&&g?u/g:1),this.limited&&(w=s.minLeft,b=s.minTop,y=w+Math.min(r.width,h.width,h.left+h.width),x=b+Math.min(r.height,h.height,h.top+h.height)),c[Object.keys(c)[0]]),D={x:C.endX-C.startX,y:C.endY-C.startY};switch(d){case I:p+=D.x,m+=D.y;break;case B:0<=D.x&&(y<=f||l&&(m<=b||x<=v))?M=!1:(e(B),(u+=D.x)<0&&(d=k,p-=u=-u),l&&(m+=(s.height-(g=u/l))/2));break;case T:D.y<=0&&(m<=b||l&&(p<=w||y<=f))?M=!1:(e(T),g-=D.y,m+=D.y,g<0&&(d=O,m-=g=-g),l&&(p+=(s.width-(u=g*l))/2));break;case k:D.x<=0&&(p<=w||l&&(m<=b||x<=v))?M=!1:(e(k),u-=D.x,p+=D.x,u<0&&(d=B,p-=u=-u),l&&(m+=(s.height-(g=u/l))/2));break;case O:0<=D.y&&(x<=v||l&&(p<=w||y<=f))?M=!1:(e(O),(g+=D.y)<0&&(d=T,m-=g=-g),l&&(p+=(s.width-(u=g*l))/2));break;case E:if(l){if(D.y<=0&&(m<=b||y<=f)){M=!1;break}e(T),g-=D.y,m+=D.y,u=g*l}else e(T),e(B),!(0<=D.x)||f<y?u+=D.x:D.y<=0&&m<=b&&(M=!1),(!(D.y<=0)||b<m)&&(g-=D.y,m+=D.y);u<0&&g<0?(d=N,m-=g=-g,p-=u=-u):u<0?(d=W,p-=u=-u):g<0&&(d=H,m-=g=-g);break;case W:if(l){if(D.y<=0&&(m<=b||p<=w)){M=!1;break}e(T),g-=D.y,m+=D.y,p+=s.width-(u=g*l)}else e(T),e(k),!(D.x<=0)||w<p?(u-=D.x,p+=D.x):D.y<=0&&m<=b&&(M=!1),(!(D.y<=0)||b<m)&&(g-=D.y,m+=D.y);u<0&&g<0?(d=H,m-=g=-g,p-=u=-u):u<0?(d=E,p-=u=-u):g<0&&(d=N,m-=g=-g);break;case N:if(l){if(D.x<=0&&(p<=w||x<=v)){M=!1;break}e(k),u-=D.x,p+=D.x,g=u/l}else e(O),e(k),!(D.x<=0)||w<p?(u-=D.x,p+=D.x):0<=D.y&&x<=v&&(M=!1),(!(0<=D.y)||v<x)&&(g+=D.y);u<0&&g<0?(d=E,m-=g=-g,p-=u=-u):u<0?(d=H,p-=u=-u):g<0&&(d=W,m-=g=-g);break;case H:if(l){if(0<=D.x&&(y<=f||x<=v)){M=!1;break}e(B),g=(u+=D.x)/l}else e(O),e(B),!(0<=D.x)||f<y?u+=D.x:0<=D.y&&x<=v&&(M=!1),(!(0<=D.y)||v<x)&&(g+=D.y);u<0&&g<0?(d=W,m-=g=-g,p-=u=-u):u<0?(d=N,p-=u=-u):g<0&&(d=E,m-=g=-g);break;case q:this.move(D.x,D.y),M=!1;break;case $:this.zoom((a=S({},i=c),o=0,z(i,function(n,t){delete a[t],z(a,function(t){var e=Math.abs(n.startX-t.startX),i=Math.abs(n.startY-t.startY),a=Math.abs(n.endX-t.endX),t=Math.abs(n.endY-t.endY),e=Math.sqrt(e*e+i*i),i=(Math.sqrt(a*a+t*t)-e)/e;Math.abs(i)>Math.abs(o)&&(o=i)})}),o),t),M=!1;break;case U:D.x&&D.y?(i=Wt(this.cropper),p=C.startX-i.left,m=C.startY-i.top,u=s.minWidth,g=s.minHeight,0<D.x?d=0<D.y?H:E:D.x<0&&(p-=u,d=0<D.y?N:W),D.y<0&&(m-=g),this.cropped||(X(this.cropBox,L),this.cropped=!0,this.limited&&this.limitCropBox(!0,!0))):M=!1}M&&(s.width=u,s.height=g,s.left=p,s.top=m,this.action=d,this.renderCropBox()),z(c,function(t){t.startX=t.endX,t.startY=t.endY})}},At={crop:function(){return!this.ready||this.cropped||this.disabled||(this.cropped=!0,this.limitCropBox(!0,!0),this.options.modal&&v(this.dragBox,n),X(this.cropBox,L),this.setCropBoxData(this.initialCropBoxData)),this},reset:function(){return this.ready&&!this.disabled&&(this.imageData=g({},this.initialImageData),this.canvasData=g({},this.initialCanvasData),this.cropBoxData=g({},this.initialCropBoxData),this.renderCanvas(),this.cropped)&&this.renderCropBox(),this},clear:function(){return this.cropped&&!this.disabled&&(g(this.cropBoxData,{left:0,top:0,width:0,height:0}),this.cropped=!1,this.renderCropBox(),this.limitCanvas(!0,!0),this.renderCanvas(),X(this.dragBox,n),v(this.cropBox,L)),this},replace:function(e){var t=1<arguments.length&&void 0!==arguments[1]&&arguments[1];return!this.disabled&&e&&(this.isImg&&(this.element.src=e),t?(this.url=e,this.image.src=e,this.ready&&(this.viewBoxImage.src=e,z(this.previews,function(t){t.getElementsByTagName("img")[0].src=e}))):(this.isImg&&(this.replaced=!0),this.options.data=null,this.uncreate(),this.load(e))),this},enable:function(){return this.ready&&this.disabled&&(this.disabled=!1,X(this.cropper,K)),this},disable:function(){return this.ready&&!this.disabled&&(this.disabled=!0,v(this.cropper,K)),this},destroy:function(){var t=this.element;return t[c]&&(t[c]=void 0,this.isImg&&this.replaced&&(t.src=this.originalUrl),this.uncreate()),this},move:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:t,i=this.canvasData,a=i.left,i=i.top;return this.moveTo(vt(t)?t:a+Number(t),vt(e)?e:i+Number(e))},moveTo:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:t,i=this.canvasData,a=!1;return t=Number(t),e=Number(e),this.ready&&!this.disabled&&this.options.movable&&(p(t)&&(i.left=t,a=!0),p(e)&&(i.top=e,a=!0),a)&&this.renderCanvas(!0),this},zoom:function(t,e){var i=this.canvasData;return t=Number(t),this.zoomTo(i.width*(t=t<0?1/(1-t):1+t)/i.naturalWidth,null,e)},zoomTo:function(t,e,i){var a,n,o,h=this.options,r=this.canvasData,s=r.width,c=r.height,d=r.naturalWidth,l=r.naturalHeight;if(0<=(t=Number(t))&&this.ready&&!this.disabled&&h.zoomable){h=d*t,l=l*t;if(!1===y(this.element,st,{ratio:t,oldRatio:s/d,originalEvent:i}))return this;i?(t=this.pointers,d=Wt(this.cropper),t=t&&Object.keys(t).length?(o=n=a=0,z(t,function(t){var e=t.startX,t=t.startY;a+=e,n+=t,o+=1}),{pageX:a/=o,pageY:n/=o}):{pageX:i.pageX,pageY:i.pageY},r.left-=(h-s)*((t.pageX-d.left-r.left)/s),r.top-=(l-c)*((t.pageY-d.top-r.top)/c)):u(e)&&p(e.x)&&p(e.y)?(r.left-=(h-s)*((e.x-r.left)/s),r.top-=(l-c)*((e.y-r.top)/c)):(r.left-=(h-s)/2,r.top-=(l-c)/2),r.width=h,r.height=l,this.renderCanvas(!0)}return this},rotate:function(t){return this.rotateTo((this.imageData.rotate||0)+Number(t))},rotateTo:function(t){return p(t=Number(t))&&this.ready&&!this.disabled&&this.options.rotatable&&(this.imageData.rotate=t%360,this.renderCanvas(!0,!0)),this},scaleX:function(t){var e=this.imageData.scaleY;return this.scale(t,p(e)?e:1)},scaleY:function(t){var e=this.imageData.scaleX;return this.scale(p(e)?e:1,t)},scale:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:t,i=this.imageData,a=!1;return t=Number(t),e=Number(e),this.ready&&!this.disabled&&this.options.scalable&&(p(t)&&(i.scaleX=t,a=!0),p(e)&&(i.scaleY=e,a=!0),a)&&this.renderCanvas(!0,!0),this},getData:function(){var i,a,t=0<arguments.length&&void 0!==arguments[0]&&arguments[0],e=this.options,n=this.imageData,o=this.canvasData,h=this.cropBoxData;return this.ready&&this.cropped?(i={x:h.left-o.left,y:h.top-o.top,width:h.width,height:h.height},a=n.width/n.naturalWidth,z(i,function(t,e){i[e]=t/a}),t&&(o=Math.round(i.y+i.height),h=Math.round(i.x+i.width),i.x=Math.round(i.x),i.y=Math.round(i.y),i.width=h-i.x,i.height=o-i.y)):i={x:0,y:0,width:0,height:0},e.rotatable&&(i.rotate=n.rotate||0),e.scalable&&(i.scaleX=n.scaleX||1,i.scaleY=n.scaleY||1),i},setData:function(t){var e,i=this.options,a=this.imageData,n=this.canvasData,o={};return this.ready&&!this.disabled&&u(t)&&(e=!1,i.rotatable&&p(t.rotate)&&t.rotate!==a.rotate&&(a.rotate=t.rotate,e=!0),i.scalable&&(p(t.scaleX)&&t.scaleX!==a.scaleX&&(a.scaleX=t.scaleX,e=!0),p(t.scaleY))&&t.scaleY!==a.scaleY&&(a.scaleY=t.scaleY,e=!0),e&&this.renderCanvas(!0,!0),i=a.width/a.naturalWidth,p(t.x)&&(o.left=t.x*i+n.left),p(t.y)&&(o.top=t.y*i+n.top),p(t.width)&&(o.width=t.width*i),p(t.height)&&(o.height=t.height*i),this.setCropBoxData(o)),this},getContainerData:function(){return this.ready?g({},this.containerData):{}},getImageData:function(){return this.sized?g({},this.imageData):{}},getCanvasData:function(){var e=this.canvasData,i={};return this.ready&&z(["left","top","width","height","naturalWidth","naturalHeight"],function(t){i[t]=e[t]}),i},setCanvasData:function(t){var e=this.canvasData,i=e.aspectRatio;return this.ready&&!this.disabled&&u(t)&&(p(t.left)&&(e.left=t.left),p(t.top)&&(e.top=t.top),p(t.width)?(e.width=t.width,e.height=t.width/i):p(t.height)&&(e.height=t.height,e.width=t.height*i),this.renderCanvas(!0)),this},getCropBoxData:function(){var t,e=this.cropBoxData;return(t=this.ready&&this.cropped?{left:e.left,top:e.top,width:e.width,height:e.height}:t)||{}},setCropBoxData:function(t){var e,i,a=this.cropBoxData,n=this.options.aspectRatio;return this.ready&&this.cropped&&!this.disabled&&u(t)&&(p(t.left)&&(a.left=t.left),p(t.top)&&(a.top=t.top),p(t.width)&&t.width!==a.width&&(e=!0,a.width=t.width),p(t.height)&&t.height!==a.height&&(i=!0,a.height=t.height),n&&(e?a.height=a.width/n:i&&(a.width=a.height*n)),this.renderCropBox()),this},getCroppedCanvas:function(){var t,e,i,a,n,o,h,r,s,c,d,l,p,m,u,g,f,v,w,b,y,x,M,C,D,B,k,O=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return this.ready&&window.HTMLCanvasElement?(B=this.canvasData,u=this.image,l=this.imageData,a=B,v=O,g=l.aspectRatio,e=l.naturalWidth,n=l.naturalHeight,c=void 0===(c=l.rotate)?0:c,d=void 0===(d=l.scaleX)?1:d,l=void 0===(l=l.scaleY)?1:l,i=a.aspectRatio,r=a.naturalWidth,a=a.naturalHeight,h=void 0===(h=v.fillColor)?"transparent":h,p=void 0===(p=v.imageSmoothingEnabled)||p,m=void 0===(m=v.imageSmoothingQuality)?"low":m,o=void 0===(o=v.maxWidth)?1/0:o,k=void 0===(k=v.maxHeight)?1/0:k,t=void 0===(t=v.minWidth)?0:t,v=void 0===(v=v.minHeight)?0:v,w=document.createElement("canvas"),f=w.getContext("2d"),s=R({aspectRatio:i,width:o,height:k}),i=R({aspectRatio:i,width:t,height:v},"cover"),r=Math.min(s.width,Math.max(i.width,r)),s=Math.min(s.height,Math.max(i.height,a)),i=R({aspectRatio:g,width:o,height:k}),a=R({aspectRatio:g,width:t,height:v},"cover"),o=Math.min(i.width,Math.max(a.width,e)),k=Math.min(i.height,Math.max(a.height,n)),g=[-o/2,-k/2,o,k],w.width=Y(r),w.height=Y(s),f.fillStyle=h,f.fillRect(0,0,r,s),f.save(),f.translate(r/2,s/2),f.rotate(c*Math.PI/180),f.scale(d,l),f.imageSmoothingEnabled=p,f.imageSmoothingQuality=m,f.drawImage.apply(f,[u].concat(A(g.map(function(t){return Math.floor(Y(t))})))),f.restore(),t=w,this.cropped?(e=(v=this.getData(O.rounded)).x,i=v.y,a=v.width,n=v.height,1!=(o=t.width/Math.floor(B.naturalWidth))&&(e*=o,i*=o,a*=o,n*=o),h=R({aspectRatio:k=a/n,width:O.maxWidth||1/0,height:O.maxHeight||1/0}),r=R({aspectRatio:k,width:O.minWidth||0,height:O.minHeight||0},"cover"),c=(s=R({aspectRatio:k,width:O.width||(1!=o?t.width:a),height:O.height||(1!=o?t.height:n)})).width,d=s.height,c=Math.min(h.width,Math.max(r.width,c)),d=Math.min(h.height,Math.max(r.height,d)),p=(l=document.createElement("canvas")).getContext("2d"),l.width=Y(c),l.height=Y(d),p.fillStyle=O.fillColor||"transparent",p.fillRect(0,0,c,d),m=O.imageSmoothingEnabled,u=O.imageSmoothingQuality,p.imageSmoothingEnabled=void 0===m||m,u&&(p.imageSmoothingQuality=u),g=t.width,f=t.height,w=i,(v=e)<=-a||g<v?C=x=b=v=0:v<=0?(x=-v,v=0,C=b=Math.min(g,a+v)):v<=g&&(x=0,C=b=Math.min(a,g-v)),b<=0||w<=-n||f<w?D=M=y=w=0:w<=0?(M=-w,w=0,D=y=Math.min(f,n+w)):w<=f&&(M=0,D=y=Math.min(n,f-w)),B=[v,w,b,y],0<C&&0<D&&B.push(x*(k=c/a),M*k,C*k,D*k),p.drawImage.apply(p,[t].concat(A(B.map(function(t){return Math.floor(Y(t))})))),l):t):null},setAspectRatio:function(t){var e=this.options;return this.disabled||vt(t)||(e.aspectRatio=Math.max(0,t)||NaN,this.ready&&(this.initCropBox(),this.cropped)&&this.renderCropBox()),this},setDragMode:function(t){var e,i,a=this.options,n=this.dragBox,o=this.face;return this.ready&&!this.disabled&&(i=a.movable&&t===J,a.dragMode=t=(e=t===F)||i?t:_,w(n,d,t),r(n,Q,e),r(n,V,i),a.cropBoxMovable||(w(o,d,t),r(o,Q,e),r(o,V,i))),this}},Pt=h.Cropper,It=function(){function n(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},i=this,a=n;if(!(i instanceof a))throw new TypeError("Cannot call a class as a function");if(!t||!mt.test(t.tagName))throw new Error("The first argument is required and must be an <img> or <canvas> element.");this.element=t,this.options=g({},ut,u(e)&&e),this.cropped=!1,this.disabled=!1,this.pointers={},this.ready=!1,this.reloading=!1,this.replaced=!1,this.sized=!1,this.sizing=!1,this.init()}var t,e,i;return t=n,i=[{key:"noConflict",value:function(){return window.Cropper=Pt,n}},{key:"setDefaults",value:function(t){g(ut,u(t)&&t)}}],(e=[{key:"init",value:function(){var t,e=this.element,i=e.tagName.toLowerCase();if(!e[c]){if(e[c]=this,"img"===i){if(this.isImg=!0,t=e.getAttribute("src")||"",!(this.originalUrl=t))return;t=e.src}else"canvas"===i&&window.HTMLCanvasElement&&(t=e.toDataURL());this.load(t)}}},{key:"load",value:function(t){var e,i,a,n,o,h,r=this;t&&(this.url=t,this.imageData={},e=this.element,(i=this.options).rotatable||i.scalable||(i.checkOrientation=!1),i.checkOrientation&&window.ArrayBuffer?lt.test(t)?pt.test(t)?this.read((h=(h=t).replace(Xt,""),a=atob(h),h=new ArrayBuffer(a.length),z(n=new Uint8Array(h),function(t,e){n[e]=a.charCodeAt(e)}),h)):this.clone():(o=new XMLHttpRequest,h=this.clone.bind(this),this.reloading=!0,(this.xhr=o).onabort=h,o.onerror=h,o.ontimeout=h,o.onprogress=function(){o.getResponseHeader("content-type")!==ct&&o.abort()},o.onload=function(){r.read(o.response)},o.onloadend=function(){r.reloading=!1,r.xhr=null},i.checkCrossOrigin&&Lt(t)&&e.crossOrigin&&(t=zt(t)),o.open("GET",t,!0),o.responseType="arraybuffer",o.withCredentials="use-credentials"===e.crossOrigin,o.send()):this.clone())}},{key:"read",value:function(t){var e=this.options,i=this.imageData,a=Rt(t),n=0,o=1,h=1;1<a&&(this.url=function(t,e){for(var i=[],a=new Uint8Array(t);0<a.length;)i.push(Yt.apply(null,yt(a.subarray(0,8192)))),a=a.subarray(8192);return"data:".concat(e,";base64,").concat(btoa(i.join("")))}(t,ct),n=(t=function(t){var e=0,i=1,a=1;switch(t){case 2:i=-1;break;case 3:e=-180;break;case 4:a=-1;break;case 5:e=90,a=-1;break;case 6:e=90;break;case 7:e=90,i=-1;break;case 8:e=-90}return{rotate:e,scaleX:i,scaleY:a}}(a)).rotate,o=t.scaleX,h=t.scaleY),e.rotatable&&(i.rotate=n),e.scalable&&(i.scaleX=o,i.scaleY=h),this.clone()}},{key:"clone",value:function(){var t=this.element,e=this.url,i=t.crossOrigin,a=e,n=(this.options.checkCrossOrigin&&Lt(e)&&(i=i||"anonymous",a=zt(e)),this.crossOrigin=i,this.crossOriginUrl=a,document.createElement("img"));i&&(n.crossOrigin=i),n.src=a||e,n.alt=t.alt||"The image to crop",(this.image=n).onload=this.start.bind(this),n.onerror=this.stop.bind(this),v(n,Z),t.parentNode.insertBefore(n,t.nextSibling)}},{key:"start",value:function(){function t(t,e){g(a.imageData,{naturalWidth:t,naturalHeight:e,aspectRatio:t/e}),a.initialImageData=g({},a.imageData),a.sizing=!1,a.sized=!0,a.build()}var e,i,a=this,n=this.image,o=(n.onload=null,n.onerror=null,this.sizing=!0,h.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(h.navigator.userAgent));n.naturalWidth&&!o?t(n.naturalWidth,n.naturalHeight):(e=document.createElement("img"),i=document.body||document.documentElement,(this.sizingImage=e).onload=function(){t(e.width,e.height),o||i.removeChild(e)},e.src=n.src,o||(e.style.cssText="left:0;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;opacity:0;position:absolute;top:0;z-index:-1;",i.appendChild(e)))}},{key:"stop",value:function(){var t=this.image;t.onload=null,t.onerror=null,t.parentNode.removeChild(t),this.image=null}},{key:"build",value:function(){var t,e,i,a,n,o,h,r,s;this.sized&&!this.ready&&(t=this.element,e=this.options,i=this.image,a=t.parentNode,(n=document.createElement("div")).innerHTML='<div class="cropper-container" touch-action="none"><div class="cropper-wrap-box"><div class="cropper-canvas"></div></div><div class="cropper-drag-box"></div><div class="cropper-crop-box"><span class="cropper-view-box"></span><span class="cropper-dashed dashed-h"></span><span class="cropper-dashed dashed-v"></span><span class="cropper-center"></span><span class="cropper-face"></span><span class="cropper-line line-e" data-cropper-action="e"></span><span class="cropper-line line-n" data-cropper-action="n"></span><span class="cropper-line line-w" data-cropper-action="w"></span><span class="cropper-line line-s" data-cropper-action="s"></span><span class="cropper-point point-e" data-cropper-action="e"></span><span class="cropper-point point-n" data-cropper-action="n"></span><span class="cropper-point point-w" data-cropper-action="w"></span><span class="cropper-point point-s" data-cropper-action="s"></span><span class="cropper-point point-ne" data-cropper-action="ne"></span><span class="cropper-point point-nw" data-cropper-action="nw"></span><span class="cropper-point point-sw" data-cropper-action="sw"></span><span class="cropper-point point-se" data-cropper-action="se"></span></div></div>',o=(n=n.querySelector(".".concat(c,"-container"))).querySelector(".".concat(c,"-canvas")),h=n.querySelector(".".concat(c,"-drag-box")),s=(r=n.querySelector(".".concat(c,"-crop-box"))).querySelector(".".concat(c,"-face")),this.container=a,this.cropper=n,this.canvas=o,this.dragBox=h,this.cropBox=r,this.viewBox=n.querySelector(".".concat(c,"-view-box")),this.face=s,o.appendChild(i),v(t,L),a.insertBefore(n,t.nextSibling),X(i,Z),this.initPreview(),this.bind(),e.initialAspectRatio=Math.max(0,e.initialAspectRatio)||NaN,e.aspectRatio=Math.max(0,e.aspectRatio)||NaN,e.viewMode=Math.max(0,Math.min(3,Math.round(e.viewMode)))||0,v(r,L),e.guides||v(r.getElementsByClassName("".concat(c,"-dashed")),L),e.center||v(r.getElementsByClassName("".concat(c,"-center")),L),e.background&&v(n,"".concat(c,"-bg")),e.highlight||v(s,G),e.cropBoxMovable&&(v(s,V),w(s,d,I)),e.cropBoxResizable||(v(r.getElementsByClassName("".concat(c,"-line")),L),v(r.getElementsByClassName("".concat(c,"-point")),L)),this.render(),this.ready=!0,this.setDragMode(e.dragMode),e.autoCrop&&this.crop(),this.setData(e.data),l(e.ready)&&b(t,"ready",e.ready,{once:!0}),y(t,"ready"))}},{key:"unbuild",value:function(){var t;this.ready&&(this.ready=!1,this.unbind(),this.resetPreview(),(t=this.cropper.parentNode)&&t.removeChild(this.cropper),X(this.element,L))}},{key:"uncreate",value:function(){this.ready?(this.unbuild(),this.ready=!1,this.cropped=!1):this.sizing?(this.sizingImage.onload=null,this.sizing=!1,this.sized=!1):this.reloading?(this.xhr.onabort=null,this.xhr.abort()):this.image&&this.stop()}}])&&j(t.prototype,e),i&&j(t,i),Object.defineProperty(t,"prototype",{writable:!1}),n}();return g(It.prototype,t,i,e,St,jt,At),It});
"object"!=typeof window.UM&&(window.UM={}),"object"!=typeof UM.frontend&&(UM.frontend={}),UM.frontend={cropper:{obj:null,init:function(){var o=jQuery(".um-modal .um-single-image-preview img").first();if(o.length&&""!==o.attr("src")){UM.frontend.cropper.obj&&UM.frontend.cropper.destroy();var t=jQuery(".um-modal .um-single-image-preview"),r=o.parent().data("crop"),n=o.parent().data("min_width"),i=o.parent().data("min_height"),a=o.parent().data("ratio"),d=jQuery(".um-modal").find("#um_upload_single").data("ratio"),d=(d&&(a=d.split(":")[0]),jQuery(window).height()-(jQuery(".um-modal-footer a").height()+20)-50-jQuery(".um-modal-header:visible").height());o.css({height:"auto"}),t.css({height:"auto"}),jQuery(window).height()<=400?(t.css({height:d+"px","max-height":d+"px"}),o.css({height:"auto"})):(o.css({height:"auto","max-height":d+"px"}),t.css({height:o.height(),"max-height":d+"px"}));let e;"square"===r?e={minWidth:n,minHeight:i,dragCrop:!1,aspectRatio:1,zoomable:!1,rotatable:!1,dashed:!1}:"cover"===r?(0<Math.round(n/a)&&(i=Math.round(n/a)),e={minWidth:n,minHeight:i,dragCrop:!1,aspectRatio:a,zoomable:!1,rotatable:!1,dashed:!1}):"user"===r&&(e={minWidth:n,minHeight:i,dragCrop:!0,aspectRatio:"auto",zoomable:!1,rotatable:!1,dashed:!1}),e&&(UM.frontend.cropper.obj=new Cropper(o[0],e))}},destroy:function(){0<jQuery(".cropper-container").length&&UM.frontend.cropper.obj&&(UM.frontend.cropper.obj.destroy(),UM.frontend.cropper.obj=null)}}},wp.hooks.addAction("um_remove_modal","um_common_frontend",function(){UM.frontend.cropper.destroy()}),wp.hooks.addAction("um_after_removing_preview","um_common_frontend",function(){UM.frontend.cropper.destroy()}),wp.hooks.addAction("um_window_resize","um_common_frontend",function(){UM.frontend.cropper.destroy()});
jQuery(document).ready(function(){jQuery(document).on("click",".um-popup-overlay",function(){remove_Modal()}),jQuery(document).on("click",'.um-modal-overlay, a[data-action="um_remove_modal"]',function(){um_remove_modal()}),jQuery(document).on("click",'a[data-modal^="um_"], span[data-modal^="um_"], .um-modal:not(:has(.um-form)) a',function(e){return e.preventDefault(),!1}),jQuery(document).on("click",".um-finish-upload.file:not(.disabled)",function(){var e=jQuery(this).attr("data-key"),a=jQuery(this).parents(".um-modal-body").find(".um-single-file-preview").html(),a=(um_remove_modal(),jQuery(".um-single-file-preview[data-key="+e+"]").fadeIn().html(a),jQuery(".um-field[data-key="+e+"]").find(".um-single-fileinfo a").data("file"));jQuery(".um-single-file-preview[data-key="+e+"]").parents(".um-field").find(".um-btn-auto-width").html(jQuery(this).attr("data-change")),jQuery(".um-single-file-preview[data-key="+e+"]").parents(".um-field").find('input[type="hidden"]').val(a)}),jQuery(document).on("click",".um-finish-upload.image:not(.disabled)",function(){var a,e,t=jQuery(this),i=jQuery(this).attr("data-key"),r=jQuery(this).parents(".um-modal-body").find(".um-single-image-preview"),u=r.find("img").attr("src"),r=r.find("img").data("file"),d=0,m=(jQuery(this).parents("#um_upload_single").data("user_id")&&(d=jQuery(this).parents("#um_upload_single").data("user_id")),0),n="";1===jQuery('div.um-field-image[data-key="'+i+'"]').length&&(m=(e=jQuery('div.um-field-image[data-key="'+i+'"]').closest(".um-form")).find('input[name="form_id"]').val(),n=e.attr("data-mode")),0<jQuery(".cropper-hidden").length&&UM.frontend.cropper.obj?(e=UM.frontend.cropper.obj.getData(),e=Math.round(e.x)+","+Math.round(e.y)+","+Math.round(e.width)+","+Math.round(e.height),jQuery(this).html(jQuery(this).attr("data-processing")).addClass("disabled"),jQuery.ajax({url:wp.ajax.settings.url,type:"POST",dataType:"json",data:{action:"um_resize_image",src:u,coord:e,user_id:d,key:i,set_id:m,set_mode:n,nonce:um_scripts.nonce},success:function(e){e.success&&(a=new Date,"profile_photo"===i?jQuery(".um-profile-photo-img img").attr("src",e.data.image.source_url+"?"+a.getTime()):"cover_photo"===i&&(jQuery(".um-cover-e").empty().html('<img src="'+e.data.image.source_url+"?"+a.getTime()+'" alt="" />'),jQuery(".um").hasClass("um-editing"))&&jQuery(".um-cover-overlay").show(),jQuery(".um-single-image-preview[data-key="+i+"]").fadeIn().find("img").attr("src",e.data.image.source_url+"?"+a.getTime()),um_remove_modal(),jQuery("img.cropper-invisible").remove(),jQuery(".um-single-image-preview[data-key="+i+"]").parents(".um-field").find(".um-btn-auto-width").html(t.attr("data-change")),jQuery(".um-single-image-preview[data-key="+i+"]").parents(".um-field").find('input[type="hidden"]').val(e.data.image.filename))}})):(a=new Date,jQuery(".um-single-image-preview[data-key="+i+"]").fadeIn().find("img").attr("src",u+"?"+a.getTime()),um_remove_modal(),jQuery(".um-single-image-preview[data-key="+i+"]").parents(".um-field").find(".um-btn-auto-width").html(t.attr("data-change")),jQuery(".um-single-image-preview[data-key="+i+"]").parents(".um-field").find("input[type=hidden]").val(r))}),jQuery(document.body).on("click",'a[data-modal^="um_"], span[data-modal^="um_"]',function(e){var a=jQuery(this).attr("data-modal"),t="normal";jQuery(this).data("modal-size")&&(t=jQuery(this).data("modal-size")),jQuery(this).data("modal-copy")&&(jQuery("#"+a).html(jQuery(this).parents(".um-field").find(".um-modal-hidden-content").html()),jQuery(this).parents(".um-profile-photo").attr("data-user_id")&&jQuery("#"+a).attr("data-user_id",jQuery(this).parents(".um-profile-photo").attr("data-user_id")),jQuery(this).parents(".um-cover").attr("data-ratio")&&jQuery("#"+a).attr("data-ratio",jQuery(this).parents(".um-cover").attr("data-ratio")),jQuery(this).parents(".um-cover").attr("data-user_id")&&jQuery("#"+a).attr("data-user_id",jQuery(this).parents(".um-cover").attr("data-user_id")),0<jQuery('input[type="hidden"][name="user_id"]').length)&&jQuery("#"+a).attr("data-user_id",jQuery('input[type="hidden"][name="user_id"]').val()),um_new_modal(a,t)})});
!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],e):e("undefined"!=typeof jQuery?jQuery:window.Zepto)}(function(L){"use strict";var h={},t=(h.fileapi=void 0!==L("<input type='file'/>").get(0).files,h.formdata=void 0!==window.FormData,!!L.fn.prop);function a(e){var t=e.data;e.isDefaultPrevented()||(e.preventDefault(),L(e.target).ajaxSubmit(t))}function r(e){var t=e.target,a=L(t);if(!a.is("[type=submit],[type=image]")){var r=a.closest("[type=submit]");if(0===r.length)return;t=r[0]}var n=this;"image"==(n.clk=t).type&&(void 0!==e.offsetX?(n.clk_x=e.offsetX,n.clk_y=e.offsetY):"function"==typeof L.fn.offset?(r=a.offset(),n.clk_x=e.pageX-r.left,n.clk_y=e.pageY-r.top):(n.clk_x=e.pageX-t.offsetLeft,n.clk_y=e.pageY-t.offsetTop)),setTimeout(function(){n.clk=n.clk_x=n.clk_y=null},100)}function M(){var e;L.fn.ajaxSubmit.debug&&(e="[jquery.form] "+Array.prototype.join.call(arguments,""),window.console&&window.console.log?window.console.log(e):window.opera&&window.opera.postError&&window.opera.postError(e))}L.fn.attr2=function(){var e;return t&&((e=this.prop.apply(this,arguments))&&e.jquery||"string"==typeof e)?e:this.attr.apply(this,arguments)},L.fn.ajaxSubmit=function(c){if(this.length){var A,E=this,e=("function"==typeof c?c={success:c}:void 0===c&&(c={}),A=c.type||this.attr2("method"),e=(e=(e="string"==typeof(e=c.url||this.attr2("action"))?L.trim(e):"")||window.location.href||"")&&(e.match(/^([^#]+)/)||[])[1],c=L.extend(!0,{url:e,success:L.ajaxSettings.success,type:A||L.ajaxSettings.type,iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank"},c),{});if(this.trigger("form-pre-serialize",[this,c,e]),e.veto)M("ajaxSubmit: submit vetoed via form-pre-serialize trigger");else if(c.beforeSerialize&&!1===c.beforeSerialize(this,c))M("ajaxSubmit: submit aborted via beforeSerialize callback");else{var t=c.traditional,n=(void 0===t&&(t=L.ajaxSettings.traditional),[]),a=this.formToArray(c.semantic,n);if(c.data&&(c.extraData=c.data,u=L.param(c.data,t)),c.beforeSubmit&&!1===c.beforeSubmit(a,this,c))M("ajaxSubmit: submit aborted via beforeSubmit callback");else if(this.trigger("form-submit-validate",[a,this,c,e]),e.veto)M("ajaxSubmit: submit vetoed via form-submit-validate trigger");else{var r,o,i,e=L.param(a,t),s=(u&&(e=e?e+"&"+u:u),"GET"==c.type.toUpperCase()?(c.url+=(0<=c.url.indexOf("?")?"&":"?")+e,c.data=null):c.data=e,[]);c.resetForm&&s.push(function(){E.resetForm()}),c.clearForm&&s.push(function(){E.clearForm(c.includeHidden)}),!c.dataType&&c.target?(r=c.success||function(){},s.push(function(e){var t=c.replaceTarget?"replaceWith":"html";L(c.target)[t](e).each(r,arguments)})):c.success&&s.push(c.success),c.success=function(e,t,a){for(var r=c.context||this,n=0,o=s.length;n<o;n++)s[n].apply(r,[e,t,a||E,E])},c.error&&(o=c.error,c.error=function(e,t,a){var r=c.context||this;o.apply(r,[e,t,a,E])}),c.complete&&(i=c.complete,c.complete=function(e,t){var a=c.context||this;i.apply(a,[e,t,E])});var l,t=0<L("input[type=file]:enabled",this).filter(function(){return""!==L(this).val()}).length,u="multipart/form-data",e=E.attr("enctype")==u||E.attr("encoding")==u,u=h.fileapi&&h.formdata;M("fileAPI :"+u),!1!==c.iframe&&(c.iframe||(t||e)&&!u)?c.closeKeepAlive?L.get(c.closeKeepAlive,function(){l=m(a)}):l=m(a):l=(t||e)&&u?function(e){for(var a=new FormData,t=0;t<e.length;t++)a.append(e[t].name,e[t].value);if(c.extraData){var r=function(e){var t,a,r=L.param(e,c.traditional).split("&"),n=r.length,o=[];for(t=0;t<n;t++)r[t]=r[t].replace(/\+/g," "),a=r[t].split("="),o.push([decodeURIComponent(a[0]),decodeURIComponent(a[1])]);return o}(c.extraData);for(t=0;t<r.length;t++)r[t]&&a.append(r[t][0],r[t][1])}c.data=null;var n=L.extend(!0,{},L.ajaxSettings,c,{contentType:!1,processData:!1,cache:!1,type:A||"POST"});c.uploadProgress&&(n.xhr=function(){var e=L.ajaxSettings.xhr();return e.upload&&e.upload.addEventListener("progress",function(e){var t=0,a=e.loaded||e.position,r=e.total;e.lengthComputable&&(t=Math.ceil(a/r*100)),c.uploadProgress(e,a,r,t)},!1),e});n.data=null;var o=n.beforeSend;return n.beforeSend=function(e,t){c.formData?t.data=c.formData:t.data=a,o&&o.call(this,e,t)},L.ajax(n)}(a):L.ajax(c),E.removeData("jqxhr").data("jqxhr",l);for(var f=0;f<n.length;f++)n[f]=null;this.trigger("form-submit-notify",[this,c])}}}else M("ajaxSubmit: skipping submit process - no element selected");return this;function m(e){var t,l,u,o,f,m,p,d,h,g,v,a,x,b,y,T,j,i,w,s=E[0],S=L.Deferred();if(S.abort=function(e){p.abort(e)},e)for(t=0;t<n.length;t++)L(n[t]).prop("disabled",!1);return(l=L.extend(!0,{},L.ajaxSettings,c)).context=l.context||l,o="jqFormIO"+(new Date).getTime(),l.iframeTarget?(a=(f=L(l.iframeTarget)).attr2("name"))?o=a:f.attr2("name",o):(f=L('<iframe name="'+o+'" src="'+l.iframeSrc+'" />')).css({position:"absolute",top:"-1000px",left:"-1000px"}),m=f[0],p={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(e){var t="timeout"===e?"timeout":"aborted";M("aborting upload... "+t),this.aborted=1;try{m.contentWindow.document.execCommand&&m.contentWindow.document.execCommand("Stop")}catch(e){}f.attr("src",l.iframeSrc),p.error=t,l.error&&l.error.call(l.context,p,t,e),u&&L.event.trigger("ajaxError",[p,l,t]),l.complete&&l.complete.call(l.context,p,t)}},(u=l.global)&&0==L.active++&&L.event.trigger("ajaxStart"),u&&L.event.trigger("ajaxSend",[p,l]),l.beforeSend&&!1===l.beforeSend.call(l.context,p,l)?(l.global&&L.active--,S.reject()):p.aborted?S.reject():((e=s.clk)&&(a=e.name)&&!e.disabled&&(l.extraData=l.extraData||{},l.extraData[a]=e.value,"image"==e.type)&&(l.extraData[a+".x"]=s.clk_x,l.extraData[a+".y"]=s.clk_y),g=1,v=2,e=L("meta[name=csrf-token]").attr("content"),(a=L("meta[name=csrf-param]").attr("content"))&&e&&(l.extraData=l.extraData||{},l.extraData[a]=e),l.forceSync?r():setTimeout(r,10),y=50,j=L.parseXML||function(e,t){return window.ActiveXObject?((t=new ActiveXObject("Microsoft.XMLDOM")).async="false",t.loadXML(e)):t=(new DOMParser).parseFromString(e,"text/xml"),t&&t.documentElement&&"parsererror"!=t.documentElement.nodeName?t:null},i=L.parseJSON||function(e){return window.eval("("+e+")")},w=function(e,t,a){var r=e.getResponseHeader("content-type")||"",n="xml"===t||!t&&0<=r.indexOf("xml"),e=n?e.responseXML:e.responseText;return n&&"parsererror"===e.documentElement.nodeName&&L.error&&L.error("parsererror"),"string"==typeof(e=a&&a.dataFilter?a.dataFilter(e,t):e)&&("json"===t||!t&&0<=r.indexOf("json")?e=i(e):("script"===t||!t&&0<=r.indexOf("javascript"))&&L.globalEval(e)),e}),S;function k(t){var a=null;try{t.contentWindow&&(a=t.contentWindow.document)}catch(e){M("cannot get iframe.contentWindow document: "+e)}if(!a)try{a=t.contentDocument||t.document}catch(e){M("cannot get iframe.contentDocument: "+e),a=t.document}return a}function r(){var e=E.attr2("target"),t=E.attr2("action"),a=E.attr("enctype")||E.attr("encoding")||"multipart/form-data";s.setAttribute("target",o),A&&!/post/i.test(A)||s.setAttribute("method","POST"),t!=l.url&&s.setAttribute("action",l.url),l.skipEncodingOverride||A&&!/post/i.test(A)||E.attr({encoding:"multipart/form-data",enctype:"multipart/form-data"}),l.timeout&&(h=setTimeout(function(){d=!0,D(g)},l.timeout));var r=[];try{if(l.extraData)for(var n in l.extraData)l.extraData.hasOwnProperty(n)&&(L.isPlainObject(l.extraData[n])&&l.extraData[n].hasOwnProperty("name")&&l.extraData[n].hasOwnProperty("value")?r.push(L('<input type="hidden" name="'+l.extraData[n].name+'">').val(l.extraData[n].value).appendTo(s)[0]):r.push(L('<input type="hidden" name="'+n+'">').val(l.extraData[n]).appendTo(s)[0]));l.iframeTarget||f.appendTo("body"),m.attachEvent?m.attachEvent("onload",D):m.addEventListener("load",D,!1),setTimeout(function e(){try{var t=k(m).readyState;M("state = "+t),t&&"uninitialized"==t.toLowerCase()&&setTimeout(e,50)}catch(e){M("Server abort: ",e," (",e.name,")"),D(v),h&&clearTimeout(h),h=void 0}},15);try{s.submit()}catch(e){document.createElement("form").submit.apply(s)}}finally{s.setAttribute("action",t),s.setAttribute("enctype",a),e?s.setAttribute("target",e):E.removeAttr("target"),L(r).remove()}}function D(t){if(!p.aborted&&!T)if((b=k(m))||(M("cannot access response document"),t=v),t===g&&p)p.abort("timeout"),S.reject(p,"timeout");else if(t==v&&p)p.abort("server abort"),S.reject(p,"error","server abort");else if(b&&b.location.href!=l.iframeSrc||d){m.detachEvent?m.detachEvent("onload",D):m.removeEventListener("load",D,!1);var a,t="success";try{if(d)throw"timeout";var e="xml"==l.dataType||b.XMLDocument||L.isXMLDoc(b);if(M("isXml="+e),!e&&window.opera&&(null===b.body||!b.body.innerHTML)&&--y)return M("requeing onLoad callback, DOM not available"),void setTimeout(D,250);var r,n,o,i=b.body||b.documentElement,s=(p.responseText=i?i.innerHTML:null,p.responseXML=b.XMLDocument||b,e&&(l.dataType="xml"),p.getResponseHeader=function(e){return{"content-type":l.dataType}[e.toLowerCase()]},i&&(p.status=Number(i.getAttribute("status"))||p.status,p.statusText=i.getAttribute("statusText")||p.statusText),(l.dataType||"").toLowerCase()),c=/(json|script|text)/.test(s);c||l.textarea?(r=b.getElementsByTagName("textarea")[0])?(p.responseText=r.value,p.status=Number(r.getAttribute("status"))||p.status,p.statusText=r.getAttribute("statusText")||p.statusText):c&&(n=b.getElementsByTagName("pre")[0],o=b.getElementsByTagName("body")[0],n?p.responseText=n.textContent||n.innerText:o&&(p.responseText=o.textContent||o.innerText)):"xml"==s&&!p.responseXML&&p.responseText&&(p.responseXML=j(p.responseText));try{x=w(p,s,l)}catch(e){t="parsererror",p.error=a=e||t}}catch(e){M("error caught: ",e),t="error",p.error=a=e||t}p.aborted&&(M("upload aborted"),t=null),"success"===(t=p.status?200<=p.status&&p.status<300||304===p.status?"success":"error":t)?(l.success&&l.success.call(l.context,x,"success",p),S.resolve(p.responseText,"success",p),u&&L.event.trigger("ajaxSuccess",[p,l])):t&&(void 0===a&&(a=p.statusText),l.error&&l.error.call(l.context,p,t,a),S.reject(p,"error",a),u)&&L.event.trigger("ajaxError",[p,l,a]),u&&L.event.trigger("ajaxComplete",[p,l]),u&&!--L.active&&L.event.trigger("ajaxStop"),l.complete&&l.complete.call(l.context,p,t),T=!0,l.timeout&&clearTimeout(h),setTimeout(function(){l.iframeTarget?f.attr("src",l.iframeSrc):f.remove(),p.responseXML=null},100)}}}},L.fn.ajaxForm=function(e){var t;return(e=e||{}).delegation=e.delegation&&L.isFunction(L.fn.on),e.delegation||0!==this.length?e.delegation?(L(document).off("submit.form-plugin",this.selector,a).off("click.form-plugin",this.selector,r).on("submit.form-plugin",this.selector,e,a).on("click.form-plugin",this.selector,e,r),this):this.ajaxFormUnbind().bind("submit.form-plugin",e,a).bind("click.form-plugin",e,r):(t={s:this.selector,c:this.context},!L.isReady&&t.s?(M("DOM not ready, queuing ajaxForm"),L(function(){L(t.s,t.c).ajaxForm(e)})):M("terminating; zero elements found by selector"+(L.isReady?"":" (DOM not ready)")),this)},L.fn.ajaxFormUnbind=function(){return this.unbind("submit.form-plugin click.form-plugin")},L.fn.formToArray=function(e,t){var a=[];if(0!==this.length){var r=this[0],n=this.attr("id"),o=e?r.getElementsByTagName("*"):r.elements;if(o&&!/MSIE [678]/.test(navigator.userAgent)&&(o=L(o).get()),(o=n&&(n=L(':input[form="'+n+'"]').get()).length?(o||[]).concat(n):o)&&o.length){for(var i,s,c,l,u,f,m=0,p=o.length;m<p;m++)if((f=(c=o[m]).name)&&!c.disabled)if(e&&r.clk&&"image"==c.type)r.clk==c&&(a.push({name:f,value:L(c).val(),type:c.type}),a.push({name:f+".x",value:r.clk_x},{name:f+".y",value:r.clk_y}));else if((s=L.fieldValue(c,!0))&&s.constructor==Array)for(t&&t.push(c),i=0,l=s.length;i<l;i++)a.push({name:f,value:s[i]});else if(h.fileapi&&"file"==c.type){t&&t.push(c);var d=c.files;if(d.length)for(i=0;i<d.length;i++)a.push({name:f,value:d[i],type:c.type});else a.push({name:f,value:"",type:c.type})}else null!=s&&(t&&t.push(c),a.push({name:f,value:s,type:c.type,required:c.required}));!e&&r.clk&&(f=(u=(n=L(r.clk))[0]).name)&&!u.disabled&&"image"==u.type&&(a.push({name:f,value:n.val()}),a.push({name:f+".x",value:r.clk_x},{name:f+".y",value:r.clk_y}))}}return a},L.fn.formSerialize=function(e){return L.param(this.formToArray(e))},L.fn.fieldSerialize=function(n){var o=[];return this.each(function(){var e=this.name;if(e){var t=L.fieldValue(this,n);if(t&&t.constructor==Array)for(var a=0,r=t.length;a<r;a++)o.push({name:e,value:t[a]});else null!=t&&o.push({name:this.name,value:t})}}),L.param(o)},L.fn.fieldValue=function(e){for(var t=[],a=0,r=this.length;a<r;a++){var n=this[a],n=L.fieldValue(n,e);null==n||n.constructor==Array&&!n.length||(n.constructor==Array?L.merge(t,n):t.push(n))}return t},L.fieldValue=function(e,t){var a=e.name,r=e.type,n=e.tagName.toLowerCase();if((t=void 0===t?!0:t)&&(!a||e.disabled||"reset"==r||"button"==r||("checkbox"==r||"radio"==r)&&!e.checked||("submit"==r||"image"==r)&&e.form&&e.form.clk!=e||"select"==n&&-1==e.selectedIndex))return null;if("select"!=n)return L(e).val();t=e.selectedIndex;if(t<0)return null;for(var o=[],i=e.options,s="select-one"==r,c=s?t+1:i.length,l=s?t:0;l<c;l++){var u=i[l];if(u.selected){var f=(f=u.value)||(u.attributes&&u.attributes.value&&!u.attributes.value.specified?u.text:u.value);if(s)return f;o.push(f)}}return o},L.fn.clearForm=function(e){return this.each(function(){L("input,select,textarea",this).clearFields(e)})},L.fn.clearFields=L.fn.clearInputs=function(a){var r=/^(?:color|date|datetime|email|month|number|password|range|search|tel|text|time|url|week)$/i;return this.each(function(){var e=this.type,t=this.tagName.toLowerCase();r.test(e)||"textarea"==t?this.value="":"checkbox"==e||"radio"==e?this.checked=!1:"select"==t?this.selectedIndex=-1:"file"==e?/MSIE/.test(navigator.userAgent)?L(this).replaceWith(L(this).clone(!0)):L(this).val(""):a&&(!0===a&&/hidden/.test(e)||"string"==typeof a&&L(this).is(a))&&(this.value="")})},L.fn.resetForm=function(){return this.each(function(){"function"!=typeof this.reset&&("object"!=typeof this.reset||this.reset.nodeType)||this.reset()})},L.fn.enable=function(e){return void 0===e&&(e=!0),this.each(function(){this.disabled=!e})},L.fn.selected=function(t){return void 0===t&&(t=!0),this.each(function(){var e=this.type;"checkbox"==e||"radio"==e?this.checked=t:"option"==this.tagName.toLowerCase()&&(e=L(this).parent("select"),t&&e[0]&&"select-one"==e[0].type&&e.find("option").selected(!1),this.selected=t)})},L.fn.ajaxSubmit.debug=!1});
/*!
 * jQuery Upload File Plugin
 * version: 3.1.2
 * @requires jQuery v1.5 or later & form plugin
 * Copyright (c) 2013 Ravishanker Kusuma
 * http://hayageek.com/
 */
(function(b){if(b.fn.ajaxForm==undefined){}var a={};a.fileapi=b("<input type='file'/>").get(0).files!==undefined;a.formdata=window.FormData!==undefined;b.fn.uploadFile=function(t){var r=b.extend({url:"",method:"POST",enctype:"multipart/form-data",formData:null,returnType:null,allowedTypes:"*",fileName:"file",formData:{},dynamicFormData:function(){return{}},maxFileSize:-1,maxFileCount:-1,multiple:true,dragDrop:true,autoSubmit:true,showCancel:true,showAbort:true,showDone:true,showDelete:false,showError:true,showStatusAfterSuccess:true,showStatusAfterError:true,showFileCounter:true,fileCounterStyle:"). ",showProgress:false,onSelect:function(s){return true},onSubmit:function(s,u){},onSuccess:function(u,s,v){},onError:function(v,s,u){},deleteCallback:false,afterUploadAll:false,uploadButtonClass:"upload",dragDropStr:"",abortStr:"Abort",cancelStr:"Cancel",deletelStr:"Delete",doneStr:"Done",multiDragErrorStr:"Multiple File Drag &amp; Drop is not allowed.",extErrorStr:"",sizeErrorStr:"",uploadErrorStr:"Upload is not allowed",maxFileCountErrorStr:""},t);this.fileCounter=1;this.selectedFiles=0;this.fCounter=0;this.sCounter=0;this.tCounter=0;var d="upload-"+(new Date().getTime());this.formGroup=d;this.hide();this.errorLog=b("<div></div>");this.after(this.errorLog);this.responses=[];if(!a.formdata){r.dragDrop=false}if(!a.formdata){r.multiple=false}var m=this;var e=b("<div>"+b(this).html()+"</div>");b(e).addClass(r.uploadButtonClass);(function k(){if(b.fn.ajaxForm){if(r.dragDrop){var s=b('<div class="ajax-upload-dragdrop" style="vertical-align:top;"></div>');b(m).before(s);b(s).append(e);b(s).prepend(b(r.dragDropStr));f(m,r,s)}else{b(m).before(e)}q(m,d,r,e)}else{window.setTimeout(k,10)}})();this.startUpload=function(){b("."+this.formGroup).each(function(u,s){if(b(this).is("form")){b(this).submit()}})};this.stopUpload=function(){b(".upload-red").each(function(u,s){if(b(this).hasClass(m.formGroup)){b(this).click()}})};this.getResponses=function(){return this.responses};var g=false;function j(){if(r.afterUploadAll&&!g){g=true;(function s(){if(m.sCounter!=0&&(m.sCounter+m.fCounter==m.tCounter)){r.afterUploadAll(m);g=false}else{window.setTimeout(s,100)}})()}}function f(w,u,v){v.on("dragenter",function(s){s.stopPropagation();s.preventDefault();b(this).css("border","2px dashed #ddd")});v.on("dragover",function(s){s.stopPropagation();s.preventDefault()});v.on("drop",function(x){b(this).css("border","2px dashed #ddd");x.preventDefault();w.errorLog.html("");var s=x.originalEvent.dataTransfer.files;if(!u.multiple&&s.length>1){if(u.showError){b("<div class='um-error-block'>"+u.multiDragErrorStr+"</div>").appendTo(w.errorLog)}return}if(u.onSelect(s)==false){return}l(u,w,s)});b(document).on("dragenter",function(s){s.stopPropagation();s.preventDefault()});b(document).on("dragover",function(s){s.stopPropagation();s.preventDefault();v.css("border","2px dashed #ddd")});b(document).on("drop",function(s){s.stopPropagation();s.preventDefault();v.css("border","2px dashed #ddd")})}function i(s){var v="";var u=s/1024;if(parseInt(u)>1024){var w=u/1024;v=w.toFixed(2)+" MB"}else{v=u.toFixed(2)+" KB"}return v}function o(x){var y=[];if(jQuery.type(x)=="string"){y=x.split("&")}else{y=b.param(x).split("&")}var u=y.length;var s=[];var w,v;for(w=0;w<u;w++){y[w]=y[w].replace(/\+/g," ");v=y[w].split("=");s.push([decodeURIComponent(v[0]),decodeURIComponent(v[1])])}return s}function l(H,B,u){for(var C=0;C<u.length;C++){if(!c(B,H,u[C].name)){if(H.showError){b("<div class='um-error-block'>"+H.extErrorStr+"</div>").appendTo(B.errorLog)}continue}if(H.maxFileSize!=-1&&u[C].size>H.maxFileSize){if(H.showError){b("<div class='um-error-block'>"+H.sizeErrorStr+"</div>").appendTo(B.errorLog)}continue}if(H.maxFileCount!=-1&&B.selectedFiles>=H.maxFileCount){if(H.showError){b("<div class='um-error-block'>"+H.maxFileCountErrorStr+"</div>").appendTo(B.errorLog)}continue}B.selectedFiles++;var D=H;var w=new FormData();var A=H.fileName.replace("[]","");w.append(A,u[C]);var y=H.formData;if(y){var F=o(y);for(var z=0;z<F.length;z++){if(F[z]){w.append(F[z][0],F[z][1])}}}D.fileData=w;var E=new p(B,H);var G="";if(H.showFileCounter){G=B.fileCounter+H.fileCounterStyle+u[C].name}else{G=u[C].name}var v=b("<form style='display:block; position:absolute;left: 150px;' class='"+B.formGroup+"' method='"+H.method+"' action='"+H.url+"' enctype='"+H.enctype+"'></form>");v.appendTo("body");var x=[];x.push(u[C].name);n(v,D,E,x,B);B.fileCounter++}}function c(w,v,y){var x=v.allowedTypes.toLowerCase().split(",");var u=y.split(".").pop().toLowerCase();if(v.allowedTypes!="*"&&jQuery.inArray(u,x)<0){return false}return true}function h(u,w){if(u.showFileCounter){var v=b(".upload-filename").length;w.fileCounter=v+1;b(".upload-filename").each(function(A,y){var s=b(this).html().split(u.fileCounterStyle);var x=parseInt(s[0])-1;var z=v+u.fileCounterStyle+s[1];b(this).html(z);v--})}}function q(y,B,D,u){var A="ajax-upload-id-"+(new Date().getTime());var w=b("<form method='"+D.method+"' action='"+D.url+"' enctype='"+D.enctype+"'></form>");var v="<input type='file' id='"+A+"' name='"+D.fileName+"'/>";if(D.multiple){if(D.fileName.indexOf("[]")!=D.fileName.length-2){D.fileName+="[]"}v="<input type='file' id='"+A+"' name='"+D.fileName+"' multiple/>"}var z=b(v).appendTo(w);z.change(function(){y.errorLog.html("");var K=D.allowedTypes.toLowerCase().split(",");var G=[];if(this.files){for(H=0;H<this.files.length;H++){G.push(this.files[H].name)}if(D.onSelect(this.files)==false){return}}else{var I=b(this).val();var F=[];G.push(I);if(!c(y,D,I)){if(D.showError){b("<div class='um-error-block'>"+D.extErrorStr+"</div>").appendTo(y.errorLog)}return}F.push({name:I,size:"NA"});if(D.onSelect(F)==false){return}}h(D,y);u.unbind("click");w.hide();q(y,B,D,u);w.addClass(B);if(a.fileapi&&a.formdata){w.removeClass(B);var J=this.files;l(D,y,J)}else{var E="";for(var H=0;H<G.length;H++){if(D.showFileCounter){E+=y.fileCounter+D.fileCounterStyle+G[H]+"<br>"}else{E+=G[H]+"<br>"}y.fileCounter++}if(D.maxFileCount!=-1&&(y.selectedFiles+G.length)>D.maxFileCount){if(D.showError){b("<div class='um-error-block'>"+D.maxFileCountErrorStr+"</div>").appendTo(y.errorLog)}return}y.selectedFiles+=G.length;var s=new p(y,D);s.filename.html(E);n(w,D,s,G,y)}});w.css({margin:0,padding:0});var C=b(u).width()+10;if(C==10){C=120}var x=u.height()+10;if(x==10){x=35}u.css({position:"relative",overflow:"hidden",cursor:"default"});z.css({position:"absolute",cursor:"pointer",top:"0px",width:'100%',height:'34px',left:"0px","z-index":"100",opacity:"0.0",filter:"alpha(opacity=0)","-ms-filter":"alpha(opacity=0)","-khtml-opacity":"0.0","-moz-opacity":"0.0"});w.appendTo(u)}function p(v,u){this.statusbar=b("<div class='upload-statusbar'></div>");this.progressDiv=b("<div class='upload-progress'>").appendTo(this.statusbar).hide();this.progressbar=b("<div class='upload-bar "+v.formGroup+"'></div>").appendTo(this.progressDiv);this.abort=b("<div class='upload-red "+v.formGroup+"'>"+u.abortStr+"</div>").appendTo(this.statusbar).hide();this.cancel=b("<div class='upload-red'>"+u.cancelStr+"</div>").appendTo(this.statusbar).hide();this.done=b("<div class='upload-green'>"+u.doneStr+"</div>").appendTo(this.statusbar).hide();this.del=b("<div class='upload-red'>"+u.deletelStr+"</div>").appendTo(this.statusbar).hide();v.errorLog.after(this.statusbar);return this}function n(z,y,u,w,A){var x=null;var v={cache:false,contentType:false,processData:false,forceSync:false,data:y.formData,formData:y.fileData,dataType:y.returnType,beforeSubmit:function(F,C,E){if(y.onSubmit.call(this,w)!=false){var B=y.dynamicFormData();if(B){var s=o(B);if(s){for(var D=0;D<s.length;D++){if(s[D]){if(y.fileData!=undefined){E.formData.append(s[D][0],s[D][1])}else{E.data[s[D][0]]=s[D][1]}}}}}A.tCounter+=w.length;j();return true}u.statusbar.append("<div class='um-error-block'>"+y.uploadErrorStr+"</div>");u.cancel.show();z.remove();u.cancel.click(function(){u.statusbar.remove()});return false},beforeSend:function(B,s){u.progressDiv.show();u.cancel.hide();u.done.hide();if(y.showAbort){u.abort.show();u.abort.click(function(){B.abort();A.selectedFiles-=w.length})}if(!a.formdata){u.progressbar.width("5%")}else{u.progressbar.width("1%")}},uploadProgress:function(E,s,D,C){if(C>98){C=98}var B=C+"%";if(C>1){u.progressbar.width(B)}if(y.showProgress){u.progressbar.html(B);u.progressbar.css("text-align","center")}},success:function(B,s,C){A.responses.push(B);u.progressbar.width("100%");if(y.showProgress){u.progressbar.html("100%");u.progressbar.css("text-align","center")}u.abort.hide();y.onSuccess.call(this,w,B,C);if(y.showStatusAfterSuccess){if(y.showDone){u.done.show();u.done.click(function(){u.statusbar.hide("slow");u.statusbar.remove()})}else{u.done.hide()}if(y.showDelete){u.del.show();u.del.click(function(){u.statusbar.hide().remove();if(y.deleteCallback){y.deleteCallback.call(this,B,u)}A.selectedFiles-=w.length;h(y,A)})}else{u.del.hide()}}else{u.statusbar.hide("slow");u.statusbar.remove()}z.remove();A.sCounter+=w.length},error:function(C,s,B){u.abort.hide();if(C.statusText=="abort"){u.statusbar.hide("slow").remove();h(y,A)}else{y.onError.call(this,w,s,B);if(y.showStatusAfterError){u.progressDiv.hide();u.statusbar.append("<span class='um-error-block'>ERROR: "+B+"</span>")}else{u.statusbar.hide();u.statusbar.remove()}A.selectedFiles-=w.length}z.remove();A.fCounter+=w.length}};if(y.autoSubmit){z.ajaxSubmit(v)}else{if(y.showCancel){u.cancel.show();u.cancel.click(function(){z.remove();u.statusbar.remove();A.selectedFiles-=w.length;h(y,A)})}z.ajaxForm(v)}}return this}}(jQuery));
function UM_domenus(){jQuery(".um-dropdown").each(function(e,o){UM.dropdown.setPosition(o)})}function UM_check_password_matched(){jQuery(document).on("keyup","input[data-key=user_password],input[data-key=confirm_user_password]",function(e){var o=jQuery("input[data-key=user_password]").val(),a=jQuery("input[data-key=confirm_user_password]").val(),t=jQuery("input[data-key=user_password],input[data-key=confirm_user_password]");o||a?o!==a?t.removeClass("um-validate-matched").addClass("um-validate-not-matched"):t.removeClass("um-validate-not-matched").addClass("um-validate-matched"):t.removeClass("um-validate-matched").removeClass("um-validate-not-matched")})}function um_responsive(){jQuery(".um").each(function(){(element_width=jQuery(this).width())<=340?(jQuery(this).removeClass("uimob340"),jQuery(this).removeClass("uimob500"),jQuery(this).removeClass("uimob800"),jQuery(this).removeClass("uimob960"),jQuery(this).addClass("uimob340")):element_width<=500?(jQuery(this).removeClass("uimob340"),jQuery(this).removeClass("uimob500"),jQuery(this).removeClass("uimob800"),jQuery(this).removeClass("uimob960"),jQuery(this).addClass("uimob500")):element_width<=800?(jQuery(this).removeClass("uimob340"),jQuery(this).removeClass("uimob500"),jQuery(this).removeClass("uimob800"),jQuery(this).removeClass("uimob960"),jQuery(this).addClass("uimob800")):element_width<=960?(jQuery(this).removeClass("uimob340"),jQuery(this).removeClass("uimob500"),jQuery(this).removeClass("uimob800"),jQuery(this).removeClass("uimob960"),jQuery(this).addClass("uimob960")):960<element_width&&(jQuery(this).removeClass("uimob340"),jQuery(this).removeClass("uimob500"),jQuery(this).removeClass("uimob800"),jQuery(this).removeClass("uimob960")),0<jQuery(".um-account-nav").length&&jQuery(".um-account-side").is(":visible")&&0==jQuery(".um-account-tab:visible").length&&jQuery(".um-account-side li a.current").trigger("click"),jQuery(this).css("opacity",1)}),jQuery(".um-cover, .um-member-cover, .um-cover-e").each(function(){var e=jQuery(this),o=e.data("ratio"),a=e.width(),o=o.split(":");calcHeight=Math.round(a/o[0])+"px",e.height(calcHeight),e.find(".um-cover-add").height(calcHeight)}),UM_domenus()}function initImageUpload_UM(d){upload_help_text=d.data("upload_help_text")?'<span class="help">'+d.data("upload_help_text")+"</span>":"",icon=d.data("icon")?'<span class="icon"><i class="'+d.data("icon")+'"></i></span>':"",upload_text=d.data("upload_text")?'<span class="str">'+d.data("upload_text")+"</span>":"";var e=0;jQuery("#um_upload_single:visible").data("user_id")&&(e=jQuery("#um_upload_single:visible").data("user_id")),d.uploadFile({url:wp.ajax.settings.url,method:"POST",multiple:!1,formData:{action:"um_imageupload",key:d.data("key"),set_id:d.data("set_id"),set_mode:d.data("set_mode"),_wpnonce:d.data("nonce"),timestamp:d.data("timestamp"),user_id:e},fileName:d.data("key"),allowedTypes:d.data("allowed_types"),maxFileSize:d.data("max_size"),dragDropStr:icon+upload_text+upload_help_text,sizeErrorStr:d.data("max_size_error"),extErrorStr:d.data("extension_error"),maxFileCountErrorStr:d.data("max_files_error"),maxFileCount:1,showDelete:!1,showAbort:!1,showDone:!1,showFileCounter:!1,showStatusAfterSuccess:!0,returnType:"json",onSubmit:function(e){d.parents(".um-modal-body").find(".um-error-block").remove()},onSuccess:function(e,o,a){d.selectedFiles=0,o.success&&0==o.success||void 0!==o.data.error?(d.parents(".um-modal-body").append('<div class="um-error-block">'+o.data.error+"</div>"),d.parents(".um-modal-body").find(".upload-statusbar").hide(0),um_modal_responsive()):jQuery.each(o.data,function(e,o){var a=d.parents(".um-modal-body").find(".um-single-image-preview img"),t=d.parents(".um-modal-body").find(".um-single-image-preview"),i=new Date;a.attr("src",o.url+"?"+i.getTime()),a.data("file",o.file),a.on("load",function(){d.parents(".um-modal-body").find(".um-modal-btn.um-finish-upload.disabled").removeClass("disabled"),d.parents(".um-modal-body").find(".ajax-upload-dragdrop,.upload-statusbar").hide(0),t.show(0),um_modal_responsive()})})},onError:function(e){console.log(e)}})}function initFileUpload_UM(t){upload_help_text=t.data("upload_help_text")?'<span class="help">'+t.data("upload_help_text")+"</span>":"",icon=t.data("icon")?'<span class="icon"><i class="'+t.data("icon")+'"></i></span>':"",upload_text=t.data("upload_text")?'<span class="str">'+t.data("upload_text")+"</span>":"",jQuery("#um_upload_single:visible").data("user_id")&&(user_id=jQuery("#um_upload_single:visible").data("user_id")),t.uploadFile({url:wp.ajax.settings.url,method:"POST",multiple:!1,formData:{action:"um_fileupload",key:t.data("key"),set_id:t.data("set_id"),user_id:t.data("user_id"),set_mode:t.data("set_mode"),_wpnonce:t.data("nonce"),timestamp:t.data("timestamp")},fileName:t.data("key"),allowedTypes:t.data("allowed_types"),maxFileSize:t.data("max_size"),dragDropStr:icon+upload_text+upload_help_text,sizeErrorStr:t.data("max_size_error"),extErrorStr:t.data("extension_error"),maxFileCountErrorStr:t.data("max_files_error"),maxFileCount:1,showDelete:!1,showAbort:!1,showDone:!1,showFileCounter:!1,showStatusAfterSuccess:!0,onSubmit:function(e){t.parents(".um-modal-body").find(".um-error-block").remove()},onSuccess:function(e,o,a){t.selectedFiles=0,o.success&&0==o.success||void 0!==o.data.error?(t.parents(".um-modal-body").append('<div class="um-error-block">'+o.data.error+"</div>"),t.parents(".um-modal-body").find(".upload-statusbar").hide(0)):jQuery.each(o.data,function(e,o){t.parents(".um-modal-body").find(".um-modal-btn.um-finish-upload.disabled").removeClass("disabled"),t.parents(".um-modal-body").find(".ajax-upload-dragdrop,.upload-statusbar").hide(0),t.parents(".um-modal-body").find(".um-single-file-preview").show(0),"icon"==e?t.parents(".um-modal-body").find(".um-single-fileinfo i").removeClass().addClass(o):"icon_bg"==e?t.parents(".um-modal-body").find(".um-single-fileinfo span.icon").css({"background-color":o}):"filename"==e?t.parents(".um-modal-body").find(".um-single-fileinfo a").attr("data-file",o):"original_name"==e?(t.parents(".um-modal-body").find(".um-single-fileinfo a").attr("data-orignal-name",o),t.parents(".um-modal-body").find(".um-single-fileinfo span.filename").html(o)):"url"==e&&t.parents(".um-modal-body").find(".um-single-fileinfo a").attr("href",o)}),setTimeout(function(){um_modal_responsive()},1e3)},onError:function(e){console.log(e)}})}function um_new_modal(e,o,a,t){var i,d,s,r=jQuery(".um-modal-overlay"),r=(0!==r.length&&(r.hide(),r.next(".um-modal").hide()),UM.common.tipsy.hide(),UM.dropdown.hideAll(),jQuery("body,html,textarea").css("overflow","hidden"),jQuery(document).bind("touchmove",function(e){e.preventDefault()}),jQuery(".um-modal").on("touchmove",function(e){e.stopPropagation()}),jQuery('<div class="um-modal-overlay"></div><div class="um-modal"></div>')),u=r.filter(".um-modal");u.append(jQuery("#"+e)),jQuery("body").append(r),a?(i=jQuery('<img src="'+t+'" />'),d=jQuery(window).width()-60,s=jQuery(window).height()-.25*jQuery(window).height(),i.on("load",function(){u.find(".um-modal-photo").html(i),u.addClass("is-photo").css({width:i.width(),"margin-left":"-"+i.width()/2+"px"}).show().children().show(),i.css({opacity:0,"max-width":d,"max-height":s}).animate({opacity:1},1e3),um_modal_responsive()})):(u.addClass("no-photo").show().children().show(),um_modal_size(o),initImageUpload_UM(jQuery(".um-modal:visible .um-single-image-upload")),initFileUpload_UM(jQuery(".um-modal:visible .um-single-file-upload")),um_modal_responsive())}function um_modal_responsive(){var e,o,a,t=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,i=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,d=jQuery(".um-modal:visible").not(".um-modal-hidden"),s=d.find(".um-modal-body.photo:visible");(s.length||d.length)&&(e=(i-d.innerHeight())/2+"px",d.removeClass("uimob340").removeClass("uimob500"),s.length?(s=t-60,a=i-.25*i,(o=jQuery(".um-modal-photo img")).css({opacity:0}),o.css({"max-width":s}),o.css({"max-height":a}),d.css({width:o.width(),"margin-left":"-"+o.width()/2+"px"}),o.animate({opacity:1},1e3),d.animate({bottom:e},300)):d.length&&(t<=340?d.addClass("uimob340"):t<=500&&d.addClass("uimob500"),UM.frontend.cropper.init(),t<=500||i-parseInt(e)>i?d.animate({bottom:0},300):d.animate({bottom:e},300)))}function um_remove_modal(){wp.hooks.doAction("um_remove_modal"),jQuery("body,html,textarea").css("overflow","auto"),jQuery(document).unbind("touchmove"),jQuery('body > .um-modal div[id^="um_"]').hide().appendTo("body"),jQuery("body > .um-modal, body > .um-modal-overlay").remove()}function um_modal_size(e){jQuery(".um-modal:visible").not(".um-modal-hidden").addClass(e)}function prepare_Modal(){0==jQuery(".um-popup-overlay").length&&(jQuery("body").append('<div class="um-popup-overlay"></div>'),jQuery("body").append('<div class="um-popup"></div>'),jQuery(".um-popup").addClass("loading"),jQuery("body,html").css({overflow:"hidden"}))}function remove_Modal(){jQuery(".um-popup-overlay").length&&(wp.hooks.doAction("um_before_modal_removed",jQuery(".um-popup")),UM.common.tipsy.hide(),jQuery(".um-popup").empty().remove(),jQuery(".um-popup-overlay").empty().remove(),jQuery("body,html").css({overflow:"auto"}))}function show_Modal(e){jQuery(".um-popup-overlay").length&&(jQuery(".um-popup").removeClass("loading").html(e),UM.common.tipsy.init())}function responsive_Modal(){jQuery(".um-popup-overlay").length&&(350<(ag_height=jQuery(window).height()-jQuery(".um-popup .um-popup-header").outerHeight()-jQuery(".um-popup .um-popup-footer").outerHeight()-80)&&(ag_height=350),jQuery(".um-popup-autogrow:visible").length?jQuery(".um-popup-autogrow:visible").css({height:ag_height+"px"}):jQuery(".um-popup-autogrow2:visible").length&&jQuery(".um-popup-autogrow2:visible").css({"max-height":ag_height+"px"}))}function um_reset_field(e){jQuery(e).find("div.um-field-area").find("input,textarea,select").not(":button, :submit, :reset, :hidden").val("").prop("checked",!1).prop("selected",!1)}"object"!=typeof window.UM&&(window.UM={}),UM.dropdown={hide:function(e){e=jQuery(e);e.parents("div").find("a").removeClass("active"),e.hide()},hideAll:function(){var e=jQuery(".um-dropdown");e.parents("div").find("a").removeClass("active"),e.hide()},setPosition:function(e){var o,a=jQuery(e),t=200,e=jQuery("html").attr("dir"),i=a.attr("data-element"),d=a.attr("data-position"),s=a.attr("data-trigger"),r=i&&jQuery(i).length?jQuery(i):a.siblings("a").length?a.siblings("a").first():a.parent(),u=(r.addClass("um-trigger-menu-on-"+s),0),n=(r.outerWidth()-t)/2,l=r.outerHeight(),i=r.offset();switch(r.is(".um-profile-photo")&&(o=r.find(".um-profile-photo-img"),l=r.closest("div.uimob500").length?r.outerHeight()-o.outerHeight()/4:(n=(o.outerWidth()-t)/2,o.outerHeight()/4)),r.is(".um-cover")&&(o=r.find(".um-cover-e"),l=r.closest("div.uimob500").length?(n=(o.outerWidth()-t)/2,o.outerHeight()/2+24):(n=(o.outerWidth()-t)/2,o.outerHeight()/2+46)),"lc"===d&&"rtl"===e&&(d="rc"),r.outerWidth()<t&&("rtl"===e&&i.left<100?d="rc":"rtl"!==e&&window.innerWidth-i.left-r.outerWidth()<100&&(d="lc")),d){case"lc":u=r.width()+17,a.css({top:0,width:t,left:"auto",right:u+"px","text-align":"center"}),a.find(".um-dropdown-arr").css({top:"4px",left:"auto",right:"-17px"}).find("i").removeClass().addClass("um-icon-arrow-right-b");break;case"rc":u=r.width()+25,a.css({top:0,width:t,left:u+"px",right:"auto","text-align":"center"}),a.find(".um-dropdown-arr").css({top:"4px",left:"-17px",right:"auto"}).find("i").removeClass().addClass("um-icon-arrow-left-b");break;default:var m=a.data("top-offset");void 0!==m&&(l+=m),a.css({top:l+6,width:t,left:n,right:"auto","text-align":"center"}),a.find(".um-dropdown-arr").css({top:"-17px",left:a.width()/2-12,right:"auto"}).find("i").removeClass().addClass("um-icon-arrow-up-b")}},show:function(e){e=jQuery(e);UM.dropdown.hideAll(),UM.dropdown.setPosition(e),e.show()}},jQuery(function(){jQuery(".um-search form *").on("keypress",function(e){if(13==e.which)return jQuery(".um-search form").trigger("submit"),!1}),2==jQuery("input[data-key=user_password],input[data-key=confirm_user_password]").length&&UM_check_password_matched()});
jQuery(window).on("load",function(){um_responsive(),um_modal_responsive()}),jQuery(window).on("resize",_.debounce(function(){responsive_Modal(),wp.hooks.doAction("um_window_resize"),um_responsive(),um_modal_responsive()},300)),wp.hooks.addAction("um_admin_modal_success_result","um_frontend_responsive",function(o){o.find(".um-admin-modal-body").find(".um").length&&um_responsive()});
var arr_all_conditions=[],um_field_conditions={},um_field_default_values={};function um_get_field_default_value(e){var i,n="",t=um_get_field_type(e);switch(t){case"text":case"number":case"date":case"textarea":case"select":n=e.find('input:text,input[type="number"],textarea,select').val();break;case"multiselect":n=e.find("select").val();break;case"radio":1<=e.find('input[type="radio"]:checked').length&&(n=e.find('input[type="radio"]:checked').val());break;case"checkbox":1<=e.find('input[type="checkbox"]:checked').length&&(n=1<e.find('input[type="checkbox"]:checked').length?((i=[]).push(n),e.find('input[type="checkbox"]:checked').each(function(){i.push(jQuery(this).val())}),i):e.find('input[type="checkbox"]:checked').val());break;default:n=wp.hooks.applyFilters("um_conditional_logic_default_value",n,t,e)}return{type:t,value:n}}function um_get_field_element(e){var i=e.find("input,textarea,select"),n=um_get_field_type(e);return wp.hooks.applyFilters("um_conditional_logic_field_element",i,n,e)}function um_get_field_type(e){var n="",e=e.attr("class").split(" ");return jQuery.each(e,function(e,i){/um-field-type_/.test(i)&&(n=i.replace("um-field-type_","").trim())}),n}function um_get_field_children(n){var t=[];return jQuery.each(arr_all_conditions,function(e,i){i.field.parent===n&&t.push(i.field.condition)}),t}function um_splitup_array(e,i){for(var n=e.length%i,t=n,a=Math.floor(e.length/i),u=[],o=0;o<e.length;o+=a){var r=a+o,d=!1;0!=n&&t&&(r++,t--,d=!0),u.push(e.slice(o,r)),d&&o++}var c=[];return jQuery.each(u,function(e,i){c.push({action:i[0],if_field:i[1],operator:i[2],value:i[3]})}),c}function um_get_field_data(e){return um_live_field=e.parents(".um-field").data("key"),um_live_value=e.val(),e.is(":checkbox")&&(um_live_value="",1<e.parents(".um-field").find("input:checked").length?e.parents(".um-field").find("input:checked").each(function(){um_live_value=um_live_value+jQuery(this).val()+" "}):1<=e.parents(".um-field").find("input:checked").length&&(um_live_value=e.parents(".um-field").find("input:checked").val())),um_live_value=e.is(":radio")?e.parents(".um-field").find("input[type=radio]:checked").val():um_live_value}function um_in_array(e,i,n){var t,a=!1;for(t in n=!!n,i)if(n&&i[t]===e||!n&&i[t]==e){a=!0;break}return a}function um_apply_conditions(n,e){var i,t,a,u,o,r;n.parents(".um-field[data-key]").length&&(i=n.parents(".um-field[data-key]").data("key"),void 0!==(i=um_field_conditions[i]))&&(t=um_get_field_type(n.parents(".um-field[data-key]")),"empty_file"===(a=um_get_field_data(n))&&(a=""),u={},o={},r={},jQuery.each(i,function(e,i){void 0===o[i.owner]&&(o[i.owner]=[],r[i.owner]={}),o[i.owner].push(i.value),r[i.owner]=i}),jQuery.each(i,function(e,i){var n;if(void 0===u[i.owner]&&(u[i.owner]={}),"empty"===i.operator&&(n=Array.isArray(a)?a.join(""):a,u[i.owner][e]=!n||""===n),"not empty"===i.operator&&(n=Array.isArray(a)?a.join(""):a,u[i.owner][e]=!(!n||""===n)),"equals to"===i.operator&&(n=Array.isArray(a)&&1===a.length?a[0]:a,i.value===n&&um_in_array(n,o[i.owner])?u[i.owner][e]=!0:u[i.owner][e]=!1),"not equals"===i.operator&&(n=Array.isArray(a)&&1===a.length?a[0]:a,(!jQuery.isNumeric(i.value)||parseInt(n)===parseInt(i.value)||!n||um_in_array(n,o[i.owner]))&&(i.value==n||um_in_array(n,o[i.owner]))?u[i.owner][e]=!1:u[i.owner][e]=!0),"greater than"===i.operator&&(n=Array.isArray(a)&&1===a.length?a[0]:a,jQuery.isNumeric(i.value)&&parseInt(n)>parseInt(i.value)?u[i.owner][e]=!0:u[i.owner][e]=!1),"less than"===i.operator&&(n=Array.isArray(a)&&1===a.length?a[0]:a,jQuery.isNumeric(i.value)&&parseInt(n)<parseInt(i.value)?u[i.owner][e]=!0:u[i.owner][e]=!1),"contains"===i.operator)switch(t){case"multiselect":a&&0<=a.indexOf(i.value)&&um_in_array(i.value,a)?u[i.owner][e]=!0:u[i.owner][e]=!1;break;case"checkbox":a&&0<=a.indexOf(i.value)?u[i.owner][e]=!0:u[i.owner][e]=!1;break;default:void 0===(u=wp.hooks.applyFilters("um_conditional_logic_contains_operator_owners",u,t,a,i,e))[i.owner][e]&&(a&&0<=a.indexOf(i.value)&&um_in_array(a,o[i.owner])?u[i.owner][e]=!0:u[i.owner][e]=!1)}}),jQuery.each(u,function(e,i){um_in_array(!0,i)?um_field_apply_action(n,r[e],!0):um_field_apply_action(n,r[e],!1)}),n.trigger("um_fields_change"))}function um_field_apply_action(e,i,n){var t=jQuery('div.um-field[data-key="'+i.owner+'"]');return"show"===i.action&&n&&(t.is(":hidden")&&um_field_restore_default_value(t),t.show(),_show_in_ie(t)),"show"!==i.action||n||(t.hide(),_hide_in_ie(t)),"hide"===i.action&&n&&(t.hide(),_hide_in_ie(t)),"hide"!==i.action||n||(t.is(":hidden")&&um_field_restore_default_value(t),t.show(),_show_in_ie(t)),e.removeClass("um-field-has-changed")}function um_field_restore_default_value(n){var e,i=um_get_field_type(n),t=n.data("key"),a=um_field_default_values[t];switch(i){case"text":case"number":case"date":case"textarea":n.find('input:text,input[type="number"],textareas').val(a.value);break;case"select":n.find("select").find("option").prop("selected",!1),n.find("select").val(a.value),n.find("select").trigger("change");break;case"multiselect":n.find("select").find("option").prop("selected",!1),jQuery.each(a.value,function(e,i){n.find("select").find('option[value="'+i+'"]').attr("selected",!0)}),n.find("select").trigger("change");break;case"checkbox":1<=n.find('input[type="checkbox"]:checked').length&&(n.find('input[type="checkbox"]:checked').prop("checked",!1),n.find("span.um-field-checkbox-state i").removeClass("um-icon-android-checkbox-outline"),n.find("span.um-field-checkbox-state i").addClass("um-icon-android-checkbox-outline-blank"),n.find(".um-field-checkbox.active").removeClass("active"),Array.isArray(a.value)?jQuery.each(a.value,function(e,i){i=n.find('input[type="checkbox"][value="'+i+'"]');i.attr("checked",!0),i.closest(".um-field-checkbox").find("i").removeClass("um-icon-android-checkbox-outline-blank"),i.closest(".um-field-checkbox").find("i").addClass("um-icon-android-checkbox-outline"),i.closest(".um-field-checkbox").addClass("active")}):((e=n.find('input[type="checkbox"][value="'+a.value+'"]')).attr("checked",!0),e.closest(".um-field-checkbox").find("i").removeClass("um-icon-android-checkbox-outline-blank"),e.closest(".um-field-checkbox").find("i").addClass("um-icon-android-checkbox-outline"),e.closest(".um-field-checkbox").addClass("active")));break;case"radio":1<=n.find('input[type="radio"]:checked').length&&setTimeout(function(){n.find('input[type="radio"]:checked').prop("checked",!1),n.find("span.um-field-radio-state i").removeClass("um-icon-android-radio-button-on"),n.find("span.um-field-radio-state i").addClass("um-icon-android-radio-button-off"),n.find(".um-field-radio.active").removeClass("active");var e=n.find('input[type="radio"][value="'+a.value+'"]');e.attr("checked",!0),e.closest(".um-field-radio").find("i").removeClass("um-icon-android-radio-button-off"),e.closest(".um-field-radio").find("i").addClass("um-icon-android-radio-button-on"),e.closest(".um-field-radio").addClass("active")},100);break;default:wp.hooks.doAction("um_conditional_logic_restore_default_value",i,n,a)}!n.hasClass("um-field-has-changed")&&(t=um_get_field_element(n),t="radio"!==i&&"checkbox"!==i?t:t.find(":checked"))&&(t.trigger("change"),n.addClass("um-field-has-changed"))}function um_field_hide_siblings(){jQuery.each(um_field_conditions,function(e,i){(1<=jQuery('.um-field[data-key="'+e+'"]:hidden').length||"none"===jQuery('.um-field[data-key="'+e+'"]').css("display"))&&jQuery.each(i,function(e,i){jQuery('.um-field[data-key="'+i.owner+'"]').hide()})})}function _hide_in_ie(e){void 0!==jQuery.browser&&jQuery.browser.msie&&e.css({visibility:"hidden"})}function _show_in_ie(e){void 0!==jQuery.browser&&jQuery.browser.msie&&e.css({visibility:"visible"})}function um_init_field_conditions(){var e=[];jQuery(".um-field[data-key]").each(function(){var n=jQuery(this).data("key"),a=(e.push(n),{});jQuery.each(jQuery(this)[0].attributes,function(e,i){var n,t;-1!==i.name.indexOf("data-cond")&&(n=(t=i.name.slice(10)).substring(1,0),t=t.slice(2),void 0===a[n]&&(a[n]={}),a[n][t]=i.value)}),jQuery.each(a,function(e,i){i={field:{owner:n,action:i.action,parent:i.field,operator:i.operator,value:i.value,condition:{owner:n,action:i.action,operator:i.operator,value:i.value}}};arr_all_conditions.push(i)}),um_field_default_values[jQuery(this).data("key")]=um_get_field_default_value(jQuery(this))}),jQuery.each(e,function(e,i){um_field_conditions[i]=um_get_field_children(i)}),jQuery(".um-field[data-key]:visible").each(function(){var e=um_get_field_element(jQuery(this));void 0!==e.trigger&&e.trigger("change")})}jQuery(document).ready(function(){jQuery(document).on("change",'.um-field select, .um-field input[type="radio"], .um-field input[type="checkbox"]',function(){um_apply_conditions(jQuery(this),!1)}),jQuery(document).on("input change",'.um-field input[type="text"]',function(){um_apply_conditions(jQuery(this),!1)}),jQuery(document).on("input change",'.um-field input[type="number"]',function(){um_apply_conditions(jQuery(this),!1)}),jQuery(document).on("input change",'.um-field input[type="password"]',function(){um_apply_conditions(jQuery(this),!1)}),jQuery(document).on("change",'.um-field-image input[type="hidden"],.um-field-file input[type="hidden"]',function(){um_apply_conditions(jQuery(this),!1)}),jQuery(document).on("click",".um-finish-upload",function(){var e=jQuery(this).attr("data-key"),i=jQuery(".um-field-"+e+" input");setTimeout(function(){um_apply_conditions(i,!1)},100)}),jQuery(document).on("click",".um-field .cancel",function(){var e=jQuery(this).parent().attr("data-key"),i=jQuery(".um-field-"+e+" input");setTimeout(function(){um_apply_conditions(i,!1)},1e3)}),jQuery(document).on("um_fields_change",function(){um_field_hide_siblings(),um_field_hide_siblings()}),um_init_field_conditions()});
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(n){"function"==typeof define&&define.amd?define(["jquery"],n):"object"==typeof module&&module.exports?module.exports=function(e,t){return void 0===t&&(t="undefined"!=typeof window?require("jquery"):require("jquery")(e)),n(t),t}:n(jQuery)}(function(d){var e=function(){if(d&&d.fn&&d.fn.select2&&d.fn.select2.amd)var e=d.fn.select2.amd;var t,n,i,h,o,s,f,g,m,v,y,_,r,a,w,l;function b(e,t){return r.call(e,t)}function c(e,t){var n,i,r,o,s,a,l,c,u,d,p,h=t&&t.split("/"),f=y.map,g=f&&f["*"]||{};if(e){for(s=(e=e.split("/")).length-1,y.nodeIdCompat&&w.test(e[s])&&(e[s]=e[s].replace(w,"")),"."===e[0].charAt(0)&&h&&(e=h.slice(0,h.length-1).concat(e)),u=0;u<e.length;u++)if("."===(p=e[u]))e.splice(u,1),u-=1;else if(".."===p){if(0===u||1===u&&".."===e[2]||".."===e[u-1])continue;0<u&&(e.splice(u-1,2),u-=2)}e=e.join("/")}if((h||g)&&f){for(u=(n=e.split("/")).length;0<u;u-=1){if(i=n.slice(0,u).join("/"),h)for(d=h.length;0<d;d-=1)if(r=(r=f[h.slice(0,d).join("/")])&&r[i]){o=r,a=u;break}if(o)break;!l&&g&&g[i]&&(l=g[i],c=u)}!o&&l&&(o=l,a=c),o&&(n.splice(0,a,o),e=n.join("/"))}return e}function A(t,n){return function(){var e=a.call(arguments,0);return"string"!=typeof e[0]&&1===e.length&&e.push(null),s.apply(h,e.concat([t,n]))}}function x(t){return function(e){m[t]=e}}function D(e){if(b(v,e)){var t=v[e];delete v[e],_[e]=!0,o.apply(h,t)}if(!b(m,e)&&!b(_,e))throw new Error("No "+e);return m[e]}function u(e){var t,n=e?e.indexOf("!"):-1;return-1<n&&(t=e.substring(0,n),e=e.substring(n+1,e.length)),[t,e]}function S(e){return e?u(e):[]}return e&&e.requirejs||(e?n=e:e={},m={},v={},y={},_={},r=Object.prototype.hasOwnProperty,a=[].slice,w=/\.js$/,f=function(e,t){var n,i=u(e),r=i[0],o=t[1];return e=i[1],r&&(n=D(r=c(r,o))),r?e=n&&n.normalize?n.normalize(e,function(t){return function(e){return c(e,t)}}(o)):c(e,o):(r=(i=u(e=c(e,o)))[0],e=i[1],r&&(n=D(r))),{f:r?r+"!"+e:e,n:e,pr:r,p:n}},g={require:function(e){return A(e)},exports:function(e){var t=m[e];return void 0!==t?t:m[e]={}},module:function(e){return{id:e,uri:"",exports:m[e],config:function(e){return function(){return y&&y.config&&y.config[e]||{}}}(e)}}},o=function(e,t,n,i){var r,o,s,a,l,c,u,d=[],p=typeof n;if(c=S(i=i||e),"undefined"==p||"function"==p){for(t=!t.length&&n.length?["require","exports","module"]:t,l=0;l<t.length;l+=1)if("require"===(o=(a=f(t[l],c)).f))d[l]=g.require(e);else if("exports"===o)d[l]=g.exports(e),u=!0;else if("module"===o)r=d[l]=g.module(e);else if(b(m,o)||b(v,o)||b(_,o))d[l]=D(o);else{if(!a.p)throw new Error(e+" missing "+o);a.p.load(a.n,A(i,!0),x(o),{}),d[l]=m[o]}s=n?n.apply(m[e],d):void 0,e&&(r&&r.exports!==h&&r.exports!==m[e]?m[e]=r.exports:s===h&&u||(m[e]=s))}else e&&(m[e]=n)},t=n=s=function(e,t,n,i,r){if("string"==typeof e)return g[e]?g[e](t):D(f(e,S(t)).f);if(!e.splice){if((y=e).deps&&s(y.deps,y.callback),!t)return;t.splice?(e=t,t=n,n=null):e=h}return t=t||function(){},"function"==typeof n&&(n=i,i=r),i?o(h,e,t,n):setTimeout(function(){o(h,e,t,n)},4),s},s.config=function(e){return s(e)},t._defined=m,(i=function(e,t,n){if("string"!=typeof e)throw new Error("See almond README: incorrect module build, no module name");t.splice||(n=t,t=[]),b(m,e)||b(v,e)||(v[e]=[e,t,n])}).amd={jQuery:!0},e.requirejs=t,e.require=n,e.define=i),e.define("almond",function(){}),e.define("jquery",[],function(){var e=d||$;return null==e&&console&&console.error&&console.error("Select2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before Select2 on your web page."),e}),e.define("select2/utils",["jquery"],function(o){var r={};function u(e){var t=e.prototype,n=[];for(var i in t){"function"==typeof t[i]&&"constructor"!==i&&n.push(i)}return n}r.Extend=function(e,t){var n={}.hasOwnProperty;function i(){this.constructor=e}for(var r in t)n.call(t,r)&&(e[r]=t[r]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},r.Decorate=function(i,r){var e=u(r),t=u(i);function o(){var e=Array.prototype.unshift,t=r.prototype.constructor.length,n=i.prototype.constructor;0<t&&(e.call(arguments,i.prototype.constructor),n=r.prototype.constructor),n.apply(this,arguments)}r.displayName=i.displayName,o.prototype=new function(){this.constructor=o};for(var n=0;n<t.length;n++){var s=t[n];o.prototype[s]=i.prototype[s]}function a(e){var t=function(){};e in o.prototype&&(t=o.prototype[e]);var n=r.prototype[e];return function(){return Array.prototype.unshift.call(arguments,t),n.apply(this,arguments)}}for(var l=0;l<e.length;l++){var c=e[l];o.prototype[c]=a(c)}return o};function e(){this.listeners={}}e.prototype.on=function(e,t){this.listeners=this.listeners||{},e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t]},e.prototype.trigger=function(e){var t=Array.prototype.slice,n=t.call(arguments,1);this.listeners=this.listeners||{},null==n&&(n=[]),0===n.length&&n.push({}),(n[0]._type=e)in this.listeners&&this.invoke(this.listeners[e],t.call(arguments,1)),"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)},e.prototype.invoke=function(e,t){for(var n=0,i=e.length;n<i;n++)e[n].apply(this,t)},r.Observable=e,r.generateChars=function(e){for(var t="",n=0;n<e;n++){t+=Math.floor(36*Math.random()).toString(36)}return t},r.bind=function(e,t){return function(){e.apply(t,arguments)}},r._convertData=function(e){for(var t in e){var n=t.split("-"),i=e;if(1!==n.length){for(var r=0;r<n.length;r++){var o=n[r];(o=o.substring(0,1).toLowerCase()+o.substring(1))in i||(i[o]={}),r==n.length-1&&(i[o]=e[t]),i=i[o]}delete e[t]}}return e},r.hasScroll=function(e,t){var n=o(t),i=t.style.overflowX,r=t.style.overflowY;return(i!==r||"hidden"!==r&&"visible"!==r)&&("scroll"===i||"scroll"===r||(n.innerHeight()<t.scrollHeight||n.innerWidth()<t.scrollWidth))},r.escapeMarkup=function(e){var t={"\\":"&#92;","&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#47;"};return"string"!=typeof e?e:String(e).replace(/[&<>"'\/\\]/g,function(e){return t[e]})},r.appendMany=function(e,t){if("1.7"===o.fn.jquery.substr(0,3)){var n=o();o.map(t,function(e){n=n.add(e)}),t=n}e.append(t)},r.__cache={};var n=0;return r.GetUniqueElementId=function(e){var t=e.getAttribute("data-select2-id");return null==t&&(e.id?(t=e.id,e.setAttribute("data-select2-id",t)):(e.setAttribute("data-select2-id",++n),t=n.toString())),t},r.StoreData=function(e,t,n){var i=r.GetUniqueElementId(e);r.__cache[i]||(r.__cache[i]={}),r.__cache[i][t]=n},r.GetData=function(e,t){var n=r.GetUniqueElementId(e);return t?r.__cache[n]&&null!=r.__cache[n][t]?r.__cache[n][t]:o(e).data(t):r.__cache[n]},r.RemoveData=function(e){var t=r.GetUniqueElementId(e);null!=r.__cache[t]&&delete r.__cache[t],e.removeAttribute("data-select2-id")},r}),e.define("select2/results",["jquery","./utils"],function(h,f){function i(e,t,n){this.$element=e,this.data=n,this.options=t,i.__super__.constructor.call(this)}return f.Extend(i,f.Observable),i.prototype.render=function(){var e=h('<ul class="select2-results__options" role="listbox"></ul>');return this.options.get("multiple")&&e.attr("aria-multiselectable","true"),this.$results=e},i.prototype.clear=function(){this.$results.empty()},i.prototype.displayMessage=function(e){var t=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var n=h('<li role="alert" aria-live="assertive" class="select2-results__option"></li>'),i=this.options.get("translations").get(e.message);n.append(t(i(e.args))),n[0].className+=" select2-results__message",this.$results.append(n)},i.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},i.prototype.append=function(e){this.hideLoading();var t=[];if(null!=e.results&&0!==e.results.length){e.results=this.sort(e.results);for(var n=0;n<e.results.length;n++){var i=e.results[n],r=this.option(i);t.push(r)}this.$results.append(t)}else 0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"})},i.prototype.position=function(e,t){t.find(".select2-results").append(e)},i.prototype.sort=function(e){return this.options.get("sorter")(e)},i.prototype.highlightFirstItem=function(){var e=this.$results.find(".select2-results__option[aria-selected]"),t=e.filter("[aria-selected=true]");0<t.length?t.first().trigger("mouseenter"):e.first().trigger("mouseenter"),this.ensureHighlightVisible()},i.prototype.setClasses=function(){var t=this;this.data.current(function(e){var i=h.map(e,function(e){return e.id.toString()});t.$results.find(".select2-results__option[aria-selected]").each(function(){var e=h(this),t=f.GetData(this,"data"),n=""+t.id;null!=t.element&&t.element.selected||null==t.element&&-1<h.inArray(n,i)?e.attr("aria-selected","true"):e.attr("aria-selected","false")})})},i.prototype.showLoading=function(e){this.hideLoading();var t={disabled:!0,loading:!0,text:this.options.get("translations").get("searching")(e)},n=this.option(t);n.className+=" loading-results",this.$results.prepend(n)},i.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},i.prototype.option=function(e){var t=document.createElement("li");t.className="select2-results__option";var n={role:"option","aria-selected":"false"},i=window.Element.prototype.matches||window.Element.prototype.msMatchesSelector||window.Element.prototype.webkitMatchesSelector;for(var r in(null!=e.element&&i.call(e.element,":disabled")||null==e.element&&e.disabled)&&(delete n["aria-selected"],n["aria-disabled"]="true"),null==e.id&&delete n["aria-selected"],null!=e._resultId&&(t.id=e._resultId),e.title&&(t.title=e.title),e.children&&(n.role="group",n["aria-label"]=e.text,delete n["aria-selected"]),n){var o=n[r];t.setAttribute(r,o)}if(e.children){var s=h(t),a=document.createElement("strong");a.className="select2-results__group";h(a);this.template(e,a);for(var l=[],c=0;c<e.children.length;c++){var u=e.children[c],d=this.option(u);l.push(d)}var p=h("<ul></ul>",{class:"select2-results__options select2-results__options--nested"});p.append(l),s.append(a),s.append(p)}else this.template(e,t);return f.StoreData(t,"data",e),t},i.prototype.bind=function(t,e){var l=this,n=t.id+"-results";this.$results.attr("id",n),t.on("results:all",function(e){l.clear(),l.append(e.data),t.isOpen()&&(l.setClasses(),l.highlightFirstItem())}),t.on("results:append",function(e){l.append(e.data),t.isOpen()&&l.setClasses()}),t.on("query",function(e){l.hideMessages(),l.showLoading(e)}),t.on("select",function(){t.isOpen()&&(l.setClasses(),l.options.get("scrollAfterSelect")&&l.highlightFirstItem())}),t.on("unselect",function(){t.isOpen()&&(l.setClasses(),l.options.get("scrollAfterSelect")&&l.highlightFirstItem())}),t.on("open",function(){l.$results.attr("aria-expanded","true"),l.$results.attr("aria-hidden","false"),l.setClasses(),l.ensureHighlightVisible()}),t.on("close",function(){l.$results.attr("aria-expanded","false"),l.$results.attr("aria-hidden","true"),l.$results.removeAttr("aria-activedescendant")}),t.on("results:toggle",function(){var e=l.getHighlightedResults();0!==e.length&&e.trigger("mouseup")}),t.on("results:select",function(){var e=l.getHighlightedResults();if(0!==e.length){var t=f.GetData(e[0],"data");"true"==e.attr("aria-selected")?l.trigger("close",{}):l.trigger("select",{data:t})}}),t.on("results:previous",function(){var e=l.getHighlightedResults(),t=l.$results.find("[aria-selected]"),n=t.index(e);if(!(n<=0)){var i=n-1;0===e.length&&(i=0);var r=t.eq(i);r.trigger("mouseenter");var o=l.$results.offset().top,s=r.offset().top,a=l.$results.scrollTop()+(s-o);0===i?l.$results.scrollTop(0):s-o<0&&l.$results.scrollTop(a)}}),t.on("results:next",function(){var e=l.getHighlightedResults(),t=l.$results.find("[aria-selected]"),n=t.index(e)+1;if(!(n>=t.length)){var i=t.eq(n);i.trigger("mouseenter");var r=l.$results.offset().top+l.$results.outerHeight(!1),o=i.offset().top+i.outerHeight(!1),s=l.$results.scrollTop()+o-r;0===n?l.$results.scrollTop(0):r<o&&l.$results.scrollTop(s)}}),t.on("results:focus",function(e){e.element.addClass("select2-results__option--highlighted")}),t.on("results:message",function(e){l.displayMessage(e)}),h.fn.mousewheel&&this.$results.on("mousewheel",function(e){var t=l.$results.scrollTop(),n=l.$results.get(0).scrollHeight-t+e.deltaY,i=0<e.deltaY&&t-e.deltaY<=0,r=e.deltaY<0&&n<=l.$results.height();i?(l.$results.scrollTop(0),e.preventDefault(),e.stopPropagation()):r&&(l.$results.scrollTop(l.$results.get(0).scrollHeight-l.$results.height()),e.preventDefault(),e.stopPropagation())}),this.$results.on("mouseup",".select2-results__option[aria-selected]",function(e){var t=h(this),n=f.GetData(this,"data");"true"!==t.attr("aria-selected")?l.trigger("select",{originalEvent:e,data:n}):l.options.get("multiple")?l.trigger("unselect",{originalEvent:e,data:n}):l.trigger("close",{})}),this.$results.on("mouseenter",".select2-results__option[aria-selected]",function(e){var t=f.GetData(this,"data");l.getHighlightedResults().removeClass("select2-results__option--highlighted"),l.trigger("results:focus",{data:t,element:h(this)})})},i.prototype.getHighlightedResults=function(){return this.$results.find(".select2-results__option--highlighted")},i.prototype.destroy=function(){this.$results.remove()},i.prototype.ensureHighlightVisible=function(){var e=this.getHighlightedResults();if(0!==e.length){var t=this.$results.find("[aria-selected]").index(e),n=this.$results.offset().top,i=e.offset().top,r=this.$results.scrollTop()+(i-n),o=i-n;r-=2*e.outerHeight(!1),t<=2?this.$results.scrollTop(0):(o>this.$results.outerHeight()||o<0)&&this.$results.scrollTop(r)}},i.prototype.template=function(e,t){var n=this.options.get("templateResult"),i=this.options.get("escapeMarkup"),r=n(e,t);null==r?t.style.display="none":"string"==typeof r?t.innerHTML=i(r):h(t).append(r)},i}),e.define("select2/keys",[],function(){return{BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46}}),e.define("select2/selection/base",["jquery","../utils","../keys"],function(n,i,r){function o(e,t){this.$element=e,this.options=t,o.__super__.constructor.call(this)}return i.Extend(o,i.Observable),o.prototype.render=function(){var e=n('<span class="select2-selection" role="combobox"  aria-haspopup="true" aria-expanded="false"></span>');return this._tabindex=0,null!=i.GetData(this.$element[0],"old-tabindex")?this._tabindex=i.GetData(this.$element[0],"old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),e.attr("title",this.$element.attr("title")),e.attr("tabindex",this._tabindex),e.attr("aria-disabled","false"),this.$selection=e},o.prototype.bind=function(e,t){var n=this,i=e.id+"-results";this.container=e,this.$selection.on("focus",function(e){n.trigger("focus",e)}),this.$selection.on("blur",function(e){n._handleBlur(e)}),this.$selection.on("keydown",function(e){n.trigger("keypress",e),e.which===r.SPACE&&e.preventDefault()}),e.on("results:focus",function(e){n.$selection.attr("aria-activedescendant",e.data._resultId)}),e.on("selection:update",function(e){n.update(e.data)}),e.on("open",function(){n.$selection.attr("aria-expanded","true"),n.$selection.attr("aria-owns",i),n._attachCloseHandler(e)}),e.on("close",function(){n.$selection.attr("aria-expanded","false"),n.$selection.removeAttr("aria-activedescendant"),n.$selection.removeAttr("aria-owns"),n.$selection.trigger("focus"),n._detachCloseHandler(e)}),e.on("enable",function(){n.$selection.attr("tabindex",n._tabindex),n.$selection.attr("aria-disabled","false")}),e.on("disable",function(){n.$selection.attr("tabindex","-1"),n.$selection.attr("aria-disabled","true")})},o.prototype._handleBlur=function(e){var t=this;window.setTimeout(function(){document.activeElement==t.$selection[0]||n.contains(t.$selection[0],document.activeElement)||t.trigger("blur",e)},1)},o.prototype._attachCloseHandler=function(e){n(document.body).on("mousedown.select2."+e.id,function(e){var t=n(e.target).closest(".select2");n(".select2.select2-container--open").each(function(){this!=t[0]&&i.GetData(this,"element").select2("close")})})},o.prototype._detachCloseHandler=function(e){n(document.body).off("mousedown.select2."+e.id)},o.prototype.position=function(e,t){t.find(".selection").append(e)},o.prototype.destroy=function(){this._detachCloseHandler(this.container)},o.prototype.update=function(e){throw new Error("The `update` method must be defined in child classes.")},o.prototype.isEnabled=function(){return!this.isDisabled()},o.prototype.isDisabled=function(){return this.options.get("disabled")},o}),e.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(e,t,n,i){function r(){r.__super__.constructor.apply(this,arguments)}return n.Extend(r,t),r.prototype.render=function(){var e=r.__super__.render.call(this);return e.addClass("select2-selection--single"),e.html('<span class="select2-selection__rendered"></span><span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span>'),e},r.prototype.bind=function(t,e){var n=this;r.__super__.bind.apply(this,arguments);var i=t.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",i).attr("role","textbox").attr("aria-readonly","true"),this.$selection.attr("aria-labelledby",i),this.$selection.on("mousedown",function(e){1===e.which&&n.trigger("toggle",{originalEvent:e})}),this.$selection.on("focus",function(e){}),this.$selection.on("blur",function(e){}),t.on("focus",function(e){t.isOpen()||n.$selection.trigger("focus")})},r.prototype.clear=function(){var e=this.$selection.find(".select2-selection__rendered");e.empty(),e.removeAttr("title")},r.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},r.prototype.selectionContainer=function(){return e("<span></span>")},r.prototype.update=function(e){if(0!==e.length){var t=e[0],n=this.$selection.find(".select2-selection__rendered"),i=this.display(t,n);n.empty().append(i);var r=t.title||t.text;r?n.attr("title",r):n.removeAttr("title")}else this.clear()},r}),e.define("select2/selection/multiple",["jquery","./base","../utils"],function(r,e,l){function n(e,t){n.__super__.constructor.apply(this,arguments)}return l.Extend(n,e),n.prototype.render=function(){var e=n.__super__.render.call(this);return e.addClass("select2-selection--multiple"),e.html('<ul class="select2-selection__rendered"></ul>'),e},n.prototype.bind=function(e,t){var i=this;n.__super__.bind.apply(this,arguments),this.$selection.on("click",function(e){i.trigger("toggle",{originalEvent:e})}),this.$selection.on("click",".select2-selection__choice__remove",function(e){if(!i.isDisabled()){var t=r(this).parent(),n=l.GetData(t[0],"data");i.trigger("unselect",{originalEvent:e,data:n})}})},n.prototype.clear=function(){var e=this.$selection.find(".select2-selection__rendered");e.empty(),e.removeAttr("title")},n.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},n.prototype.selectionContainer=function(){return r('<li class="select2-selection__choice"><span class="select2-selection__choice__remove" role="presentation">&times;</span></li>')},n.prototype.update=function(e){if(this.clear(),0!==e.length){for(var t=[],n=0;n<e.length;n++){var i=e[n],r=this.selectionContainer(),o=this.display(i,r);r.append(o);var s=i.title||i.text;s&&r.attr("title",s),l.StoreData(r[0],"data",i),t.push(r)}var a=this.$selection.find(".select2-selection__rendered");l.appendMany(a,t)}},n}),e.define("select2/selection/placeholder",["../utils"],function(e){function t(e,t,n){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n)}return t.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t&&(t={id:"",text:t}),t},t.prototype.createPlaceholder=function(e,t){var n=this.selectionContainer();return n.html(this.display(t)),n.addClass("select2-selection__placeholder").removeClass("select2-selection__choice"),n},t.prototype.update=function(e,t){var n=1==t.length&&t[0].id!=this.placeholder.id;if(1<t.length||n)return e.call(this,t);this.clear();var i=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(i)},t}),e.define("select2/selection/allowClear",["jquery","../keys","../utils"],function(r,i,a){function e(){}return e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".select2-selection__clear",function(e){i._handleClear(e)}),t.on("keypress",function(e){i._handleKeyboardClear(e,t)})},e.prototype._handleClear=function(e,t){if(!this.isDisabled()){var n=this.$selection.find(".select2-selection__clear");if(0!==n.length){t.stopPropagation();var i=a.GetData(n[0],"data"),r=this.$element.val();this.$element.val(this.placeholder.id);var o={data:i};if(this.trigger("clear",o),o.prevented)this.$element.val(r);else{for(var s=0;s<i.length;s++)if(o={data:i[s]},this.trigger("unselect",o),o.prevented)return void this.$element.val(r);this.$element.trigger("input").trigger("change"),this.trigger("toggle",{})}}}},e.prototype._handleKeyboardClear=function(e,t,n){n.isOpen()||t.which!=i.DELETE&&t.which!=i.BACKSPACE||this._handleClear(t)},e.prototype.update=function(e,t){if(e.call(this,t),!(0<this.$selection.find(".select2-selection__placeholder").length||0===t.length)){var n=this.options.get("translations").get("removeAllItems"),i=r('<span class="select2-selection__clear" title="'+n()+'">&times;</span>');a.StoreData(i[0],"data",t),this.$selection.find(".select2-selection__rendered").prepend(i)}},e}),e.define("select2/selection/search",["jquery","../utils","../keys"],function(i,a,l){function e(e,t,n){e.call(this,t,n)}return e.prototype.render=function(e){var t=i('<li class="select2-search select2-search--inline"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="none" spellcheck="false" role="searchbox" aria-autocomplete="list" /></li>');this.$searchContainer=t,this.$search=t.find("input");var n=e.call(this);return this._transferTabIndex(),n},e.prototype.bind=function(e,t,n){var i=this,r=t.id+"-results";e.call(this,t,n),t.on("open",function(){i.$search.attr("aria-controls",r),i.$search.trigger("focus")}),t.on("close",function(){i.$search.val(""),i.$search.removeAttr("aria-controls"),i.$search.removeAttr("aria-activedescendant"),i.$search.trigger("focus")}),t.on("enable",function(){i.$search.prop("disabled",!1),i._transferTabIndex()}),t.on("disable",function(){i.$search.prop("disabled",!0)}),t.on("focus",function(e){i.$search.trigger("focus")}),t.on("results:focus",function(e){e.data._resultId?i.$search.attr("aria-activedescendant",e.data._resultId):i.$search.removeAttr("aria-activedescendant")}),this.$selection.on("focusin",".select2-search--inline",function(e){i.trigger("focus",e)}),this.$selection.on("focusout",".select2-search--inline",function(e){i._handleBlur(e)}),this.$selection.on("keydown",".select2-search--inline",function(e){if(e.stopPropagation(),i.trigger("keypress",e),i._keyUpPrevented=e.isDefaultPrevented(),e.which===l.BACKSPACE&&""===i.$search.val()){var t=i.$searchContainer.prev(".select2-selection__choice");if(0<t.length){var n=a.GetData(t[0],"data");i.searchRemoveChoice(n),e.preventDefault()}}}),this.$selection.on("click",".select2-search--inline",function(e){i.$search.val()&&e.stopPropagation()});var o=document.documentMode,s=o&&o<=11;this.$selection.on("input.searchcheck",".select2-search--inline",function(e){s?i.$selection.off("input.search input.searchcheck"):i.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".select2-search--inline",function(e){if(s&&"input"===e.type)i.$selection.off("input.search input.searchcheck");else{var t=e.which;t!=l.SHIFT&&t!=l.CTRL&&t!=l.ALT&&t!=l.TAB&&i.handleSearch(e)}})},e.prototype._transferTabIndex=function(e){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},e.prototype.createPlaceholder=function(e,t){this.$search.attr("placeholder",t.text)},e.prototype.update=function(e,t){var n=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),e.call(this,t),this.$selection.find(".select2-selection__rendered").append(this.$searchContainer),this.resizeSearch(),n&&this.$search.trigger("focus")},e.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var e=this.$search.val();this.trigger("query",{term:e})}this._keyUpPrevented=!1},e.prototype.searchRemoveChoice=function(e,t){this.trigger("unselect",{data:t}),this.$search.val(t.text),this.handleSearch()},e.prototype.resizeSearch=function(){this.$search.css("width","25px");var e="";""!==this.$search.attr("placeholder")?e=this.$selection.find(".select2-selection__rendered").width():e=.75*(this.$search.val().length+1)+"em";this.$search.css("width",e)},e}),e.define("select2/selection/eventRelay",["jquery"],function(s){function e(){}return e.prototype.bind=function(e,t,n){var i=this,r=["open","opening","close","closing","select","selecting","unselect","unselecting","clear","clearing"],o=["opening","closing","selecting","unselecting","clearing"];e.call(this,t,n),t.on("*",function(e,t){if(-1!==s.inArray(e,r)){t=t||{};var n=s.Event("select2:"+e,{params:t});i.$element.trigger(n),-1!==s.inArray(e,o)&&(t.prevented=n.isDefaultPrevented())}})},e}),e.define("select2/translation",["jquery","require"],function(t,n){function i(e){this.dict=e||{}}return i.prototype.all=function(){return this.dict},i.prototype.get=function(e){return this.dict[e]},i.prototype.extend=function(e){this.dict=t.extend({},e.all(),this.dict)},i._cache={},i.loadPath=function(e){if(!(e in i._cache)){var t=n(e);i._cache[e]=t}return new i(i._cache[e])},i}),e.define("select2/diacritics",[],function(){return{"Ⓐ":"A","Ａ":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","Ｂ":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","Ｃ":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","Ｄ":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","Ǳ":"DZ","Ǆ":"DZ","ǲ":"Dz","ǅ":"Dz","Ⓔ":"E","Ｅ":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","Ｆ":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","Ｇ":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","Ｈ":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","Ｉ":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","Ｊ":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","Ｋ":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","Ｌ":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","Ǉ":"LJ","ǈ":"Lj","Ⓜ":"M","Ｍ":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","Ｎ":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","Ǌ":"NJ","ǋ":"Nj","Ⓞ":"O","Ｏ":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Œ":"OE","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","Ｐ":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Ｑ":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","Ｒ":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","Ｓ":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","Ｔ":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","Ｕ":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","Ｖ":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","Ｗ":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","Ｘ":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Ｙ":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Ｚ":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","ａ":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","ｂ":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","ｃ":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","ｄ":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","ǳ":"dz","ǆ":"dz","ⓔ":"e","ｅ":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","ｆ":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","ｇ":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","ｈ":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","ｉ":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","ｊ":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","ｋ":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","ｌ":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","ǉ":"lj","ⓜ":"m","ｍ":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","ｎ":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ŉ":"n","ꞑ":"n","ꞥ":"n","ǌ":"nj","ⓞ":"o","ｏ":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","œ":"oe","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","ｐ":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","ｑ":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","ｒ":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","ｓ":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","ｔ":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","ｕ":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","ｖ":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","ｗ":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","ｘ":"x","ẋ":"x","ẍ":"x","ⓨ":"y","ｙ":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","ｚ":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ώ":"ω","ς":"σ","’":"'"}}),e.define("select2/data/base",["../utils"],function(i){function n(e,t){n.__super__.constructor.call(this)}return i.Extend(n,i.Observable),n.prototype.current=function(e){throw new Error("The `current` method must be defined in child classes.")},n.prototype.query=function(e,t){throw new Error("The `query` method must be defined in child classes.")},n.prototype.bind=function(e,t){},n.prototype.destroy=function(){},n.prototype.generateResultId=function(e,t){var n=e.id+"-result-";return n+=i.generateChars(4),null!=t.id?n+="-"+t.id.toString():n+="-"+i.generateChars(4),n},n}),e.define("select2/data/select",["./base","../utils","jquery"],function(e,a,l){function n(e,t){this.$element=e,this.options=t,n.__super__.constructor.call(this)}return a.Extend(n,e),n.prototype.current=function(e){var n=[],i=this;this.$element.find(":selected").each(function(){var e=l(this),t=i.item(e);n.push(t)}),e(n)},n.prototype.select=function(r){var o=this;if(r.selected=!0,l(r.element).is("option"))return r.element.selected=!0,void this.$element.trigger("input").trigger("change");if(this.$element.prop("multiple"))this.current(function(e){var t=[];(r=[r]).push.apply(r,e);for(var n=0;n<r.length;n++){var i=r[n].id;-1===l.inArray(i,t)&&t.push(i)}o.$element.val(t),o.$element.trigger("input").trigger("change")});else{var e=r.id;this.$element.val(e),this.$element.trigger("input").trigger("change")}},n.prototype.unselect=function(r){var o=this;if(this.$element.prop("multiple")){if(r.selected=!1,l(r.element).is("option"))return r.element.selected=!1,void this.$element.trigger("input").trigger("change");this.current(function(e){for(var t=[],n=0;n<e.length;n++){var i=e[n].id;i!==r.id&&-1===l.inArray(i,t)&&t.push(i)}o.$element.val(t),o.$element.trigger("input").trigger("change")})}},n.prototype.bind=function(e,t){var n=this;(this.container=e).on("select",function(e){n.select(e.data)}),e.on("unselect",function(e){n.unselect(e.data)})},n.prototype.destroy=function(){this.$element.find("*").each(function(){a.RemoveData(this)})},n.prototype.query=function(i,e){var r=[],o=this;this.$element.children().each(function(){var e=l(this);if(e.is("option")||e.is("optgroup")){var t=o.item(e),n=o.matches(i,t);null!==n&&r.push(n)}}),e({results:r})},n.prototype.addOptions=function(e){a.appendMany(this.$element,e)},n.prototype.option=function(e){var t;e.children?(t=document.createElement("optgroup")).label=e.text:void 0!==(t=document.createElement("option")).textContent?t.textContent=e.text:t.innerText=e.text,void 0!==e.id&&(t.value=e.id),e.disabled&&(t.disabled=!0),e.selected&&(t.selected=!0),e.title&&(t.title=e.title);var n=l(t),i=this._normalizeItem(e);return i.element=t,a.StoreData(t,"data",i),n},n.prototype.item=function(e){var t={};if(null!=(t=a.GetData(e[0],"data")))return t;if(e.is("option"))t={id:e.val(),text:e.text(),disabled:e.prop("disabled"),selected:e.prop("selected"),title:e.prop("title")};else if(e.is("optgroup")){t={text:e.prop("label"),children:[],title:e.prop("title")};for(var n=e.children("option"),i=[],r=0;r<n.length;r++){var o=l(n[r]),s=this.item(o);i.push(s)}t.children=i}return(t=this._normalizeItem(t)).element=e[0],a.StoreData(e[0],"data",t),t},n.prototype._normalizeItem=function(e){e!==Object(e)&&(e={id:e,text:e});return null!=(e=l.extend({},{text:""},e)).id&&(e.id=e.id.toString()),null!=e.text&&(e.text=e.text.toString()),null==e._resultId&&e.id&&null!=this.container&&(e._resultId=this.generateResultId(this.container,e)),l.extend({},{selected:!1,disabled:!1},e)},n.prototype.matches=function(e,t){return this.options.get("matcher")(e,t)},n}),e.define("select2/data/array",["./select","../utils","jquery"],function(e,f,g){function i(e,t){this._dataToConvert=t.get("data")||[],i.__super__.constructor.call(this,e,t)}return f.Extend(i,e),i.prototype.bind=function(e,t){i.__super__.bind.call(this,e,t),this.addOptions(this.convertToOptions(this._dataToConvert))},i.prototype.select=function(n){var e=this.$element.find("option").filter(function(e,t){return t.value==n.id.toString()});0===e.length&&(e=this.option(n),this.addOptions(e)),i.__super__.select.call(this,n)},i.prototype.convertToOptions=function(e){var t=this,n=this.$element.find("option"),i=n.map(function(){return t.item(g(this)).id}).get(),r=[];function o(e){return function(){return g(this).val()==e.id}}for(var s=0;s<e.length;s++){var a=this._normalizeItem(e[s]);if(0<=g.inArray(a.id,i)){var l=n.filter(o(a)),c=this.item(l),u=g.extend(!0,{},a,c),d=this.option(u);l.replaceWith(d)}else{var p=this.option(a);if(a.children){var h=this.convertToOptions(a.children);f.appendMany(p,h)}r.push(p)}}return r},i}),e.define("select2/data/ajax",["./array","../utils","jquery"],function(e,t,o){function n(e,t){this.ajaxOptions=this._applyDefaults(t.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),n.__super__.constructor.call(this,e,t)}return t.Extend(n,e),n.prototype._applyDefaults=function(e){var t={data:function(e){return o.extend({},e,{q:e.term})},transport:function(e,t,n){var i=o.ajax(e);return i.then(t),i.fail(n),i}};return o.extend({},t,e,!0)},n.prototype.processResults=function(e){return e},n.prototype.query=function(n,i){var r=this;null!=this._request&&(o.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var t=o.extend({type:"GET"},this.ajaxOptions);function e(){var e=t.transport(t,function(e){var t=r.processResults(e,n);r.options.get("debug")&&window.console&&console.error&&(t&&t.results&&o.isArray(t.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),i(t)},function(){"status"in e&&(0===e.status||"0"===e.status)||r.trigger("results:message",{message:"errorLoading"})});r._request=e}"function"==typeof t.url&&(t.url=t.url.call(this.$element,n)),"function"==typeof t.data&&(t.data=t.data.call(this.$element,n)),this.ajaxOptions.delay&&null!=n.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(e,this.ajaxOptions.delay)):e()},n}),e.define("select2/data/tags",["jquery"],function(u){function e(e,t,n){var i=n.get("tags"),r=n.get("createTag");void 0!==r&&(this.createTag=r);var o=n.get("insertTag");if(void 0!==o&&(this.insertTag=o),e.call(this,t,n),u.isArray(i))for(var s=0;s<i.length;s++){var a=i[s],l=this._normalizeItem(a),c=this.option(l);this.$element.append(c)}}return e.prototype.query=function(e,c,u){var d=this;this._removeOldTags(),null!=c.term&&null==c.page?e.call(this,c,function e(t,n){for(var i=t.results,r=0;r<i.length;r++){var o=i[r],s=null!=o.children&&!e({results:o.children},!0);if((o.text||"").toUpperCase()===(c.term||"").toUpperCase()||s)return!n&&(t.data=i,void u(t))}if(n)return!0;var a=d.createTag(c);if(null!=a){var l=d.option(a);l.attr("data-select2-tag",!0),d.addOptions([l]),d.insertTag(i,a)}t.results=i,u(t)}):e.call(this,c,u)},e.prototype.createTag=function(e,t){var n=u.trim(t.term);return""===n?null:{id:n,text:n}},e.prototype.insertTag=function(e,t,n){t.unshift(n)},e.prototype._removeOldTags=function(e){this.$element.find("option[data-select2-tag]").each(function(){this.selected||u(this).remove()})},e}),e.define("select2/data/tokenizer",["jquery"],function(d){function e(e,t,n){var i=n.get("tokenizer");void 0!==i&&(this.tokenizer=i),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){e.call(this,t,n),this.$search=t.dropdown.$search||t.selection.$search||n.find(".select2-search__field")},e.prototype.query=function(e,t,n){var i=this;t.term=t.term||"";var r=this.tokenizer(t,this.options,function(e){var t=i._normalizeItem(e);if(!i.$element.find("option").filter(function(){return d(this).val()===t.id}).length){var n=i.option(t);n.attr("data-select2-tag",!0),i._removeOldTags(),i.addOptions([n])}!function(e){i.trigger("select",{data:e})}(t)});r.term!==t.term&&(this.$search.length&&(this.$search.val(r.term),this.$search.trigger("focus")),t.term=r.term),e.call(this,t,n)},e.prototype.tokenizer=function(e,t,n,i){for(var r=n.get("tokenSeparators")||[],o=t.term,s=0,a=this.createTag||function(e){return{id:e.term,text:e.term}};s<o.length;){var l=o[s];if(-1!==d.inArray(l,r)){var c=o.substr(0,s),u=a(d.extend({},t,{term:c}));null!=u?(i(u),o=o.substr(s+1)||"",s=0):s++}else s++}return{term:o}},e}),e.define("select2/data/minimumInputLength",[],function(){function e(e,t,n){this.minimumInputLength=n.get("minimumInputLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){t.term=t.term||"",t.term.length<this.minimumInputLength?this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:t.term,params:t}}):e.call(this,t,n)},e}),e.define("select2/data/maximumInputLength",[],function(){function e(e,t,n){this.maximumInputLength=n.get("maximumInputLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){t.term=t.term||"",0<this.maximumInputLength&&t.term.length>this.maximumInputLength?this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:t.term,params:t}}):e.call(this,t,n)},e}),e.define("select2/data/maximumSelectionLength",[],function(){function e(e,t,n){this.maximumSelectionLength=n.get("maximumSelectionLength"),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("select",function(){i._checkIfMaximumSelected()})},e.prototype.query=function(e,t,n){var i=this;this._checkIfMaximumSelected(function(){e.call(i,t,n)})},e.prototype._checkIfMaximumSelected=function(e,n){var i=this;this.current(function(e){var t=null!=e?e.length:0;0<i.maximumSelectionLength&&t>=i.maximumSelectionLength?i.trigger("results:message",{message:"maximumSelected",args:{maximum:i.maximumSelectionLength}}):n&&n()})},e}),e.define("select2/dropdown",["jquery","./utils"],function(t,e){function n(e,t){this.$element=e,this.options=t,n.__super__.constructor.call(this)}return e.Extend(n,e.Observable),n.prototype.render=function(){var e=t('<span class="select2-dropdown"><span class="select2-results"></span></span>');return e.attr("dir",this.options.get("dir")),this.$dropdown=e},n.prototype.bind=function(){},n.prototype.position=function(e,t){},n.prototype.destroy=function(){this.$dropdown.remove()},n}),e.define("select2/dropdown/search",["jquery","../utils"],function(o,e){function t(){}return t.prototype.render=function(e){var t=e.call(this),n=o('<span class="select2-search select2-search--dropdown"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="none" spellcheck="false" role="searchbox" aria-autocomplete="list" /></span>');return this.$searchContainer=n,this.$search=n.find("input"),t.prepend(n),t},t.prototype.bind=function(e,t,n){var i=this,r=t.id+"-results";e.call(this,t,n),this.$search.on("keydown",function(e){i.trigger("keypress",e),i._keyUpPrevented=e.isDefaultPrevented()}),this.$search.on("input",function(e){o(this).off("keyup")}),this.$search.on("keyup input",function(e){i.handleSearch(e)}),t.on("open",function(){i.$search.attr("tabindex",0),i.$search.attr("aria-controls",r),i.$search.trigger("focus"),window.setTimeout(function(){i.$search.trigger("focus")},0)}),t.on("close",function(){i.$search.attr("tabindex",-1),i.$search.removeAttr("aria-controls"),i.$search.removeAttr("aria-activedescendant"),i.$search.val(""),i.$search.trigger("blur")}),t.on("focus",function(){t.isOpen()||i.$search.trigger("focus")}),t.on("results:all",function(e){null!=e.query.term&&""!==e.query.term||(i.showSearch(e)?i.$searchContainer.removeClass("select2-search--hide"):i.$searchContainer.addClass("select2-search--hide"))}),t.on("results:focus",function(e){e.data._resultId?i.$search.attr("aria-activedescendant",e.data._resultId):i.$search.removeAttr("aria-activedescendant")})},t.prototype.handleSearch=function(e){if(!this._keyUpPrevented){var t=this.$search.val();this.trigger("query",{term:t})}this._keyUpPrevented=!1},t.prototype.showSearch=function(e,t){return!0},t}),e.define("select2/dropdown/hidePlaceholder",[],function(){function e(e,t,n,i){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n,i)}return e.prototype.append=function(e,t){t.results=this.removePlaceholder(t.results),e.call(this,t)},e.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t&&(t={id:"",text:t}),t},e.prototype.removePlaceholder=function(e,t){for(var n=t.slice(0),i=t.length-1;0<=i;i--){var r=t[i];this.placeholder.id===r.id&&n.splice(i,1)}return n},e}),e.define("select2/dropdown/infiniteScroll",["jquery"],function(n){function e(e,t,n,i){this.lastParams={},e.call(this,t,n,i),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return e.prototype.append=function(e,t){this.$loadingMore.remove(),this.loading=!1,e.call(this,t),this.showLoadingMore(t)&&(this.$results.append(this.$loadingMore),this.loadMoreIfNeeded())},e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("query",function(e){i.lastParams=e,i.loading=!0}),t.on("query:append",function(e){i.lastParams=e,i.loading=!0}),this.$results.on("scroll",this.loadMoreIfNeeded.bind(this))},e.prototype.loadMoreIfNeeded=function(){var e=n.contains(document.documentElement,this.$loadingMore[0]);if(!this.loading&&e){var t=this.$results.offset().top+this.$results.outerHeight(!1);this.$loadingMore.offset().top+this.$loadingMore.outerHeight(!1)<=t+50&&this.loadMore()}},e.prototype.loadMore=function(){this.loading=!0;var e=n.extend({},{page:1},this.lastParams);e.page++,this.trigger("query:append",e)},e.prototype.showLoadingMore=function(e,t){return t.pagination&&t.pagination.more},e.prototype.createLoadingMore=function(){var e=n('<li class="select2-results__option select2-results__option--load-more"role="option" aria-disabled="true"></li>'),t=this.options.get("translations").get("loadingMore");return e.html(t(this.lastParams)),e},e}),e.define("select2/dropdown/attachBody",["jquery","../utils"],function(f,a){function e(e,t,n){this.$dropdownParent=f(n.get("dropdownParent")||document.body),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("open",function(){i._showDropdown(),i._attachPositioningHandler(t),i._bindContainerResultHandlers(t)}),t.on("close",function(){i._hideDropdown(),i._detachPositioningHandler(t)}),this.$dropdownContainer.on("mousedown",function(e){e.stopPropagation()})},e.prototype.destroy=function(e){e.call(this),this.$dropdownContainer.remove()},e.prototype.position=function(e,t,n){t.attr("class",n.attr("class")),t.removeClass("select2"),t.addClass("select2-container--open"),t.css({position:"absolute",top:-999999}),this.$container=n},e.prototype.render=function(e){var t=f("<span></span>"),n=e.call(this);return t.append(n),this.$dropdownContainer=t},e.prototype._hideDropdown=function(e){this.$dropdownContainer.detach()},e.prototype._bindContainerResultHandlers=function(e,t){if(!this._containerResultsHandlersBound){var n=this;t.on("results:all",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("results:append",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("results:message",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("select",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("unselect",function(){n._positionDropdown(),n._resizeDropdown()}),this._containerResultsHandlersBound=!0}},e.prototype._attachPositioningHandler=function(e,t){var n=this,i="scroll.select2."+t.id,r="resize.select2."+t.id,o="orientationchange.select2."+t.id,s=this.$container.parents().filter(a.hasScroll);s.each(function(){a.StoreData(this,"select2-scroll-position",{x:f(this).scrollLeft(),y:f(this).scrollTop()})}),s.on(i,function(e){var t=a.GetData(this,"select2-scroll-position");f(this).scrollTop(t.y)}),f(window).on(i+" "+r+" "+o,function(e){n._positionDropdown(),n._resizeDropdown()})},e.prototype._detachPositioningHandler=function(e,t){var n="scroll.select2."+t.id,i="resize.select2."+t.id,r="orientationchange.select2."+t.id;this.$container.parents().filter(a.hasScroll).off(n),f(window).off(n+" "+i+" "+r)},e.prototype._positionDropdown=function(){var e=f(window),t=this.$dropdown.hasClass("select2-dropdown--above"),n=this.$dropdown.hasClass("select2-dropdown--below"),i=null,r=this.$container.offset();r.bottom=r.top+this.$container.outerHeight(!1);var o={height:this.$container.outerHeight(!1)};o.top=r.top,o.bottom=r.top+o.height;var s=this.$dropdown.outerHeight(!1),a=e.scrollTop(),l=e.scrollTop()+e.height(),c=a<r.top-s,u=l>r.bottom+s,d={left:r.left,top:o.bottom},p=this.$dropdownParent;"static"===p.css("position")&&(p=p.offsetParent());var h={top:0,left:0};(f.contains(document.body,p[0])||p[0].isConnected)&&(h=p.offset()),d.top-=h.top,d.left-=h.left,t||n||(i="below"),u||!c||t?!c&&u&&t&&(i="below"):i="above",("above"==i||t&&"below"!==i)&&(d.top=o.top-h.top-s),null!=i&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+i),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+i)),this.$dropdownContainer.css(d)},e.prototype._resizeDropdown=function(){var e={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(e.minWidth=e.width,e.position="relative",e.width="auto"),this.$dropdown.css(e)},e.prototype._showDropdown=function(e){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},e}),e.define("select2/dropdown/minimumResultsForSearch",[],function(){function e(e,t,n,i){this.minimumResultsForSearch=n.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),e.call(this,t,n,i)}return e.prototype.showSearch=function(e,t){return!(function e(t){for(var n=0,i=0;i<t.length;i++){var r=t[i];r.children?n+=e(r.children):n++}return n}(t.data.results)<this.minimumResultsForSearch)&&e.call(this,t)},e}),e.define("select2/dropdown/selectOnClose",["../utils"],function(o){function e(){}return e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("close",function(e){i._handleSelectOnClose(e)})},e.prototype._handleSelectOnClose=function(e,t){if(t&&null!=t.originalSelect2Event){var n=t.originalSelect2Event;if("select"===n._type||"unselect"===n._type)return}var i=this.getHighlightedResults();if(!(i.length<1)){var r=o.GetData(i[0],"data");null!=r.element&&r.element.selected||null==r.element&&r.selected||this.trigger("select",{data:r})}},e}),e.define("select2/dropdown/closeOnSelect",[],function(){function e(){}return e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("select",function(e){i._selectTriggered(e)}),t.on("unselect",function(e){i._selectTriggered(e)})},e.prototype._selectTriggered=function(e,t){var n=t.originalEvent;n&&(n.ctrlKey||n.metaKey)||this.trigger("close",{originalEvent:n,originalSelect2Event:t})},e}),e.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Please delete "+t+" character";return 1!=t&&(n+="s"),n},inputTooShort:function(e){return"Please enter "+(e.minimum-e.input.length)+" or more characters"},loadingMore:function(){return"Loading more results…"},maximumSelected:function(e){var t="You can only select "+e.maximum+" item";return 1!=e.maximum&&(t+="s"),t},noResults:function(){return"No results found"},searching:function(){return"Searching…"},removeAllItems:function(){return"Remove all items"}}}),e.define("select2/defaults",["jquery","require","./results","./selection/single","./selection/multiple","./selection/placeholder","./selection/allowClear","./selection/search","./selection/eventRelay","./utils","./translation","./diacritics","./data/select","./data/array","./data/ajax","./data/tags","./data/tokenizer","./data/minimumInputLength","./data/maximumInputLength","./data/maximumSelectionLength","./dropdown","./dropdown/search","./dropdown/hidePlaceholder","./dropdown/infiniteScroll","./dropdown/attachBody","./dropdown/minimumResultsForSearch","./dropdown/selectOnClose","./dropdown/closeOnSelect","./i18n/en"],function(c,u,d,p,h,f,g,m,v,y,s,t,_,w,$,b,A,x,D,S,C,E,O,T,q,j,L,I,e){function n(){this.reset()}return n.prototype.apply=function(e){if(null==(e=c.extend(!0,{},this.defaults,e)).dataAdapter){if(null!=e.ajax?e.dataAdapter=$:null!=e.data?e.dataAdapter=w:e.dataAdapter=_,0<e.minimumInputLength&&(e.dataAdapter=y.Decorate(e.dataAdapter,x)),0<e.maximumInputLength&&(e.dataAdapter=y.Decorate(e.dataAdapter,D)),0<e.maximumSelectionLength&&(e.dataAdapter=y.Decorate(e.dataAdapter,S)),e.tags&&(e.dataAdapter=y.Decorate(e.dataAdapter,b)),null==e.tokenSeparators&&null==e.tokenizer||(e.dataAdapter=y.Decorate(e.dataAdapter,A)),null!=e.query){var t=u(e.amdBase+"compat/query");e.dataAdapter=y.Decorate(e.dataAdapter,t)}if(null!=e.initSelection){var n=u(e.amdBase+"compat/initSelection");e.dataAdapter=y.Decorate(e.dataAdapter,n)}}if(null==e.resultsAdapter&&(e.resultsAdapter=d,null!=e.ajax&&(e.resultsAdapter=y.Decorate(e.resultsAdapter,T)),null!=e.placeholder&&(e.resultsAdapter=y.Decorate(e.resultsAdapter,O)),e.selectOnClose&&(e.resultsAdapter=y.Decorate(e.resultsAdapter,L))),null==e.dropdownAdapter){if(e.multiple)e.dropdownAdapter=C;else{var i=y.Decorate(C,E);e.dropdownAdapter=i}if(0!==e.minimumResultsForSearch&&(e.dropdownAdapter=y.Decorate(e.dropdownAdapter,j)),e.closeOnSelect&&(e.dropdownAdapter=y.Decorate(e.dropdownAdapter,I)),null!=e.dropdownCssClass||null!=e.dropdownCss||null!=e.adaptDropdownCssClass){var r=u(e.amdBase+"compat/dropdownCss");e.dropdownAdapter=y.Decorate(e.dropdownAdapter,r)}e.dropdownAdapter=y.Decorate(e.dropdownAdapter,q)}if(null==e.selectionAdapter){if(e.multiple?e.selectionAdapter=h:e.selectionAdapter=p,null!=e.placeholder&&(e.selectionAdapter=y.Decorate(e.selectionAdapter,f)),e.allowClear&&(e.selectionAdapter=y.Decorate(e.selectionAdapter,g)),e.multiple&&(e.selectionAdapter=y.Decorate(e.selectionAdapter,m)),null!=e.containerCssClass||null!=e.containerCss||null!=e.adaptContainerCssClass){var o=u(e.amdBase+"compat/containerCss");e.selectionAdapter=y.Decorate(e.selectionAdapter,o)}e.selectionAdapter=y.Decorate(e.selectionAdapter,v)}e.language=this._resolveLanguage(e.language),e.language.push("en");for(var s=[],a=0;a<e.language.length;a++){var l=e.language[a];-1===s.indexOf(l)&&s.push(l)}return e.language=s,e.translations=this._processTranslations(e.language,e.debug),e},n.prototype.reset=function(){function a(e){return e.replace(/[^\u0000-\u007E]/g,function(e){return t[e]||e})}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:y.escapeMarkup,language:{},matcher:function e(t,n){if(""===c.trim(t.term))return n;if(n.children&&0<n.children.length){for(var i=c.extend(!0,{},n),r=n.children.length-1;0<=r;r--)null==e(t,n.children[r])&&i.children.splice(r,1);return 0<i.children.length?i:e(t,i)}var o=a(n.text).toUpperCase(),s=a(t.term).toUpperCase();return-1<o.indexOf(s)?n:null},minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,scrollAfterSelect:!1,sorter:function(e){return e},templateResult:function(e){return e.text},templateSelection:function(e){return e.text},theme:"default",width:"resolve"}},n.prototype.applyFromElement=function(e,t){var n=e.language,i=this.defaults.language,r=t.prop("lang"),o=t.closest("[lang]").prop("lang"),s=Array.prototype.concat.call(this._resolveLanguage(r),this._resolveLanguage(n),this._resolveLanguage(i),this._resolveLanguage(o));return e.language=s,e},n.prototype._resolveLanguage=function(e){if(!e)return[];if(c.isEmptyObject(e))return[];if(c.isPlainObject(e))return[e];var t;t=c.isArray(e)?e:[e];for(var n=[],i=0;i<t.length;i++)if(n.push(t[i]),"string"==typeof t[i]&&0<t[i].indexOf("-")){var r=t[i].split("-")[0];n.push(r)}return n},n.prototype._processTranslations=function(e,t){for(var n=new s,i=0;i<e.length;i++){var r=new s,o=e[i];if("string"==typeof o)try{r=s.loadPath(o)}catch(e){try{o=this.defaults.amdLanguageBase+o,r=s.loadPath(o)}catch(e){t&&window.console&&console.warn&&console.warn('Select2: The language file for "'+o+'" could not be automatically loaded. A fallback will be used instead.')}}else r=c.isPlainObject(o)?new s(o):o;n.extend(r)}return n},n.prototype.set=function(e,t){var n={};n[c.camelCase(e)]=t;var i=y._convertData(n);c.extend(!0,this.defaults,i)},new n}),e.define("select2/options",["require","jquery","./defaults","./utils"],function(i,d,r,p){function e(e,t){if(this.options=e,null!=t&&this.fromElement(t),null!=t&&(this.options=r.applyFromElement(this.options,t)),this.options=r.apply(this.options),t&&t.is("input")){var n=i(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=p.Decorate(this.options.dataAdapter,n)}}return e.prototype.fromElement=function(e){var t=["select2"];null==this.options.multiple&&(this.options.multiple=e.prop("multiple")),null==this.options.disabled&&(this.options.disabled=e.prop("disabled")),null==this.options.dir&&(e.prop("dir")?this.options.dir=e.prop("dir"):e.closest("[dir]").prop("dir")?this.options.dir=e.closest("[dir]").prop("dir"):this.options.dir="ltr"),e.prop("disabled",this.options.disabled),e.prop("multiple",this.options.multiple),p.GetData(e[0],"select2Tags")&&(this.options.debug&&window.console&&console.warn&&console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'),p.StoreData(e[0],"data",p.GetData(e[0],"select2Tags")),p.StoreData(e[0],"tags",!0)),p.GetData(e[0],"ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2."),e.attr("ajax--url",p.GetData(e[0],"ajaxUrl")),p.StoreData(e[0],"ajax-Url",p.GetData(e[0],"ajaxUrl")));var n={};function i(e,t){return t.toUpperCase()}for(var r=0;r<e[0].attributes.length;r++){var o=e[0].attributes[r].name,s="data-";if(o.substr(0,s.length)==s){var a=o.substring(s.length),l=p.GetData(e[0],a);n[a.replace(/-([a-z])/g,i)]=l}}d.fn.jquery&&"1."==d.fn.jquery.substr(0,2)&&e[0].dataset&&(n=d.extend(!0,{},e[0].dataset,n));var c=d.extend(!0,{},p.GetData(e[0]),n);for(var u in c=p._convertData(c))-1<d.inArray(u,t)||(d.isPlainObject(this.options[u])?d.extend(this.options[u],c[u]):this.options[u]=c[u]);return this},e.prototype.get=function(e){return this.options[e]},e.prototype.set=function(e,t){this.options[e]=t},e}),e.define("select2/core",["jquery","./options","./utils","./keys"],function(o,c,u,i){var d=function(e,t){null!=u.GetData(e[0],"select2")&&u.GetData(e[0],"select2").destroy(),this.$element=e,this.id=this._generateId(e),t=t||{},this.options=new c(t,e),d.__super__.constructor.call(this);var n=e.attr("tabindex")||0;u.StoreData(e[0],"old-tabindex",n),e.attr("tabindex","-1");var i=this.options.get("dataAdapter");this.dataAdapter=new i(e,this.options);var r=this.render();this._placeContainer(r);var o=this.options.get("selectionAdapter");this.selection=new o(e,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,r);var s=this.options.get("dropdownAdapter");this.dropdown=new s(e,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,r);var a=this.options.get("resultsAdapter");this.results=new a(e,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var l=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(e){l.trigger("selection:update",{data:e})}),e.addClass("select2-hidden-accessible"),e.attr("aria-hidden","true"),this._syncAttributes(),u.StoreData(e[0],"select2",this),e.data("select2",this)};return u.Extend(d,u.Observable),d.prototype._generateId=function(e){return"select2-"+(null!=e.attr("id")?e.attr("id"):null!=e.attr("name")?e.attr("name")+"-"+u.generateChars(2):u.generateChars(4)).replace(/(:|\.|\[|\]|,)/g,"")},d.prototype._placeContainer=function(e){e.insertAfter(this.$element);var t=this._resolveWidth(this.$element,this.options.get("width"));null!=t&&e.css("width",t)},d.prototype._resolveWidth=function(e,t){var n=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==t){var i=this._resolveWidth(e,"style");return null!=i?i:this._resolveWidth(e,"element")}if("element"==t){var r=e.outerWidth(!1);return r<=0?"auto":r+"px"}if("style"!=t)return"computedstyle"!=t?t:window.getComputedStyle(e[0]).width;var o=e.attr("style");if("string"!=typeof o)return null;for(var s=o.split(";"),a=0,l=s.length;a<l;a+=1){var c=s[a].replace(/\s/g,"").match(n);if(null!==c&&1<=c.length)return c[1]}return null},d.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},d.prototype._registerDomEvents=function(){var t=this;this.$element.on("change.select2",function(){t.dataAdapter.current(function(e){t.trigger("selection:update",{data:e})})}),this.$element.on("focus.select2",function(e){t.trigger("focus",e)}),this._syncA=u.bind(this._syncAttributes,this),this._syncS=u.bind(this._syncSubtree,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._syncA);var e=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=e?(this._observer=new e(function(e){t._syncA(),t._syncS(null,e)}),this._observer.observe(this.$element[0],{attributes:!0,childList:!0,subtree:!1})):this.$element[0].addEventListener&&(this.$element[0].addEventListener("DOMAttrModified",t._syncA,!1),this.$element[0].addEventListener("DOMNodeInserted",t._syncS,!1),this.$element[0].addEventListener("DOMNodeRemoved",t._syncS,!1))},d.prototype._registerDataEvents=function(){var n=this;this.dataAdapter.on("*",function(e,t){n.trigger(e,t)})},d.prototype._registerSelectionEvents=function(){var n=this,i=["toggle","focus"];this.selection.on("toggle",function(){n.toggleDropdown()}),this.selection.on("focus",function(e){n.focus(e)}),this.selection.on("*",function(e,t){-1===o.inArray(e,i)&&n.trigger(e,t)})},d.prototype._registerDropdownEvents=function(){var n=this;this.dropdown.on("*",function(e,t){n.trigger(e,t)})},d.prototype._registerResultsEvents=function(){var n=this;this.results.on("*",function(e,t){n.trigger(e,t)})},d.prototype._registerEvents=function(){var n=this;this.on("open",function(){n.$container.addClass("select2-container--open")}),this.on("close",function(){n.$container.removeClass("select2-container--open")}),this.on("enable",function(){n.$container.removeClass("select2-container--disabled")}),this.on("disable",function(){n.$container.addClass("select2-container--disabled")}),this.on("blur",function(){n.$container.removeClass("select2-container--focus")}),this.on("query",function(t){n.isOpen()||n.trigger("open",{}),this.dataAdapter.query(t,function(e){n.trigger("results:all",{data:e,query:t})})}),this.on("query:append",function(t){this.dataAdapter.query(t,function(e){n.trigger("results:append",{data:e,query:t})})}),this.on("keypress",function(e){var t=e.which;n.isOpen()?t===i.ESC||t===i.TAB||t===i.UP&&e.altKey?(n.close(e),e.preventDefault()):t===i.ENTER?(n.trigger("results:select",{}),e.preventDefault()):t===i.SPACE&&e.ctrlKey?(n.trigger("results:toggle",{}),e.preventDefault()):t===i.UP?(n.trigger("results:previous",{}),e.preventDefault()):t===i.DOWN&&(n.trigger("results:next",{}),e.preventDefault()):(t===i.ENTER||t===i.SPACE||t===i.DOWN&&e.altKey)&&(n.open(),e.preventDefault())})},d.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.isDisabled()?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},d.prototype._isChangeMutation=function(e,t){var n=!1,i=this;if(!e||!e.target||"OPTION"===e.target.nodeName||"OPTGROUP"===e.target.nodeName){if(t)if(t.addedNodes&&0<t.addedNodes.length)for(var r=0;r<t.addedNodes.length;r++){t.addedNodes[r].selected&&(n=!0)}else t.removedNodes&&0<t.removedNodes.length?n=!0:o.isArray(t)&&o.each(t,function(e,t){if(i._isChangeMutation(e,t))return!(n=!0)});else n=!0;return n}},d.prototype._syncSubtree=function(e,t){var n=this._isChangeMutation(e,t),i=this;n&&this.dataAdapter.current(function(e){i.trigger("selection:update",{data:e})})},d.prototype.trigger=function(e,t){var n=d.__super__.trigger,i={open:"opening",close:"closing",select:"selecting",unselect:"unselecting",clear:"clearing"};if(void 0===t&&(t={}),e in i){var r=i[e],o={prevented:!1,name:e,args:t};if(n.call(this,r,o),o.prevented)return void(t.prevented=!0)}n.call(this,e,t)},d.prototype.toggleDropdown=function(){this.isDisabled()||(this.isOpen()?this.close():this.open())},d.prototype.open=function(){this.isOpen()||this.isDisabled()||this.trigger("query",{})},d.prototype.close=function(e){this.isOpen()&&this.trigger("close",{originalEvent:e})},d.prototype.isEnabled=function(){return!this.isDisabled()},d.prototype.isDisabled=function(){return this.options.get("disabled")},d.prototype.isOpen=function(){return this.$container.hasClass("select2-container--open")},d.prototype.hasFocus=function(){return this.$container.hasClass("select2-container--focus")},d.prototype.focus=function(e){this.hasFocus()||(this.$container.addClass("select2-container--focus"),this.trigger("focus",{}))},d.prototype.enable=function(e){this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'),null!=e&&0!==e.length||(e=[!0]);var t=!e[0];this.$element.prop("disabled",t)},d.prototype.data=function(){this.options.get("debug")&&0<arguments.length&&window.console&&console.warn&&console.warn('Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.');var t=[];return this.dataAdapter.current(function(e){t=e}),t},d.prototype.val=function(e){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'),null==e||0===e.length)return this.$element.val();var t=e[0];o.isArray(t)&&(t=o.map(t,function(e){return e.toString()})),this.$element.val(t).trigger("input").trigger("change")},d.prototype.destroy=function(){this.$container.remove(),this.$element[0].detachEvent&&this.$element[0].detachEvent("onpropertychange",this._syncA),null!=this._observer?(this._observer.disconnect(),this._observer=null):this.$element[0].removeEventListener&&(this.$element[0].removeEventListener("DOMAttrModified",this._syncA,!1),this.$element[0].removeEventListener("DOMNodeInserted",this._syncS,!1),this.$element[0].removeEventListener("DOMNodeRemoved",this._syncS,!1)),this._syncA=null,this._syncS=null,this.$element.off(".select2"),this.$element.attr("tabindex",u.GetData(this.$element[0],"old-tabindex")),this.$element.removeClass("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),u.RemoveData(this.$element[0]),this.$element.removeData("select2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null},d.prototype.render=function(){var e=o('<span class="select2 select2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');return e.attr("dir",this.options.get("dir")),this.$container=e,this.$container.addClass("select2-container--"+this.options.get("theme")),u.StoreData(e[0],"element",this.$element),e},d}),e.define("select2/compat/utils",["jquery"],function(s){return{syncCssClasses:function(e,t,n){var i,r,o=[];(i=s.trim(e.attr("class")))&&s((i=""+i).split(/\s+/)).each(function(){0===this.indexOf("select2-")&&o.push(this)}),(i=s.trim(t.attr("class")))&&s((i=""+i).split(/\s+/)).each(function(){0!==this.indexOf("select2-")&&null!=(r=n(this))&&o.push(r)}),e.attr("class",o.join(" "))}}}),e.define("select2/compat/containerCss",["jquery","./utils"],function(s,a){function l(e){return null}function e(){}return e.prototype.render=function(e){var t=e.call(this),n=this.options.get("containerCssClass")||"";s.isFunction(n)&&(n=n(this.$element));var i=this.options.get("adaptContainerCssClass");if(i=i||l,-1!==n.indexOf(":all:")){n=n.replace(":all:","");var r=i;i=function(e){var t=r(e);return null!=t?t+" "+e:e}}var o=this.options.get("containerCss")||{};return s.isFunction(o)&&(o=o(this.$element)),a.syncCssClasses(t,this.$element,i),t.css(o),t.addClass(n),t},e}),e.define("select2/compat/dropdownCss",["jquery","./utils"],function(s,a){function l(e){return null}function e(){}return e.prototype.render=function(e){var t=e.call(this),n=this.options.get("dropdownCssClass")||"";s.isFunction(n)&&(n=n(this.$element));var i=this.options.get("adaptDropdownCssClass");if(i=i||l,-1!==n.indexOf(":all:")){n=n.replace(":all:","");var r=i;i=function(e){var t=r(e);return null!=t?t+" "+e:e}}var o=this.options.get("dropdownCss")||{};return s.isFunction(o)&&(o=o(this.$element)),a.syncCssClasses(t,this.$element,i),t.css(o),t.addClass(n),t},e}),e.define("select2/compat/initSelection",["jquery"],function(i){function e(e,t,n){n.get("debug")&&window.console&&console.warn&&console.warn("Select2: The `initSelection` option has been deprecated in favor of a custom data adapter that overrides the `current` method. This method is now called multiple times instead of a single time when the instance is initialized. Support will be removed for the `initSelection` option in future versions of Select2"),this.initSelection=n.get("initSelection"),this._isInitialized=!1,e.call(this,t,n)}return e.prototype.current=function(e,t){var n=this;this._isInitialized?e.call(this,t):this.initSelection.call(null,this.$element,function(e){n._isInitialized=!0,i.isArray(e)||(e=[e]),t(e)})},e}),e.define("select2/compat/inputData",["jquery","../utils"],function(s,i){function e(e,t,n){this._currentData=[],this._valueSeparator=n.get("valueSeparator")||",","hidden"===t.prop("type")&&n.get("debug")&&console&&console.warn&&console.warn("Select2: Using a hidden input with Select2 is no longer supported and may stop working in the future. It is recommended to use a `<select>` element instead."),e.call(this,t,n)}return e.prototype.current=function(e,t){function i(e,t){var n=[];return e.selected||-1!==s.inArray(e.id,t)?(e.selected=!0,n.push(e)):e.selected=!1,e.children&&n.push.apply(n,i(e.children,t)),n}for(var n=[],r=0;r<this._currentData.length;r++){var o=this._currentData[r];n.push.apply(n,i(o,this.$element.val().split(this._valueSeparator)))}t(n)},e.prototype.select=function(e,t){if(this.options.get("multiple")){var n=this.$element.val();n+=this._valueSeparator+t.id,this.$element.val(n),this.$element.trigger("input").trigger("change")}else this.current(function(e){s.map(e,function(e){e.selected=!1})}),this.$element.val(t.id),this.$element.trigger("input").trigger("change")},e.prototype.unselect=function(e,r){var o=this;r.selected=!1,this.current(function(e){for(var t=[],n=0;n<e.length;n++){var i=e[n];r.id!=i.id&&t.push(i.id)}o.$element.val(t.join(o._valueSeparator)),o.$element.trigger("input").trigger("change")})},e.prototype.query=function(e,t,n){for(var i=[],r=0;r<this._currentData.length;r++){var o=this._currentData[r],s=this.matches(t,o);null!==s&&i.push(s)}n({results:i})},e.prototype.addOptions=function(e,t){var n=s.map(t,function(e){return i.GetData(e[0],"data")});this._currentData.push.apply(this._currentData,n)},e}),e.define("select2/compat/matcher",["jquery"],function(s){return function(o){return function(e,t){var n=s.extend(!0,{},t);if(null==e.term||""===s.trim(e.term))return n;if(t.children){for(var i=t.children.length-1;0<=i;i--){var r=t.children[i];o(e.term,r.text,r)||n.children.splice(i,1)}if(0<n.children.length)return n}return o(e.term,t.text,t)?n:null}}}),e.define("select2/compat/query",[],function(){function e(e,t,n){n.get("debug")&&window.console&&console.warn&&console.warn("Select2: The `query` option has been deprecated in favor of a custom data adapter that overrides the `query` method. Support will be removed for the `query` option in future versions of Select2."),e.call(this,t,n)}return e.prototype.query=function(e,t,n){t.callback=n,this.options.get("query").call(null,t)},e}),e.define("select2/dropdown/attachContainer",[],function(){function e(e,t,n){e.call(this,t,n)}return e.prototype.position=function(e,t,n){n.find(".dropdown-wrapper").append(t),t.addClass("select2-dropdown--below"),n.addClass("select2-container--below")},e}),e.define("select2/dropdown/stopPropagation",[],function(){function e(){}return e.prototype.bind=function(e,t,n){e.call(this,t,n);this.$dropdown.on(["blur","change","click","dblclick","focus","focusin","focusout","input","keydown","keyup","keypress","mousedown","mouseenter","mouseleave","mousemove","mouseover","mouseup","search","touchend","touchstart"].join(" "),function(e){e.stopPropagation()})},e}),e.define("select2/selection/stopPropagation",[],function(){function e(){}return e.prototype.bind=function(e,t,n){e.call(this,t,n);this.$selection.on(["blur","change","click","dblclick","focus","focusin","focusout","input","keydown","keyup","keypress","mousedown","mouseenter","mouseleave","mousemove","mouseover","mouseup","search","touchend","touchstart"].join(" "),function(e){e.stopPropagation()})},e}),l=function(p){var h,f,e=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],t="onwheel"in document||9<=document.documentMode?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],g=Array.prototype.slice;if(p.event.fixHooks)for(var n=e.length;n;)p.event.fixHooks[e[--n]]=p.event.mouseHooks;var m=p.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var e=t.length;e;)this.addEventListener(t[--e],i,!1);else this.onmousewheel=i;p.data(this,"mousewheel-line-height",m.getLineHeight(this)),p.data(this,"mousewheel-page-height",m.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var e=t.length;e;)this.removeEventListener(t[--e],i,!1);else this.onmousewheel=null;p.removeData(this,"mousewheel-line-height"),p.removeData(this,"mousewheel-page-height")},getLineHeight:function(e){var t=p(e),n=t["offsetParent"in p.fn?"offsetParent":"parent"]();return n.length||(n=p("body")),parseInt(n.css("fontSize"),10)||parseInt(t.css("fontSize"),10)||16},getPageHeight:function(e){return p(e).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};function i(e){var t,n=e||window.event,i=g.call(arguments,1),r=0,o=0,s=0,a=0,l=0;if((e=p.event.fix(n)).type="mousewheel","detail"in n&&(s=-1*n.detail),"wheelDelta"in n&&(s=n.wheelDelta),"wheelDeltaY"in n&&(s=n.wheelDeltaY),"wheelDeltaX"in n&&(o=-1*n.wheelDeltaX),"axis"in n&&n.axis===n.HORIZONTAL_AXIS&&(o=-1*s,s=0),r=0===s?o:s,"deltaY"in n&&(r=s=-1*n.deltaY),"deltaX"in n&&(o=n.deltaX,0===s&&(r=-1*o)),0!==s||0!==o){if(1===n.deltaMode){var c=p.data(this,"mousewheel-line-height");r*=c,s*=c,o*=c}else if(2===n.deltaMode){var u=p.data(this,"mousewheel-page-height");r*=u,s*=u,o*=u}if(t=Math.max(Math.abs(s),Math.abs(o)),(!f||t<f)&&y(n,f=t)&&(f/=40),y(n,t)&&(r/=40,o/=40,s/=40),r=Math[1<=r?"floor":"ceil"](r/f),o=Math[1<=o?"floor":"ceil"](o/f),s=Math[1<=s?"floor":"ceil"](s/f),m.settings.normalizeOffset&&this.getBoundingClientRect){var d=this.getBoundingClientRect();a=e.clientX-d.left,l=e.clientY-d.top}return e.deltaX=o,e.deltaY=s,e.deltaFactor=f,e.offsetX=a,e.offsetY=l,e.deltaMode=0,i.unshift(e,r,o,s),h&&clearTimeout(h),h=setTimeout(v,200),(p.event.dispatch||p.event.handle).apply(this,i)}}function v(){f=null}function y(e,t){return m.settings.adjustOldDeltas&&"mousewheel"===e.type&&t%120==0}p.fn.extend({mousewheel:function(e){return e?this.bind("mousewheel",e):this.trigger("mousewheel")},unmousewheel:function(e){return this.unbind("mousewheel",e)}})},"function"==typeof e.define&&e.define.amd?e.define("jquery-mousewheel",["jquery"],l):"object"==typeof exports?module.exports=l:l(d),e.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults","./select2/utils"],function(r,e,o,t,s){if(null==r.fn.select2){var a=["open","close","destroy"];r.fn.select2=function(t){if("object"==typeof(t=t||{}))return this.each(function(){var e=r.extend(!0,{},t);new o(r(this),e)}),this;if("string"!=typeof t)throw new Error("Invalid arguments for Select2: "+t);var n,i=Array.prototype.slice.call(arguments,1);return this.each(function(){var e=s.GetData(this,"select2");null==e&&window.console&&console.error&&console.error("The select2('"+t+"') method was called on an element that is not using Select2."),n=e[t].apply(e,i)}),-1<r.inArray(t,a)?this:n}}return null==r.fn.select2.defaults&&(r.fn.select2.defaults=t),o}),{define:e.define,require:e.require}}(),t=e.require("jquery.select2");return d.fn.select2.amd=e,t});
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/ja",[],function(){return{errorLoading:function(){return"結果が読み込まれませんでした"},inputTooLong:function(n){return n.input.length-n.maximum+" 文字を削除してください"},inputTooShort:function(n){return"少なくとも "+(n.minimum-n.input.length)+" 文字を入力してください"},loadingMore:function(){return"読み込み中…"},maximumSelected:function(n){return n.maximum+" 件しか選択できません"},noResults:function(){return"対象が見つかりません"},searching:function(){return"検索しています…"},removeAllItems:function(){return"すべてのアイテムを削除"}}}),n.define,n.require}();
!function(i){var r={init:function(t){return this.each(function(){this.self=i(this),r.destroy.call(this.self),this.opt=i.extend(!0,{},i.fn.um_raty.defaults,t),r._adjustCallback.call(this),r._adjustNumber.call(this),"img"!==this.opt.starType&&r._adjustStarType.call(this),r._adjustPath.call(this),r._createStars.call(this),this.opt.cancel&&r._createCancel.call(this),this.opt.precision&&r._adjustPrecision.call(this),r._createScore.call(this),r._apply.call(this,this.opt.score),r._target.call(this,this.opt.score),(this.opt.readOnly?r._lock:(this.style.cursor="pointer",r._binds)).call(this),this.self.data("options",this.opt)})},_adjustCallback:function(){for(var t=["number","readOnly","score","scoreName","target"],e=0;e<t.length;e++)"function"==typeof this.opt[t[e]]&&(this.opt[t[e]]=this.opt[t[e]].call(this))},_adjustNumber:function(){this.opt.number=r._between(this.opt.number,1,this.opt.numberMax)},_adjustPath:function(){this.opt.path=this.opt.path||"",this.opt.path&&"/"!==this.opt.path.charAt(this.opt.path.length-1)&&(this.opt.path+="/")},_adjustPrecision:function(){this.opt.half=!0,this.opt.targetType="score"},_adjustStarType:function(){this.opt.path="";for(var t=["cancelOff","cancelOn","starHalf","starOff","starOn"],e=0;e<t.length;e++)this.opt[t[e]]=this.opt[t[e]].replace(".","-")},_apply:function(t){r._fill.call(this,t),t&&(0<t&&this.score.val(r._between(t,0,this.opt.number)),r._roundStars.call(this,t))},_between:function(t,e,a){return Math.min(Math.max(parseFloat(t),e),a)},_binds:function(){this.cancel&&(r._bindOverCancel.call(this),r._bindClickCancel.call(this),r._bindOutCancel.call(this)),r._bindOver.call(this),r._bindClick.call(this),r._bindOut.call(this)},_bindClick:function(){var a=this;a.stars.on("click.um_raty",function(t){var e=i(this);a.score.val(a.opt.half||a.opt.precision?a.self.data("score"):this.alt||e.data("alt")),a.opt.click&&a.opt.click.call(a,+a.score.val(),t)})},_bindClickCancel:function(){var e=this;e.cancel.on("click.um_raty",function(t){e.score.removeAttr("value"),e.opt.click&&e.opt.click.call(e,null,t)})},_bindOut:function(){var a=this;a.self.on("mouseleave.um_raty",function(t){var e=+a.score.val()||void 0;r._apply.call(a,e),r._target.call(a,e,t),a.opt.mouseout&&a.opt.mouseout.call(a,e,t)})},_bindOutCancel:function(){var a=this;a.cancel.on("mouseleave.um_raty",function(t){var e=a.opt.cancelOff;"img"!==a.opt.starType&&(e=a.opt.cancelClass+" "+e),r._setIcon.call(a,this,e),a.opt.mouseout&&(e=+a.score.val()||void 0,a.opt.mouseout.call(a,e,t))})},_bindOver:function(){var a=this,t=a.opt.half?"mousemove.um_raty":"mouseover.um_raty";a.stars.on(t,function(t){var e=r._getScoreByPosition.call(a,t,this);r._fill.call(a,e),a.opt.half&&(r._roundStars.call(a,e),a.self.data("score",e)),r._target.call(a,e,t),a.opt.mouseover&&a.opt.mouseover.call(a,e,t)})},_bindOverCancel:function(){var s=this;s.cancel.on("mouseover.um_raty",function(t){var e=s.opt.path+s.opt.starOff,a=s.opt.cancelOn;"img"===s.opt.starType?s.stars.attr("src",e):(a=s.opt.cancelClass+" "+a,s.stars.attr("class",e)),r._setIcon.call(s,this,a),r._target.call(s,null,t),s.opt.mouseover&&s.opt.mouseover.call(s,null)})},_buildScoreField:function(){return i("<input />",{name:this.opt.scoreName,type:"hidden"}).appendTo(this)},_createCancel:function(){var t=this.opt.path+this.opt.cancelOff,e=i("<"+this.opt.starType+" />",{title:this.opt.cancelHint,class:this.opt.cancelClass});"img"===this.opt.starType?e.attr({src:t,alt:"x"}):e.attr("data-alt","x").addClass(t),"left"===this.opt.cancelPlace?this.self.prepend("&#160;").prepend(e):this.self.append("&#160;").append(e),this.cancel=e},_createScore:function(){var t=i(this.opt.targetScore);this.score=t.length?t:r._buildScoreField.call(this)},_createStars:function(){for(var t=1;t<=this.opt.number;t++){var e=r._nameForIndex.call(this,t),e={alt:t,src:this.opt.path+this.opt[e]};(e="img"!==this.opt.starType?{"data-alt":t,class:e.src}:e).title=r._getHint.call(this,t),i("<"+this.opt.starType+" />",e).appendTo(this),this.opt.space&&this.self.append(t<this.opt.number?"&#160;":"")}this.stars=this.self.children(this.opt.starType)},_error:function(t){i(this).text(t),i.error(t)},_fill:function(t){for(var e=0,a=1;a<=this.stars.length;a++){var s,i,o=this.stars[a-1],n=r._turnOn.call(this,a,t);this.opt.iconRange&&this.opt.iconRange.length>e?(s=this.opt.iconRange[e],i=r._getRangeIcon.call(this,s,n),a<=s.range&&r._setIcon.call(this,o,i),a===s.range&&e++):(i=this.opt[n?"starOn":"starOff"],r._setIcon.call(this,o,i))}},_getRangeIcon:function(t,e){return e?t.on||this.opt.starOn:t.off||this.opt.starOff},_getScoreByPosition:function(t,e){var a,s=parseInt(e.alt||e.getAttribute("data-alt"),10);return this.opt.half&&(a=r._getSize.call(this),t=parseFloat((t.pageX-i(e).offset().left)/a),s=this.opt.precision?s-1+t:s-1+(.5<t?1:.5)),s},_getSize:function(){var t="img"===this.opt.starType?this.stars[0].width:parseFloat(this.stars.eq(0).css("font-size"));return t||r._error.call(this,"Could not be possible get the icon size!"),t},_turnOn:function(t,e){return this.opt.single?t===e:t<=e},_getHint:function(t){var e=this.opt.hints[t-1];return""===e?"":e||t},_lock:function(){var t=parseInt(this.score.val(),10),t=t?r._getHint.call(this,t):this.opt.noRatedMsg;this.style.cursor="",this.title=t,this.score.prop("readonly",!0),this.stars.prop("title",t),this.cancel&&this.cancel.hide(),this.self.data("readonly",!0)},_nameForIndex:function(t){return this.opt.score&&this.opt.score>=t?"starOn":"starOff"},_roundStars:function(t){var e,a=(t%1).toFixed(2);a>this.opt.round.down&&(e="starOn",this.opt.halfShow&&a<this.opt.round.up?e="starHalf":a<this.opt.round.full&&(e="starOff"),a=this.opt[e],e=this.stars[Math.ceil(t)-1],r._setIcon.call(this,e,a))},_setIcon:function(t,e){t["img"===this.opt.starType?"src":"className"]=this.opt.path+e},_setTarget:function(t,e){e=e&&this.opt.targetFormat.toString().replace("{score}",e),t.is(":input")?t.val(e):t.html(e)},_target:function(t,e){var a,s;this.opt.target&&((a=i(this.opt.target)).length||r._error.call(this,"Target selector invalid or missing!"),s=e&&"mouseover"===e.type,void 0===t?t=this.opt.targetText:null===t?t=s?this.opt.cancelHint:this.opt.targetText:("hint"===this.opt.targetType?t=r._getHint.call(this,Math.ceil(t)):this.opt.precision&&(t=parseFloat(t).toFixed(1)),e=e&&"mousemove"===e.type,s||e||this.opt.targetKeep||(t=this.opt.targetText)),r._setTarget.call(this,a,t))},_unlock:function(){this.style.cursor="pointer",this.removeAttribute("title"),this.score.removeAttr("readonly"),this.self.data("readonly",!1);for(var t=0;t<this.opt.number;t++)this.stars[t].title=r._getHint.call(this,t+1);this.cancel&&this.cancel.css("display","")},cancel:function(e){return this.each(function(){var t=i(this);!0!==t.data("readonly")&&(r[e?"click":"score"].call(t,null),this.score.removeAttr("value"))})},click:function(t){return this.each(function(){!0!==i(this).data("readonly")&&(r._apply.call(this,t),this.opt.click&&this.opt.click.call(this,t,i.Event("click")),r._target.call(this,t))})},destroy:function(){return this.each(function(){var t=i(this),e=t.data("raw");e?t.off(".um_raty").empty().css({cursor:e.style.cursor}).removeData("readonly"):t.data("raw",t.clone()[0])})},getScore:function(){var t,e=[];return this.each(function(){t=this.score.val(),e.push(t?+t:void 0)}),1<e.length?e:e[0]},move:function(s){return this.each(function(){var t=parseInt(s,10),e=i(this).data("options"),a=(+s).toFixed(1).split(".")[1];t>=e.number&&(t=e.number-1,a=10);e=r._getSize.call(this)/10,t=i(this.stars[t]),e=t.offset().left+e*parseInt(a,10),a=i.Event("mousemove",{pageX:e});t.trigger(a)})},readOnly:function(e){return this.each(function(){var t=i(this);t.data("readonly")!==e&&((e?(t.off(".um_raty").children("img").off(".um_raty"),r._lock):(r._binds.call(this),r._unlock)).call(this),t.data("readonly",e))})},reload:function(){return r.set.call(this,{})},score:function(){var t=i(this);return arguments.length?r.setScore.apply(t,arguments):r.getScore.call(t)},set:function(a){return this.each(function(){var t=i(this),e=t.data("options"),e=i.extend({},e,a);t.um_raty(e)})},setScore:function(t){return this.each(function(){!0!==i(this).data("readonly")&&(r._apply.call(this,t),r._target.call(this,t))})}};i.fn.um_raty=function(t){return r[t]?r[t].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof t&&t?void i.error("Method "+t+" does not exist!"):r.init.apply(this,arguments)},i.fn.um_raty.defaults={cancel:!1,cancelClass:"raty-cancel",cancelHint:wp.i18n.__("Cancel this rating!","ultimate-member"),cancelOff:"cancel-off.png",cancelOn:"cancel-on.png",cancelPlace:"left",click:void 0,half:!1,halfShow:!0,hints:["bad","poor","regular","good","gorgeous"],iconRange:void 0,mouseout:void 0,mouseover:void 0,noRatedMsg:wp.i18n.__("Not rated yet!","ultimate-member"),number:5,numberMax:20,path:void 0,precision:!1,readOnly:!1,round:{down:.25,full:.6,up:.76},score:void 0,scoreName:"score",single:!1,space:!0,starHalf:"star-half.png",starOff:"star-off.png",starOn:"star-on.png",starType:"img",target:void 0,targetFormat:"{score}",targetKeep:!1,targetScore:void 0,targetText:"",targetType:"hint"}}(jQuery);
function um_sanitize_value(e,t){var a=document.createElement("div"),e=(a.innerText=e,a.innerHTML);return t&&jQuery(t).val(e),e}function um_unsanitize_value(e){var t=document.createElement("textarea");return t.innerHTML=e,0===t.childNodes.length?"":t.childNodes[0].nodeValue}jQuery(document).ready(function(){function n(e){var a=jQuery(e.currentTarget),e=a.find(":selected");1<e.length&&e.each(function(e,t){""===t.value&&(t.selected=!1,a.trigger("change"))})}jQuery(document.body).on("click",".um-dropdown a.real_url",function(){window.location=jQuery(this).attr("href")}),jQuery(document.body).on("click",".um-trigger-menu-on-click",function(){var e=jQuery(this).find(".um-dropdown");return UM.dropdown.show(e),!1}),jQuery(document.body).on("click",".um-dropdown-hide",function(){return UM.dropdown.hideAll(),!1}),jQuery(document.body).on("click","a.um-manual-trigger",function(){var e=jQuery(this).attr("data-child"),t=jQuery(this).attr("data-parent");return jQuery(this).parents(t).find(e).trigger("click"),UM.dropdown.hideAll(),!1}),jQuery(".um-s1,.um-s2").css({display:"block"}),"function"==typeof jQuery.fn.select2&&(jQuery(".um-s1").each(function(e){var t=jQuery(this);t.select2({allowClear:!0,dropdownParent:t.parent()}).on("change",n)}),jQuery(".um-s2").each(function(e){var t=jQuery(this),a={},a=t.parents(".um-custom-shortcode-tab").length?{allowClear:!1}:{allowClear:!1,minimumResultsForSearch:10,dropdownParent:t.parent()};t.select2(a).on("change",n)}),jQuery(".um-s3").each(function(e){var t=jQuery(this);t.select2({allowClear:!1,minimumResultsForSearch:-1,dropdownParent:t.parent()}).on("change",n)})),"function"==typeof jQuery.fn.um_raty&&(jQuery(".um-rating").um_raty({half:!1,starType:"i",number:function(){return jQuery(this).attr("data-number")},score:function(){return jQuery(this).attr("data-score")},scoreName:function(){return jQuery(this).attr("data-key")},hints:!1,click:function(e,t){um_live_field=this.id,um_live_value=e,um_apply_conditions(jQuery(this),!1)}}),jQuery(".um-rating-readonly").um_raty({half:!1,starType:"i",number:function(){return jQuery(this).attr("data-number")},score:function(){return jQuery(this).attr("data-score")},scoreName:function(){return jQuery(this).attr("data-key")},hints:!1,readOnly:!0})),jQuery(document).on("change",'.um-field-area input[type="radio"]',function(){var e=jQuery(this).parents(".um-field-area"),t=jQuery(this).parents("label");e.find(".um-field-radio").removeClass("active"),e.find(".um-field-radio").find("i").removeAttr("class").addClass("um-icon-android-radio-button-off"),t.addClass("active"),t.find("i").removeAttr("class").addClass("um-icon-android-radio-button-on")}),jQuery(document).on("change",'.um-field-area input[type="checkbox"]',function(){var e=jQuery(this).parents("label");e.hasClass("active")?(e.removeClass("active"),e.find("i").removeAttr("class").addClass("um-icon-android-checkbox-outline-blank")):(e.addClass("active"),e.find("i").removeAttr("class").addClass("um-icon-android-checkbox-outline"))}),jQuery(document.body).on("click",".um-single-image-preview a.cancel",function(e){e.preventDefault();let t=!1;0<jQuery(this).parents(".um-modal-body").length&&(t=!0);let a,n,i,r;t?(a=jQuery(this).parents(".um-modal-body"),n=a.find(".um-single-image-upload").data("set_mode"),i=a.find(".um-single-image-preview img").attr("src"),r={data:{src:i,mode:n,nonce:um_scripts.nonce},success:function(){wp.hooks.doAction("um_after_removing_preview"),a.find(".um-single-image-preview img").replaceWith('<img src="" alt="" />'),a.find(".um-single-image-preview").removeAttr("style").hide(),a.find(".ajax-upload-dragdrop").show(),a.find(".um-modal-btn.um-finish-upload").addClass("disabled"),um_modal_responsive()}}):(a=jQuery(this).parents(".um-field"),n=a.data("mode"),i=a.find(".um-single-image-preview img").attr("src"),e=a.find('input[type="hidden"]#'+a.data("key")+"-"+jQuery(this).parents("form").find('input[type="hidden"][name="form_id"]').val()).val(),r={data:{mode:n,filename:e,src:i,nonce:um_scripts.nonce},success:function(){a.find(".um-single-image-preview img").replaceWith('<img src="" alt="" />'),a.find(".um-single-image-preview").removeAttr("style").hide(),a.find(".um-btn-auto-width").html(a.data("upload-label")),a.find('input[type="hidden"]').val("empty_file")}},"register"!==n&&(r.data.user_id=jQuery(this).parents("form").find("#user_id").val())),wp.ajax.send("um_remove_file",r)}),jQuery(document.body).on("click",".um-single-file-preview a.cancel",function(e){e.preventDefault();let t=!1;0<jQuery(this).parents(".um-modal-body").length&&(t=!0);let a,n,i,r;t?(a=jQuery(this).parents(".um-modal-body"),i=a.find(".um-single-fileinfo a").attr("href"),n=a.find(".um-single-file-upload").data("set_mode"),r={data:{src:i,mode:n,nonce:um_scripts.nonce},success:function(){a.find(".um-single-file-preview").hide(),a.find(".ajax-upload-dragdrop").show(),a.find(".um-modal-btn.um-finish-upload").addClass("disabled"),um_modal_responsive()}}):(a=jQuery(this).parents(".um-field"),i=a.find(".um-single-fileinfo a").attr("href"),n=a.data("mode"),e=a.find('input[type="hidden"]#'+a.data("key")+"-"+jQuery(this).parents("form").find('input[type="hidden"][name="form_id"]').val()).val(),r={data:{mode:n,filename:e,src:i,nonce:um_scripts.nonce},success:function(){a.find(".um-single-file-preview").hide(),a.find(".um-btn-auto-width").html(a.data("upload-label")),a.find("input[type=hidden]").val("empty_file")}},"register"!==n&&(r.data.user_id=jQuery(this).parents("form").find("#user_id").val())),wp.ajax.send("um_remove_file",r)}),jQuery(document).on("click",".um-field-group-head:not(.disabled)",function(){var e=jQuery(this).parents(".um-field-group"),t=e.data("max_entries"),a=(e.find(".um-field-group-body").is(":hidden")?e.find(".um-field-group-body").show():e.find(".um-field-group-body:first").clone().appendTo(e),0);e.find(".um-field-group-body").each(function(){a++,jQuery(this).find("input").each(function(){var e=jQuery(this);e.attr("id",e.data("key")+"-"+a),e.attr("name",e.data("key")+"-"+a),e.parent().parent().find("label").attr("for",e.data("key")+"-"+a)})}),0<t&&e.find(".um-field-group-body").length==t&&jQuery(this).addClass("disabled")}),jQuery(document).on("click",".um-field-group-cancel",function(e){e.preventDefault();var e=jQuery(this).parents(".um-field-group"),t=e.data("max_entries");return 1<e.find(".um-field-group-body").length?jQuery(this).parents(".um-field-group-body").remove():jQuery(this).parents(".um-field-group-body").hide(),0<t&&e.find(".um-field-group-body").length<t&&e.find(".um-field-group-head").removeClass("disabled"),!1}),jQuery(document.body).on("click",".um-ajax-paginate",function(e){e.preventDefault();var t,a,n=jQuery(this),i=n.parent(),r=(i.addClass("loading"),+n.data("pages")),u=+n.data("page")+1,e=n.data("hook");"um_load_posts"===e?jQuery.ajax({url:wp.ajax.settings.url,type:"post",data:{action:"um_ajax_paginate_posts",author:jQuery(this).data("author"),page:u,nonce:um_scripts.nonce},complete:function(){i.removeClass("loading")},success:function(e){i.before(e),u==r?i.remove():n.data("page",u)}}):"um_load_comments"===e?jQuery.ajax({url:wp.ajax.settings.url,type:"post",data:{action:"um_ajax_paginate_comments",user_id:jQuery(this).data("user_id"),page:u,nonce:um_scripts.nonce},complete:function(){i.removeClass("loading")},success:function(e){i.before(e),u==r?i.remove():n.data("page",u)}}):(t=jQuery(this).data("args"),a=jQuery(this).parents(".um.um-profile.um-viewing").find(".um-ajax-items"),jQuery.ajax({url:wp.ajax.settings.url,type:"post",data:{action:"um_ajax_paginate",hook:e,args:t,nonce:um_scripts.nonce},complete:function(){i.removeClass("loading")},success:function(e){i.remove(),a.append(e)}}))}),jQuery(document).on("click",".um-ajax-action",function(e){e.preventDefault();var e=jQuery(this).data("hook"),t=jQuery(this).data("user_id"),a=jQuery(this).data("args");return jQuery(this).data("js-remove")&&jQuery(this).parents("."+jQuery(this).data("js-remove")).fadeOut("fast"),jQuery.ajax({url:wp.ajax.settings.url,type:"post",data:{action:"um_muted_action",hook:e,user_id:t,arguments:a,nonce:um_scripts.nonce},success:function(e){}}),!1}),jQuery(document.body).on("click","#um-search-button",function(){var e,t=jQuery(this).parents(".um-search-form").data("members_page"),a=[],n=(jQuery(this).parents(".um-search-form").find('input[name="um-search-keys[]"]').each(function(){a.push(jQuery(this).val())}),jQuery(this).parents(".um-search-form").find(".um-search-field").val());if(""===n)e=t;else{for(var i="?",r=0;r<a.length;r++)i+=a[r]+"="+n,r!==a.length-1&&(i+="&");e=t+i}window.location=e}),jQuery(document.body).on("keypress",".um-search-field",function(e){if(13===e.which){var t,e=jQuery(this).parents(".um-search-form").data("members_page"),a=[],n=(jQuery(this).parents(".um-search-form").find('input[name="um-search-keys[]"]').each(function(){a.push(jQuery(this).val())}),jQuery(this).val());if(""===n)t=e;else{for(var i="?",r=0;r<a.length;r++)i+=a[r]+"="+n,r!==a.length-1&&(i+="&");t=e+i}window.location=t}}),jQuery('.um-form input[class="um-button"][type="submit"]').prop("disabled",!1),jQuery(document).one("click",'.um:not(.um-account) .um-form input[class="um-button"][type="submit"]:not(.um-has-recaptcha)',function(){jQuery(this).attr("disabled","disabled"),jQuery(this).parents("form").trigger("submit")});var o={};function d(t,e,a){var n,i,r=t.parents(".um-directory"),u=t.attr("name"),o=(t.find('option[value!=""]').remove(),t.hasClass("um-child-option-disabled")||t.prop("disabled",!1),[]);"yes"===e.post.members_directory&&o.push({id:"",text:"",selected:1}),jQuery.each(e.items,function(e,t){o.push({id:e,text:t,selected:""===t})}),t.select2("destroy"),t.hasClass("um-s1")?t.select2({data:o,allowClear:!0,dropdownParent:t.parent()}):t.hasClass("um-s2")&&t.select2({data:o,allowClear:!0,minimumResultsForSearch:10,dropdownParent:t.parent()}),"yes"===e.post.members_directory&&(t.find("option").each(function(){""!==jQuery(this).html()&&jQuery(this).data("value_label",jQuery(this).html()).attr("data-value_label",jQuery(this).html())}),void 0!==(n=um_get_data_for_directory(r,"filter_"+u))&&(n=n.split("||"),i=[],jQuery.each(n,function(e){t.find('option[value="'+n[e]+'"]').length&&i.push(n[e]),t.find('option[value="'+n[e]+'"]').prop("disabled",!0).hide(),1===t.find("option:not(:disabled)").length&&t.prop("disabled",!0),t.select2("destroy").select2(),t.val("").trigger("change")}),i=i.join("||"),n!==i)&&(um_set_url_from_data(r,"filter_"+u,i),um_ajax_get_members(r)),um_change_tag(r)),"yes"!==e.post.members_directory&&(void 0===e.field.default||t.data("um-original-value")?""!==t.data("um-original-value")&&t.val(t.data("um-original-value")).trigger("change"):t.val(e.field.default).trigger("change"),0==e.field.editable)&&(t.addClass("um-child-option-disabled"),t.attr("disabled","disabled"))}jQuery("select[data-um-parent]").each(function(){var i=jQuery(this),r=i.data("um-parent"),u=i.data("um-ajax-source");i.attr("data-um-init-field",!0),jQuery(document).on("change",'select[name="'+r+'"]',function(){var e,t,a=jQuery(this),n=a.closest("form").find('input[type="hidden"][name="form_id"]').val();if(void 0!==(t="yes"===i.attr("data-member-directory")?(e=a.parents(".um-directory"),void 0!==(t=um_get_data_for_directory(e,"filter_"+r))?t.split("||"):""):a.val())&&""!==t&&"object"!=typeof o[t]){if(void 0!==i.um_wait&&!1!==i.um_wait)return;i.um_wait=!0,jQuery.ajax({url:wp.ajax.settings.url,type:"post",data:{action:"um_select_options",parent_option_name:r,parent_option:t,child_callback:u,child_name:i.attr("name"),members_directory:i.attr("data-member-directory"),form_id:n,nonce:um_scripts.nonce},success:function(e){"success"===e.status&&""!==t&&d(i,o[t]=e),void 0!==e.debug&&console.log(e),i.um_wait=!1},error:function(e){console.log(e),i.um_wait=!1}})}void 0!==t&&""!==t&&"object"==typeof o[t]&&setTimeout(d,10,i,o[t],t),void 0===t&&""!==t||(i.find('option[value!=""]').remove(),i.val("").trigger("change"))}),jQuery('select[name="'+r+'"]').trigger("change")}),jQuery(document.body).on("click",".um-toggle-password",function(){var e=jQuery(this).closest(".um-field-area-password"),t=e.find("input");"text"===t.attr("type")?t.attr("type","password"):t.attr("type","text"),e.find("i").toggleClass("um-icon-eye um-icon-eye-disabled")})});
jQuery(document).ready(function(){jQuery(".um-profile.um-viewing .um-profile-body .um-row").each(function(){var e=jQuery(this);0==e.find(".um-field").length&&(e.prev(".um-row-heading").remove(),e.remove())}),jQuery(".um-profile.um-viewing .um-profile-body").length&&0==jQuery(".um-profile.um-viewing .um-profile-body").find(".um-field").length&&(jQuery(".um-profile.um-viewing .um-profile-body").find(".um-row-heading,.um-row").remove(),jQuery(".um-profile-note").show()),jQuery(document.body).on("click",".um-profile-save",function(e){return e.preventDefault(),jQuery(this).parents(".um.um-profile.um-editing").find("form").trigger("submit"),!1}),jQuery(document.body).on("click",".um-profile-edit-a",function(e){jQuery(this).addClass("active")}),jQuery(document.body).on("click",".um-cover a.um-cover-add, .um-photo a",function(e){e.preventDefault()}),jQuery(document.body).on("click",".um-photo-modal",function(e){e.preventDefault();e=jQuery(this).attr("data-src");return um_new_modal("um_view_photo","fit",!0,e),!1}),jQuery(document.body).on("click",".um-reset-profile-photo",function(e){return jQuery(".um-profile-photo-img img").attr("src",jQuery(this).attr("data-default_src")),user_id=jQuery(this).attr("data-user_id"),metakey="profile_photo",UM.dropdown.hideAll(),jQuery.ajax({url:wp.ajax.settings.url,type:"post",data:{action:"um_delete_profile_photo",metakey:metakey,user_id:user_id,nonce:um_scripts.nonce}}),jQuery(this).parents("li").hide(),!1}),jQuery(document.body).on("click",".um-reset-cover-photo",function(e){var t=jQuery(this);return jQuery(".um-cover-overlay").hide(),jQuery(".um-cover-e").html('<a href="javascript:void(0);" class="um-cover-add" style="height: 370px;"><span class="um-cover-add-i"><i class="um-icon-plus um-tip-n" title="Upload a cover photo"></i></span></a>'),um_responsive(),user_id=jQuery(this).attr("data-user_id"),metakey="cover_photo",jQuery.ajax({url:wp.ajax.settings.url,type:"post",data:{action:"um_delete_cover_photo",metakey:metakey,user_id:user_id,nonce:um_scripts.nonce},success:function(e){t.hide()}}),UM.dropdown.hideAll(),!1}),jQuery(document.body).on("change keyup","#um-meta-bio",function(){if(void 0!==jQuery(this).val()){var t=jQuery(this).data("character-limit"),r=jQuery(this).data("html");let e=t-jQuery(this).val().length;e=(e=1===parseInt(r)?t-jQuery(this).val().replace(/(<([^>]+)>)/gi,"").length:e)<0?0:e,jQuery("span.um-meta-bio-character span.um-bio-limit").text(e);r=e<5?"red":"";jQuery("span.um-meta-bio-character").css("color",r)}}),jQuery("#um-meta-bio").trigger("change"),jQuery(".um-profile form").each(function(){let t=jQuery(this).data("description_key");jQuery(this).find('textarea[name="'+t+'"]').length&&jQuery(document.body).on("change input",'textarea[name="'+t+'"]',function(e){jQuery(this).parents("form").find('textarea[name="'+t+'"]').each(function(){jQuery(this).val(e.currentTarget.value),jQuery("#um-meta-bio")[0]!==e.currentTarget&&jQuery("#um-meta-bio")[0]===jQuery(this)[0]&&jQuery(this).trigger("change")})})}),jQuery(".um-profile-edit a.um_delete-item").on("click",function(e){if(e.preventDefault(),!confirm(wp.i18n.__("Are you sure that you want to delete this user?","ultimate-member")))return!1}),jQuery(".um-profile-nav a").on("touchend",function(e){jQuery(e.currentTarget).trigger("click")})});
jQuery(document).ready(function(){var t=jQuery(".um-account-main").attr("data-current_tab");t&&(jQuery('.um-account-tab[data-tab="'+t+'"]').show(),jQuery(".um-account-tab:not(:visible)").find("input, select, textarea").not(":disabled").addClass("um_account_inactive").prop("disabled",!0).attr("disabled",!0),wp.hooks.doAction("um_account_active_tab_inited",t)),jQuery(document.body).on("click",".um-account-side li a",function(t){t.preventDefault();var t=jQuery(this),t=(t.parents("ul").find("li a").removeClass("current"),t.addClass("current"),jQuery(this).attr("href")),a=jQuery(this).attr("data-tab");return jQuery('input[id="_um_account_tab"]:hidden').val(a),window.history.pushState("","",t),jQuery(".um-account-tab").hide(),jQuery('.um-account-tab[data-tab="'+a+'"]').fadeIn(),jQuery(".um-account-tab:visible").find("input, select, textarea").filter(".um_account_inactive:disabled").removeClass("um_account_inactive").prop("disabled",!1).attr("disabled",!1),jQuery(".um-account-tab:not(:visible)").find("input, select, textarea").not(":disabled").addClass("um_account_inactive").prop("disabled",!0).attr("disabled",!0),jQuery(".um-account-nav a").removeClass("current"),jQuery('.um-account-nav a[data-tab="'+a+'"]').addClass("current"),jQuery(this).parents(".um-account").find(".um-account-main .um-notice").fadeOut(),wp.hooks.doAction("um_after_account_tab_changed",a),!1}),jQuery(document.body).on("click",".um-account-nav a",function(t){t.preventDefault();var t=jQuery(this).attr("data-tab"),a=jQuery(this).parents("div"),e=jQuery(this);return jQuery('input[id="_um_account_tab"]:hidden').val(t),jQuery(".um-account-tab").hide(),e.hasClass("current")?(a.next(".um-account-tab").slideUp(),e.removeClass("current")):(a.next(".um-account-tab").slideDown(),e.parents("div").find("a").removeClass("current"),e.addClass("current")),jQuery(".um-account-tab:visible").find("input, select, textarea").filter(".um_account_inactive:disabled").removeClass("um_account_inactive").prop("disabled",!1).attr("disabled",!1),jQuery(".um-account-tab:not(:visible)").find("input, select, textarea").not(":disabled").addClass("um_account_inactive").prop("disabled",!0).attr("disabled",!0),jQuery(".um-account-side li a").removeClass("current"),jQuery('.um-account-side li a[data-tab="'+t+'"]').addClass("current"),wp.hooks.doAction("um_after_account_tab_changed",t),!1}),jQuery(document.body).on("click",".um-request-button",function(t){t.preventDefault();var a,e=jQuery(this).data("action"),t=jQuery("#"+e).val();jQuery(".um-field-area-response."+e).hide(),jQuery("#"+e).length&&""===t?jQuery(".um-field-error."+e).show():(jQuery(".um-field-error."+e).hide(),a={request_action:e,nonce:um_scripts.nonce},jQuery("#"+e).length&&(a.password=t),wp.ajax.send("um_request_user_data",{data:a,success:function(t){jQuery(".um-field-area-response."+e).text(t.answer).show()},error:function(t){console.log(t)}}))})});
/*!
	autosize 4.0.2
	license: MIT
	http://www.jacklmoore.com/autosize
*/
!function(e,t){if("function"==typeof define&&define.amd)define(["module","exports"],t);else if("undefined"!=typeof exports)t(module,exports);else{var n={exports:{}};t(n,n.exports),e.autosize=n.exports}}(this,function(e,t){"use strict";var n,o,p="function"==typeof Map?new Map:(n=[],o=[],{has:function(e){return-1<n.indexOf(e)},get:function(e){return o[n.indexOf(e)]},set:function(e,t){-1===n.indexOf(e)&&(n.push(e),o.push(t))},delete:function(e){var t=n.indexOf(e);-1<t&&(n.splice(t,1),o.splice(t,1))}}),c=function(e){return new Event(e,{bubbles:!0})};try{new Event("test")}catch(e){c=function(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!1),t}}function r(r){if(r&&r.nodeName&&"TEXTAREA"===r.nodeName&&!p.has(r)){var e,n=null,o=null,i=null,d=function(){r.clientWidth!==o&&a()},l=function(t){window.removeEventListener("resize",d,!1),r.removeEventListener("input",a,!1),r.removeEventListener("keyup",a,!1),r.removeEventListener("autosize:destroy",l,!1),r.removeEventListener("autosize:update",a,!1),Object.keys(t).forEach(function(e){r.style[e]=t[e]}),p.delete(r)}.bind(r,{height:r.style.height,resize:r.style.resize,overflowY:r.style.overflowY,overflowX:r.style.overflowX,wordWrap:r.style.wordWrap});r.addEventListener("autosize:destroy",l,!1),"onpropertychange"in r&&"oninput"in r&&r.addEventListener("keyup",a,!1),window.addEventListener("resize",d,!1),r.addEventListener("input",a,!1),r.addEventListener("autosize:update",a,!1),r.style.overflowX="hidden",r.style.wordWrap="break-word",p.set(r,{destroy:l,update:a}),"vertical"===(e=window.getComputedStyle(r,null)).resize?r.style.resize="none":"both"===e.resize&&(r.style.resize="horizontal"),n="content-box"===e.boxSizing?-(parseFloat(e.paddingTop)+parseFloat(e.paddingBottom)):parseFloat(e.borderTopWidth)+parseFloat(e.borderBottomWidth),isNaN(n)&&(n=0),a()}function s(e){var t=r.style.width;r.style.width="0px",r.offsetWidth,r.style.width=t,r.style.overflowY=e}function u(){if(0!==r.scrollHeight){var e=function(e){for(var t=[];e&&e.parentNode&&e.parentNode instanceof Element;)e.parentNode.scrollTop&&t.push({node:e.parentNode,scrollTop:e.parentNode.scrollTop}),e=e.parentNode;return t}(r),t=document.documentElement&&document.documentElement.scrollTop;r.style.height="",r.style.height=r.scrollHeight+n+"px",o=r.clientWidth,e.forEach(function(e){e.node.scrollTop=e.scrollTop}),t&&(document.documentElement.scrollTop=t)}}function a(){u();var e=Math.round(parseFloat(r.style.height)),t=window.getComputedStyle(r,null),n="content-box"===t.boxSizing?Math.round(parseFloat(t.height)):r.offsetHeight;if(n<e?"hidden"===t.overflowY&&(s("scroll"),u(),n="content-box"===t.boxSizing?Math.round(parseFloat(window.getComputedStyle(r,null).height)):r.offsetHeight):"hidden"!==t.overflowY&&(s("hidden"),u(),n="content-box"===t.boxSizing?Math.round(parseFloat(window.getComputedStyle(r,null).height)):r.offsetHeight),i!==n){i=n;var o=c("autosize:resized");try{r.dispatchEvent(o)}catch(e){}}}}function i(e){var t=p.get(e);t&&t.destroy()}function d(e){var t=p.get(e);t&&t.update()}var l=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?((l=function(e){return e}).destroy=function(e){return e},l.update=function(e){return e}):((l=function(e,t){return e&&Array.prototype.forEach.call(e.length?e:[e],function(e){return r(e)}),e}).destroy=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],i),e},l.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],d),e}),t.default=l,e.exports=t.default});
!function(C,n,A,S){"use strict";n=void 0!==n&&n.Math==Math?n:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),C.fn.transition=function(){var u,r=C(this),p=r.selector||"",g=(new Date).getTime(),v=[],b=arguments,y=b[0],h=[].slice.call(arguments,1),w="string"==typeof y;n.requestAnimationFrame||n.mozRequestAnimationFrame||n.webkitRequestAnimationFrame||n.msRequestAnimationFrame;return r.each(function(t){var d,s,e,c,i,a,n,o,m,f=C(this),l=this;(m={initialize:function(){d=m.get.settings.apply(l,b),c=d.className,e=d.error,i=d.metadata,o="."+d.namespace,n="module-"+d.namespace,s=f.data(n)||m,a=m.get.animationEndEvent(),w&&(w=m.invoke(y)),!1===w&&(m.verbose("Converted arguments into settings object",d),d.interval?m.delay(d.animate):m.animate(),m.instantiate())},instantiate:function(){m.verbose("Storing instance of module",m),s=m,f.data(n,s)},destroy:function(){m.verbose("Destroying previous module for",l),f.removeData(n)},refresh:function(){m.verbose("Refreshing display type on next animation"),delete m.displayType},forceRepaint:function(){m.verbose("Forcing element repaint");var n=f.parent(),e=f.next();0===e.length?f.detach().appendTo(n):f.detach().insertBefore(e)},repaint:function(){m.verbose("Repainting element");l.offsetWidth},delay:function(n){var e,i=m.get.animationDirection();i||(i=m.can.transition()?m.get.direction():"static"),n=n!==S?n:d.interval,e="auto"==d.reverse&&i==c.outward||1==d.reverse?(r.length-t)*d.interval:t*d.interval,m.debug("Delaying animation by",e),setTimeout(m.animate,e)},animate:function(n){if(d=n||d,!m.is.supported())return m.error(e.support),!1;if(m.debug("Preparing animation",d.animation),m.is.animating()){if(d.queue)return!d.allowRepeats&&m.has.direction()&&m.is.occurring()&&!0!==m.queuing?m.debug("Animation is currently occurring, preventing queueing same animation",d.animation):m.queue(d.animation),!1;if(!d.allowRepeats&&m.is.occurring())return m.debug("Animation is already occurring, will not execute repeated animation",d.animation),!1;m.debug("New animation started, completing previous early",d.animation),s.complete()}m.can.animate()?m.set.animating(d.animation):m.error(e.noAnimation,d.animation,l)},reset:function(){m.debug("Resetting animation to beginning conditions"),m.remove.animationCallbacks(),m.restore.conditions(),m.remove.animating()},queue:function(n){m.debug("Queueing animation of",n),m.queuing=!0,f.one(a+".queue"+o,function(){m.queuing=!1,m.repaint(),m.animate.apply(this,d)})},complete:function(n){m.debug("Animation complete",d.animation),m.remove.completeCallback(),m.remove.failSafe(),m.is.looping()||(m.is.outward()?(m.verbose("Animation is outward, hiding element"),m.restore.conditions(),m.hide()):m.is.inward()?(m.verbose("Animation is outward, showing element"),m.restore.conditions(),m.show()):(m.verbose("Static animation completed"),m.restore.conditions(),d.onComplete.call(l)))},force:{visible:function(){var n=f.attr("style"),e=m.get.userStyle(),i=m.get.displayType(),t=e+"display: "+i+" !important;",a=f.css("display"),o=n===S||""===n;a!==i?(m.verbose("Overriding default display to show element",i),f.attr("style",t)):o&&f.removeAttr("style")},hidden:function(){var n=f.attr("style"),e=f.css("display"),i=n===S||""===n;"none"===e||m.is.hidden()?i&&f.removeAttr("style"):(m.verbose("Overriding default display to hide element"),f.css("display","none"))}},has:{direction:function(n){var i=!1;return"string"==typeof(n=n||d.animation)&&(n=n.split(" "),C.each(n,function(n,e){e!==c.inward&&e!==c.outward||(i=!0)})),i},inlineDisplay:function(){var n=f.attr("style")||"";return C.isArray(n.match(/display.*?;/,""))}},set:{animating:function(n){var e;m.remove.completeCallback(),n=n||d.animation,e=m.get.animationClass(n),m.save.animation(e),m.force.visible(),m.remove.hidden(),m.remove.direction(),m.start.animation(e)},duration:function(n,e){((e="number"==typeof(e=e||d.duration)?e+"ms":e)||0===e)&&(m.verbose("Setting animation duration",e),f.css({"animation-duration":e}))},direction:function(n){(n=n||m.get.direction())==c.inward?m.set.inward():m.set.outward()},looping:function(){m.debug("Transition set to loop"),f.addClass(c.looping)},hidden:function(){f.addClass(c.transition).addClass(c.hidden)},inward:function(){m.debug("Setting direction to inward"),f.removeClass(c.outward).addClass(c.inward)},outward:function(){m.debug("Setting direction to outward"),f.removeClass(c.inward).addClass(c.outward)},visible:function(){f.addClass(c.transition).addClass(c.visible)}},start:{animation:function(n){n=n||m.get.animationClass(),m.debug("Starting tween",n),f.addClass(n).one(a+".complete"+o,m.complete),d.useFailSafe&&m.add.failSafe(),m.set.duration(d.duration),d.onStart.call(l)}},save:{animation:function(n){m.cache||(m.cache={}),m.cache.animation=n},displayType:function(n){"none"!==n&&f.data(i.displayType,n)},transitionExists:function(n,e){C.fn.transition.exists[n]=e,m.verbose("Saving existence of transition",n,e)}},restore:{conditions:function(){var n=m.get.currentAnimation();n&&(f.removeClass(n),m.verbose("Removing animation class",m.cache)),m.remove.duration()}},add:{failSafe:function(){var n=m.get.duration();m.timer=setTimeout(function(){f.triggerHandler(a)},n+d.failSafeDelay),m.verbose("Adding fail safe timer",m.timer)}},remove:{animating:function(){f.removeClass(c.animating)},animationCallbacks:function(){m.remove.queueCallback(),m.remove.completeCallback()},queueCallback:function(){f.off(".queue"+o)},completeCallback:function(){f.off(".complete"+o)},display:function(){f.css("display","")},direction:function(){f.removeClass(c.inward).removeClass(c.outward)},duration:function(){f.css("animation-duration","")},failSafe:function(){m.verbose("Removing fail safe timer",m.timer),m.timer&&clearTimeout(m.timer)},hidden:function(){f.removeClass(c.hidden)},visible:function(){f.removeClass(c.visible)},looping:function(){m.debug("Transitions are no longer looping"),m.is.looping()&&(m.reset(),f.removeClass(c.looping))},transition:function(){f.removeClass(c.visible).removeClass(c.hidden)}},get:{settings:function(n,e,i){return"object"==typeof n?C.extend(!0,{},C.fn.transition.settings,n):"function"==typeof i?C.extend({},C.fn.transition.settings,{animation:n,onComplete:i,duration:e}):"string"==typeof e||"number"==typeof e?C.extend({},C.fn.transition.settings,{animation:n,duration:e}):"object"==typeof e?C.extend({},C.fn.transition.settings,e,{animation:n}):"function"==typeof e?C.extend({},C.fn.transition.settings,{animation:n,onComplete:e}):C.extend({},C.fn.transition.settings,{animation:n})},animationClass:function(n){var e=n||d.animation,i=m.can.transition()&&!m.has.direction()?m.get.direction()+" ":"";return c.animating+" "+c.transition+" "+i+e},currentAnimation:function(){return!(!m.cache||m.cache.animation===S)&&m.cache.animation},currentDirection:function(){return m.is.inward()?c.inward:c.outward},direction:function(){return m.is.hidden()||!m.is.visible()?c.inward:c.outward},animationDirection:function(n){var i;return"string"==typeof(n=n||d.animation)&&(n=n.split(" "),C.each(n,function(n,e){e===c.inward?i=c.inward:e===c.outward&&(i=c.outward)})),i||!1},duration:function(n){return!1===(n=n||d.duration)&&(n=f.css("animation-duration")||0),"string"==typeof n?-1<n.indexOf("ms")?parseFloat(n):1e3*parseFloat(n):n},displayType:function(n){return n=n===S||n,d.displayType?d.displayType:(n&&f.data(i.displayType)===S&&m.can.transition(!0),f.data(i.displayType))},userStyle:function(n){return(n=n||f.attr("style")||"").replace(/display.*?;/,"")},transitionExists:function(n){return C.fn.transition.exists[n]},animationStartEvent:function(){var n,e=A.createElement("div"),i={animation:"animationstart",OAnimation:"oAnimationStart",MozAnimation:"mozAnimationStart",WebkitAnimation:"webkitAnimationStart"};for(n in i)if(e.style[n]!==S)return i[n];return!1},animationEndEvent:function(){var n,e=A.createElement("div"),i={animation:"animationend",OAnimation:"oAnimationEnd",MozAnimation:"mozAnimationEnd",WebkitAnimation:"webkitAnimationEnd"};for(n in i)if(e.style[n]!==S)return i[n];return!1}},can:{transition:function(n){var e,i,t,a,o,r,s=d.animation,l=m.get.transitionExists(s),u=m.get.displayType(!1);if(l===S||n){if(m.verbose("Determining whether animation exists"),e=f.attr("class"),i=f.prop("tagName"),a=(t=C("<"+i+" />").addClass(e).insertAfter(f)).addClass(s).removeClass(c.inward).removeClass(c.outward).addClass(c.animating).addClass(c.transition).css("animationName"),o=t.addClass(c.inward).css("animationName"),u||(u=t.attr("class",e).removeAttr("style").removeClass(c.hidden).removeClass(c.visible).show().css("display"),m.verbose("Determining final display state",u),m.save.displayType(u)),t.remove(),a!=o)m.debug("Direction exists for animation",s),r=!0;else{if("none"==a||!a)return void m.debug("No animation defined in css",s);m.debug("Static animation found",s,u),r=!1}m.save.transitionExists(s,r)}return l!==S?l:r},animate:function(){return m.can.transition()!==S}},is:{animating:function(){return f.hasClass(c.animating)},inward:function(){return f.hasClass(c.inward)},outward:function(){return f.hasClass(c.outward)},looping:function(){return f.hasClass(c.looping)},occurring:function(n){return n="."+(n=n||d.animation).replace(" ","."),0<f.filter(n).length},visible:function(){return f.is(":visible")},hidden:function(){return"hidden"===f.css("visibility")},supported:function(){return!1!==a}},hide:function(){m.verbose("Hiding element"),m.is.animating()&&m.reset(),l.blur(),m.remove.display(),m.remove.visible(),m.set.hidden(),m.force.hidden(),d.onHide.call(l),d.onComplete.call(l)},show:function(n){m.verbose("Showing element",n),m.remove.hidden(),m.set.visible(),m.force.visible(),d.onShow.call(l),d.onComplete.call(l)},toggle:function(){m.is.visible()?m.hide():m.show()},stop:function(){m.debug("Stopping current animation"),f.triggerHandler(a)},stopAll:function(){m.debug("Stopping all animation"),m.remove.queueCallback(),f.triggerHandler(a)},clear:{queue:function(){m.debug("Clearing animation queue"),m.remove.queueCallback()}},enable:function(){m.verbose("Starting animation"),f.removeClass(c.disabled)},disable:function(){m.debug("Stopping animation"),f.addClass(c.disabled)},setting:function(n,e){if(m.debug("Changing setting",n,e),C.isPlainObject(n))C.extend(!0,d,n);else{if(e===S)return d[n];C.isPlainObject(d[n])?C.extend(!0,d[n],e):d[n]=e}},internal:function(n,e){if(C.isPlainObject(n))C.extend(!0,m,n);else{if(e===S)return m[n];m[n]=e}},debug:function(){!d.silent&&d.debug&&(d.performance?m.performance.log(arguments):(m.debug=Function.prototype.bind.call(console.info,console,d.name+":"),m.debug.apply(console,arguments)))},verbose:function(){!d.silent&&d.verbose&&d.debug&&(d.performance?m.performance.log(arguments):(m.verbose=Function.prototype.bind.call(console.info,console,d.name+":"),m.verbose.apply(console,arguments)))},error:function(){d.silent||(m.error=Function.prototype.bind.call(console.error,console,d.name+":"),m.error.apply(console,arguments))},performance:{log:function(n){var e,i;d.performance&&(i=(e=(new Date).getTime())-(g||e),g=e,v.push({Name:n[0],Arguments:[].slice.call(n,1)||"",Element:l,"Execution Time":i})),clearTimeout(m.performance.timer),m.performance.timer=setTimeout(m.performance.display,500)},display:function(){var n=d.name+":",i=0;g=!1,clearTimeout(m.performance.timer),C.each(v,function(n,e){i+=e["Execution Time"]}),n+=" "+i+"ms",p&&(n+=" '"+p+"'"),1<r.length&&(n+=" ("+r.length+")"),(console.group!==S||console.table!==S)&&0<v.length&&(console.groupCollapsed(n),console.table?console.table(v):C.each(v,function(n,e){console.log(e.Name+": "+e["Execution Time"]+"ms")}),console.groupEnd()),v=[]}},invoke:function(t,n,e){var a,o,i,r=s;return n=n||h,e=l||e,"string"==typeof t&&r!==S&&(t=t.split(/[\. ]/),a=t.length-1,C.each(t,function(n,e){var i=n!=a?e+t[n+1].charAt(0).toUpperCase()+t[n+1].slice(1):t;if(C.isPlainObject(r[i])&&n!=a)r=r[i];else{if(r[i]!==S)return o=r[i],!1;if(!C.isPlainObject(r[e])||n==a)return r[e]!==S&&(o=r[e]),!1;r=r[e]}})),C.isFunction(o)?i=o.apply(e,n):o!==S&&(i=o),C.isArray(u)?u.push(i):u!==S?u=[u,i]:i!==S&&(u=i),o!==S&&o}}).initialize()}),u!==S?u:this},C.fn.transition.exists={},C.fn.transition.settings={name:"Transition",silent:!1,debug:!1,verbose:!1,performance:!0,namespace:"transition",interval:0,reverse:"auto",onStart:function(){},onComplete:function(){},onShow:function(){},onHide:function(){},useFailSafe:!0,failSafeDelay:100,allowRepeats:!1,displayType:!1,animation:"fade",duration:!1,queue:!0,metadata:{displayType:"display"},className:{animating:"animating",disabled:"disabled",hidden:"hidden",inward:"in",loading:"loading",looping:"looping",outward:"out",transition:"transition",visible:"visible"},error:{noAnimation:"Element is no longer attached to DOM. Unable to animate.  Use silent setting to surpress this warning in production.",repeated:"That animation is already occurring, cancelling repeated animation",method:"The method you called is not defined",support:"This browser does not support CSS animations"}}}(jQuery,window,document);
!function(X,Y,G,J){"use strict";Y=void 0!==Y&&Y.Math==Math?Y:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),X.fn.aysDropdown=function(z){var P,H=X(this),j=X(G),N=H.selector||"",U="ontouchstart"in G.documentElement,K=(new Date).getTime(),W=[],B=z,$="string"==typeof B,Q=[].slice.call(arguments,1);return H.each(function(n){var e,t,i,a,o,s,r,m=X.isPlainObject(z)?X.extend(!0,{},X.fn.aysDropdown.settings,z):X.extend({},X.fn.aysDropdown.settings),h=m.className,c=m.message,l=m.fields,g=m.keys,p=m.metadata,u=m.namespace,d=m.regExp,b=m.selector,v=m.error,f=m.templates,w="."+u,x="module-"+u,C=X(this),S=X(m.context),y=C.find(b.text),A=C.find(b.search),T=C.find(b.sizer),k=C.find(b.input),L=C.find(b.icon),I=0<C.prev().find(b.text).length?C.prev().find(b.text):C.prev(),D=C.children(b.menu),q=D.find(b.item),R=!1,O=!1,V=!1,E=this,M=C.data(x),F={initialize:function(){F.debug("Initializing dropdown",m),F.is.alreadySetup()?F.setup.reference():(F.setup.layout(),m.values&&F.change.values(m.values),F.refreshData(),F.save.defaults(),F.restore.selected(),F.create.id(),F.bind.events(),F.observeChanges(),F.instantiate())},instantiate:function(){F.verbose("Storing instance of dropdown",F),M=F,C.data(x,F)},destroy:function(){F.verbose("Destroying previous dropdown",C),F.remove.tabbable(),C.off(w).removeData(x),D.off(w),j.off(a),F.disconnect.menuObserver(),F.disconnect.selectObserver()},observeChanges:function(){"MutationObserver"in Y&&(s=new MutationObserver(F.event.select.mutation),r=new MutationObserver(F.event.menu.mutation),F.debug("Setting up mutation observer",s,r),F.observe.select(),F.observe.menu())},disconnect:{menuObserver:function(){r&&r.disconnect()},selectObserver:function(){s&&s.disconnect()}},observe:{select:function(){F.has.input()&&s.observe(C[0],{childList:!0,subtree:!0})},menu:function(){F.has.menu()&&r.observe(D[0],{childList:!0,subtree:!0})}},create:{id:function(){o=(Math.random().toString(16)+"000000000").substr(2,8),a="."+o,F.verbose("Creating unique id for element",o)},userChoice:function(e){var n,i,a;return!!(e=e||F.get.userValues())&&(e=X.isArray(e)?e:[e],X.each(e,function(e,t){!1===F.get.item(t)&&(a=m.templates.addition(F.add.variables(c.addResult,t)),i=X("<div />").html(a).attr("data-"+p.value,t).attr("data-"+p.text,t).addClass(h.addition).addClass(h.item),m.hideAdditions&&i.addClass(h.hidden),n=n===J?i:n.add(i),F.verbose("Creating user choices for value",t,i))}),n)},userLabels:function(e){var t=F.get.userValues();t&&(F.debug("Adding user labels",t),X.each(t,function(e,t){F.verbose("Adding custom user value"),F.add.label(t,t)}))},menu:function(){D=X("<div />").addClass(h.menu).appendTo(C)},sizer:function(){T=X("<span />").addClass(h.sizer).insertAfter(A)}},search:function(e){e=e!==J?e:F.get.query(),F.verbose("Searching for query",e),F.has.minCharacters(e)?F.filter(e):F.hide()},select:{firstUnfiltered:function(){F.verbose("Selecting first non-filtered element"),F.remove.selectedItem(),q.not(b.unselectable).not(b.addition+b.hidden).eq(0).addClass(h.selected)},nextAvailable:function(e){var t=(e=e.eq(0)).nextAll(b.item).not(b.unselectable).eq(0),n=e.prevAll(b.item).not(b.unselectable).eq(0);0<t.length?(F.verbose("Moving selection to",t),t.addClass(h.selected)):(F.verbose("Moving selection to",n),n.addClass(h.selected))}},setup:{api:function(){var e={debug:m.debug,urlData:{value:F.get.value(),query:F.get.query()},on:!1};F.verbose("First request, initializing API"),C.api(e)},layout:function(){C.is("select")&&(F.setup.select(),F.setup.returnedObject()),F.has.menu()||F.create.menu(),F.is.search()&&!F.has.search()&&(F.verbose("Adding search input"),A=X("<input />").addClass(h.search).prop("autocomplete","off").insertBefore(y)),F.is.multiple()&&F.is.searchSelection()&&!F.has.sizer()&&F.create.sizer(),m.allowTab&&F.set.tabbable()},select:function(){var e=F.get.selectValues();F.debug("Dropdown initialized on a select",e),C.is("select")&&(k=C),0<k.parent(b.dropdown).length?(F.debug("UI dropdown already exists. Creating dropdown menu only"),C=k.closest(b.dropdown),F.has.menu()||F.create.menu(),D=C.children(b.menu),F.setup.menu(e)):(F.debug("Creating entire dropdown from select"),C=X("<div />").attr("class",k.attr("class")).addClass(h.selection).addClass(h.dropdown).html(f.dropdown(e)).insertBefore(k),k.hasClass(h.multiple)&&!1===k.prop("multiple")&&(F.error(v.missingMultiple),k.prop("multiple",!0)),k.is("[multiple]")&&F.set.multiple(),k.prop("disabled")&&(F.debug("Disabling dropdown"),C.addClass(h.disabled)),k.removeAttr("class").detach().prependTo(C)),F.refresh()},menu:function(e){D.html(f.menu(e,l)),q=D.find(b.item)},reference:function(){F.debug("Dropdown behavior was called on select, replacing with closest dropdown"),C=C.parent(b.dropdown),M=C.data(x),E=C.get(0),F.refresh(),F.setup.returnedObject()},returnedObject:function(){var e=H.slice(0,n),t=H.slice(n+1);H=e.add(C).add(t)}},refresh:function(){F.refreshSelectors(),F.refreshData()},refreshItems:function(){q=D.find(b.item)},refreshSelectors:function(){F.verbose("Refreshing selector cache"),y=C.find(b.text),A=C.find(b.search),k=C.find(b.input),L=C.find(b.icon),I=0<C.prev().find(b.text).length?C.prev().find(b.text):C.prev(),D=C.children(b.menu),q=D.find(b.item)},refreshData:function(){F.verbose("Refreshing cached metadata"),q.removeData(p.text).removeData(p.value)},clearData:function(){F.verbose("Clearing metadata"),q.removeData(p.text).removeData(p.value),C.removeData(p.defaultText).removeData(p.defaultValue).removeData(p.placeholderText)},toggle:function(){F.verbose("Toggling menu visibility"),F.is.active()?F.hide():F.show()},show:function(e){if(e=X.isFunction(e)?e:function(){},!F.can.show()&&F.is.remote()&&(F.debug("No API results retrieved, searching before show"),F.queryRemote(F.get.query(),F.show)),F.can.show()&&!F.is.active()){if(F.debug("Showing dropdown"),!F.has.message()||F.has.maxSelections()||F.has.allResultsFiltered()||F.remove.message(),F.is.allFiltered())return!0;!1!==m.onShow.call(E)&&F.animate.show(function(){F.can.click()&&F.bind.intent(),F.has.menuSearch()&&F.focusSearch(),F.set.visible(),e.call(E)})}},hide:function(e){e=X.isFunction(e)?e:function(){},F.is.active()&&!F.is.animatingOutward()&&(F.debug("Hiding dropdown"),!1!==m.onHide.call(E)&&F.animate.hide(function(){F.remove.visible(),e.call(E)}))},hideOthers:function(){F.verbose("Finding other dropdowns to hide"),H.not(C).has(b.menu+"."+h.visible).aysDropdown("hide")},hideMenu:function(){F.verbose("Hiding menu  instantaneously"),F.remove.active(),F.remove.visible(),D.transition("hide")},hideSubMenus:function(){var e=D.children(b.item).find(b.menu);F.verbose("Hiding sub menus",e),e.transition("hide")},bind:{events:function(){U&&F.bind.touchEvents(),F.bind.keyboardEvents(),F.bind.inputEvents(),F.bind.mouseEvents()},touchEvents:function(){F.debug("Touch device detected binding additional touch events"),F.is.searchSelection()||F.is.single()&&C.on("touchstart"+w,F.event.test.toggle),D.on("touchstart"+w,b.item,F.event.item.mouseenter)},keyboardEvents:function(){F.verbose("Binding keyboard events"),C.on("keydown"+w,F.event.keydown),F.has.search()&&C.on(F.get.inputEvent()+w,b.search,F.event.input),F.is.multiple()&&j.on("keydown"+a,F.event.document.keydown)},inputEvents:function(){F.verbose("Binding input change events"),C.on("change"+w,b.input,F.event.change)},mouseEvents:function(){F.verbose("Binding mouse events"),F.is.multiple()&&C.on("click"+w,b.label,F.event.label.click).on("click"+w,b.remove,F.event.remove.click),F.is.searchSelection()?(C.on("mousedown"+w,F.event.mousedown).on("mouseup"+w,F.event.mouseup).on("mousedown"+w,b.menu,F.event.menu.mousedown).on("mouseup"+w,b.menu,F.event.menu.mouseup).on("click"+w,b.icon,F.event.icon.click).on("focus"+w,b.search,F.event.search.focus).on("click"+w,b.search,F.event.search.focus).on("blur"+w,b.search,F.event.search.blur).on("click"+w,b.text,F.event.text.focus),F.is.multiple()&&C.on("click"+w,F.event.click)):("click"==m.on?C.on("click"+w,F.event.test.toggle):"hover"==m.on?C.on("mouseenter"+w,F.delay.show).on("mouseleave"+w,F.delay.hide):C.on(m.on+w,F.toggle),C.on("click"+w,b.icon,F.event.icon.click).on("mousedown"+w,F.event.mousedown).on("mouseup"+w,F.event.mouseup).on("focus"+w,F.event.focus),F.has.menuSearch()?C.on("blur"+w,b.search,F.event.search.blur):C.on("blur"+w,F.event.blur)),D.on("mouseenter"+w,b.item,F.event.item.mouseenter).on("mouseleave"+w,b.item,F.event.item.mouseleave).on("click"+w,b.item,F.event.item.click)},intent:function(){F.verbose("Binding hide intent event to document"),U&&j.on("touchstart"+a,F.event.test.touch).on("touchmove"+a,F.event.test.touch),j.on("click"+a,F.event.test.hide)}},unbind:{intent:function(){F.verbose("Removing hide intent event from document"),U&&j.off("touchstart"+a).off("touchmove"+a),j.off("click"+a)}},filter:function(e){function t(){F.is.multiple()&&F.filterActive(),(e||!e&&0==F.get.activeItem().length)&&F.select.firstUnfiltered(),F.has.allResultsFiltered()?m.onNoResults.call(E,n)?m.allowAdditions?m.hideAdditions&&(F.verbose("User addition with no menu, setting empty style"),F.set.empty(),F.hideMenu()):(F.verbose("All items filtered, showing message",n),F.add.message(c.noResults)):(F.verbose("All items filtered, hiding dropdown",n),F.hideMenu()):(F.remove.empty(),F.remove.message()),m.allowAdditions&&F.add.userSuggestion(e),F.is.searchSelection()&&F.can.show()&&F.is.focusedOnSearch()&&F.show()}var n=e!==J?e:F.get.query();m.useLabels&&F.has.maxSelections()||(m.apiSettings?F.can.useAPI()?F.queryRemote(n,function(){m.filterRemoteData&&F.filterItems(n),t()}):F.error(v.noAPI):(F.filterItems(n),t()))},queryRemote:function(e,n){var t={errorDuration:!1,cache:"local",throttle:m.throttle,urlData:{query:e},onError:function(){F.add.message(c.serverError),n()},onFailure:function(){F.add.message(c.serverError),n()},onSuccess:function(e){var t=e[l.remoteValues];X.isArray(t)&&0<t.length?(F.remove.message(),F.setup.menu({values:e[l.remoteValues]})):F.add.message(c.noResults),n()}};C.api("get request")||F.setup.api(),t=X.extend(!0,{},t,m.apiSettings),C.api("setting",t).api("query")},filterItems:function(e){var i=e!==J?e:F.get.query(),a=null,t=F.escape.string(i),o=new RegExp("^"+t,"igm");F.has.query()&&(a=[],F.verbose("Searching for matching values",i),q.each(function(){var e,t,n=X(this);if("both"==m.match||"text"==m.match){if(-1!==(e=String(F.get.choiceText(n,!1))).search(o))return a.push(this),!0;if("exact"===m.fullTextSearch&&F.exactSearch(i,e))return a.push(this),!0;if(!0===m.fullTextSearch&&F.fuzzySearch(i,e))return a.push(this),!0}if("both"==m.match||"value"==m.match){if(-1!==(t=String(F.get.choiceValue(n,e))).search(o))return a.push(this),!0;if("exact"===m.fullTextSearch&&F.exactSearch(i,t))return a.push(this),!0;if(!0===m.fullTextSearch&&F.fuzzySearch(i,t))return a.push(this),!0}})),F.debug("Showing only matched items",i),F.remove.filteredItem(),a&&q.not(a).addClass(h.filtered)},fuzzySearch:function(e,t){var n=t.length,i=e.length;if(e=e.toLowerCase(),t=t.toLowerCase(),n<i)return!1;if(i===n)return e===t;e:for(var a=0,o=0;a<i;a++){for(var s=e.charCodeAt(a);o<n;)if(t.charCodeAt(o++)===s)continue e;return!1}return!0},exactSearch:function(e,t){return e=e.toLowerCase(),-1<(t=t.toLowerCase()).indexOf(e)},filterActive:function(){m.useLabels&&q.filter("."+h.active).addClass(h.filtered)},focusSearch:function(e){F.has.search()&&!F.is.focusedOnSearch()&&(e?(C.off("focus"+w,b.search),A.focus(),C.on("focus"+w,b.search,F.event.search.focus)):A.focus())},forceSelection:function(){var e=q.not(h.filtered).filter("."+h.selected).eq(0),t=q.not(h.filtered).filter("."+h.active).eq(0),n=0<e.length?e:t;if(0<n.length&&!F.is.multiple())return F.debug("Forcing partial selection to selected item",n),void F.event.item.click.call(n,{},!0);m.allowAdditions&&F.set.selected(F.get.query()),F.remove.searchTerm()},change:{values:function(e){m.allowAdditions||F.clear(),F.debug("Creating dropdown with specified values",e),F.setup.menu({values:e}),X.each(e,function(e,t){if(1==t.selected)return F.debug("Setting initial selection to",t.value),F.set.selected(t.value),!0})}},event:{change:function(){V||(F.debug("Input changed, updating selection"),F.set.selected())},focus:function(){m.showOnFocus&&!R&&F.is.hidden()&&!t&&F.show()},blur:function(e){t=G.activeElement===this,R||t||(F.remove.activeLabel(),F.hide())},mousedown:function(){F.is.searchSelection()?i=!0:R=!0},mouseup:function(){F.is.searchSelection()?i=!1:R=!1},click:function(e){X(e.target).is(C)&&(F.is.focusedOnSearch()?F.show():F.focusSearch())},search:{focus:function(){R=!0,F.is.multiple()&&F.remove.activeLabel(),m.showOnFocus&&F.search()},blur:function(e){t=G.activeElement===this,F.is.searchSelection()&&!i&&(O||t||(m.forceSelection&&F.forceSelection(),F.hide())),i=!1}},icon:{click:function(e){L.hasClass(h.clear)?F.clear():F.can.click()&&F.toggle()}},text:{focus:function(e){R=!0,F.focusSearch()}},input:function(e){(F.is.multiple()||F.is.searchSelection())&&F.set.filtered(),clearTimeout(F.timer),F.timer=setTimeout(F.search,m.delay.search)},label:{click:function(e){var t=X(this),n=C.find(b.label),i=n.filter("."+h.active),a=t.nextAll("."+h.active),o=t.prevAll("."+h.active),s=0<a.length?t.nextUntil(a).add(i).add(t):t.prevUntil(o).add(i).add(t);e.shiftKey?(i.removeClass(h.active),s.addClass(h.active)):e.ctrlKey?t.toggleClass(h.active):(i.removeClass(h.active),t.addClass(h.active)),m.onLabelSelect.apply(this,n.filter("."+h.active))}},remove:{click:function(){var e=X(this).parent();e.hasClass(h.active)?F.remove.activeLabels():F.remove.activeLabels(e)}},test:{toggle:function(e){var t=F.is.multiple()?F.show:F.toggle;F.is.bubbledLabelClick(e)||F.is.bubbledIconClick(e)||F.determine.eventOnElement(e,t)&&e.preventDefault()},touch:function(e){F.determine.eventOnElement(e,function(){"touchstart"==e.type?F.timer=setTimeout(function(){F.hide()},m.delay.touch):"touchmove"==e.type&&clearTimeout(F.timer)}),e.stopPropagation()},hide:function(e){F.determine.eventInModule(e,F.hide)}},select:{mutation:function(e){F.debug("<select> modified, recreating menu");var n=!1;X.each(e,function(e,t){if(X(t.target).is("select")||X(t.addedNodes).is("select"))return n=!0}),n&&(F.disconnect.selectObserver(),F.refresh(),F.setup.select(),F.set.selected(),F.observe.select())}},menu:{mutation:function(e){var t=e[0],n=t.addedNodes?X(t.addedNodes[0]):X(!1),i=t.removedNodes?X(t.removedNodes[0]):X(!1),a=n.add(i),o=a.is(b.addition)||0<a.closest(b.addition).length,s=a.is(b.message)||0<a.closest(b.message).length;o||s?(F.debug("Updating item selector cache"),F.refreshItems()):(F.debug("Menu modified, updating selector cache"),F.refresh())},mousedown:function(){O=!0},mouseup:function(){O=!1}},item:{mouseenter:function(e){var t=X(e.target),n=X(this),i=n.children(b.menu),a=n.siblings(b.item).children(b.menu),o=0<i.length;0<i.find(t).length||!o||(clearTimeout(F.itemTimer),F.itemTimer=setTimeout(function(){F.verbose("Showing sub-menu",i),X.each(a,function(){F.animate.hide(!1,X(this))}),F.animate.show(!1,i)},m.delay.show),e.preventDefault())},mouseleave:function(e){var t=X(this).children(b.menu);0<t.length&&(clearTimeout(F.itemTimer),F.itemTimer=setTimeout(function(){F.verbose("Hiding sub-menu",t),F.animate.hide(!1,t)},m.delay.hide))},click:function(e,t){var n=X(this),i=X(e?e.target:""),a=n.find(b.menu),o=F.get.choiceText(n),s=F.get.choiceValue(n,o),r=0<a.length,l=0<a.find(i).length;F.has.menuSearch()&&X(G.activeElement).blur(),l||r&&!m.allowCategorySelection||(F.is.searchSelection()&&(m.allowAdditions&&F.remove.userAddition(),F.remove.searchTerm(),F.is.focusedOnSearch()||1==t||F.focusSearch(!0)),m.useLabels||(F.remove.filteredItem(),F.set.scrollPosition(n)),F.determine.selectAction.call(this,o,s))}},document:{keydown:function(e){var t=e.which;if(F.is.inObject(t,g)){var n=C.find(b.label),i=n.filter("."+h.active),a=(i.data(p.value),n.index(i)),o=n.length,s=0<i.length,r=1<i.length,l=0===a,c=a+1==o,u=F.is.searchSelection(),d=F.is.focusedOnSearch(),v=F.is.focused(),f=d&&0===F.get.caretPosition();if(u&&!s&&!d)return;t==g.leftArrow?!v&&!f||s?s&&(e.shiftKey?F.verbose("Adding previous label to selection"):(F.verbose("Selecting previous label"),n.removeClass(h.active)),l&&!r?i.addClass(h.active):i.prev(b.siblingLabel).addClass(h.active).end(),e.preventDefault()):(F.verbose("Selecting previous label"),n.last().addClass(h.active)):t==g.rightArrow?(v&&!s&&n.first().addClass(h.active),s&&(e.shiftKey?F.verbose("Adding next label to selection"):(F.verbose("Selecting next label"),n.removeClass(h.active)),c?u?d?n.removeClass(h.active):F.focusSearch():r?i.next(b.siblingLabel).addClass(h.active):i.addClass(h.active):i.next(b.siblingLabel).addClass(h.active),e.preventDefault())):t==g.deleteKey||t==g.backspace?s?(F.verbose("Removing active labels"),c&&u&&!d&&F.focusSearch(),i.last().next(b.siblingLabel).addClass(h.active),F.remove.activeLabels(i),e.preventDefault()):f&&!s&&t==g.backspace&&(F.verbose("Removing last label on input backspace"),i=n.last().addClass(h.active),F.remove.activeLabels(i)):i.removeClass(h.active)}}},keydown:function(e){var t=e.which;if(F.is.inObject(t,g)){var n,i=q.not(b.unselectable).filter("."+h.selected).eq(0),a=D.children("."+h.active).eq(0),o=0<i.length?i:a,s=0<o.length?o.siblings(":not(."+h.filtered+")").addBack():D.children(":not(."+h.filtered+")"),r=o.children(b.menu),l=o.closest(b.menu),c=l.hasClass(h.visible)||l.hasClass(h.animating)||0<l.parent(b.menu).length,u=0<r.length,d=0<o.length,v=0<o.not(b.unselectable).length,f=t==g.delimiter&&m.allowAdditions&&F.is.multiple();if(m.allowAdditions&&m.hideAdditions&&(t==g.enter||f)&&v&&(F.verbose("Selecting item from keyboard shortcut",o),F.event.item.click.call(o,e),F.is.searchSelection()&&F.remove.searchTerm()),F.is.visible()){if(t!=g.enter&&!f||(t==g.enter&&d&&u&&!m.allowCategorySelection?(F.verbose("Pressed enter on unselectable category, opening sub menu"),t=g.rightArrow):v&&(F.verbose("Selecting item from keyboard shortcut",o),F.event.item.click.call(o,e),F.is.searchSelection()&&F.remove.searchTerm()),e.preventDefault()),d&&(t==g.leftArrow&&l[0]!==D[0]&&(F.verbose("Left key pressed, closing sub-menu"),F.animate.hide(!1,l),o.removeClass(h.selected),l.closest(b.item).addClass(h.selected),e.preventDefault()),t==g.rightArrow&&u&&(F.verbose("Right key pressed, opening sub-menu"),F.animate.show(!1,r),o.removeClass(h.selected),r.find(b.item).eq(0).addClass(h.selected),e.preventDefault())),t==g.upArrow){if(n=d&&c?o.prevAll(b.item+":not("+b.unselectable+")").eq(0):q.eq(0),s.index(n)<0)return F.verbose("Up key pressed but reached top of current menu"),void e.preventDefault();F.verbose("Up key pressed, changing active item"),o.removeClass(h.selected),n.addClass(h.selected),F.set.scrollPosition(n),m.selectOnKeydown&&F.is.single()&&F.set.selectedItem(n),e.preventDefault()}if(t==g.downArrow){if(0===(n=d&&c?n=o.nextAll(b.item+":not("+b.unselectable+")").eq(0):q.eq(0)).length)return F.verbose("Down key pressed but reached bottom of current menu"),void e.preventDefault();F.verbose("Down key pressed, changing active item"),q.removeClass(h.selected),n.addClass(h.selected),F.set.scrollPosition(n),m.selectOnKeydown&&F.is.single()&&F.set.selectedItem(n),e.preventDefault()}t==g.pageUp&&(F.scrollPage("up"),e.preventDefault()),t==g.pageDown&&(F.scrollPage("down"),e.preventDefault()),t==g.escape&&(F.verbose("Escape key pressed, closing dropdown"),F.hide())}else f&&e.preventDefault(),t!=g.downArrow||F.is.visible()||(F.verbose("Down key pressed, showing dropdown"),F.show(),e.preventDefault())}else F.has.search()||F.set.selectedLetter(String.fromCharCode(t))}},trigger:{change:function(){var e=G.createEvent("HTMLEvents"),t=k[0];t&&(F.verbose("Triggering native change event"),e.initEvent("change",!0,!1),t.dispatchEvent(e))}},determine:{selectAction:function(e,t){F.verbose("Determining action",m.action),X.isFunction(F.action[m.action])?(F.verbose("Triggering preset action",m.action,e,t),F.action[m.action].call(E,e,t,this)):X.isFunction(m.action)?(F.verbose("Triggering user action",m.action,e,t),m.action.call(E,e,t,this)):F.error(v.action,m.action)},eventInModule:function(e,t){var n=X(e.target),i=0<n.closest(G.documentElement).length,a=0<n.closest(C).length;return t=X.isFunction(t)?t:function(){},i&&!a?(F.verbose("Triggering event",t),t(),!0):(F.verbose("Event occurred in dropdown, canceling callback"),!1)},eventOnElement:function(e,t){var n=X(e.target),i=n.closest(b.siblingLabel),a=G.body.contains(e.target),o=0===C.find(i).length,s=0===n.closest(D).length;return t=X.isFunction(t)?t:function(){},a&&o&&s?(F.verbose("Triggering event",t),t(),!0):(F.verbose("Event occurred in dropdown menu, canceling callback"),!1)}},action:{nothing:function(){},activate:function(e,t,n){if(t=t!==J?t:e,F.can.activate(X(n))){if(F.set.selected(t,X(n)),F.is.multiple()&&!F.is.allFiltered())return;F.hideAndClear()}},select:function(e,t,n){if(t=t!==J?t:e,F.can.activate(X(n))){if(F.set.value(t,e,X(n)),F.is.multiple()&&!F.is.allFiltered())return;F.hideAndClear()}},combo:function(e,t,n){t=t!==J?t:e,F.set.selected(t,X(n)),F.hideAndClear()},hide:function(e,t,n){F.set.value(t,e,X(n)),F.hideAndClear()}},get:{id:function(){return o},defaultText:function(){return C.data(p.defaultText)},defaultValue:function(){return C.data(p.defaultValue)},placeholderText:function(){return"auto"!=m.placeholder&&"string"==typeof m.placeholder?m.placeholder:C.data(p.placeholderText)||""},text:function(){return y.text()},query:function(){return X.trim(A.val())},searchWidth:function(e){return e=e!==J?e:A.val(),T.text(e),Math.ceil(T.width()+1)},selectionCount:function(){var e=F.get.values();return F.is.multiple()?X.isArray(e)?e.length:0:""!==F.get.value()?1:0},transition:function(e){return"auto"==m.transition?F.is.upward(e)?"slide up":"slide down":m.transition},userValues:function(){var e=F.get.values();return!!e&&(e=X.isArray(e)?e:[e],X.grep(e,function(e){return!1===F.get.item(e)}))},uniqueArray:function(n){return X.grep(n,function(e,t){return X.inArray(e,n)===t})},caretPosition:function(){var e,t,n=A.get(0);return"selectionStart"in n?n.selectionStart:G.selection?(n.focus(),t=(e=G.selection.createRange()).text.length,e.moveStart("character",-n.value.length),e.text.length-t):void 0},value:function(){var e=0<k.length?k.val():C.data(p.value),t=X.isArray(e)&&1===e.length&&""===e[0];return e===J||t?"":e},values:function(){var e=F.get.value();return""===e?"":!F.has.selectInput()&&F.is.multiple()?"string"==typeof e?e.split(m.delimiter):"":e},remoteValues:function(){var e=F.get.values(),i=!1;return e&&("string"==typeof e&&(e=[e]),X.each(e,function(e,t){var n=F.read.remoteData(t);F.verbose("Restoring value from session data",n,t),n&&((i=i||{})[t]=n)})),i},choiceText:function(e,t){if(t=t!==J?t:m.preserveHTML,e)return 0<e.find(b.menu).length&&(F.verbose("Retrieving text of element with sub-menu"),(e=e.clone()).find(b.menu).remove(),e.find(b.menuIcon).remove()),e.data(p.text)!==J?e.data(p.text):t?X.trim(e.html()):X.trim(e.text())},choiceValue:function(e,t){return t=t||F.get.choiceText(e),!!e&&(e.data(p.value)!==J?String(e.data(p.value)):"string"==typeof t?X.trim(t.toLowerCase()):String(t))},inputEvent:function(){var e=A[0];return!!e&&(e.oninput!==J?"input":e.onpropertychange!==J?"propertychange":"keyup")},selectValues:function(){var a={values:[]};return C.find("option").each(function(){var e=X(this),t=e.html(),n=e.attr("disabled"),i=e.attr("value")!==J?e.attr("value"):t;"auto"===m.placeholder&&""===i?a.placeholder=t:a.values.push({name:t,value:i,disabled:n})}),m.placeholder&&"auto"!==m.placeholder&&(F.debug("Setting placeholder value to",m.placeholder),a.placeholder=m.placeholder),m.sortSelect?(a.values.sort(function(e,t){return e.name>t.name?1:-1}),F.debug("Retrieved and sorted values from select",a)):F.debug("Retrieved values from select",a),a},activeItem:function(){return q.filter("."+h.active)},selectedItem:function(){var e=q.not(b.unselectable).filter("."+h.selected);return 0<e.length?e:q.eq(0)},itemWithAdditions:function(e){var t=F.get.item(e),n=F.create.userChoice(e);return n&&0<n.length&&(t=0<t.length?t.add(n):n),t},item:function(i,a){var e,o,s=!1;return i=i!==J?i:F.get.values()!==J?F.get.values():F.get.text(),e=o?0<i.length:i!==J&&null!==i,o=F.is.multiple()&&X.isArray(i),a=""===i||0===i||(a||!1),e&&q.each(function(){var e=X(this),t=F.get.choiceText(e),n=F.get.choiceValue(e,t);if(null!==n&&n!==J)if(o)-1===X.inArray(String(n),i)&&-1===X.inArray(t,i)||(s=s?s.add(e):e);else if(a){if(F.verbose("Ambiguous dropdown value using strict type check",e,i),n===i||t===i)return s=e,!0}else if(String(n)==String(i)||t==i)return F.verbose("Found select item by value",n,i),s=e,!0}),s}},check:{maxSelections:function(e){return!m.maxSelections||((e=e!==J?e:F.get.selectionCount())>=m.maxSelections?(F.debug("Maximum selection count reached"),m.useLabels&&(q.addClass(h.filtered),F.add.message(c.maxSelections)),!0):(F.verbose("No longer at maximum selection count"),F.remove.message(),F.remove.filteredItem(),F.is.searchSelection()&&F.filterItems(),!1))}},restore:{defaults:function(){F.clear(),F.restore.defaultText(),F.restore.defaultValue()},defaultText:function(){var e=F.get.defaultText();e===F.get.placeholderText?(F.debug("Restoring default placeholder text",e),F.set.placeholderText(e)):(F.debug("Restoring default text",e),F.set.text(e))},placeholderText:function(){F.set.placeholderText()},defaultValue:function(){var e=F.get.defaultValue();e!==J&&(F.debug("Restoring default value",e),""!==e?(F.set.value(e),F.set.selected()):(F.remove.activeItem(),F.remove.selectedItem()))},labels:function(){m.allowAdditions&&(m.useLabels||(F.error(v.labels),m.useLabels=!0),F.debug("Restoring selected values"),F.create.userLabels()),F.check.maxSelections()},selected:function(){F.restore.values(),F.is.multiple()?(F.debug("Restoring previously selected values and labels"),F.restore.labels()):F.debug("Restoring previously selected values")},values:function(){F.set.initialLoad(),m.apiSettings&&m.saveRemoteData&&F.get.remoteValues()?F.restore.remoteValues():F.set.selected(),F.remove.initialLoad()},remoteValues:function(){var e=F.get.remoteValues();F.debug("Recreating selected from session data",e),e&&(F.is.single()?X.each(e,function(e,t){F.set.text(t)}):X.each(e,function(e,t){F.add.label(e,t)}))}},read:{remoteData:function(e){var t;if(Y.Storage!==J)return(t=sessionStorage.getItem(e))!==J&&t;F.error(v.noStorage)}},save:{defaults:function(){F.save.defaultText(),F.save.placeholderText(),F.save.defaultValue()},defaultValue:function(){var e=F.get.value();F.verbose("Saving default value as",e),C.data(p.defaultValue,e)},defaultText:function(){var e=F.get.text();F.verbose("Saving default text as",e),C.data(p.defaultText,e)},placeholderText:function(){var e;!1!==m.placeholder&&y.hasClass(h.placeholder)&&(e=F.get.text(),F.verbose("Saving placeholder text as",e),C.data(p.placeholderText,e))},remoteData:function(e,t){Y.Storage!==J?(F.verbose("Saving remote data to session storage",t,e),sessionStorage.setItem(t,e)):F.error(v.noStorage)}},clear:function(){F.is.multiple()&&m.useLabels?F.remove.labels():(F.remove.activeItem(),F.remove.selectedItem()),F.set.placeholderText(),F.clearValue()},clearValue:function(){F.set.value("")},scrollPage:function(e,t){var n=t||F.get.selectedItem(),i=n.closest(b.menu),a=i.outerHeight(),o=i.scrollTop(),s=q.eq(0).outerHeight(),r=Math.floor(a/s),l=(i.prop("scrollHeight"),"up"==e?o-s*r:o+s*r),c=q.not(b.unselectable),u="up"==e?c.index(n)-r:c.index(n)+r,d=("up"==e?0<=u:u<c.length)?c.eq(u):"up"==e?c.first():c.last();0<d.length&&(F.debug("Scrolling page",e,d),n.removeClass(h.selected),d.addClass(h.selected),m.selectOnKeydown&&F.is.single()&&F.set.selectedItem(d),i.scrollTop(l))},set:{filtered:function(){var e=F.is.multiple(),t=F.is.searchSelection(),n=e&&t,i=t?F.get.query():"",a="string"==typeof i&&0<i.length,o=F.get.searchWidth(),s=""!==i;e&&a&&(F.verbose("Adjusting input width",o,m.glyphWidth),A.css("width",o)),a||n&&s?(F.verbose("Hiding placeholder text"),y.addClass(h.filtered)):e&&(!n||s)||(F.verbose("Showing placeholder text"),y.removeClass(h.filtered))},empty:function(){C.addClass(h.empty)},loading:function(){C.addClass(h.loading)},placeholderText:function(e){e=e||F.get.placeholderText(),F.debug("Setting placeholder text",e),F.set.text(e),y.addClass(h.placeholder)},tabbable:function(){F.is.searchSelection()?(F.debug("Added tabindex to searchable dropdown"),A.val("").attr("tabindex",0),D.attr("tabindex",-1)):(F.debug("Added tabindex to dropdown"),C.attr("tabindex")===J&&(C.attr("tabindex",0),D.attr("tabindex",-1)))},initialLoad:function(){F.verbose("Setting initial load"),e=!0},activeItem:function(e){m.allowAdditions&&0<e.filter(b.addition).length?e.addClass(h.filtered):e.addClass(h.active)},partialSearch:function(e){var t=F.get.query().length;A.val(e.substr(0,t))},scrollPosition:function(e,t){var n,i,a,o,s=(e=e||F.get.selectedItem()).closest(b.menu),r=e&&0<e.length;t=t!==J&&t,e&&0<s.length&&r&&(e.position().top,s.addClass(h.loading),n=(i=s.scrollTop())-s.offset().top+e.offset().top,t||(o=i+s.height()<n+5,a=n-5<i),F.debug("Scrolling to active item",n),(t||a||o)&&s.scrollTop(n),s.removeClass(h.loading))},text:function(e){"select"!==m.action&&("combo"==m.action?(F.debug("Changing combo button text",e,I),m.preserveHTML?I.html(e):I.text(e)):(e!==F.get.placeholderText()&&y.removeClass(h.placeholder),F.debug("Changing text",e,y),y.removeClass(h.filtered),m.preserveHTML?y.html(e):y.text(e)))},selectedItem:function(e){var t=F.get.choiceValue(e),n=F.get.choiceText(e,!1),i=F.get.choiceText(e,!0);F.debug("Setting user selection to item",e),F.remove.activeItem(),F.set.partialSearch(n),F.set.activeItem(e),F.set.selected(t,e),F.set.text(i)},selectedLetter:function(e){var t,n=q.filter("."+h.selected),i=0<n.length&&F.has.firstLetter(n,e),a=!1;i&&(t=n.nextAll(q).eq(0),F.has.firstLetter(t,e)&&(a=t)),a||q.each(function(){if(F.has.firstLetter(X(this),e))return a=X(this),!1}),a&&(F.verbose("Scrolling to next value with letter",e),F.set.scrollPosition(a),n.removeClass(h.selected),a.addClass(h.selected),m.selectOnKeydown&&F.is.single()&&F.set.selectedItem(a))},direction:function(e){"auto"==m.direction?(F.remove.upward(),F.can.openDownward(e)?F.remove.upward(e):F.set.upward(e),F.is.leftward(e)||F.can.openRightward(e)||F.set.leftward(e)):"upward"==m.direction&&F.set.upward(e)},upward:function(e){(e||C).addClass(h.upward)},leftward:function(e){(e||D).addClass(h.leftward)},value:function(e,t,n){var i=F.escape.value(e),a=0<k.length,o=F.get.values(),s=e!==J?String(e):e;if(a){if(!m.allowReselection&&s==o&&(F.verbose("Skipping value update already same value",e,o),!F.is.initialLoad()))return;F.is.single()&&F.has.selectInput()&&F.can.extendSelect()&&(F.debug("Adding user option",e),F.add.optionValue(e)),F.debug("Updating input value",i,o),V=!0,k.val(i),!1===m.fireOnInit&&F.is.initialLoad()?F.debug("Input native change event ignored on initial load"):F.trigger.change(),V=!1}else F.verbose("Storing value in metadata",i,k),i!==o&&C.data(p.value,s);F.is.single()&&m.clearable&&(i?F.set.clearable():F.remove.clearable()),!1===m.fireOnInit&&F.is.initialLoad()?F.verbose("No callback on initial load",m.onChange):m.onChange.call(E,e,t,n)},active:function(){C.addClass(h.active)},multiple:function(){C.addClass(h.multiple)},visible:function(){C.addClass(h.visible)},exactly:function(e,t){F.debug("Setting selected to exact values"),F.clear(),F.set.selected(e,t)},selected:function(e,r){var l=F.is.multiple();(r=m.allowAdditions?r||F.get.itemWithAdditions(e):r||F.get.item(e))&&(F.debug("Setting selected menu item to",r),F.is.multiple()&&F.remove.searchWidth(),F.is.single()?(F.remove.activeItem(),F.remove.selectedItem()):m.useLabels&&F.remove.selectedItem(),r.each(function(){var e=X(this),t=F.get.choiceText(e),n=F.get.choiceValue(e,t),i=e.hasClass(h.filtered),a=e.hasClass(h.active),o=e.hasClass(h.addition),s=l&&1==r.length;l?!a||o?(m.apiSettings&&m.saveRemoteData&&F.save.remoteData(t,n),m.useLabels?(F.add.label(n,t,s),F.add.value(n,t,e),F.set.activeItem(e),F.filterActive(),F.select.nextAvailable(r)):(F.add.value(n,t,e),F.set.text(F.add.variables(c.count)),F.set.activeItem(e))):i||(F.debug("Selected active value, removing label"),F.remove.selected(n)):(m.apiSettings&&m.saveRemoteData&&F.save.remoteData(t,n),F.set.text(t),F.set.value(n,t,e),e.addClass(h.active).addClass(h.selected))}))},clearable:function(){L.addClass(h.clear)}},add:{label:function(e,t,n){var i,a=F.is.searchSelection()?A:y,o=F.escape.value(e);m.ignoreCase&&(o=o.toLowerCase()),i=X("<a />").addClass(h.label).attr("data-"+p.value,o).html(f.label(o,t)),i=m.onLabelCreate.call(i,o,t),F.has.label(e)?F.debug("User selection already exists, skipping",o):(m.label.variation&&i.addClass(m.label.variation),!0===n?(F.debug("Animating in label",i),i.addClass(h.hidden).insertBefore(a).transition(m.label.transition,m.label.duration)):(F.debug("Adding selection label",i),i.insertBefore(a)))},message:function(e){var t=D.children(b.message),n=m.templates.message(F.add.variables(e));0<t.length?t.html(n):t=X("<div/>").html(n).addClass(h.message).appendTo(D)},optionValue:function(e){var t=F.escape.value(e);0<k.find('option[value="'+F.escape.string(t)+'"]').length||(F.disconnect.selectObserver(),F.is.single()&&(F.verbose("Removing previous user addition"),k.find("option."+h.addition).remove()),X("<option/>").prop("value",t).addClass(h.addition).html(e).appendTo(k),F.verbose("Adding user addition as an <option>",e),F.observe.select())},userSuggestion:function(e){var t,n=D.children(b.addition),i=F.get.item(e),a=i&&i.not(b.addition).length,o=0<n.length;m.useLabels&&F.has.maxSelections()||(""===e||a?n.remove():(o?(n.data(p.value,e).data(p.text,e).attr("data-"+p.value,e).attr("data-"+p.text,e).removeClass(h.filtered),m.hideAdditions||(t=m.templates.addition(F.add.variables(c.addResult,e)),n.html(t)),F.verbose("Replacing user suggestion with new value",n)):((n=F.create.userChoice(e)).prependTo(D),F.verbose("Adding item choice to menu corresponding with user choice addition",n)),m.hideAdditions&&!F.is.allFiltered()||n.addClass(h.selected).siblings().removeClass(h.selected),F.refreshItems()))},variables:function(e,t){var n,i,a=-1!==e.search("{count}"),o=-1!==e.search("{maxCount}"),s=-1!==e.search("{term}");return F.verbose("Adding templated variables to message",e),a&&(n=F.get.selectionCount(),e=e.replace("{count}",n)),o&&(n=F.get.selectionCount(),e=e.replace("{maxCount}",m.maxSelections)),s&&(i=t||F.get.query(),e=e.replace("{term}",i)),e},value:function(e,t,n){var i,a=F.get.values();F.has.value(e)?F.debug("Value already selected"):""!==e?(i=X.isArray(a)?(i=a.concat([e]),F.get.uniqueArray(i)):[e],F.has.selectInput()?F.can.extendSelect()&&(F.debug("Adding value to select",e,i,k),F.add.optionValue(e)):(i=i.join(m.delimiter),F.debug("Setting hidden input to delimited value",i,k)),!1===m.fireOnInit&&F.is.initialLoad()?F.verbose("Skipping onadd callback on initial load",m.onAdd):m.onAdd.call(E,e,t,n),F.set.value(i,e,t,n),F.check.maxSelections()):F.debug("Cannot select blank values from multiselect")}},remove:{active:function(){C.removeClass(h.active)},activeLabel:function(){C.find(b.label).removeClass(h.active)},empty:function(){C.removeClass(h.empty)},loading:function(){C.removeClass(h.loading)},initialLoad:function(){e=!1},upward:function(e){(e||C).removeClass(h.upward)},leftward:function(e){(e||D).removeClass(h.leftward)},visible:function(){C.removeClass(h.visible)},activeItem:function(){q.removeClass(h.active)},filteredItem:function(){m.useLabels&&F.has.maxSelections()||(m.useLabels&&F.is.multiple()?q.not("."+h.active).removeClass(h.filtered):q.removeClass(h.filtered),F.remove.empty())},optionValue:function(e){var t=F.escape.value(e),n=k.find('option[value="'+F.escape.string(t)+'"]');0<n.length&&n.hasClass(h.addition)&&(s&&(s.disconnect(),F.verbose("Temporarily disconnecting mutation observer")),n.remove(),F.verbose("Removing user addition as an <option>",t),s&&s.observe(k[0],{childList:!0,subtree:!0}))},message:function(){D.children(b.message).remove()},searchWidth:function(){A.css("width","")},searchTerm:function(){F.verbose("Cleared search term"),A.val(""),F.set.filtered()},userAddition:function(){q.filter(b.addition).remove()},selected:function(e,t){if(!(t=m.allowAdditions?t||F.get.itemWithAdditions(e):t||F.get.item(e)))return!1;t.each(function(){var e=X(this),t=F.get.choiceText(e),n=F.get.choiceValue(e,t);F.is.multiple()?m.useLabels?(F.remove.value(n,t,e),F.remove.label(n)):(F.remove.value(n,t,e),0===F.get.selectionCount()?F.set.placeholderText():F.set.text(F.add.variables(c.count))):F.remove.value(n,t,e),e.removeClass(h.filtered).removeClass(h.active),m.useLabels&&e.removeClass(h.selected)})},selectedItem:function(){q.removeClass(h.selected)},value:function(e,t,n){var i,a=F.get.values();F.has.selectInput()?(F.verbose("Input is <select> removing selected option",e),i=F.remove.arrayValue(e,a),F.remove.optionValue(e)):(F.verbose("Removing from delimited values",e),i=(i=F.remove.arrayValue(e,a)).join(m.delimiter)),!1===m.fireOnInit&&F.is.initialLoad()?F.verbose("No callback on initial load",m.onRemove):m.onRemove.call(E,e,t,n),F.set.value(i,t,n),F.check.maxSelections()},arrayValue:function(t,e){return X.isArray(e)||(e=[e]),e=X.grep(e,function(e){return t!=e}),F.verbose("Removed value from delimited string",t,e),e},label:function(e,t){var n=C.find(b.label).filter("[data-"+p.value+'="'+F.escape.string(e)+'"]');F.verbose("Removing label",n),n.remove()},activeLabels:function(e){e=e||C.find(b.label).filter("."+h.active),F.verbose("Removing active label selections",e),F.remove.labels(e)},labels:function(e){e=e||C.find(b.label),F.verbose("Removing labels",e),e.each(function(){var e=X(this),t=e.data(p.value),n=t!==J?String(t):t,i=F.is.userValue(n);!1!==m.onLabelRemove.call(e,t)?(F.remove.message(),i?(F.remove.value(n),F.remove.label(n)):F.remove.selected(n)):F.debug("Label remove callback cancelled removal")})},tabbable:function(){F.is.searchSelection()?(F.debug("Searchable dropdown initialized"),A.removeAttr("tabindex")):(F.debug("Simple selection dropdown initialized"),C.removeAttr("tabindex")),D.removeAttr("tabindex")},clearable:function(){L.removeClass(h.clear)}},has:{menuSearch:function(){return F.has.search()&&0<A.closest(D).length},search:function(){return 0<A.length},sizer:function(){return 0<T.length},selectInput:function(){return k.is("select")},minCharacters:function(e){return!m.minCharacters||(e=e!==J?String(e):String(F.get.query())).length>=m.minCharacters},firstLetter:function(e,t){var n;return!(!e||0===e.length||"string"!=typeof t)&&(n=F.get.choiceText(e,!1),(t=t.toLowerCase())==String(n).charAt(0).toLowerCase())},input:function(){return 0<k.length},items:function(){return 0<q.length},menu:function(){return 0<D.length},message:function(){return 0!==D.children(b.message).length},label:function(e){var t=F.escape.value(e),n=C.find(b.label);return m.ignoreCase&&(t=t.toLowerCase()),0<n.filter("[data-"+p.value+'="'+F.escape.string(t)+'"]').length},maxSelections:function(){return m.maxSelections&&F.get.selectionCount()>=m.maxSelections},allResultsFiltered:function(){var e=q.not(b.addition);return e.filter(b.unselectable).length===e.length},userSuggestion:function(){return 0<D.children(b.addition).length},query:function(){return""!==F.get.query()},value:function(e){return m.ignoreCase?F.has.valueIgnoringCase(e):F.has.valueMatchingCase(e)},valueMatchingCase:function(e){var t=F.get.values();return!!(X.isArray(t)?t&&-1!==X.inArray(e,t):t==e)},valueIgnoringCase:function(n){var e=F.get.values(),i=!1;return X.isArray(e)||(e=[e]),X.each(e,function(e,t){if(String(n).toLowerCase()==String(t).toLowerCase())return!(i=!0)}),i}},is:{active:function(){return C.hasClass(h.active)},animatingInward:function(){return D.transition("is inward")},animatingOutward:function(){return D.transition("is outward")},bubbledLabelClick:function(e){return X(e.target).is("select, input")&&0<C.closest("label").length},bubbledIconClick:function(e){return 0<X(e.target).closest(L).length},alreadySetup:function(){return C.is("select")&&C.parent(b.dropdown).data(x)!==J&&0===C.prev().length},animating:function(e){return e?e.transition&&e.transition("is animating"):D.transition&&D.transition("is animating")},leftward:function(e){return(e||D).hasClass(h.leftward)},disabled:function(){return C.hasClass(h.disabled)},focused:function(){return G.activeElement===C[0]},focusedOnSearch:function(){return G.activeElement===A[0]},allFiltered:function(){return(F.is.multiple()||F.has.search())&&!(0==m.hideAdditions&&F.has.userSuggestion())&&!F.has.message()&&F.has.allResultsFiltered()},hidden:function(e){return!F.is.visible(e)},initialLoad:function(){return e},inObject:function(n,e){var i=!1;return X.each(e,function(e,t){if(t==n)return i=!0}),i},multiple:function(){return C.hasClass(h.multiple)},remote:function(){return m.apiSettings&&F.can.useAPI()},single:function(){return!F.is.multiple()},selectMutation:function(e){var n=!1;return X.each(e,function(e,t){if(t.target&&X(t.target).is("select"))return n=!0}),n},search:function(){return C.hasClass(h.search)},searchSelection:function(){return F.has.search()&&1===A.parent(b.dropdown).length},selection:function(){return C.hasClass(h.selection)},userValue:function(e){return-1!==X.inArray(e,F.get.userValues())},upward:function(e){return(e||C).hasClass(h.upward)},visible:function(e){return e?e.hasClass(h.visible):D.hasClass(h.visible)},verticallyScrollableContext:function(){var e=S.get(0)!==Y&&S.css("overflow-y");return"auto"==e||"scroll"==e},horizontallyScrollableContext:function(){var e=S.get(0)!==Y&&S.css("overflow-X");return"auto"==e||"scroll"==e}},can:{activate:function(e){return!!m.useLabels||(!F.has.maxSelections()||!(!F.has.maxSelections()||!e.hasClass(h.active)))},openDownward:function(e){var t,n,i=e||D,a=!0;return i.addClass(h.loading),n={context:{offset:S.get(0)===Y?{top:0,left:0}:S.offset(),scrollTop:S.scrollTop(),height:S.outerHeight()},menu:{offset:i.offset(),height:i.outerHeight()}},F.is.verticallyScrollableContext()&&(n.menu.offset.top+=n.context.scrollTop),a=(t={above:n.context.scrollTop<=n.menu.offset.top-n.context.offset.top-n.menu.height,below:n.context.scrollTop+n.context.height>=n.menu.offset.top-n.context.offset.top+n.menu.height}).below?(F.verbose("Dropdown can fit in context downward",t),!0):t.below||t.above?(F.verbose("Dropdown cannot fit below, opening upward",t),!1):(F.verbose("Dropdown cannot fit in either direction, favoring downward",t),!0),i.removeClass(h.loading),a},openRightward:function(e){var t,n,i=e||D,a=!0;return i.addClass(h.loading),n={context:{offset:S.get(0)===Y?{top:0,left:0}:S.offset(),scrollLeft:S.scrollLeft(),width:S.outerWidth()},menu:{offset:i.offset(),width:i.outerWidth()}},F.is.horizontallyScrollableContext()&&(n.menu.offset.left+=n.context.scrollLeft),(t=n.menu.offset.left-n.context.offset.left+n.menu.width>=n.context.scrollLeft+n.context.width)&&(F.verbose("Dropdown cannot fit in context rightward",t),a=!1),i.removeClass(h.loading),a},click:function(){return U||"click"==m.on},extendSelect:function(){return m.allowAdditions||m.apiSettings},show:function(){return!F.is.disabled()&&(F.has.items()||F.has.message())},useAPI:function(){return X.fn.api!==J}},animate:{show:function(e,t){var n,i=t||D,a=t?function(){}:function(){F.hideSubMenus(),F.hideOthers(),F.set.active()};e=X.isFunction(e)?e:function(){},F.verbose("Doing menu show animation",i),F.set.direction(t),n=F.get.transition(t),F.is.selection()&&F.set.scrollPosition(F.get.selectedItem(),!0),(F.is.hidden(i)||F.is.animating(i))&&("none"==n?(a(),i.transition("show"),e.call(E)):X.fn.transition!==J&&C.transition("is supported")?i.transition({animation:n+" in",debug:m.debug,verbose:m.verbose,duration:m.duration,queue:!0,onStart:a,onComplete:function(){e.call(E)}}):F.error(v.noTransition,n))},hide:function(e,t){var n=t||D,i=(t?m.duration:m.duration,t?function(){}:function(){F.can.click()&&F.unbind.intent(),F.remove.active()}),a=F.get.transition(t);e=X.isFunction(e)?e:function(){},(F.is.visible(n)||F.is.animating(n))&&(F.verbose("Doing menu hide animation",n),"none"==a?(i(),n.transition("hide"),e.call(E)):X.fn.transition!==J&&C.transition("is supported")?n.transition({animation:a+" out",duration:m.duration,debug:m.debug,verbose:m.verbose,queue:!1,onStart:i,onComplete:function(){e.call(E)}}):F.error(v.transition))}},hideAndClear:function(){F.remove.searchTerm(),F.has.maxSelections()||(F.has.search()?F.hide(function(){F.remove.filteredItem()}):F.hide())},delay:{show:function(){F.verbose("Delaying show event to ensure user intent"),clearTimeout(F.timer),F.timer=setTimeout(F.show,m.delay.show)},hide:function(){F.verbose("Delaying hide event to ensure user intent"),clearTimeout(F.timer),F.timer=setTimeout(F.hide,m.delay.hide)}},escape:{value:function(e){var t=X.isArray(e),n="string"==typeof e,i=!n&&!t,a=n&&-1!==e.search(d.quote),o=[];return i||!a?e:(F.debug("Encoding quote values for use in select",e),t?(X.each(e,function(e,t){o.push(t.replace(d.quote,"&quot;"))}),o):e.replace(d.quote,"&quot;"))},string:function(e){return(e=String(e)).replace(d.escape,"\\$&")}},setting:function(e,t){if(F.debug("Changing setting",e,t),X.isPlainObject(e))X.extend(!0,m,e);else{if(t===J)return m[e];X.isPlainObject(m[e])?X.extend(!0,m[e],t):m[e]=t}},internal:function(e,t){if(X.isPlainObject(e))X.extend(!0,F,e);else{if(t===J)return F[e];F[e]=t}},debug:function(){!m.silent&&m.debug&&(m.performance?F.performance.log(arguments):(F.debug=Function.prototype.bind.call(console.info,console,m.name+":"),F.debug.apply(console,arguments)))},verbose:function(){!m.silent&&m.verbose&&m.debug&&(m.performance?F.performance.log(arguments):(F.verbose=Function.prototype.bind.call(console.info,console,m.name+":"),F.verbose.apply(console,arguments)))},error:function(){m.silent||(F.error=Function.prototype.bind.call(console.error,console,m.name+":"),F.error.apply(console,arguments))},performance:{log:function(e){var t,n;m.performance&&(n=(t=(new Date).getTime())-(K||t),K=t,W.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:E,"Execution Time":n})),clearTimeout(F.performance.timer),F.performance.timer=setTimeout(F.performance.display,500)},display:function(){var e=m.name+":",n=0;K=!1,clearTimeout(F.performance.timer),X.each(W,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",N&&(e+=" '"+N+"'"),(console.group!==J||console.table!==J)&&0<W.length&&(console.groupCollapsed(e),console.table?console.table(W):X.each(W,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),W=[]}},invoke:function(i,e,t){var a,o,n,s=M;return e=e||Q,t=E||t,"string"==typeof i&&s!==J&&(i=i.split(/[\. ]/),a=i.length-1,X.each(i,function(e,t){var n=e!=a?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(X.isPlainObject(s[n])&&e!=a)s=s[n];else{if(s[n]!==J)return o=s[n],!1;if(!X.isPlainObject(s[t])||e==a)return s[t]!==J?o=s[t]:F.error(v.method,i),!1;s=s[t]}})),X.isFunction(o)?n=o.apply(t,e):o!==J&&(n=o),X.isArray(P)?P.push(n):P!==J?P=[P,n]:n!==J&&(P=n),o}};$?(M===J&&F.initialize(),F.invoke(B)):(M!==J&&M.invoke("destroy"),F.initialize())}),P!==J?P:H},X.fn.aysDropdown.settings={silent:!1,debug:!1,verbose:!1,performance:!0,on:"click",action:"activate",values:!1,clearable:!1,apiSettings:!1,selectOnKeydown:!0,minCharacters:0,filterRemoteData:!1,saveRemoteData:!0,throttle:200,context:Y,direction:"auto",keepOnScreen:!0,match:"both",fullTextSearch:!1,placeholder:"auto",preserveHTML:!0,sortSelect:!1,forceSelection:!0,allowAdditions:!1,ignoreCase:!1,hideAdditions:!0,maxSelections:!1,useLabels:!0,delimiter:",",showOnFocus:!0,allowReselection:!1,allowTab:!0,allowCategorySelection:!1,fireOnInit:!1,transition:"auto",duration:200,glyphWidth:1.037,label:{transition:"scale",duration:200,variation:!1},delay:{hide:300,show:200,search:20,touch:50},onChange:function(e,t,n){},onAdd:function(e,t,n){},onRemove:function(e,t,n){},onLabelSelect:function(e){},onLabelCreate:function(e,t){return X(this)},onLabelRemove:function(e){return!0},onNoResults:function(e){return!0},onShow:function(){},onHide:function(){},name:"aysDropdown",namespace:"aysDropdown",message:{addResult:"Add <b>{term}</b>",count:"{count} selected",maxSelections:"Max {maxCount} selections",noResults:"No results found.",serverError:"There was an error contacting the server"},error:{action:"You called a dropdown action that was not defined",alreadySetup:"Once a select has been initialized behaviors must be called on the created ui dropdown",labels:"Allowing user additions currently requires the use of labels.",missingMultiple:"<select> requires multiple property to be set to correctly preserve multiple values",method:"The method you called is not defined.",noAPI:"The API module is required to load resources remotely",noStorage:"Saving remote data requires session storage",noTransition:"This module requires ui transitions <https://github.com/Semantic-Org/UI-Transition>"},regExp:{escape:/[-[\]{}()*+?.,\\^$|#\s]/g,quote:/"/g},metadata:{defaultText:"defaultText",defaultValue:"defaultValue",placeholderText:"placeholder",text:"text",value:"value"},fields:{remoteValues:"results",values:"values",disabled:"disabled",name:"name",value:"value",text:"text"},keys:{backspace:8,delimiter:188,deleteKey:46,enter:13,escape:27,pageUp:33,pageDown:34,leftArrow:37,upArrow:38,rightArrow:39,downArrow:40},selector:{addition:".addition",dropdown:".ui.dropdown",hidden:".hidden",icon:"> .dropdown.icon",input:'> input[type="hidden"], > select',item:".item",label:"> .label",remove:"> .label > .delete.icon",siblingLabel:".label",menu:".menu",message:".message",menuIcon:".dropdown.icon",search:"input.search, .menu > .search > input, .menu input.search",sizer:"> input.sizer",text:"> .text:not(.icon)",unselectable:".disabled, .filtered"},className:{active:"active",addition:"addition",animating:"animating",clear:"clear",disabled:"disabled",empty:"empty",dropdown:"ui dropdown",filtered:"filtered",hidden:"hidden transition",item:"item",label:"ui label",loading:"loading",menu:"menu",message:"message",multiple:"multiple",placeholder:"default",sizer:"sizer",search:"search",selected:"selected",selection:"selection",upward:"upward",leftward:"left",visible:"visible"}},X.fn.aysDropdown.settings.templates={dropdown:function(e){var t=e.placeholder||!1,n=(e.values,"");return n+='<i class="dropdown icon"></i>',e.placeholder?n+='<div class="default text">'+t+"</div>":n+='<div class="text"></div>',n+='<div class="menu">',X.each(e.values,function(e,t){n+=t.disabled?'<div class="disabled item" data-value="'+t.value+'">'+t.name+"</div>":'<div class="item" data-value="'+t.value+'">'+t.name+"</div>"}),n+="</div>"},menu:function(e,a){var t=e[a.values]||{},o="";return X.each(t,function(e,t){var n=t[a.text]?'data-text="'+t[a.text]+'"':"",i=t[a.disabled]?"disabled ":"";o+='<div class="'+i+'item" data-value="'+t[a.value]+'"'+n+">",o+=t[a.name],o+="</div>"}),o},label:function(e,t){return t+'<i class="delete icon"></i>'},message:function(e){return e},addition:function(e){return e}}}(jQuery,window,document);
/*! Select2 4.0.6-rc.0 | https://github.com/select2/select2/blob/master/LICENSE.md */!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=function(b,c){return void 0===c&&(c="undefined"!=typeof window?require("jquery"):require("jquery")(b)),a(c),c}:a(jQuery)}(function(a){var b=function(){if(a&&a.fn&&a.fn.select2&&a.fn.select2.amd)var b=a.fn.select2.amd;var b;return function(){if(!b||!b.requirejs){b?c=b:b={};var a,c,d;!function(b){function e(a,b){return v.call(a,b)}function f(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o=b&&b.split("/"),p=t.map,q=p&&p["*"]||{};if(a){for(a=a.split("/"),g=a.length-1,t.nodeIdCompat&&x.test(a[g])&&(a[g]=a[g].replace(x,"")),"."===a[0].charAt(0)&&o&&(n=o.slice(0,o.length-1),a=n.concat(a)),k=0;k<a.length;k++)if("."===(m=a[k]))a.splice(k,1),k-=1;else if(".."===m){if(0===k||1===k&&".."===a[2]||".."===a[k-1])continue;k>0&&(a.splice(k-1,2),k-=2)}a=a.join("/")}if((o||q)&&p){for(c=a.split("/"),k=c.length;k>0;k-=1){if(d=c.slice(0,k).join("/"),o)for(l=o.length;l>0;l-=1)if((e=p[o.slice(0,l).join("/")])&&(e=e[d])){f=e,h=k;break}if(f)break;!i&&q&&q[d]&&(i=q[d],j=k)}!f&&i&&(f=i,h=j),f&&(c.splice(0,h,f),a=c.join("/"))}return a}function g(a,c){return function(){var d=w.call(arguments,0);return"string"!=typeof d[0]&&1===d.length&&d.push(null),o.apply(b,d.concat([a,c]))}}function h(a){return function(b){return f(b,a)}}function i(a){return function(b){r[a]=b}}function j(a){if(e(s,a)){var c=s[a];delete s[a],u[a]=!0,n.apply(b,c)}if(!e(r,a)&&!e(u,a))throw new Error("No "+a);return r[a]}function k(a){var b,c=a?a.indexOf("!"):-1;return c>-1&&(b=a.substring(0,c),a=a.substring(c+1,a.length)),[b,a]}function l(a){return a?k(a):[]}function m(a){return function(){return t&&t.config&&t.config[a]||{}}}var n,o,p,q,r={},s={},t={},u={},v=Object.prototype.hasOwnProperty,w=[].slice,x=/\.js$/;p=function(a,b){var c,d=k(a),e=d[0],g=b[1];return a=d[1],e&&(e=f(e,g),c=j(e)),e?a=c&&c.normalize?c.normalize(a,h(g)):f(a,g):(a=f(a,g),d=k(a),e=d[0],a=d[1],e&&(c=j(e))),{f:e?e+"!"+a:a,n:a,pr:e,p:c}},q={require:function(a){return g(a)},exports:function(a){var b=r[a];return void 0!==b?b:r[a]={}},module:function(a){return{id:a,uri:"",exports:r[a],config:m(a)}}},n=function(a,c,d,f){var h,k,m,n,o,t,v,w=[],x=typeof d;if(f=f||a,t=l(f),"undefined"===x||"function"===x){for(c=!c.length&&d.length?["require","exports","module"]:c,o=0;o<c.length;o+=1)if(n=p(c[o],t),"require"===(k=n.f))w[o]=q.require(a);else if("exports"===k)w[o]=q.exports(a),v=!0;else if("module"===k)h=w[o]=q.module(a);else if(e(r,k)||e(s,k)||e(u,k))w[o]=j(k);else{if(!n.p)throw new Error(a+" missing "+k);n.p.load(n.n,g(f,!0),i(k),{}),w[o]=r[k]}m=d?d.apply(r[a],w):void 0,a&&(h&&h.exports!==b&&h.exports!==r[a]?r[a]=h.exports:m===b&&v||(r[a]=m))}else a&&(r[a]=d)},a=c=o=function(a,c,d,e,f){if("string"==typeof a)return q[a]?q[a](c):j(p(a,l(c)).f);if(!a.splice){if(t=a,t.deps&&o(t.deps,t.callback),!c)return;c.splice?(a=c,c=d,d=null):a=b}return c=c||function(){},"function"==typeof d&&(d=e,e=f),e?n(b,a,c,d):setTimeout(function(){n(b,a,c,d)},4),o},o.config=function(a){return o(a)},a._defined=r,d=function(a,b,c){if("string"!=typeof a)throw new Error("See almond README: incorrect module build, no module name");b.splice||(c=b,b=[]),e(r,a)||e(s,a)||(s[a]=[a,b,c])},d.amd={jQuery:!0}}(),b.requirejs=a,b.require=c,b.define=d}}(),b.define("almond",function(){}),b.define("jquery",[],function(){var b=a||$;return null==b&&console&&console.error&&console.error("Select2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before Select2 on your web page."),b}),b.define("select2/utils",["jquery"],function(a){function b(a){var b=a.prototype,c=[];for(var d in b){"function"==typeof b[d]&&("constructor"!==d&&c.push(d))}return c}var c={};c.Extend=function(a,b){function c(){this.constructor=a}var d={}.hasOwnProperty;for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},c.Decorate=function(a,c){function d(){var b=Array.prototype.unshift,d=c.prototype.constructor.length,e=a.prototype.constructor;d>0&&(b.call(arguments,a.prototype.constructor),e=c.prototype.constructor),e.apply(this,arguments)}function e(){this.constructor=d}var f=b(c),g=b(a);c.displayName=a.displayName,d.prototype=new e;for(var h=0;h<g.length;h++){var i=g[h];d.prototype[i]=a.prototype[i]}for(var j=(function(a){var b=function(){};a in d.prototype&&(b=d.prototype[a]);var e=c.prototype[a];return function(){return Array.prototype.unshift.call(arguments,b),e.apply(this,arguments)}}),k=0;k<f.length;k++){var l=f[k];d.prototype[l]=j(l)}return d};var d=function(){this.listeners={}};d.prototype.on=function(a,b){this.listeners=this.listeners||{},a in this.listeners?this.listeners[a].push(b):this.listeners[a]=[b]},d.prototype.trigger=function(a){var b=Array.prototype.slice,c=b.call(arguments,1);this.listeners=this.listeners||{},null==c&&(c=[]),0===c.length&&c.push({}),c[0]._type=a,a in this.listeners&&this.invoke(this.listeners[a],b.call(arguments,1)),"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)},d.prototype.invoke=function(a,b){for(var c=0,d=a.length;c<d;c++)a[c].apply(this,b)},c.Observable=d,c.generateChars=function(a){for(var b="",c=0;c<a;c++){b+=Math.floor(36*Math.random()).toString(36)}return b},c.bind=function(a,b){return function(){a.apply(b,arguments)}},c._convertData=function(a){for(var b in a){var c=b.split("-"),d=a;if(1!==c.length){for(var e=0;e<c.length;e++){var f=c[e];f=f.substring(0,1).toLowerCase()+f.substring(1),f in d||(d[f]={}),e==c.length-1&&(d[f]=a[b]),d=d[f]}delete a[b]}}return a},c.hasScroll=function(b,c){var d=a(c),e=c.style.overflowX,f=c.style.overflowY;return(e!==f||"hidden"!==f&&"visible"!==f)&&("scroll"===e||"scroll"===f||(d.innerHeight()<c.scrollHeight||d.innerWidth()<c.scrollWidth))},c.escapeMarkup=function(a){var b={"\\":"&#92;","&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#47;"};return"string"!=typeof a?a:String(a).replace(/[&<>"'\/\\]/g,function(a){return b[a]})},c.appendMany=function(b,c){if("1.7"===a.fn.jquery.substr(0,3)){var d=a();a.map(c,function(a){d=d.add(a)}),c=d}b.append(c)},c.__cache={};var e=0;return c.GetUniqueElementId=function(a){var b=a.getAttribute("data-select2-id");return null==b&&(a.id?(b=a.id,a.setAttribute("data-select2-id",b)):(a.setAttribute("data-select2-id",++e),b=e.toString())),b},c.StoreData=function(a,b,d){var e=c.GetUniqueElementId(a);c.__cache[e]||(c.__cache[e]={}),c.__cache[e][b]=d},c.GetData=function(b,d){var e=c.GetUniqueElementId(b);return d?c.__cache[e]&&null!=c.__cache[e][d]?c.__cache[e][d]:a(b).data(d):c.__cache[e]},c.RemoveData=function(a){var b=c.GetUniqueElementId(a);null!=c.__cache[b]&&delete c.__cache[b]},c}),b.define("select2/results",["jquery","./utils"],function(a,b){function c(a,b,d){this.$element=a,this.data=d,this.options=b,c.__super__.constructor.call(this)}return b.Extend(c,b.Observable),c.prototype.render=function(){var b=a('<ul class="select2-results__options" role="tree"></ul>');return this.options.get("multiple")&&b.attr("aria-multiselectable","true"),this.$results=b,b},c.prototype.clear=function(){this.$results.empty()},c.prototype.displayMessage=function(b){var c=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var d=a('<li role="treeitem" aria-live="assertive" class="select2-results__option"></li>'),e=this.options.get("translations").get(b.message);d.append(c(e(b.args))),d[0].className+=" select2-results__message",this.$results.append(d)},c.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},c.prototype.append=function(a){this.hideLoading();var b=[];if(null==a.results||0===a.results.length)return void(0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"}));a.results=this.sort(a.results);for(var c=0;c<a.results.length;c++){var d=a.results[c],e=this.option(d);b.push(e)}this.$results.append(b)},c.prototype.position=function(a,b){b.find(".select2-results").append(a)},c.prototype.sort=function(a){return this.options.get("sorter")(a)},c.prototype.highlightFirstItem=function(){var a=this.$results.find(".select2-results__option[aria-selected]"),b=a.filter("[aria-selected=true]");b.length>0?b.first().trigger("mouseenter"):a.first().trigger("mouseenter"),this.ensureHighlightVisible()},c.prototype.setClasses=function(){var c=this;this.data.current(function(d){var e=a.map(d,function(a){return a.id.toString()});c.$results.find(".select2-results__option[aria-selected]").each(function(){var c=a(this),d=b.GetData(this,"data"),f=""+d.id;null!=d.element&&d.element.selected||null==d.element&&a.inArray(f,e)>-1?c.attr("aria-selected","true"):c.attr("aria-selected","false")})})},c.prototype.showLoading=function(a){this.hideLoading();var b=this.options.get("translations").get("searching"),c={disabled:!0,loading:!0,text:b(a)},d=this.option(c);d.className+=" loading-results",this.$results.prepend(d)},c.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},c.prototype.option=function(c){var d=document.createElement("li");d.className="select2-results__option";var e={role:"treeitem","aria-selected":"false"};c.disabled&&(delete e["aria-selected"],e["aria-disabled"]="true"),null==c.id&&delete e["aria-selected"],null!=c._resultId&&(d.id=c._resultId),c.title&&(d.title=c.title),c.children&&(e.role="group",e["aria-label"]=c.text,delete e["aria-selected"]);for(var f in e){var g=e[f];d.setAttribute(f,g)}if(c.children){var h=a(d),i=document.createElement("strong");i.className="select2-results__group";a(i);this.template(c,i);for(var j=[],k=0;k<c.children.length;k++){var l=c.children[k],m=this.option(l);j.push(m)}var n=a("<ul></ul>",{class:"select2-results__options select2-results__options--nested"});n.append(j),h.append(i),h.append(n)}else this.template(c,d);return b.StoreData(d,"data",c),d},c.prototype.bind=function(c,d){var e=this,f=c.id+"-results";this.$results.attr("id",f),c.on("results:all",function(a){e.clear(),e.append(a.data),c.isOpen()&&(e.setClasses(),e.highlightFirstItem())}),c.on("results:append",function(a){e.append(a.data),c.isOpen()&&e.setClasses()}),c.on("query",function(a){e.hideMessages(),e.showLoading(a)}),c.on("select",function(){c.isOpen()&&(e.setClasses(),e.highlightFirstItem())}),c.on("unselect",function(){c.isOpen()&&(e.setClasses(),e.highlightFirstItem())}),c.on("open",function(){e.$results.attr("aria-expanded","true"),e.$results.attr("aria-hidden","false"),e.setClasses(),e.ensureHighlightVisible()}),c.on("close",function(){e.$results.attr("aria-expanded","false"),e.$results.attr("aria-hidden","true"),e.$results.removeAttr("aria-activedescendant")}),c.on("results:toggle",function(){var a=e.getHighlightedResults();0!==a.length&&a.trigger("mouseup")}),c.on("results:select",function(){var a=e.getHighlightedResults();if(0!==a.length){var c=b.GetData(a[0],"data");"true"==a.attr("aria-selected")?e.trigger("close",{}):e.trigger("select",{data:c})}}),c.on("results:previous",function(){var a=e.getHighlightedResults(),b=e.$results.find("[aria-selected]"),c=b.index(a);if(0!==c){var d=c-1;0===a.length&&(d=0);var f=b.eq(d);f.trigger("mouseenter");var g=e.$results.offset().top,h=f.offset().top,i=e.$results.scrollTop()+(h-g);0===d?e.$results.scrollTop(0):h-g<0&&e.$results.scrollTop(i)}}),c.on("results:next",function(){var a=e.getHighlightedResults(),b=e.$results.find("[aria-selected]"),c=b.index(a),d=c+1;if(!(d>=b.length)){var f=b.eq(d);f.trigger("mouseenter");var g=e.$results.offset().top+e.$results.outerHeight(!1),h=f.offset().top+f.outerHeight(!1),i=e.$results.scrollTop()+h-g;0===d?e.$results.scrollTop(0):h>g&&e.$results.scrollTop(i)}}),c.on("results:focus",function(a){a.element.addClass("select2-results__option--highlighted")}),c.on("results:message",function(a){e.displayMessage(a)}),a.fn.mousewheel&&this.$results.on("mousewheel",function(a){var b=e.$results.scrollTop(),c=e.$results.get(0).scrollHeight-b+a.deltaY,d=a.deltaY>0&&b-a.deltaY<=0,f=a.deltaY<0&&c<=e.$results.height();d?(e.$results.scrollTop(0),a.preventDefault(),a.stopPropagation()):f&&(e.$results.scrollTop(e.$results.get(0).scrollHeight-e.$results.height()),a.preventDefault(),a.stopPropagation())}),this.$results.on("mouseup",".select2-results__option[aria-selected]",function(c){var d=a(this),f=b.GetData(this,"data");if("true"===d.attr("aria-selected"))return void(e.options.get("multiple")?e.trigger("unselect",{originalEvent:c,data:f}):e.trigger("close",{}));e.trigger("select",{originalEvent:c,data:f})}),this.$results.on("mouseenter",".select2-results__option[aria-selected]",function(c){var d=b.GetData(this,"data");e.getHighlightedResults().removeClass("select2-results__option--highlighted"),e.trigger("results:focus",{data:d,element:a(this)})})},c.prototype.getHighlightedResults=function(){return this.$results.find(".select2-results__option--highlighted")},c.prototype.destroy=function(){this.$results.remove()},c.prototype.ensureHighlightVisible=function(){var a=this.getHighlightedResults();if(0!==a.length){var b=this.$results.find("[aria-selected]"),c=b.index(a),d=this.$results.offset().top,e=a.offset().top,f=this.$results.scrollTop()+(e-d),g=e-d;f-=2*a.outerHeight(!1),c<=2?this.$results.scrollTop(0):(g>this.$results.outerHeight()||g<0)&&this.$results.scrollTop(f)}},c.prototype.template=function(b,c){var d=this.options.get("templateResult"),e=this.options.get("escapeMarkup"),f=d(b,c);null==f?c.style.display="none":"string"==typeof f?c.innerHTML=e(f):a(c).append(f)},c}),b.define("select2/keys",[],function(){return{BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46}}),b.define("select2/selection/base",["jquery","../utils","../keys"],function(a,b,c){function d(a,b){this.$element=a,this.options=b,d.__super__.constructor.call(this)}return b.Extend(d,b.Observable),d.prototype.render=function(){var c=a('<span class="select2-selection" role="combobox"  aria-haspopup="true" aria-expanded="false"></span>');return this._tabindex=0,null!=b.GetData(this.$element[0],"old-tabindex")?this._tabindex=b.GetData(this.$element[0],"old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),c.attr("title",this.$element.attr("title")),c.attr("tabindex",this._tabindex),this.$selection=c,c},d.prototype.bind=function(a,b){var d=this,e=(a.id,a.id+"-results");this.container=a,this.$selection.on("focus",function(a){d.trigger("focus",a)}),this.$selection.on("blur",function(a){d._handleBlur(a)}),this.$selection.on("keydown",function(a){d.trigger("keypress",a),a.which===c.SPACE&&a.preventDefault()}),a.on("results:focus",function(a){d.$selection.attr("aria-activedescendant",a.data._resultId)}),a.on("selection:update",function(a){d.update(a.data)}),a.on("open",function(){d.$selection.attr("aria-expanded","true"),d.$selection.attr("aria-owns",e),d._attachCloseHandler(a)}),a.on("close",function(){d.$selection.attr("aria-expanded","false"),d.$selection.removeAttr("aria-activedescendant"),d.$selection.removeAttr("aria-owns"),d.$selection.focus(),d._detachCloseHandler(a)}),a.on("enable",function(){d.$selection.attr("tabindex",d._tabindex)}),a.on("disable",function(){d.$selection.attr("tabindex","-1")})},d.prototype._handleBlur=function(b){var c=this;window.setTimeout(function(){document.activeElement==c.$selection[0]||a.contains(c.$selection[0],document.activeElement)||c.trigger("blur",b)},1)},d.prototype._attachCloseHandler=function(c){a(document.body).on("mousedown.select2."+c.id,function(c){var d=a(c.target),e=d.closest(".select2");a(".select2.select2-container--open").each(function(){a(this),this!=e[0]&&b.GetData(this,"element").select2("close")})})},d.prototype._detachCloseHandler=function(b){a(document.body).off("mousedown.select2."+b.id)},d.prototype.position=function(a,b){b.find(".selection").append(a)},d.prototype.destroy=function(){this._detachCloseHandler(this.container)},d.prototype.update=function(a){throw new Error("The `update` method must be defined in child classes.")},d}),b.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(a,b,c,d){function e(){e.__super__.constructor.apply(this,arguments)}return c.Extend(e,b),e.prototype.render=function(){var a=e.__super__.render.call(this);return a.addClass("select2-selection--single"),a.html('<span class="select2-selection__rendered"></span><span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span>'),a},e.prototype.bind=function(a,b){var c=this;e.__super__.bind.apply(this,arguments);var d=a.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",d).attr("role","textbox").attr("aria-readonly","true"),this.$selection.attr("aria-labelledby",d),this.$selection.on("mousedown",function(a){1===a.which&&c.trigger("toggle",{originalEvent:a})}),this.$selection.on("focus",function(a){}),this.$selection.on("blur",function(a){}),a.on("focus",function(b){a.isOpen()||c.$selection.focus()})},e.prototype.clear=function(){var a=this.$selection.find(".select2-selection__rendered");a.empty(),a.removeAttr("title")},e.prototype.display=function(a,b){var c=this.options.get("templateSelection");return this.options.get("escapeMarkup")(c(a,b))},e.prototype.selectionContainer=function(){return a("<span></span>")},e.prototype.update=function(a){if(0===a.length)return void this.clear();var b=a[0],c=this.$selection.find(".select2-selection__rendered"),d=this.display(b,c);c.empty().append(d),c.attr("title",b.title||b.text)},e}),b.define("select2/selection/multiple",["jquery","./base","../utils"],function(a,b,c){function d(a,b){d.__super__.constructor.apply(this,arguments)}return c.Extend(d,b),d.prototype.render=function(){var a=d.__super__.render.call(this);return a.addClass("select2-selection--multiple"),a.html('<ul class="select2-selection__rendered"></ul>'),a},d.prototype.bind=function(b,e){var f=this;d.__super__.bind.apply(this,arguments),this.$selection.on("click",function(a){f.trigger("toggle",{originalEvent:a})}),this.$selection.on("click",".select2-selection__choice__remove",function(b){if(!f.options.get("disabled")){var d=a(this),e=d.parent(),g=c.GetData(e[0],"data");f.trigger("unselect",{originalEvent:b,data:g})}})},d.prototype.clear=function(){var a=this.$selection.find(".select2-selection__rendered");a.empty(),a.removeAttr("title")},d.prototype.display=function(a,b){var c=this.options.get("templateSelection");return this.options.get("escapeMarkup")(c(a,b))},d.prototype.selectionContainer=function(){return a('<li class="select2-selection__choice"><span class="select2-selection__choice__remove" role="presentation">&times;</span></li>')},d.prototype.update=function(a){if(this.clear(),0!==a.length){for(var b=[],d=0;d<a.length;d++){var e=a[d],f=this.selectionContainer(),g=this.display(e,f);f.append(g),f.attr("title",e.title||e.text),c.StoreData(f[0],"data",e),b.push(f)}var h=this.$selection.find(".select2-selection__rendered");c.appendMany(h,b)}},d}),b.define("select2/selection/placeholder",["../utils"],function(a){function b(a,b,c){this.placeholder=this.normalizePlaceholder(c.get("placeholder")),a.call(this,b,c)}return b.prototype.normalizePlaceholder=function(a,b){return"string"==typeof b&&(b={id:"",text:b}),b},b.prototype.createPlaceholder=function(a,b){var c=this.selectionContainer();return c.html(this.display(b)),c.addClass("select2-selection__placeholder").removeClass("select2-selection__choice"),c},b.prototype.update=function(a,b){var c=1==b.length&&b[0].id!=this.placeholder.id;if(b.length>1||c)return a.call(this,b);this.clear();var d=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(d)},b}),b.define("select2/selection/allowClear",["jquery","../keys","../utils"],function(a,b,c){function d(){}return d.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".select2-selection__clear",function(a){d._handleClear(a)}),b.on("keypress",function(a){d._handleKeyboardClear(a,b)})},d.prototype._handleClear=function(a,b){if(!this.options.get("disabled")){var d=this.$selection.find(".select2-selection__clear");if(0!==d.length){b.stopPropagation();var e=c.GetData(d[0],"data"),f=this.$element.val();this.$element.val(this.placeholder.id);var g={data:e};if(this.trigger("clear",g),g.prevented)return void this.$element.val(f);for(var h=0;h<e.length;h++)if(g={data:e[h]},this.trigger("unselect",g),g.prevented)return void this.$element.val(f);this.$element.trigger("change"),this.trigger("toggle",{})}}},d.prototype._handleKeyboardClear=function(a,c,d){d.isOpen()||c.which!=b.DELETE&&c.which!=b.BACKSPACE||this._handleClear(c)},d.prototype.update=function(b,d){if(b.call(this,d),!(this.$selection.find(".select2-selection__placeholder").length>0||0===d.length)){var e=a('<span class="select2-selection__clear">&times;</span>');c.StoreData(e[0],"data",d),this.$selection.find(".select2-selection__rendered").prepend(e)}},d}),b.define("select2/selection/search",["jquery","../utils","../keys"],function(a,b,c){function d(a,b,c){a.call(this,b,c)}return d.prototype.render=function(b){var c=a('<li class="select2-search select2-search--inline"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="none" spellcheck="false" role="textbox" aria-autocomplete="list" /></li>');this.$searchContainer=c,this.$search=c.find("input");var d=b.call(this);return this._transferTabIndex(),d},d.prototype.bind=function(a,d,e){var f=this;a.call(this,d,e),d.on("open",function(){f.$search.trigger("focus")}),d.on("close",function(){f.$search.val(""),f.$search.removeAttr("aria-activedescendant"),f.$search.trigger("focus")}),d.on("enable",function(){f.$search.prop("disabled",!1),f._transferTabIndex()}),d.on("disable",function(){f.$search.prop("disabled",!0)}),d.on("focus",function(a){f.$search.trigger("focus")}),d.on("results:focus",function(a){f.$search.attr("aria-activedescendant",a.id)}),this.$selection.on("focusin",".select2-search--inline",function(a){f.trigger("focus",a)}),this.$selection.on("focusout",".select2-search--inline",function(a){f._handleBlur(a)}),this.$selection.on("keydown",".select2-search--inline",function(a){if(a.stopPropagation(),f.trigger("keypress",a),f._keyUpPrevented=a.isDefaultPrevented(),a.which===c.BACKSPACE&&""===f.$search.val()){var d=f.$searchContainer.prev(".select2-selection__choice");if(d.length>0){var e=b.GetData(d[0],"data");f.searchRemoveChoice(e),a.preventDefault()}}});var g=document.documentMode,h=g&&g<=11;this.$selection.on("input.searchcheck",".select2-search--inline",function(a){if(h)return void f.$selection.off("input.search input.searchcheck");f.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".select2-search--inline",function(a){if(h&&"input"===a.type)return void f.$selection.off("input.search input.searchcheck");var b=a.which;b!=c.SHIFT&&b!=c.CTRL&&b!=c.ALT&&b!=c.TAB&&f.handleSearch(a)})},d.prototype._transferTabIndex=function(a){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},d.prototype.createPlaceholder=function(a,b){this.$search.attr("placeholder",b.text)},d.prototype.update=function(a,b){var c=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),a.call(this,b),this.$selection.find(".select2-selection__rendered").append(this.$searchContainer),this.resizeSearch(),c&&this.$search.focus()},d.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var a=this.$search.val();this.trigger("query",{term:a})}this._keyUpPrevented=!1},d.prototype.searchRemoveChoice=function(a,b){this.trigger("unselect",{data:b}),this.$search.val(b.text),this.handleSearch()},d.prototype.resizeSearch=function(){this.$search.css("width","25px");var a="";if(""!==this.$search.attr("placeholder"))a=this.$selection.find(".select2-selection__rendered").innerWidth();else{a=.75*(this.$search.val().length+1)+"em"}this.$search.css("width",a)},d}),b.define("select2/selection/eventRelay",["jquery"],function(a){function b(){}return b.prototype.bind=function(b,c,d){var e=this,f=["open","opening","close","closing","select","selecting","unselect","unselecting","clear","clearing"],g=["opening","closing","selecting","unselecting","clearing"];b.call(this,c,d),c.on("*",function(b,c){if(-1!==a.inArray(b,f)){c=c||{};var d=a.Event("select2:"+b,{params:c});e.$element.trigger(d),-1!==a.inArray(b,g)&&(c.prevented=d.isDefaultPrevented())}})},b}),b.define("select2/translation",["jquery","require"],function(a,b){function c(a){this.dict=a||{}}return c.prototype.all=function(){return this.dict},c.prototype.get=function(a){return this.dict[a]},c.prototype.extend=function(b){this.dict=a.extend({},b.all(),this.dict)},c._cache={},c.loadPath=function(a){if(!(a in c._cache)){var d=b(a);c._cache[a]=d}return new c(c._cache[a])},c}),b.define("select2/diacritics",[],function(){return{"Ⓐ":"A","Ａ":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","Ｂ":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","Ｃ":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","Ｄ":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","Ǳ":"DZ","Ǆ":"DZ","ǲ":"Dz","ǅ":"Dz","Ⓔ":"E","Ｅ":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","Ｆ":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","Ｇ":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","Ｈ":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","Ｉ":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","Ｊ":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","Ｋ":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","Ｌ":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","Ǉ":"LJ","ǈ":"Lj","Ⓜ":"M","Ｍ":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","Ｎ":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","Ǌ":"NJ","ǋ":"Nj","Ⓞ":"O","Ｏ":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","Ｐ":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Ｑ":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","Ｒ":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","Ｓ":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","Ｔ":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","Ｕ":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","Ｖ":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","Ｗ":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","Ｘ":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Ｙ":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Ｚ":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","ａ":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","ｂ":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","ｃ":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","ｄ":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","ǳ":"dz","ǆ":"dz","ⓔ":"e","ｅ":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","ｆ":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","ｇ":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","ｈ":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","ｉ":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","ｊ":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","ｋ":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","ｌ":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","ǉ":"lj","ⓜ":"m","ｍ":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","ｎ":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ŉ":"n","ꞑ":"n","ꞥ":"n","ǌ":"nj","ⓞ":"o","ｏ":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","ｐ":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","ｑ":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","ｒ":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","ｓ":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","ｔ":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","ｕ":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","ｖ":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","ｗ":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","ｘ":"x","ẋ":"x","ẍ":"x","ⓨ":"y","ｙ":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","ｚ":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"}}),b.define("select2/data/base",["../utils"],function(a){function b(a,c){b.__super__.constructor.call(this)}return a.Extend(b,a.Observable),b.prototype.current=function(a){throw new Error("The `current` method must be defined in child classes.")},b.prototype.query=function(a,b){throw new Error("The `query` method must be defined in child classes.")},b.prototype.bind=function(a,b){},b.prototype.destroy=function(){},b.prototype.generateResultId=function(b,c){var d=b.id+"-result-";return d+=a.generateChars(4),null!=c.id?d+="-"+c.id.toString():d+="-"+a.generateChars(4),d},b}),b.define("select2/data/select",["./base","../utils","jquery"],function(a,b,c){function d(a,b){this.$element=a,this.options=b,d.__super__.constructor.call(this)}return b.Extend(d,a),d.prototype.current=function(a){var b=[],d=this;this.$element.find(":selected").each(function(){var a=c(this),e=d.item(a);b.push(e)}),a(b)},d.prototype.select=function(a){var b=this;if(a.selected=!0,c(a.element).is("option"))return a.element.selected=!0,void this.$element.trigger("change");if(this.$element.prop("multiple"))this.current(function(d){var e=[];a=[a],a.push.apply(a,d);for(var f=0;f<a.length;f++){var g=a[f].id;-1===c.inArray(g,e)&&e.push(g)}b.$element.val(e),b.$element.trigger("change")});else{var d=a.id;this.$element.val(d),this.$element.trigger("change")}},d.prototype.unselect=function(a){var b=this;if(this.$element.prop("multiple")){if(a.selected=!1,c(a.element).is("option"))return a.element.selected=!1,void this.$element.trigger("change");this.current(function(d){for(var e=[],f=0;f<d.length;f++){var g=d[f].id;g!==a.id&&-1===c.inArray(g,e)&&e.push(g)}b.$element.val(e),b.$element.trigger("change")})}},d.prototype.bind=function(a,b){var c=this;this.container=a,a.on("select",function(a){c.select(a.data)}),a.on("unselect",function(a){c.unselect(a.data)})},d.prototype.destroy=function(){this.$element.find("*").each(function(){b.RemoveData(this)})},d.prototype.query=function(a,b){var d=[],e=this;this.$element.children().each(function(){var b=c(this);if(b.is("option")||b.is("optgroup")){var f=e.item(b),g=e.matches(a,f);null!==g&&d.push(g)}}),b({results:d})},d.prototype.addOptions=function(a){b.appendMany(this.$element,a)},d.prototype.option=function(a){var d;a.children?(d=document.createElement("optgroup"),d.label=a.text):(d=document.createElement("option"),void 0!==d.textContent?d.textContent=a.text:d.innerText=a.text),void 0!==a.id&&(d.value=a.id),a.disabled&&(d.disabled=!0),a.selected&&(d.selected=!0),a.title&&(d.title=a.title);var e=c(d),f=this._normalizeItem(a);return f.element=d,b.StoreData(d,"data",f),e},d.prototype.item=function(a){var d={};if(null!=(d=b.GetData(a[0],"data")))return d;if(a.is("option"))d={id:a.val(),text:a.text(),disabled:a.prop("disabled"),selected:a.prop("selected"),title:a.prop("title")};else if(a.is("optgroup")){d={text:a.prop("label"),children:[],title:a.prop("title")};for(var e=a.children("option"),f=[],g=0;g<e.length;g++){var h=c(e[g]),i=this.item(h);f.push(i)}d.children=f}return d=this._normalizeItem(d),d.element=a[0],b.StoreData(a[0],"data",d),d},d.prototype._normalizeItem=function(a){a!==Object(a)&&(a={id:a,text:a}),a=c.extend({},{text:""},a);var b={selected:!1,disabled:!1};return null!=a.id&&(a.id=a.id.toString()),null!=a.text&&(a.text=a.text.toString()),null==a._resultId&&a.id&&null!=this.container&&(a._resultId=this.generateResultId(this.container,a)),c.extend({},b,a)},d.prototype.matches=function(a,b){return this.options.get("matcher")(a,b)},d}),b.define("select2/data/array",["./select","../utils","jquery"],function(a,b,c){function d(a,b){var c=b.get("data")||[];d.__super__.constructor.call(this,a,b),this.addOptions(this.convertToOptions(c))}return b.Extend(d,a),d.prototype.select=function(a){var b=this.$element.find("option").filter(function(b,c){return c.value==a.id.toString()});0===b.length&&(b=this.option(a),this.addOptions(b)),d.__super__.select.call(this,a)},d.prototype.convertToOptions=function(a){function d(a){return function(){return c(this).val()==a.id}}for(var e=this,f=this.$element.find("option"),g=f.map(function(){return e.item(c(this)).id}).get(),h=[],i=0;i<a.length;i++){var j=this._normalizeItem(a[i]);if(c.inArray(j.id,g)>=0){var k=f.filter(d(j)),l=this.item(k),m=c.extend(!0,{},j,l),n=this.option(m);k.replaceWith(n)}else{var o=this.option(j);if(j.children){var p=this.convertToOptions(j.children);b.appendMany(o,p)}h.push(o)}}return h},d}),b.define("select2/data/ajax",["./array","../utils","jquery"],function(a,b,c){function d(a,b){this.ajaxOptions=this._applyDefaults(b.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),d.__super__.constructor.call(this,a,b)}return b.Extend(d,a),d.prototype._applyDefaults=function(a){var b={data:function(a){return c.extend({},a,{q:a.term})},transport:function(a,b,d){var e=c.ajax(a);return e.then(b),e.fail(d),e}};return c.extend({},b,a,!0)},d.prototype.processResults=function(a){return a},d.prototype.query=function(a,b){function d(){var d=f.transport(f,function(d){var f=e.processResults(d,a);e.options.get("debug")&&window.console&&console.error&&(f&&f.results&&c.isArray(f.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),b(f)},function(){"status"in d&&(0===d.status||"0"===d.status)||e.trigger("results:message",{message:"errorLoading"})});e._request=d}var e=this;null!=this._request&&(c.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var f=c.extend({type:"GET"},this.ajaxOptions);"function"==typeof f.url&&(f.url=f.url.call(this.$element,a)),"function"==typeof f.data&&(f.data=f.data.call(this.$element,a)),this.ajaxOptions.delay&&null!=a.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(d,this.ajaxOptions.delay)):d()},d}),b.define("select2/data/tags",["jquery"],function(a){function b(b,c,d){var e=d.get("tags"),f=d.get("createTag");void 0!==f&&(this.createTag=f);var g=d.get("insertTag");if(void 0!==g&&(this.insertTag=g),b.call(this,c,d),a.isArray(e))for(var h=0;h<e.length;h++){var i=e[h],j=this._normalizeItem(i),k=this.option(j);this.$element.append(k)}}return b.prototype.query=function(a,b,c){function d(a,f){for(var g=a.results,h=0;h<g.length;h++){var i=g[h],j=null!=i.children&&!d({results:i.children},!0);if((i.text||"").toUpperCase()===(b.term||"").toUpperCase()||j)return!f&&(a.data=g,void c(a))}if(f)return!0;var k=e.createTag(b);if(null!=k){var l=e.option(k);l.attr("data-select2-tag",!0),e.addOptions([l]),e.insertTag(g,k)}a.results=g,c(a)}var e=this;if(this._removeOldTags(),null==b.term||null!=b.page)return void a.call(this,b,c);a.call(this,b,d)},b.prototype.createTag=function(b,c){var d=a.trim(c.term);return""===d?null:{id:d,text:d}},b.prototype.insertTag=function(a,b,c){b.unshift(c)},b.prototype._removeOldTags=function(b){this._lastTag;this.$element.find("option[data-select2-tag]").each(function(){this.selected||a(this).remove()})},b}),b.define("select2/data/tokenizer",["jquery"],function(a){function b(a,b,c){var d=c.get("tokenizer");void 0!==d&&(this.tokenizer=d),a.call(this,b,c)}return b.prototype.bind=function(a,b,c){a.call(this,b,c),this.$search=b.dropdown.$search||b.selection.$search||c.find(".select2-search__field")},b.prototype.query=function(b,c,d){function e(b){var c=g._normalizeItem(b);if(!g.$element.find("option").filter(function(){return a(this).val()===c.id}).length){var d=g.option(c);d.attr("data-select2-tag",!0),g._removeOldTags(),g.addOptions([d])}f(c)}function f(a){g.trigger("select",{data:a})}var g=this;c.term=c.term||"";var h=this.tokenizer(c,this.options,e);h.term!==c.term&&(this.$search.length&&(this.$search.val(h.term),this.$search.focus()),c.term=h.term),b.call(this,c,d)},b.prototype.tokenizer=function(b,c,d,e){for(var f=d.get("tokenSeparators")||[],g=c.term,h=0,i=this.createTag||function(a){return{id:a.term,text:a.term}};h<g.length;){var j=g[h];if(-1!==a.inArray(j,f)){var k=g.substr(0,h),l=a.extend({},c,{term:k}),m=i(l);null!=m?(e(m),g=g.substr(h+1)||"",h=0):h++}else h++}return{term:g}},b}),b.define("select2/data/minimumInputLength",[],function(){function a(a,b,c){this.minimumInputLength=c.get("minimumInputLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){if(b.term=b.term||"",b.term.length<this.minimumInputLength)return void this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:b.term,params:b}});a.call(this,b,c)},a}),b.define("select2/data/maximumInputLength",[],function(){function a(a,b,c){this.maximumInputLength=c.get("maximumInputLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){if(b.term=b.term||"",this.maximumInputLength>0&&b.term.length>this.maximumInputLength)return void this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:b.term,params:b}});a.call(this,b,c)},a}),b.define("select2/data/maximumSelectionLength",[],function(){function a(a,b,c){this.maximumSelectionLength=c.get("maximumSelectionLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){var d=this;this.current(function(e){var f=null!=e?e.length:0;if(d.maximumSelectionLength>0&&f>=d.maximumSelectionLength)return void d.trigger("results:message",{message:"maximumSelected",args:{maximum:d.maximumSelectionLength}});a.call(d,b,c)})},a}),b.define("select2/dropdown",["jquery","./utils"],function(a,b){function c(a,b){this.$element=a,this.options=b,c.__super__.constructor.call(this)}return b.Extend(c,b.Observable),c.prototype.render=function(){var b=a('<span class="select2-dropdown"><span class="select2-results"></span></span>');return b.attr("dir",this.options.get("dir")),this.$dropdown=b,b},c.prototype.bind=function(){},c.prototype.position=function(a,b){},c.prototype.destroy=function(){this.$dropdown.remove()},c}),b.define("select2/dropdown/search",["jquery","../utils"],function(a,b){function c(){}return c.prototype.render=function(b){var c=b.call(this),d=a('<span class="select2-search select2-search--dropdown"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="none" spellcheck="false" role="textbox" /></span>');return this.$searchContainer=d,this.$search=d.find("input"),c.prepend(d),c},c.prototype.bind=function(b,c,d){var e=this;b.call(this,c,d),this.$search.on("keydown",function(a){e.trigger("keypress",a),e._keyUpPrevented=a.isDefaultPrevented()}),this.$search.on("input",function(b){a(this).off("keyup")}),this.$search.on("keyup input",function(a){e.handleSearch(a)}),c.on("open",function(){e.$search.attr("tabindex",0),e.$search.focus(),window.setTimeout(function(){e.$search.focus()},0)}),c.on("close",function(){e.$search.attr("tabindex",-1),e.$search.val(""),e.$search.blur()}),c.on("focus",function(){c.isOpen()||e.$search.focus()}),c.on("results:all",function(a){if(null==a.query.term||""===a.query.term){e.showSearch(a)?e.$searchContainer.removeClass("select2-search--hide"):e.$searchContainer.addClass("select2-search--hide")}})},c.prototype.handleSearch=function(a){if(!this._keyUpPrevented){var b=this.$search.val();this.trigger("query",{term:b})}this._keyUpPrevented=!1},c.prototype.showSearch=function(a,b){return!0},c}),b.define("select2/dropdown/hidePlaceholder",[],function(){function a(a,b,c,d){this.placeholder=this.normalizePlaceholder(c.get("placeholder")),a.call(this,b,c,d)}return a.prototype.append=function(a,b){b.results=this.removePlaceholder(b.results),a.call(this,b)},a.prototype.normalizePlaceholder=function(a,b){return"string"==typeof b&&(b={id:"",text:b}),b},a.prototype.removePlaceholder=function(a,b){for(var c=b.slice(0),d=b.length-1;d>=0;d--){var e=b[d];this.placeholder.id===e.id&&c.splice(d,1)}return c},a}),b.define("select2/dropdown/infiniteScroll",["jquery"],function(a){function b(a,b,c,d){this.lastParams={},a.call(this,b,c,d),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return b.prototype.append=function(a,b){this.$loadingMore.remove(),this.loading=!1,a.call(this,b),this.showLoadingMore(b)&&this.$results.append(this.$loadingMore)},b.prototype.bind=function(b,c,d){var e=this;b.call(this,c,d),c.on("query",function(a){e.lastParams=a,e.loading=!0}),c.on("query:append",function(a){e.lastParams=a,e.loading=!0}),this.$results.on("scroll",function(){var b=a.contains(document.documentElement,e.$loadingMore[0]);if(!e.loading&&b){e.$results.offset().top+e.$results.outerHeight(!1)+50>=e.$loadingMore.offset().top+e.$loadingMore.outerHeight(!1)&&e.loadMore()}})},b.prototype.loadMore=function(){this.loading=!0;var b=a.extend({},{page:1},this.lastParams);b.page++,this.trigger("query:append",b)},b.prototype.showLoadingMore=function(a,b){return b.pagination&&b.pagination.more},b.prototype.createLoadingMore=function(){var b=a('<li class="select2-results__option select2-results__option--load-more"role="treeitem" aria-disabled="true"></li>'),c=this.options.get("translations").get("loadingMore");return b.html(c(this.lastParams)),b},b}),b.define("select2/dropdown/attachBody",["jquery","../utils"],function(a,b){function c(b,c,d){this.$dropdownParent=d.get("dropdownParent")||a(document.body),b.call(this,c,d)}return c.prototype.bind=function(a,b,c){var d=this,e=!1;a.call(this,b,c),b.on("open",function(){d._showDropdown(),d._attachPositioningHandler(b),e||(e=!0,b.on("results:all",function(){d._positionDropdown(),d._resizeDropdown()}),b.on("results:append",function(){d._positionDropdown(),d._resizeDropdown()}))}),b.on("close",function(){d._hideDropdown(),d._detachPositioningHandler(b)}),this.$dropdownContainer.on("mousedown",function(a){a.stopPropagation()})},c.prototype.destroy=function(a){a.call(this),this.$dropdownContainer.remove()},c.prototype.position=function(a,b,c){b.attr("class",c.attr("class")),b.removeClass("select2"),b.addClass("select2-container--open"),b.css({position:"absolute",top:-999999}),this.$container=c},c.prototype.render=function(b){var c=a("<span></span>"),d=b.call(this);return c.append(d),this.$dropdownContainer=c,c},c.prototype._hideDropdown=function(a){this.$dropdownContainer.detach()},c.prototype._attachPositioningHandler=function(c,d){var e=this,f="scroll.select2."+d.id,g="resize.select2."+d.id,h="orientationchange.select2."+d.id,i=this.$container.parents().filter(b.hasScroll);i.each(function(){b.StoreData(this,"select2-scroll-position",{x:a(this).scrollLeft(),y:a(this).scrollTop()})}),i.on(f,function(c){var d=b.GetData(this,"select2-scroll-position");a(this).scrollTop(d.y)}),a(window).on(f+" "+g+" "+h,function(a){e._positionDropdown(),e._resizeDropdown()})},c.prototype._detachPositioningHandler=function(c,d){var e="scroll.select2."+d.id,f="resize.select2."+d.id,g="orientationchange.select2."+d.id;this.$container.parents().filter(b.hasScroll).off(e),a(window).off(e+" "+f+" "+g)},c.prototype._positionDropdown=function(){var b=a(window),c=this.$dropdown.hasClass("select2-dropdown--above"),d=this.$dropdown.hasClass("select2-dropdown--below"),e=null,f=this.$container.offset();f.bottom=f.top+this.$container.outerHeight(!1);var g={height:this.$container.outerHeight(!1)};g.top=f.top,g.bottom=f.top+g.height;var h={height:this.$dropdown.outerHeight(!1)},i={top:b.scrollTop(),bottom:b.scrollTop()+b.height()},j=i.top<f.top-h.height,k=i.bottom>f.bottom+h.height,l={left:f.left,top:g.bottom},m=this.$dropdownParent;"static"===m.css("position")&&(m=m.offsetParent());var n=m.offset();l.top-=n.top,l.left-=n.left,c||d||(e="below"),k||!j||c?!j&&k&&c&&(e="below"):e="above",("above"==e||c&&"below"!==e)&&(l.top=g.top-n.top-h.height),null!=e&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+e),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+e)),this.$dropdownContainer.css(l)},c.prototype._resizeDropdown=function(){var a={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(a.minWidth=a.width,a.position="relative",a.width="auto"),this.$dropdown.css(a)},c.prototype._showDropdown=function(a){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},c}),b.define("select2/dropdown/minimumResultsForSearch",[],function(){function a(b){for(var c=0,d=0;d<b.length;d++){var e=b[d];e.children?c+=a(e.children):c++}return c}function b(a,b,c,d){this.minimumResultsForSearch=c.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),a.call(this,b,c,d)}return b.prototype.showSearch=function(b,c){return!(a(c.data.results)<this.minimumResultsForSearch)&&b.call(this,c)},b}),b.define("select2/dropdown/selectOnClose",["../utils"],function(a){function b(){}return b.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),b.on("close",function(a){d._handleSelectOnClose(a)})},b.prototype._handleSelectOnClose=function(b,c){if(c&&null!=c.originalSelect2Event){var d=c.originalSelect2Event;if("select"===d._type||"unselect"===d._type)return}var e=this.getHighlightedResults();if(!(e.length<1)){var f=a.GetData(e[0],"data");null!=f.element&&f.element.selected||null==f.element&&f.selected||this.trigger("select",{data:f})}},b}),b.define("select2/dropdown/closeOnSelect",[],function(){function a(){}return a.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),b.on("select",function(a){d._selectTriggered(a)}),b.on("unselect",function(a){d._selectTriggered(a)})},a.prototype._selectTriggered=function(a,b){var c=b.originalEvent;c&&c.ctrlKey||this.trigger("close",{originalEvent:c,originalSelect2Event:b})},a}),b.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(a){var b=a.input.length-a.maximum,c="Please delete "+b+" character";return 1!=b&&(c+="s"),c},inputTooShort:function(a){return"Please enter "+(a.minimum-a.input.length)+" or more characters"},loadingMore:function(){return"Loading more results…"},maximumSelected:function(a){var b="You can only select "+a.maximum+" item";return 1!=a.maximum&&(b+="s"),b},noResults:function(){return"No results found"},searching:function(){return"Searching…"}}}),b.define("select2/defaults",["jquery","require","./results","./selection/single","./selection/multiple","./selection/placeholder","./selection/allowClear","./selection/search","./selection/eventRelay","./utils","./translation","./diacritics","./data/select","./data/array","./data/ajax","./data/tags","./data/tokenizer","./data/minimumInputLength","./data/maximumInputLength","./data/maximumSelectionLength","./dropdown","./dropdown/search","./dropdown/hidePlaceholder","./dropdown/infiniteScroll","./dropdown/attachBody","./dropdown/minimumResultsForSearch","./dropdown/selectOnClose","./dropdown/closeOnSelect","./i18n/en"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C){function D(){this.reset()}return D.prototype.apply=function(l){if(l=a.extend(!0,{},this.defaults,l),null==l.dataAdapter){if(null!=l.ajax?l.dataAdapter=o:null!=l.data?l.dataAdapter=n:l.dataAdapter=m,l.minimumInputLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,r)),l.maximumInputLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,s)),l.maximumSelectionLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,t)),l.tags&&(l.dataAdapter=j.Decorate(l.dataAdapter,p)),null==l.tokenSeparators&&null==l.tokenizer||(l.dataAdapter=j.Decorate(l.dataAdapter,q)),null!=l.query){var C=b(l.amdBase+"compat/query");l.dataAdapter=j.Decorate(l.dataAdapter,C)}if(null!=l.initSelection){var D=b(l.amdBase+"compat/initSelection");l.dataAdapter=j.Decorate(l.dataAdapter,D)}}if(null==l.resultsAdapter&&(l.resultsAdapter=c,null!=l.ajax&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,x)),null!=l.placeholder&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,w)),l.selectOnClose&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,A))),null==l.dropdownAdapter){if(l.multiple)l.dropdownAdapter=u;else{var E=j.Decorate(u,v);l.dropdownAdapter=E}if(0!==l.minimumResultsForSearch&&(l.dropdownAdapter=j.Decorate(l.dropdownAdapter,z)),l.closeOnSelect&&(l.dropdownAdapter=j.Decorate(l.dropdownAdapter,B)),null!=l.dropdownCssClass||null!=l.dropdownCss||null!=l.adaptDropdownCssClass){var F=b(l.amdBase+"compat/dropdownCss");l.dropdownAdapter=j.Decorate(l.dropdownAdapter,F)}l.dropdownAdapter=j.Decorate(l.dropdownAdapter,y)}if(null==l.selectionAdapter){if(l.multiple?l.selectionAdapter=e:l.selectionAdapter=d,null!=l.placeholder&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,f)),l.allowClear&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,g)),l.multiple&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,h)),null!=l.containerCssClass||null!=l.containerCss||null!=l.adaptContainerCssClass){var G=b(l.amdBase+"compat/containerCss");l.selectionAdapter=j.Decorate(l.selectionAdapter,G)}l.selectionAdapter=j.Decorate(l.selectionAdapter,i)}if("string"==typeof l.language)if(l.language.indexOf("-")>0){var H=l.language.split("-"),I=H[0];l.language=[l.language,I]}else l.language=[l.language];if(a.isArray(l.language)){var J=new k;l.language.push("en");for(var K=l.language,L=0;L<K.length;L++){var M=K[L],N={};try{N=k.loadPath(M)}catch(a){try{M=this.defaults.amdLanguageBase+M,N=k.loadPath(M)}catch(a){l.debug&&window.console&&console.warn&&console.warn('Select2: The language file for "'+M+'" could not be automatically loaded. A fallback will be used instead.');continue}}J.extend(N)}l.translations=J}else{var O=k.loadPath(this.defaults.amdLanguageBase+"en"),P=new k(l.language);P.extend(O),l.translations=P}return l},D.prototype.reset=function(){function b(a){function b(a){return l[a]||a}return a.replace(/[^\u0000-\u007E]/g,b)}function c(d,e){if(""===a.trim(d.term))return e;if(e.children&&e.children.length>0){for(var f=a.extend(!0,{},e),g=e.children.length-1;g>=0;g--){null==c(d,e.children[g])&&f.children.splice(g,1)}return f.children.length>0?f:c(d,f)}var h=b(e.text).toUpperCase(),i=b(d.term).toUpperCase();return h.indexOf(i)>-1?e:null}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:j.escapeMarkup,language:C,matcher:c,minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,sorter:function(a){return a},templateResult:function(a){return a.text},templateSelection:function(a){return a.text},theme:"default",width:"resolve"}},D.prototype.set=function(b,c){var d=a.camelCase(b),e={};e[d]=c;var f=j._convertData(e);a.extend(!0,this.defaults,f)},new D}),b.define("select2/options",["require","jquery","./defaults","./utils"],function(a,b,c,d){function e(b,e){if(this.options=b,null!=e&&this.fromElement(e),this.options=c.apply(this.options),e&&e.is("input")){var f=a(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=d.Decorate(this.options.dataAdapter,f)}}return e.prototype.fromElement=function(a){var c=["select2"];null==this.options.multiple&&(this.options.multiple=a.prop("multiple")),null==this.options.disabled&&(this.options.disabled=a.prop("disabled")),null==this.options.language&&(a.prop("lang")?this.options.language=a.prop("lang").toLowerCase():a.closest("[lang]").prop("lang")&&(this.options.language=a.closest("[lang]").prop("lang"))),null==this.options.dir&&(a.prop("dir")?this.options.dir=a.prop("dir"):a.closest("[dir]").prop("dir")?this.options.dir=a.closest("[dir]").prop("dir"):this.options.dir="ltr"),a.prop("disabled",this.options.disabled),a.prop("multiple",this.options.multiple),d.GetData(a[0],"select2Tags")&&(this.options.debug&&window.console&&console.warn&&console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'),d.StoreData(a[0],"data",d.GetData(a[0],"select2Tags")),d.StoreData(a[0],"tags",!0)),d.GetData(a[0],"ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2."),a.attr("ajax--url",d.GetData(a[0],"ajaxUrl")),d.StoreData(a[0],"ajax-Url",d.GetData(a[0],"ajaxUrl")));var e={};e=b.fn.jquery&&"1."==b.fn.jquery.substr(0,2)&&a[0].dataset?b.extend(!0,{},a[0].dataset,d.GetData(a[0])):d.GetData(a[0]);var f=b.extend(!0,{},e);f=d._convertData(f);for(var g in f)b.inArray(g,c)>-1||(b.isPlainObject(this.options[g])?b.extend(this.options[g],f[g]):this.options[g]=f[g]);return this},e.prototype.get=function(a){return this.options[a]},e.prototype.set=function(a,b){this.options[a]=b},e}),b.define("select2/core",["jquery","./options","./utils","./keys"],function(a,b,c,d){var e=function(a,d){null!=c.GetData(a[0],"select2")&&c.GetData(a[0],"select2").destroy(),this.$element=a,this.id=this._generateId(a),d=d||{},this.options=new b(d,a),e.__super__.constructor.call(this);var f=a.attr("tabindex")||0;c.StoreData(a[0],"old-tabindex",f),a.attr("tabindex","-1");var g=this.options.get("dataAdapter");this.dataAdapter=new g(a,this.options);var h=this.render();this._placeContainer(h);var i=this.options.get("selectionAdapter");this.selection=new i(a,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,h);var j=this.options.get("dropdownAdapter");this.dropdown=new j(a,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,h);var k=this.options.get("resultsAdapter");this.results=new k(a,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var l=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(a){l.trigger("selection:update",{data:a})}),a.addClass("select2-hidden-accessible"),a.attr("aria-hidden","true"),this._syncAttributes(),c.StoreData(a[0],"select2",this)};return c.Extend(e,c.Observable),e.prototype._generateId=function(a){var b="";return b=null!=a.attr("id")?a.attr("id"):null!=a.attr("name")?a.attr("name")+"-"+c.generateChars(2):c.generateChars(4),b=b.replace(/(:|\.|\[|\]|,)/g,""),b="select2-"+b},e.prototype._placeContainer=function(a){a.insertAfter(this.$element);var b=this._resolveWidth(this.$element,this.options.get("width"));null!=b&&a.css("width",b)},e.prototype._resolveWidth=function(a,b){var c=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==b){var d=this._resolveWidth(a,"style");return null!=d?d:this._resolveWidth(a,"element")}if("element"==b){var e=a.outerWidth(!1);return e<=0?"auto":e+"px"}if("style"==b){var f=a.attr("style");if("string"!=typeof f)return null;for(var g=f.split(";"),h=0,i=g.length;h<i;h+=1){var j=g[h].replace(/\s/g,""),k=j.match(c);if(null!==k&&k.length>=1)return k[1]}return null}return b},e.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},e.prototype._registerDomEvents=function(){var b=this;this.$element.on("change.select2",function(){b.dataAdapter.current(function(a){b.trigger("selection:update",{data:a})})}),this.$element.on("focus.select2",function(a){b.trigger("focus",a)}),this._syncA=c.bind(this._syncAttributes,this),this._syncS=c.bind(this._syncSubtree,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._syncA);var d=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=d?(this._observer=new d(function(c){a.each(c,b._syncA),a.each(c,b._syncS)}),this._observer.observe(this.$element[0],{attributes:!0,childList:!0,subtree:!1})):this.$element[0].addEventListener&&(this.$element[0].addEventListener("DOMAttrModified",b._syncA,!1),this.$element[0].addEventListener("DOMNodeInserted",b._syncS,!1),this.$element[0].addEventListener("DOMNodeRemoved",b._syncS,!1))},e.prototype._registerDataEvents=function(){var a=this;this.dataAdapter.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerSelectionEvents=function(){var b=this,c=["toggle","focus"];this.selection.on("toggle",function(){b.toggleDropdown()}),this.selection.on("focus",function(a){b.focus(a)}),this.selection.on("*",function(d,e){-1===a.inArray(d,c)&&b.trigger(d,e)})},e.prototype._registerDropdownEvents=function(){var a=this;this.dropdown.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerResultsEvents=function(){var a=this;this.results.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerEvents=function(){var a=this;this.on("open",function(){a.$container.addClass("select2-container--open")}),this.on("close",function(){a.$container.removeClass("select2-container--open")}),this.on("enable",function(){a.$container.removeClass("select2-container--disabled")}),this.on("disable",function(){a.$container.addClass("select2-container--disabled")}),this.on("blur",function(){a.$container.removeClass("select2-container--focus")}),this.on("query",function(b){a.isOpen()||a.trigger("open",{}),this.dataAdapter.query(b,function(c){a.trigger("results:all",{data:c,query:b})})}),this.on("query:append",function(b){this.dataAdapter.query(b,function(c){a.trigger("results:append",{data:c,query:b})})}),this.on("keypress",function(b){var c=b.which;a.isOpen()?c===d.ESC||c===d.TAB||c===d.UP&&b.altKey?(a.close(),b.preventDefault()):c===d.ENTER?(a.trigger("results:select",{}),b.preventDefault()):c===d.SPACE&&b.ctrlKey?(a.trigger("results:toggle",{}),b.preventDefault()):c===d.UP?(a.trigger("results:previous",{}),b.preventDefault()):c===d.DOWN&&(a.trigger("results:next",{}),b.preventDefault()):(c===d.ENTER||c===d.SPACE||c===d.DOWN&&b.altKey)&&(a.open(),b.preventDefault())})},e.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.options.get("disabled")?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},e.prototype._syncSubtree=function(a,b){var c=!1,d=this;if(!a||!a.target||"OPTION"===a.target.nodeName||"OPTGROUP"===a.target.nodeName){if(b)if(b.addedNodes&&b.addedNodes.length>0)for(var e=0;e<b.addedNodes.length;e++){var f=b.addedNodes[e];f.selected&&(c=!0)}else b.removedNodes&&b.removedNodes.length>0&&(c=!0);else c=!0;c&&this.dataAdapter.current(function(a){d.trigger("selection:update",{data:a})})}},e.prototype.trigger=function(a,b){var c=e.__super__.trigger,d={open:"opening",close:"closing",select:"selecting",unselect:"unselecting",clear:"clearing"};if(void 0===b&&(b={}),a in d){var f=d[a],g={prevented:!1,name:a,args:b};if(c.call(this,f,g),g.prevented)return void(b.prevented=!0)}c.call(this,a,b)},e.prototype.toggleDropdown=function(){this.options.get("disabled")||(this.isOpen()?this.close():this.open())},e.prototype.open=function(){this.isOpen()||this.trigger("query",{})},e.prototype.close=function(){this.isOpen()&&this.trigger("close",{})},e.prototype.isOpen=function(){return this.$container.hasClass("select2-container--open")},e.prototype.hasFocus=function(){return this.$container.hasClass("select2-container--focus")},e.prototype.focus=function(a){this.hasFocus()||(this.$container.addClass("select2-container--focus"),this.trigger("focus",{}))},e.prototype.enable=function(a){this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'),null!=a&&0!==a.length||(a=[!0]);var b=!a[0];this.$element.prop("disabled",b)},e.prototype.data=function(){this.options.get("debug")&&arguments.length>0&&window.console&&console.warn&&console.warn('Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.');var a=[];return this.dataAdapter.current(function(b){a=b}),a},e.prototype.val=function(b){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'),null==b||0===b.length)return this.$element.val();var c=b[0];a.isArray(c)&&(c=a.map(c,function(a){return a.toString()})),this.$element.val(c).trigger("change")},e.prototype.destroy=function(){this.$container.remove(),this.$element[0].detachEvent&&this.$element[0].detachEvent("onpropertychange",this._syncA),null!=this._observer?(this._observer.disconnect(),this._observer=null):this.$element[0].removeEventListener&&(this.$element[0].removeEventListener("DOMAttrModified",this._syncA,!1),this.$element[0].removeEventListener("DOMNodeInserted",this._syncS,!1),this.$element[0].removeEventListener("DOMNodeRemoved",this._syncS,!1)),this._syncA=null,this._syncS=null,this.$element.off(".select2"),this.$element.attr("tabindex",c.GetData(this.$element[0],"old-tabindex")),this.$element.removeClass("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),c.RemoveData(this.$element[0]),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null},e.prototype.render=function(){var b=a('<span class="select2 select2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');return b.attr("dir",this.options.get("dir")),this.$container=b,this.$container.addClass("select2-container--"+this.options.get("theme")),c.StoreData(b[0],"element",this.$element),b},e}),b.define("jquery-mousewheel",["jquery"],function(a){return a}),b.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults","./select2/utils"],function(a,b,c,d,e){if(null==a.fn.select2){var f=["open","close","destroy"];a.fn.select2=function(b){if("object"==typeof(b=b||{}))return this.each(function(){var d=a.extend(!0,{},b);new c(a(this),d)}),this;if("string"==typeof b){var d,g=Array.prototype.slice.call(arguments,1);return this.each(function(){var a=e.GetData(this,"select2");null==a&&window.console&&console.error&&console.error("The select2('"+b+"') method was called on an element that is not using Select2."),d=a[b].apply(a,g)}),a.inArray(b,f)>-1?this:d}throw new Error("Invalid arguments for Select2: "+b)}}return null==a.fn.select2.defaults&&(a.fn.select2.defaults=d),c}),{define:b.define,require:b.require}}(),c=b.require("jquery.select2");return a.fn.select2.amd=b,c});
(function($){'use strict';var defaults={mode:'lg-slide',cssEasing:'ease',easing:'linear',speed:600,height:'100%',width:'100%',addClass:'',galleryId:1};function AysSurveyPlugin(element,options){this.el=element;this.$el=$(element);this.htmlClassPrefix='ays-survey-';this.dbOptionsPrefix='survey_';this.ajaxAction='ays_survey_ajax';this.dbOptions=undefined;this.QuizQuestionsOptions=undefined;this.uniqueId;this.surveyId;this.sectionsContainer;this.sections;this.current_fs;this.next_fs;this.previous_fs;this.left;this.opacity;this.scale;this.animating;this.percentAnimate;this.explanationTimeout;this.confirmBeforeUnload=false;this.emailValidatePattern=/^[a-zA-Z0-9._+-]+@[a-zA-Z0-9._-]+\.\w{2,}$/;this.phoneValidatePattern=/^[0-9)(+ -]+$/;this.init();return this;}
AysSurveyPlugin.prototype.init=function(){var _this=this;_this.uniqueId=_this.$el.data('id');if(typeof window.aysSurveyOptions!='undefined'){_this.dbOptions=JSON.parse(atob(window.aysSurveyOptions[_this.uniqueId]));}
if(_this.$el.hasClass(_this.htmlClassPrefix+'blocked-content')){_this.blockedContent(true);return false;}
_this.setup();_this.blockedContent(false);_this.setEvents();if(_this.dbOptions.survey_enable_survey_start_loader){_this.$el.find('.ays-survey-wait-loading-loader').css("display","none");}
_this.keydown();};AysSurveyPlugin.prototype.setup=function(e){var _this=this;_this.sectionsContainer=_this.$el.find('.'+_this.htmlClassPrefix+'sections');_this.sections=_this.sectionsContainer.find('.'+_this.htmlClassPrefix+'section');_this.sections.first().addClass('active-section');var questionTypeText=$(document).find('textarea.'+_this.htmlClassPrefix+'question-input-textarea');autosize(questionTypeText);var questionTypeSelect=$(document).find('.'+_this.htmlClassPrefix+'question-select');questionTypeSelect.each(function(){$(this).aysDropdown({duration:150,transition:'scale'});});if(_this.dbOptions.options){if(_this.dbOptions.options.survey_enable_info_autofill){var checkAutoFill=_this.dbOptions.options.survey_enable_info_autofill.length>0&&_this.dbOptions.options.survey_enable_info_autofill=="on"?true:false;if(checkAutoFill){var form=_this.$el.find('form');var data=form.serializeFormJSON();data.action=_this.ajaxAction;data.function='ays_survey_get_user_information';data.end_date=_this.GetFullDateTime();data.unique_id=_this.uniqueId;_this.aysAutofillData(data,_this.$el);}}}}
AysSurveyPlugin.prototype.setEvents=function(e){var _this=this;_this.aysNext();_this.aysFinish();_this.$el.on('click','.'+_this.htmlClassPrefix+'answer-label-other input',function(){$(this).parents('.'+_this.htmlClassPrefix+'answer').find('.'+_this.htmlClassPrefix+'answer-other-input').focus();_this.confirmBeforeUnload=true;});_this.$el.on('input','.'+_this.htmlClassPrefix+'answer-other-input',function(){if($(this).parents('.'+_this.htmlClassPrefix+'question').data('type')=='checkbox'){var checkedCount=$(this).parents('.'+_this.htmlClassPrefix+'question-answers').find('.'+_this.htmlClassPrefix+'answer input[type="checkbox"][name^="'+_this.htmlClassPrefix+'answers"]:checked').length;var questionId=$(this).parents('.'+_this.htmlClassPrefix+'question').find('.'+_this.htmlClassPrefix+'question-id').val();questionId=parseInt(questionId);var options=_this.dbOptions[_this.dbOptionsPrefix+'checkbox_options'][questionId];if(typeof options!="undefined"){if(options.enable_max_selection_count===true){if(!(options.max_selection_count!=null&&(options.max_selection_count<checkedCount+1))){$(this).parents('.'+_this.htmlClassPrefix+'answer').find('.'+_this.htmlClassPrefix+'answer-label-other input').prop('checked',true);}}
else{$(this).parents('.'+_this.htmlClassPrefix+'answer').find('.'+_this.htmlClassPrefix+'answer-label-other input').prop('checked',true);}}}else{$(this).parents('.'+_this.htmlClassPrefix+'answer').find('.'+_this.htmlClassPrefix+'answer-label-other input').prop('checked',true);}
_this.confirmBeforeUnload=true;});_this.sectionsContainer.on('change','input[type="radio"][name^="'+_this.htmlClassPrefix+'answers"]',function(){var check_required=$(this).parents('.'+_this.htmlClassPrefix+'question').data('required');if(!check_required){$(this).parents('.'+_this.htmlClassPrefix+'question-answers').find('.'+_this.htmlClassPrefix+'answer-clear-selection-container').addClass('in');$(this).parents('.'+_this.htmlClassPrefix+'question-answers').find('.'+_this.htmlClassPrefix+'answer-clear-selection-container').removeClass('out');$(this).parents('.'+_this.htmlClassPrefix+'question-answers').find('.'+_this.htmlClassPrefix+'answer-clear-selection-container').removeClass(_this.htmlClassPrefix+'visibility-none');}
_this.confirmBeforeUnload=true;});_this.sectionsContainer.on('click','input[type="checkbox"][name^="'+_this.htmlClassPrefix+'answers"]',function(){var questionBox=$(this).parents('.'+_this.htmlClassPrefix+'question');var checkedCount=$(this).parents('.'+_this.htmlClassPrefix+'question-answers').find('.'+_this.htmlClassPrefix+'answer input[type="checkbox"][name^="'+_this.htmlClassPrefix+'answers"]:checked').length;var allVotesCount=$(this).parents('.'+_this.htmlClassPrefix+'question-answers').find('.'+_this.htmlClassPrefix+'answer input[type="checkbox"][name^="'+_this.htmlClassPrefix+'answers"]').length;var questionId=questionBox.find('.'+_this.htmlClassPrefix+'question-id').val();questionId=parseInt(questionId);var options=_this.dbOptions[_this.dbOptionsPrefix+'checkbox_options'][questionId];var minVotes=options.min_selection_count;var maxVotes=options.max_selection_count!=null?options.max_selection_count:0;if(options.enable_max_selection_count===true){var checkVotesCount=(maxVotes!=null||minVotes!=null)?true:false;if(checkVotesCount){if(maxVotes<=0){maxVotes=allVotesCount;}
if(maxVotes<checkedCount){var errorMessage='<img src="'+aysSurveyMakerAjaxPublic.warningIcon+'" alt="error">';errorMessage+='<span>'+aysSurveyLangObj.maximumVotes+' '+maxVotes+'</span>';questionBox.find('.'+_this.htmlClassPrefix+'votes-count-validation-error').html(errorMessage);questionBox.find('.'+_this.htmlClassPrefix+'votes-count-validation-error').show();setTimeout(function(){questionBox.find('.'+_this.htmlClassPrefix+'votes-count-validation-error').hide();},3000);return false;}
if(minVotes>maxVotes){minVotes=maxVotes;}
if(minVotes>allVotesCount){minVotes=allVotesCount;}
if(minVotes<=checkedCount){questionBox.find('.'+_this.htmlClassPrefix+'votes-count-validation-error').hide();}
else{var errorMessage='<img src="'+aysSurveyMakerAjaxPublic.warningIcon+'" alt="error">';errorMessage+='<span>'+aysSurveyLangObj.minimumVotes+' '+minVotes+'</span>';questionBox.find('.'+_this.htmlClassPrefix+'votes-count-validation-error').html(errorMessage);questionBox.find('.'+_this.htmlClassPrefix+'votes-count-validation-error').show();}}}});_this.sectionsContainer.on('click','.'+_this.htmlClassPrefix+'answer-clear-selection-container .'+_this.htmlClassPrefix+'button',function(){var clearContainer=$(this).parents('.'+_this.htmlClassPrefix+'answer-clear-selection-container');$(this).parents('.'+_this.htmlClassPrefix+'question-answers').find('input[type="radio"][name^="'+_this.htmlClassPrefix+'answers"]').prop('checked',false);clearContainer.removeClass('in');clearContainer.addClass('out');if($(this).parents('.'+_this.htmlClassPrefix+'question-answers').find('.'+_this.htmlClassPrefix+'answer-star').length>0){$(this).parents('.'+_this.htmlClassPrefix+'question-answers').find('.'+_this.htmlClassPrefix+'answer-star .'+_this.htmlClassPrefix+'answer-label').each(function(){$(this).find('i').removeClass('fa-star').addClass('fa-star-o').removeAttr('style');$(this).removeClass('active-answer');});}
setTimeout(function(){clearContainer.addClass(_this.htmlClassPrefix+'visibility-none');},200);});var active=false;_this.$el.on('mouseout','.'+_this.htmlClassPrefix+'answer-star',function(){var surveyColor=_this.dbOptions[_this.dbOptionsPrefix+'text_color'];var surveyActiveColor=_this.dbOptions[_this.dbOptionsPrefix+'color'];var allRateLabels=$(this).find('label');if($(this).find(".fa-star").length!==0){active=true;}
if(active){var index=-1;allRateLabels.each(function(){if($(this).hasClass('active-answer')){index=allRateLabels.index(this);}});for(var i=0;i<allRateLabels.length;i++){if(_this.dbOptions[_this.dbOptionsPrefix+'is_business']){if(i>index){allRateLabels.eq(i).find('i').css('color','#ffffff');}else{allRateLabels.eq(i).find('i').css('color','#fc0');}}else{if(i>index){allRateLabels.eq(i).find('i').removeClass('fa-star').addClass('fa-star-o');}else{allRateLabels.eq(i).find('i').removeClass('fa-star-o').addClass('fa-star');}}}}else{allRateLabels.each(function(){if(_this.dbOptions[_this.dbOptionsPrefix+'is_business']){$(this).find('i').css('color','#ffffff');}
else{$(this).find('i').removeClass('fa-star').addClass('fa-star-o');}});}});_this.$el.on('click','.'+_this.htmlClassPrefix+'answer-star .'+_this.htmlClassPrefix+'answer-label',function(){$(this).parents('.'+_this.htmlClassPrefix+'question').removeClass('ays-has-error');$(this).parents('.'+_this.htmlClassPrefix+'question').find('.'+_this.htmlClassPrefix+'question-validation-error').html('');$(this).parent().find('label').each(function(){$(this).removeClass('active-answer');});$(this).addClass('active-answer');active=true;});_this.$el.on('mouseover','.'+_this.htmlClassPrefix+'answer-star .'+_this.htmlClassPrefix+'answer-label',function(){var surveyColor=_this.dbOptions[_this.dbOptionsPrefix+'color'];var allRateLabels=$(this).parent().find('label');var index=allRateLabels.index(this);allRateLabels.each(function(){if(_this.dbOptions[_this.dbOptionsPrefix+'is_business']){$(this).find('i').css('color','#ffffff');}
else{$(this).find('i').removeClass('fa-star').addClass('fa-star-o');}});for(var i=0;i<=index;i++){if(_this.dbOptions[_this.dbOptionsPrefix+'is_business']){allRateLabels.eq(i).find('i').css('color','#fc0');}
else{allRateLabels.eq(i).find('i').removeClass('fa-star-o').addClass('fa-star');}}});if(_this.dbOptions[_this.dbOptionsPrefix+'enable_leave_page']){window.onbeforeunload=function(e){if(_this.confirmBeforeUnload===true){return true;}else{return null;}}}
_this.$el.on('input','.'+_this.htmlClassPrefix+'question-email-input',function(){$(this).parents('.'+_this.htmlClassPrefix+'question').removeClass('ays-has-error');if($(this).val()!=''){if(!(_this.emailValidatePattern.test($(this).val()))){var errorMessage='<img src="'+aysSurveyMakerAjaxPublic.warningIcon+'" alt="error">';errorMessage+='<span>'+aysSurveyLangObj.emailValidationError+'</span>';$(this).parents('.'+_this.htmlClassPrefix+'question').addClass('ays-has-error');$(this).parents('.'+_this.htmlClassPrefix+'question').find('.'+_this.htmlClassPrefix+'question-validation-error').html(errorMessage);$(this).parents('.'+_this.htmlClassPrefix+'question').find('.'+_this.htmlClassPrefix+'question-validation-error').show();}else{$(this).parents('.'+_this.htmlClassPrefix+'question').removeClass('ays-has-error');$(this).parents('.'+_this.htmlClassPrefix+'question').find('.'+_this.htmlClassPrefix+'question-validation-error').hide();$(this).parents('.'+_this.htmlClassPrefix+'question').find('.'+_this.htmlClassPrefix+'question-validation-error').html('');}}else{$(this).parents('.'+_this.htmlClassPrefix+'question').removeClass('ays-has-error');$(this).parents('.'+_this.htmlClassPrefix+'question').find('.'+_this.htmlClassPrefix+'question-validation-error').hide();$(this).parents('.'+_this.htmlClassPrefix+'question').find('.'+_this.htmlClassPrefix+'question-validation-error').html('');}});_this.$el.on('click','.'+_this.htmlClassPrefix+'restart-button',function(){window.location.reload();});_this.$el.find(".ays-survey-share-btn").on("click",function(e){e.preventDefault();var wWidth=650,wHeight=450;var windowOptions='menubar=no,toolbar=no,resizable=yes,scrollbars=yes,width='+wWidth+',height='+wHeight+',top='+(screen.height/2-wHeight/2)+',left='+(screen.width/2-wWidth/2);window.open(this.href,"_blank",windowOptions);});_this.$el.find('.ays-survey-close-full-screen, .ays-survey-open-full-screen').on('click',function(){_this.toggleFullscreen(_this.el);});_this.aysSurveyFullScreenDeactivateAll();_this.$el.find('textarea.ays-survey-check-word-limit, input.ays-survey-check-word-limit').on('keyup keypress',function(e){var currentQuestion=$(this).parents(".ays-survey-question");var currentquestionId=currentQuestion.find('.'+_this.htmlClassPrefix+'question-id').val();var questionTextLimitOptions=_this.dbOptions[_this.dbOptionsPrefix+'text_limit_options'][currentquestionId];_this.aysSurveyCheckTextLimit(currentQuestion,questionTextLimitOptions,e,$(this));});_this.$el.find('input.ays-survey-check-number-limit').on('keyup',function(e){var currentQuestion=$(this).parents(".ays-survey-question");var currentquestionId=currentQuestion.find('.'+_this.htmlClassPrefix+'question-id').val();var questionTextLimitOptions=_this.dbOptions[_this.dbOptionsPrefix+'number_limit_options'][currentquestionId];_this.aysSurveyCheckNumberLimit(currentQuestion,questionTextLimitOptions,e,$(this));});_this.$el.find('input.ays-survey-is-phone-type').on('keypress',function(e){var theEvent=e||window.event;var key=theEvent.keyCode||theEvent.which;key=String.fromCharCode(key);var checkingVal=_this.phoneValidatePattern.test(key);if(!checkingVal){theEvent.returnValue=false;if(theEvent.preventDefault)e.preventDefault();}});_this.$el.find('.ays-survey-section .ays-survey-answer-label input[type="radio"],.ays-survey-detect-selected-question-dropdown').on('change',function(){_this.aysAutoNext($(this));});_this.aysSurveyonTabPress();}
AysSurveyPlugin.prototype.start=function(e){var _this=this;var $this=_this.$el.find('.ays_next.start_button');_this.quizId=_this.$el.find('input[name="ays_quiz_id"]').val();_this.dbOptions=JSON.parse(atob(window.aysQuizOptions[_this.quizId]));if(typeof _this.dbOptions.answers_rw_texts=='undefined'){_this.dbOptions.answers_rw_texts='on_passing';}
if(typeof _this.dbOptions.make_questions_required=='undefined'){_this.dbOptions.make_questions_required='off';}
var quizOptionsName='quizOptions_'+_this.quizId;_this.QuizQuestionsOptions=[];if(typeof window[quizOptionsName]!=='undefined'){for(var i in window[quizOptionsName]){_this.QuizQuestionsOptions[i]=JSON.parse(window.atob(window[quizOptionsName][i]));}}
_this.aysResetQuiz(_this.$el);_this.$el.css('padding-bottom','0px');var isRequiredQuestion=(_this.dbOptions.make_questions_required&&_this.dbOptions.make_questions_required=="on")?true:false;if(isRequiredQuestion===true){_this.$el.find('div[data-question-id]').each(function(){var thisStep=$(this);if(!thisStep.find('input.ays_next').hasClass('ays_display_none')){thisStep.find('input.ays_next').attr('disabled','disabled');}else if(!thisStep.find('i.ays_next_arrow').hasClass('ays_display_none')){thisStep.find('i.ays_next_arrow').attr('disabled','disabled');}
if(!thisStep.find('input.ays_early_finish').hasClass('ays_display_none')){thisStep.find('input.ays_early_finish').attr('disabled','disabled');}else if(!thisStep.find('i.ays_early_finish').hasClass('ays_display_none')){thisStep.find('i.ays_early_finish').attr('disabled','disabled');}});}
setTimeout(function(){_this.$el.css('border-radius',_this.dbOptions.quiz_border_radius+'px');_this.$el.find('.step').css('border-radius',_this.dbOptions.quiz_border_radius+'px');},400);$(e.target).parents('div.step').removeClass('active-step');$(e.target).parents('div.step').next().addClass('active-step');_this.current_fs=$this.parents('.step');_this.next_fs=$this.parents('.step').next();_this.startLiveProgressBar($this);if(_this.dbOptions.enable_pass_count=='on'){_this.aysAnimateStep(_this.$el.data('questEffect'),_this.$el.find('.ays_quizn_ancnoxneri_qanak'));}
if(_this.dbOptions.enable_rate_avg=='on'){_this.aysAnimateStep(_this.$el.data('questEffect'),_this.$el.find('.ays_quiz_rete_avg'));}
_this.selects();_this.answersField();};AysSurveyPlugin.prototype.startTime=function(e){var _this=this;var $this=$(e.target);var thisStep=$this.parents('.step');_this.$el.find('.ays-live-bar-wrap').css({'display':'block'});_this.$el.find('.ays-live-bar-percent').css({'display':'inline-block'});_this.$el.find('input.ays-start-date').val(_this.GetFullDateTime());if(_this.dbOptions.enable_timer=='on'){_this.$el.find('div.ays-survey-timer').hide();var timer=parseInt(_this.$el.find('div.ays-survey-timer').attr('data-timer'));if(!isNaN(timer)&&_this.dbOptions.timer!==undefined){if(_this.dbOptions.timer===timer&&timer!==0){timer+=2;if(timer!==undefined){_this.timer(timer,{isTimer:true,blockedContent:false,blockedElement:null,});}}else{alert('Wanna cheat??');window.location.reload();}}}}
AysSurveyPlugin.prototype.timer=function(timer,args){if(typeof args=="undefined"){args={};}
var _this=this;var addTime=0;if(timer>=0){addTime=(timer*1000);}
var countDownDate=new Date().getTime()+addTime;var timeForShow;if(addTime>0){var x=setInterval(function(){var now=new Date().getTime();var distance=countDownDate-Math.ceil(now/1000)*1000;var hours=Math.floor((distance%(1000*60*60*24))/(1000*60*60));var minutes=Math.floor((distance%(1000*60*60))/(1000*60));var seconds=Math.floor((distance%(1000*60))/1000);if(hours<=0){hours=null;}else if(hours<10){hours='0'+hours;}
if(minutes<10){minutes='0'+minutes;}
if(seconds<10){seconds='0'+seconds;}
timeForShow=((hours==null)?"":(hours+":"))+minutes+":"+seconds;if(distance<=1000){timeForShow=((hours==null)?"":"00:")+"00:00";}else{timeForShow=timeForShow;}
_this.$el.find('.'+_this.htmlClassPrefix+'countdown-time').html(timeForShow);if(_this.$el.find('.'+_this.htmlClassPrefix+'countdown-time').length===0){clearInterval(x);}
if(distance<=1000){clearInterval(x);if(args.blockedContent){if(args.redirectNewTab){window.open(args.redirectUrl,"_blank");}
else{window.location.assign(args.redirectUrl);}}}},1000);}
else{if(args.blockedContent){if(args.redirectNewTab){window.open(args.redirectUrl,"_blank");}
else{window.location.assign(args.redirectUrl);}}}};AysSurveyPlugin.prototype.ratingAvg=function(){var _this=this;_this.$el.find('.for_quiz_rate_avg.ui.rating').rating('disable');};AysSurveyPlugin.prototype.aysNext=function(){var _this=this;_this.$el.on('click','.'+_this.htmlClassPrefix+'next-button',function(e){var currentPage=_this.$el.find("div.ays-survey-section.active-section").data("pageNumber")+1;_this.confirmBeforeUnload=true;e.preventDefault();if(_this.animating)return false;_this.animating=true;if(_this.checkForm($(e.target))){_this.activeStep($(e.target),'next');_this.aysAnimateStep('fade',_this.current_fs,_this.next_fs);_this.goTo();if(_this.dbOptions.survey_cover_only_first_section&&currentPage==2){_this.$el.find(".ays-survey-cover-photo-title-wrap").css('height','auto');_this.$el.find(".ays-survey-cover-photo-title-wrap").css('background-image','unset');}
var pageCount=_this.$el.find("div.ays-survey-section:not(:last-child)").length;var fillWidth=(currentPage*100)/pageCount;_this.$el.find("div.ays-survey-live-bar-fill").animate({'width':fillWidth+"%"},1000);_this.$el.find("span.ays-survey-live-bar-changeable-text").text(currentPage);}else{}});_this.$el.on('click','.'+_this.htmlClassPrefix+'prev-button',function(e){_this.confirmBeforeUnload=true;e.preventDefault();var currentPage=_this.$el.find("div.ays-survey-section.active-section").data("pageNumber")-1;var pageCount=_this.$el.find("div.ays-survey-section:not(:last-child)").length;var fillWidth=(currentPage*100)/pageCount;_this.$el.find("div.ays-survey-live-bar-fill").animate({'width':fillWidth+"%"},500);_this.$el.find("span.ays-survey-live-bar-changeable-text").text(currentPage);_this.current_fs.find('.'+_this.htmlClassPrefix+'next-button').removeClass('display_none_important');if(_this.animating)return false;_this.animating=true;if(_this.dbOptions.survey_cover_only_first_section&&currentPage==1){_this.$el.find(".ays-survey-cover-photo-title-wrap").css('height',_this.dbOptions.survey_cover_photo_height);_this.$el.find(".ays-survey-cover-photo-title-wrap").css('background-image',"url("+(_this.dbOptions.survey_cover_photo)+")");}
_this.activeStep($(e.target),'prev');_this.aysAnimateStep('fade',_this.current_fs,_this.next_fs);_this.goTo();});};AysSurveyPlugin.prototype.aysFinish=function(){var _this=this;var fButtonSelector='input.'+_this.htmlClassPrefix+'finish-button';_this.$el.on('click',fButtonSelector,function(e){e.preventDefault();_this.confirmBeforeUnload=false;if(_this.checkForm($(e.target))){var form=_this.$el.find('form');var data=form.serializeFormJSON();var surveyCurrentPageLink=form.find('input[name="ays_survey_curent_page_link"]').val();data.action=_this.ajaxAction;data.function='ays_finish_survey';data.end_date=_this.GetFullDateTime();data.unique_id=_this.uniqueId;data.survey_current_page_link=surveyCurrentPageLink;var sections=_this.$el.find('.'+_this.htmlClassPrefix+'sections > .'+_this.htmlClassPrefix+'section:not(:last-child)');setTimeout(function(){sections.remove();},100);_this.$el.find('.'+_this.htmlClassPrefix+'sections > .'+_this.htmlClassPrefix+'section.'+_this.htmlClassPrefix+'results-content').show(150);var aysQuizLoader=form.find('div.ays-loader[data-role="loader"]');aysQuizLoader.addClass(aysQuizLoader.data('class'));aysQuizLoader.removeClass('ays-survey-loader');setTimeout(function(){_this.sendSurveyData(data,$(e.target));},2000);_this.goTo();}});}
AysSurveyPlugin.prototype.validateButtonsVisibility=function(){var _this=this;var nextQuestionType=_this.next_fs.find('input[name^="ays_questions"]').attr('type');var buttonsDiv=_this.next_fs.find('.ays_buttons_div');var enableArrows=_this.$el.find(".ays_qm_enable_arrows").val();if(_this.dbOptions.enable_arrows){enableArrows=_this.dbOptions.enable_arrows=='on'?true:false;}else{enableArrows=parseInt(enableArrows)==1?true:false;}
var nextArrowIsDisabled=buttonsDiv.find('i.ays_next_arrow').hasClass('ays_display_none');var nextButtonIsDisabled=buttonsDiv.find('input.ays_next').hasClass('ays_display_none');if(_this.next_fs.find('textarea[name^="ays_questions"]').attr('type')==='text'&&nextArrowIsDisabled&&nextButtonIsDisabled){buttonsDiv.find('input.ays_next').removeClass('ays_display_none');}
if(_this.next_fs.find('textarea[name^="ays_questions"]').attr('type')==='text'&&enableArrows){buttonsDiv.find('input.ays_next').addClass('ays_display_none');buttonsDiv.find('i.ays_next_arrow').removeClass('ays_display_none');}
if(nextQuestionType==='checkbox'&&nextArrowIsDisabled&&nextButtonIsDisabled){buttonsDiv.find('input.ays_next').removeClass('ays_display_none');}
if(nextQuestionType==='checkbox'&&enableArrows){buttonsDiv.find('input.ays_next').addClass('ays_display_none');buttonsDiv.find('i.ays_next_arrow').removeClass('ays_display_none');}
if(nextQuestionType==='number'&&nextArrowIsDisabled&&nextButtonIsDisabled){buttonsDiv.find('input.ays_next').removeClass('ays_display_none');}
if(nextQuestionType==='number'&&enableArrows){buttonsDiv.find('input.ays_next').addClass('ays_display_none');buttonsDiv.find('i.ays_next_arrow').removeClass('ays_display_none');}
if(nextQuestionType==='text'&&nextArrowIsDisabled&&nextButtonIsDisabled){next_fs.find('.ays_buttons_div').find('input.ays_next').removeClass('ays_display_none');}
if(nextQuestionType==='text'&&enableArrows){next_fs.find('.ays_buttons_div').find('input.ays_next').addClass('ays_display_none');next_fs.find('.ays_buttons_div').find('i.ays_next_arrow').removeClass('ays_display_none');}
if(nextQuestionType==='date'&&nextArrowIsDisabled&&nextButtonIsDisabled){buttonsDiv.find('input.ays_next').removeClass('ays_display_none');}
if(nextQuestionType==='date'&&enableArrows){buttonsDiv.find('input.ays_next').addClass('ays_display_none');buttonsDiv.find('.ays_next_arrow').removeClass('ays_display_none');}
var isRequiredQuestion=(_this.dbOptions.make_questions_required&&_this.dbOptions.make_questions_required=="on")?true:false;if(isRequiredQuestion===true){if(_this.next_fs.find('.information_form').length===0){if(enableArrows){buttonsDiv.find('i.ays_next_arrow').attr('disabled','disabled');}else{buttonsDiv.find('input.ays_next').attr('disabled','disabled');}}}}
AysSurveyPlugin.prototype.goToTop=function(el){el.get(0).scrollIntoView({block:"center",behavior:"smooth"});}
AysSurveyPlugin.prototype.goTo=function(){var surveyAnimationTop;if(this.dbOptions!='undefined'){surveyAnimationTop=(this.dbOptions.survey_animation_top&&this.dbOptions.survey_animation_top!=0)?parseInt(this.dbOptions.survey_animation_top):200;}else{surveyAnimationTop=200;}
if(this.dbOptions.survey_enable_animation_top){$('html, body').animate({scrollTop:this.$el.offset().top-surveyAnimationTop+'px'},'fast');}
return this;}
AysSurveyPlugin.prototype.keydown=function(){var _this=this,$this=_this.$el;$this.find('input').on('focus',function(){$(window).on('keydown',function(event){if(event.keyCode===13){return false;}});});$this.find('input').on('blur',function(){$(window).off('keydown');});}
AysSurveyPlugin.prototype.aysAnimateStep=function(animation,current_fs,next_fs){var _this=this;if(typeof next_fs!=="undefined"){switch(animation){case"lswing":current_fs.parents('.ays-questions-container').css({perspective:'800px',});current_fs.addClass('swing-out-right-bck');current_fs.css({'pointer-events':'none'});setTimeout(function(){current_fs.css({'position':'absolute',});next_fs.css('display','flex');next_fs.addClass('swing-in-left-fwd');},400);setTimeout(function(){current_fs.hide();current_fs.css({'pointer-events':'auto','position':'static'});next_fs.css({'position':'relative','pointer-events':'auto'});current_fs.removeClass('swing-out-right-bck');next_fs.removeClass('swing-in-left-fwd');_this.animating=false;},1000);break;case"rswing":current_fs.parents('.ays-questions-container').css({perspective:'800px',});current_fs.addClass('swing-out-left-bck');current_fs.css({'pointer-events':'none'});setTimeout(function(){current_fs.css({'position':'absolute',});next_fs.css('display','flex');next_fs.addClass('swing-in-right-fwd');},400);setTimeout(function(){current_fs.hide();current_fs.css({'pointer-events':'auto','position':'static'});next_fs.css({'position':'relative','pointer-events':'auto'});current_fs.removeClass('swing-out-left-bck');next_fs.removeClass('swing-in-right-fwd');_this.animating=false;},1000);break;case"shake":current_fs.animate({opacity:0},{step:function(now,mx){_this.scale=1-(1-now)*0.2;_this.left=(now*50)+"%";_this.opacity=1-now;current_fs.css({'transform':'scale('+_this.scale+')','position':'absolute','top':0,'opacity':1,'pointer-events':'none'});next_fs.css({'left':_this.left,'opacity':_this.opacity,'display':'flex','position':'relative','pointer-events':'none'});},duration:800,complete:function(){current_fs.hide();current_fs.css({'pointer-events':'auto','opacity':1,'position':'static'});next_fs.css({'display':'flex','position':'relative','transform':'scale(1)','opacity':1,'pointer-events':'auto'});_this.animating=false;},easing:'easeInOutBack'});break;case"fade":current_fs.animate({opacity:0},{step:function(now,mx){_this.opacity=1-now;current_fs.attr('style','position: absolute !important;width: 100% !important;pointer-events: none !important;');next_fs.attr('style','opacity: '+_this.opacity+' !important;position: relative !important;display: block !important;width: 100% !important;pointer-events: none !important;');},duration:500,complete:function(){current_fs.hide();current_fs.attr('style','position: static !important;pointer-events: auto !important;');next_fs.attr('style','display: block !important;position: relative !important;opacity: 1 !important;pointer-events: auto !important;');_this.animating=false;}});break;default:current_fs.animate({},{step:function(now,mx){current_fs.css({'pointer-events':'none'});next_fs.css({'position':'relative','pointer-events':'none'});},duration:0,complete:function(){current_fs.hide();current_fs.css({'pointer-events':'auto'});next_fs.css({'display':'block','position':'relative','transform':'scale(1)','pointer-events':'auto'});_this.animating=false;}});break;}}else{switch(animation){case"lswing":current_fs.parents('.ays-questions-container').css({perspective:'800px',});current_fs.addClass('swing-out-right-bck');current_fs.css({'pointer-events':'none'});setTimeout(function(){current_fs.css({'position':'absolute',});},400);setTimeout(function(){current_fs.hide();current_fs.css({'pointer-events':'auto','position':'static'});current_fs.removeClass('swing-out-right-bck');_this.animating=false;},1000);break;case"rswing":current_fs.parents('.ays-questions-container').css({perspective:'800px',});current_fs.addClass('swing-out-left-bck');current_fs.css({'pointer-events':'none'});setTimeout(function(){current_fs.css({'position':'absolute',});},400);setTimeout(function(){current_fs.hide();current_fs.css({'pointer-events':'auto','position':'static'});current_fs.removeClass('swing-out-left-bck');_this.animating=false;},1000);case"shake":current_fs.animate({opacity:0},{step:function(now,mx){_this.scale=1-(1-now)*0.2;_this.left=(now*50)+"%";_this.opacity=1-now;current_fs.css({'transform':'scale('+_this.scale+')',});},duration:800,complete:function(){current_fs.hide();_this.animating=false;},easing:'easeInOutBack'});break;case"fade":current_fs.animate({opacity:0},{step:function(now,mx){_this.opacity=1-now;},duration:500,complete:function(){current_fs.hide();_this.animating=false;},easing:'easeInOutBack'});break;default:current_fs.animate({},{step:function(now,mx){},duration:0,complete:function(){current_fs.hide();_this.animating=false;}});break;}}}
AysSurveyPlugin.prototype.activeStep=function(button,action){var _this=this;_this.current_fs=button.parents('.'+_this.htmlClassPrefix+'section');if(action=='next'){_this.next_fs=button.parents('.'+_this.htmlClassPrefix+'section').next();}
if(action=='prev'){_this.next_fs=button.parents('.'+_this.htmlClassPrefix+'section').prev();}
_this.current_fs.removeClass('active-section');_this.next_fs.addClass('active-section');}
AysSurveyPlugin.prototype.startLiveProgressBar=function(button){var _this=this;if(button.parents('.step').next().find('.information_form').length===0){var questions_count=_this.$el.find('form').find('div[data-question-id]').length;var curent_number=_this.$el.find('form').find('div[data-question-id]').index(button.parents('div[data-question-id]'))+1;var final_width=((curent_number+1)/questions_count*100)+"%";if(button.parents('.ays-quiz-container').find('.ays-live-bar-percent').hasClass('ays-live-bar-count')){button.parents('.ays-quiz-container').find('.ays-live-bar-percent').text(parseInt(curent_number+1));}else{button.parents('.ays-quiz-container').find('.ays-live-bar-percent').text(parseInt(final_width));}
button.parents('.ays-quiz-container').find('.ays-live-bar-fill').animate({'width':final_width},500);}}
AysSurveyPlugin.prototype.actionLiveProgressBar=function(button,action){var _this=this;var questions_count=_this.$el.find('form').find('div[data-question-id]').length;var curent_number;if(action=='next'){curent_number=_this.$el.find('form').find('div[data-question-id]').index(button.parents('div[data-question-id]'))+1;}
if(action=='prev'){curent_number=_this.$el.find('form').find('div[data-question-id]').index(button.parents('div[data-question-id]'))-1;}
if(curent_number!=questions_count){if((button.hasClass('ays_finish'))==false){if(!($(this).hasClass('start_button'))){var current_width=button.parents('.ays-quiz-container').find('.ays-live-bar-fill').width();var final_width=((curent_number+1)/questions_count*100)+"%";if(button.parents('.ays-quiz-container').find('.ays-live-bar-percent').hasClass('ays-live-bar-count')){button.parents('.ays-quiz-container').find('.ays-live-bar-percent').text(parseInt(curent_number+1));}else{button.parents('.ays-quiz-container').find('.ays-live-bar-percent').text(parseInt(final_width));}
button.parents('.ays-quiz-container').find('.ays-live-bar-fill').animate({'width':final_width},500);}}}else{button.parents('.ays-quiz-container').find('.ays-live-bar-wrap').removeClass('rubberBand').addClass('bounceOut');setTimeout(function(){button.parents('.ays-quiz-container').find('.ays-live-bar-wrap').css('display','none');},300)}
if(questions_count===curent_number){if(_this.current_fs.hasClass('.information_form').length!==0){_this.current_fs.parents('.ays-quiz-container').find('.ays-quiz-timer').parent().slideUp(500);setTimeout(function(){_this.current_fs.parents('.ays-quiz-container').find('.ays-quiz-timer').parent().remove();},500);}}}
AysSurveyPlugin.prototype.checkForm=function(button){var _this=this;_this.animating=false;var section=button.parents('.'+_this.htmlClassPrefix+'section');var requiredQuestions=section.find('[data-required="true"]');if(requiredQuestions.length!==0){var empty_inputs=0;var errorQuestions=section.find('.ays-has-error');section.find('.ays-has-error').removeClass('ays-has-error');for(var i=0;i<requiredQuestions.length;i++){var item=requiredQuestions.eq(i);var checkMinVotes=requiredQuestions.eq(i).data('isMin');if(item.data('type')=='text'||item.data('type')=='email'||item.data('type')=='name'||item.data('type')=='short_text'||item.data('type')=='number'||item.data('type')=='phone'){var errorMessage='<img src="'+aysSurveyMakerAjaxPublic.warningIcon+'" alt="error">';if(item.find('.'+_this.htmlClassPrefix+'input').val()==''){errorMessage+='<span>'+_this.dbOptions.survey_required_questions_message+'</span>';item.addClass('ays-has-error');item.find('.'+_this.htmlClassPrefix+'question-validation-error').html(errorMessage);item.find('.'+_this.htmlClassPrefix+'question-validation-error').show();_this.goToTop(item);item.find('.'+_this.htmlClassPrefix+'input').focus();empty_inputs++;break;}else{if(item.data('type')=='email'){if(!(_this.emailValidatePattern.test(item.find('.'+_this.htmlClassPrefix+'input').val()))){errorMessage+='<span>'+aysSurveyLangObj.emailValidationError+'</span>';item.addClass('ays-has-error');item.find('.'+_this.htmlClassPrefix+'question-validation-error').html(errorMessage);item.find('.'+_this.htmlClassPrefix+'question-validation-error').show();_this.goToTop(item);item.find('.'+_this.htmlClassPrefix+'input').focus();empty_inputs++;}}else{if(item.data('type')!='number'){continue;}}}}
var errorFlag=false;var checker=false;if(item.data('type')=='radio'||item.data('type')=='checkbox'||item.data('type')=='star'){var questionType=item.data('type')==='star'?'radio':item.data('type')||'';if(typeof checkMinVotes!='undefined'&&checkMinVotes){checker=_this.checkMinVotes(item);if(!checker){return false;}}
if(item.find('input[type="'+questionType+'"]:checked').length==0){errorFlag=true;}
if(item.find('.'+_this.htmlClassPrefix+'answer-other-input').length!=0&&item.find('.'+_this.htmlClassPrefix+'answer-label-other > input[value="0"]:checked').length>0){if(item.find('.'+_this.htmlClassPrefix+'answer-other-input').val()==''){errorFlag=true;item.find('.'+_this.htmlClassPrefix+'answer-other-input').focus();}}
if(errorFlag){var errorMessage='<img src="'+aysSurveyMakerAjaxPublic.warningIcon+'" alt="error">';errorMessage+='<span>'+_this.dbOptions.survey_required_questions_message+'</span>';item.addClass('ays-has-error');item.find('.'+_this.htmlClassPrefix+'question-validation-error').html(errorMessage);item.find('.'+_this.htmlClassPrefix+'question-validation-error').show();_this.goToTop(item);empty_inputs++;break;}else{continue;}}
if(item.data('type')=='select'){if(item.find('.'+_this.htmlClassPrefix+'question-select').aysDropdown('get value')==''){var errorMessage='<img src="'+aysSurveyMakerAjaxPublic.warningIcon+'" alt="error">';errorMessage+='<span>'+_this.dbOptions.survey_required_questions_message+'</span>';item.addClass('ays-has-error');item.find('.'+_this.htmlClassPrefix+'question-validation-error').html(errorMessage);item.find('.'+_this.htmlClassPrefix+'question-validation-error').show();_this.goToTop(item);empty_inputs++;break;}else{continue;}}
if(item.data('type')=='number'){var numberInput=item.find('input.ays-survey-check-number-limit');var currentQuestion=item;var currentquestionId=currentQuestion.find('.'+_this.htmlClassPrefix+'question-id').val();var questionTextLimitOptions=_this.dbOptions[_this.dbOptionsPrefix+'number_limit_options'][currentquestionId];_this.aysSurveyCheckNumberLimit(currentQuestion,questionTextLimitOptions,numberInput,$(numberInput));if(item.hasClass('ays-has-error')){_this.goToTop(item);item.find('.'+_this.htmlClassPrefix+'input').focus();empty_inputs++;break;}else{continue;}}}
for(var i=0;i<errorQuestions.length;i++){var item=errorQuestions.eq(i);if(item.data('type')=='email'){if(!(_this.emailValidatePattern.test(item.find('.'+_this.htmlClassPrefix+'input').val()))){var errorMessage='<img src="'+aysSurveyMakerAjaxPublic.warningIcon+'" alt="error">';errorMessage+='<span>'+aysSurveyLangObj.emailValidationError+'</span>';item.addClass('ays-has-error');item.find('.'+_this.htmlClassPrefix+'question-validation-error').html(errorMessage);item.find('.'+_this.htmlClassPrefix+'question-validation-error').show();_this.goToTop(item);item.find('.'+_this.htmlClassPrefix+'input').focus();empty_inputs++;break;}else{continue;}}}
if(empty_inputs!==0){return false;}else{return true;}}
else{var empty_inputs=0;var errorQuestions=section.find('.ays-has-error');for(var i=0;i<errorQuestions.length;i++){var item=errorQuestions.eq(i);if(item.data('type')=='email'){if(!(_this.emailValidatePattern.test(item.find('.'+_this.htmlClassPrefix+'input').val()))){var errorMessage='<img src="'+aysSurveyMakerAjaxPublic.warningIcon+'" alt="error">';errorMessage+='<span>'+aysSurveyLangObj.emailValidationError+'</span>';item.addClass('ays-has-error');item.find('.'+_this.htmlClassPrefix+'question-validation-error').html(errorMessage);item.find('.'+_this.htmlClassPrefix+'question-validation-error').show();_this.goToTop(item);item.find('.'+_this.htmlClassPrefix+'input').focus();empty_inputs++;break;}else{continue;}}
if(item.data('type')=='number'){if(item.hasClass('ays-has-error')){_this.goToTop(item);item.find('.'+_this.htmlClassPrefix+'input').focus();empty_inputs++;break;}else{continue;}}}
var questions=section.find('.'+_this.htmlClassPrefix+'question[data-is-min="true"]');if(questions.length>0){for(var i=0;i<questions.length;i++){var checker=_this.checkMinVotes(questions.eq(i));if(!checker){return false;}}}
if(empty_inputs!==0){return false;}else{return true;}}}
AysSurveyPlugin.prototype.blockedContent=function(blocked){var _this=this;if(blocked){var blockedContent=_this.$el.hasClass(_this.htmlClassPrefix+'blocked-content');if(blockedContent){var limitAttemptCount=_this.dbOptions[_this.dbOptionsPrefix+'limit_users'];var redirectUrl=_this.dbOptions[_this.dbOptionsPrefix+'redirect_url'];if(limitAttemptCount&&redirectUrl!=''){var redirectTimerHTML='<div class="'+_this.htmlClassPrefix+'redirect-timer '+_this.htmlClassPrefix+'countdown-timer">'+
aysSurveyLangObj.redirectAfter+' <span class="'+_this.htmlClassPrefix+'countdown-time">'+_this.dbOptions[_this.dbOptionsPrefix+'redirect_delay_seconds']+'</span>'+'</div>';_this.$el.find('.'+_this.htmlClassPrefix+'section-header').prepend($(redirectTimerHTML));var timer=_this.dbOptions[_this.dbOptionsPrefix+'redirect_delay']+2;_this.timer(timer,{blockedContent:true,redirectUrl:_this.dbOptions[_this.dbOptionsPrefix+'redirect_url']});}}}
if(_this.$el.find('.ays_survey_login_form').length>0){var surveyLoginForm=_this.$el.find('.ays_survey_login_form');var usernameInput=surveyLoginForm.find('input[type="text"]');var passwordInput=surveyLoginForm.find('input[type="password"]');var checkboxInput=surveyLoginForm.find('input[type="checkbox"]');var submitInput=surveyLoginForm.find('input[type="submit"]');_this.makeSurveyStyleInput(usernameInput);_this.makeSurveyStyleInput(passwordInput);_this.makeSurveyStyleSubmit(submitInput);if(checkboxInput.length>0){_this.makeSurveyStyleCheckbox(checkboxInput);}}
if(_this.dbOptions[_this.dbOptionsPrefix+'enable_survey_start_loader']){_this.$el.find('.ays-survey-wait-loading-loader').css("display","none");}}
AysSurveyPlugin.prototype.selects=function(){var _this=this;_this.$el.find('.ays-field').on('click',function(){if($(this).find(".select2").hasClass('select2-container--open')){$(this).find('b[role="presentation"]').removeClass('ays_fa ays_fa_chevron_down');$(this).find('b[role="presentation"]').addClass('ays_fa ays_fa_chevron_up');}else{$(this).find('b[role="presentation"]').removeClass('ays_fa ays_fa_chevron_up');$(this).find('b[role="presentation"]').addClass('ays_fa ays_fa_chevron_down');}});_this.$el.find('select.ays-select').on("select2:selecting",function(e){$(this).parents('.ays-quiz-container').find('b[role="presentation"]').addClass('ays_fa ays_fa_chevron_down');});_this.$el.find('select.ays-select').on("select2:closing",function(e){$(this).parents('.ays-quiz-container').find('b[role="presentation"]').addClass('ays_fa ays_fa_chevron_down');});_this.$el.find('select.ays-select').on("select2:select",function(e){$(this).parent().find('.ays-select-field-value').attr("value",$(this).val());if($(this).parents('div[data-question-id]').find('input.ays_next').hasClass('ays_display_none')&&$(this).parents('div[data-question-id]').find('i.ays_next_arrow').hasClass('ays_display_none')){$(this).parents('div[data-question-id]').find('.ays_next').trigger('click');}
if($(this).parents(".ays-questions-container").find('form[id^="ays_finish_quiz"]').hasClass('enable_correction')){if($(this).find('option:selected').data("chisht")==1){$(this).parents('.ays-field').addClass('correct correct_div');$(this).parents('.ays-field').find('.select2-selection.select2-selection--single').css("border-bottom-color","green");}else{$(this).parents('.ays-field').addClass('wrong wrong_div');$(this).parents('.ays-field').find('.select2-selection.select2-selection--single').css("border-bottom-color","red");}
if($(this).find('option:selected').data("chisht")==1){$(e.target).parents().eq(3).find('.right_answer_text').fadeIn();}
else{$(e.target).parents().eq(3).find('.wrong_answer_text').fadeIn();}
$(this).attr("disabled",true);$(e.target).next().css("background-color","#777");$(e.target).next().find('.selection').css("background-color","#777");$(e.target).next().find('.select2-selection').css("background-color","#777");}
var this_select_value=$(this).val();$(this).find("option").removeAttr("selected");$(this).find("option[value='"+this_select_value+"']").attr("selected",true);});}
AysSurveyPlugin.prototype.answersField=function(){var _this=this;_this.$el.on('change','input[name^="ays_questions"]',function(e){var quizContainer=_this.$el;if(typeof myOptions!='undefined'){var isRequiredQuestion=(_this.dbOptions.make_questions_required&&_this.dbOptions.make_questions_required=="on")?true:false;if(isRequiredQuestion===true){if($(e.target).attr('type')==='radio'||$(e.target).attr('type')==='checkbox'){if($(e.target).parents('div[data-question-id]').find('input[name^="ays_questions"]:checked').length!=0){if(!$(e.target).parents('div[data-question-id]').find('input.ays_next').hasClass('ays_display_none')){$(e.target).parents('div[data-question-id]').find('input.ays_next').removeAttr('disabled');$(e.target).parents('div[data-question-id]').find('input.ays_early_finish').removeAttr('disabled');}else if(!$(e.target).parents('div[data-question-id]').find('i.ays_next_arrow').hasClass('ays_display_none')){$(e.target).parents('div[data-question-id]').find('i.ays_next_arrow').removeAttr('disabled');$(e.target).parents('div[data-question-id]').find('i.ays_early_finish').removeAttr('disabled');}}else{if(!$(e.target).parents('div[data-question-id]').find('input.ays_next').hasClass('ays_display_none')){$(e.target).parents('div[data-question-id]').find('input.ays_next').attr('disabled',true);$(e.target).parents('div[data-question-id]').find('input.ays_early_finish').attr('disabled',true);}else if(!$(e.target).parents('div[data-question-id]').find('i.ays_next_arrow').hasClass('ays_display_none')){$(e.target).parents('div[data-question-id]').find('i.ays_next_arrow').attr('disabled',true);$(e.target).parents('div[data-question-id]').find('i.ays_early_finish').attr('disabled',true);}}}}}
if($(e.target).parents('.step').hasClass('not_influence_to_score')){if($(e.target).attr('type')==='radio'){$(e.target).parents('.ays-quiz-answers').find('.checked_answer_div').removeClass('checked_answer_div');$(e.target).parents('.ays-field').addClass('checked_answer_div');}
if($(e.target).attr('type')==='checkbox'){if(!$(e.target).parents('.ays-field').hasClass('checked_answer_div')){$(e.target).parents('.ays-field').addClass('checked_answer_div');}else{$(e.target).parents('.ays-field').removeClass('checked_answer_div');}}
var checked_inputs=$(e.target).parents().eq(1).find('input:checked');if(checked_inputs.parents('div[data-question-id]').find('input.ays_next').hasClass('ays_display_none')&&checked_inputs.parents('div[data-question-id]').find('i.ays_next_arrow').hasClass('ays_display_none')){if(checked_inputs.attr('type')==='radio'){checked_inputs.parents('div[data-question-id]').find('.ays_next').trigger('click');}}
if($(e.target).parents().eq(4).hasClass('enable_correction')){if(checked_inputs.attr('type')==="radio"){$(e.target).parents('div[data-question-id]').find('input[name^="ays_questions"]').attr('disabled',true);$(e.target).parents('div[data-question-id]').find('input[name^="ays_questions"]').off('change');}else if(checked_inputs.attr('type')==="checkbox"){$(e.target).attr('disabled',true);$(e.target).off('change');}}
return false;}
if(quizContainer.find('form').hasClass('enable_correction')){var right_answer_sound=quizContainer.find('.ays_quiz_right_ans_sound').get(0);var wrong_answer_sound=quizContainer.find('.ays_quiz_wrong_ans_sound').get(0);var finishAfterWrongAnswer=(_this.dbOptions.finish_after_wrong_answer&&_this.dbOptions.finish_after_wrong_answer=="on")?true:false;if($(e.target).parents().eq(1).find('input[name="ays_answer_correct[]"]').length!==0){var checked_inputs=$(e.target).parents().eq(1).find('input:checked');if(checked_inputs.attr('type')==="radio"){checked_inputs.nextAll().addClass('answered');checked_inputs.parent().addClass('checked_answer_div');if(checked_inputs.prev().val()==1){checked_inputs.nextAll().addClass('correct')
checked_inputs.parent().addClass('correct_div');}else{checked_inputs.nextAll().addClass('wrong');checked_inputs.parent().addClass('wrong_div');}
if(checked_inputs.prev().val()==1){if(_this.dbOptions.answers_rw_texts&&(_this.dbOptions.answers_rw_texts=='on_passing'||_this.dbOptions.answers_rw_texts=='on_both')){var explanationTime=_this.dbOptions.explanation_time&&_this.dbOptions.explanation_time!=""?parseInt(_this.dbOptions.explanation_time):4;if(!$(e.target).parents('.step').hasClass('not_influence_to_score')){$(e.target).parents().eq(3).find('.right_answer_text').slideDown(250);}
_this.explanationTimeout=setTimeout(function(){if(checked_inputs.parents('div[data-question-id]').find('input.ays_next').hasClass('ays_display_none')&&checked_inputs.parents('div[data-question-id]').find('i.ays_next_arrow').hasClass('ays_display_none')){checked_inputs.parents('div[data-question-id]').find('input.ays_next').trigger('click');}},explanationTime*1000);}else{if(checked_inputs.parents('div[data-question-id]').find('input.ays_next').hasClass('ays_display_none')&&checked_inputs.parents('div[data-question-id]').find('i.ays_next_arrow').hasClass('ays_display_none')){checked_inputs.parents('div[data-question-id]').find('input.ays_next').trigger('click');}}
if((right_answer_sound)){resetPlaying([right_answer_sound,wrong_answer_sound]);setTimeout(function(){right_answer_sound.play();},10);}}else{$(e.target).parents('.ays-quiz-answers').find('input[name="ays_answer_correct[]"][value="1"]').parent().addClass('correct_div').addClass('checked_answer_div');$(e.target).parents('.ays-quiz-answers').find('input[name="ays_answer_correct[]"][value="1"]').nextAll().addClass('correct answered');if(_this.dbOptions.answers_rw_texts&&(_this.dbOptions.answers_rw_texts=='on_passing'||_this.dbOptions.answers_rw_texts=='on_both')){var explanationTime=_this.dbOptions.explanation_time&&_this.dbOptions.explanation_time!=""?parseInt(_this.dbOptions.explanation_time):4;if(!$(e.target).parents('.step').hasClass('not_influence_to_score')){$(e.target).parents().eq(3).find('.wrong_answer_text').slideDown(250);}
_this.explanationTimeout=setTimeout(function(){if(checked_inputs.parents('div[data-question-id]').find('input.ays_next').hasClass('ays_display_none')&&checked_inputs.parents('div[data-question-id]').find('i.ays_next_arrow').hasClass('ays_display_none')){if(finishAfterWrongAnswer){goToLastPage(e);}else{checked_inputs.parents('div[data-question-id]').find('input.ays_next').trigger('click');}}else{if(finishAfterWrongAnswer){goToLastPage(e);}}},explanationTime*1000);}else{if(checked_inputs.parents('div[data-question-id]').find('input.ays_next').hasClass('ays_display_none')&&checked_inputs.parents('div[data-question-id]').find('i.ays_next_arrow').hasClass('ays_display_none')){if(finishAfterWrongAnswer){goToLastPage(e);}else{checked_inputs.parents('div[data-question-id]').find('input.ays_next').trigger('click');}}else{if(finishAfterWrongAnswer){goToLastPage(e);}}}
if((wrong_answer_sound)){resetPlaying([right_answer_sound,wrong_answer_sound]);setTimeout(function(){wrong_answer_sound.play();},10);}}
$(e.target).parents('div[data-question-id]').find('input[name^="ays_questions"]').attr('disabled',true);$(e.target).parents('div[data-question-id]').find('input[name^="ays_questions"]').off('change');$(e.target).parents('div[data-question-id]').find('.ays-field').css({'pointer-events':'none'});}else if(checked_inputs.attr('type')==="checkbox"){checked_inputs=$(e.target);if(checked_inputs.length===1){checked_inputs.parent().addClass('checked_answer_div');if(checked_inputs.prev().val()==1){if((right_answer_sound)){resetPlaying([right_answer_sound,wrong_answer_sound]);setTimeout(function(){right_answer_sound.play();},10);}
checked_inputs.parent().addClass('correct_div');checked_inputs.nextAll().addClass('correct answered');}else{if((wrong_answer_sound)){resetPlaying([right_answer_sound,wrong_answer_sound]);setTimeout(function(){wrong_answer_sound.play();},10);}
if(finishAfterWrongAnswer){goToLastPage(e);}
checked_inputs.parent().addClass('wrong_div');checked_inputs.nextAll().addClass('wrong answered');}}else{for(var i=0;i<checked_inputs.length;i++){if(checked_inputs.eq(i).prev().val()==1){if((right_answer_sound)){resetPlaying([right_answer_sound,wrong_answer_sound]);setTimeout(function(){right_answer_sound.play();},10);}
checked_inputs.eq(i).nextAll().addClass('correct answered');checked_inputs.eq(i).parent().addClass('correct_div');checked_inputs.eq(i).parent().addClass('checked_answer_div');}else{if((wrong_answer_sound)){resetPlaying([right_answer_sound,wrong_answer_sound]);setTimeout(function(){wrong_answer_sound.play();},10);}
if(finishAfterWrongAnswer){goToLastPage(e);}
checked_inputs.eq(i).parent().addClass('checked_answer_div');checked_inputs.eq(i).nextAll().addClass('wrong answered');checked_inputs.eq(i).parent().addClass('wrong_div');}}
if(checked_inputs.eq(i).prev().val()==1){checked_inputs.eq(i).next().addClass('correct answered');if((right_answer_sound)){resetPlaying([right_answer_sound,wrong_answer_sound]);setTimeout(function(){right_answer_sound.play();},10);}}else{checked_inputs.eq(i).next().addClass('wrong answered');if((wrong_answer_sound)){resetPlaying([right_answer_sound,wrong_answer_sound]);setTimeout(function(){wrong_answer_sound.play();},10);}}}
$(e.target).attr('disabled',true);$(e.target).off('change');}}}else{if($(e.target).attr('type')==='radio'){$(e.target).parents('.ays-quiz-answers').find('.checked_answer_div').removeClass('checked_answer_div');$(e.target).parents('.ays-field').addClass('checked_answer_div');}
if($(e.target).attr('type')==='checkbox'){if(!$(e.target).parents('.ays-field').hasClass('checked_answer_div')){$(e.target).parents('.ays-field').addClass('checked_answer_div');}else{$(e.target).parents('.ays-field').removeClass('checked_answer_div');}}
var checked_inputs=$(e.target).parents().eq(1).find('input:checked');if(checked_inputs.parents('div[data-question-id]').find('input.ays_next').hasClass('ays_display_none')&&checked_inputs.parents('div[data-question-id]').find('i.ays_next_arrow').hasClass('ays_display_none')){if(checked_inputs.attr('type')==='radio'){checked_inputs.parents('div[data-question-id]').find('input.ays_next').trigger('click');}}}});_this.$el.find('button.ays_check_answer').on('click',function(e){var thisAnswerOptions;var quizContainer=_this.$el;var right_answer_sound=quizContainer.find('.ays_quiz_right_ans_sound').get(0);var wrong_answer_sound=quizContainer.find('.ays_quiz_wrong_ans_sound').get(0);var questionId=$(this).parents('.step').data('questionId');var finishAfterWrongAnswer=(_this.dbOptions.finish_after_wrong_answer&&_this.dbOptions.finish_after_wrong_answer=="on")?true:false;thisAnswerOptions=_this.QuizQuestionsOptions[questionId];if($(this).parent().find('.ays-text-input').val()!==""){if($(e.target).parents('form[id^="ays_finish_quiz"]').hasClass('enable_correction')){if($(e.target).parents('.step').hasClass('not_influence_to_score')){return false;}
$(this).css({animation:"bounceOut .5s",});setTimeout(function(){$(e.target).parent().find('.ays-text-input').css('width','100%');$(e.target).css("display","none");},480);$(e.target).parent().find('.ays-text-input').css('background-color','#eee');$(this).parent().find('.ays-text-input').attr('disabled','disabled');$(this).attr('disabled','disabled');$(this).off('change');$(this).off('click');var input=$(this).parent().find('.ays-text-input');var type=input.attr('type');var userAnsweredText=input.val().trim();var trueAnswered=false;var thisQuestionAnswer=thisAnswerOptions.question_answer.toLowerCase();if(type=='date'){var correctDate=new Date(thisAnswerOptions.question_answer),correctDateYear=correctDate.getFullYear(),correctDateMonth=correctDate.getMonth(),correctDateDay=correctDate.getDate();var userDate=new Date(userAnsweredText),userDateYear=userDate.getFullYear(),userDateMonth=userDate.getMonth(),userDateDay=userDate.getDate();if(correctDateYear==userDateYear&&correctDateMonth==userDateMonth&&correctDateDay==userDateDay){trueAnswered=true;}}else if(type!='number'){thisQuestionAnswer=thisQuestionAnswer.split('%%%');for(var i=0;i<thisQuestionAnswer.length;i++){if(userAnsweredText.toLowerCase()==thisQuestionAnswer[i].trim()){trueAnswered=true;break;}}}else{if(userAnsweredText.toLowerCase()==thisQuestionAnswer.trim()){trueAnswered=true;}}
if(trueAnswered){if((right_answer_sound)){resetPlaying([right_answer_sound,wrong_answer_sound]);setTimeout(function(){right_answer_sound.play();},10);}
$(this).parent().find('.ays-text-input').css('background-color','rgba(39,174,96,0.5)');$(this).parent().find('input[name="ays_answer_correct[]"]').val(1);}else{if((wrong_answer_sound)){resetPlaying([right_answer_sound,wrong_answer_sound]);setTimeout(function(){wrong_answer_sound.play();},10);}
$(this).parent().find('.ays-text-input').css('background-color','rgba(243,134,129,0.8)');$(this).parent().find('input[name="ays_answer_correct[]"]').val(0);var rightAnswerText='<div class="ays-text-right-answer">';if(type=='date'){var correctDate=new Date(thisAnswerOptions.question_answer),correctDateYear=correctDate.getFullYear(),correctDateMonth=(correctDate.getMonth()+1)<10?"0"+(correctDate.getMonth()+1):(correctDate.getMonth()+1),correctDateDay=(correctDate.getDate()<10)?"0"+correctDate.getDate():correctDate.getDate();rightAnswerText+=[correctDateMonth,correctDateDay,correctDateYear].join('/');}else if(type!='number'){rightAnswerText+=thisQuestionAnswer[0];}else{rightAnswerText+=thisQuestionAnswer;}
rightAnswerText+='</div>';$(this).parents('.ays-quiz-answers').append(rightAnswerText);$(this).parents('.ays-quiz-answers').find('.ays-text-right-answer').slideDown(500);if(finishAfterWrongAnswer){goToLastPage(e);}}}}});}
AysSurveyPlugin.prototype.makeSurveyStyleInput=function(input){var _this=this;var html='<div class="'+_this.htmlClassPrefix+'question-input-box">'+'<div class="'+_this.htmlClassPrefix+'input-underline"></div>'+'<div class="'+_this.htmlClassPrefix+'input-underline-animation"></div>'+'</div>';html=$(html);html.insertAfter(input);html.prepend(input);input.addClass(_this.htmlClassPrefix+'input');input.addClass(_this.htmlClassPrefix+'question-input');}
AysSurveyPlugin.prototype.makeSurveyStyleCheckbox=function(input){var _this=this;var html='<div class="'+_this.htmlClassPrefix+'answer-label-content">'+'<div class="'+_this.htmlClassPrefix+'answer-icon-content">'+'<div class="'+_this.htmlClassPrefix+'answer-icon-ink"></div>'+'<div class="'+_this.htmlClassPrefix+'answer-icon-content-1">'+'<div class="'+_this.htmlClassPrefix+'answer-icon-content-2">'+'<div class="'+_this.htmlClassPrefix+'answer-icon-content-3"></div>'+'</div>'+'</div>'+'</div>'+'<span class=""></span>'+'</div>';html=$(html);var inputCheckboxLabel=input.parents('label');var inputCheckbox=input;inputCheckboxLabel.addClass('ays-survey-answer-label');html.find('span').text(inputCheckboxLabel.text());inputCheckboxLabel.text('');input.remove();inputCheckboxLabel.prepend(inputCheckbox);html.insertAfter(inputCheckbox);}
AysSurveyPlugin.prototype.makeSurveyStyleRadio=function(input){var _this=this;var html='<div class="'+_this.htmlClassPrefix+'answer-label-content">'+'<div class="'+_this.htmlClassPrefix+'answer-icon-content">'+'<div class="'+_this.htmlClassPrefix+'answer-icon-ink"></div>'+'<div class="'+_this.htmlClassPrefix+'answer-icon-content-1">'+'<div class="'+_this.htmlClassPrefix+'answer-icon-content-2">'+'<div class="'+_this.htmlClassPrefix+'answer-icon-content-3"></div>'+'</div>'+'</div>'+'</div>'+'<span class=""></span>'+'</div>';html=$(html);var inputCheckboxLabel=input.parents('label');var inputCheckbox=input;inputCheckboxLabel.addClass('ays-survey-answer-label');html.find('span').text(inputCheckboxLabel.text());inputCheckboxLabel.text('');input.remove();inputCheckboxLabel.prepend(inputCheckbox);html.insertAfter(inputCheckbox);}
AysSurveyPlugin.prototype.makeSurveyStyleSubmit=function(input){var _this=this;var html='<div class="'+_this.htmlClassPrefix+'section-buttons">'+'<div class="'+_this.htmlClassPrefix+'section-button-container">'+'<div class="'+_this.htmlClassPrefix+'section-button-content">'+'</div>'+'</div>'+'</div>';html=$(html);html.insertAfter(input);html.find('.'+_this.htmlClassPrefix+'section-button-content').append(input);input.addClass('ays-survey-section-button');input.removeClass('button button-primary');}
AysSurveyPlugin.prototype.GetFullDateTime=function(){var now=new Date();var strDateTime=[[now.getFullYear(),AddZero(now.getMonth()+1),AddZero(now.getDate())].join("-"),[AddZero(now.getHours()),AddZero(now.getMinutes()),AddZero(now.getSeconds())].join(":")].join(" ");return strDateTime;}
AysSurveyPlugin.prototype.AddZero=function(num){return(num>=0&&num<10)?"0"+num:num+"";}
AysSurveyPlugin.prototype.validatePhoneNumber=function(input){var phoneno=/^[+ 0-9-]+$/;if(input.value.match(phoneno)){return true;}else{return false;}}
AysSurveyPlugin.prototype.sendSurveyData=function(data,element){var _this=this;if(typeof _this.sendSurveyData.counter=='undefined'){_this.sendSurveyData.counter=0;}
if(window.navigator.onLine){_this.sendSurveyData.counter++;$.ajax({url:window.aysSurveyMakerAjaxPublic.ajaxUrl,method:'post',dataType:'json',data:data,success:function(response){if(response.status===true){_this.doSurveyResult(response);}else{if(_this.sendSurveyData.counter>=5){swal.fire({type:'error',html:aysSurveyLangObj.sorry+".<br>"+aysSurveyLangObj.unableStoreData+"."});}else{if(window.navigator.onLine){setTimeout(function(){_this.sendSurveyData(data,element);},3000);}else{_this.sendSurveyData(data,element);}}}},error:function(jqXHR,textStatus,errorThrown){if(_this.sendSurveyData.counter>=5){swal.fire({type:'error',html:aysSurveyLangObj.sorry+".<br>"+aysSurveyLangObj.unableStoreData+"."});}else{setTimeout(function(){_this.sendSurveyData(data,element);},3000);}}});}else{swal.fire({type:'warning',html:aysSurveyLangObj.connectionLost+".<br>"+aysSurveyLangObj.checkConnection+"."});_this.sendSurveyData.counter=0;}}
AysSurveyPlugin.prototype.goQuizFinishPage=function(element){var _this=this;var currentFS=_this.$el.find('.step.active-step');var next_sibilings_count=_this.$el.find('.ays_question_count_per_page').val();if(parseInt(next_sibilings_count)>0&&(element.parents('.step').attr('data-question-id')||element.parents('.step').next().attr('data-question-id'))){currentFS=_this.$el.find('div[data-question-id]');}
currentFS.prev().css('display','flex');_this.aysAnimateStep(_this.$el.data('questEffect'),currentFS,currentFS.prev());if(_this.dbOptions.enable_correction=='on'){if(currentFS.prev().find('input:checked').length>0){currentFS.prev().find('.ays-field input').attr('disabled','disabled');currentFS.prev().find('.ays-field input').on('click',function(){return false;});currentFS.prev().find('.ays-field input').on('change',function(){return false;});}
if(currentFS.prev().find('option:checked').length>0){currentFS.prev().find('.ays-field select').attr('disabled','disabled');currentFS.prev().find('.ays-field select').on('click',function(){return false;});currentFS.prev().find('.ays-field select').on('change',function(){return false;});}
if(currentFS.prev().find('textarea').length>0){if(currentFS.prev().find('textarea').val()!==''){currentFS.prev().find('.ays-field textarea').attr('disabled','disabled');currentFS.prev().find('.ays-field textarea').on('click',function(){return false;});currentFS.prev().find('.ays-field textarea').on('change',function(){return false;});}}}}
AysSurveyPlugin.prototype.doSurveyResult=function(response){var _this=this;if(response.status){var formResults=_this.$el.find('.'+_this.htmlClassPrefix+'thank-you-page');if(_this.$el.hasClass('enable_questions_result')){}
var aysQuizLoader=_this.$el.find('div.ays-loader[data-role="loader"]');aysQuizLoader.addClass('ays-survey-loader');aysQuizLoader.removeClass(aysQuizLoader.data('class'));_this.$el.find('.ays-survey-loader-with-text').hide();_this.$el.find('.ays-survey-loader-with-custom-gif').hide();if(response.message){formResults.prepend($('<div>'+response.message+'</div>'));}
if(response.socialHeading){_this.$el.find(".ays-survey-social-shares-heading").append(response.socialHeading);}
if(_this.dbOptions[_this.dbOptionsPrefix+'redirect_after_submit']){if(!(_this.dbOptions[_this.dbOptionsPrefix+'submit_redirect_delay'])){_this.dbOptions[_this.dbOptionsPrefix+'submit_redirect_delay']=0;}
if(parseInt(_this.dbOptions[_this.dbOptionsPrefix+'submit_redirect_delay'])>0){if(_this.dbOptions[_this.dbOptionsPrefix+'submit_redirect_url']!=''){var redirectAfterSubmitTimerHTML='<div class="'+_this.htmlClassPrefix+'redirect-timer '+_this.htmlClassPrefix+'countdown-timer">'+
aysSurveyLangObj.redirectAfter+' <span class="'+_this.htmlClassPrefix+'countdown-time">'+_this.dbOptions[_this.dbOptionsPrefix+'submit_redirect_seconds']+'</span>'+'</div>';formResults.prepend($(redirectAfterSubmitTimerHTML));var timer=parseInt(_this.dbOptions[_this.dbOptionsPrefix+'submit_redirect_delay'])+2;_this.timer(timer,{blockedContent:true,redirectUrl:_this.dbOptions[_this.dbOptionsPrefix+'submit_redirect_url'],redirectNewTab:_this.dbOptions[_this.dbOptionsPrefix+'submit_redirect_new_tab']});}}
else{_this.timer(timer,{blockedContent:true,redirectUrl:_this.dbOptions[_this.dbOptionsPrefix+'submit_redirect_url'],redirectNewTab:_this.dbOptions[_this.dbOptionsPrefix+'submit_redirect_new_tab']});}}
var popupContainer=_this.$el.parents('.ays-survey-popup-survey-window');if(typeof popupContainer!='undefined'&&popupContainer.length>0){var dataClosePopup=popupContainer.attr('data-close-popup');if(typeof dataClosePopup!='undefined'&&dataClosePopup=='true'){var dataClosePopupDelay=popupContainer.attr('data-close-popup-delay');if(typeof dataClosePopupDelay!='undefined'&&dataClosePopupDelay){var popupCloseButton=popupContainer.find('.ays-survey-popup-btn-close');popupCloseButton.addClass('ays-survey-popup-btn-close-timer');var dataClosePopupDelayCount=+dataClosePopupDelay;if(dataClosePopupDelay>0){var popupCloser=setInterval(function(){popupCloseButton.text(dataClosePopupDelayCount);dataClosePopupDelayCount--;if(dataClosePopupDelayCount<0){clearInterval(popupCloser);popupCloseButton.trigger('click');}},1000);}else{setInterval(function(){popupCloseButton.trigger('click');},1000);}}}}
formResults.css({'display':'block'});}else{}}
AysSurveyPlugin.prototype.aysResetQuiz=function($quizContainer){var cont=$quizContainer.find('div[data-question-id]');cont.find('input[type="text"], textarea, input[type="number"], input[type="url"], input[type="email"]').each(function(){$(this).val('');});cont.find('select').each(function(){$(this).val('');});cont.find('select.ays-select').each(function(){$(this).val(null).trigger('change');});cont.find('select option').each(function(){$(this).removeAttr('selected');});cont.find('input[type="radio"], input[type="checkbox"]').each(function(){$(this).removeAttr('checked');});}
AysSurveyPlugin.prototype.aysAutofillData=function(data,currentEl){$.ajax({url:window.aysSurveyMakerAjaxPublic.ajaxUrl,method:'post',dataType:'json',data:data,success:function(response){if(response!==null){if(response.data){currentEl.find(".ays-survey-question[data-type='name'] input.ays-survey-question-input").val(response.data.display_name);currentEl.find(".ays-survey-question[data-type='email'] input.ays-survey-question-email-input").val(response.data.user_email);}}}});}
AysSurveyPlugin.prototype.checkMinVotes=function(item){var _this=this;var options;var questionId=item.find('.'+_this.htmlClassPrefix+'question-id').val();options=_this.dbOptions[_this.dbOptionsPrefix+'checkbox_options'][questionId];if(options.enable_max_selection_count){var allVotesCount=item.find('.'+_this.htmlClassPrefix+'answer input[type="checkbox"][name^="'+_this.htmlClassPrefix+'answers"]').length;var checkedCount=item.find('.'+_this.htmlClassPrefix+'answer input[type="checkbox"][name^="'+_this.htmlClassPrefix+'answers"]:checked').length;var MinVotes=options.min_selection_count;var MaxVotes=options.max_selection_count;if(MinVotes>MaxVotes){MinVotes=MaxVotes;}
if(MinVotes>allVotesCount){MinVotes=allVotesCount;}
var errorMessage='';if(MinVotes<=checkedCount){item.find('.'+_this.htmlClassPrefix+'votes-count-validation-error').hide();}
if(MinVotes>checkedCount){errorMessage+='<img src="'+aysSurveyMakerAjaxPublic.warningIcon+'" alt="error">';errorMessage+='<span>'+aysSurveyLangObj.minimumVotes+' '+MinVotes+'</span>';item.addClass('ays-has-error');item.find('.'+_this.htmlClassPrefix+'votes-count-validation-error').html(errorMessage);item.find('.'+_this.htmlClassPrefix+'votes-count-validation-error').show();_this.goToTop(item);return false;}
else{return true;}}
return true;}
AysSurveyPlugin.prototype.toggleFullscreen=function(elem){var _this=this;elem=elem||document.documentElement;if(!document.fullscreenElement&&!document.mozFullScreenElement&&!document.webkitFullscreenElement&&!document.msFullscreenElement){_this.aysSurveyFullScreenActivate(elem);_this.aysSurveyFullScreenWindowActivator(elem);}else{_this.aysSurveyFullScreenDeactivate(elem);_this.aysSurveyFullScreenWindowDeactivator();}}
AysSurveyPlugin.prototype.aysSurveyFullScreenActivate=function(elem){$(elem).css({'background-color':'#fff'});$(elem).find('.ays-survey-full-screen-mode .ays-survey-close-full-screen').css({'display':'inline'});$(elem).find('.ays-survey-full-screen-mode .ays-survey-open-full-screen').css('display','none');$(elem).find('.ays-survey-full-screen-mode').css({'padding-right':'15px'});$(elem).css({'overflow':'auto'});}
AysSurveyPlugin.prototype.aysSurveyFullScreenDeactivate=function(elem){$(elem).css({'background-color':'initial'});$(elem).find('.ays-survey-full-screen-mode .ays-survey-open-full-screen').css({'display':'inline'});$(elem).find('.ays-survey-full-screen-mode .ays-survey-close-full-screen').css('display','none');$(elem).find('.ays-survey-full-screen-mode').css({'padding-right':'0'});$(elem).css({'overflow':'initial'});}
AysSurveyPlugin.prototype.aysSurveyFullScreenDeactivateAll=function(elem){var _this=this;document.addEventListener('fullscreenchange',function(event){if(!document.fullscreenElement){var eventTarget=event.target;if($(eventTarget).hasClass('ays-survey-container')){_this.aysSurveyFullScreenDeactivate(eventTarget);}}},false);}
AysSurveyPlugin.prototype.aysSurveyFullScreenWindowActivator=function(elem){if(elem.requestFullscreen){elem.requestFullscreen();}else if(elem.msRequestFullscreen){elem.msRequestFullscreen();}else if(elem.mozRequestFullScreen){elem.mozRequestFullScreen();}else if(elem.webkitRequestFullscreen){elem.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT);}}
AysSurveyPlugin.prototype.aysSurveyFullScreenWindowDeactivator=function(){if(document.exitFullscreen){document.exitFullscreen();}else if(document.msExitFullscreen){document.msExitFullscreen();}else if(document.mozCancelFullScreen){document.mozCancelFullScreen();}else if(document.webkitExitFullscreen){document.webkitExitFullscreen();}}
AysSurveyPlugin.prototype.aysSurveyCheckTextLimit=function(question,options,e,current){var $this=current;var _this=this;var box=question.find('.ays-survey-question-text-message');var questionTextMessage=question.find('.ays-survey-question-text-message-span');var enable_question_text_max_length=(options.enable_word_limitation&&options.enable_word_limitation!="")?options.enable_word_limitation:false;var question_text_max_length=(options.limit_length&&options.limit_length!="")?parseInt(options.limit_length):'';var question_limit_text_type=(options.limit_by&&options.limit_by!="")?options.limit_by:'';var question_enable_text_message=(options.limit_counter&&options.limit_counter!='')?options.limit_counter:false;var remainder='';if(question_text_max_length!=''&&question_text_max_length!=0){switch(question_limit_text_type){case'char':var tval=$this.val();var tlength=tval.length;var set=question_text_max_length;var remain=parseInt(set-tlength);if(remain<=0&&e.which!==0&&e.charCode!==0){$this.val((tval).substring(0,tlength-1));}
if(e.type=="keyup"){var tval=$this.val().trim();if(tval.length>0&&tval!=null){var wordsLength=$this[0].value.split('').length;if(wordsLength>question_text_max_length){var trimmed=tval.split('',question_text_max_length).join("");$this.val(trimmed);}}}
remainder=remain;break;case'word':if(e.type=="keyup"){var tval=$this.val().trim();if(tval.length>0&&tval!=null){var wordsLength=$this[0].value.match(/\S+/g).length;if(wordsLength>question_text_max_length){var trimmed=tval.split(/\s+/,question_text_max_length).join(" ");$this.val(trimmed+" ");}
remainder=question_text_max_length-wordsLength;}}
break;default:break;}
if(e.type=="keyup"){if(question_enable_text_message){if(question_text_max_length!=''&&question_text_max_length!=0){if(remainder<=0){remainder=0;if(!box.hasClass(_this.htmlClassPrefix+' question-text-error-message')){box.addClass(_this.htmlClassPrefix+'question-text-error-message')}}else{if(box.hasClass(_this.htmlClassPrefix+'question-text-error-message')){box.removeClass(_this.htmlClassPrefix+'question-text-error-message')}}
if(tval.length==0||tval==null){if(box.hasClass(_this.htmlClassPrefix+'question-text-error-message')){box.removeClass(_this.htmlClassPrefix+'question-text-error-message')}
remainder=question_text_max_length;}
questionTextMessage.html(remainder);}}}}}
AysSurveyPlugin.prototype.aysSurveyCheckNumberLimit=function(question,options,e,current){var $this=current;var _this=this;var errorBox=question.find('.ays-survey-number-limit-message-box');question.removeClass('ays-has-error');errorBox.hide();var limitBox=question.find('.ays-survey-question-text-message');var questionTextMessage=question.find('.ays-survey-question-text-message-span');var enableQuestionLimit=(options.enable_number_limitation&&options.enable_number_limitation!="")?options.enable_number_limitation:false;var questionTextMinValue=(options.number_min_selection&&options.number_min_selection!="")?parseInt(options.number_min_selection):'';var questionTextMaxValue=(options.number_max_selection&&options.number_max_selection!="")?parseInt(options.number_max_selection):'';var enableTextMessage=(options.enable_number_error_message&&options.enable_number_error_message!='')?options.enable_number_error_message:false;var questionTextMaxLength=(options.number_limit_length&&options.number_limit_length!="")?parseInt(options.number_limit_length):'';var questionEnableTextMessage=(options.enable_number_limit_counter&&options.enable_number_limit_counter!='')?options.enable_number_limit_counter:false;if(questionTextMinValue>=questionTextMaxValue){questionTextMaxValue=questionTextMinValue;}
if(enableQuestionLimit){var remainder='';var showErrorMessage=0;if(questionTextMaxLength!=''&&questionTextMaxLength!=0){var tval=$this.val();var tlength=tval.length;var set=questionTextMaxLength;var remain=parseInt(set-tlength);var tval=$this.val().trim();if(tval.length>0&&tval!=null){var wordsLength=$this[0].value.split('').length;if(wordsLength>questionTextMaxLength){question.addClass('ays-has-error');}}
remainder=remain;}
var enteredValue=$this.val().trim();var inputValue=parseInt(enteredValue);if(questionTextMinValue!=''&&questionTextMinValue!=0){if(!isNaN(inputValue)){if(inputValue<questionTextMinValue){showErrorMessage++;question.addClass('ays-has-error');}}}
if(questionTextMaxValue!=''&&questionTextMaxValue!=0){if(inputValue>questionTextMaxValue){showErrorMessage++;question.addClass('ays-has-error');}}
if(questionTextMaxValue!=''&&questionTextMinValue<=0){if(!isNaN(inputValue)){if(inputValue<questionTextMinValue){showErrorMessage++;question.addClass('ays-has-error');}}}
if(questionEnableTextMessage){if(questionTextMaxLength!=''&&questionTextMaxLength!=0){if(remainder<=0){remainder=0;if(!limitBox.hasClass(_this.htmlClassPrefix+'question-text-error-message')){limitBox.addClass(_this.htmlClassPrefix+'question-text-error-message')}}else{if(limitBox.hasClass(_this.htmlClassPrefix+'question-text-error-message')){limitBox.removeClass(_this.htmlClassPrefix+'question-text-error-message')}}
if(tval.length==0||tval==null){if(limitBox.hasClass(_this.htmlClassPrefix+'question-text-error-message')){limitBox.removeClass(_this.htmlClassPrefix+'question-text-error-message')}
remainder=questionTextMaxLength;}
questionTextMessage.html(remainder);}}
if(enableTextMessage&&showErrorMessage>0){errorBox.show();}}}
AysSurveyPlugin.prototype.aysSurveyonTabPress=function(){var _this=this;_this.$el.on('keydown',(e)=>{var selectedBox=$(e.target);if(!selectedBox.hasClass('ays-survey-answer-text-inputs')){if(e.keyCode===32){e.preventDefault();if(selectedBox.hasClass('ays-survey-section-button-container')){selectedBox.find('.ays-survey-section-button').trigger("click");}
else{selectedBox.trigger("click");}}}});}
AysSurveyPlugin.prototype.aysAutoNext=function(button){var _this=this;var checkedRadiosCount=0;var activeSection=button.parents('.ays-survey-section.active-section');var sectionQuestions=activeSection.find('.ays-survey-section-questions .ays-survey-question');var sectionQuestionsCount=sectionQuestions.length;var checkedRadios=sectionQuestions.find('input[type="radio"]:checked');checkedRadiosCount+=checkedRadios.length;var changedDropdown=sectionQuestions.find('input.ays-survey-detect-selected-question-dropdown');changedDropdown.each(function(){if($(this).val().trim()!==''){checkedRadiosCount++;}});var nextButton=activeSection.find('.'+_this.htmlClassPrefix+'next-button');if((checkedRadiosCount>=sectionQuestionsCount)&&nextButton.hasClass('display_none_important')){nextButton.trigger('click');}}
function AddZero(num){return(num>=0&&num<10)?"0"+num:num+"";}
function aysEscapeHtml(text){var map={'&':'&amp;','<':'&lt;','>':'&gt;','"':'&quot;',"'":'&#039;'};return text.replace(/[&<>\"']/g,function(m){return map[m];});}
function validatePhoneNumber(input){var phoneno=/^[+ 0-9-]+$/;if(input.value.match(phoneno)){return true;}else{return false;}}
$.fn.serializeFormJSON=function(){var o={},a=this.serializeArray();$.each(a,function(){if(o[this.name]){if(!o[this.name].push){o[this.name]=[o[this.name]];}
o[this.name].push(this.value||'');}else{o[this.name]=this.value||'';}});return o;};$.fn.AysSurveyMaker=function(options){return this.each(function(){if(!$.data(this,'AysSurveyMaker')){$.data(this,'AysSurveyMaker',new AysSurveyPlugin(this,options));}else{try{$(this).data('AysSurveyMaker').init();}catch(err){console.error('AysSurveyMaker has not initiated properly');}}});};})(jQuery);
(function($){'use strict';$(document).find('.ays-survey-wait-loading-loader').css('display','block');$(document).ready(function(){$(document).find('.ays-survey-container').AysSurveyMaker();});})(jQuery);
(function(e,t){'object'==typeof exports&&'undefined'!=typeof module?module.exports=t():'function'==typeof define&&define.amd?define(t):e.Sweetalert2=t();}(this,function(){'use strict';function V(e){return(V='function'==typeof Symbol&&'symbol'==typeof Symbol.iterator?function(e){return typeof e;}:function(e){return e&&'function'==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?'symbol':typeof e;})(e);}function c(e,t){if(!(e instanceof t))throw new TypeError('Cannot call a class as a function');}function o(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,'value'in o&&(o.writable=!0),Object.defineProperty(e,o.key,o);}}function r(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),e;}function i(){return(i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);}return e;}).apply(this,arguments);}function a(e,t){if('function'!=typeof t&&null!==t)throw new TypeError('Super expression must either be null or a function');e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t);}function s(e){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e);})(e);}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e;})(e,t);}function l(e,t,n){return(l=function(){if('undefined'==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if('function'==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0;}catch(e){return!1;}}()?Reflect.construct:function(e,t,n){var o=[null];o.push.apply(o,t);var r=new(Function.bind.apply(e,o))();return n&&u(r,n.prototype),r;}).apply(null,arguments);}function d(e,t){return!t||'object'!=typeof t&&'function'!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e;}(e):t;}function p(e,t,n){return(p='undefined'!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var o=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=s(e)););return e;}(e,t);if(o){var r=Object.getOwnPropertyDescriptor(o,t);return r.get?r.get.call(n):r.value;}})(e,t,n||e);}function ue(e){var t=function e(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];if(!(this instanceof e))return l(e,n);Object.getPrototypeOf(e).apply(this,n);};return t.prototype=i(Object.create(e.prototype),{constructor:t}),'function'==typeof Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e,t;}function Ae(){var e=xe.innerParams.get(this),t=xe.domCache.get(this);e.showConfirmButton||(U(t.confirmButton),e.showCancelButton||U(t.actions)),N([t.popup,t.actions],I.loading),t.popup.removeAttribute('aria-busy'),t.popup.removeAttribute('data-loading'),t.confirmButton.disabled=!1,t.cancelButton.disabled=!1;}function Le(){if('undefined'!=typeof window){'undefined'==typeof Promise&&R('This package requires a Promise library, please include a shim to enable it in this browser (See: https://github.com/sweetalert2/sweetalert2/wiki/Migration-from-SweetAlert-to-SweetAlert2#1-ie-support)');for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(0===t.length)return R('At least 1 argument is expected!'),!1;Ee=this;var o=Object.freeze(this.constructor.argsToParams(t));Object.defineProperties(this,{params:{value:o,writable:!1,enumerable:!0}});var r=this._main(this.params);xe.promise.set(this,r);}}var t='SweetAlert2:',f=function(e){return Array.prototype.slice.call(e);},m=function(e){console.warn(''.concat(t,' ').concat(e));},R=function(e){console.error(''.concat(t,' ').concat(e));},n=[],h=function(e){-1===n.indexOf(e)&&(n.push(e),m(e));},M=function(e){return'function'==typeof e?e():e;},H=function(e){return'object'===V(e)&&'function'==typeof e.then;},e=Object.freeze({cancel:'cancel',backdrop:'overlay',close:'close',esc:'esc',timer:'timer'}),g=function(e){var t={};for(var n in e)t[e[n]]='swal2-'+e[n];return t;},I=g(['container','shown','height-auto','iosfix','popup','modal','no-backdrop','toast','toast-shown','toast-column','fade','show','hide','noanimation','close','title','header','content','actions','confirm','cancel','footer','icon','icon-text','image','input','file','range','select','radio','checkbox','label','textarea','inputerror','validationerror','progresssteps','activeprogressstep','progresscircle','progressline','loading','styled','top','top-start','top-end','top-left','top-right','center','center-start','center-end','center-left','center-right','bottom','bottom-start','bottom-end','bottom-left','bottom-right','grow-row','grow-column','grow-fullscreen']),b=g(['success','warning','info','question','error']),y={previousBodyPadding:null},v=function(e,t){return e.classList.contains(t);},_=function(e){if(e.focus(),'file'!==e.type){var t=e.value;e.value='',e.value=t;}},w=function(e,t,n){e&&t&&('string'==typeof t&&(t=t.split(/\s+/).filter(Boolean)),t.forEach(function(t){e.forEach?e.forEach(function(e){n?e.classList.add(t):e.classList.remove(t);}):n?e.classList.add(t):e.classList.remove(t);}));},D=function(e,t){w(e,t,!0);},N=function(e,t){w(e,t,!1);},W=function(e,t){for(var n=0;n<e.childNodes.length;n++)if(v(e.childNodes[n],t))return e.childNodes[n];},z=function(e){e.style.opacity='',e.style.display=e.id===I.content?'block':'flex';},U=function(e){e.style.opacity='',e.style.display='none';},K=function(e){return e&&(e.offsetWidth||e.offsetHeight||e.getClientRects().length);},C=function(){return document.body.querySelector('.'+I.container);},k=function(e){var t=C();return t?t.querySelector('.'+e):null;},x=function(){return k(I.popup);},A=function(){var e=x();return f(e.querySelectorAll('.'+I.icon));},B=function(){return k(I.title);},P=function(){return k(I.content);},S=function(){return k(I.image);},E=function(){return k(I.progresssteps);},O=function(){return k(I.confirm);},F=function(){return k(I.cancel);},Z=function(){return k(I.actions);},Q=function(){return k(I.footer);},Y=function(){return k(I.close);},$=function(){var e=f(x().querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])')).sort(function(e,t){return e=parseInt(e.getAttribute('tabindex')),(t=parseInt(t.getAttribute('tabindex')))<e?1:e<t?-1:0;}),t=f(x().querySelectorAll('a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, [tabindex="0"], [contenteditable], audio[controls], video[controls]')).filter(function(e){return'-1'!==e.getAttribute('tabindex');});return function(e,t,n){for(t=[],n=0;n<e.length;n++)-1===t.indexOf(e[n])&&t.push(e[n]);return t;}(e.concat(t)).filter(function(e){return K(e);});},L=function(){return!T()&&!document.body.classList.contains(I['no-backdrop']);},T=function(){return document.body.classList.contains(I['toast-shown']);},j=function(){return'undefined'==typeof window||'undefined'==typeof document;},q='\n <div aria-labelledby="'.concat(I.title,'" aria-describedby="').concat(I.content,'" class="').concat(I.popup,'" tabindex="-1">\n   <div class="').concat(I.header,'">\n     <ul class="').concat(I.progresssteps,'"></ul>\n     <div class="').concat(I.icon,' ').concat(b.error,'">\n       <span class="swal2-x-mark"><span class="swal2-x-mark-line-left"></span><span class="swal2-x-mark-line-right"></span></span>\n     </div>\n     <div class="').concat(I.icon,' ').concat(b.question,'">\n       <span class="').concat(I['icon-text'],'">?</span>\n      </div>\n     <div class="').concat(I.icon,' ').concat(b.warning,'">\n       <span class="').concat(I['icon-text'],'">!</span>\n      </div>\n     <div class="').concat(I.icon,' ').concat(b.info,'">\n       <span class="').concat(I['icon-text'],'">i</span>\n      </div>\n     <div class="').concat(I.icon,' ').concat(b.success,'">\n       <div class="swal2-success-circular-line-left"></div>\n       <span class="swal2-success-line-tip"></span> <span class="swal2-success-line-long"></span>\n       <div class="swal2-success-ring"></div> <div class="swal2-success-fix"></div>\n       <div class="swal2-success-circular-line-right"></div>\n     </div>\n     <img class="').concat(I.image,'" />\n     <h2 class="').concat(I.title,'" id="').concat(I.title,'"></h2>\n     <button type="button" class="').concat(I.close,'">\xD7</button>\n   </div>\n   <div class="').concat(I.content,'">\n     <div id="').concat(I.content,'"></div>\n     <input class="').concat(I.input,'" />\n     <input type="file" class="').concat(I.file,'" />\n     <div class="').concat(I.range,'">\n       <input type="range" />\n       <output></output>\n     </div>\n     <select class="').concat(I.select,'"></select>\n     <div class="').concat(I.radio,'"></div>\n     <label for="').concat(I.checkbox,'" class="').concat(I.checkbox,'">\n       <input type="checkbox" />\n       <span class="').concat(I.label,'"></span>\n     </label>\n     <textarea class="').concat(I.textarea,'"></textarea>\n     <div class="').concat(I.validationerror,'" id="').concat(I.validationerror,'"></div>\n   </div>\n   <div class="').concat(I.actions,'">\n     <button type="button" class="').concat(I.confirm,'">OK</button>\n     <button type="button" class="').concat(I.cancel,'">Cancel</button>\n   </div>\n   <div class="').concat(I.footer,'">\n   </div>\n </div>\n').replace(/(^|\n)\s*/g,''),J=function(e){var t=C();if(t&&(t.parentNode.removeChild(t),N([document.documentElement,document.body],[I['no-backdrop'],I['toast-shown'],I['has-column']])),!j()){var n=document.createElement('div');n.className=I.container,n.innerHTML=q,('string'==typeof e.target?document.querySelector(e.target):e.target).appendChild(n);var o,r=x(),i=P(),a=W(i,I.input),c=W(i,I.file),s=i.querySelector('.'.concat(I.range,' input')),u=i.querySelector('.'.concat(I.range,' output')),l=W(i,I.select),d=i.querySelector('.'.concat(I.checkbox,' input')),p=W(i,I.textarea);r.setAttribute('role',e.toast?'alert':'dialog'),r.setAttribute('aria-live',e.toast?'polite':'assertive'),e.toast||r.setAttribute('aria-modal','true');var f=function(e){qe.isVisible()&&o!==e.target.value&&qe.resetValidationError(),o=e.target.value;};return a.oninput=f,c.onchange=f,l.onchange=f,d.onchange=f,p.oninput=f,s.oninput=function(e){f(e),u.value=s.value;},s.onchange=function(e){f(e),s.nextSibling.value=s.value;},r;}R('SweetAlert2 requires document to initialize');},X=function(e,t){if(!e)return U(t);if('object'===V(e))if(t.innerHTML='',0 in e)for(var n=0;n in e;n++)t.appendChild(e[n].cloneNode(!0));else t.appendChild(e.cloneNode(!0));else e&&(t.innerHTML=e);z(t);},G=function(e,t,n){if(j())return!1;e=document.createElement('div'),t={WebkitAnimation:'webkitAnimationEnd',OAnimation:'oAnimationEnd oanimationend',animation:'animationend'};for(n in t)if(t.hasOwnProperty(n)&&void 0!==e.style[n])return t[n];return!1;}(),ee=function(e){var t,n,o=Z(),r=O(),i=F();if(e.showConfirmButton||e.showCancelButton?z(o):U(o),e.showCancelButton?i.style.display='inline-block':U(i),e.showConfirmButton?(n='display',(t=r).style.removeProperty?t.style.removeProperty(n):t.style.removeAttribute(n)):U(r),r.innerHTML=e.confirmButtonText,i.innerHTML=e.cancelButtonText,r.setAttribute('aria-label',e.confirmButtonAriaLabel),i.setAttribute('aria-label',e.cancelButtonAriaLabel),r.className=I.confirm,D(r,e.confirmButtonClass),i.className=I.cancel,D(i,e.cancelButtonClass),e.buttonsStyling){D([r,i],I.styled),e.confirmButtonColor&&(r.style.backgroundColor=e.confirmButtonColor),e.cancelButtonColor&&(i.style.backgroundColor=e.cancelButtonColor);var a=window.getComputedStyle(r).getPropertyValue('background-color');r.style.borderLeftColor=a,r.style.borderRightColor=a;}else N([r,i],I.styled),r.style.backgroundColor=r.style.borderLeftColor=r.style.borderRightColor='',i.style.backgroundColor=i.style.borderLeftColor=i.style.borderRightColor='';},te=function(e){var t=P().querySelector('#'+I.content);e.html?X(e.html,t):e.text?(t.textContent=e.text,z(t)):U(t);},ne=function(e){for(var t=A(),n=0;n<t.length;n++)U(t[n]);if(e.type)if(-1!==Object.keys(b).indexOf(e.type)){var o=qe.getPopup().querySelector('.'.concat(I.icon,'.').concat(b[e.type]));z(o),e.animation&&D(o,'swal2-animate-'.concat(e.type,'-icon'));}else R('Unknown type! Expected "success", "error", "warning", "info" or "question", got "'.concat(e.type,'"'));},oe=function(e){var t=S();e.imageUrl?(t.setAttribute('src',e.imageUrl),t.setAttribute('alt',e.imageAlt),z(t),e.imageWidth?t.setAttribute('width',e.imageWidth):t.removeAttribute('width'),e.imageHeight?t.setAttribute('height',e.imageHeight):t.removeAttribute('height'),t.className=I.image,e.imageClass&&D(t,e.imageClass)):U(t);},re=function(r){var i=E(),a=parseInt(null===r.currentProgressStep?qe.getQueueStep():r.currentProgressStep,10);r.progressSteps&&r.progressSteps.length?(z(i),i.innerHTML='',a>=r.progressSteps.length&&m('Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)'),r.progressSteps.forEach(function(e,t){var n=document.createElement('li');if(D(n,I.progresscircle),n.innerHTML=e,t===a&&D(n,I.activeprogressstep),i.appendChild(n),t!==r.progressSteps.length-1){var o=document.createElement('li');D(o,I.progressline),r.progressStepsDistance&&(o.style.width=r.progressStepsDistance),i.appendChild(o);}})):U(i);},ie=function(e){var t=B();e.titleText?t.innerText=e.titleText:e.title&&('string'==typeof e.title&&(e.title=e.title.split('\n').join('<br />')),X(e.title,t));},ae=function(){null===y.previousBodyPadding&&document.body.scrollHeight>window.innerHeight&&(y.previousBodyPadding=parseInt(window.getComputedStyle(document.body).getPropertyValue('padding-right')),document.body.style.paddingRight=y.previousBodyPadding+function(e,t){return'ontouchstart'in window||navigator.msMaxTouchPoints?0:(e=document.createElement('div'),e.style.width='50px',e.style.height='50px',e.style.overflow='scroll',document.body.appendChild(e),t=e.offsetWidth-e.clientWidth,document.body.removeChild(e),t);}()+'px');},ce={},se=function(e,n){var o=C(),t=x();if(t){null!==e&&'function'==typeof e&&e(t),N(t,I.show),D(t,I.hide);var r=function(){var e,t;T()||(e=window.scrollX,t=window.scrollY,ce.restoreFocusTimeout=setTimeout(function(){ce.previousActiveElement&&ce.previousActiveElement.focus?(ce.previousActiveElement.focus(),ce.previousActiveElement=null):document.body&&document.body.focus();},100),void 0!==e&&void 0!==t&&window.scrollTo(e,t),ce.keydownTarget.removeEventListener('keydown',ce.keydownHandler,{capture:ce.keydownListenerCapture}),ce.keydownHandlerAdded=!1),o.parentNode&&o.parentNode.removeChild(o),N([document.documentElement,document.body],[I.shown,I['height-auto'],I['no-backdrop'],I['toast-shown'],I['toast-column']]),L()&&(null!==y.previousBodyPadding&&(document.body.style.paddingRight=y.previousBodyPadding,y.previousBodyPadding=null),function(e){v(document.body,I.iosfix)&&(e=parseInt(document.body.style.top,10),N(document.body,I.iosfix),document.body.style.top='',document.body.scrollTop=-1*e);}(),f(document.body.children).forEach(function(e){e.hasAttribute('data-previous-aria-hidden')?(e.setAttribute('aria-hidden',e.getAttribute('data-previous-aria-hidden')),e.removeAttribute('data-previous-aria-hidden')):e.removeAttribute('aria-hidden');})),null!==n&&'function'==typeof n&&setTimeout(function(){n();});};G&&!v(t,I.noanimation)?t.addEventListener(G,function e(){t.removeEventListener(G,e),v(t,I.hide)&&r();}):r();}};var le={title:'',titleText:'',text:'',html:'',footer:'',type:null,toast:!1,customClass:'',target:'body',backdrop:!0,animation:!0,heightAuto:!0,allowOutsideClick:!0,allowEscapeKey:!0,allowEnterKey:!0,stopKeydownPropagation:!0,keydownListenerCapture:!1,showConfirmButton:!0,showCancelButton:!1,preConfirm:null,confirmButtonText:'OK',confirmButtonAriaLabel:'',confirmButtonColor:null,confirmButtonClass:null,cancelButtonText:'Cancel',cancelButtonAriaLabel:'',cancelButtonColor:null,cancelButtonClass:null,buttonsStyling:!0,reverseButtons:!1,focusConfirm:!0,focusCancel:!1,showCloseButton:!1,closeButtonAriaLabel:'Close this dialog',showLoaderOnConfirm:!1,imageUrl:null,imageWidth:null,imageHeight:null,imageAlt:'',imageClass:null,timer:null,width:null,padding:null,background:null,input:null,inputPlaceholder:'',inputValue:'',inputOptions:{},inputAutoTrim:!0,inputClass:null,inputAttributes:{},inputValidator:null,grow:!1,position:'center',progressSteps:[],currentProgressStep:null,progressStepsDistance:null,onBeforeOpen:null,onAfterClose:null,onOpen:null,onClose:null,useRejections:!1,expectRejections:!1},de=['useRejections','expectRejections'],pe=['allowOutsideClick','allowEnterKey','backdrop','focusConfirm','focusCancel','heightAuto','keydownListenerCapture'],fe=function(e){return le.hasOwnProperty(e)||'extraParams'===e;},me=function(e){return-1!==de.indexOf(e);},he=function(e){for(var t in e)fe(t)||m('Unknown parameter "'.concat(t,'"')),e.toast&&-1!==pe.indexOf(t)&&m('The parameter "'.concat(t,'" is incompatible with toasts')),me(t)&&h('The parameter "'.concat(t,'" is deprecated and will be removed in the next major release.'));},ge='"setDefaults" & "resetDefaults" methods are deprecated in favor of "mixin" method and will be removed in the next major release. For new projects, use "mixin". For past projects already using "setDefaults", support will be provided through an additional package.',be={};var ye=[],ve=function(){var e=x();e||qe(''),e=x();var t=Z(),n=O(),o=F();z(t),z(n),D([e,t],I.loading),n.disabled=!0,o.disabled=!0,e.setAttribute('data-loading',!0),e.setAttribute('aria-busy',!0),e.focus();},we=Object.freeze({isValidParameter:fe,isDeprecatedParameter:me,argsToParams:function(n){var o={};switch(V(n[0])){case'object':i(o,n[0]);break;default:['title','html','type'].forEach(function(e,t){switch(V(n[t])){case'string':o[e]=n[t];break;case'undefined':break;default:R('Unexpected type of '.concat(e,'! Expected "string", got ').concat(V(n[t])));}});}return o;},adaptInputValidator:function(n){return function(e,t){return n.call(this,e,t).then(function(){},function(e){return e;});};},close:se,closePopup:se,closeModal:se,closeToast:se,isVisible:function(){return!!x();},clickConfirm:function(){return O().click();},clickCancel:function(){return F().click();},getContainer:C,getPopup:x,getTitle:B,getContent:P,getImage:S,getIcons:A,getCloseButton:Y,getButtonsWrapper:function(){return h('swal.getButtonsWrapper() is deprecated and will be removed in the next major release, use swal.getActions() instead'),k(I.actions);},getActions:Z,getConfirmButton:O,getCancelButton:F,getFooter:Q,getFocusableElements:$,isLoading:function(){return x().hasAttribute('data-loading');},fire:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return l(this,t);},mixin:function(n){return ue(function(e){function t(){return c(this,t),d(this,s(t).apply(this,arguments));}return a(t,e),r(t,[{key:'_main',value:function(e){return p(s(t.prototype),'_main',this).call(this,i({},n,e));}}]),t;}(this));},queue:function(e){var i=this;ye=e;var a=function(){ye=[],document.body.removeAttribute('data-swal2-queue-step');},c=[];return new Promise(function(r){(function t(n,o){n<ye.length?(document.body.setAttribute('data-swal2-queue-step',n),i(ye[n]).then(function(e){void 0!==e.value?(c.push(e.value),t(n+1,o)):(a(),r({dismiss:e.dismiss}));})):(a(),r({value:c}));}(0));});},getQueueStep:function(){return document.body.getAttribute('data-swal2-queue-step');},insertQueueStep:function(e,t){return t&&t<ye.length?ye.splice(t,0,e):ye.push(e);},deleteQueueStep:function(e){void 0!==ye[e]&&ye.splice(e,1);},showLoading:ve,enableLoading:ve,getTimerLeft:function(){return ce.timeout&&ce.timeout.getTimerLeft();}}),Ce='function'==typeof Symbol?Symbol:function(t){function e(e){return'__'+e+'_'+Math.floor(1000000000*Math.random())+'_'+ ++t+'__';}return t=0,e.iterator=e('Symbol.iterator'),e;}(),ke='function'==typeof WeakMap?WeakMap:function(n,o,t){function e(){o(this,n,{value:Ce('WeakMap')});}return e.prototype={delete:function(e){delete e[this[n]];},get:function(e){return e[this[n]];},has:function(e){return t.call(e,this[n]);},set:function(e,t){o(e,this[n],{configurable:!0,value:t});}},e;}(Ce('WeakMap'),Object.defineProperty,{}.hasOwnProperty),xe={promise:new ke(),innerParams:new ke(),domCache:new ke()};var Be=function e(t,n){var o,r,i;c(this,e);var a=n;this.start=function(){i=!0,r=new Date(),o=setTimeout(t,a);},this.stop=function(){i=!1,clearTimeout(o),a-=new Date()-r;},this.getTimerLeft=function(){return i&&(this.stop(),this.start()),a;},this.start();},Pe={email:function(e,t){return/^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]{2,24}$/.test(e)?Promise.resolve():Promise.reject(t&&t.validationMessage?t.validationMessage:'Invalid email address');},url:function(e,t){var regex='/^https?://(www.)?[-a-zA-Z0-9@:%._+~#=]{2,256}.[a-z]{2,6}\b([-a-zA-Z0-9@:%_+.~#?&//=]*)$/';var ggg=regex.test(e)?Promise.resolve():Promise.reject(t&&t.validationMessage?t.validationMessage:'Invalid URL');return ggg;}};var Se=function(e){var t=C(),n=x();null!==e.onBeforeOpen&&'function'==typeof e.onBeforeOpen&&e.onBeforeOpen(n),e.animation?(D(n,I.show),D(t,I.fade),N(n,I.hide)):N(n,I.fade),z(n),t.style.overflowY='hidden',G&&!v(n,I.noanimation)?n.addEventListener(G,function e(){n.removeEventListener(G,e),t.style.overflowY='auto';}):t.style.overflowY='auto',D([document.documentElement,document.body,t],I.shown),e.heightAuto&&e.backdrop&&!e.toast&&D([document.documentElement,document.body],I['height-auto']),L()&&(ae(),function(e){/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream&&!v(document.body,I.iosfix)&&(e=document.body.scrollTop,document.body.style.top=-1*e+'px',D(document.body,I.iosfix));}(),f(document.body.children).forEach(function(e){e===C()||e.contains(C())||(e.hasAttribute('aria-hidden')&&e.setAttribute('data-previous-aria-hidden',e.getAttribute('aria-hidden')),e.setAttribute('aria-hidden','true'));})),T()||ce.previousActiveElement||(ce.previousActiveElement=document.activeElement),null!==e.onOpen&&'function'==typeof e.onOpen&&setTimeout(function(){e.onOpen(n);});};var Ee,Oe=Object.freeze({hideLoading:Ae,disableLoading:Ae,getInput:function(e){var t=xe.innerParams.get(this),n=xe.domCache.get(this);if(!(e=e||t.input))return null;switch(e){case'select':case'textarea':case'file':return W(n.content,I[e]);case'checkbox':return n.popup.querySelector('.'.concat(I.checkbox,' input'));case'radio':return n.popup.querySelector('.'.concat(I.radio,' input:checked'))||n.popup.querySelector('.'.concat(I.radio,' input:first-child'));case'range':return n.popup.querySelector('.'.concat(I.range,' input'));default:return W(n.content,I.input);}},enableButtons:function(){var e=xe.domCache.get(this);e.confirmButton.disabled=!1,e.cancelButton.disabled=!1;},disableButtons:function(){var e=xe.domCache.get(this);e.confirmButton.disabled=!0,e.cancelButton.disabled=!0;},enableConfirmButton:function(){xe.domCache.get(this).confirmButton.disabled=!1;},disableConfirmButton:function(){xe.domCache.get(this).confirmButton.disabled=!0;},enableInput:function(){var e=this.getInput();if(!e)return!1;if('radio'===e.type)for(var t=e.parentNode.parentNode.querySelectorAll('input'),n=0;n<t.length;n++)t[n].disabled=!1;else e.disabled=!1;},disableInput:function(){var e=this.getInput();if(!e)return!1;if(e&&'radio'===e.type)for(var t=e.parentNode.parentNode.querySelectorAll('input'),n=0;n<t.length;n++)t[n].disabled=!0;else e.disabled=!0;},showValidationError:function(e){var t=xe.domCache.get(this);t.validationError.innerHTML=e;var n=window.getComputedStyle(t.popup);t.validationError.style.marginLeft='-'.concat(n.getPropertyValue('padding-left')),t.validationError.style.marginRight='-'.concat(n.getPropertyValue('padding-right')),z(t.validationError);var o=this.getInput();o&&(o.setAttribute('aria-invalid',!0),o.setAttribute('aria-describedBy',I.validationerror),_(o),D(o,I.inputerror));},resetValidationError:function(){var e=xe.domCache.get(this);e.validationError&&U(e.validationError);var t=this.getInput();t&&(t.removeAttribute('aria-invalid'),t.removeAttribute('aria-describedBy'),N(t,I.inputerror));},getProgressSteps:function(){return xe.innerParams.get(this).progressSteps;},setProgressSteps:function(e){var t=i({},xe.innerParams.get(this),{progressSteps:e});xe.innerParams.set(this,t),re(t);},showProgressSteps:function(){var e=xe.domCache.get(this);z(e.progressSteps);},hideProgressSteps:function(){var e=xe.domCache.get(this);U(e.progressSteps);},_main:function(e){var L=this;he(e);var T=i({},le,e);(function(t,e,n,o,r,i,a,c,s,u,l){for(t.inputValidator||Object.keys(Pe).forEach(function(e){t.input===e&&(t.inputValidator=t.expectRejections?Pe[e]:qe.adaptInputValidator(Pe[e]));}),(!t.target||'string'==typeof t.target&&!document.querySelector(t.target)||'string'!=typeof t.target&&!t.target.appendChild)&&(m('Target parameter is not valid, defaulting to "body"'),t.target='body'),n=x(),o='string'==typeof t.target?document.querySelector(t.target):t.target,e=n&&o&&n.parentNode!==o.parentNode?J(t):n||J(t),t.width&&(e.style.width='number'==typeof t.width?t.width+'px':t.width),t.padding&&(e.style.padding='number'==typeof t.padding?t.padding+'px':t.padding),t.background&&(e.style.background=t.background),r=window.getComputedStyle(e).getPropertyValue('background-color'),i=e.querySelectorAll('[class^=swal2-success-circular-line], .swal2-success-fix'),a=0;a<i.length;a++)i[a].style.backgroundColor=r;c=C(),s=Y(),u=Q(),ie(t),te(t),'string'==typeof t.backdrop?C().style.background=t.backdrop:t.backdrop||D([document.documentElement,document.body],I['no-backdrop']),!t.backdrop&&t.allowOutsideClick&&m('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`'),t.position in I?D(c,I[t.position]):(m('The "position" parameter is not valid, defaulting to "center"'),D(c,I.center)),t.grow&&'string'==typeof t.grow&&(l='grow-'+t.grow,l in I&&D(c,I[l])),'function'==typeof t.animation&&(t.animation=t.animation.call()),t.showCloseButton?(s.setAttribute('aria-label',t.closeButtonAriaLabel),z(s)):U(s),e.className=I.popup,t.toast?(D([document.documentElement,document.body],I['toast-shown']),D(e,I.toast)):D(e,I.modal),t.customClass&&D(e,t.customClass),re(t),ne(t),oe(t),ee(t),X(t.footer,u),!0===t.animation?N(e,I.noanimation):D(e,I.noanimation),t.showLoaderOnConfirm&&!t.preConfirm&&m('showLoaderOnConfirm is set to true, but preConfirm is not defined.\nshowLoaderOnConfirm should be used together with preConfirm, see usage example:\nhttps://sweetalert2.github.io/#ajax-request');}(T),Object.freeze(T),xe.innerParams.set(this,T),ce.timeout&&(ce.timeout.stop(),delete ce.timeout),clearTimeout(ce.restoreFocusTimeout));var j={popup:x(),container:C(),content:P(),actions:Z(),confirmButton:O(),cancelButton:F(),closeButton:Y(),validationError:k(I.validationerror),progressSteps:E()};xe.domCache.set(this,j);var q=this.constructor;return new Promise(function(t,n){var o=function(e){q.closePopup(T.onClose,T.onAfterClose),T.useRejections?t(e):t({value:e});},s=function(e){q.closePopup(T.onClose,T.onAfterClose),T.useRejections?n(e):t({dismiss:e});},u=function(e){q.closePopup(T.onClose,T.onAfterClose),n(e);};T.timer&&(ce.timeout=new Be(function(){s('timer'),delete ce.timeout;},T.timer)),T.input&&setTimeout(function(){var e=L.getInput();e&&_(e);},0);for(var l=function(t){if(T.showLoaderOnConfirm&&q.showLoading(),T.preConfirm){L.resetValidationError();var e=Promise.resolve().then(function(){return T.preConfirm(t,T.extraParams);});T.expectRejections?e.then(function(e){return o(e||t);},function(e){L.hideLoading(),e&&L.showValidationError(e);}):e.then(function(e){K(j.validationError)||!1===e?L.hideLoading():o(e||t);},function(e){return u(e);});}else o(t);},e=function(e){var t=e.target,n=j.confirmButton,o=j.cancelButton,r=n&&(n===t||n.contains(t)),i=o&&(o===t||o.contains(t));switch(e.type){case'click':if(r&&q.isVisible())if(L.disableButtons(),T.input){var a=function(e){if(e=L.getInput(),!e)return null;switch(T.input){case'checkbox':return e.checked?1:0;case'radio':return e.checked?e.value:null;case'file':return e.files.length?e.files[0]:null;default:return T.inputAutoTrim?e.value.trim():e.value;}}();if(T.inputValidator){L.disableInput();var c=Promise.resolve().then(function(){return T.inputValidator(a,T.extraParams);});T.expectRejections?c.then(function(){L.enableButtons(),L.enableInput(),l(a);},function(e){L.enableButtons(),L.enableInput(),e&&L.showValidationError(e);}):c.then(function(e){L.enableButtons(),L.enableInput(),e?L.showValidationError(e):l(a);},function(e){return u(e);});}else l(a);}else l(!0);else i&&q.isVisible()&&(L.disableButtons(),s(q.DismissReason.cancel));}},r=j.popup.querySelectorAll('button'),i=0;i<r.length;i++)r[i].onclick=e,r[i].onmouseover=e,r[i].onmouseout=e,r[i].onmousedown=e;if(j.closeButton.onclick=function(){s(q.DismissReason.close);},T.toast)j.popup.onclick=function(){T.showConfirmButton||T.showCancelButton||T.showCloseButton||T.input||s(q.DismissReason.close);};else{var a=!1;j.popup.onmousedown=function(){j.container.onmouseup=function(e){j.container.onmouseup=void 0,e.target===j.container&&(a=!0);};},j.container.onmousedown=function(){j.popup.onmouseup=function(e){j.popup.onmouseup=void 0,(e.target===j.popup||j.popup.contains(e.target))&&(a=!0);};},j.container.onclick=function(e){a?a=!1:e.target===j.container&&M(T.allowOutsideClick)&&s(q.DismissReason.backdrop);};}T.reverseButtons?j.confirmButton.parentNode.insertBefore(j.cancelButton,j.confirmButton):j.confirmButton.parentNode.insertBefore(j.confirmButton,j.cancelButton);var c=function(e,t){for(var n=$(T.focusCancel),o=0;o<n.length;o++)return(e+=t)===n.length?e=0:-1===e&&(e=n.length-1),n[e].focus();j.popup.focus();};ce.keydownHandlerAdded&&(ce.keydownTarget.removeEventListener('keydown',ce.keydownHandler,{capture:ce.keydownListenerCapture}),ce.keydownHandlerAdded=!1),T.toast||(ce.keydownHandler=function(e){return function(e,t,n,o,r,i){if(t.stopKeydownPropagation&&e.stopPropagation(),'Enter'!==e.key||e.isComposing)if('Tab'===e.key){for(n=e.target,o=$(t.focusCancel),r=-1,i=0;i<o.length;i++)if(n===o[i]){r=i;break;}e.shiftKey?c(r,-1):c(r,1),e.stopPropagation(),e.preventDefault();}else-1!==['ArrowLeft','ArrowRight','ArrowUp','ArrowDown','Left','Right','Up','Down'].indexOf(e.key)?document.activeElement===j.confirmButton&&K(j.cancelButton)?j.cancelButton.focus():document.activeElement===j.cancelButton&&K(j.confirmButton)&&j.confirmButton.focus():'Escape'!==e.key&&'Esc'!==e.key||!0!==M(t.allowEscapeKey)||s(q.DismissReason.esc);else if(e.target&&L.getInput()&&e.target.outerHTML===L.getInput().outerHTML){if(-1!==['textarea','file'].indexOf(t.input))return;q.clickConfirm(),e.preventDefault();}}(e,T);},ce.keydownTarget=T.keydownListenerCapture?window:j.popup,ce.keydownListenerCapture=T.keydownListenerCapture,ce.keydownTarget.addEventListener('keydown',ce.keydownHandler,{capture:ce.keydownListenerCapture}),ce.keydownHandlerAdded=!0),L.enableButtons(),L.hideLoading(),L.resetValidationError(),T.toast&&(T.input||T.footer||T.showCloseButton)?D(document.body,I['toast-column']):N(document.body,I['toast-column']);for(var d,p,f=['input','file','range','select','radio','checkbox','textarea'],m=0;m<f.length;m++){var h=I[f[m]],g=W(j.content,h);if(d=L.getInput(f[m])){for(var b in d.attributes)if(d.attributes.hasOwnProperty(b)){var y=d.attributes[b].name;'type'!==y&&'value'!==y&&d.removeAttribute(y);}for(var v in T.inputAttributes)d.setAttribute(v,T.inputAttributes[v]);}g.className=h,T.inputClass&&D(g,T.inputClass),U(g);}switch(T.input){case'text':case'email':case'password':case'number':case'tel':case'url':(d=W(j.content,I.input)).value=T.inputValue,d.placeholder=T.inputPlaceholder,d.type=T.input,z(d);break;case'file':(d=W(j.content,I.file)).placeholder=T.inputPlaceholder,d.type=T.input,z(d);break;case'range':var w=W(j.content,I.range),C=w.querySelector('input'),k=w.querySelector('output');C.value=T.inputValue,C.type=T.input,k.value=T.inputValue,z(w);break;case'select':var x=W(j.content,I.select);if(x.innerHTML='',T.inputPlaceholder){var A=document.createElement('option');A.innerHTML=T.inputPlaceholder,A.value='',A.disabled=!0,A.selected=!0,x.appendChild(A);}p=function(e){e.forEach(function(e){var t=e[0],n=e[1],o=document.createElement('option');o.value=t,o.innerHTML=n,T.inputValue.toString()===t.toString()&&(o.selected=!0),x.appendChild(o);}),z(x),x.focus();};break;case'radio':var B=W(j.content,I.radio);B.innerHTML='',p=function(e){e.forEach(function(e){var t=e[0],n=e[1],o=document.createElement('input'),r=document.createElement('label');o.type='radio',o.name=I.radio,o.value=t,T.inputValue.toString()===t.toString()&&(o.checked=!0);var i=document.createElement('span');i.innerHTML=n,i.className=I.label,r.appendChild(o),r.appendChild(i),B.appendChild(r);}),z(B);var t=B.querySelectorAll('input');t.length&&t[0].focus();};break;case'checkbox':var P=W(j.content,I.checkbox),S=L.getInput('checkbox');S.type='checkbox',S.value=1,S.id=I.checkbox,S.checked=Boolean(T.inputValue),P.querySelector('span').innerHTML=T.inputPlaceholder,z(P);break;case'textarea':var E=W(j.content,I.textarea);E.value=T.inputValue,E.placeholder=T.inputPlaceholder,z(E);break;case null:break;default:R('Unexpected type of input! Expected "text", "email", "password", "number", "tel", "select", "radio", "checkbox", "textarea", "file" or "url", got "'.concat(T.input,'"'));}if('select'===T.input||'radio'===T.input){var O=function(e){return p((t=e,n=[],'undefined'!=typeof Map&&t instanceof Map?t.forEach(function(e,t){n.push([t,e]);}):Object.keys(t).forEach(function(e){n.push([e,t[e]]);}),n));var t,n;};H(T.inputOptions)?(q.showLoading(),T.inputOptions.then(function(e){L.hideLoading(),O(e);})):'object'===V(T.inputOptions)?O(T.inputOptions):R('Unexpected type of inputOptions! Expected object, Map or Promise, got '.concat(V(T.inputOptions)));}else-1!==['text','email','number','tel','textarea'].indexOf(T.input)&&H(T.inputValue)&&(q.showLoading(),U(d),T.inputValue.then(function(e){d.value='number'===T.input?parseFloat(e)||0:e+'',z(d),d.focus(),L.hideLoading();}).catch(function(e){R('Error in inputValue promise: '+e),d.value='',z(d),d.focus(),L.hideLoading();}));Se(T),T.toast||(M(T.allowEnterKey)?T.focusCancel&&K(j.cancelButton)?j.cancelButton.focus():T.focusConfirm&&K(j.confirmButton)?j.confirmButton.focus():c(-1,1):document.activeElement&&document.activeElement.blur()),j.container.scrollTop=0;});}});Le.prototype.then=function(e,t){return xe.promise.get(this).then(e,t);},Le.prototype.catch=function(e){return xe.promise.get(this).catch(e);},Le.prototype.finally=function(e){return xe.promise.get(this).finally(e);},i(Le.prototype,Oe),i(Le,we),Object.keys(Oe).forEach(function(t){Le[t]=function(){var e;return Ee?(e=Ee)[t].apply(e,arguments):void 0;};}),Le.DismissReason=e,Le.noop=function(){},Le.version='7.26.28';var Te,je,qe=ue((Te=Le,je=function(e){function t(){return c(this,t),d(this,s(t).apply(this,arguments));}return a(t,Te),r(t,[{key:'_main',value:function(e){return p(s(t.prototype),'_main',this).call(this,i({},be,e));}}],[{key:'setDefaults',value:function(t){if(h(ge),!t||'object'!==V(t))throw new TypeError('SweetAlert2: The argument for setDefaults() is required and has to be a object');he(t),Object.keys(t).forEach(function(e){Te.isValidParameter(e)&&(be[e]=t[e]);});}},{key:'resetDefaults',value:function(){h(ge),be={};}}]),t;}(),'undefined'!=typeof window&&'object'===V(window._swalDefaults)&&je.setDefaults(window._swalDefaults),je));return qe.default=qe;}),'undefined'!=typeof window&&window.Sweetalert2&&(window.swal=window.sweetAlert=window.Swal=window.SweetAlert=window.Sweetalert2),'undefined'!=typeof document&&function(e,t,n){if(n=e.createElement('style'),e.getElementsByTagName('head')[0].appendChild(n),n.styleSheet)n.styleSheet.disabled||(n.styleSheet.cssText=t);else try{n.innerHTML=t;}catch(e){n.innerText=t;}}(document,"@-webkit-keyframes swal2-show{0%{-webkit-transform:scale(.7);transform:scale(.7)}45%{-webkit-transform:scale(1.05);transform:scale(1.05)}80%{-webkit-transform:scale(.95);transform:scale(.95)}100%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes swal2-show{0%{-webkit-transform:scale(.7);transform:scale(.7)}45%{-webkit-transform:scale(1.05);transform:scale(1.05)}80%{-webkit-transform:scale(.95);transform:scale(.95)}100%{-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes swal2-hide{0%{-webkit-transform:scale(1);transform:scale(1);opacity:1}100%{-webkit-transform:scale(.5);transform:scale(.5);opacity:0}}@keyframes swal2-hide{0%{-webkit-transform:scale(1);transform:scale(1);opacity:1}100%{-webkit-transform:scale(.5);transform:scale(.5);opacity:0}}@-webkit-keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.875em;width:1.5625em}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.875em;width:1.5625em}}@-webkit-keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@-webkit-keyframes swal2-rotate-success-circular-line{0%{-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}5%{-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}12%{-webkit-transform:rotate(-405deg);transform:rotate(-405deg)}100%{-webkit-transform:rotate(-405deg);transform:rotate(-405deg)}}@keyframes swal2-rotate-success-circular-line{0%{-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}5%{-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}12%{-webkit-transform:rotate(-405deg);transform:rotate(-405deg)}100%{-webkit-transform:rotate(-405deg);transform:rotate(-405deg)}}@-webkit-keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;-webkit-transform:scale(.4);transform:scale(.4);opacity:0}50%{margin-top:1.625em;-webkit-transform:scale(.4);transform:scale(.4);opacity:0}80%{margin-top:-.375em;-webkit-transform:scale(1.15);transform:scale(1.15)}100%{margin-top:0;-webkit-transform:scale(1);transform:scale(1);opacity:1}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;-webkit-transform:scale(.4);transform:scale(.4);opacity:0}50%{margin-top:1.625em;-webkit-transform:scale(.4);transform:scale(.4);opacity:0}80%{margin-top:-.375em;-webkit-transform:scale(1.15);transform:scale(1.15)}100%{margin-top:0;-webkit-transform:scale(1);transform:scale(1);opacity:1}}@-webkit-keyframes swal2-animate-error-icon{0%{-webkit-transform:rotateX(100deg);transform:rotateX(100deg);opacity:0}100%{-webkit-transform:rotateX(0);transform:rotateX(0);opacity:1}}@keyframes swal2-animate-error-icon{0%{-webkit-transform:rotateX(100deg);transform:rotateX(100deg);opacity:0}100%{-webkit-transform:rotateX(0);transform:rotateX(0);opacity:1}}body.swal2-toast-shown .swal2-container{position:fixed;background-color:transparent}body.swal2-toast-shown .swal2-container.swal2-shown{background-color:transparent}body.swal2-toast-shown .swal2-container.swal2-top{top:0;right:auto;bottom:auto;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{top:0;right:0;bottom:auto;left:auto}body.swal2-toast-shown .swal2-container.swal2-top-left,body.swal2-toast-shown .swal2-container.swal2-top-start{top:0;right:auto;bottom:auto;left:0}body.swal2-toast-shown .swal2-container.swal2-center-left,body.swal2-toast-shown .swal2-container.swal2-center-start{top:50%;right:auto;bottom:auto;left:0;-webkit-transform:translateY(-50%);transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{top:50%;right:auto;bottom:auto;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{top:50%;right:0;bottom:auto;left:auto;-webkit-transform:translateY(-50%);transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-left,body.swal2-toast-shown .swal2-container.swal2-bottom-start{top:auto;right:auto;bottom:0;left:0}body.swal2-toast-shown .swal2-container.swal2-bottom{top:auto;right:auto;bottom:0;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{top:auto;right:0;bottom:0;left:auto}body.swal2-toast-column .swal2-toast{flex-direction:column;align-items:stretch}body.swal2-toast-column .swal2-toast .swal2-actions{flex:1;align-self:stretch;height:2.2em;margin-top:.3125em}body.swal2-toast-column .swal2-toast .swal2-loading{justify-content:center}body.swal2-toast-column .swal2-toast .swal2-input{height:2em;margin:.3125em auto;font-size:1em}body.swal2-toast-column .swal2-toast .swal2-validationerror{font-size:1em}.swal2-popup.swal2-toast{flex-direction:row;align-items:center;width:auto;padding:.625em;box-shadow:0 0 .625em #d9d9d9;overflow-y:hidden}.swal2-popup.swal2-toast .swal2-header{flex-direction:row}.swal2-popup.swal2-toast .swal2-title{flex-grow:1;justify-content:flex-start;margin:0 .6em;font-size:1em}.swal2-popup.swal2-toast .swal2-footer{margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-popup.swal2-toast .swal2-close{position:initial;width:.8em;height:.8em;line-height:.8}.swal2-popup.swal2-toast .swal2-content{justify-content:flex-start;font-size:1em}.swal2-popup.swal2-toast .swal2-icon{width:2em;min-width:2em;height:2em;margin:0}.swal2-popup.swal2-toast .swal2-icon-text{font-size:2em;font-weight:700;line-height:1em}.swal2-popup.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-popup.swal2-toast .swal2-actions{height:auto;margin:0 .3125em}.swal2-popup.swal2-toast .swal2-styled{margin:0 .3125em;padding:.3125em .625em;font-size:1em}.swal2-popup.swal2-toast .swal2-styled:focus{box-shadow:0 0 0 .0625em #fff,0 0 0 .125em rgba(50,100,150,.4)}.swal2-popup.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:2em;height:2.8125em;-webkit-transform:rotate(45deg);transform:rotate(45deg);border-radius:50%}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.25em;left:-.9375em;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);-webkit-transform-origin:2em 2em;transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-.25em;left:.9375em;-webkit-transform-origin:0 2em;transform-origin:0 2em;border-radius:0 4em 4em 0}.swal2-popup.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}.swal2-popup.swal2-toast.swal2-show{-webkit-animation:showSweetToast .5s;animation:showSweetToast .5s}.swal2-popup.swal2-toast.swal2-hide{-webkit-animation:hideSweetToast .2s forwards;animation:hideSweetToast .2s forwards}.swal2-popup.swal2-toast .swal2-animate-success-icon .swal2-success-line-tip{-webkit-animation:animate-toast-success-tip .75s;animation:animate-toast-success-tip .75s}.swal2-popup.swal2-toast .swal2-animate-success-icon .swal2-success-line-long{-webkit-animation:animate-toast-success-long .75s;animation:animate-toast-success-long .75s}@-webkit-keyframes showSweetToast{0%{-webkit-transform:translateY(-.625em) rotateZ(2deg);transform:translateY(-.625em) rotateZ(2deg);opacity:0}33%{-webkit-transform:translateY(0) rotateZ(-2deg);transform:translateY(0) rotateZ(-2deg);opacity:.5}66%{-webkit-transform:translateY(.3125em) rotateZ(2deg);transform:translateY(.3125em) rotateZ(2deg);opacity:.7}100%{-webkit-transform:translateY(0) rotateZ(0);transform:translateY(0) rotateZ(0);opacity:1}}@keyframes showSweetToast{0%{-webkit-transform:translateY(-.625em) rotateZ(2deg);transform:translateY(-.625em) rotateZ(2deg);opacity:0}33%{-webkit-transform:translateY(0) rotateZ(-2deg);transform:translateY(0) rotateZ(-2deg);opacity:.5}66%{-webkit-transform:translateY(.3125em) rotateZ(2deg);transform:translateY(.3125em) rotateZ(2deg);opacity:.7}100%{-webkit-transform:translateY(0) rotateZ(0);transform:translateY(0) rotateZ(0);opacity:1}}@-webkit-keyframes hideSweetToast{0%{opacity:1}33%{opacity:.5}100%{-webkit-transform:rotateZ(1deg);transform:rotateZ(1deg);opacity:0}}@keyframes hideSweetToast{0%{opacity:1}33%{opacity:.5}100%{-webkit-transform:rotateZ(1deg);transform:rotateZ(1deg);opacity:0}}@-webkit-keyframes animate-toast-success-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes animate-toast-success-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@-webkit-keyframes animate-toast-success-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@keyframes animate-toast-success-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow-y:hidden}body.swal2-height-auto{height:auto!important}body.swal2-no-backdrop .swal2-shown{top:auto;right:auto;bottom:auto;left:auto;background-color:transparent}body.swal2-no-backdrop .swal2-shown>.swal2-modal{box-shadow:0 0 10px rgba(0,0,0,.4)}body.swal2-no-backdrop .swal2-shown.swal2-top{top:0;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%)}body.swal2-no-backdrop .swal2-shown.swal2-top-left,body.swal2-no-backdrop .swal2-shown.swal2-top-start{top:0;left:0}body.swal2-no-backdrop .swal2-shown.swal2-top-end,body.swal2-no-backdrop .swal2-shown.swal2-top-right{top:0;right:0}body.swal2-no-backdrop .swal2-shown.swal2-center{top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}body.swal2-no-backdrop .swal2-shown.swal2-center-left,body.swal2-no-backdrop .swal2-shown.swal2-center-start{top:50%;left:0;-webkit-transform:translateY(-50%);transform:translateY(-50%)}body.swal2-no-backdrop .swal2-shown.swal2-center-end,body.swal2-no-backdrop .swal2-shown.swal2-center-right{top:50%;right:0;-webkit-transform:translateY(-50%);transform:translateY(-50%)}body.swal2-no-backdrop .swal2-shown.swal2-bottom{bottom:0;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%)}body.swal2-no-backdrop .swal2-shown.swal2-bottom-left,body.swal2-no-backdrop .swal2-shown.swal2-bottom-start{bottom:0;left:0}body.swal2-no-backdrop .swal2-shown.swal2-bottom-end,body.swal2-no-backdrop .swal2-shown.swal2-bottom-right{right:0;bottom:0}.swal2-container{display:flex;position:fixed;top:0;right:0;bottom:0;left:0;flex-direction:row;align-items:center;justify-content:center;padding:10px;background-color:transparent;z-index:1060;overflow-x:hidden;-webkit-overflow-scrolling:touch}.swal2-container.swal2-top{align-items:flex-start}.swal2-container.swal2-top-left,.swal2-container.swal2-top-start{align-items:flex-start;justify-content:flex-start}.swal2-container.swal2-top-end,.swal2-container.swal2-top-right{align-items:flex-start;justify-content:flex-end}.swal2-container.swal2-center{align-items:center}.swal2-container.swal2-center-left,.swal2-container.swal2-center-start{align-items:center;justify-content:flex-start}.swal2-container.swal2-center-end,.swal2-container.swal2-center-right{align-items:center;justify-content:flex-end}.swal2-container.swal2-bottom{align-items:flex-end}.swal2-container.swal2-bottom-left,.swal2-container.swal2-bottom-start{align-items:flex-end;justify-content:flex-start}.swal2-container.swal2-bottom-end,.swal2-container.swal2-bottom-right{align-items:flex-end;justify-content:flex-end}.swal2-container.swal2-grow-fullscreen>.swal2-modal{display:flex!important;flex:1;align-self:stretch;justify-content:center}.swal2-container.swal2-grow-row>.swal2-modal{display:flex!important;flex:1;align-content:center;justify-content:center}.swal2-container.swal2-grow-column{flex:1;flex-direction:column}.swal2-container.swal2-grow-column.swal2-bottom,.swal2-container.swal2-grow-column.swal2-center,.swal2-container.swal2-grow-column.swal2-top{align-items:center}.swal2-container.swal2-grow-column.swal2-bottom-left,.swal2-container.swal2-grow-column.swal2-bottom-start,.swal2-container.swal2-grow-column.swal2-center-left,.swal2-container.swal2-grow-column.swal2-center-start,.swal2-container.swal2-grow-column.swal2-top-left,.swal2-container.swal2-grow-column.swal2-top-start{align-items:flex-start}.swal2-container.swal2-grow-column.swal2-bottom-end,.swal2-container.swal2-grow-column.swal2-bottom-right,.swal2-container.swal2-grow-column.swal2-center-end,.swal2-container.swal2-grow-column.swal2-center-right,.swal2-container.swal2-grow-column.swal2-top-end,.swal2-container.swal2-grow-column.swal2-top-right{align-items:flex-end}.swal2-container.swal2-grow-column>.swal2-modal{display:flex!important;flex:1;align-content:center;justify-content:center}.swal2-container:not(.swal2-top):not(.swal2-top-start):not(.swal2-top-end):not(.swal2-top-left):not(.swal2-top-right):not(.swal2-center-start):not(.swal2-center-end):not(.swal2-center-left):not(.swal2-center-right):not(.swal2-bottom):not(.swal2-bottom-start):not(.swal2-bottom-end):not(.swal2-bottom-left):not(.swal2-bottom-right):not(.swal2-grow-fullscreen)>.swal2-modal{margin:auto}@media all and (-ms-high-contrast:none),(-ms-high-contrast:active){.swal2-container .swal2-modal{margin:0!important}}.swal2-container.swal2-fade{transition:background-color .1s}.swal2-container.swal2-shown{background-color:rgba(0,0,0,.4)}.swal2-popup{display:none;position:relative;flex-direction:column;justify-content:center;width:32em;max-width:100%;padding:1.25em;border-radius:.3125em;background:#fff;font-family:inherit;font-size:1rem;box-sizing:border-box}.swal2-popup:focus{outline:0}.swal2-popup.swal2-loading{overflow-y:hidden}.swal2-popup .swal2-header{display:flex;flex-direction:column;align-items:center}.swal2-popup .swal2-title{display:block;position:relative;max-width:100%;margin:0 0 .4em;padding:0;color:#595959;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;word-wrap:break-word}.swal2-popup .swal2-actions{flex-wrap:wrap;align-items:center;justify-content:center;margin:1.25em auto 0;z-index:1}.swal2-popup .swal2-actions:not(.swal2-loading) .swal2-styled[disabled]{opacity:.4}.swal2-popup .swal2-actions:not(.swal2-loading) .swal2-styled:hover{background-image:linear-gradient(rgba(0,0,0,.1),rgba(0,0,0,.1))}.swal2-popup .swal2-actions:not(.swal2-loading) .swal2-styled:active{background-image:linear-gradient(rgba(0,0,0,.2),rgba(0,0,0,.2))}.swal2-popup .swal2-actions.swal2-loading .swal2-styled.swal2-confirm{width:2.5em;height:2.5em;margin:.46875em;padding:0;border:.25em solid transparent;border-radius:100%;border-color:transparent;background-color:transparent!important;color:transparent;cursor:default;box-sizing:border-box;-webkit-animation:swal2-rotate-loading 1.5s linear 0s infinite normal;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.swal2-popup .swal2-actions.swal2-loading .swal2-styled.swal2-cancel{margin-right:30px;margin-left:30px}.swal2-popup .swal2-actions.swal2-loading :not(.swal2-styled).swal2-confirm::after{display:inline-block;width:15px;height:15px;margin-left:5px;border:3px solid #999;border-radius:50%;border-right-color:transparent;box-shadow:1px 1px 1px #fff;content:'';-webkit-animation:swal2-rotate-loading 1.5s linear 0s infinite normal;animation:swal2-rotate-loading 1.5s linear 0s infinite normal}.swal2-popup .swal2-styled{margin:.3125em;padding:.625em 2em;font-weight:500;box-shadow:none}.swal2-popup .swal2-styled:not([disabled]){cursor:pointer}.swal2-popup .swal2-styled.swal2-confirm{border:0;border-radius:.25em;background:initial;background-color:#3085d6;color:#fff;font-size:1.0625em}.swal2-popup .swal2-styled.swal2-cancel{border:0;border-radius:.25em;background:initial;background-color:#aaa;color:#fff;font-size:1.0625em}.swal2-popup .swal2-styled:focus{outline:0;box-shadow:0 0 0 2px #fff,0 0 0 4px rgba(50,100,150,.4)}.swal2-popup .swal2-styled::-moz-focus-inner{border:0}.swal2-popup .swal2-footer{justify-content:center;margin:1.25em 0 0;padding:1em 0 0;border-top:1px solid #eee;color:#545454;font-size:1em}.swal2-popup .swal2-image{max-width:100%;margin:1.25em auto}.swal2-popup .swal2-close{position:absolute;top:0;right:0;justify-content:center;width:1.2em;height:1.2em;padding:0;transition:color .1s ease-out;border:none;border-radius:0;background:0 0;color:#ccc;font-family:serif;font-size:2.5em;line-height:1.2;cursor:pointer;overflow:hidden}.swal2-popup .swal2-close:hover{-webkit-transform:none;transform:none;color:#f27474}.swal2-popup>.swal2-checkbox,.swal2-popup>.swal2-file,.swal2-popup>.swal2-input,.swal2-popup>.swal2-radio,.swal2-popup>.swal2-select,.swal2-popup>.swal2-textarea{display:none}.swal2-popup .swal2-content{justify-content:center;margin:0;padding:0;color:#545454;font-size:1.125em;font-weight:300;line-height:normal;z-index:1;word-wrap:break-word}.swal2-popup #swal2-content{text-align:center}.swal2-popup .swal2-checkbox,.swal2-popup .swal2-file,.swal2-popup .swal2-input,.swal2-popup .swal2-radio,.swal2-popup .swal2-select,.swal2-popup .swal2-textarea{margin:1em auto}.swal2-popup .swal2-file,.swal2-popup .swal2-input,.swal2-popup .swal2-textarea{width:100%;transition:border-color .3s,box-shadow .3s;border:1px solid #d9d9d9;border-radius:.1875em;font-size:1.125em;box-shadow:inset 0 1px 1px rgba(0,0,0,.06);box-sizing:border-box}.swal2-popup .swal2-file.swal2-inputerror,.swal2-popup .swal2-input.swal2-inputerror,.swal2-popup .swal2-textarea.swal2-inputerror{border-color:#f27474!important;box-shadow:0 0 2px #f27474!important}.swal2-popup .swal2-file:focus,.swal2-popup .swal2-input:focus,.swal2-popup .swal2-textarea:focus{border:1px solid #b4dbed;outline:0;box-shadow:0 0 3px #c4e6f5}.swal2-popup .swal2-file::-webkit-input-placeholder,.swal2-popup .swal2-input::-webkit-input-placeholder,.swal2-popup .swal2-textarea::-webkit-input-placeholder{color:#ccc}.swal2-popup .swal2-file:-ms-input-placeholder,.swal2-popup .swal2-input:-ms-input-placeholder,.swal2-popup .swal2-textarea:-ms-input-placeholder{color:#ccc}.swal2-popup .swal2-file::-ms-input-placeholder,.swal2-popup .swal2-input::-ms-input-placeholder,.swal2-popup .swal2-textarea::-ms-input-placeholder{color:#ccc}.swal2-popup .swal2-file::placeholder,.swal2-popup .swal2-input::placeholder,.swal2-popup .swal2-textarea::placeholder{color:#ccc}.swal2-popup .swal2-range input{width:80%}.swal2-popup .swal2-range output{width:20%;font-weight:600;text-align:center}.swal2-popup .swal2-range input,.swal2-popup .swal2-range output{height:2.625em;margin:1em auto;padding:0;font-size:1.125em;line-height:2.625em}.swal2-popup .swal2-input{height:2.625em;padding:0 .75em}.swal2-popup .swal2-input[type=number]{max-width:10em}.swal2-popup .swal2-file{font-size:1.125em}.swal2-popup .swal2-textarea{height:6.75em;padding:.75em}.swal2-popup .swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;color:#545454;font-size:1.125em}.swal2-popup .swal2-checkbox,.swal2-popup .swal2-radio{align-items:center;justify-content:center}.swal2-popup .swal2-checkbox label,.swal2-popup .swal2-radio label{margin:0 .6em;font-size:1.125em}.swal2-popup .swal2-checkbox input,.swal2-popup .swal2-radio input{margin:0 .4em}.swal2-popup .swal2-validationerror{display:none;align-items:center;justify-content:center;padding:.625em;background:#f0f0f0;color:#666;font-size:1em;font-weight:300;overflow:hidden}.swal2-popup .swal2-validationerror::before{display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center;content:'!';zoom:normal}@supports (-ms-accelerator:true){.swal2-range input{width:100%!important}.swal2-range output{display:none}}@media all and (-ms-high-contrast:none),(-ms-high-contrast:active){.swal2-range input{width:100%!important}.swal2-range output{display:none}}@-moz-document url-prefix(){.swal2-close:focus{outline:2px solid rgba(50,100,150,.4)}}.swal2-icon{position:relative;justify-content:center;width:5em;height:5em;margin:1.25em auto 1.875em;border:.25em solid transparent;border-radius:50%;line-height:5em;cursor:default;box-sizing:content-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;zoom:normal}.swal2-icon-text{font-size:3.75em}.swal2-icon.swal2-error{border-color:#f27474}.swal2-icon.swal2-error .swal2-x-mark{position:relative;flex-grow:1}.swal2-icon.swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;-webkit-transform:rotate(45deg);transform:rotate(45deg)}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}.swal2-icon.swal2-warning{border-color:#facea8;color:#f8bb86}.swal2-icon.swal2-info{border-color:#9de0f6;color:#3fc3ee}.swal2-icon.swal2-question{border-color:#c9dae1;color:#87adbd}.swal2-icon.swal2-success{border-color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;-webkit-transform:rotate(45deg);transform:rotate(45deg);border-radius:50%}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.4375em;left:-2.0635em;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);-webkit-transform-origin:3.75em 3.75em;transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=right]{top:-.6875em;left:1.875em;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);-webkit-transform-origin:0 3.75em;transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}.swal2-icon.swal2-success .swal2-success-ring{position:absolute;top:-.25em;left:-.25em;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%;z-index:2;box-sizing:content-box}.swal2-icon.swal2-success .swal2-success-fix{position:absolute;top:.5em;left:1.625em;width:.4375em;height:5.625em;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);z-index:1}.swal2-icon.swal2-success [class^=swal2-success-line]{display:block;position:absolute;height:.3125em;border-radius:.125em;background-color:#a5dc86;z-index:2}.swal2-icon.swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.875em;width:1.5625em;-webkit-transform:rotate(45deg);transform:rotate(45deg)}.swal2-icon.swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}.swal2-progresssteps{align-items:center;margin:0 0 1.25em;padding:0;font-weight:600}.swal2-progresssteps li{display:inline-block;position:relative}.swal2-progresssteps .swal2-progresscircle{width:2em;height:2em;border-radius:2em;background:#3085d6;color:#fff;line-height:2em;text-align:center;z-index:20}.swal2-progresssteps .swal2-progresscircle:first-child{margin-left:0}.swal2-progresssteps .swal2-progresscircle:last-child{margin-right:0}.swal2-progresssteps .swal2-progresscircle.swal2-activeprogressstep{background:#3085d6}.swal2-progresssteps .swal2-progresscircle.swal2-activeprogressstep~.swal2-progresscircle{background:#add8e6}.swal2-progresssteps .swal2-progresscircle.swal2-activeprogressstep~.swal2-progressline{background:#add8e6}.swal2-progresssteps .swal2-progressline{width:2.5em;height:.4em;margin:0 -1px;background:#3085d6;z-index:10}[class^=swal2]{-webkit-tap-highlight-color:transparent}.swal2-show{-webkit-animation:swal2-show .3s;animation:swal2-show .3s}.swal2-show.swal2-noanimation{-webkit-animation:none;animation:none}.swal2-hide{-webkit-animation:swal2-hide .15s forwards;animation:swal2-hide .15s forwards}.swal2-hide.swal2-noanimation{-webkit-animation:none;animation:none}[dir=rtl] .swal2-close{right:auto;left:0}.swal2-animate-success-icon .swal2-success-line-tip{-webkit-animation:swal2-animate-success-line-tip .75s;animation:swal2-animate-success-line-tip .75s}.swal2-animate-success-icon .swal2-success-line-long{-webkit-animation:swal2-animate-success-line-long .75s;animation:swal2-animate-success-line-long .75s}.swal2-animate-success-icon .swal2-success-circular-line-right{-webkit-animation:swal2-rotate-success-circular-line 4.25s ease-in;animation:swal2-rotate-success-circular-line 4.25s ease-in}.swal2-animate-error-icon{-webkit-animation:swal2-animate-error-icon .5s;animation:swal2-animate-error-icon .5s}.swal2-animate-error-icon .swal2-x-mark{-webkit-animation:swal2-animate-error-x-mark .5s;animation:swal2-animate-error-x-mark .5s}@-webkit-keyframes swal2-rotate-loading{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes swal2-rotate-loading{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}"));
(function($){'use strict';$.fn.serializeFormJSON=function(){var o={},a=this.serializeArray();$.each(a,function(){if(o[this.name]){if(!o[this.name].push){o[this.name]=[o[this.name]];}
o[this.name].push(this.value||'');}else{o[this.name]=this.value||'';}});return o;};$(document).ready(function(){if(!$.fn.goTo){$.fn.goTo=function(){$('html, body').animate({scrollTop:$(this).offset().top-100+'px'},'slow');return this;}}
$.fn.aysModal=function(action){var $this=$(this);switch(action){case'hide':$(this).find('.ays-modal-content').css('animation-name','zoomOut');setTimeout(function(){$(document.body).removeClass('modal-open');$(document).find('.ays-modal-backdrop').remove();$this.hide();},250);break;case'show':default:$this.show();$(this).find('.ays-modal-content').css('animation-name','zoomIn');$(document).find('.modal-backdrop').remove();$(document.body).append('<div class="ays-modal-backdrop"></div>');$(document.body).addClass('modal-open');break;}}
if(!String.prototype.trim){(function(){String.prototype.trim=function(){return this.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,'');};})();}});})(jQuery);