jQuery(document).ready(function($){
var formSeedConfirm=$("#seed-confirm-form");
inputName=$("#seed-confirm-name");
inputContact=$("#seed-confirm-contact");
inputOrder=$("#seed-confirm-order");
inputAmount=$("#seed-confirm-amount");
inputAccountNumber=$("input[name=seed-confirm-account-number]");
inputDate=$("#seed-confirm-date");
inputSlip=$("#seed-confirm-slip");
buttonSubmit=$("#seed-confirm-btn-submit");
var optionOrderSelected=$("#seed-confirm-order option:selected");
$orderAmountIndexStart=optionOrderSelected.text().lastIndexOf(":");
$orderAmountIndexEnd=optionOrderSelected
.text()
.indexOf(" ", $orderAmountIndexStart + 2);
newAmount=optionOrderSelected
.text()
.substring($orderAmountIndexStart + 2, $orderAmountIndexEnd);
inputAmount.val(newAmount);
inputOrder.on("change", function(){
var optionOrderSelected=$("#seed-confirm-order option:selected");
$orderAmountIndexStart=optionOrderSelected.text().lastIndexOf(":");
$orderAmountIndexEnd=optionOrderSelected
.text()
.indexOf(" ", $orderAmountIndexStart + 2);
newAmount=optionOrderSelected
.text()
.substring($orderAmountIndexStart + 2, $orderAmountIndexEnd);
inputAmount.val(newAmount);
});
buttonSubmit.on("click", function(event){
var hasError=false;
if(inputName.hasClass("required")&&$.trim(inputName.val())==""){
inputName.addClass("-invalid");
hasError=true;
}else{
inputName.removeClass("-invalid");
}
if(inputContact.hasClass("required") &&
$.trim(inputContact.val())==""
){
inputContact.addClass("-invalid");
hasError=true;
}else{
inputContact.removeClass("-invalid");
}
if(inputOrder.hasClass("required")&&$.trim(inputOrder.val())==""){
inputOrder.addClass("-invalid");
hasError=true;
}else{
inputOrder.removeClass("-invalid");
}
if(inputAmount.hasClass("required")&&$.trim(inputAmount.val())==""){
inputAmount.addClass("-invalid");
hasError=true;
}else{
inputAmount.removeClass("-invalid");
}
if(inputAccountNumber.hasClass("required")){
hasError=true;
inputAccountNumber.addClass("-invalid");
inputAccountNumber.each(function(){
if($(this).prop("checked")==true){
hasError=false;
inputAccountNumber.removeClass("-invalid");
}});
}
if(inputDate.hasClass("required")&&$.trim(inputDate.val())==""){
inputDate.addClass("-invalid");
hasError=true;
}else{
inputDate.removeClass("-invalid");
}
if(inputSlip.hasClass("required")&&$.trim(inputSlip.val())==""){
inputSlip.addClass("-invalid");
hasError=true;
}else{
inputSlip.removeClass("-invalid");
}
if(hasError){
$(window).scrollTop($("#seed-confirm-form").offset().top);
return;
}else{
formSeedConfirm.submit();
}});
$.validate({
borderColorOnError: "#c00",
modules: "file"
});
if($("html").attr("lang")=="th"&&$("#seed-confirm-form").length!=0){
$.datepicker.regional["th"]={
closeText: "ปิด",
prevText: "&#xAB;&#xA0;ย้อน",
nextText: "ถัดไป&#xA0;&#xBB;",
currentText: "วันนี้",
monthNames: [
"มกราคม",
"กุมภาพันธ์",
"มีนาคม",
"เมษายน",
"พฤษภาคม",
"มิถุนายน",
"กรกฎาคม",
"สิงหาคม",
"กันยายน",
"ตุลาคม",
"พฤศจิกายน",
"ธันวาคม"
],
monthNamesShort: [
"ม.ค.",
"ก.พ.",
"มี.ค.",
"เม.ย.",
"พ.ค.",
"มิ.ย.",
"ก.ค.",
"ส.ค.",
"ก.ย.",
"ต.ค.",
"พ.ย.",
"ธ.ค."
],
dayNames: [
"อาทิตย์",
"จันทร์",
"อังคาร",
"พุธ",
"พฤหัสบดี",
"ศุกร์",
"เสาร์"
],
dayNamesShort: ["อา.", "จ.", "อ.", "พ.", "พฤ.", "ศ.", "ส."],
dayNamesMin: ["อา.", "จ.", "อ.", "พ.", "พฤ.", "ศ.", "ส."],
weekHeader: "Wk",
dateFormat: "dd-mm-yy",
firstDay: 0,
isRTL: false,
showMonthAfterYear: false,
yearSuffix: ""
};
$.datepicker.setDefaults($.datepicker.regional["th"]);
}
$("#seed-confirm-date").datepicker({
dateFormat: "dd-mm-yy",
maxDate: new Date()
});
});
!function(o){"object"==typeof module&&"object"==typeof module.exports?o(require("jquery"),window,document):o(jQuery,window,document)}(function(o,t,i,e){var s=[],l=function(){return s.length?s[s.length-1]:null},n=function(){var o,t=!1;for(o=s.length-1;o>=0;o--)s[o].$blocker&&(s[o].$blocker.toggleClass("current",!t).toggleClass("behind",t),t=!0)};o.modal=function(t,i){var e,n;if(this.$body=o("body"),this.options=o.extend({},o.modal.defaults,i),this.options.doFade=!isNaN(parseInt(this.options.fadeDuration,10)),this.$blocker=null,this.options.closeExisting)for(;o.modal.isActive();)o.modal.close();if(s.push(this),t.is("a"))if(n=t.attr("href"),this.anchor=t,/^#/.test(n)){if(this.$elm=o(n),1!==this.$elm.length)return null;this.$body.append(this.$elm),this.open()}else this.$elm=o("<div>"),this.$body.append(this.$elm),e=function(o,t){t.elm.remove()},this.showSpinner(),t.trigger(o.modal.AJAX_SEND),o.get(n).done(function(i){if(o.modal.isActive()){t.trigger(o.modal.AJAX_SUCCESS);var s=l();s.$elm.empty().append(i).on(o.modal.CLOSE,e),s.hideSpinner(),s.open(),t.trigger(o.modal.AJAX_COMPLETE)}}).fail(function(){t.trigger(o.modal.AJAX_FAIL);var i=l();i.hideSpinner(),s.pop(),t.trigger(o.modal.AJAX_COMPLETE)});else this.$elm=t,this.anchor=t,this.$body.append(this.$elm),this.open()},o.modal.prototype={constructor:o.modal,open:function(){var t=this;this.block(),this.anchor.blur(),this.options.doFade?setTimeout(function(){t.show()},this.options.fadeDuration*this.options.fadeDelay):this.show(),o(i).off("keydown.modal").on("keydown.modal",function(o){var t=l();27===o.which&&t.options.escapeClose&&t.close()}),this.options.clickClose&&this.$blocker.click(function(t){t.target===this&&o.modal.close()})},close:function(){s.pop(),this.unblock(),this.hide(),o.modal.isActive()||o(i).off("keydown.modal")},block:function(){this.$elm.trigger(o.modal.BEFORE_BLOCK,[this._ctx()]),this.$body.css("overflow","hidden"),this.$blocker=o('<div class="'+this.options.blockerClass+' blocker current"></div>').appendTo(this.$body),n(),this.options.doFade&&this.$blocker.css("opacity",0).animate({opacity:1},this.options.fadeDuration),this.$elm.trigger(o.modal.BLOCK,[this._ctx()])},unblock:function(t){!t&&this.options.doFade?this.$blocker.fadeOut(this.options.fadeDuration,this.unblock.bind(this,!0)):(this.$blocker.children().appendTo(this.$body),this.$blocker.remove(),this.$blocker=null,n(),o.modal.isActive()||this.$body.css("overflow",""))},show:function(){this.$elm.trigger(o.modal.BEFORE_OPEN,[this._ctx()]),this.options.showClose&&(this.closeButton=o('<a href="#close-modal" rel="modal:close" class="close-modal '+this.options.closeClass+'">'+this.options.closeText+"</a>"),this.$elm.append(this.closeButton)),this.$elm.addClass(this.options.modalClass).appendTo(this.$blocker),this.options.doFade?this.$elm.css({opacity:0,display:"inline-block"}).animate({opacity:1},this.options.fadeDuration):this.$elm.css("display","inline-block"),this.$elm.trigger(o.modal.OPEN,[this._ctx()])},hide:function(){this.$elm.trigger(o.modal.BEFORE_CLOSE,[this._ctx()]),this.closeButton&&this.closeButton.remove();var t=this;this.options.doFade?this.$elm.fadeOut(this.options.fadeDuration,function(){t.$elm.trigger(o.modal.AFTER_CLOSE,[t._ctx()])}):this.$elm.hide(0,function(){t.$elm.trigger(o.modal.AFTER_CLOSE,[t._ctx()])}),this.$elm.trigger(o.modal.CLOSE,[this._ctx()])},showSpinner:function(){this.options.showSpinner&&(this.spinner=this.spinner||o('<div class="'+this.options.modalClass+'-spinner"></div>').append(this.options.spinnerHtml),this.$body.append(this.spinner),this.spinner.show())},hideSpinner:function(){this.spinner&&this.spinner.remove()},_ctx:function(){return{elm:this.$elm,$elm:this.$elm,$blocker:this.$blocker,options:this.options}}},o.modal.close=function(t){if(o.modal.isActive()){t&&t.preventDefault();var i=l();return i.close(),i.$elm}},o.modal.isActive=function(){return s.length>0},o.modal.getCurrent=l,o.modal.defaults={closeExisting:!0,escapeClose:!0,clickClose:!0,closeText:"Close",closeClass:"",modalClass:"modal",blockerClass:"jquery-modal",spinnerHtml:'<div class="rect1"></div><div class="rect2"></div><div class="rect3"></div><div class="rect4"></div>',showSpinner:!0,showClose:!0,fadeDuration:null,fadeDelay:1},o.modal.BEFORE_BLOCK="modal:before-block",o.modal.BLOCK="modal:block",o.modal.BEFORE_OPEN="modal:before-open",o.modal.OPEN="modal:open",o.modal.BEFORE_CLOSE="modal:before-close",o.modal.CLOSE="modal:close",o.modal.AFTER_CLOSE="modal:after-close",o.modal.AJAX_SEND="modal:ajax:send",o.modal.AJAX_SUCCESS="modal:ajax:success",o.modal.AJAX_FAIL="modal:ajax:fail",o.modal.AJAX_COMPLETE="modal:ajax:complete",o.fn.modal=function(t){return 1===this.length&&new o.modal(this,t),this},o(i).on("click.modal",'a[rel~="modal:close"]',o.modal.close),o(i).on("click.modal",'a[rel~="modal:open"]',function(t){t.preventDefault(),o(this).modal()})});
!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof module&&module.exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){!function(a,b,c){function d(a,b){this.$form=a,this.$input=b,this.reset(),b.on("change paste",this.reset.bind(this))}var e=function(){return!1},f=null,g={numHalted:0,haltValidation:function(b){this.numHalted++,a.formUtils.haltValidation=!0,b.unbind("submit",e).bind("submit",e).find('*[type="submit"]').addClass("disabled").attr("disabled","disabled")},unHaltValidation:function(b){this.numHalted--,0===this.numHalted&&(a.formUtils.haltValidation=!1,b.unbind("submit",e).find('*[type="submit"]').removeClass("disabled").removeAttr("disabled","disabled"))}};d.prototype.reset=function(){this.haltedFormValidation=!1,this.hasRun=!1,this.isRunning=!1,this.result=c},d.prototype.run=function(a,b){return"keyup"===a?null:this.isRunning?(f=a,this.haltedFormValidation||(g.haltValidation(),this.haltedFormValidation=!0),null):this.hasRun?this.result:(f=a,g.haltValidation(this.$form),this.haltedFormValidation=!0,this.isRunning=!0,this.$input.attr("disabled","disabled").addClass("async-validation"),this.$form.addClass("async-validation"),b(function(a){this.done(a)}.bind(this)),null)},d.prototype.done=function(a){this.result=a,this.hasRun=!0,this.isRunning=!1,this.$input.removeAttr("disabled").removeClass("async-validation"),this.$form.removeClass("async-validation"),this.haltedFormValidation&&(g.unHaltValidation(this.$form),"submit"===f?this.$form.trigger("submit"):this.$input.trigger("validation.revalidate"))},d.loadInstance=function(a,b,c){var e,f=b.get(0);return f.asyncValidators||(f.asyncValidators={}),f.asyncValidators[a]?e=f.asyncValidators[a]:(e=new d(c,b),f.asyncValidators[a]=e),e},a.formUtils=a.extend(a.formUtils||{},{asyncValidation:function(a,b,c){return this.warn("Use of deprecated function $.formUtils.asyncValidation, use $.formUtils.addAsyncValidator() instead"),d.loadInstance(a,b,c)},addAsyncValidator:function(b){var c=a.extend({},b),e=c.validatorFunction;c.async=!0,c.validatorFunction=function(a,b,f,g,h,i){var j=d.loadInstance(this.name,b,h);return j.run(i,function(d){e.apply(c,[d,a,b,f,g,h,i])})},this.addValidator(c)}}),a(b).bind("validatorsLoaded formValidationSetup",function(b,c){c||(c=a("form")),c.find("[data-validation]").each(function(){var b=a(this);b.valAttr("async",!1),a.each(a.split(b.attr("data-validation")),function(c,d){var e=a.formUtils.validators["validate_"+d];e&&e.async&&b.valAttr("async","yes")})})})}(a,window),function(a,b){"use strict";function c(b){b&&"custom"===b.errorMessagePosition&&"function"==typeof b.errorMessageCustom&&(a.formUtils.warn("Use of deprecated function errorMessageCustom, use config.submitErrorMessageCallback instead"),b.submitErrorMessageCallback=function(a,c){b.errorMessageCustom(a,b.language.errorTitle,c,b)})}function d(b){if(b.errorMessagePosition&&"object"==typeof b.errorMessagePosition){a.formUtils.warn("Deprecated use of config parameter errorMessagePosition, use config.submitErrorMessageCallback instead");var c=b.errorMessagePosition;b.errorMessagePosition="top",b.submitErrorMessageCallback=function(){return c}}}function e(b){var c=b.find("[data-validation-if-checked]");c.length&&a.formUtils.warn('Detected use of attribute "data-validation-if-checked" which is deprecated. Use "data-validation-depends-on" provided by module "logic"'),c.on("beforeValidation",function(){var c=a(this),d=c.valAttr("if-checked"),e=a('input[name="'+d+'"]',b),f=e.is(":checked"),g=(a.formUtils.getValue(e)||"").toString(),h=c.valAttr("if-checked-value");(!f||h&&h!==g)&&c.valAttr("skipped",!0)})}function f(b){var c={se:"sv",cz:"cs",dk:"da"};if(b.lang in c){var d=c[b.lang];a.formUtils.warn('Deprecated use of lang code "'+b.lang+'" use "'+d+'" instead'),b.lang=d}}a.fn.validateForm=function(b,c){return a.formUtils.warn("Use of deprecated function $.validateForm, use $.isValid instead"),this.isValid(b,c,!0)},a(window).on("formValidationPluginInit",function(a,b){f(b),c(b),d(b)}).on("validatorsLoaded formValidationSetup",function(b,c){c||(c=a("form")),e(c)})}(a),function(a){"use strict";var b={resolveErrorMessage:function(a,b,c,d,e){var f=d.validationErrorMsgAttribute+"-"+c.replace("validate_",""),g=a.attr(f);return g||(g=a.attr(d.validationErrorMsgAttribute),g||(g="function"!=typeof b.errorMessageKey?e[b.errorMessageKey]:e[b.errorMessageKey(d)],g||(g=b.errorMessage))),g},getParentContainer:function(b){if(b.valAttr("error-msg-container"))return a(b.valAttr("error-msg-container"));var c=b.parent();return"checkbox"===b.attr("type")&&b.closest(".checkbox").length?c=b.closest(".checkbox").parent():"radio"===b.attr("type")&&b.closest(".radio").length&&(c=b.closest(".radio").parent()),c.closest(".input-group").length&&(c=c.closest(".input-group").parent()),c},applyInputErrorStyling:function(a,b){a.addClass(b.errorElementClass).removeClass(b.successElementClass),this.getParentContainer(a).addClass(b.inputParentClassOnError).removeClass(b.inputParentClassOnSuccess),""!==b.borderColorOnError&&a.css("border-color",b.borderColorOnError)},applyInputSuccessStyling:function(a,b){a.addClass(b.successElementClass),this.getParentContainer(a).addClass(b.inputParentClassOnSuccess)},removeInputStylingAndMessage:function(a,c){a.removeClass(c.successElementClass).removeClass(c.errorElementClass).css("border-color","");var d=b.getParentContainer(a);if(d.removeClass(c.inputParentClassOnError).removeClass(c.inputParentClassOnSuccess),"function"==typeof c.inlineErrorMessageCallback){var e=c.inlineErrorMessageCallback(a,!1,c);e&&e.html("")}else d.find("."+c.errorMessageClass).remove()},removeAllMessagesAndStyling:function(c,d){if("function"==typeof d.submitErrorMessageCallback){var e=d.submitErrorMessageCallback(c,!1,d);e&&e.html("")}else c.find("."+d.errorMessageClass+".alert").remove();c.find("."+d.errorElementClass+",."+d.successElementClass).each(function(){b.removeInputStylingAndMessage(a(this),d)})},setInlineMessage:function(b,c,d){this.applyInputErrorStyling(b,d);var e,f=document.getElementById(b.attr("name")+"_err_msg"),g=!1,h=function(d){a.formUtils.$win.trigger("validationErrorDisplay",[b,d]),d.html(c)},i=function(){var f=!1;g.find("."+d.errorMessageClass).each(function(){if(this.inputReferer===b[0])return f=a(this),!1}),f?c?h(f):f.remove():""!==c&&(e=a('<div class="'+d.errorMessageClass+' alert"></div>'),h(e),e[0].inputReferer=b[0],g.prepend(e))};if(f)a.formUtils.warn("Using deprecated element reference "+f.id),g=a(f),i();else if("function"==typeof d.inlineErrorMessageCallback){if(g=d.inlineErrorMessageCallback(b,c,d),!g)return;i()}else{var j=this.getParentContainer(b);e=j.find("."+d.errorMessageClass+".help-block"),0===e.length&&(e=a("<span></span>").addClass("help-block").addClass(d.errorMessageClass),e.appendTo(j)),h(e)}},setMessageInTopOfForm:function(b,c,d,e){var f='<div class="{errorMessageClass} alert alert-danger"><strong>{errorTitle}</strong><ul>{fields}</ul></div>',g=!1;if("function"!=typeof d.submitErrorMessageCallback||(g=d.submitErrorMessageCallback(b,c,d))){var h={errorTitle:e.errorTitle,fields:"",errorMessageClass:d.errorMessageClass};a.each(c,function(a,b){h.fields+="<li>"+b+"</li>"}),a.each(h,function(a,b){f=f.replace("{"+a+"}",b)}),g?g.html(f):b.children().eq(0).before(a(f))}}};a.formUtils=a.extend(a.formUtils||{},{dialogs:b})}(a),function(a,b,c){"use strict";var d=0;a.fn.validateOnBlur=function(b,c){var d=this,e=this.find("*[data-validation]");return e.each(function(){var e=a(this);if(e.is("[type=radio]")){var f=d.find('[type=radio][name="'+e.attr("name")+'"]');f.bind("blur.validation",function(){e.validateInputOnBlur(b,c,!0,"blur")}),c.validateCheckboxRadioOnClick&&f.bind("click.validation",function(){e.validateInputOnBlur(b,c,!0,"click")})}}),e.bind("blur.validation",function(){a(this).validateInputOnBlur(b,c,!0,"blur")}),c.validateCheckboxRadioOnClick&&this.find("input[type=checkbox][data-validation],input[type=radio][data-validation]").bind("click.validation",function(){a(this).validateInputOnBlur(b,c,!0,"click")}),this},a.fn.validateOnEvent=function(b,c){if(0!==this.length){var d="FORM"===this[0].nodeName?this.find("*[data-validation-event]"):this;return d.each(function(){var d=a(this),e=d.valAttr("event");e&&d.unbind(e+".validation").bind(e+".validation",function(d){9!==(d||{}).keyCode&&a(this).validateInputOnBlur(b,c,!0,e)})}),this}},a.fn.showHelpOnFocus=function(b){return b||(b="data-validation-help"),this.find("textarea,input").each(function(){var c=a(this),e="jquery_form_help_"+ ++d,f=c.attr(b);c.removeClass("has-help-text").unbind("focus.help").unbind("blur.help"),f&&c.addClass("has-help-txt").bind("focus.help",function(){var b=c.parent().find("."+e);0===b.length&&(b=a("<span />").addClass(e).addClass("help").addClass("help-block").text(f).hide(),c.after(b)),b.fadeIn()}).bind("blur.help",function(){a(this).parent().find("."+e).fadeOut("slow")})}),this},a.fn.validate=function(b,c,d){var e=a.extend({},a.formUtils.LANG,d||{});this.each(function(){var d=a(this),f=d.closest("form").get(0)||{},g=f.validationConfig||a.formUtils.defaultConfig();d.one("validation",function(a,c){"function"==typeof b&&b(c,this,a)}),d.validateInputOnBlur(e,a.extend({},g,c||{}),!0)})},a.fn.willPostponeValidation=function(){return(this.valAttr("suggestion-nr")||this.valAttr("postpone")||this.hasClass("hasDatepicker"))&&!b.postponedValidation},a.fn.validateInputOnBlur=function(c,d,e,f){if(a.formUtils.eventType=f,this.willPostponeValidation()){var g=this,h=this.valAttr("postpone")||200;return b.postponedValidation=function(){g.validateInputOnBlur(c,d,e,f),b.postponedValidation=!1},setTimeout(function(){b.postponedValidation&&b.postponedValidation()},h),this}c=a.extend({},a.formUtils.LANG,c||{}),a.formUtils.dialogs.removeInputStylingAndMessage(this,d);var i=this,j=i.closest("form"),k=a.formUtils.validateInput(i,c,d,j,f),l=function(){i.validateInputOnBlur(c,d,!1,"blur.revalidated")};return"blur"===f&&i.unbind("validation.revalidate",l).one("validation.revalidate",l),e&&i.removeKeyUpValidation(),k.shouldChangeDisplay&&(k.isValid?a.formUtils.dialogs.applyInputSuccessStyling(i,d):a.formUtils.dialogs.setInlineMessage(i,k.errorMsg,d)),!k.isValid&&e&&i.validateOnKeyUp(c,d),this},a.fn.validateOnKeyUp=function(b,c){return this.each(function(){var d=a(this);d.valAttr("has-keyup-event")||d.valAttr("has-keyup-event","true").bind("keyup.validation",function(a){9!==a.keyCode&&d.validateInputOnBlur(b,c,!1,"keyup")})}),this},a.fn.removeKeyUpValidation=function(){return this.each(function(){a(this).valAttr("has-keyup-event",!1).unbind("keyup.validation")}),this},a.fn.valAttr=function(a,b){return b===c?this.attr("data-validation-"+a):b===!1||null===b?this.removeAttr("data-validation-"+a):(a=a.length>0?"-"+a:"",this.attr("data-validation"+a,b))},a.fn.isValid=function(b,c,d){if(a.formUtils.isLoadingModules){var e=this;return setTimeout(function(){e.isValid(b,c,d)},200),null}c=a.extend({},a.formUtils.defaultConfig(),c||{}),b=a.extend({},a.formUtils.LANG,b||{}),d=d!==!1,a.formUtils.errorDisplayPreventedWhenHalted&&(delete a.formUtils.errorDisplayPreventedWhenHalted,d=!1);var f=function(b,e){a.inArray(b,h)<0&&h.push(b),i.push(e),e.valAttr("current-error",b),d&&a.formUtils.dialogs.applyInputErrorStyling(e,c)},g=[],h=[],i=[],j=this,k=function(b,d){return"submit"===d||"button"===d||"reset"===d||a.inArray(b,c.ignore||[])>-1};if(d&&a.formUtils.dialogs.removeAllMessagesAndStyling(j,c),j.find("input,textarea,select").filter(':not([type="submit"],[type="button"])').each(function(){var d=a(this),e=d.attr("type"),h="radio"===e||"checkbox"===e,i=d.attr("name");if(!k(i,e)&&(!h||a.inArray(i,g)<0)){h&&g.push(i);var l=a.formUtils.validateInput(d,b,c,j,"submit");l.isValid?l.isValid&&l.shouldChangeDisplay&&(d.valAttr("current-error",!1),a.formUtils.dialogs.applyInputSuccessStyling(d,c)):f(l.errorMsg,d)}}),"function"==typeof c.onValidate){var l=c.onValidate(j);a.isArray(l)?a.each(l,function(a,b){f(b.message,b.element)}):l&&l.element&&l.message&&f(l.message,l.element)}return a.formUtils.isValidatingEntireForm=!1,i.length>0&&d&&("top"===c.errorMessagePosition?a.formUtils.dialogs.setMessageInTopOfForm(j,h,c,b):a.each(i,function(b,d){a.formUtils.dialogs.setInlineMessage(d,d.valAttr("current-error"),c)}),c.scrollToTopOnError&&a.formUtils.$win.scrollTop(j.offset().top-20)),!d&&a.formUtils.haltValidation&&(a.formUtils.errorDisplayPreventedWhenHalted=!0),0===i.length&&!a.formUtils.haltValidation},a.fn.restrictLength=function(b){return new a.formUtils.lengthRestriction(this,b),this},a.fn.addSuggestions=function(b){var c=!1;return this.find("input").each(function(){var d=a(this);c=a.split(d.attr("data-suggestions")),c.length>0&&!d.hasClass("has-suggestions")&&(a.formUtils.suggest(d,c,b),d.addClass("has-suggestions"))}),this}}(a,window),function(a){"use strict";a.formUtils=a.extend(a.formUtils||{},{isLoadingModules:!1,loadedModules:{},registerLoadedModule:function(b){this.loadedModules[a.trim(b).toLowerCase()]=!0},hasLoadedModule:function(b){return a.trim(b).toLowerCase()in this.loadedModules},loadModules:function(b,c,d){if(a.formUtils.isLoadingModules)return void setTimeout(function(){a.formUtils.loadModules(b,c,d)},100);var e=function(b,c){var e=a.split(b),f=e.length,g=function(){f--,0===f&&(a.formUtils.isLoadingModules=!1,"function"==typeof d&&d())};f>0&&(a.formUtils.isLoadingModules=!0);var h="?_="+(new Date).getTime(),i=document.getElementsByTagName("head")[0]||document.getElementsByTagName("body")[0];a.each(e,function(b,d){if(d=a.trim(d),0===d.length||a.formUtils.hasLoadedModule(d))g();else{var e=c+d+(".js"===d.slice(-3)?"":".js"),f=document.createElement("SCRIPT");"function"==typeof define&&define.amd?require([e+(".dev.js"===e.slice(-7)?h:"")],g):(f.type="text/javascript",f.onload=g,f.src=e+(".dev.js"===e.slice(-7)?h:""),f.onerror=function(){a.formUtils.warn("Unable to load form validation module "+e,!0),g()},f.onreadystatechange=function(){"complete"!==this.readyState&&"loaded"!==this.readyState||(g(),this.onload=null,this.onreadystatechange=null)},i.appendChild(f))}})};if(c)e(b,c);else{var f=function(){var c=!1;return a('script[src*="form-validator"]').each(function(){var a=this.src.split("form-validator")[1].split("node_modules").length>1;if(!a)return c=this.src.substr(0,this.src.lastIndexOf("/"))+"/","/"===c&&(c=""),!1}),c!==!1&&(e(b,c),!0)};f()||a(function(){var a=f();a||"function"==typeof d&&d()})}}})}(a),function(a){"use strict";a.split=function(b,c,d){d=void 0===d||d===!0;var e="[,|"+(d?"\\s":"")+"-]\\s*",f=new RegExp(e,"g");if("function"!=typeof c){if(!b)return[];var g=[];return a.each(b.split(c?c:f),function(b,c){c=a.trim(c),c.length&&g.push(c)}),g}b&&a.each(b.split(f),function(b,d){if(d=a.trim(d),d.length)return c(d,b)})},a.validate=function(b){var c=a.extend(a.formUtils.defaultConfig(),{form:"form",validateOnEvent:!1,validateOnBlur:!0,validateCheckboxRadioOnClick:!0,showHelpOnFocus:!0,addSuggestions:!0,modules:"",onModulesLoaded:null,language:!1,onSuccess:!1,onError:!1,onElementValidate:!1});if(b=a.extend(c,b||{}),a(window).trigger("formValidationPluginInit",[b]),b.lang&&"en"!==b.lang){var d="lang/"+b.lang+".js";b.modules+=b.modules.length?","+d:d}a(b.form).each(function(c,d){d.validationConfig=b;var e=a(d);e.trigger("formValidationSetup",[e,b]),e.find(".has-help-txt").unbind("focus.validation").unbind("blur.validation"),e.removeClass("has-validation-callback").unbind("submit.validation").unbind("reset.validation").find("input[data-validation],textarea[data-validation]").unbind("blur.validation"),e.bind("submit.validation",function(c){var d=a(this),e=function(){return c.stopImmediatePropagation(),!1};if(a.formUtils.haltValidation)return e();if(a.formUtils.isLoadingModules)return setTimeout(function(){d.trigger("submit.validation")},200),e();var f=d.isValid(b.language,b);if(a.formUtils.haltValidation)return e();if(!f||"function"!=typeof b.onSuccess)return f||"function"!=typeof b.onError?!!f||e():(b.onError(d),e());var g=b.onSuccess(d);return g===!1?e():void 0}).bind("reset.validation",function(){a.formUtils.dialogs.removeAllMessagesAndStyling(e,b)}).addClass("has-validation-callback"),b.showHelpOnFocus&&e.showHelpOnFocus(),b.addSuggestions&&e.addSuggestions(),b.validateOnBlur&&(e.validateOnBlur(b.language,b),e.bind("html5ValidationAttrsFound",function(){e.validateOnBlur(b.language,b)})),b.validateOnEvent&&e.validateOnEvent(b.language,b)}),""!==b.modules&&a.formUtils.loadModules(b.modules,null,function(){"function"==typeof b.onModulesLoaded&&b.onModulesLoaded();var c="string"==typeof b.form?a(b.form):b.form;a.formUtils.$win.trigger("validatorsLoaded",[c,b])})}}(a),function(a,b){"use strict";var c=a(b);a.formUtils=a.extend(a.formUtils||{},{$win:c,defaultConfig:function(){return{ignore:[],errorElementClass:"error",successElementClass:"valid",borderColorOnError:"#b94a48",errorMessageClass:"form-error",validationRuleAttribute:"data-validation",validationErrorMsgAttribute:"data-validation-error-msg",errorMessagePosition:"inline",errorMessageTemplate:{container:'<div class="{errorMessageClass} alert alert-danger">{messages}</div>',messages:"<strong>{errorTitle}</strong><ul>{fields}</ul>",field:"<li>{msg}</li>"},scrollToTopOnError:!0,dateFormat:"yyyy-mm-dd",addValidClassOnAll:!1,decimalSeparator:".",inputParentClassOnError:"has-error",inputParentClassOnSuccess:"has-success",validateHiddenInputs:!1,inlineErrorMessageCallback:!1,submitErrorMessageCallback:!1}},validators:{},sanitizers:{},_events:{load:[],valid:[],invalid:[]},haltValidation:!1,addValidator:function(a){var b=0===a.name.indexOf("validate_")?a.name:"validate_"+a.name;void 0===a.validateOnKeyUp&&(a.validateOnKeyUp=!0),this.validators[b]=a},addSanitizer:function(a){this.sanitizers[a.name]=a},warn:function(a,c){"console"in b?"function"==typeof b.console.warn?b.console.warn(a):"function"==typeof b.console.log&&b.console.log(a):c&&alert(a)},getValue:function(a,b){var c=b?b.find(a):a;if(c.length>0){var d=c.eq(0).attr("type");return"radio"===d||"checkbox"===d?c.filter(":checked").val()||"":c.val()||""}return!1},validateInput:function(b,c,d,e,f){d=d||a.formUtils.defaultConfig(),c=c||a.formUtils.LANG,e.length||(e=b.parent());var g=this.getValue(b);b.valAttr("skipped",!1).one("beforeValidation",function(){(b.attr("disabled")||!b.is(":visible")&&!d.validateHiddenInputs)&&b.valAttr("skipped",1)}).trigger("beforeValidation",[g,c,d]);var h="true"===b.valAttr("optional"),i=!g&&h,j=b.attr(d.validationRuleAttribute),k=!0,l="",m={isValid:!0,shouldChangeDisplay:!0,errorMsg:""};if(!j||i||b.valAttr("skipped"))return m.shouldChangeDisplay=d.addValidClassOnAll,m;var n=b.valAttr("ignore");return n&&a.each(n.split(""),function(a,b){g=g.replace(new RegExp("\\"+b,"g"),"")}),a.split(j,function(h){0!==h.indexOf("validate_")&&(h="validate_"+h);var i=a.formUtils.validators[h];if(!i)throw new Error('Using undefined validator "'+h+'". Maybe you have forgotten to load the module that "'+h+'" belongs to?');if("validate_checkbox_group"===h&&(b=e.find('[name="'+b.attr("name")+'"]:eq(0)')),("keyup"!==f||i.validateOnKeyUp)&&(k=i.validatorFunction(g,b,d,c,e,f)),!k)return d.validateOnBlur&&b.validateOnKeyUp(c,d),l=a.formUtils.dialogs.resolveErrorMessage(b,i,h,d,c),!1}),k===!1?(b.trigger("validation",!1),m.errorMsg=l,m.isValid=!1,m.shouldChangeDisplay=!0):null===k?m.shouldChangeDisplay=!1:(b.trigger("validation",!0),m.shouldChangeDisplay=!0),"function"==typeof d.onElementValidate&&null!==l&&d.onElementValidate(m.isValid,b,e,l),b.trigger("afterValidation",[m,f]),m},parseDate:function(b,c,d){var e,f,g,h,i=c.replace(/[a-zA-Z]/gi,"").substring(0,1),j="^",k=c.split(i||null);if(a.each(k,function(a,b){j+=(a>0?"\\"+i:"")+"(\\d{"+b.length+"})"}),j+="$",d){var l=[];a.each(b.split(i),function(a,b){1===b.length&&(b="0"+b),l.push(b)}),b=l.join(i)}if(e=b.match(new RegExp(j)),null===e)return!1;var m=function(b,c,d){for(var e=0;e<c.length;e++)if(c[e].substring(0,1)===b)return a.formUtils.parseDateInt(d[e+1]);return-1};return g=m("m",k,e),f=m("d",k,e),h=m("y",k,e),!(2===g&&f>28&&(h%4!==0||h%100===0&&h%400!==0)||2===g&&f>29&&(h%4===0||h%100!==0&&h%400===0)||g>12||0===g)&&(!(this.isShortMonth(g)&&f>30||!this.isShortMonth(g)&&f>31||0===f)&&[h,g,f])},parseDateInt:function(a){return 0===a.indexOf("0")&&(a=a.replace("0","")),parseInt(a,10)},isShortMonth:function(a){return a%2===0&&a<7||a%2!==0&&a>7},lengthRestriction:function(b,c){var d=parseInt(c.text(),10),e=0,f=function(){var a=b.val().length;if(a>d){var f=b.scrollTop();b.val(b.val().substring(0,d)),b.scrollTop(f)}e=d-a,e<0&&(e=0),c.text(e)};a(b).bind("keydown keyup keypress focus blur",f).bind("cut paste",function(){setTimeout(f,100)}),a(document).bind("ready",f)},numericRangeCheck:function(b,c){var d=a.split(c),e=parseInt(c.substr(3),10);return 1===d.length&&c.indexOf("min")===-1&&c.indexOf("max")===-1&&(d=[c,c]),2===d.length&&(b<parseInt(d[0],10)||b>parseInt(d[1],10))?["out",d[0],d[1]]:0===c.indexOf("min")&&b<e?["min",e]:0===c.indexOf("max")&&b>e?["max",e]:["ok"]},_numSuggestionElements:0,_selectedSuggestion:null,_previousTypedVal:null,suggest:function(b,d,e){var f={css:{maxHeight:"150px",background:"#FFF",lineHeight:"150%",textDecoration:"underline",overflowX:"hidden",overflowY:"auto",border:"#CCC solid 1px",borderTop:"none",cursor:"pointer"},activeSuggestionCSS:{background:"#E9E9E9"}},g=function(a,b){var c=b.offset();a.css({width:b.outerWidth(),left:c.left+"px",top:c.top+b.outerHeight()+"px"})};e&&a.extend(f,e),f.css.position="absolute",f.css["z-index"]=9999,b.attr("autocomplete","off"),0===this._numSuggestionElements&&c.bind("resize",function(){a(".jquery-form-suggestions").each(function(){var b=a(this),c=b.attr("data-suggest-container");g(b,a(".suggestions-"+c).eq(0))})}),this._numSuggestionElements++;var h=function(b){var c=b.valAttr("suggestion-nr");a.formUtils._selectedSuggestion=null,a.formUtils._previousTypedVal=null,a(".jquery-form-suggestion-"+c).fadeOut("fast")};return b.data("suggestions",d).valAttr("suggestion-nr",this._numSuggestionElements).unbind("focus.suggest").bind("focus.suggest",function(){a(this).trigger("keyup"),a.formUtils._selectedSuggestion=null}).unbind("keyup.suggest").bind("keyup.suggest",function(){var c=a(this),d=[],e=a.trim(c.val()).toLocaleLowerCase();if(e!==a.formUtils._previousTypedVal){a.formUtils._previousTypedVal=e;var i=!1,j=c.valAttr("suggestion-nr"),k=a(".jquery-form-suggestion-"+j);if(k.scrollTop(0),""!==e){var l=e.length>2;a.each(c.data("suggestions"),function(a,b){var c=b.toLocaleLowerCase();return c===e?(d.push("<strong>"+b+"</strong>"),i=!0,!1):void((0===c.indexOf(e)||l&&c.indexOf(e)>-1)&&d.push(b.replace(new RegExp(e,"gi"),"<strong>$&</strong>")))})}i||0===d.length&&k.length>0?k.hide():d.length>0&&0===k.length?(k=a("<div></div>").css(f.css).appendTo("body"),b.addClass("suggestions-"+j),k.attr("data-suggest-container",j).addClass("jquery-form-suggestions").addClass("jquery-form-suggestion-"+j)):d.length>0&&!k.is(":visible")&&k.show(),d.length>0&&e.length!==d[0].length&&(g(k,c),k.html(""),a.each(d,function(b,d){a("<div></div>").append(d).css({overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"5px"}).addClass("form-suggest-element").appendTo(k).click(function(){c.focus(),c.val(a(this).text()),c.trigger("change"),h(c)})}))}}).unbind("keydown.validation").bind("keydown.validation",function(b){var c,d,e=b.keyCode?b.keyCode:b.which,g=a(this);if(13===e&&null!==a.formUtils._selectedSuggestion){if(c=g.valAttr("suggestion-nr"),d=a(".jquery-form-suggestion-"+c),d.length>0){var i=d.find("div").eq(a.formUtils._selectedSuggestion).text();g.val(i),g.trigger("change"),h(g),b.preventDefault()}}else{c=g.valAttr("suggestion-nr"),d=a(".jquery-form-suggestion-"+c);var j=d.children();if(j.length>0&&a.inArray(e,[38,40])>-1){38===e?(null===a.formUtils._selectedSuggestion?a.formUtils._selectedSuggestion=j.length-1:a.formUtils._selectedSuggestion--,a.formUtils._selectedSuggestion<0&&(a.formUtils._selectedSuggestion=j.length-1)):40===e&&(null===a.formUtils._selectedSuggestion?a.formUtils._selectedSuggestion=0:a.formUtils._selectedSuggestion++,a.formUtils._selectedSuggestion>j.length-1&&(a.formUtils._selectedSuggestion=0));var k=d.innerHeight(),l=d.scrollTop(),m=d.children().eq(0).outerHeight(),n=m*a.formUtils._selectedSuggestion;return(n<l||n>l+k)&&d.scrollTop(n),j.removeClass("active-suggestion").css("background","none").eq(a.formUtils._selectedSuggestion).addClass("active-suggestion").css(f.activeSuggestionCSS),b.preventDefault(),!1}}}).unbind("blur.suggest").bind("blur.suggest",function(){h(a(this))}),b},LANG:{errorTitle:"Form submission failed!",requiredField:"This is a required field",requiredFields:"You have not answered all required fields",badTime:"You have not given a correct time",badEmail:"You have not given a correct e-mail address",badTelephone:"You have not given a correct phone number",badSecurityAnswer:"You have not given a correct answer to the security question",badDate:"You have not given a correct date",lengthBadStart:"The input value must be between ",lengthBadEnd:" characters",lengthTooLongStart:"The input value is longer than ",lengthTooShortStart:"The input value is shorter than ",notConfirmed:"Input values could not be confirmed",badDomain:"Incorrect domain value",badUrl:"The input value is not a correct URL",badCustomVal:"The input value is incorrect",andSpaces:" and spaces ",badInt:"The input value was not a correct number",badSecurityNumber:"Your social security number was incorrect",badUKVatAnswer:"Incorrect UK VAT Number",badUKNin:"Incorrect UK NIN",badUKUtr:"Incorrect UK UTR Number",badStrength:"The password isn't strong enough",badNumberOfSelectedOptionsStart:"You have to choose at least ",badNumberOfSelectedOptionsEnd:" answers",badAlphaNumeric:"The input value can only contain alphanumeric characters ",badAlphaNumericExtra:" and ",wrongFileSize:"The file you are trying to upload is too large (max %s)",wrongFileType:"Only files of type %s is allowed",groupCheckedRangeStart:"Please choose between ",groupCheckedTooFewStart:"Please choose at least ",groupCheckedTooManyStart:"Please choose a maximum of ",groupCheckedEnd:" item(s)",badCreditCard:"The credit card number is not correct",badCVV:"The CVV number was not correct",wrongFileDim:"Incorrect image dimensions,",imageTooTall:"the image can not be taller than",imageTooWide:"the image can not be wider than",imageTooSmall:"the image was too small",min:"min",max:"max",imageRatioNotAccepted:"Image ratio is not be accepted",badBrazilTelephoneAnswer:"The phone number entered is invalid",badBrazilCEPAnswer:"The CEP entered is invalid",badBrazilCPFAnswer:"The CPF entered is invalid",badPlPesel:"The PESEL entered is invalid",badPlNip:"The NIP entered is invalid",badPlRegon:"The REGON entered is invalid",badreCaptcha:"Please confirm that you are not a bot",passwordComplexityStart:"Password must contain at least ",passwordComplexitySeparator:", ",passwordComplexityUppercaseInfo:" uppercase letter(s)",passwordComplexityLowercaseInfo:" lowercase letter(s)",passwordComplexitySpecialCharsInfo:" special character(s)",passwordComplexityNumericCharsInfo:" numeric character(s)",passwordComplexityEnd:"."}})}(a,window),function(a){a.formUtils.addValidator({name:"email",validatorFunction:function(b){var c=b.toLowerCase().split("@"),d=c[0],e=c[1];if(d&&e){if(0===d.indexOf('"')){var f=d.length;if(d=d.replace(/\"/g,""),d.length!==f-2)return!1}return a.formUtils.validators.validate_domain.validatorFunction(c[1])&&0!==d.indexOf(".")&&"."!==d.substring(d.length-1,d.length)&&d.indexOf("..")===-1&&!/[^\w\+\.\-\#\-\_\~\!\$\&\'\(\)\*\+\,\;\=\:]/.test(d)}return!1},errorMessage:"",errorMessageKey:"badEmail"}),a.formUtils.addValidator({name:"domain",validatorFunction:function(a){return a.length>0&&a.length<=253&&!/[^a-zA-Z0-9]/.test(a.slice(-2))&&!/[^a-zA-Z0-9]/.test(a.substr(0,1))&&!/[^a-zA-Z0-9\.\-]/.test(a)&&1===a.split("..").length&&a.split(".").length>1},errorMessage:"",errorMessageKey:"badDomain"}),a.formUtils.addValidator({name:"required",validatorFunction:function(b,c,d,e,f){switch(c.attr("type")){case"checkbox":return c.is(":checked");case"radio":return f.find('input[name="'+c.attr("name")+'"]').filter(":checked").length>0;default:return""!==a.trim(b)}},errorMessage:"",errorMessageKey:function(a){return"top"===a.errorMessagePosition||"function"==typeof a.errorMessagePosition?"requiredFields":"requiredField"}}),a.formUtils.addValidator({name:"length",validatorFunction:function(b,c,d,e){var f=c.valAttr("length"),g=c.attr("type");if(void 0===f)return alert('Please add attribute "data-validation-length" to '+c[0].nodeName+" named "+c.attr("name")),!0;var h,i="file"===g&&void 0!==c.get(0).files?c.get(0).files.length:b.length,j=a.formUtils.numericRangeCheck(i,f);switch(j[0]){case"out":this.errorMessage=e.lengthBadStart+f+e.lengthBadEnd,h=!1;break;case"min":this.errorMessage=e.lengthTooShortStart+j[1]+e.lengthBadEnd,h=!1;break;case"max":this.errorMessage=e.lengthTooLongStart+j[1]+e.lengthBadEnd,h=!1;break;default:h=!0}return h},errorMessage:"",errorMessageKey:""}),a.formUtils.addValidator({name:"url",validatorFunction:function(b){var c=/^(https?|ftp):\/\/((((\w|-|\.|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])(\w|-|\.|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])(\w|-|\.|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/(((\w|-|\.|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/((\w|-|\.|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|\[|\]|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#(((\w|-|\.|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i;if(c.test(b)){var d=b.split("://")[1],e=d.indexOf("/");return e>-1&&(d=d.substr(0,e)),a.formUtils.validators.validate_domain.validatorFunction(d)}return!1},errorMessage:"",errorMessageKey:"badUrl"}),a.formUtils.addValidator({name:"number",validatorFunction:function(a,b,c){if(""!==a){var d,e,f=b.valAttr("allowing")||"",g=b.valAttr("decimal-separator")||c.decimalSeparator,h=!1,i=b.valAttr("step")||"",j=!1,k=b.attr("data-sanitize")||"",l=k.match(/(^|[\s])numberFormat([\s]|$)/i);if(l){if(!window.numeral)throw new ReferenceError("The data-sanitize value numberFormat cannot be used without the numeral library. Please see Data Validation in http://www.formvalidator.net for more information.");a.length&&(a=String(numeral().unformat(a)))}if(f.indexOf("number")===-1&&(f+=",number"),f.indexOf("negative")===-1&&0===a.indexOf("-"))return!1;if(f.indexOf("range")>-1&&(d=parseFloat(f.substring(f.indexOf("[")+1,f.indexOf(";"))),e=parseFloat(f.substring(f.indexOf(";")+1,f.indexOf("]"))),h=!0),""!==i&&(j=!0),","===g){if(a.indexOf(".")>-1)return!1;a=a.replace(",",".")}if(""===a.replace(/[0-9-]/g,"")&&(!h||a>=d&&a<=e)&&(!j||a%i===0))return!0;if(f.indexOf("float")>-1&&null!==a.match(new RegExp("^([0-9-]+)\\.([0-9]+)$"))&&(!h||a>=d&&a<=e)&&(!j||a%i===0))return!0}return!1},errorMessage:"",errorMessageKey:"badInt"}),a.formUtils.addValidator({name:"alphanumeric",validatorFunction:function(b,c,d,e){var f="^([a-zA-Z0-9",g="]+)$",h=c.valAttr("allowing"),i="",j=!1;if(h){i=f+h+g;var k=h.replace(/\\/g,"");k.indexOf(" ")>-1&&(j=!0,k=k.replace(" ",""),k+=e.andSpaces||a.formUtils.LANG.andSpaces),e.badAlphaNumericAndExtraAndSpaces&&e.badAlphaNumericAndExtra?j?this.errorMessage=e.badAlphaNumericAndExtraAndSpaces+k:this.errorMessage=e.badAlphaNumericAndExtra+k+e.badAlphaNumericExtra:this.errorMessage=e.badAlphaNumeric+e.badAlphaNumericExtra+k;
}else i=f+g,this.errorMessage=e.badAlphaNumeric;return new RegExp(i).test(b)},errorMessage:"",errorMessageKey:""}),a.formUtils.addValidator({name:"custom",validatorFunction:function(a,b){var c=new RegExp(b.valAttr("regexp"));return c.test(a)},errorMessage:"",errorMessageKey:"badCustomVal"}),a.formUtils.addValidator({name:"date",validatorFunction:function(b,c,d){var e=c.valAttr("format")||d.dateFormat||"yyyy-mm-dd",f="false"===c.valAttr("require-leading-zero");return a.formUtils.parseDate(b,e,f)!==!1},errorMessage:"",errorMessageKey:"badDate"}),a.formUtils.addValidator({name:"checkbox_group",validatorFunction:function(b,c,d,e,f){var g=!0,h=c.attr("name"),i=a('input[type=checkbox][name^="'+h+'"]',f),j=i.filter(":checked").length,k=c.valAttr("qty");if(void 0===k){var l=c.get(0).nodeName;alert('Attribute "data-validation-qty" is missing from '+l+" named "+c.attr("name"))}var m=a.formUtils.numericRangeCheck(j,k);switch(m[0]){case"out":this.errorMessage=e.groupCheckedRangeStart+k+e.groupCheckedEnd,g=!1;break;case"min":this.errorMessage=e.groupCheckedTooFewStart+m[1]+(e.groupCheckedTooFewEnd||e.groupCheckedEnd),g=!1;break;case"max":this.errorMessage=e.groupCheckedTooManyStart+m[1]+(e.groupCheckedTooManyEnd||e.groupCheckedEnd),g=!1;break;default:g=!0}if(!g){var n=function(){i.unbind("click",n),i.filter("*[data-validation]").validateInputOnBlur(e,d,!1,"blur")};i.bind("click",n)}return g}})}(a)});
!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof module&&module.exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){!function(a,b){a.formUtils.registerLoadedModule("file");var c="undefined"!=typeof b.FileReader,d=function(b){var c=(b.valAttr("allowing")||"").toLowerCase().split(/,\s*/);return a.inArray("jpg",c)>-1&&a.inArray("jpeg",c)===-1?c.push("jpeg"):a.inArray("jpeg",c)>-1&&a.inArray("jpg",c)===-1&&c.push("jpg"),c},e=function(a,b,c,d){var e=d[b]||"";a.errorMessageKey="",a.errorMessage=e.replace("%s",c)},f=function(c,d,e){var f=new FileReader,g=new Image;f.readAsDataURL(c),f.onload=function(c){g.onload=function(){a(b).trigger("imageValidation",[this]),d(this)},g.onerror=function(){e()},g.src=c.target.result}};a.formUtils.addValidator({name:"mime",validatorFunction:function(b,f,g,h){if(c){var i=!0,j=f.get(0).files||[],k="",l=d(f);return j.length&&(a.each(j,function(b,c){return i=!1,k=c.type||c.name.substring(c.name.lastIndexOf(".")+1),a.each(l,function(a,b){if(i=k.indexOf(b)>-1)return!1}),i}),i||(a.formUtils.warn("Trying to upload a file with mime type "+k+" which is not allowed"),e(this,"wrongFileType",l.join(", "),h))),i}return a.formUtils.warn("FileReader not supported by browser, will check file extension"),a.formUtils.validators.validate_extension.validatorFunction(b,f,g,h)},errorMessage:"",errorMessageKey:"wrongFileType"}),a.formUtils.addValidator({name:"extension",validatorFunction:function(b,c,f,g){var h=!0,i=this,j=d(c);return a.each(c.get(0).files||[b],function(b,c){var d="string"==typeof c?c:c.value||c.fileName||c.name,f=d.substr(d.lastIndexOf(".")+1);if(a.inArray(f.toLowerCase(),j)===-1)return h=!1,e(i,"wrongFileType",j.join(", "),g),!1}),h},errorMessage:"",errorMessageKey:"wrongFileType"}),a.formUtils.addValidator({name:"size",validatorFunction:function(b,d,f,g){var h=d.valAttr("max-size");if(!h)return a.formUtils.warn('Input "'+d.attr("name")+'" is missing data-validation-max-size attribute',!0),!0;if(!c)return!0;var i=a.formUtils.convertSizeNameToBytes(h),j=!0;return a.each(d.get(0).files||[],function(a,b){return j=b.size<=i}),j||e(this,"wrongFileSize",h,g),j},errorMessage:"",errorMessageKey:"wrongFileSize"}),a.formUtils.convertSizeNameToBytes=function(a){return a=a.toUpperCase(),"M"===a.substr(a.length-1,1)?1024*parseInt(a.substr(0,a.length-1),10)*1024:"MB"===a.substr(a.length-2,2)?1024*parseInt(a.substr(0,a.length-2),10)*1024:"KB"===a.substr(a.length-2,2)?1024*parseInt(a.substr(0,a.length-2),10):"B"===a.substr(a.length-1,1)?parseInt(a.substr(0,a.length-1),10):parseInt(a,10)},a.formUtils.checkImageDimension=function(a,b,c){var d=!1,e={width:0,height:0},f=function(a){a=a.replace("min","").replace("max","");var b=a.split("x");e.width=b[0],e.height=b[1]?b[1]:b[0]},g=!1,h=!1,i=b.split("-");return 1===i.length?0===i[0].indexOf("min")?g=i[0]:h=i[0]:(g=i[0],h=i[1]),g&&(f(g),(a.width<e.width||a.height<e.height)&&(d=c.imageTooSmall+" ("+c.min+" "+e.width+"x"+e.height+"px)")),!d&&h&&(f(h),(a.width>e.width||a.height>e.height)&&(d=a.width>e.width?c.imageTooWide+" "+e.width+"px":c.imageTooTall+" "+e.height+"px",d+=" ("+c.max+" "+e.width+"x"+e.height+"px)")),d},a.formUtils.checkImageRatio=function(a,b,c){var d=a.width/a.height,e=function(a){var b=a.replace("max","").replace("min","").split(":");return b[0]/b[1]},f=b.split("-"),g=function(a,b,c){return a>=b&&a<=c};if(1===f.length){if(d!==e(f[0]))return c.imageRatioNotAccepted}else if(2===f.length&&!g(d,e(f[0]),e(f[1])))return c.imageRatioNotAccepted;return!1},a.formUtils.addAsyncValidator({name:"dimension",validatorFunction:function(b,d,e,g,h){if(c){var i=e.get(0).files||[],j=this;e.attr("data-validation").indexOf("mime")===-1?(alert("You should validate file type being jpg, gif or png on input "+e[0].name),b(!1)):i.length>1?(alert("Validating image dimensions does not support inputs allowing multiple files"),b(!1)):0===i.length?b(!0):f(i[0],function(c){var d=!1;e.valAttr("dimension")&&(d=a.formUtils.checkImageDimension(c,e.valAttr("dimension"),h)),!d&&e.valAttr("ratio")&&(d=a.formUtils.checkImageRatio(c,e.valAttr("ratio"),h)),d?(j.errorMessage=h.wrongFileDim+" "+e.valAttr("has-not-valid-dim"),b(!1)):b(!0)},function(a){throw a})}else b(!0)},errorMessage:"",errorMessageKey:""}),a(b).one("validatorsLoaded formValidationSetup",function(b,c,d){var e;e=c?c.find('input[type="file"]'):a('input[type="file"]'),a.formUtils.dialogs.removeInputStylingAndMessage(e,d)})}(a,window)});
jQuery(document).ready(function($){
$('a[href*="#slip-modal"]').click(function (event){
event.preventDefault();
var orderID=parseInt(
$(this)
.attr('href')
.replace(/[^0-9.]/g, '')
);
$.ajax({
url: phpVars.ajax_url,
data: {
action: 'get_shortcode_ajax',
order_id: orderID,
},
beforeSend: function(){
$('#seed-confirm-slip-modal-loading').show();
},
})
.done(function(response){
$('#seed-confirm-slip-modal').modal();
$('#seed-confirm-slip-modal > #shortcode-append').html(response);
$('#seed-confirm-slip-modal-loading').hide();
$('#seed-confirm-slip-upload-button').click(function(event){
event.preventDefault();
$('#seed-confirm-slip').trigger('click');
});
$('#seed-confirm-slip').change(function(e){
if($(this).val()){
$('#seed-confirm-slip-label').removeAttr('for');
$('.seed-confirm-slip-form button[type="submit"]').removeAttr('disabled');
$('.seed-confirm-slip-file-selected-box').show();
$('.seed-confirm-slip-file-selected-box > span').html(e.target.files[0].name);
}else{
$('#seed-confirm-slip-label').attr('for', 'seed-confirm-slip');
$('.seed-confirm-slip-form button[type="submit"]').attr('disabled', 'disabled');
$('.seed-confirm-slip-file-selected-box').hide();
$('.seed-confirm-slip-file-selected-box > span').html('');
}});
submitForm();
})
.fail(function(){
console.log("error");
})
});
function submitForm(){
$('.seed-confirm-slip-form').on('submit', function(e){
var $form=$(this);
var form_data=new FormData();
form_data.append('action', 'seed_comfirm_submit');
form_data.append('order_id', $form.find('input[name="order_id"]').val());
form_data.append('file', $form.find('input[name="seed-confirm-slip"]')[0].files[0]);
form_data.append('seed-confirm-ajax-nonce', $form.find('input[name="seed-confirm-ajax-nonce"]').val());
$.ajax({
url: phpVars.ajax_url,
type: 'POST',
dataType: 'json',
contentType: false,
processData: false,
mimeTypes:"multipart/form-data",
data: form_data,
beforeSend: function(){
$('#seed-confirm-slip-modal-success-loading').show();
},
})
.done(function(response){
$('#seed-confirm-slip-modal-success-loading').hide();
if(!response.success){
alert(response.data);
}else{
$('.seed-confirm-slip-form').remove();
$('#seed-confirm-upload-success').show();
setTimeout(function(){
$('.seed-confirm-upload-success-icon').addClass('active');
}, 200);
$('.seed-confirm-upload-success-message').text(response.data.message);
$('a[href="#slip-modal-'+response.data.order_id+'"]').remove();
}})
.fail(function(xhr, status, error){
$('#seed-confirm-slip-modal-success-loading').hide();
if(!xhr.responseJSON.success){
alert(xhr.responseJSON.data);
}})
e.preventDefault();
});
}});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self,function(){var n=e.Cookies,r=e.Cookies=t();r.noConflict=function(){return e.Cookies=n,r}}())}(this,function(){"use strict";function e(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}var t={read:function(e){return e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};return function n(r,o){function i(t,n,i){if("undefined"!=typeof document){"number"==typeof(i=e({},o,i)).expires&&(i.expires=new Date(Date.now()+864e5*i.expires)),i.expires&&(i.expires=i.expires.toUTCString()),t=encodeURIComponent(t).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape),n=r.write(n,t);var c="";for(var u in i)i[u]&&(c+="; "+u,!0!==i[u]&&(c+="="+i[u].split(";")[0]));return document.cookie=t+"="+n+c}}return Object.create({set:i,get:function(e){if("undefined"!=typeof document&&(!arguments.length||e)){for(var n=document.cookie?document.cookie.split("; "):[],o={},i=0;i<n.length;i++){var c=n[i].split("="),u=c.slice(1).join("=");'"'===u[0]&&(u=u.slice(1,-1));try{var f=t.read(c[0]);if(o[f]=r.read(u,f),e===f)break}catch(e){}}return e?o[e]:o}},remove:function(t,n){i(t,"",e({},n,{expires:-1}))},withAttributes:function(t){return n(this.converter,e({},this.attributes,t))},withConverter:function(t){return n(e({},this.converter,t),this.attributes)}},{attributes:{value:Object.freeze(o)},converter:{value:Object.freeze(r)}})}(t,{path:"/"})});
function callCookieList(){ return cookie_list={"code_in_head":[],"code_next_body":[],"code_body_close":[]};};
var dateStamp,pdpa_popup=document.getElementsByClassName("dpdpa--popup"),pdpa_popup_reject_all=document.getElementById("dpdpa--popup-reject-all"),pdpa_popup_allow_all=document.getElementById("dpdpa--popup-accept-all"),pdpa_popup_settings=document.getElementsByClassName("dpdpa--popup-settings"),pdpa_popup_button_settings=document.getElementById("dpdpa--popup-button-settings"),pdpa_sidebar=document.getElementsByClassName("dpdpa--popup-sidebar"),pdpa_bg=document.getElementsByClassName("dpdpa--popup-bg"),pdpa_close=document.getElementById("dpdpa--popup-close"),pdpa_settings_close=document.getElementById("dpdpa--popup-settings-close"),dpdpa_consent=document.getElementsByName("dpdpa_consent[]"),dpdpa_consent_length=dpdpa_consent.length,dpdpa_consent_wrapper=document.getElementById("dpdpa--popup-list"),pdpa_allow_all=document.getElementById("pdpa_settings_allow_all"),pdpa_confirm=document.getElementById("pdpa_settings_confirm"),dpdpa_cookies=Cookies.get("dpdpa_consent"),dpdpa_consent_close=Cookies.get("dpdpa_consent_close");function init(){var e=parseInt(designil_pdpa.duration)+1,p=(parseInt(designil_pdpa.duration),Math.floor((new Date).getTime()/1e3)),t=0;if(void 0!==dpdpa_cookies){if(""!=(dpdpa_cookies=JSON.parse(dpdpa_cookies))&&void 0!==dpdpa_cookies)for(pdpa_choices=dpdpa_cookies.choices.split(","),i=0;i<dpdpa_consent_length;i++)pdpa_choices.includes(dpdpa_consent[i].value)?dpdpa_consent[i].checked=!0:dpdpa_consent[i].checked=!1;var o=p-dpdpa_cookies.datestamp;e=Math.round(o/86400),dpdpa_cookies.uniqueID!=designil_pdpa.unique_id&&(t=1)}(e>designil_pdpa.duration||1==t)&&1==designil_pdpa.enable&&setTimeout((function(){pdpa_popup[0].classList.add("active")}),500),toggleAllowAll()}function saveLog(e){if(1==designil_pdpa.log_enable){if(("reject"==e||"close"==e)&&0==designil_pdpa.log_reject_close)return;var p=prepareCookies(),t=new XMLHttpRequest;t.open("POST",designil_pdpa.url,!0),t.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),t.onreadystatechange=function(){4==this.readyState&&this.status},t.send("action=pdpa_save_log&nonce="+designil_pdpa.nonce+"&consent="+JSON.stringify(p)+"&log_action="+e)}}if(document.addEventListener("DOMContentLoaded",(function(e){init(),loadCode()})),pdpa_popup_allow_all.addEventListener("click",(function(e){forceAllowAll(),saveLog("accept"),e.preventDefault()})),pdpa_settings_allow_all.addEventListener("click",(function(e){forceAllowAll(),saveLog("accept"),e.preventDefault()})),null!==pdpa_popup_reject_all&&pdpa_popup_reject_all.addEventListener("click",(function(e){rejectAll(),saveLog("reject")})),pdpa_close.addEventListener("click",(function(e){rejectAll(),saveLog("close")})),pdpa_settings_close.addEventListener("click",(function(e){closePopupSettings(),e.preventDefault()})),pdpa_bg[0].addEventListener("click",(function(e){closePopupSettings(),e.preventDefault()})),null!==pdpa_popup_settings)for(var i=0;i<pdpa_popup_settings.length;i++)pdpa_popup_settings[i].addEventListener("click",(function(e){openPopupSettings(),e.preventDefault()}));function loadCode(){var e=callCookieList(),p={code_in_head:"",code_next_body:"",code_body_close:""},t=Cookies.get("dpdpa_consent");if(""!=t&&void 0!==t)for(var o in t=JSON.parse(t),pdpa_choices=t.choices.split(","),e){var n=e[o],d="";for(var a in n){var i=n[a];pdpa_choices.includes(a)&&""!=i&&(d+=i+"\n")}p[o]=d.replace(/\\/g,"")}var s=p.code_in_head;(l=document.createRange()).selectNode(document.getElementsByTagName("head")[0]);var c=l.createContextualFragment(s);document.head.appendChild(c);s=p.code_next_body;(l=document.createRange()).selectNode(document.getElementsByTagName("body")[0]);c=l.createContextualFragment(s);document.body.prepend(c);var l;s=p.code_body_close;(l=document.createRange()).selectNode(document.getElementsByTagName("body")[0]);c=l.createContextualFragment(s);document.body.appendChild(c)}function saveCookies(e){Cookies.set("dpdpa_consent",JSON.stringify(e),{expires:3650}),document.body.classList.contains("designil-pdpa-loaded")?location.reload():(document.body.classList.add("designil-pdpa-loaded"),loadCode())}function prepareCookies(e){for(dpdpa_cookies=[],i=0;i<dpdpa_consent_length;i++)1==dpdpa_consent[i].checked&&dpdpa_cookies.push(dpdpa_consent[i].value);return dateStamp=Math.floor((new Date).getTime()/1e3),uniqueID=designil_pdpa.unique_id,{uniqueID:uniqueID,datestamp:dateStamp,choices:dpdpa_cookies.join(",")}}function rejectAll(){for(closePopup(),i=0;i<dpdpa_consent_length;i++)dpdpa_consent[i].checked=!1;saveCookies(prepareCookies()),event.preventDefault()}function closePopup(){pdpa_popup[0].classList.remove("active")}function closePopupSettings(){pdpa_sidebar[0].classList.remove("active"),pdpa_bg[0].classList.remove("active")}function openPopupSettings(){pdpa_sidebar[0].classList.add("active"),pdpa_bg[0].classList.add("active")}function forceAllowAll(){for(i=0;i<dpdpa_consent_length;i++)dpdpa_consent[i].checked=!0;saveCookies(prepareCookies()),closePopupSettings(),closePopup()}function toggleAllowAll(){var e=checkAllowAll();pdpa_allow_all.style.display=1==e?"inline-block":"none"}function checkAllowAll(){var e=!1;for(i=0;i<dpdpa_consent_length;i++)if(0==dpdpa_consent[i].checked){e=!0;break}return e}null!==pdpa_popup_button_settings&&pdpa_popup_button_settings.addEventListener("click",(function(e){openPopupSettings(),e.preventDefault()})),pdpa_confirm.addEventListener("click",(function(e){saveCookies(prepareCookies()),closePopupSettings(),closePopup(),saveLog("accept"),e.preventDefault()})),dpdpa_consent_wrapper.addEventListener("change",(function(e){toggleAllowAll()}));
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;"undefined"!=typeof window?t=window:"undefined"!=typeof global?t=global:"undefined"!=typeof self&&(t=self),t.sbjs=e()}}(function(){return function e(t,r,n){function a(s,o){if(!r[s]){if(!t[s]){var c="function"==typeof require&&require;if(!o&&c)return c(s,!0);if(i)return i(s,!0);var u=new Error("Cannot find module '"+s+"'");throw u.code="MODULE_NOT_FOUND",u}var p=r[s]={exports:{}};t[s][0].call(p.exports,function(e){var r=t[s][1][e];return a(r||e)},p,p.exports,e,t,r,n)}return r[s].exports}for(var i="function"==typeof require&&require,s=0;s<n.length;s++)a(n[s]);return a}({1:[function(e,t,r){"use strict";var n=e("./init"),a={init:function(e){this.get=n(e),e&&e.callback&&"function"==typeof e.callback&&e.callback(this.get)}};t.exports=a},{"./init":6}],2:[function(e,t,r){"use strict";var n=e("./terms"),a=e("./helpers/utils"),i={containers:{current:"sbjs_current",current_extra:"sbjs_current_add",first:"sbjs_first",first_extra:"sbjs_first_add",session:"sbjs_session",udata:"sbjs_udata",promocode:"sbjs_promo"},service:{migrations:"sbjs_migrations"},delimiter:"|||",aliases:{main:{type:"typ",source:"src",medium:"mdm",campaign:"cmp",content:"cnt",term:"trm",id:"id",platform:"plt",format:"fmt",tactic:"tct"},extra:{fire_date:"fd",entrance_point:"ep",referer:"rf"},session:{pages_seen:"pgs",current_page:"cpg"},udata:{visits:"vst",ip:"uip",agent:"uag"},promo:"code"},pack:{main:function(e){return i.aliases.main.type+"="+e.type+i.delimiter+i.aliases.main.source+"="+e.source+i.delimiter+i.aliases.main.medium+"="+e.medium+i.delimiter+i.aliases.main.campaign+"="+e.campaign+i.delimiter+i.aliases.main.content+"="+e.content+i.delimiter+i.aliases.main.term+"="+e.term+i.delimiter+i.aliases.main.id+"="+e.id+i.delimiter+i.aliases.main.platform+"="+e.platform+i.delimiter+i.aliases.main.format+"="+e.format+i.delimiter+i.aliases.main.tactic+"="+e.tactic},extra:function(e){return i.aliases.extra.fire_date+"="+a.setDate(new Date,e)+i.delimiter+i.aliases.extra.entrance_point+"="+document.location.href+i.delimiter+i.aliases.extra.referer+"="+(document.referrer||n.none)},user:function(e,t){return i.aliases.udata.visits+"="+e+i.delimiter+i.aliases.udata.ip+"="+t+i.delimiter+i.aliases.udata.agent+"="+navigator.userAgent},session:function(e){return i.aliases.session.pages_seen+"="+e+i.delimiter+i.aliases.session.current_page+"="+document.location.href},promo:function(e){return i.aliases.promo+"="+a.setLeadingZeroToInt(a.randomInt(e.min,e.max),e.max.toString().length)}}};t.exports=i},{"./helpers/utils":5,"./terms":9}],3:[function(e,t,r){"use strict";var n=e("../data").delimiter;t.exports={useBase64:!1,setBase64Flag:function(e){this.useBase64=e},encodeData:function(e){return encodeURIComponent(e).replace(/\!/g,"%21").replace(/\~/g,"%7E").replace(/\*/g,"%2A").replace(/\'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29")},decodeData:function(e){try{return decodeURIComponent(e).replace(/\%21/g,"!").replace(/\%7E/g,"~").replace(/\%2A/g,"*").replace(/\%27/g,"'").replace(/\%28/g,"(").replace(/\%29/g,")")}catch(t){try{return unescape(e)}catch(r){return""}}},set:function(e,t,r,n,a){var i,s;if(r){var o=new Date;o.setTime(o.getTime()+60*r*1e3),i="; expires="+o.toGMTString()}else i="";s=n&&!a?";domain=."+n:"";var c=this.encodeData(t);this.useBase64&&(c=btoa(c).replace(/=+$/,"")),document.cookie=this.encodeData(e)+"="+c+i+s+"; path=/"},get:function(e){for(var t=this.encodeData(e)+"=",r=document.cookie.split(";"),n=0;n<r.length;n++){for(var a=r[n];" "===a.charAt(0);)a=a.substring(1,a.length);if(0===a.indexOf(t)){var i=a.substring(t.length,a.length);if(/^[A-Za-z0-9+/]+$/.test(i))try{i=atob(i.padEnd(4*Math.ceil(i.length/4),"="))}catch(s){}return this.decodeData(i)}}return null},destroy:function(e,t,r){this.set(e,"",-1,t,r)},parse:function(e){var t=[],r={};if("string"==typeof e)t.push(e);else for(var a in e)e.hasOwnProperty(a)&&t.push(e[a]);for(var i=0;i<t.length;i++){var s;r[this.unsbjs(t[i])]={},s=this.get(t[i])?this.get(t[i]).split(n):[];for(var o=0;o<s.length;o++){var c=s[o].split("="),u=c.splice(0,1);u.push(c.join("=")),r[this.unsbjs(t[i])][u[0]]=this.decodeData(u[1])}}return r},unsbjs:function(e){return e.replace("sbjs_","")}}},{"../data":2}],4:[function(e,t,r){"use strict";t.exports={parse:function(e){for(var t=this.parseOptions,r=t.parser[t.strictMode?"strict":"loose"].exec(e),n={},a=14;a--;)n[t.key[a]]=r[a]||"";return n[t.q.name]={},n[t.key[12]].replace(t.q.parser,function(e,r,a){r&&(n[t.q.name][r]=a)}),n},parseOptions:{strictMode:!1,key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}},getParam:function(e){for(var t={},r=(e||window.location.search.substring(1)).split("&"),n=0;n<r.length;n++){var a=r[n].split("=");if("undefined"==typeof t[a[0]])t[a[0]]=a[1];else if("string"==typeof t[a[0]]){var i=[t[a[0]],a[1]];t[a[0]]=i}else t[a[0]].push(a[1])}return t},getHost:function(e){return this.parse(e).host.replace("www.","")}}},{}],5:[function(e,t,r){"use strict";t.exports={escapeRegexp:function(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},setDate:function(e,t){var r=e.getTimezoneOffset()/60,n=e.getHours(),a=t||0===t?t:-r;return e.setHours(n+r+a),e.getFullYear()+"-"+this.setLeadingZeroToInt(e.getMonth()+1,2)+"-"+this.setLeadingZeroToInt(e.getDate(),2)+" "+this.setLeadingZeroToInt(e.getHours(),2)+":"+this.setLeadingZeroToInt(e.getMinutes(),2)+":"+this.setLeadingZeroToInt(e.getSeconds(),2)},setLeadingZeroToInt:function(e,t){for(var r=e+"";r.length<t;)r="0"+r;return r},randomInt:function(e,t){return Math.floor(Math.random()*(t-e+1))+e}}},{}],6:[function(e,t,r){"use strict";var n=e("./data"),a=e("./terms"),i=e("./helpers/cookies"),s=e("./helpers/uri"),o=e("./helpers/utils"),c=e("./params"),u=e("./migrations");t.exports=function(e){var t,r,p,f,m,d,l,g,h,y,_,v,b,x=c.fetch(e),k=s.getParam(),w=x.domain.host,q=x.domain.isolate,I=x.lifetime;function j(e){switch(e){case a.traffic.utm:t=a.traffic.utm,r="undefined"!=typeof k.utm_source?k.utm_source:"undefined"!=typeof k.gclid?"google":"undefined"!=typeof k.yclid?"yandex":a.none,p="undefined"!=typeof k.utm_medium?k.utm_medium:"undefined"!=typeof k.gclid?"cpc":"undefined"!=typeof k.yclid?"cpc":a.none,f="undefined"!=typeof k.utm_campaign?k.utm_campaign:"undefined"!=typeof k[x.campaign_param]?k[x.campaign_param]:"undefined"!=typeof k.gclid?"google_cpc":"undefined"!=typeof k.yclid?"yandex_cpc":a.none,m="undefined"!=typeof k.utm_content?k.utm_content:"undefined"!=typeof k[x.content_param]?k[x.content_param]:a.none,l=k.utm_id||a.none,g=k.utm_source_platform||a.none,h=k.utm_creative_format||a.none,y=k.utm_marketing_tactic||a.none,d="undefined"!=typeof k.utm_term?k.utm_term:"undefined"!=typeof k[x.term_param]?k[x.term_param]:function(){var e=document.referrer;if(k.utm_term)return k.utm_term;if(!(e&&s.parse(e).host&&s.parse(e).host.match(/^(?:.*\.)?yandex\..{2,9}$/i)))return!1;try{return s.getParam(s.parse(document.referrer).query).text}catch(t){return!1}}()||a.none;break;case a.traffic.organic:t=a.traffic.organic,r=r||s.getHost(document.referrer),p=a.referer.organic,f=a.none,m=a.none,d=a.none,l=a.none,g=a.none,h=a.none,y=a.none;break;case a.traffic.referral:t=a.traffic.referral,r=r||s.getHost(document.referrer),p=p||a.referer.referral,f=a.none,m=s.parse(document.referrer).path,d=a.none,l=a.none,g=a.none,h=a.none,y=a.none;break;case a.traffic.typein:t=a.traffic.typein,r=x.typein_attributes.source,p=x.typein_attributes.medium,f=a.none,m=a.none,d=a.none,l=a.none,g=a.none,h=a.none,y=a.none;break;default:t=a.oops,r=a.oops,p=a.oops,f=a.oops,m=a.oops,d=a.oops,l=a.oops,g=a.oops,h=a.oops,y=a.oops}var i={type:t,source:r,medium:p,campaign:f,content:m,term:d,id:l,platform:g,format:h,tactic:y};return n.pack.main(i)}function R(e){var t=document.referrer;switch(e){case a.traffic.organic:return!!t&&H(t)&&function(e){var t=new RegExp("^(?:.*\\.)?"+o.escapeRegexp("yandex")+"\\..{2,9}$"),n=new RegExp(".*"+o.escapeRegexp("text")+"=.*"),a=new RegExp("^(?:www\\.)?"+o.escapeRegexp("google")+"\\..{2,9}$");if(s.parse(e).query&&s.parse(e).host.match(t)&&s.parse(e).query.match(n))return r="yandex",!0;if(s.parse(e).host.match(a))return r="google",!0;if(!s.parse(e).query)return!1;for(var i=0;i<x.organics.length;i++){if(s.parse(e).host.match(new RegExp("^(?:.*\\.)?"+o.escapeRegexp(x.organics[i].host)+"$","i"))&&s.parse(e).query.match(new RegExp(".*"+o.escapeRegexp(x.organics[i].param)+"=.*","i")))return r=x.organics[i].display||x.organics[i].host,!0;if(i+1===x.organics.length)return!1}}(t);case a.traffic.referral:return!!t&&H(t)&&function(e){if(!(x.referrals.length>0))return r=s.getHost(e),!0;for(var t=0;t<x.referrals.length;t++){if(s.parse(e).host.match(new RegExp("^(?:.*\\.)?"+o.escapeRegexp(x.referrals[t].host)+"$","i")))return r=x.referrals[t].display||x.referrals[t].host,p=x.referrals[t].medium||a.referer.referral,!0;if(t+1===x.referrals.length)return r=s.getHost(e),!0}}(t);default:return!1}}function H(e){if(x.domain){if(q)return s.getHost(e)!==s.getHost(w);var t=new RegExp("^(?:.*\\.)?"+o.escapeRegexp(w)+"$","i");return!s.getHost(e).match(t)}return s.getHost(e)!==s.getHost(document.location.href)}function D(){i.set(n.containers.current_extra,n.pack.extra(x.timezone_offset),I,w,q),i.get(n.containers.first_extra)||i.set(n.containers.first_extra,n.pack.extra(x.timezone_offset),I,w,q)}return i.setBase64Flag(x.base64),u.go(I,w,q),i.set(n.containers.current,function(){var e;if("undefined"!=typeof k.utm_source||"undefined"!=typeof k.utm_medium||"undefined"!=typeof k.utm_campaign||"undefined"!=typeof k.utm_content||"undefined"!=typeof k.utm_term||"undefined"!=typeof k.utm_id||"undefined"!=typeof k.utm_source_platform||"undefined"!=typeof k.utm_creative_format||"undefined"!=typeof k.utm_marketing_tactic||"undefined"!=typeof k.gclid||"undefined"!=typeof k.yclid||"undefined"!=typeof k[x.campaign_param]||"undefined"!=typeof k[x.term_param]||"undefined"!=typeof k[x.content_param])D(),e=j(a.traffic.utm);else if(R(a.traffic.organic))D(),e=j(a.traffic.organic);else if(!i.get(n.containers.session)&&R(a.traffic.referral))D(),e=j(a.traffic.referral);else{if(i.get(n.containers.first)||i.get(n.containers.current))return i.get(n.containers.current);D(),e=j(a.traffic.typein)}return e}(),I,w,q),i.get(n.containers.first)||i.set(n.containers.first,i.get(n.containers.current),I,w,q),i.get(n.containers.udata)?(_=parseInt(i.parse(n.containers.udata)[i.unsbjs(n.containers.udata)][n.aliases.udata.visits])||1,_=i.get(n.containers.session)?_:_+1,v=n.pack.user(_,x.user_ip)):(_=1,v=n.pack.user(_,x.user_ip)),i.set(n.containers.udata,v,I,w,q),i.get(n.containers.session)?(b=parseInt(i.parse(n.containers.session)[i.unsbjs(n.containers.session)][n.aliases.session.pages_seen])||1,b+=1):b=1,i.set(n.containers.session,n.pack.session(b),x.session_length,w,q),x.promocode&&!i.get(n.containers.promocode)&&i.set(n.containers.promocode,n.pack.promo(x.promocode),I,w,q),i.parse(n.containers)}},{"./data":2,"./helpers/cookies":3,"./helpers/uri":4,"./helpers/utils":5,"./migrations":7,"./params":8,"./terms":9}],7:[function(e,t,r){"use strict";var n=e("./data"),a=e("./helpers/cookies");t.exports={go:function(e,t,r){var i,s=this.migrations,o={l:e,d:t,i:r};if(a.get(n.containers.first)||a.get(n.service.migrations)){if(!a.get(n.service.migrations))for(i=0;i<s.length;i++)s[i].go(s[i].id,o)}else{var c=[];for(i=0;i<s.length;i++)c.push(s[i].id);var u="";for(i=0;i<c.length;i++)u+=c[i]+"=1",i<c.length-1&&(u+=n.delimiter);a.set(n.service.migrations,u,o.l,o.d,o.i)}},migrations:[{id:"1418474375998",version:"1.0.0-beta",go:function(e,t){var r=e+"=1",i=e+"=0",s=function(e,t,r){return t||r?e:n.delimiter};try{var o=[];for(var c in n.containers)n.containers.hasOwnProperty(c)&&o.push(n.containers[c]);for(var u=0;u<o.length;u++)if(a.get(o[u])){var p=a.get(o[u]).replace(/(\|)?\|(\|)?/g,s);a.destroy(o[u],t.d,t.i),a.destroy(o[u],t.d,!t.i),a.set(o[u],p,t.l,t.d,t.i)}a.get(n.containers.session)&&a.set(n.containers.session,n.pack.session(0),t.l,t.d,t.i),a.set(n.service.migrations,r,t.l,t.d,t.i)}catch(f){a.set(n.service.migrations,i,t.l,t.d,t.i)}}}]}},{"./data":2,"./helpers/cookies":3}],8:[function(e,t,r){"use strict";var n=e("./terms"),a=e("./helpers/uri");t.exports={fetch:function(e){var t=e||{},r={};if(r.lifetime=this.validate.checkFloat(t.lifetime)||6,r.lifetime=parseInt(30*r.lifetime*24*60),r.session_length=this.validate.checkInt(t.session_length)||30,r.timezone_offset=this.validate.checkInt(t.timezone_offset),r.base64=t.base64||!1,r.campaign_param=t.campaign_param||!1,r.term_param=t.term_param||!1,r.content_param=t.content_param||!1,r.user_ip=t.user_ip||n.none,t.promocode?(r.promocode={},r.promocode.min=parseInt(t.promocode.min)||1e5,r.promocode.max=parseInt(t.promocode.max)||999999):r.promocode=!1,t.typein_attributes&&t.typein_attributes.source&&t.typein_attributes.medium?(r.typein_attributes={},r.typein_attributes.source=t.typein_attributes.source,r.typein_attributes.medium=t.typein_attributes.medium):r.typein_attributes={source:"(direct)",medium:"(none)"},t.domain&&this.validate.isString(t.domain)?r.domain={host:t.domain,isolate:!1}:t.domain&&t.domain.host?r.domain=t.domain:r.domain={host:a.getHost(document.location.hostname),isolate:!1},r.referrals=[],t.referrals&&t.referrals.length>0)for(var i=0;i<t.referrals.length;i++)t.referrals[i].host&&r.referrals.push(t.referrals[i]);if(r.organics=[],t.organics&&t.organics.length>0)for(var s=0;s<t.organics.length;s++)t.organics[s].host&&t.organics[s].param&&r.organics.push(t.organics[s]);return r.organics.push({host:"bing.com",param:"q",display:"bing"}),r.organics.push({host:"yahoo.com",param:"p",display:"yahoo"}),r.organics.push({host:"about.com",param:"q",display:"about"}),r.organics.push({host:"aol.com",param:"q",display:"aol"}),r.organics.push({host:"ask.com",param:"q",display:"ask"}),r.organics.push({host:"globososo.com",param:"q",display:"globo"}),r.organics.push({host:"go.mail.ru",param:"q",display:"go.mail.ru"}),r.organics.push({host:"rambler.ru",param:"query",display:"rambler"}),r.organics.push({host:"tut.by",param:"query",display:"tut.by"}),r.referrals.push({host:"t.co",display:"twitter.com"}),r.referrals.push({host:"plus.url.google.com",display:"plus.google.com"}),r},validate:{checkFloat:function(e){return!(!e||!this.isNumeric(parseFloat(e)))&&parseFloat(e)},checkInt:function(e){return!(!e||!this.isNumeric(parseInt(e)))&&parseInt(e)},isNumeric:function(e){return!isNaN(e)},isString:function(e){return"[object String]"===Object.prototype.toString.call(e)}}}},{"./helpers/uri":4,"./terms":9}],9:[function(e,t,r){"use strict";t.exports={traffic:{utm:"utm",organic:"organic",referral:"referral",typein:"typein"},referer:{referral:"referral",organic:"organic",social:"social"},none:"(none)",oops:"(Houston, we have a problem)"}},{}]},{},[1])(1)});
!function(t){"use strict";const e=t.params,n=(document.querySelector.bind(document),(t,e)=>e.split(".").reduce((t,e)=>t&&t[e],t)),i=()=>null,s=t=>null===t||t===undefined?"":t,o="wc/store/checkout";function a(t){window.wp&&window.wp.data&&window.wp.data.dispatch&&window.wc&&window.wc.wcBlocksData&&window.wp.data.dispatch(window.wc.wcBlocksData.CHECKOUT_STORE_KEY).__internalSetExtensionData("woocommerce/order-attribution",t,!0)}function r(){return"undefined"!=typeof sbjs}function c(){if(window.wp&&window.wp.data&&"function"==typeof window.wp.data.subscribe){const e=window.wp.data.subscribe(function(){e(),a(t.getAttributionData())},o)}}t.getAttributionData=function(){const s=e.allowTracking&&r()?n:i,o=r()?sbjs.get:{},a=Object.entries(t.fields).map(([t,e])=>[t,s(o,e)]);return Object.fromEntries(a)},t.setOrderTracking=function(n){if(e.allowTracking=n,n){if(!r())return;sbjs.init({lifetime:Number(e.lifetime),session_length:Number(e.session),base64:Boolean(e.base64),timezone_offset:"0"})}else!function(){const t=window.location.hostname;["sbjs_current","sbjs_current_add","sbjs_first","sbjs_first_add","sbjs_session","sbjs_udata","sbjs_migrations","sbjs_promo"].forEach(e=>{document.cookie=`${e}=; path=/; max-age=-999; domain=.${t};`})}();const i=t.getAttributionData();!function(t){for(const e of document.querySelectorAll("wc-order-attribution-inputs"))e.values=t}(i),a(i)},t.setOrderTracking(e.allowTracking),"loading"===document.readyState?document.addEventListener("DOMContentLoaded",c):c(),window.customElements.define("wc-order-attribution-inputs",class extends HTMLElement{constructor(){if(super(),this._fieldNames=Object.keys(t.fields),this.hasOwnProperty("_values")){let t=this.values;delete this.values,this.values=t||{}}}connectedCallback(){this.innerHTML="";const t=new DocumentFragment;for(const n of this._fieldNames){const i=document.createElement("input");i.type="hidden",i.name=`${e.prefix}${n}`,i.value=s(this.values&&this.values[n]||""),t.appendChild(i)}this.appendChild(t)}set values(t){if(this._values=t,this.isConnected)for(const t of this._fieldNames){const n=this.querySelector(`input[name="${e.prefix}${t}"]`);n?n.value=s(this.values[t]):console.warn(`Field "${t}" not found. `+"Most likely, the '<wc-order-attribution-inputs>' element was manipulated.")}}get values(){return this._values}})}(window.wc_order_attribution);
function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,_toPropertyKey(descriptor.key),descriptor)}}function _createClass(Constructor,protoProps,staticProps){return protoProps&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),Constructor}function _toPropertyKey(arg){var key=_toPrimitive(arg,"string");return _typeof(key)==="symbol"?key:String(key)}function _toPrimitive(input,hint){if(_typeof(input)!=="object"||input===null)return input;var prim=input[Symbol.toPrimitive];if(prim!==undefined){var res=prim.call(input,hint||"default");if(_typeof(res)!=="object")return res;throw new TypeError("@@toPrimitive must return a primitive value.")}return(hint==="string"?String:Number)(input)}function _typeof(obj){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}function uncode_progress_bar(){jQuery.each(jQuery(".vc_progress_bar"),function(index,val){if(UNCODE.isUnmodalOpen&&!val.closest("#unmodal-content"))return;if(!UNCODE.isMobile)new Waypoint({context:UNCODE.isUnmodalOpen?document.getElementById("unmodal-content"):window,element:val,handler:function(){var element=jQuery(this.element);element.find(".vc_single_bar").each(function(index){var $this=jQuery(this),bar=$this.find(".vc_bar"),val=bar.data("percentage-value");setTimeout(function(){bar.css({width:val+"%"})},index*200)})},offset:"80%"});else{var element=jQuery(val);element.find(".vc_single_bar").each(function(index){var $this=jQuery(this),bar=$this.find(".vc_bar"),val=bar.data("percentage-value");setTimeout(function(){bar.css({width:val+"%"})},index*200)})}})}function onYouTubeIframeAPIReady(){YTplayers=new Array,jQuery(".uncode-video-container.video").each(function(){var playerY;if(jQuery(this).attr("data-provider")=="youtube"){var id=jQuery(this).attr("data-id"),start=jQuery(this).attr("data-start"),end=jQuery(this).attr("data-end");start=typeof start&&start!==null?start:0,end=typeof end&&end!==null?end:0,options=jQuery(window).data("okoptions-"+id);if(typeof options=="undefined")return!0;options.time=jQuery(this).attr("data-t"),playerY=new YT.Player("okplayer-"+id,{videoId:options.video?options.video.id:null,playerVars:{autohide:1,autoplay:jQuery(this).hasClass("is-no-control")?options.autoplay:0,disablekb:1,cc_load_policy:options.captions,controls:0,enablejsapi:1,fs:0,modestbranding:1,origin:window.location.origin||window.location.protocol+"//"+window.location.hostname,iv_load_policy:options.annotations,loop:options.loop,showinfo:0,rel:0,wmode:"opaque",hd:options.hd,mute:1,start:start,end:end},events:{onReady:OKEvents.yt.ready,onStateChange:OKEvents.yt.onStateChange,onError:OKEvents.yt.error}}),YTplayers[id]=playerY,playerY.videoId=id}})}function vimeoPlayerReady(id){options=jQuery(window).data("okoptions-"+id);if(typeof options=="undefined")return!0;var jIframe=options.jobject,iframe=jIframe[0];jIframe.attr("src",jIframe.data("src"));var playerV=new Vimeo.Player(iframe);playerV.on("loaded",function(e){OKEvents.v.onReady(iframe);var carouselContainer=jQuery(iframe).closest(".owl-carousel");carouselContainer.length&&UNCODE.owlPlayVideo(carouselContainer),OKEvents.utils.isMobile()?OKEvents.v.onPlay(playerV):(playerV.on("play",function(){OKEvents.v.onPlay(playerV),jQuery(window).trigger("okevents.v.play",[playerV])}),playerV.on("pause",function(){OKEvents.v.onPause,jQuery(window).trigger("okevents.v.pause",[playerV])}),playerV.on("ended",function(){OKEvents.v.onFinish,jQuery(window).trigger("okevents.v.ended",[playerV])}));if(options.time!=null){var optsTimeStr=options.time.replace("t=",""),timeV="";if(/[a-zA-Z]/g.test(optsTimeStr)){var timeArr=optsTimeStr.split(/([^\d.-])/);for(var i=0;i<timeArr.length;i++)timeArr[i]==="h"?timeV+=parseFloat(timeArr[i-1])*3600:timeArr[i]==="m"?timeV+=parseFloat(timeArr[i-1])*60:timeArr[i]==="s"&&(timeV+=parseFloat(timeArr[i-1]))}else timeV=optsTimeStr;playerV.setCurrentTime(timeV)}playerV.setVolume(0),playerV.play(),jQuery(iframe).css({visibility:"visible",opacity:1}),jQuery(iframe).closest(".uncode-video-container:not(.t-entry-drop)").css("opacity","1"),jQuery(iframe).closest("#page-header").addClass("video-started"),jQuery(iframe).closest(".background-wrapper").find(".block-bg-blend-mode.not-ie").css("opacity","1"),jQuery(window).trigger("okevents.v.loaded",[playerV])})}(function(global,factory){typeof exports=="object"&&typeof module!="undefined"?factory(exports):typeof define=="function"&&define.amd?define(["exports"],factory):(global=global||self,factory(global.window=global.window||{}))})(this,function(exports){"use strict";function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,subClass.__proto__=superClass}function _assertThisInitialized(self){if(self===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}var _config={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},_defaults={duration:.5,overwrite:!1,delay:0},_suppressOverwrites,_reverting,_context,_bigNum=1e8,_tinyNum=1/_bigNum,_2PI=Math.PI*2,_HALF_PI=_2PI/4,_gsID=0,_sqrt=Math.sqrt,_cos=Math.cos,_sin=Math.sin,_isString=function _isString(value){return typeof value=="string"},_isFunction=function _isFunction(value){return typeof value=="function"},_isNumber=function _isNumber(value){return typeof value=="number"},_isUndefined=function _isUndefined(value){return typeof value=="undefined"},_isObject=function _isObject(value){return typeof value=="object"},_isNotFalse=function _isNotFalse(value){return value!==!1},_windowExists=function _windowExists(){return typeof window!="undefined"},_isFuncOrString=function _isFuncOrString(value){return _isFunction(value)||_isString(value)},_isTypedArray=typeof ArrayBuffer=="function"&&ArrayBuffer.isView||function(){},_isArray=Array.isArray,_strictNumExp=/(?:-?\.?\d|\.)+/gi,_numExp=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,_numWithUnitExp=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,_complexStringNumExp=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,_relExp=/[+-]=-?[.\d]+/,_delimitedValueExp=/[^,'"\[\]\s]+/gi,_unitExp=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,_globalTimeline,_win,_coreInitted,_doc,_globals={},_installScope={},_coreReady,_install=function _install(scope){return(_installScope=_merge(scope,_globals))&&gsap},_missingPlugin=function _missingPlugin(property,value){return console.warn("Invalid property",property,"set to",value,"Missing plugin? gsap.registerPlugin()")},_warn=function _warn(message,suppress){return!suppress&&console.warn(message)},_addGlobal=function _addGlobal(name,obj){return name&&(_globals[name]=obj)&&_installScope&&(_installScope[name]=obj)||_globals},_emptyFunc=function _emptyFunc(){return 0},_startAtRevertConfig={suppressEvents:!0,isStart:!0,kill:!1},_revertConfigNoKill={suppressEvents:!0,kill:!1},_revertConfig={suppressEvents:!0},_reservedProps={},_lazyTweens=[],_lazyLookup={},_lastRenderedFrame,_plugins={},_effects={},_nextGCFrame=30,_harnessPlugins=[],_callbackNames="",_harness=function _harness(targets){var target=targets[0],harnessPlugin,i;_isObject(target)||_isFunction(target)||(targets=[targets]);if(!(harnessPlugin=(target._gsap||{}).harness)){i=_harnessPlugins.length;while(i--&&!_harnessPlugins[i].targetTest(target));harnessPlugin=_harnessPlugins[i]}i=targets.length;while(i--)targets[i]&&(targets[i]._gsap||(targets[i]._gsap=new GSCache(targets[i],harnessPlugin)))||targets.splice(i,1);return targets},_getCache=function _getCache(target){return target._gsap||_harness(toArray(target))[0]._gsap},_getProperty=function _getProperty(target,property,v){return(v=target[property])&&_isFunction(v)?target[property]():_isUndefined(v)&&target.getAttribute&&target.getAttribute(property)||v},_forEachName=function _forEachName(names,func){return(names=names.split(",")).forEach(func)||names},_round=function _round(value){return Math.round(value*1e5)/1e5||0},_roundPrecise=function _roundPrecise(value){return Math.round(value*1e7)/1e7||0},_parseRelative=function _parseRelative(start,value){var operator=value.charAt(0),end=parseFloat(value.substr(2));return start=parseFloat(start),operator==="+"?start+end:operator==="-"?start-end:operator==="*"?start*end:start/end},_arrayContainsAny=function _arrayContainsAny(toSearch,toFind){var l=toFind.length,i=0;for(;toSearch.indexOf(toFind[i])<0&&++i<l;);return i<l},_lazyRender=function _lazyRender(){var l=_lazyTweens.length,a=_lazyTweens.slice(0),i,tween;_lazyLookup={},_lazyTweens.length=0;for(i=0;i<l;i++)tween=a[i],tween&&tween._lazy&&(tween.render(tween._lazy[0],tween._lazy[1],!0)._lazy=0)},_lazySafeRender=function _lazySafeRender(animation,time,suppressEvents,force){_lazyTweens.length&&!_reverting&&_lazyRender(),animation.render(time,suppressEvents,force||_reverting&&time<0&&(animation._initted||animation._startAt)),_lazyTweens.length&&!_reverting&&_lazyRender()},_numericIfPossible=function _numericIfPossible(value){var n=parseFloat(value);return(n||n===0)&&(value+"").match(_delimitedValueExp).length<2?n:_isString(value)?value.trim():value},_passThrough=function _passThrough(p){return p},_setDefaults=function _setDefaults(obj,defaults){for(var p in defaults)p in obj||(obj[p]=defaults[p]);return obj},_setKeyframeDefaults=function _setKeyframeDefaults(excludeDuration){return function(obj,defaults){for(var p in defaults)p in obj||p==="duration"&&excludeDuration||p==="ease"||(obj[p]=defaults[p])}},_merge=function _merge(base,toMerge){for(var p in toMerge)base[p]=toMerge[p];return base},_mergeDeep=function _mergeDeep(base,toMerge){for(var p in toMerge)p!=="__proto__"&&p!=="constructor"&&p!=="prototype"&&(base[p]=_isObject(toMerge[p])?_mergeDeep(base[p]||(base[p]={}),toMerge[p]):toMerge[p]);return base},_copyExcluding=function _copyExcluding(obj,excluding){var copy={},p;for(p in obj)p in excluding||(copy[p]=obj[p]);return copy},_inheritDefaults=function _inheritDefaults(vars){var parent=vars.parent||_globalTimeline,func=vars.keyframes?_setKeyframeDefaults(_isArray(vars.keyframes)):_setDefaults;if(_isNotFalse(vars.inherit))while(parent)func(vars,parent.vars.defaults),parent=parent.parent||parent._dp;return vars},_arraysMatch=function _arraysMatch(a1,a2){var i=a1.length,match=i===a2.length;while(match&&i--&&a1[i]===a2[i]);return i<0},_addLinkedListItem=function _addLinkedListItem(parent,child,firstProp,lastProp,sortBy){firstProp===void 0&&(firstProp="_first"),lastProp===void 0&&(lastProp="_last");var prev=parent[lastProp],t;if(sortBy){t=child[sortBy];while(prev&&prev[sortBy]>t)prev=prev._prev}return prev?(child._next=prev._next,prev._next=child):(child._next=parent[firstProp],parent[firstProp]=child),child._next?child._next._prev=child:parent[lastProp]=child,child._prev=prev,child.parent=child._dp=parent,child},_removeLinkedListItem=function _removeLinkedListItem(parent,child,firstProp,lastProp){firstProp===void 0&&(firstProp="_first"),lastProp===void 0&&(lastProp="_last");var prev=child._prev,next=child._next;prev?prev._next=next:parent[firstProp]===child&&(parent[firstProp]=next),next?next._prev=prev:parent[lastProp]===child&&(parent[lastProp]=prev),child._next=child._prev=child.parent=null},_removeFromParent=function _removeFromParent(child,onlyIfParentHasAutoRemove){child.parent&&(!onlyIfParentHasAutoRemove||child.parent.autoRemoveChildren)&&child.parent.remove&&child.parent.remove(child),child._act=0},_uncache=function _uncache(animation,child){if(animation&&(!child||child._end>animation._dur||child._start<0)){var a=animation;while(a)a._dirty=1,a=a.parent}return animation},_recacheAncestors=function _recacheAncestors(animation){var parent=animation.parent;while(parent&&parent.parent)parent._dirty=1,parent.totalDuration(),parent=parent.parent;return animation},_rewindStartAt=function _rewindStartAt(tween,totalTime,suppressEvents,force){return tween._startAt&&(_reverting?tween._startAt.revert(_revertConfigNoKill):tween.vars.immediateRender&&!tween.vars.autoRevert||tween._startAt.render(totalTime,!0,force))},_hasNoPausedAncestors=function _hasNoPausedAncestors(animation){return!animation||animation._ts&&_hasNoPausedAncestors(animation.parent)},_elapsedCycleDuration=function _elapsedCycleDuration(animation){return animation._repeat?_animationCycle(animation._tTime,animation=animation.duration()+animation._rDelay)*animation:0},_animationCycle=function _animationCycle(tTime,cycleDuration){var whole=Math.floor(tTime/=cycleDuration);return tTime&&whole===tTime?whole-1:whole},_parentToChildTotalTime=function _parentToChildTotalTime(parentTime,child){return(parentTime-child._start)*child._ts+(child._ts>=0?0:child._dirty?child.totalDuration():child._tDur)},_setEnd=function _setEnd(animation){return animation._end=_roundPrecise(animation._start+(animation._tDur/Math.abs(animation._ts||animation._rts||_tinyNum)||0))},_alignPlayhead=function _alignPlayhead(animation,totalTime){var parent=animation._dp;return parent&&parent.smoothChildTiming&&animation._ts&&(animation._start=_roundPrecise(parent._time-(animation._ts>0?totalTime/animation._ts:((animation._dirty?animation.totalDuration():animation._tDur)-totalTime)/-animation._ts)),_setEnd(animation),parent._dirty||_uncache(parent,animation)),animation},_postAddChecks=function _postAddChecks(timeline,child){var t;if(child._time||!child._dur&&child._initted||child._start<timeline._time&&(child._dur||!child.add))t=_parentToChildTotalTime(timeline.rawTime(),child),(!child._dur||_clamp(0,child.totalDuration(),t)-child._tTime>_tinyNum)&&child.render(t,!0);if(_uncache(timeline,child)._dp&&timeline._initted&&timeline._time>=timeline._dur&&timeline._ts){if(timeline._dur<timeline.duration()){t=timeline;while(t._dp)t.rawTime()>=0&&t.totalTime(t._tTime),t=t._dp}timeline._zTime=-_tinyNum}},_addToTimeline=function _addToTimeline(timeline,child,position,skipChecks){return child.parent&&_removeFromParent(child),child._start=_roundPrecise((_isNumber(position)?position:position||timeline!==_globalTimeline?_parsePosition(timeline,position,child):timeline._time)+child._delay),child._end=_roundPrecise(child._start+(child.totalDuration()/Math.abs(child.timeScale())||0)),_addLinkedListItem(timeline,child,"_first","_last",timeline._sort?"_start":0),_isFromOrFromStart(child)||(timeline._recent=child),skipChecks||_postAddChecks(timeline,child),timeline._ts<0&&_alignPlayhead(timeline,timeline._tTime),timeline},_scrollTrigger=function _scrollTrigger(animation,trigger){return(_globals.ScrollTrigger||_missingPlugin("scrollTrigger",trigger))&&_globals.ScrollTrigger.create(trigger,animation)},_attemptInitTween=function _attemptInitTween(tween,time,force,suppressEvents,tTime){_initTween(tween,time,tTime);if(!tween._initted)return 1;if(!force&&tween._pt&&!_reverting&&(tween._dur&&tween.vars.lazy!==!1||!tween._dur&&tween.vars.lazy)&&_lastRenderedFrame!==_ticker.frame)return _lazyTweens.push(tween),tween._lazy=[tTime,suppressEvents],1},_parentPlayheadIsBeforeStart=function _parentPlayheadIsBeforeStart(_ref){var parent=_ref.parent;return parent&&parent._ts&&parent._initted&&!parent._lock&&(parent.rawTime()<0||_parentPlayheadIsBeforeStart(parent))},_isFromOrFromStart=function _isFromOrFromStart(_ref2){var data=_ref2.data;return data==="isFromStart"||data==="isStart"},_renderZeroDurationTween=function _renderZeroDurationTween(tween,totalTime,suppressEvents,force){var prevRatio=tween.ratio,ratio=totalTime<0||!totalTime&&(!tween._start&&_parentPlayheadIsBeforeStart(tween)&&(!!tween._initted||!_isFromOrFromStart(tween))||(tween._ts<0||tween._dp._ts<0)&&!_isFromOrFromStart(tween))?0:1,repeatDelay=tween._rDelay,tTime=0,pt,iteration,prevIteration;repeatDelay&&tween._repeat&&(tTime=_clamp(0,tween._tDur,totalTime),iteration=_animationCycle(tTime,repeatDelay),tween._yoyo&&iteration&1&&(ratio=1-ratio),iteration!==_animationCycle(tween._tTime,repeatDelay)&&(prevRatio=1-ratio,tween.vars.repeatRefresh&&tween._initted&&tween.invalidate()));if(ratio!==prevRatio||_reverting||force||tween._zTime===_tinyNum||!totalTime&&tween._zTime){if(!tween._initted&&_attemptInitTween(tween,totalTime,force,suppressEvents,tTime))return;prevIteration=tween._zTime,tween._zTime=totalTime||(suppressEvents?_tinyNum:0),suppressEvents||(suppressEvents=totalTime&&!prevIteration),tween.ratio=ratio,tween._from&&(ratio=1-ratio),tween._time=0,tween._tTime=tTime,pt=tween._pt;while(pt)pt.r(ratio,pt.d),pt=pt._next;totalTime<0&&_rewindStartAt(tween,totalTime,suppressEvents,!0),tween._onUpdate&&!suppressEvents&&_callback(tween,"onUpdate"),tTime&&tween._repeat&&!suppressEvents&&tween.parent&&_callback(tween,"onRepeat"),(totalTime>=tween._tDur||totalTime<0)&&tween.ratio===ratio&&(ratio&&_removeFromParent(tween,1),!suppressEvents&&!_reverting&&(_callback(tween,ratio?"onComplete":"onReverseComplete",!0),tween._prom&&tween._prom()))}else tween._zTime||(tween._zTime=totalTime)},_findNextPauseTween=function _findNextPauseTween(animation,prevTime,time){var child;if(time>prevTime){child=animation._first;while(child&&child._start<=time){if(child.data==="isPause"&&child._start>prevTime)return child;child=child._next}}else{child=animation._last;while(child&&child._start>=time){if(child.data==="isPause"&&child._start<prevTime)return child;child=child._prev}}},_setDuration=function _setDuration(animation,duration,skipUncache,leavePlayhead){var repeat=animation._repeat,dur=_roundPrecise(duration)||0,totalProgress=animation._tTime/animation._tDur;return totalProgress&&!leavePlayhead&&(animation._time*=dur/animation._dur),animation._dur=dur,animation._tDur=repeat?repeat<0?1e10:_roundPrecise(dur*(repeat+1)+animation._rDelay*repeat):dur,totalProgress>0&&!leavePlayhead&&_alignPlayhead(animation,animation._tTime=animation._tDur*totalProgress),animation.parent&&_setEnd(animation),skipUncache||_uncache(animation.parent,animation),animation},_onUpdateTotalDuration=function _onUpdateTotalDuration(animation){return animation instanceof Timeline?_uncache(animation):_setDuration(animation,animation._dur)},_zeroPosition={_start:0,endTime:_emptyFunc,totalDuration:_emptyFunc},_parsePosition=function _parsePosition(animation,position,percentAnimation){var labels=animation.labels,recent=animation._recent||_zeroPosition,clippedDuration=animation.duration()>=_bigNum?recent.endTime(!1):animation._dur,i,offset,isPercent;return _isString(position)&&(isNaN(position)||position in labels)?(offset=position.charAt(0),isPercent=position.substr(-1)==="%",i=position.indexOf("="),offset==="<"||offset===">"?(i>=0&&(position=position.replace(/=/,"")),(offset==="<"?recent._start:recent.endTime(recent._repeat>=0))+(parseFloat(position.substr(1))||0)*(isPercent?(i<0?recent:percentAnimation).totalDuration()/100:1)):i<0?(position in labels||(labels[position]=clippedDuration),labels[position]):(offset=parseFloat(position.charAt(i-1)+position.substr(i+1)),isPercent&&percentAnimation&&(offset=offset/100*(_isArray(percentAnimation)?percentAnimation[0]:percentAnimation).totalDuration()),i>1?_parsePosition(animation,position.substr(0,i-1),percentAnimation)+offset:clippedDuration+offset)):position==null?clippedDuration:+position},_createTweenType=function _createTweenType(type,params,timeline){var isLegacy=_isNumber(params[1]),varsIndex=(isLegacy?2:1)+(type<2?0:1),vars=params[varsIndex],irVars,parent;isLegacy&&(vars.duration=params[1]),vars.parent=timeline;if(type){irVars=vars,parent=timeline;while(parent&&!("immediateRender"in irVars))irVars=parent.vars.defaults||{},parent=_isNotFalse(parent.vars.inherit)&&parent.parent;vars.immediateRender=_isNotFalse(irVars.immediateRender),type<2?vars.runBackwards=1:vars.startAt=params[varsIndex-1]}return new Tween(params[0],vars,params[varsIndex+1])},_conditionalReturn=function _conditionalReturn(value,func){return value||value===0?func(value):func},_clamp=function _clamp(min,max,value){return value<min?min:value>max?max:value},getUnit=function getUnit(value,v){return!_isString(value)||!(v=_unitExp.exec(value))?"":v[1]},clamp=function clamp(min,max,value){return _conditionalReturn(value,function(v){return _clamp(min,max,v)})},_slice=[].slice,_isArrayLike=function _isArrayLike(value,nonEmpty){return value&&_isObject(value)&&"length"in value&&(!nonEmpty&&!value.length||value.length-1 in value&&_isObject(value[0]))&&!value.nodeType&&value!==_win},_flatten=function _flatten(ar,leaveStrings,accumulator){return accumulator===void 0&&(accumulator=[]),ar.forEach(function(value){var _accumulator;return _isString(value)&&!leaveStrings||_isArrayLike(value,1)?(_accumulator=accumulator).push.apply(_accumulator,toArray(value)):accumulator.push(value)})||accumulator},toArray=function toArray(value,scope,leaveStrings){return _context&&!scope&&_context.selector?_context.selector(value):_isString(value)&&!leaveStrings&&(_coreInitted||!_wake())?_slice.call((scope||_doc).querySelectorAll(value),0):_isArray(value)?_flatten(value,leaveStrings):_isArrayLike(value)?_slice.call(value,0):value?[value]:[]},selector=function selector(value){return value=toArray(value)[0]||_warn("Invalid scope")||{},function(v){var el=value.current||value.nativeElement||value;return toArray(v,el.querySelectorAll?el:el===value?_warn("Invalid scope")||_doc.createElement("div"):value)}},shuffle=function shuffle(a){return a.sort(function(){return.5-Math.random()})},distribute=function distribute(v){if(_isFunction(v))return v;var vars=_isObject(v)?v:{each:v},ease=_parseEase(vars.ease),from=vars.from||0,base=parseFloat(vars.base)||0,cache={},isDecimal=from>0&&from<1,ratios=isNaN(from)||isDecimal,axis=vars.axis,ratioX=from,ratioY=from;return _isString(from)?ratioX=ratioY={center:.5,edges:.5,end:1}[from]||0:!isDecimal&&ratios&&(ratioX=from[0],ratioY=from[1]),function(i,target,a){var l=(a||vars).length,distances=cache[l],originX,originY,x,y,d,j,max,min,wrapAt;if(!distances){wrapAt=vars.grid==="auto"?0:(vars.grid||[1,_bigNum])[1];if(!wrapAt){max=-_bigNum;while(max<(max=a[wrapAt++].getBoundingClientRect().left)&&wrapAt<l);wrapAt<l&&wrapAt--}distances=cache[l]=[],originX=ratios?Math.min(wrapAt,l)*ratioX-.5:from%wrapAt,originY=wrapAt===_bigNum?0:ratios?l*ratioY/wrapAt-.5:from/wrapAt|0,max=0,min=_bigNum;for(j=0;j<l;j++)x=j%wrapAt-originX,y=originY-(j/wrapAt|0),distances[j]=d=axis?Math.abs(axis==="y"?y:x):_sqrt(x*x+y*y),d>max&&(max=d),d<min&&(min=d);from==="random"&&shuffle(distances),distances.max=max-min,distances.min=min,distances.v=l=(parseFloat(vars.amount)||parseFloat(vars.each)*(wrapAt>l?l-1:axis?axis==="y"?l/wrapAt:wrapAt:Math.max(wrapAt,l/wrapAt))||0)*(from==="edges"?-1:1),distances.b=l<0?base-l:base,distances.u=getUnit(vars.amount||vars.each)||0,ease=ease&&l<0?_invertEase(ease):ease}return l=(distances[i]-distances.min)/distances.max||0,_roundPrecise(distances.b+(ease?ease(l):l)*distances.v)+distances.u}},_roundModifier=function _roundModifier(v){var p=Math.pow(10,((v+"").split(".")[1]||"").length);return function(raw){var n=_roundPrecise(Math.round(parseFloat(raw)/v)*v*p);return(n-n%1)/p+(_isNumber(raw)?0:getUnit(raw))}},snap=function snap(snapTo,value){var isArray=_isArray(snapTo),radius,is2D;if(!isArray&&_isObject(snapTo)){radius=isArray=snapTo.radius||_bigNum;if(snapTo.values){snapTo=toArray(snapTo.values);if(is2D=!_isNumber(snapTo[0]))radius*=radius}else snapTo=_roundModifier(snapTo.increment)}return _conditionalReturn(value,isArray?_isFunction(snapTo)?function(raw){return is2D=snapTo(raw),Math.abs(is2D-raw)<=radius?is2D:raw}:function(raw){var x=parseFloat(is2D?raw.x:raw),y=parseFloat(is2D?raw.y:0),min=_bigNum,closest=0,i=snapTo.length,dx,dy;while(i--)is2D?(dx=snapTo[i].x-x,dy=snapTo[i].y-y,dx=dx*dx+dy*dy):dx=Math.abs(snapTo[i]-x),dx<min&&(min=dx,closest=i);return closest=!radius||min<=radius?snapTo[closest]:raw,is2D||closest===raw||_isNumber(raw)?closest:closest+getUnit(raw)}:_roundModifier(snapTo))},random=function random(min,max,roundingIncrement,returnFunction){return _conditionalReturn(_isArray(min)?!max:roundingIncrement===!0?!!(roundingIncrement=0):!returnFunction,function(){return _isArray(min)?min[~~(Math.random()*min.length)]:(roundingIncrement=roundingIncrement||1e-5)&&(returnFunction=roundingIncrement<1?Math.pow(10,(roundingIncrement+"").length-2):1)&&Math.floor(Math.round((min-roundingIncrement/2+Math.random()*(max-min+roundingIncrement*.99))/roundingIncrement)*roundingIncrement*returnFunction)/returnFunction})},pipe=function pipe(){for(var _len=arguments.length,functions=new Array(_len),_key=0;_key<_len;_key++)functions[_key]=arguments[_key];return function(value){return functions.reduce(function(v,f){return f(v)},value)}},unitize=function unitize(func,unit){return function(value){return func(parseFloat(value))+(unit||getUnit(value))}},normalize=function normalize(min,max,value){return mapRange(min,max,0,1,value)},_wrapArray=function _wrapArray(a,wrapper,value){return _conditionalReturn(value,function(index){return a[~~wrapper(index)]})},wrap=function wrap(min,max,value){var range=max-min;return _isArray(min)?_wrapArray(min,wrap(0,min.length),max):_conditionalReturn(value,function(value){return(range+(value-min)%range)%range+min})},wrapYoyo=function wrapYoyo(min,max,value){var range=max-min,total=range*2;return _isArray(min)?_wrapArray(min,wrapYoyo(0,min.length-1),max):_conditionalReturn(value,function(value){return value=(total+(value-min)%total)%total||0,min+(value>range?total-value:value)})},_replaceRandom=function _replaceRandom(value){var prev=0,s="",i,nums,end,isArray;while(~(i=value.indexOf("random(",prev)))end=value.indexOf(")",i),isArray=value.charAt(i+7)==="[",nums=value.substr(i+7,end-i-7).match(isArray?_delimitedValueExp:_strictNumExp),s+=value.substr(prev,i-prev)+random(isArray?nums:+nums[0],isArray?0:+nums[1],+nums[2]||1e-5),prev=end+1;return s+value.substr(prev,value.length-prev)},mapRange=function mapRange(inMin,inMax,outMin,outMax,value){var inRange=inMax-inMin,outRange=outMax-outMin;return _conditionalReturn(value,function(value){return outMin+((value-inMin)/inRange*outRange||0)})},interpolate=function interpolate(start,end,progress,mutate){var func=isNaN(start+end)?0:function(p){return(1-p)*start+p*end};if(!func){var isString=_isString(start),master={},p,i,interpolators,l,il;progress===!0&&(mutate=1)&&(progress=null);if(isString)start={p:start},end={p:end};else if(_isArray(start)&&!_isArray(end)){interpolators=[],l=start.length,il=l-2;for(i=1;i<l;i++)interpolators.push(interpolate(start[i-1],start[i]));l--,func=function func(p){p*=l;var i=Math.min(il,~~p);return interpolators[i](p-i)},progress=end}else mutate||(start=_merge(_isArray(start)?[]:{},start));if(!interpolators){for(p in end)_addPropTween.call(master,start,p,"get",end[p]);func=function func(p){return _renderPropTweens(p,master)||(isString?start.p:start)}}}return _conditionalReturn(progress,func)},_getLabelInDirection=function _getLabelInDirection(timeline,fromTime,backward){var labels=timeline.labels,min=_bigNum,p,distance,label;for(p in labels)distance=labels[p]-fromTime,distance<0==!!backward&&distance&&min>(distance=Math.abs(distance))&&(label=p,min=distance);return label},_callback=function _callback(animation,type,executeLazyFirst){var v=animation.vars,callback=v[type],prevContext=_context,context=animation._ctx,params,scope,result;if(!callback)return;return params=v[type+"Params"],scope=v.callbackScope||animation,executeLazyFirst&&_lazyTweens.length&&_lazyRender(),context&&(_context=context),result=params?callback.apply(scope,params):callback.call(scope),_context=prevContext,result},_interrupt=function _interrupt(animation){return _removeFromParent(animation),animation.scrollTrigger&&animation.scrollTrigger.kill(!!_reverting),animation.progress()<1&&_callback(animation,"onInterrupt"),animation},_quickTween,_registerPluginQueue=[],_createPlugin=function _createPlugin(config){if(!config)return;config=!config.name&&config["default"]||config;if(_windowExists()||config.headless){var name=config.name,isFunc=_isFunction(config),Plugin=name&&!isFunc&&config.init?function(){this._props=[]}:config,instanceDefaults={init:_emptyFunc,render:_renderPropTweens,add:_addPropTween,kill:_killPropTweensOf,modifier:_addPluginModifier,rawVars:0},statics={targetTest:0,get:0,getSetter:_getSetter,aliases:{},register:0};_wake();if(config!==Plugin){if(_plugins[name])return;_setDefaults(Plugin,_setDefaults(_copyExcluding(config,instanceDefaults),statics)),_merge(Plugin.prototype,_merge(instanceDefaults,_copyExcluding(config,statics))),_plugins[Plugin.prop=name]=Plugin,config.targetTest&&(_harnessPlugins.push(Plugin),_reservedProps[name]=1),name=(name==="css"?"CSS":name.charAt(0).toUpperCase()+name.substr(1))+"Plugin"}_addGlobal(name,Plugin),config.register&&config.register(gsap,Plugin,PropTween)}else _registerPluginQueue.push(config)},_255=255,_colorLookup={aqua:[0,_255,_255],lime:[0,_255,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,_255],navy:[0,0,128],white:[_255,_255,_255],olive:[128,128,0],yellow:[_255,_255,0],orange:[_255,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[_255,0,0],pink:[_255,192,203],cyan:[0,_255,_255],transparent:[_255,_255,_255,0]},_hue=function _hue(h,m1,m2){return h+=h<0?1:h>1?-1:0,(h*6<1?m1+(m2-m1)*h*6:h<.5?m2:h*3<2?m1+(m2-m1)*(2/3-h)*6:m1)*_255+.5|0},splitColor=function splitColor(v,toHSL,forceAlpha){var a=v?_isNumber(v)?[v>>16,v>>8&_255,v&_255]:0:_colorLookup.black,r,g,b,h,s,l,max,min,d,wasHSL;if(!a){v.substr(-1)===","&&(v=v.substr(0,v.length-1));if(_colorLookup[v])a=_colorLookup[v];else if(v.charAt(0)==="#"){v.length<6&&(r=v.charAt(1),g=v.charAt(2),b=v.charAt(3),v="#"+r+r+g+g+b+b+(v.length===5?v.charAt(4)+v.charAt(4):""));if(v.length===9)return a=parseInt(v.substr(1,6),16),[a>>16,a>>8&_255,a&_255,parseInt(v.substr(7),16)/255];v=parseInt(v.substr(1),16),a=[v>>16,v>>8&_255,v&_255]}else if(v.substr(0,3)==="hsl"){a=wasHSL=v.match(_strictNumExp);if(!toHSL)h=+a[0]%360/360,s=+a[1]/100,l=+a[2]/100,g=l<=.5?l*(s+1):l+s-l*s,r=l*2-g,a.length>3&&(a[3]*=1),a[0]=_hue(h+1/3,r,g),a[1]=_hue(h,r,g),a[2]=_hue(h-1/3,r,g);else if(~v.indexOf("="))return a=v.match(_numExp),forceAlpha&&a.length<4&&(a[3]=1),a}else a=v.match(_strictNumExp)||_colorLookup.transparent;a=a.map(Number)}return toHSL&&!wasHSL&&(r=a[0]/_255,g=a[1]/_255,b=a[2]/_255,max=Math.max(r,g,b),min=Math.min(r,g,b),l=(max+min)/2,max===min?h=s=0:(d=max-min,s=l>.5?d/(2-max-min):d/(max+min),h=max===r?(g-b)/d+(g<b?6:0):max===g?(b-r)/d+2:(r-g)/d+4,h*=60),a[0]=~~(h+.5),a[1]=~~(s*100+.5),a[2]=~~(l*100+.5)),forceAlpha&&a.length<4&&(a[3]=1),a},_colorOrderData=function _colorOrderData(v){var values=[],c=[],i=-1;return v.split(_colorExp).forEach(function(v){var a=v.match(_numWithUnitExp)||[];values.push.apply(values,a),c.push(i+=a.length+1)}),values.c=c,values},_formatColors=function _formatColors(s,toHSL,orderMatchData){var result="",colors=(s+result).match(_colorExp),type=toHSL?"hsla(":"rgba(",i=0,c,shell,d,l;if(!colors)return s;colors=colors.map(function(color){return(color=splitColor(color,toHSL,1))&&type+(toHSL?color[0]+","+color[1]+"%,"+color[2]+"%,"+color[3]:color.join(","))+")"});if(orderMatchData){d=_colorOrderData(s),c=orderMatchData.c;if(c.join(result)!==d.c.join(result)){shell=s.replace(_colorExp,"1").split(_numWithUnitExp),l=shell.length-1;for(;i<l;i++)result+=shell[i]+(~c.indexOf(i)?colors.shift()||type+"0,0,0,0)":(d.length?d:colors.length?colors:orderMatchData).shift())}}if(!shell){shell=s.split(_colorExp),l=shell.length-1;for(;i<l;i++)result+=shell[i]+colors[i]}return result+shell[l]},_colorExp=function(){var s="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b",p;for(p in _colorLookup)s+="|"+p+"\\b";return new RegExp(s+")","gi")}(),_hslExp=/hsl[a]?\(/,_colorStringFilter=function _colorStringFilter(a){var combined=a.join(" "),toHSL;_colorExp.lastIndex=0;if(_colorExp.test(combined))return toHSL=_hslExp.test(combined),a[1]=_formatColors(a[1],toHSL),a[0]=_formatColors(a[0],toHSL,_colorOrderData(a[1])),!0},_tickerActive,_ticker=function(){var _getTime=Date.now,_lagThreshold=500,_adjustedLag=33,_startTime=_getTime(),_lastUpdate=_startTime,_gap=1e3/240,_nextTime=_gap,_listeners=[],_id,_req,_raf,_self,_delta,_i,_tick=function _tick(v){var elapsed=_getTime()-_lastUpdate,manual=v===!0,overlap,dispatch,time,frame;(elapsed>_lagThreshold||elapsed<0)&&(_startTime+=elapsed-_adjustedLag),_lastUpdate+=elapsed,time=_lastUpdate-_startTime,overlap=time-_nextTime;if(overlap>0||manual)frame=++_self.frame,_delta=time-_self.time*1e3,_self.time=time/=1e3,_nextTime+=overlap+(overlap>=_gap?4:_gap-overlap),dispatch=1;manual||(_id=_req(_tick));if(dispatch)for(_i=0;_i<_listeners.length;_i++)_listeners[_i](time,_delta,frame,v)};return _self={time:0,frame:0,tick:function tick(){_tick(!0)},deltaRatio:function deltaRatio(fps){return _delta/(1e3/(fps||60))},wake:function wake(){_coreReady&&(!_coreInitted&&_windowExists()&&(_win=_coreInitted=window,_doc=_win.document||{},_globals.gsap=gsap,(_win.gsapVersions||(_win.gsapVersions=[])).push(gsap.version),_install(_installScope||_win.GreenSockGlobals||!_win.gsap&&_win||{}),_registerPluginQueue.forEach(_createPlugin)),_raf=typeof requestAnimationFrame!="undefined"&&requestAnimationFrame,_id&&_self.sleep(),_req=_raf||function(f){return setTimeout(f,_nextTime-_self.time*1e3+1|0)},_tickerActive=1,_tick(2))},sleep:function sleep(){(_raf?cancelAnimationFrame:clearTimeout)(_id),_tickerActive=0,_req=_emptyFunc},lagSmoothing:function lagSmoothing(threshold,adjustedLag){_lagThreshold=threshold||Infinity,_adjustedLag=Math.min(adjustedLag||33,_lagThreshold)},fps:function fps(_fps){_gap=1e3/(_fps||240),_nextTime=_self.time*1e3+_gap},add:function add(callback,once,prioritize){var func=once?function(t,d,f,v){callback(t,d,f,v),_self.remove(func)}:callback;return _self.remove(callback),_listeners[prioritize?"unshift":"push"](func),_wake(),func},remove:function remove(callback,i){~(i=_listeners.indexOf(callback))&&_listeners.splice(i,1)&&_i>=i&&_i--},_listeners:_listeners},_self}(),_wake=function _wake(){return!_tickerActive&&_ticker.wake()},_easeMap={},_customEaseExp=/^[\d.\-M][\d.\-,\s]/,_quotesExp=/["']/g,_parseObjectInString=function _parseObjectInString(value){var obj={},split=value.substr(1,value.length-3).split(":"),key=split[0],i=1,l=split.length,index,val,parsedVal;for(;i<l;i++)val=split[i],index=i!==l-1?val.lastIndexOf(","):val.length,parsedVal=val.substr(0,index),obj[key]=isNaN(parsedVal)?parsedVal.replace(_quotesExp,"").trim():+parsedVal,key=val.substr(index+1).trim();return obj},_valueInParentheses=function _valueInParentheses(value){var open=value.indexOf("(")+1,close=value.indexOf(")"),nested=value.indexOf("(",open);return value.substring(open,~nested&&nested<close?value.indexOf(")",close+1):close)},_configEaseFromString=function _configEaseFromString(name){var split=(name+"").split("("),ease=_easeMap[split[0]];return ease&&split.length>1&&ease.config?ease.config.apply(null,~name.indexOf("{")?[_parseObjectInString(split[1])]:_valueInParentheses(name).split(",").map(_numericIfPossible)):_easeMap._CE&&_customEaseExp.test(name)?_easeMap._CE("",name):ease},_invertEase=function _invertEase(ease){return function(p){return 1-ease(1-p)}},_propagateYoyoEase=function _propagateYoyoEase(timeline,isYoyo){var child=timeline._first,ease;while(child)child instanceof Timeline?_propagateYoyoEase(child,isYoyo):child.vars.yoyoEase&&(!child._yoyo||!child._repeat)&&child._yoyo!==isYoyo&&(child.timeline?_propagateYoyoEase(child.timeline,isYoyo):(ease=child._ease,child._ease=child._yEase,child._yEase=ease,child._yoyo=isYoyo)),child=child._next},_parseEase=function _parseEase(ease,defaultEase){return ease?(_isFunction(ease)?ease:_easeMap[ease]||_configEaseFromString(ease))||defaultEase:defaultEase},_insertEase=function _insertEase(names,easeIn,easeOut,easeInOut){easeOut===void 0&&(easeOut=function easeOut(p){return 1-easeIn(1-p)}),easeInOut===void 0&&(easeInOut=function easeInOut(p){return p<.5?easeIn(p*2)/2:1-easeIn((1-p)*2)/2});var ease={easeIn:easeIn,easeOut:easeOut,easeInOut:easeInOut},lowercaseName;return _forEachName(names,function(name){_easeMap[name]=_globals[name]=ease,_easeMap[lowercaseName=name.toLowerCase()]=easeOut;for(var p in ease)_easeMap[lowercaseName+(p==="easeIn"?".in":p==="easeOut"?".out":".inOut")]=_easeMap[name+"."+p]=ease[p]}),ease},_easeInOutFromOut=function _easeInOutFromOut(easeOut){return function(p){return p<.5?(1-easeOut(1-p*2))/2:.5+easeOut((p-.5)*2)/2}},_configElastic=function _configElastic(type,amplitude,period){var p1=amplitude>=1?amplitude:1,p2=(period||(type?.3:.45))/(amplitude<1?amplitude:1),p3=p2/_2PI*(Math.asin(1/p1)||0),easeOut=function easeOut(p){return p===1?1:p1*Math.pow(2,-10*p)*_sin((p-p3)*p2)+1},ease=type==="out"?easeOut:type==="in"?function(p){return 1-easeOut(1-p)}:_easeInOutFromOut(easeOut);return p2=_2PI/p2,ease.config=function(amplitude,period){return _configElastic(type,amplitude,period)},ease},_configBack=function _configBack(type,overshoot){overshoot===void 0&&(overshoot=1.70158);var easeOut=function easeOut(p){return p?--p*p*((overshoot+1)*p+overshoot)+1:0},ease=type==="out"?easeOut:type==="in"?function(p){return 1-easeOut(1-p)}:_easeInOutFromOut(easeOut);return ease.config=function(overshoot){return _configBack(type,overshoot)},ease};_forEachName("Linear,Quad,Cubic,Quart,Quint,Strong",function(name,i){var power=i<5?i+1:i;_insertEase(name+",Power"+(power-1),i?function(p){return Math.pow(p,power)}:function(p){return p},function(p){return 1-Math.pow(1-p,power)},function(p){return p<.5?Math.pow(p*2,power)/2:1-Math.pow((1-p)*2,power)/2})}),_easeMap.Linear.easeNone=_easeMap.none=_easeMap.Linear.easeIn,_insertEase("Elastic",_configElastic("in"),_configElastic("out"),_configElastic()),function(n,c){var n1=1/c,n2=2*n1,n3=2.5*n1,easeOut=function easeOut(p){return p<n1?n*p*p:p<n2?n*Math.pow(p-1.5/c,2)+.75:p<n3?n*(p-=2.25/c)*p+.9375:n*Math.pow(p-2.625/c,2)+.984375};_insertEase("Bounce",function(p){return 1-easeOut(1-p)},easeOut)}(7.5625,2.75),_insertEase("Expo",function(p){return p?Math.pow(2,10*(p-1)):0}),_insertEase("Circ",function(p){return-(_sqrt(1-p*p)-1)}),_insertEase("Sine",function(p){return p===1?1:-_cos(p*_HALF_PI)+1}),_insertEase("Back",_configBack("in"),_configBack("out"),_configBack()),_easeMap.SteppedEase=_easeMap.steps=_globals.SteppedEase={config:function config(steps,immediateStart){steps===void 0&&(steps=1);var p1=1/steps,p2=steps+(immediateStart?0:1),p3=immediateStart?1:0,max=1-_tinyNum;return function(p){return((p2*_clamp(0,max,p)|0)+p3)*p1}}},_defaults.ease=_easeMap["quad.out"],_forEachName("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt",function(name){return _callbackNames+=name+","+name+"Params,"});var GSCache=function GSCache(target,harness){this.id=_gsID++,target._gsap=this,this.target=target,this.harness=harness,this.get=harness?harness.get:_getProperty,this.set=harness?harness.getSetter:_getSetter},Animation=function(){function Animation(vars){this.vars=vars,this._delay=+vars.delay||0;if(this._repeat=vars.repeat===Infinity?-2:vars.repeat||0)this._rDelay=vars.repeatDelay||0,this._yoyo=!!vars.yoyo||!!vars.yoyoEase;this._ts=1,_setDuration(this,+vars.duration,1,1),this.data=vars.data,_context&&(this._ctx=_context,_context.data.push(this)),_tickerActive||_ticker.wake()}var _proto=Animation.prototype;return _proto.delay=function delay(value){return value||value===0?(this.parent&&this.parent.smoothChildTiming&&this.startTime(this._start+value-this._delay),this._delay=value,this):this._delay},_proto.duration=function duration(value){return arguments.length?this.totalDuration(this._repeat>0?value+(value+this._rDelay)*this._repeat:value):this.totalDuration()&&this._dur},_proto.totalDuration=function totalDuration(value){return arguments.length?(this._dirty=0,_setDuration(this,this._repeat<0?value:(value-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},_proto.totalTime=function totalTime(_totalTime,suppressEvents){_wake();if(!arguments.length)return this._tTime;var parent=this._dp;if(parent&&parent.smoothChildTiming&&this._ts){_alignPlayhead(this,_totalTime),!parent._dp||parent.parent||_postAddChecks(parent,this);while(parent&&parent.parent)parent.parent._time!==parent._start+(parent._ts>=0?parent._tTime/parent._ts:(parent.totalDuration()-parent._tTime)/-parent._ts)&&parent.totalTime(parent._tTime,!0),parent=parent.parent;!this.parent&&this._dp.autoRemoveChildren&&(this._ts>0&&_totalTime<this._tDur||this._ts<0&&_totalTime>0||!this._tDur&&!_totalTime)&&_addToTimeline(this._dp,this,this._start-this._delay)}if(this._tTime!==_totalTime||!this._dur&&!suppressEvents||this._initted&&Math.abs(this._zTime)===_tinyNum||!_totalTime&&!this._initted&&(this.add||this._ptLookup))this._ts||(this._pTime=_totalTime),_lazySafeRender(this,_totalTime,suppressEvents);return this},_proto.time=function time(value,suppressEvents){return arguments.length?this.totalTime(Math.min(this.totalDuration(),value+_elapsedCycleDuration(this))%(this._dur+this._rDelay)||(value?this._dur:0),suppressEvents):this._time},_proto.totalProgress=function totalProgress(value,suppressEvents){return arguments.length?this.totalTime(this.totalDuration()*value,suppressEvents):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.rawTime()>0?1:0},_proto.progress=function progress(value,suppressEvents){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&!(this.iteration()&1)?1-value:value)+_elapsedCycleDuration(this),suppressEvents):this.duration()?Math.min(1,this._time/this._dur):this.rawTime()>0?1:0},_proto.iteration=function iteration(value,suppressEvents){var cycleDuration=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(value-1)*cycleDuration,suppressEvents):this._repeat?_animationCycle(this._tTime,cycleDuration)+1:1},_proto.timeScale=function timeScale(value,suppressEvents){if(!arguments.length)return this._rts===-_tinyNum?0:this._rts;if(this._rts===value)return this;var tTime=this.parent&&this._ts?_parentToChildTotalTime(this.parent._time,this):this._tTime;return this._rts=+value||0,this._ts=this._ps||value===-_tinyNum?0:this._rts,this.totalTime(_clamp(-Math.abs(this._delay),this._tDur,tTime),suppressEvents!==!1),_setEnd(this),_recacheAncestors(this)},_proto.paused=function paused(value){return arguments.length?(this._ps!==value&&(this._ps=value,value?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(_wake(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,this.progress()===1&&Math.abs(this._zTime)!==_tinyNum&&(this._tTime-=_tinyNum)))),this):this._ps},_proto.startTime=function startTime(value){if(arguments.length){this._start=value;var parent=this.parent||this._dp;return parent&&(parent._sort||!this.parent)&&_addToTimeline(parent,this,value-this._delay),this}return this._start},_proto.endTime=function endTime(includeRepeats){return this._start+(_isNotFalse(includeRepeats)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},_proto.rawTime=function rawTime(wrapRepeats){var parent=this.parent||this._dp;return parent?wrapRepeats&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?_parentToChildTotalTime(parent.rawTime(wrapRepeats),this):this._tTime:this._tTime},_proto.revert=function revert(config){config===void 0&&(config=_revertConfig);var prevIsReverting=_reverting;_reverting=config;if(this._initted||this._startAt)this.timeline&&this.timeline.revert(config),this.totalTime(-0.01,config.suppressEvents);return this.data!=="nested"&&config.kill!==!1&&this.kill(),_reverting=prevIsReverting,this},_proto.globalTime=function globalTime(rawTime){var animation=this,time=arguments.length?rawTime:animation.rawTime();while(animation)time=animation._start+time/(Math.abs(animation._ts)||1),animation=animation._dp;return!this.parent&&this._sat?this._sat.globalTime(rawTime):time},_proto.repeat=function repeat(value){return arguments.length?(this._repeat=value===Infinity?-2:value,_onUpdateTotalDuration(this)):this._repeat===-2?Infinity:this._repeat},_proto.repeatDelay=function repeatDelay(value){if(arguments.length){var time=this._time;return this._rDelay=value,_onUpdateTotalDuration(this),time?this.time(time):this}return this._rDelay},_proto.yoyo=function yoyo(value){return arguments.length?(this._yoyo=value,this):this._yoyo},_proto.seek=function seek(position,suppressEvents){return this.totalTime(_parsePosition(this,position),_isNotFalse(suppressEvents))},_proto.restart=function restart(includeDelay,suppressEvents){return this.play().totalTime(includeDelay?-this._delay:0,_isNotFalse(suppressEvents))},_proto.play=function play(from,suppressEvents){return from!=null&&this.seek(from,suppressEvents),this.reversed(!1).paused(!1)},_proto.reverse=function reverse(from,suppressEvents){return from!=null&&this.seek(from||this.totalDuration(),suppressEvents),this.reversed(!0).paused(!1)},_proto.pause=function pause(atTime,suppressEvents){return atTime!=null&&this.seek(atTime,suppressEvents),this.paused(!0)},_proto.resume=function resume(){return this.paused(!1)},_proto.reversed=function reversed(value){return arguments.length?(!!value!==this.reversed()&&this.timeScale(-this._rts||(value?-_tinyNum:0)),this):this._rts<0},_proto.invalidate=function invalidate(){return this._initted=this._act=0,this._zTime=-_tinyNum,this},_proto.isActive=function isActive(){var parent=this.parent||this._dp,start=this._start,rawTime;return!!(!parent||this._ts&&this._initted&&parent.isActive()&&(rawTime=parent.rawTime(!0))>=start&&rawTime<this.endTime(!0)-_tinyNum)},_proto.eventCallback=function eventCallback(type,callback,params){var vars=this.vars;return arguments.length>1?(callback?(vars[type]=callback,params&&(vars[type+"Params"]=params),type==="onUpdate"&&(this._onUpdate=callback)):delete vars[type],this):vars[type]},_proto.then=function then(onFulfilled){var self=this;return new Promise(function(resolve){var f=_isFunction(onFulfilled)?onFulfilled:_passThrough,_resolve=function _resolve(){var _then=self.then;self.then=null,_isFunction(f)&&(f=f(self))&&(f.then||f===self)&&(self.then=_then),resolve(f),self.then=_then};self._initted&&self.totalProgress()===1&&self._ts>=0||!self._tTime&&self._ts<0?_resolve():self._prom=_resolve})},_proto.kill=function kill(){_interrupt(this)},Animation}();_setDefaults(Animation.prototype,{_time:0,_start:0,_end:0,_tTime:0,_tDur:0,_dirty:0,_repeat:0,_yoyo:!1,parent:null,_initted:!1,_rDelay:0,_ts:1,_dp:0,ratio:0,_zTime:-_tinyNum,_prom:0,_ps:!1,_rts:1});var Timeline=function(_Animation){function Timeline(vars,position){var _this;return vars===void 0&&(vars={}),_this=_Animation.call(this,vars)||this,_this.labels={},_this.smoothChildTiming=!!vars.smoothChildTiming,_this.autoRemoveChildren=!!vars.autoRemoveChildren,_this._sort=_isNotFalse(vars.sortChildren),_globalTimeline&&_addToTimeline(vars.parent||_globalTimeline,_assertThisInitialized(_this),position),vars.reversed&&_this.reverse(),vars.paused&&_this.paused(!0),vars.scrollTrigger&&_scrollTrigger(_assertThisInitialized(_this),vars.scrollTrigger),_this}_inheritsLoose(Timeline,_Animation);var _proto2=Timeline.prototype;return _proto2.to=function to(targets,vars,position){return _createTweenType(0,arguments,this),this},_proto2.from=function from(targets,vars,position){return _createTweenType(1,arguments,this),this},_proto2.fromTo=function fromTo(targets,fromVars,toVars,position){return _createTweenType(2,arguments,this),this},_proto2.set=function set(targets,vars,position){return vars.duration=0,vars.parent=this,_inheritDefaults(vars).repeatDelay||(vars.repeat=0),vars.immediateRender=!!vars.immediateRender,new Tween(targets,vars,_parsePosition(this,position),1),this},_proto2.call=function call(callback,params,position){return _addToTimeline(this,Tween.delayedCall(0,callback,params),position)},_proto2.staggerTo=function staggerTo(targets,duration,vars,stagger,position,onCompleteAll,onCompleteAllParams){return vars.duration=duration,vars.stagger=vars.stagger||stagger,vars.onComplete=onCompleteAll,vars.onCompleteParams=onCompleteAllParams,vars.parent=this,new Tween(targets,vars,_parsePosition(this,position)),this},_proto2.staggerFrom=function staggerFrom(targets,duration,vars,stagger,position,onCompleteAll,onCompleteAllParams){return vars.runBackwards=1,_inheritDefaults(vars).immediateRender=_isNotFalse(vars.immediateRender),this.staggerTo(targets,duration,vars,stagger,position,onCompleteAll,onCompleteAllParams)},_proto2.staggerFromTo=function staggerFromTo(targets,duration,fromVars,toVars,stagger,position,onCompleteAll,onCompleteAllParams){return toVars.startAt=fromVars,_inheritDefaults(toVars).immediateRender=_isNotFalse(toVars.immediateRender),this.staggerTo(targets,duration,toVars,stagger,position,onCompleteAll,onCompleteAllParams)},_proto2.render=function render(totalTime,suppressEvents,force){var prevTime=this._time,tDur=this._dirty?this.totalDuration():this._tDur,dur=this._dur,tTime=totalTime<=0?0:_roundPrecise(totalTime),crossingStart=this._zTime<0!=totalTime<0&&(this._initted||!dur),time,child,next,iteration,cycleDuration,prevPaused,pauseTween,timeScale,prevStart,prevIteration,yoyo,isYoyo;this!==_globalTimeline&&tTime>tDur&&totalTime>=0&&(tTime=tDur);if(tTime!==this._tTime||force||crossingStart){prevTime!==this._time&&dur&&(tTime+=this._time-prevTime,totalTime+=this._time-prevTime),time=tTime,prevStart=this._start,timeScale=this._ts,prevPaused=!timeScale,crossingStart&&(dur||(prevTime=this._zTime),(totalTime||!suppressEvents)&&(this._zTime=totalTime));if(this._repeat){yoyo=this._yoyo,cycleDuration=dur+this._rDelay;if(this._repeat<-1&&totalTime<0)return this.totalTime(cycleDuration*100+totalTime,suppressEvents,force);time=_roundPrecise(tTime%cycleDuration),tTime===tDur?(iteration=this._repeat,time=dur):(iteration=~~(tTime/cycleDuration),iteration&&iteration===tTime/cycleDuration&&(time=dur,iteration--),time>dur&&(time=dur)),prevIteration=_animationCycle(this._tTime,cycleDuration),!prevTime&&this._tTime&&prevIteration!==iteration&&this._tTime-prevIteration*cycleDuration-this._dur<=0&&(prevIteration=iteration),yoyo&&iteration&1&&(time=dur-time,isYoyo=1);if(iteration!==prevIteration&&!this._lock){var rewinding=yoyo&&prevIteration&1,doesWrap=rewinding===(yoyo&&iteration&1);iteration<prevIteration&&(rewinding=!rewinding),prevTime=rewinding?0:tTime%dur?dur:tTime,this._lock=1,this.render(prevTime||(isYoyo?0:_roundPrecise(iteration*cycleDuration)),suppressEvents,!dur)._lock=0,this._tTime=tTime,!suppressEvents&&this.parent&&_callback(this,"onRepeat"),this.vars.repeatRefresh&&!isYoyo&&(this.invalidate()._lock=1);if(prevTime&&prevTime!==this._time||prevPaused!==!this._ts||this.vars.onRepeat&&!this.parent&&!this._act)return this;dur=this._dur,tDur=this._tDur,doesWrap&&(this._lock=2,prevTime=rewinding?dur:-0.0001,this.render(prevTime,!0),this.vars.repeatRefresh&&!isYoyo&&this.invalidate()),this._lock=0;if(!this._ts&&!prevPaused)return this;_propagateYoyoEase(this,isYoyo)}}this._hasPause&&!this._forcing&&this._lock<2&&(pauseTween=_findNextPauseTween(this,_roundPrecise(prevTime),_roundPrecise(time)),pauseTween&&(tTime-=time-(time=pauseTween._start))),this._tTime=tTime,this._time=time,this._act=!timeScale,this._initted||(this._onUpdate=this.vars.onUpdate,this._initted=1,this._zTime=totalTime,prevTime=0);if(!prevTime&&time&&!suppressEvents&&!iteration){_callback(this,"onStart");if(this._tTime!==tTime)return this}if(time>=prevTime&&totalTime>=0){child=this._first;while(child){next=child._next;if((child._act||time>=child._start)&&child._ts&&pauseTween!==child){if(child.parent!==this)return this.render(totalTime,suppressEvents,force);child.render(child._ts>0?(time-child._start)*child._ts:(child._dirty?child.totalDuration():child._tDur)+(time-child._start)*child._ts,suppressEvents,force);if(time!==this._time||!this._ts&&!prevPaused){pauseTween=0,next&&(tTime+=this._zTime=-_tinyNum);break}}child=next}}else{child=this._last;var adjustedTime=totalTime<0?totalTime:time;while(child){next=child._prev;if((child._act||adjustedTime<=child._end)&&child._ts&&pauseTween!==child){if(child.parent!==this)return this.render(totalTime,suppressEvents,force);child.render(child._ts>0?(adjustedTime-child._start)*child._ts:(child._dirty?child.totalDuration():child._tDur)+(adjustedTime-child._start)*child._ts,suppressEvents,force||_reverting&&(child._initted||child._startAt));if(time!==this._time||!this._ts&&!prevPaused){pauseTween=0,next&&(tTime+=this._zTime=adjustedTime?-_tinyNum:_tinyNum);break}}child=next}}if(pauseTween&&!suppressEvents){this.pause(),pauseTween.render(time>=prevTime?0:-_tinyNum)._zTime=time>=prevTime?1:-1;if(this._ts)return this._start=prevStart,_setEnd(this),this.render(totalTime,suppressEvents,force)}this._onUpdate&&!suppressEvents&&_callback(this,"onUpdate",!0);if(tTime===tDur&&this._tTime>=this.totalDuration()||!tTime&&prevTime)if(prevStart===this._start||Math.abs(timeScale)!==Math.abs(this._ts))this._lock||((totalTime||!dur)&&(tTime===tDur&&this._ts>0||!tTime&&this._ts<0)&&_removeFromParent(this,1),!suppressEvents&&!(totalTime<0&&!prevTime)&&(tTime||prevTime||!tDur)&&(_callback(this,tTime===tDur&&totalTime>=0?"onComplete":"onReverseComplete",!0),this._prom&&!(tTime<tDur&&this.timeScale()>0)&&this._prom()))}return this},_proto2.add=function add(child,position){var _this2=this;_isNumber(position)||(position=_parsePosition(this,position,child));if(!(child instanceof Animation)){if(_isArray(child))return child.forEach(function(obj){return _this2.add(obj,position)}),this;if(_isString(child))return this.addLabel(child,position);if(!_isFunction(child))return this;child=Tween.delayedCall(0,child)}return this!==child?_addToTimeline(this,child,position):this},_proto2.getChildren=function getChildren(nested,tweens,timelines,ignoreBeforeTime){nested===void 0&&(nested=!0),tweens===void 0&&(tweens=!0),timelines===void 0&&(timelines=!0),ignoreBeforeTime===void 0&&(ignoreBeforeTime=-_bigNum);var a=[],child=this._first;while(child)child._start>=ignoreBeforeTime&&(child instanceof Tween?tweens&&a.push(child):(timelines&&a.push(child),nested&&a.push.apply(a,child.getChildren(!0,tweens,timelines)))),child=child._next;return a},_proto2.getById=function getById(id){var animations=this.getChildren(1,1,1),i=animations.length;while(i--)if(animations[i].vars.id===id)return animations[i]},_proto2.remove=function remove(child){return _isString(child)?this.removeLabel(child):_isFunction(child)?this.killTweensOf(child):(_removeLinkedListItem(this,child),child===this._recent&&(this._recent=this._last),_uncache(this))},_proto2.totalTime=function totalTime(_totalTime2,suppressEvents){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=_roundPrecise(_ticker.time-(this._ts>0?_totalTime2/this._ts:(this.totalDuration()-_totalTime2)/-this._ts))),_Animation.prototype.totalTime.call(this,_totalTime2,suppressEvents),this._forcing=0,this):this._tTime},_proto2.addLabel=function addLabel(label,position){return this.labels[label]=_parsePosition(this,position),this},_proto2.removeLabel=function removeLabel(label){return delete this.labels[label],this},_proto2.addPause=function addPause(position,callback,params){var t=Tween.delayedCall(0,callback||_emptyFunc,params);return t.data="isPause",this._hasPause=1,_addToTimeline(this,t,_parsePosition(this,position))},_proto2.removePause=function removePause(position){var child=this._first;position=_parsePosition(this,position);while(child)child._start===position&&child.data==="isPause"&&_removeFromParent(child),child=child._next},_proto2.killTweensOf=function killTweensOf(targets,props,onlyActive){var tweens=this.getTweensOf(targets,onlyActive),i=tweens.length;while(i--)_overwritingTween!==tweens[i]&&tweens[i].kill(targets,props);return this},_proto2.getTweensOf=function getTweensOf(targets,onlyActive){var a=[],parsedTargets=toArray(targets),child=this._first,isGlobalTime=_isNumber(onlyActive),children;while(child)child instanceof Tween?_arrayContainsAny(child._targets,parsedTargets)&&(isGlobalTime?(!_overwritingTween||child._initted&&child._ts)&&child.globalTime(0)<=onlyActive&&child.globalTime(child.totalDuration())>onlyActive:!onlyActive||child.isActive())&&a.push(child):(children=child.getTweensOf(parsedTargets,onlyActive)).length&&a.push.apply(a,children),child=child._next;return a},_proto2.tweenTo=function tweenTo(position,vars){vars=vars||{};var tl=this,endTime=_parsePosition(tl,position),_vars=vars,startAt=_vars.startAt,_onStart=_vars.onStart,onStartParams=_vars.onStartParams,immediateRender=_vars.immediateRender,initted,tween=Tween.to(tl,_setDefaults({ease:vars.ease||"none",lazy:!1,immediateRender:!1,time:endTime,overwrite:"auto",duration:vars.duration||Math.abs((endTime-(startAt&&"time"in startAt?startAt.time:tl._time))/tl.timeScale())||_tinyNum,onStart:function onStart(){tl.pause();if(!initted){var duration=vars.duration||Math.abs((endTime-(startAt&&"time"in startAt?startAt.time:tl._time))/tl.timeScale());tween._dur!==duration&&_setDuration(tween,duration,0,1).render(tween._time,!0,!0),initted=1}_onStart&&_onStart.apply(tween,onStartParams||[])}},vars));return immediateRender?tween.render(0):tween},_proto2.tweenFromTo=function tweenFromTo(fromPosition,toPosition,vars){return this.tweenTo(toPosition,_setDefaults({startAt:{time:_parsePosition(this,fromPosition)}},vars))},_proto2.recent=function recent(){return this._recent},_proto2.nextLabel=function nextLabel(afterTime){return afterTime===void 0&&(afterTime=this._time),_getLabelInDirection(this,_parsePosition(this,afterTime))},_proto2.previousLabel=function previousLabel(beforeTime){return beforeTime===void 0&&(beforeTime=this._time),_getLabelInDirection(this,_parsePosition(this,beforeTime),1)},_proto2.currentLabel=function currentLabel(value){return arguments.length?this.seek(value,!0):this.previousLabel(this._time+_tinyNum)},_proto2.shiftChildren=function shiftChildren(amount,adjustLabels,ignoreBeforeTime){ignoreBeforeTime===void 0&&(ignoreBeforeTime=0);var child=this._first,labels=this.labels,p;while(child)child._start>=ignoreBeforeTime&&(child._start+=amount,child._end+=amount),child=child._next;if(adjustLabels)for(p in labels)labels[p]>=ignoreBeforeTime&&(labels[p]+=amount);return _uncache(this)},_proto2.invalidate=function invalidate(soft){var child=this._first;this._lock=0;while(child)child.invalidate(soft),child=child._next;return _Animation.prototype.invalidate.call(this,soft)},_proto2.clear=function clear(includeLabels){includeLabels===void 0&&(includeLabels=!0);var child=this._first,next;while(child)next=child._next,this.remove(child),child=next;return this._dp&&(this._time=this._tTime=this._pTime=0),includeLabels&&(this.labels={}),_uncache(this)},_proto2.totalDuration=function totalDuration(value){var max=0,self=this,child=self._last,prevStart=_bigNum,prev,start,parent;if(arguments.length)return self.timeScale((self._repeat<0?self.duration():self.totalDuration())/(self.reversed()?-value:value));if(self._dirty){parent=self.parent;while(child){prev=child._prev,child._dirty&&child.totalDuration(),start=child._start,start>prevStart&&self._sort&&child._ts&&!self._lock?(self._lock=1,_addToTimeline(self,child,start-child._delay,1)._lock=0):prevStart=start;if(start<0&&child._ts){max-=start;if(!parent&&!self._dp||parent&&parent.smoothChildTiming)self._start+=start/self._ts,self._time-=start,self._tTime-=start;self.shiftChildren(-start,!1,-1/0),prevStart=0}child._end>max&&child._ts&&(max=child._end),child=prev}_setDuration(self,self===_globalTimeline&&self._time>max?self._time:max,1,1),self._dirty=0}return self._tDur},Timeline.updateRoot=function updateRoot(time){_globalTimeline._ts&&(_lazySafeRender(_globalTimeline,_parentToChildTotalTime(time,_globalTimeline)),_lastRenderedFrame=_ticker.frame);if(_ticker.frame>=_nextGCFrame){_nextGCFrame+=_config.autoSleep||120;var child=_globalTimeline._first;if(!child||!child._ts)if(_config.autoSleep&&_ticker._listeners.length<2){while(child&&!child._ts)child=child._next;child||_ticker.sleep()}}},Timeline}(Animation);_setDefaults(Timeline.prototype,{_lock:0,_hasPause:0,_forcing:0});var _addComplexStringPropTween=function _addComplexStringPropTween(target,prop,start,end,setter,stringFilter,funcParam){var pt=new PropTween(this._pt,target,prop,0,1,_renderComplexString,null,setter),index=0,matchIndex=0,result,startNums,color,endNum,chunk,startNum,hasRandom,a;pt.b=start,pt.e=end,start+="",end+="";if(hasRandom=~end.indexOf("random("))end=_replaceRandom(end);stringFilter&&(a=[start,end],stringFilter(a,target,prop),start=a[0],end=a[1]),startNums=start.match(_complexStringNumExp)||[];while(result=_complexStringNumExp.exec(end))endNum=result[0],chunk=end.substring(index,result.index),color?color=(color+1)%5:chunk.substr(-5)==="rgba("&&(color=1),endNum!==startNums[matchIndex++]&&(startNum=parseFloat(startNums[matchIndex-1])||0,pt._pt={_next:pt._pt,p:chunk||matchIndex===1?chunk:",",s:startNum,c:endNum.charAt(1)==="="?_parseRelative(startNum,endNum)-startNum:parseFloat(endNum)-startNum,m:color&&color<4?Math.round:0},index=_complexStringNumExp.lastIndex);pt.c=index<end.length?end.substring(index,end.length):"",pt.fp=funcParam;if(_relExp.test(end)||hasRandom)pt.e=0;return this._pt=pt,pt},_addPropTween=function _addPropTween(target,prop,start,end,index,targets,modifier,stringFilter,funcParam,optional){_isFunction(end)&&(end=end(index||0,target,targets));var currentValue=target[prop],parsedStart=start!=="get"?start:_isFunction(currentValue)?funcParam?target[prop.indexOf("set")||!_isFunction(target["get"+prop.substr(3)])?prop:"get"+prop.substr(3)](funcParam):target[prop]():currentValue,setter=_isFunction(currentValue)?funcParam?_setterFuncWithParam:_setterFunc:_setterPlain,pt;if(_isString(end)){~end.indexOf("random(")&&(end=_replaceRandom(end));if(end.charAt(1)==="="){pt=_parseRelative(parsedStart,end)+(getUnit(parsedStart)||0);if(pt||pt===0)end=pt}}if(!optional||parsedStart!==end||_forceAllPropTweens)return!isNaN(parsedStart*end)&&end!==""?(pt=new PropTween(this._pt,target,prop,+parsedStart||0,end-(parsedStart||0),typeof currentValue=="boolean"?_renderBoolean:_renderPlain,0,setter),funcParam&&(pt.fp=funcParam),modifier&&pt.modifier(modifier,this,target),this._pt=pt):(!currentValue&&!(prop in target)&&_missingPlugin(prop,end),_addComplexStringPropTween.call(this,target,prop,parsedStart,end,setter,stringFilter||_config.stringFilter,funcParam))},_processVars=function _processVars(vars,index,target,targets,tween){_isFunction(vars)&&(vars=_parseFuncOrString(vars,tween,index,target,targets));if(!_isObject(vars)||vars.style&&vars.nodeType||_isArray(vars)||_isTypedArray(vars))return _isString(vars)?_parseFuncOrString(vars,tween,index,target,targets):vars;var copy={},p;for(p in vars)copy[p]=_parseFuncOrString(vars[p],tween,index,target,targets);return copy},_checkPlugin=function _checkPlugin(property,vars,tween,index,target,targets){var plugin,pt,ptLookup,i;if(_plugins[property]&&(plugin=new _plugins[property]).init(target,plugin.rawVars?vars[property]:_processVars(vars[property],index,target,targets,tween),tween,index,targets)!==!1){tween._pt=pt=new PropTween(tween._pt,target,property,0,1,plugin.render,plugin,0,plugin.priority);if(tween!==_quickTween){ptLookup=tween._ptLookup[tween._targets.indexOf(target)],i=plugin._props.length;while(i--)ptLookup[plugin._props[i]]=pt}}return plugin},_overwritingTween,_forceAllPropTweens,_initTween=function _initTween(tween,time,tTime){var vars=tween.vars,ease=vars.ease,startAt=vars.startAt,immediateRender=vars.immediateRender,lazy=vars.lazy,onUpdate=vars.onUpdate,runBackwards=vars.runBackwards,yoyoEase=vars.yoyoEase,keyframes=vars.keyframes,autoRevert=vars.autoRevert,dur=tween._dur,prevStartAt=tween._startAt,targets=tween._targets,parent=tween.parent,fullTargets=parent&&parent.data==="nested"?parent.vars.targets:targets,autoOverwrite=tween._overwrite==="auto"&&!_suppressOverwrites,tl=tween.timeline,cleanVars,i,p,pt,target,hasPriority,gsData,harness,plugin,ptLookup,index,harnessVars,overwritten;tl&&(!keyframes||!ease)&&(ease="none"),tween._ease=_parseEase(ease,_defaults.ease),tween._yEase=yoyoEase?_invertEase(_parseEase(yoyoEase===!0?ease:yoyoEase,_defaults.ease)):0,yoyoEase&&tween._yoyo&&!tween._repeat&&(yoyoEase=tween._yEase,tween._yEase=tween._ease,tween._ease=yoyoEase),tween._from=!tl&&!!vars.runBackwards;if(!tl||keyframes&&!vars.stagger){harness=targets[0]?_getCache(targets[0]).harness:0,harnessVars=harness&&vars[harness.prop],cleanVars=_copyExcluding(vars,_reservedProps),prevStartAt&&(prevStartAt._zTime<0&&prevStartAt.progress(1),time<0&&runBackwards&&immediateRender&&!autoRevert?prevStartAt.render(-1,!0):prevStartAt.revert(runBackwards&&dur?_revertConfigNoKill:_startAtRevertConfig),prevStartAt._lazy=0);if(startAt){_removeFromParent(tween._startAt=Tween.set(targets,_setDefaults({data:"isStart",overwrite:!1,parent:parent,immediateRender:!0,lazy:!prevStartAt&&_isNotFalse(lazy),startAt:null,delay:0,onUpdate:onUpdate&&function(){return _callback(tween,"onUpdate")},stagger:0},startAt))),tween._startAt._dp=0,tween._startAt._sat=tween,time<0&&(_reverting||!immediateRender&&!autoRevert)&&tween._startAt.revert(_revertConfigNoKill);if(immediateRender&&dur&&time<=0&&tTime<=0){time&&(tween._zTime=time);return}}else if(runBackwards&&dur&&!prevStartAt){time&&(immediateRender=!1),p=_setDefaults({overwrite:!1,data:"isFromStart",lazy:immediateRender&&!prevStartAt&&_isNotFalse(lazy),immediateRender:immediateRender,stagger:0,parent:parent},cleanVars),harnessVars&&(p[harness.prop]=harnessVars),_removeFromParent(tween._startAt=Tween.set(targets,p)),tween._startAt._dp=0,tween._startAt._sat=tween,time<0&&(_reverting?tween._startAt.revert(_revertConfigNoKill):tween._startAt.render(-1,!0)),tween._zTime=time;if(!immediateRender)_initTween(tween._startAt,_tinyNum,_tinyNum);else if(!time)return}tween._pt=tween._ptCache=0,lazy=dur&&_isNotFalse(lazy)||lazy&&!dur;for(i=0;i<targets.length;i++){target=targets[i],gsData=target._gsap||_harness(targets)[i]._gsap,tween._ptLookup[i]=ptLookup={},_lazyLookup[gsData.id]&&_lazyTweens.length&&_lazyRender(),index=fullTargets===targets?i:fullTargets.indexOf(target),harness&&(plugin=new harness).init(target,harnessVars||cleanVars,tween,index,fullTargets)!==!1&&(tween._pt=pt=new PropTween(tween._pt,target,plugin.name,0,1,plugin.render,plugin,0,plugin.priority),plugin._props.forEach(function(name){ptLookup[name]=pt}),plugin.priority&&(hasPriority=1));if(!harness||harnessVars)for(p in cleanVars)_plugins[p]&&(plugin=_checkPlugin(p,cleanVars,tween,index,target,fullTargets))?plugin.priority&&(hasPriority=1):ptLookup[p]=pt=_addPropTween.call(tween,target,p,"get",cleanVars[p],index,fullTargets,0,vars.stringFilter);tween._op&&tween._op[i]&&tween.kill(target,tween._op[i]),autoOverwrite&&tween._pt&&(_overwritingTween=tween,_globalTimeline.killTweensOf(target,ptLookup,tween.globalTime(time)),overwritten=!tween.parent,_overwritingTween=0),tween._pt&&lazy&&(_lazyLookup[gsData.id]=1)}hasPriority&&_sortPropTweensByPriority(tween),tween._onInit&&tween._onInit(tween)}tween._onUpdate=onUpdate,tween._initted=(!tween._op||tween._pt)&&!overwritten,keyframes&&time<=0&&tl.render(_bigNum,!0,!0)},_updatePropTweens=function _updatePropTweens(tween,property,value,start,startIsRelative,ratio,time,skipRecursion){var ptCache=(tween._pt&&tween._ptCache||(tween._ptCache={}))[property],pt,rootPT,lookup,i;if(!ptCache){ptCache=tween._ptCache[property]=[],lookup=tween._ptLookup,i=tween._targets.length;while(i--){pt=lookup[i][property];if(pt&&pt.d&&pt.d._pt){pt=pt.d._pt;while(pt&&pt.p!==property&&pt.fp!==property)pt=pt._next}if(!pt)return _forceAllPropTweens=1,tween.vars[property]="+=0",_initTween(tween,time),_forceAllPropTweens=0,skipRecursion?_warn(property+" not eligible for reset"):1;ptCache.push(pt)}}i=ptCache.length;while(i--)rootPT=ptCache[i],pt=rootPT._pt||rootPT,pt.s=(start||start===0)&&!startIsRelative?start:pt.s+(start||0)+ratio*pt.c,pt.c=value-pt.s,rootPT.e&&(rootPT.e=_round(value)+getUnit(rootPT.e)),rootPT.b&&(rootPT.b=pt.s+getUnit(rootPT.b))},_addAliasesToVars=function _addAliasesToVars(targets,vars){var harness=targets[0]?_getCache(targets[0]).harness:0,propertyAliases=harness&&harness.aliases,copy,p,i,aliases;if(!propertyAliases)return vars;copy=_merge({},vars);for(p in propertyAliases)if(p in copy){aliases=propertyAliases[p].split(","),i=aliases.length;while(i--)copy[aliases[i]]=copy[p]}return copy},_parseKeyframe=function _parseKeyframe(prop,obj,allProps,easeEach){var ease=obj.ease||easeEach||"power1.inOut",p,a;if(_isArray(obj))a=allProps[prop]||(allProps[prop]=[]),obj.forEach(function(value,i){return a.push({t:i/(obj.length-1)*100,v:value,e:ease})});else for(p in obj)a=allProps[p]||(allProps[p]=[]),p==="ease"||a.push({t:parseFloat(prop),v:obj[p],e:ease})},_parseFuncOrString=function _parseFuncOrString(value,tween,i,target,targets){return _isFunction(value)?value.call(tween,i,target,targets):_isString(value)&&~value.indexOf("random(")?_replaceRandom(value):value},_staggerTweenProps=_callbackNames+"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,autoRevert",_staggerPropsToSkip={};_forEachName(_staggerTweenProps+",id,stagger,delay,duration,paused,scrollTrigger",function(name){return _staggerPropsToSkip[name]=1});var Tween=function(_Animation2){function Tween(targets,vars,position,skipInherit){var _this3;typeof vars=="number"&&(position.duration=vars,vars=position,position=null),_this3=_Animation2.call(this,skipInherit?vars:_inheritDefaults(vars))||this;var _this3$vars=_this3.vars,duration=_this3$vars.duration,delay=_this3$vars.delay,immediateRender=_this3$vars.immediateRender,stagger=_this3$vars.stagger,overwrite=_this3$vars.overwrite,keyframes=_this3$vars.keyframes,defaults=_this3$vars.defaults,scrollTrigger=_this3$vars.scrollTrigger,yoyoEase=_this3$vars.yoyoEase,parent=vars.parent||_globalTimeline,parsedTargets=(_isArray(targets)||_isTypedArray(targets)?_isNumber(targets[0]):"length"in vars)?[targets]:toArray(targets),tl,i,copy,l,p,curTarget,staggerFunc,staggerVarsToMerge;_this3._targets=parsedTargets.length?_harness(parsedTargets):_warn("GSAP target "+targets+" not found. https://gsap.com",!_config.nullTargetWarn)||[],_this3._ptLookup=[],_this3._overwrite=overwrite;if(keyframes||stagger||_isFuncOrString(duration)||_isFuncOrString(delay)){vars=_this3.vars,tl=_this3.timeline=new Timeline({data:"nested",defaults:defaults||{},targets:parent&&parent.data==="nested"?parent.vars.targets:parsedTargets}),tl.kill(),tl.parent=tl._dp=_assertThisInitialized(_this3),tl._start=0;if(stagger||_isFuncOrString(duration)||_isFuncOrString(delay)){l=parsedTargets.length,staggerFunc=stagger&&distribute(stagger);if(_isObject(stagger))for(p in stagger)~_staggerTweenProps.indexOf(p)&&(staggerVarsToMerge||(staggerVarsToMerge={}),staggerVarsToMerge[p]=stagger[p]);for(i=0;i<l;i++)copy=_copyExcluding(vars,_staggerPropsToSkip),copy.stagger=0,yoyoEase&&(copy.yoyoEase=yoyoEase),staggerVarsToMerge&&_merge(copy,staggerVarsToMerge),curTarget=parsedTargets[i],copy.duration=+_parseFuncOrString(duration,_assertThisInitialized(_this3),i,curTarget,parsedTargets),copy.delay=(+_parseFuncOrString(delay,_assertThisInitialized(_this3),i,curTarget,parsedTargets)||0)-_this3._delay,!stagger&&l===1&&copy.delay&&(_this3._delay=delay=copy.delay,_this3._start+=delay,copy.delay=0),tl.to(curTarget,copy,staggerFunc?staggerFunc(i,curTarget,parsedTargets):0),tl._ease=_easeMap.none;tl.duration()?duration=delay=0:_this3.timeline=0}else if(keyframes){_inheritDefaults(_setDefaults(tl.vars.defaults,{ease:"none"})),tl._ease=_parseEase(keyframes.ease||vars.ease||"none");var time=0,a,kf,v;if(_isArray(keyframes))keyframes.forEach(function(frame){return tl.to(parsedTargets,frame,">")}),tl.duration();else{copy={};for(p in keyframes)p==="ease"||p==="easeEach"||_parseKeyframe(p,keyframes[p],copy,keyframes.easeEach);for(p in copy){a=copy[p].sort(function(a,b){return a.t-b.t}),time=0;for(i=0;i<a.length;i++)kf=a[i],v={ease:kf.e,duration:(kf.t-(i?a[i-1].t:0))/100*duration},v[p]=kf.v,tl.to(parsedTargets,v,time),time+=v.duration}tl.duration()<duration&&tl.to({},{duration:duration-tl.duration()})}}duration||_this3.duration(duration=tl.duration())}else _this3.timeline=0;overwrite===!0&&!_suppressOverwrites&&(_overwritingTween=_assertThisInitialized(_this3),_globalTimeline.killTweensOf(parsedTargets),_overwritingTween=0),_addToTimeline(parent,_assertThisInitialized(_this3),position),vars.reversed&&_this3.reverse(),vars.paused&&_this3.paused(!0);if(immediateRender||!duration&&!keyframes&&_this3._start===_roundPrecise(parent._time)&&_isNotFalse(immediateRender)&&_hasNoPausedAncestors(_assertThisInitialized(_this3))&&parent.data!=="nested")_this3._tTime=-_tinyNum,_this3.render(Math.max(0,-delay)||0);return scrollTrigger&&_scrollTrigger(_assertThisInitialized(_this3),scrollTrigger),_this3}_inheritsLoose(Tween,_Animation2);var _proto3=Tween.prototype;return _proto3.render=function render(totalTime,suppressEvents,force){var prevTime=this._time,tDur=this._tDur,dur=this._dur,isNegative=totalTime<0,tTime=totalTime>tDur-_tinyNum&&!isNegative?tDur:totalTime<_tinyNum?0:totalTime,time,pt,iteration,cycleDuration,prevIteration,isYoyo,ratio,timeline,yoyoEase;if(!dur)_renderZeroDurationTween(this,totalTime,suppressEvents,force);else if(tTime!==this._tTime||!totalTime||force||!this._initted&&this._tTime||this._startAt&&this._zTime<0!==isNegative){time=tTime,timeline=this.timeline;if(this._repeat){cycleDuration=dur+this._rDelay;if(this._repeat<-1&&isNegative)return this.totalTime(cycleDuration*100+totalTime,suppressEvents,force);time=_roundPrecise(tTime%cycleDuration),tTime===tDur?(iteration=this._repeat,time=dur):(iteration=~~(tTime/cycleDuration),iteration&&iteration===_roundPrecise(tTime/cycleDuration)&&(time=dur,iteration--),time>dur&&(time=dur)),isYoyo=this._yoyo&&iteration&1,isYoyo&&(yoyoEase=this._yEase,time=dur-time),prevIteration=_animationCycle(this._tTime,cycleDuration);if(time===prevTime&&!force&&this._initted&&iteration===prevIteration)return this._tTime=tTime,this;iteration!==prevIteration&&(timeline&&this._yEase&&_propagateYoyoEase(timeline,isYoyo),this.vars.repeatRefresh&&!isYoyo&&!this._lock&&this._time!==cycleDuration&&this._initted&&(this._lock=force=1,this.render(_roundPrecise(cycleDuration*iteration),!0).invalidate()._lock=0))}if(!this._initted){if(_attemptInitTween(this,isNegative?totalTime:time,force,suppressEvents,tTime))return this._tTime=0,this;if(prevTime!==this._time&&(!force||!this.vars.repeatRefresh||iteration===prevIteration))return this;if(dur!==this._dur)return this.render(totalTime,suppressEvents,force)}this._tTime=tTime,this._time=time,!this._act&&this._ts&&(this._act=1,this._lazy=0),this.ratio=ratio=(yoyoEase||this._ease)(time/dur),this._from&&(this.ratio=ratio=1-ratio);if(time&&!prevTime&&!suppressEvents&&!iteration){_callback(this,"onStart");if(this._tTime!==tTime)return this}pt=this._pt;while(pt)pt.r(ratio,pt.d),pt=pt._next;timeline&&timeline.render(totalTime<0?totalTime:timeline._dur*timeline._ease(time/this._dur),suppressEvents,force)||this._startAt&&(this._zTime=totalTime),this._onUpdate&&!suppressEvents&&(isNegative&&_rewindStartAt(this,totalTime,suppressEvents,force),_callback(this,"onUpdate")),this._repeat&&iteration!==prevIteration&&this.vars.onRepeat&&!suppressEvents&&this.parent&&_callback(this,"onRepeat"),(tTime===this._tDur||!tTime)&&this._tTime===tTime&&(isNegative&&!this._onUpdate&&_rewindStartAt(this,totalTime,!0,!0),(totalTime||!dur)&&(tTime===this._tDur&&this._ts>0||!tTime&&this._ts<0)&&_removeFromParent(this,1),!suppressEvents&&(!isNegative||!!prevTime)&&(tTime||prevTime||isYoyo)&&(_callback(this,tTime===tDur?"onComplete":"onReverseComplete",!0),this._prom&&!(tTime<tDur&&this.timeScale()>0)&&this._prom()))}return this},_proto3.targets=function targets(){return this._targets},_proto3.invalidate=function invalidate(soft){return(!soft||!this.vars.runBackwards)&&(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(soft),_Animation2.prototype.invalidate.call(this,soft)},_proto3.resetTo=function resetTo(property,value,start,startIsRelative,skipRecursion){_tickerActive||_ticker.wake(),this._ts||this.play();var time=Math.min(this._dur,(this._dp._time-this._start)*this._ts),ratio;return this._initted||_initTween(this,time),ratio=this._ease(time/this._dur),_updatePropTweens(this,property,value,start,startIsRelative,ratio,time,skipRecursion)?this.resetTo(property,value,start,startIsRelative,1):(_alignPlayhead(this,0),this.parent||_addLinkedListItem(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},_proto3.kill=function kill(targets,vars){vars===void 0&&(vars="all");if(!targets&&(!vars||vars==="all"))return this._lazy=this._pt=0,this.parent?_interrupt(this):this;if(this.timeline){var tDur=this.timeline.totalDuration();return this.timeline.killTweensOf(targets,vars,_overwritingTween&&_overwritingTween.vars.overwrite!==!0)._first||_interrupt(this),this.parent&&tDur!==this.timeline.totalDuration()&&_setDuration(this,this._dur*this.timeline._tDur/tDur,0,1),this}var parsedTargets=this._targets,killingTargets=targets?toArray(targets):parsedTargets,propTweenLookup=this._ptLookup,firstPT=this._pt,overwrittenProps,curLookup,curOverwriteProps,props,p,pt,i;if((!vars||vars==="all")&&_arraysMatch(parsedTargets,killingTargets))return vars==="all"&&(this._pt=0),_interrupt(this);overwrittenProps=this._op=this._op||[],vars!=="all"&&(_isString(vars)&&(p={},_forEachName(vars,function(name){return p[name]=1}),vars=p),vars=_addAliasesToVars(parsedTargets,vars)),i=parsedTargets.length;while(i--)if(~killingTargets.indexOf(parsedTargets[i])){curLookup=propTweenLookup[i],vars==="all"?(overwrittenProps[i]=vars,props=curLookup,curOverwriteProps={}):(curOverwriteProps=overwrittenProps[i]=overwrittenProps[i]||{},props=vars);for(p in props)pt=curLookup&&curLookup[p],pt&&((!("kill"in pt.d)||pt.d.kill(p)===!0)&&_removeLinkedListItem(this,pt,"_pt"),delete curLookup[p]),curOverwriteProps!=="all"&&(curOverwriteProps[p]=1)}return this._initted&&!this._pt&&firstPT&&_interrupt(this),this},Tween.to=function to(targets,vars){return new Tween(targets,vars,arguments[2])},Tween.from=function from(targets,vars){return _createTweenType(1,arguments)},Tween.delayedCall=function delayedCall(delay,callback,params,scope){return new Tween(callback,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:delay,onComplete:callback,onReverseComplete:callback,onCompleteParams:params,onReverseCompleteParams:params,callbackScope:scope})},Tween.fromTo=function fromTo(targets,fromVars,toVars){return _createTweenType(2,arguments)},Tween.set=function set(targets,vars){return vars.duration=0,vars.repeatDelay||(vars.repeat=0),new Tween(targets,vars)},Tween.killTweensOf=function killTweensOf(targets,props,onlyActive){return _globalTimeline.killTweensOf(targets,props,onlyActive)},Tween}(Animation);_setDefaults(Tween.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0}),_forEachName("staggerTo,staggerFrom,staggerFromTo",function(name){Tween[name]=function(){var tl=new Timeline,params=_slice.call(arguments,0);return params.splice(name==="staggerFromTo"?5:4,0,0),tl[name].apply(tl,params)}});var _setterPlain=function _setterPlain(target,property,value){return target[property]=value},_setterFunc=function _setterFunc(target,property,value){return target[property](value)},_setterFuncWithParam=function _setterFuncWithParam(target,property,value,data){return target[property](data.fp,value)},_setterAttribute=function _setterAttribute(target,property,value){return target.setAttribute(property,value)},_getSetter=function _getSetter(target,property){return _isFunction(target[property])?_setterFunc:_isUndefined(target[property])&&target.setAttribute?_setterAttribute:_setterPlain},_renderPlain=function _renderPlain(ratio,data){return data.set(data.t,data.p,Math.round((data.s+data.c*ratio)*1e6)/1e6,data)},_renderBoolean=function _renderBoolean(ratio,data){return data.set(data.t,data.p,!!(data.s+data.c*ratio),data)},_renderComplexString=function _renderComplexString(ratio,data){var pt=data._pt,s="";if(!ratio&&data.b)s=data.b;else if(ratio===1&&data.e)s=data.e;else{while(pt)s=pt.p+(pt.m?pt.m(pt.s+pt.c*ratio):Math.round((pt.s+pt.c*ratio)*1e4)/1e4)+s,pt=pt._next;s+=data.c}data.set(data.t,data.p,s,data)},_renderPropTweens=function _renderPropTweens(ratio,data){var pt=data._pt;while(pt)pt.r(ratio,pt.d),pt=pt._next},_addPluginModifier=function _addPluginModifier(modifier,tween,target,property){var pt=this._pt,next;while(pt)next=pt._next,pt.p===property&&pt.modifier(modifier,tween,target),pt=next},_killPropTweensOf=function _killPropTweensOf(property){var pt=this._pt,hasNonDependentRemaining,next;while(pt)next=pt._next,pt.p===property&&!pt.op||pt.op===property?_removeLinkedListItem(this,pt,"_pt"):pt.dep||(hasNonDependentRemaining=1),pt=next;return!hasNonDependentRemaining},_setterWithModifier=function _setterWithModifier(target,property,value,data){data.mSet(target,property,data.m.call(data.tween,value,data.mt),data)},_sortPropTweensByPriority=function _sortPropTweensByPriority(parent){var pt=parent._pt,next,pt2,first,last;while(pt){next=pt._next,pt2=first;while(pt2&&pt2.pr>pt.pr)pt2=pt2._next;(pt._prev=pt2?pt2._prev:last)?pt._prev._next=pt:first=pt,(pt._next=pt2)?pt2._prev=pt:last=pt,pt=next}parent._pt=first},PropTween=function(){function PropTween(next,target,prop,start,change,renderer,data,setter,priority){this.t=target,this.s=start,this.c=change,this.p=prop,this.r=renderer||_renderPlain,this.d=data||this,this.set=setter||_setterPlain,this.pr=priority||0,this._next=next,next&&(next._prev=this)}var _proto4=PropTween.prototype;return _proto4.modifier=function modifier(func,tween,target){this.mSet=this.mSet||this.set,this.set=_setterWithModifier,this.m=func,this.mt=target,this.tween=tween},PropTween}();_forEachName(_callbackNames+"parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger",function(name){return _reservedProps[name]=1}),_globals.TweenMax=_globals.TweenLite=Tween,_globals.TimelineLite=_globals.TimelineMax=Timeline,_globalTimeline=new Timeline({sortChildren:!1,defaults:_defaults,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0}),_config.stringFilter=_colorStringFilter;var _media=[],_listeners={},_emptyArray=[],_lastMediaTime=0,_contextID=0,_dispatch=function _dispatch(type){return(_listeners[type]||_emptyArray).map(function(f){return f()})},_onMediaChange=function _onMediaChange(){var time=Date.now(),matches=[];time-_lastMediaTime>2&&(_dispatch("matchMediaInit"),_media.forEach(function(c){var queries=c.queries,conditions=c.conditions,match,p,anyMatch,toggled;for(p in queries)match=_win.matchMedia(queries[p]).matches,match&&(anyMatch=1),match!==conditions[p]&&(conditions[p]=match,toggled=1);toggled&&(c.revert(),anyMatch&&matches.push(c))}),_dispatch("matchMediaRevert"),matches.forEach(function(c){return c.onMatch(c,function(func){return c.add(null,func)})}),_lastMediaTime=time,_dispatch("matchMedia"))},Context=function(){function Context(func,scope){this.selector=scope&&selector(scope),this.data=[],this._r=[],this.isReverted=!1,this.id=_contextID++,func&&this.add(func)}var _proto5=Context.prototype;return _proto5.add=function add(name,func,scope){_isFunction(name)&&(scope=func,func=name,name=_isFunction);var self=this,f=function f(){var prev=_context,prevSelector=self.selector,result;return prev&&prev!==self&&prev.data.push(self),scope&&(self.selector=selector(scope)),_context=self,result=func.apply(self,arguments),_isFunction(result)&&self._r.push(result),_context=prev,self.selector=prevSelector,self.isReverted=!1,result};return self.last=f,name===_isFunction?f(self,function(func){return self.add(null,func)}):name?self[name]=f:f},_proto5.ignore=function ignore(func){var prev=_context;_context=null,func(this),_context=prev},_proto5.getTweens=function getTweens(){var a=[];return this.data.forEach(function(e){return e instanceof Context?a.push.apply(a,e.getTweens()):e instanceof Tween&&(!e.parent||e.parent.data!=="nested")&&a.push(e)}),a},_proto5.clear=function clear(){this._r.length=this.data.length=0},_proto5.kill=function kill(revert,matchMedia){var _this4=this;revert?function(){var tweens=_this4.getTweens(),i=_this4.data.length,t;while(i--)t=_this4.data[i],t.data==="isFlip"&&(t.revert(),t.getChildren(!0,!0,!1).forEach(function(tween){return tweens.splice(tweens.indexOf(tween),1)}));tweens.map(function(t){return{g:t._dur||t._delay||t._sat&&!t._sat.vars.immediateRender?t.globalTime(0):-Infinity,t:t}}).sort(function(a,b){return b.g-a.g||-Infinity}).forEach(function(o){return o.t.revert(revert)}),i=_this4.data.length;while(i--)t=_this4.data[i],t instanceof Timeline?t.data!=="nested"&&(t.scrollTrigger&&t.scrollTrigger.revert(),t.kill()):!(t instanceof Tween)&&t.revert&&t.revert(revert);_this4._r.forEach(function(f){return f(revert,_this4)}),_this4.isReverted=!0}():this.data.forEach(function(e){return e.kill&&e.kill()}),this.clear();if(matchMedia){var i=_media.length;while(i--)_media[i].id===this.id&&_media.splice(i,1)}},_proto5.revert=function revert(config){this.kill(config||{})},Context}(),MatchMedia=function(){function MatchMedia(scope){this.contexts=[],this.scope=scope,_context&&_context.data.push(this)}var _proto6=MatchMedia.prototype;return _proto6.add=function add(conditions,func,scope){_isObject(conditions)||(conditions={matches:conditions});var context=new Context(0,scope||this.scope),cond=context.conditions={},mq,p,active;_context&&!context.selector&&(context.selector=_context.selector),this.contexts.push(context),func=context.add("onMatch",func),context.queries=conditions;for(p in conditions)p==="all"?active=1:(mq=_win.matchMedia(conditions[p]),mq&&(_media.indexOf(context)<0&&_media.push(context),(cond[p]=mq.matches)&&(active=1),mq.addListener?mq.addListener(_onMediaChange):mq.addEventListener("change",_onMediaChange)));return active&&func(context,function(f){return context.add(null,f)}),this},_proto6.revert=function revert(config){this.kill(config||{})},_proto6.kill=function kill(revert){this.contexts.forEach(function(c){return c.kill(revert,!0)})},MatchMedia}(),_gsap={registerPlugin:function registerPlugin(){for(var _len2=arguments.length,args=new Array(_len2),_key2=0;_key2<_len2;_key2++)args[_key2]=arguments[_key2];args.forEach(function(config){return _createPlugin(config)})},timeline:function timeline(vars){return new Timeline(vars)},getTweensOf:function getTweensOf(targets,onlyActive){return _globalTimeline.getTweensOf(targets,onlyActive)},getProperty:function getProperty(target,property,unit,uncache){_isString(target)&&(target=toArray(target)[0]);var getter=_getCache(target||{}).get,format=unit?_passThrough:_numericIfPossible;return unit==="native"&&(unit=""),target?property?format((_plugins[property]&&_plugins[property].get||getter)(target,property,unit,uncache)):function(property,unit,uncache){return format((_plugins[property]&&_plugins[property].get||getter)(target,property,unit,uncache))}:target},quickSetter:function quickSetter(target,property,unit){target=toArray(target);if(target.length>1){var setters=target.map(function(t){return gsap.quickSetter(t,property,unit)}),l=setters.length;return function(value){var i=l;while(i--)setters[i](value)}}target=target[0]||{};var Plugin=_plugins[property],cache=_getCache(target),p=cache.harness&&(cache.harness.aliases||{})[property]||property,setter=Plugin?function(value){var p=new Plugin;_quickTween._pt=0,p.init(target,unit?value+unit:value,_quickTween,0,[target]),p.render(1,p),_quickTween._pt&&_renderPropTweens(1,_quickTween)}:cache.set(target,p);return Plugin?setter:function(value){return setter(target,p,unit?value+unit:value,cache,1)}},quickTo:function quickTo(target,property,vars){var _merge2,tween=gsap.to(target,_merge((_merge2={},_merge2[property]="+=0.1",_merge2.paused=!0,_merge2),vars||{})),func=function func(value,start,startIsRelative){return tween.resetTo(property,value,start,startIsRelative)};return func.tween=tween,func},isTweening:function isTweening(targets){return _globalTimeline.getTweensOf(targets,!0).length>0},defaults:function defaults(value){return value&&value.ease&&(value.ease=_parseEase(value.ease,_defaults.ease)),_mergeDeep(_defaults,value||{})},config:function config(value){return _mergeDeep(_config,value||{})},registerEffect:function registerEffect(_ref3){var name=_ref3.name,effect=_ref3.effect,plugins=_ref3.plugins,defaults=_ref3.defaults,extendTimeline=_ref3.extendTimeline;(plugins||"").split(",").forEach(function(pluginName){return pluginName&&!_plugins[pluginName]&&!_globals[pluginName]&&_warn(name+" effect requires "+pluginName+" plugin.")}),_effects[name]=function(targets,vars,tl){return effect(toArray(targets),_setDefaults(vars||{},defaults),tl)},extendTimeline&&(Timeline.prototype[name]=function(targets,vars,position){return this.add(_effects[name](targets,_isObject(vars)?vars:(position=vars)&&{},this),position)})},registerEase:function registerEase(name,ease){_easeMap[name]=_parseEase(ease)},parseEase:function parseEase(ease,defaultEase){return arguments.length?_parseEase(ease,defaultEase):_easeMap},getById:function getById(id){return _globalTimeline.getById(id)},exportRoot:function exportRoot(vars,includeDelayedCalls){vars===void 0&&(vars={});var tl=new Timeline(vars),child,next;tl.smoothChildTiming=_isNotFalse(vars.smoothChildTiming),_globalTimeline.remove(tl),tl._dp=0,tl._time=tl._tTime=_globalTimeline._time,child=_globalTimeline._first;while(child)next=child._next,(includeDelayedCalls||!(!child._dur&&child instanceof Tween&&child.vars.onComplete===child._targets[0]))&&_addToTimeline(tl,child,child._start-child._delay),child=next;return _addToTimeline(_globalTimeline,tl,0),tl},context:function context(func,scope){return func?new Context(func,scope):_context},matchMedia:function matchMedia(scope){return new MatchMedia(scope)},matchMediaRefresh:function matchMediaRefresh(){return _media.forEach(function(c){var cond=c.conditions,found,p;for(p in cond)cond[p]&&(cond[p]=!1,found=1);found&&c.revert()})||_onMediaChange()},addEventListener:function addEventListener(type,callback){var a=_listeners[type]||(_listeners[type]=[]);~a.indexOf(callback)||a.push(callback)},removeEventListener:function removeEventListener(type,callback){var a=_listeners[type],i=a&&a.indexOf(callback);i>=0&&a.splice(i,1)},utils:{wrap:wrap,wrapYoyo:wrapYoyo,distribute:distribute,random:random,snap:snap,normalize:normalize,getUnit:getUnit,clamp:clamp,splitColor:splitColor,toArray:toArray,selector:selector,mapRange:mapRange,pipe:pipe,unitize:unitize,interpolate:interpolate,shuffle:shuffle},install:_install,effects:_effects,ticker:_ticker,updateRoot:Timeline.updateRoot,plugins:_plugins,globalTimeline:_globalTimeline,core:{PropTween:PropTween,globals:_addGlobal,Tween:Tween,Timeline:Timeline,Animation:Animation,getCache:_getCache,_removeLinkedListItem:_removeLinkedListItem,reverting:function reverting(){return _reverting},context:function context(toAdd){return toAdd&&_context&&(_context.data.push(toAdd),toAdd._ctx=_context),_context},suppressOverwrites:function suppressOverwrites(value){return _suppressOverwrites=value}}};_forEachName("to,from,fromTo,delayedCall,set,killTweensOf",function(name){return _gsap[name]=Tween[name]}),_ticker.add(Timeline.updateRoot),_quickTween=_gsap.to({},{duration:0});var _getPluginPropTween=function _getPluginPropTween(plugin,prop){var pt=plugin._pt;while(pt&&pt.p!==prop&&pt.op!==prop&&pt.fp!==prop)pt=pt._next;return pt},_addModifiers=function _addModifiers(tween,modifiers){var targets=tween._targets,p,i,pt;for(p in modifiers){i=targets.length;while(i--)pt=tween._ptLookup[i][p],pt&&(pt=pt.d)&&(pt._pt&&(pt=_getPluginPropTween(pt,p)),pt&&pt.modifier&&pt.modifier(modifiers[p],tween,targets[i],p))}},_buildModifierPlugin=function _buildModifierPlugin(name,modifier){return{name:name,rawVars:1,init:function init(target,vars,tween){tween._onInit=function(tween){var temp,p;_isString(vars)&&(temp={},_forEachName(vars,function(name){return temp[name]=1}),vars=temp);if(modifier){temp={};for(p in vars)temp[p]=modifier(vars[p]);vars=temp}_addModifiers(tween,vars)}}}},gsap=_gsap.registerPlugin({name:"attr",init:function init(target,vars,tween,index,targets){var p,pt,v;this.tween=tween;for(p in vars)v=target.getAttribute(p)||"",pt=this.add(target,"setAttribute",(v||0)+"",vars[p],index,targets,0,0,p),pt.op=p,pt.b=v,this._props.push(p)},render:function render(ratio,data){var pt=data._pt;while(pt)_reverting?pt.set(pt.t,pt.p,pt.b,pt):pt.r(ratio,pt.d),pt=pt._next}},{name:"endArray",init:function init(target,value){var i=value.length;while(i--)this.add(target,i,target[i]||0,value[i],0,0,0,0,0,1)}},_buildModifierPlugin("roundProps",_roundModifier),_buildModifierPlugin("modifiers"),_buildModifierPlugin("snap",snap))||_gsap;Tween.version=Timeline.version=gsap.version="3.12.5",_coreReady=1,_windowExists()&&_wake();var Power0=_easeMap.Power0,Power1=_easeMap.Power1,Power2=_easeMap.Power2,Power3=_easeMap.Power3,Power4=_easeMap.Power4,Linear=_easeMap.Linear,Quad=_easeMap.Quad,Cubic=_easeMap.Cubic,Quart=_easeMap.Quart,Quint=_easeMap.Quint,Strong=_easeMap.Strong,Elastic=_easeMap.Elastic,Back=_easeMap.Back,SteppedEase=_easeMap.SteppedEase,Bounce=_easeMap.Bounce,Sine=_easeMap.Sine,Expo=_easeMap.Expo,Circ=_easeMap.Circ,_win$1,_doc$1,_docElement,_pluginInitted,_tempDiv,_tempDivStyler,_recentSetterPlugin,_reverting$1,_windowExists$1=function _windowExists(){return typeof window!="undefined"},_transformProps={},_RAD2DEG=180/Math.PI,_DEG2RAD=Math.PI/180,_atan2=Math.atan2,_bigNum$1=1e8,_capsExp=/([A-Z])/g,_horizontalExp=/(left|right|width|margin|padding|x)/i,_complexExp=/[\s,\(]\S/,_propertyAliases={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},_renderCSSProp=function _renderCSSProp(ratio,data){return data.set(data.t,data.p,Math.round((data.s+data.c*ratio)*1e4)/1e4+data.u,data)},_renderPropWithEnd=function _renderPropWithEnd(ratio,data){return data.set(data.t,data.p,ratio===1?data.e:Math.round((data.s+data.c*ratio)*1e4)/1e4+data.u,data)},_renderCSSPropWithBeginning=function _renderCSSPropWithBeginning(ratio,data){return data.set(data.t,data.p,ratio?Math.round((data.s+data.c*ratio)*1e4)/1e4+data.u:data.b,data)},_renderRoundedCSSProp=function _renderRoundedCSSProp(ratio,data){var value=data.s+data.c*ratio;data.set(data.t,data.p,~~(value+(value<0?-0.5:.5))+data.u,data)},_renderNonTweeningValue=function _renderNonTweeningValue(ratio,data){return data.set(data.t,data.p,ratio?data.e:data.b,data)},_renderNonTweeningValueOnlyAtEnd=function _renderNonTweeningValueOnlyAtEnd(ratio,data){return data.set(data.t,data.p,ratio!==1?data.b:data.e,data)},_setterCSSStyle=function _setterCSSStyle(target,property,value){return target.style[property]=value},_setterCSSProp=function _setterCSSProp(target,property,value){return target.style.setProperty(property,value)},_setterTransform=function _setterTransform(target,property,value){return target._gsap[property]=value},_setterScale=function _setterScale(target,property,value){return target._gsap.scaleX=target._gsap.scaleY=value},_setterScaleWithRender=function _setterScaleWithRender(target,property,value,data,ratio){var cache=target._gsap;cache.scaleX=cache.scaleY=value,cache.renderTransform(ratio,cache)},_setterTransformWithRender=function _setterTransformWithRender(target,property,value,data,ratio){var cache=target._gsap;cache[property]=value,cache.renderTransform(ratio,cache)},_transformProp="transform",_transformOriginProp=_transformProp+"Origin",_saveStyle=function _saveStyle(property,isNotCSS){var _this=this,target=this.target,style=target.style,cache=target._gsap;if(property in _transformProps&&style){this.tfm=this.tfm||{};if(property==="transform")return _propertyAliases.transform.split(",").forEach(function(p){return _saveStyle.call(_this,p,isNotCSS)});property=_propertyAliases[property]||property,~property.indexOf(",")?property.split(",").forEach(function(a){return _this.tfm[a]=_get(target,a)}):this.tfm[property]=cache.x?cache[property]:_get(target,property),property===_transformOriginProp&&(this.tfm.zOrigin=cache.zOrigin);if(this.props.indexOf(_transformProp)>=0)return;cache.svg&&(this.svgo=target.getAttribute("data-svg-origin"),this.props.push(_transformOriginProp,isNotCSS,"")),property=_transformProp}(style||isNotCSS)&&this.props.push(property,isNotCSS,style[property])},_removeIndependentTransforms=function _removeIndependentTransforms(style){style.translate&&(style.removeProperty("translate"),style.removeProperty("scale"),style.removeProperty("rotate"))},_revertStyle=function _revertStyle(){var props=this.props,target=this.target,style=target.style,cache=target._gsap,i,p;for(i=0;i<props.length;i+=3)props[i+1]?target[props[i]]=props[i+2]:props[i+2]?style[props[i]]=props[i+2]:style.removeProperty(props[i].substr(0,2)==="--"?props[i]:props[i].replace(_capsExp,"-$1").toLowerCase());if(this.tfm){for(p in this.tfm)cache[p]=this.tfm[p];cache.svg&&(cache.renderTransform(),target.setAttribute("data-svg-origin",this.svgo||"")),i=_reverting$1(),(!i||!i.isStart)&&!style[_transformProp]&&(_removeIndependentTransforms(style),cache.zOrigin&&style[_transformOriginProp]&&(style[_transformOriginProp]+=" "+cache.zOrigin+"px",cache.zOrigin=0,cache.renderTransform()),cache.uncache=1)}},_getStyleSaver=function _getStyleSaver(target,properties){var saver={target:target,props:[],revert:_revertStyle,save:_saveStyle};return target._gsap||gsap.core.getCache(target),properties&&properties.split(",").forEach(function(p){return saver.save(p)}),saver},_supports3D,_createElement=function _createElement(type,ns){var e=_doc$1.createElementNS?_doc$1.createElementNS((ns||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),type):_doc$1.createElement(type);return e&&e.style?e:_doc$1.createElement(type)},_getComputedProperty=function _getComputedProperty(target,property,skipPrefixFallback){var cs=getComputedStyle(target);return cs[property]||cs.getPropertyValue(property.replace(_capsExp,"-$1").toLowerCase())||cs.getPropertyValue(property)||!skipPrefixFallback&&_getComputedProperty(target,_checkPropPrefix(property)||property,1)||""},_prefixes="O,Moz,ms,Ms,Webkit".split(","),_checkPropPrefix=function _checkPropPrefix(property,element,preferPrefix){var e=element||_tempDiv,s=e.style,i=5;if(property in s&&!preferPrefix)return property;property=property.charAt(0).toUpperCase()+property.substr(1);while(i--&&!(_prefixes[i]+property in s));return i<0?null:(i===3?"ms":i>=0?_prefixes[i]:"")+property},_initCore=function _initCore(){_windowExists$1()&&window.document&&(_win$1=window,_doc$1=_win$1.document,_docElement=_doc$1.documentElement,_tempDiv=_createElement("div")||{style:{}},_tempDivStyler=_createElement("div"),_transformProp=_checkPropPrefix(_transformProp),_transformOriginProp=_transformProp+"Origin",_tempDiv.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",_supports3D=!!_checkPropPrefix("perspective"),_reverting$1=gsap.core.reverting,_pluginInitted=1)},_getBBoxHack=function _getBBoxHack(swapIfPossible){var svg=_createElement("svg",this.ownerSVGElement&&this.ownerSVGElement.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),oldParent=this.parentNode,oldSibling=this.nextSibling,oldCSS=this.style.cssText,bbox;_docElement.appendChild(svg),svg.appendChild(this),this.style.display="block";if(swapIfPossible)try{bbox=this.getBBox(),this._gsapBBox=this.getBBox,this.getBBox=_getBBoxHack}catch(e){}else this._gsapBBox&&(bbox=this._gsapBBox());return oldParent&&(oldSibling?oldParent.insertBefore(this,oldSibling):oldParent.appendChild(this)),_docElement.removeChild(svg),this.style.cssText=oldCSS,bbox},_getAttributeFallbacks=function _getAttributeFallbacks(target,attributesArray){var i=attributesArray.length;while(i--)if(target.hasAttribute(attributesArray[i]))return target.getAttribute(attributesArray[i])},_getBBox=function _getBBox(target){var bounds;try{bounds=target.getBBox()}catch(error){bounds=_getBBoxHack.call(target,!0)}return bounds&&(bounds.width||bounds.height)||target.getBBox===_getBBoxHack||(bounds=_getBBoxHack.call(target,!0)),bounds&&!bounds.width&&!bounds.x&&!bounds.y?{x:+_getAttributeFallbacks(target,["x","cx","x1"])||0,y:+_getAttributeFallbacks(target,["y","cy","y1"])||0,width:0,height:0}:bounds},_isSVG=function _isSVG(e){return!(!e.getCTM||!!e.parentNode&&!e.ownerSVGElement||!_getBBox(e))},_removeProperty=function _removeProperty(target,property){if(property){var style=target.style,first2Chars;property in _transformProps&&property!==_transformOriginProp&&(property=_transformProp);if(style.removeProperty){first2Chars=property.substr(0,2);if(first2Chars==="ms"||property.substr(0,6)==="webkit")property="-"+property;style.removeProperty(first2Chars==="--"?property:property.replace(_capsExp,"-$1").toLowerCase())}else style.removeAttribute(property)}},_addNonTweeningPT=function _addNonTweeningPT(plugin,target,property,beginning,end,onlySetAtEnd){var pt=new PropTween(plugin._pt,target,property,0,1,onlySetAtEnd?_renderNonTweeningValueOnlyAtEnd:_renderNonTweeningValue);return plugin._pt=pt,pt.b=beginning,pt.e=end,plugin._props.push(property),pt},_nonConvertibleUnits={deg:1,rad:1,turn:1},_nonStandardLayouts={grid:1,flex:1},_convertToUnit=function _convertToUnit(target,property,value,unit){var curValue=parseFloat(value)||0,curUnit=(value+"").trim().substr((curValue+"").length)||"px",style=_tempDiv.style,horizontal=_horizontalExp.test(property),isRootSVG=target.tagName.toLowerCase()==="svg",measureProperty=(isRootSVG?"client":"offset")+(horizontal?"Width":"Height"),amount=100,toPixels=unit==="px",toPercent=unit==="%",px,parent,cache,isSVG;if(unit===curUnit||!curValue||_nonConvertibleUnits[unit]||_nonConvertibleUnits[curUnit])return curValue;curUnit!=="px"&&!toPixels&&(curValue=_convertToUnit(target,property,value,"px")),isSVG=target.getCTM&&_isSVG(target);if(!toPercent&&curUnit!=="%"||!_transformProps[property]&&!~property.indexOf("adius")){style[horizontal?"width":"height"]=amount+(toPixels?curUnit:unit),parent=~property.indexOf("adius")||unit==="em"&&target.appendChild&&!isRootSVG?target:target.parentNode,isSVG&&(parent=(target.ownerSVGElement||{}).parentNode);if(!parent||parent===_doc$1||!parent.appendChild)parent=_doc$1.body;cache=parent._gsap;if(cache&&toPercent&&cache.width&&horizontal&&cache.time===_ticker.time&&!cache.uncache)return _round(curValue/cache.width*amount);if(!toPercent||property!=="height"&&property!=="width")(toPercent||curUnit==="%")&&!_nonStandardLayouts[_getComputedProperty(parent,"display")]&&(style.position=_getComputedProperty(target,"position")),parent===target&&(style.position="static"),parent.appendChild(_tempDiv),px=_tempDiv[measureProperty],parent.removeChild(_tempDiv),style.position="absolute";else{var v=target.style[property];target.style[property]=amount+unit,px=target[measureProperty],v?target.style[property]=v:_removeProperty(target,property)}return horizontal&&toPercent&&(cache=_getCache(parent),cache.time=_ticker.time,cache.width=parent[measureProperty]),_round(toPixels?px*curValue/amount:px&&curValue?amount/px*curValue:0)}return px=isSVG?target.getBBox()[horizontal?"width":"height"]:target[measureProperty],_round(toPercent?curValue/px*amount:curValue/100*px)},_get=function _get(target,property,unit,uncache){var value;_pluginInitted||_initCore(),property in _propertyAliases&&property!=="transform"&&(property=_propertyAliases[property],~property.indexOf(",")&&(property=property.split(",")[0]));if(_transformProps[property]&&property!=="transform")value=_parseTransform(target,uncache),value=property!=="transformOrigin"?value[property]:value.svg?value.origin:_firstTwoOnly(_getComputedProperty(target,_transformOriginProp))+" "+value.zOrigin+"px";else{value=target.style[property];if(!value||value==="auto"||uncache||~(value+"").indexOf("calc("))value=_specialProps[property]&&_specialProps[property](target,property,unit)||_getComputedProperty(target,property)||_getProperty(target,property)||(property==="opacity"?1:0)}return unit&&!~(value+"").trim().indexOf(" ")?_convertToUnit(target,property,value,unit)+unit:value},_tweenComplexCSSString=function _tweenComplexCSSString(target,prop,start,end){if(!start||start==="none"){var p=_checkPropPrefix(prop,target,1),s=p&&_getComputedProperty(target,p,1);s&&s!==start?(prop=p,start=s):prop==="borderColor"&&(start=_getComputedProperty(target,"borderTopColor"))}var pt=new PropTween(this._pt,target.style,prop,0,1,_renderComplexString),index=0,matchIndex=0,a,result,startValues,startNum,color,startValue,endValue,endNum,chunk,endUnit,startUnit,endValues;pt.b=start,pt.e=end,start+="",end+="",end==="auto"&&(startValue=target.style[prop],target.style[prop]=end,end=_getComputedProperty(target,prop)||end,startValue?target.style[prop]=startValue:_removeProperty(target,prop)),a=[start,end],_colorStringFilter(a),start=a[0],end=a[1],startValues=start.match(_numWithUnitExp)||[],endValues=end.match(_numWithUnitExp)||[];if(endValues.length){while(result=_numWithUnitExp.exec(end)){endValue=result[0],chunk=end.substring(index,result.index);if(color)color=(color+1)%5;else if(chunk.substr(-5)==="rgba("||chunk.substr(-5)==="hsla(")color=1;endValue!==(startValue=startValues[matchIndex++]||"")&&(startNum=parseFloat(startValue)||0,startUnit=startValue.substr((startNum+"").length),endValue.charAt(1)==="="&&(endValue=_parseRelative(startNum,endValue)+startUnit),endNum=parseFloat(endValue),endUnit=endValue.substr((endNum+"").length),index=_numWithUnitExp.lastIndex-endUnit.length,endUnit||(endUnit=endUnit||_config.units[prop]||startUnit,index===end.length&&(end+=endUnit,pt.e+=endUnit)),startUnit!==endUnit&&(startNum=_convertToUnit(target,prop,startValue,endUnit)||0),pt._pt={_next:pt._pt,p:chunk||matchIndex===1?chunk:",",s:startNum,c:endNum-startNum,m:color&&color<4||prop==="zIndex"?Math.round:0})}pt.c=index<end.length?end.substring(index,end.length):""}else pt.r=prop==="display"&&end==="none"?_renderNonTweeningValueOnlyAtEnd:_renderNonTweeningValue;return _relExp.test(end)&&(pt.e=0),this._pt=pt,pt},_keywordToPercent={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},_convertKeywordsToPercentages=function _convertKeywordsToPercentages(value){var split=value.split(" "),x=split[0],y=split[1]||"50%";if(x==="top"||x==="bottom"||y==="left"||y==="right")value=x,x=y,y=value;return split[0]=_keywordToPercent[x]||x,split[1]=_keywordToPercent[y]||y,split.join(" ")},_renderClearProps=function _renderClearProps(ratio,data){if(data.tween&&data.tween._time===data.tween._dur){var target=data.t,style=target.style,props=data.u,cache=target._gsap,prop,clearTransforms,i;if(props==="all"||props===!0)style.cssText="",clearTransforms=1;else{props=props.split(","),i=props.length;while(--i>-1)prop=props[i],_transformProps[prop]&&(clearTransforms=1,prop=prop==="transformOrigin"?_transformOriginProp:_transformProp),_removeProperty(target,prop)}clearTransforms&&(_removeProperty(target,_transformProp),cache&&(cache.svg&&target.removeAttribute("transform"),_parseTransform(target,1),cache.uncache=1,_removeIndependentTransforms(style)))}},_specialProps={clearProps:function clearProps(plugin,target,property,endValue,tween){if(tween.data!=="isFromStart"){var pt=plugin._pt=new PropTween(plugin._pt,target,property,0,0,_renderClearProps);return pt.u=endValue,pt.pr=-10,pt.tween=tween,plugin._props.push(property),1}}},_identity2DMatrix=[1,0,0,1,0,0],_rotationalProperties={},_isNullTransform=function _isNullTransform(value){return value==="matrix(1, 0, 0, 1, 0, 0)"||value==="none"||!value},_getComputedTransformMatrixAsArray=function _getComputedTransformMatrixAsArray(target){var matrixString=_getComputedProperty(target,_transformProp);return _isNullTransform(matrixString)?_identity2DMatrix:matrixString.substr(7).match(_numExp).map(_round)},_getMatrix=function _getMatrix(target,force2D){var cache=target._gsap||_getCache(target),style=target.style,matrix=_getComputedTransformMatrixAsArray(target),parent,nextSibling,temp,addedToDOM;if(cache.svg&&target.getAttribute("transform"))return temp=target.transform.baseVal.consolidate().matrix,matrix=[temp.a,temp.b,temp.c,temp.d,temp.e,temp.f],matrix.join(",")==="1,0,0,1,0,0"?_identity2DMatrix:matrix;if(matrix===_identity2DMatrix&&!target.offsetParent&&target!==_docElement&&!cache.svg){temp=style.display,style.display="block",parent=target.parentNode;if(!parent||!target.offsetParent)addedToDOM=1,nextSibling=target.nextElementSibling,_docElement.appendChild(target);matrix=_getComputedTransformMatrixAsArray(target),temp?style.display=temp:_removeProperty(target,"display"),addedToDOM&&(nextSibling?parent.insertBefore(target,nextSibling):parent?parent.appendChild(target):_docElement.removeChild(target))}return force2D&&matrix.length>6?[matrix[0],matrix[1],matrix[4],matrix[5],matrix[12],matrix[13]]:matrix},_applySVGOrigin=function _applySVGOrigin(target,origin,originIsAbsolute,smooth,matrixArray,pluginToAddPropTweensTo){var cache=target._gsap,matrix=matrixArray||_getMatrix(target,!0),xOriginOld=cache.xOrigin||0,yOriginOld=cache.yOrigin||0,xOffsetOld=cache.xOffset||0,yOffsetOld=cache.yOffset||0,a=matrix[0],b=matrix[1],c=matrix[2],d=matrix[3],tx=matrix[4],ty=matrix[5],originSplit=origin.split(" "),xOrigin=parseFloat(originSplit[0])||0,yOrigin=parseFloat(originSplit[1])||0,bounds,determinant,x,y;originIsAbsolute?matrix!==_identity2DMatrix&&(determinant=a*d-b*c)&&(x=xOrigin*(d/determinant)+yOrigin*(-c/determinant)+(c*ty-d*tx)/determinant,y=xOrigin*(-b/determinant)+yOrigin*(a/determinant)-(a*ty-b*tx)/determinant,xOrigin=x,yOrigin=y):(bounds=_getBBox(target),xOrigin=bounds.x+(~originSplit[0].indexOf("%")?xOrigin/100*bounds.width:xOrigin),yOrigin=bounds.y+(~(originSplit[1]||originSplit[0]).indexOf("%")?yOrigin/100*bounds.height:yOrigin)),smooth||smooth!==!1&&cache.smooth?(tx=xOrigin-xOriginOld,ty=yOrigin-yOriginOld,cache.xOffset=xOffsetOld+(tx*a+ty*c)-tx,cache.yOffset=yOffsetOld+(tx*b+ty*d)-ty):cache.xOffset=cache.yOffset=0,cache.xOrigin=xOrigin,cache.yOrigin=yOrigin,cache.smooth=!!smooth,cache.origin=origin,cache.originIsAbsolute=!!originIsAbsolute,target.style[_transformOriginProp]="0px 0px",pluginToAddPropTweensTo&&(_addNonTweeningPT(pluginToAddPropTweensTo,cache,"xOrigin",xOriginOld,xOrigin),_addNonTweeningPT(pluginToAddPropTweensTo,cache,"yOrigin",yOriginOld,yOrigin),_addNonTweeningPT(pluginToAddPropTweensTo,cache,"xOffset",xOffsetOld,cache.xOffset),_addNonTweeningPT(pluginToAddPropTweensTo,cache,"yOffset",yOffsetOld,cache.yOffset)),target.setAttribute("data-svg-origin",xOrigin+" "+yOrigin)},_parseTransform=function _parseTransform(target,uncache){var cache=target._gsap||new GSCache(target);if("x"in cache&&!uncache&&!cache.uncache)return cache;var style=target.style,invertedScaleX=cache.scaleX<0,px="px",deg="deg",cs=getComputedStyle(target),origin=_getComputedProperty(target,_transformOriginProp)||"0",x,y,z,scaleX,scaleY,rotation,rotationX,rotationY,skewX,skewY,perspective,xOrigin,yOrigin,matrix,angle,cos,sin,a,b,c,d,a12,a22,t1,t2,t3,a13,a23,a33,a42,a43,a32;x=y=z=rotation=rotationX=rotationY=skewX=skewY=perspective=0,scaleX=scaleY=1,cache.svg=!!target.getCTM&&!!_isSVG(target);if(cs.translate){if(cs.translate!=="none"||cs.scale!=="none"||cs.rotate!=="none")style[_transformProp]=(cs.translate!=="none"?"translate3d("+(cs.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+(cs.rotate!=="none"?"rotate("+cs.rotate+") ":"")+(cs.scale!=="none"?"scale("+cs.scale.split(" ").join(",")+") ":"")+(cs[_transformProp]!=="none"?cs[_transformProp]:"");style.scale=style.rotate=style.translate="none"}matrix=_getMatrix(target,cache.svg),cache.svg&&(cache.uncache?(t2=target.getBBox(),origin=cache.xOrigin-t2.x+"px "+(cache.yOrigin-t2.y)+"px",t1=""):t1=!uncache&&target.getAttribute("data-svg-origin"),_applySVGOrigin(target,t1||origin,!!t1||cache.originIsAbsolute,cache.smooth!==!1,matrix)),xOrigin=cache.xOrigin||0,yOrigin=cache.yOrigin||0,matrix!==_identity2DMatrix&&(a=matrix[0],b=matrix[1],c=matrix[2],d=matrix[3],x=a12=matrix[4],y=a22=matrix[5],matrix.length===6?(scaleX=Math.sqrt(a*a+b*b),scaleY=Math.sqrt(d*d+c*c),rotation=a||b?_atan2(b,a)*_RAD2DEG:0,skewX=c||d?_atan2(c,d)*_RAD2DEG+rotation:0,skewX&&(scaleY*=Math.abs(Math.cos(skewX*_DEG2RAD))),cache.svg&&(x-=xOrigin-(xOrigin*a+yOrigin*c),y-=yOrigin-(xOrigin*b+yOrigin*d))):(a32=matrix[6],a42=matrix[7],a13=matrix[8],a23=matrix[9],a33=matrix[10],a43=matrix[11],x=matrix[12],y=matrix[13],z=matrix[14],angle=_atan2(a32,a33),rotationX=angle*_RAD2DEG,angle&&(cos=Math.cos(-angle),sin=Math.sin(-angle),t1=a12*cos+a13*sin,t2=a22*cos+a23*sin,t3=a32*cos+a33*sin,a13=a12*-sin+a13*cos,a23=a22*-sin+a23*cos,a33=a32*-sin+a33*cos,a43=a42*-sin+a43*cos,a12=t1,a22=t2,a32=t3),angle=_atan2(-c,a33),rotationY=angle*_RAD2DEG,angle&&(cos=Math.cos(-angle),sin=Math.sin(-angle),t1=a*cos-a13*sin,t2=b*cos-a23*sin,t3=c*cos-a33*sin,a43=d*sin+a43*cos,a=t1,b=t2,c=t3),angle=_atan2(b,a),rotation=angle*_RAD2DEG,angle&&(cos=Math.cos(angle),sin=Math.sin(angle),t1=a*cos+b*sin,t2=a12*cos+a22*sin,b=b*cos-a*sin,a22=a22*cos-a12*sin,a=t1,a12=t2),rotationX&&Math.abs(rotationX)+Math.abs(rotation)>359.9&&(rotationX=rotation=0,rotationY=180-rotationY),scaleX=_round(Math.sqrt(a*a+b*b+c*c)),scaleY=_round(Math.sqrt(a22*a22+a32*a32)),angle=_atan2(a12,a22),skewX=Math.abs(angle)>2e-4?angle*_RAD2DEG:0,perspective=a43?1/(a43<0?-a43:a43):0),cache.svg&&(t1=target.getAttribute("transform"),cache.forceCSS=target.setAttribute("transform","")||!_isNullTransform(_getComputedProperty(target,_transformProp)),t1&&target.setAttribute("transform",t1))),Math.abs(skewX)>90&&Math.abs(skewX)<270&&(invertedScaleX?(scaleX*=-1,skewX+=rotation<=0?180:-180,rotation+=rotation<=0?180:-180):(scaleY*=-1,skewX+=skewX<=0?180:-180)),uncache=uncache||cache.uncache,cache.x=x-((cache.xPercent=x&&(!uncache&&cache.xPercent||(Math.round(target.offsetWidth/2)===Math.round(-x)?-50:0)))?target.offsetWidth*cache.xPercent/100:0)+px,cache.y=y-((cache.yPercent=y&&(!uncache&&cache.yPercent||(Math.round(target.offsetHeight/2)===Math.round(-y)?-50:0)))?target.offsetHeight*cache.yPercent/100:0)+px,cache.z=z+px,cache.scaleX=_round(scaleX),cache.scaleY=_round(scaleY),cache.rotation=_round(rotation)+deg,cache.rotationX=_round(rotationX)+deg,cache.rotationY=_round(rotationY)+deg,cache.skewX=skewX+deg,cache.skewY=skewY+deg,cache.transformPerspective=perspective+px;if(cache.zOrigin=parseFloat(origin.split(" ")[2])||!uncache&&cache.zOrigin||0)style[_transformOriginProp]=_firstTwoOnly(origin);return cache.xOffset=cache.yOffset=0,cache.force3D=_config.force3D,cache.renderTransform=cache.svg?_renderSVGTransforms:_supports3D?_renderCSSTransforms:_renderNon3DTransforms,cache.uncache=0,cache},_firstTwoOnly=function _firstTwoOnly(value){return(value=value.split(" "))[0]+" "+value[1]},_addPxTranslate=function _addPxTranslate(target,start,value){var unit=getUnit(start);return _round(parseFloat(start)+parseFloat(_convertToUnit(target,"x",value+"px",unit)))+unit},_renderNon3DTransforms=function _renderNon3DTransforms(ratio,cache){cache.z="0px",cache.rotationY=cache.rotationX="0deg",cache.force3D=0,_renderCSSTransforms(ratio,cache)},_zeroDeg="0deg",_zeroPx="0px",_endParenthesis=") ",_renderCSSTransforms=function _renderCSSTransforms(ratio,cache){var _ref=cache||this,xPercent=_ref.xPercent,yPercent=_ref.yPercent,x=_ref.x,y=_ref.y,z=_ref.z,rotation=_ref.rotation,rotationY=_ref.rotationY,rotationX=_ref.rotationX,skewX=_ref.skewX,skewY=_ref.skewY,scaleX=_ref.scaleX,scaleY=_ref.scaleY,transformPerspective=_ref.transformPerspective,force3D=_ref.force3D,target=_ref.target,zOrigin=_ref.zOrigin,transforms="",use3D=force3D==="auto"&&ratio&&ratio!==1||force3D===!0;if(zOrigin&&(rotationX!==_zeroDeg||rotationY!==_zeroDeg)){var angle=parseFloat(rotationY)*_DEG2RAD,a13=Math.sin(angle),a33=Math.cos(angle),cos;angle=parseFloat(rotationX)*_DEG2RAD,cos=Math.cos(angle),x=_addPxTranslate(target,x,a13*cos*-zOrigin),y=_addPxTranslate(target,y,-Math.sin(angle)*-zOrigin),z=_addPxTranslate(target,z,a33*cos*-zOrigin+zOrigin)}transformPerspective!==_zeroPx&&(transforms+="perspective("+transformPerspective+_endParenthesis);if(xPercent||yPercent)transforms+="translate("+xPercent+"%, "+yPercent+"%) ";if(use3D||x!==_zeroPx||y!==_zeroPx||z!==_zeroPx)transforms+=z!==_zeroPx||use3D?"translate3d("+x+", "+y+", "+z+") ":"translate("+x+", "+y+_endParenthesis;rotation!==_zeroDeg&&(transforms+="rotate("+rotation+_endParenthesis),rotationY!==_zeroDeg&&(transforms+="rotateY("+rotationY+_endParenthesis),rotationX!==_zeroDeg&&(transforms+="rotateX("+rotationX+_endParenthesis);if(skewX!==_zeroDeg||skewY!==_zeroDeg)transforms+="skew("+skewX+", "+skewY+_endParenthesis;if(scaleX!==1||scaleY!==1)transforms+="scale("+scaleX+", "+scaleY+_endParenthesis;target.style[_transformProp]=transforms||"translate(0, 0)"},_renderSVGTransforms=function _renderSVGTransforms(ratio,cache){var _ref2=cache||this,xPercent=_ref2.xPercent,yPercent=_ref2.yPercent,x=_ref2.x,y=_ref2.y,rotation=_ref2.rotation,skewX=_ref2.skewX,skewY=_ref2.skewY,scaleX=_ref2.scaleX,scaleY=_ref2.scaleY,target=_ref2.target,xOrigin=_ref2.xOrigin,yOrigin=_ref2.yOrigin,xOffset=_ref2.xOffset,yOffset=_ref2.yOffset,forceCSS=_ref2.forceCSS,tx=parseFloat(x),ty=parseFloat(y),a11,a21,a12,a22,temp;rotation=parseFloat(rotation),skewX=parseFloat(skewX),skewY=parseFloat(skewY),skewY&&(skewY=parseFloat(skewY),skewX+=skewY,rotation+=skewY),rotation||skewX?(rotation*=_DEG2RAD,skewX*=_DEG2RAD,a11=Math.cos(rotation)*scaleX,a21=Math.sin(rotation)*scaleX,a12=Math.sin(rotation-skewX)*-scaleY,a22=Math.cos(rotation-skewX)*scaleY,skewX&&(skewY*=_DEG2RAD,temp=Math.tan(skewX-skewY),temp=Math.sqrt(1+temp*temp),a12*=temp,a22*=temp,skewY&&(temp=Math.tan(skewY),temp=Math.sqrt(1+temp*temp),a11*=temp,a21*=temp)),a11=_round(a11),a21=_round(a21),a12=_round(a12),a22=_round(a22)):(a11=scaleX,a22=scaleY,a21=a12=0);if(tx&&!~(x+"").indexOf("px")||ty&&!~(y+"").indexOf("px"))tx=_convertToUnit(target,"x",x,"px"),ty=_convertToUnit(target,"y",y,"px");if(xOrigin||yOrigin||xOffset||yOffset)tx=_round(tx+xOrigin-(xOrigin*a11+yOrigin*a12)+xOffset),ty=_round(ty+yOrigin-(xOrigin*a21+yOrigin*a22)+yOffset);if(xPercent||yPercent)temp=target.getBBox(),tx=_round(tx+xPercent/100*temp.width),ty=_round(ty+yPercent/100*temp.height);temp="matrix("+a11+","+a21+","+a12+","+a22+","+tx+","+ty+")",target.setAttribute("transform",temp),forceCSS&&(target.style[_transformProp]=temp)},_addRotationalPropTween=function _addRotationalPropTween(plugin,target,property,startNum,endValue){var cap=360,isString=_isString(endValue),endNum=parseFloat(endValue)*(isString&&~endValue.indexOf("rad")?_RAD2DEG:1),change=endNum-startNum,finalValue=startNum+change+"deg",direction,pt;return isString&&(direction=endValue.split("_")[1],direction==="short"&&(change%=cap,change!==change%(cap/2)&&(change+=change<0?cap:-cap)),direction==="cw"&&change<0?change=(change+cap*_bigNum$1)%cap-~~(change/cap)*cap:direction==="ccw"&&change>0&&(change=(change-cap*_bigNum$1)%cap-~~(change/cap)*cap)),plugin._pt=pt=new PropTween(plugin._pt,target,property,startNum,change,_renderPropWithEnd),pt.e=finalValue,pt.u="deg",plugin._props.push(property),pt},_assign=function _assign(target,source){for(var p in source)target[p]=source[p];return target},_addRawTransformPTs=function _addRawTransformPTs(plugin,transforms,target){var startCache=_assign({},target._gsap),exclude="perspective,force3D,transformOrigin,svgOrigin",style=target.style,endCache,p,startValue,endValue,startNum,endNum,startUnit,endUnit;startCache.svg?(startValue=target.getAttribute("transform"),target.setAttribute("transform",""),style[_transformProp]=transforms,endCache=_parseTransform(target,1),_removeProperty(target,_transformProp),target.setAttribute("transform",startValue)):(startValue=getComputedStyle(target)[_transformProp],style[_transformProp]=transforms,endCache=_parseTransform(target,1),style[_transformProp]=startValue);for(p in _transformProps)startValue=startCache[p],endValue=endCache[p],startValue!==endValue&&exclude.indexOf(p)<0&&(startUnit=getUnit(startValue),endUnit=getUnit(endValue),startNum=startUnit!==endUnit?_convertToUnit(target,p,startValue,endUnit):parseFloat(startValue),endNum=parseFloat(endValue),plugin._pt=new PropTween(plugin._pt,endCache,p,startNum,endNum-startNum,_renderCSSProp),plugin._pt.u=endUnit||0,plugin._props.push(p));_assign(endCache,startCache)};_forEachName("padding,margin,Width,Radius",function(name,index){var t="Top",r="Right",b="Bottom",l="Left",props=(index<3?[t,r,b,l]:[t+l,t+r,b+r,b+l]).map(function(side){return index<2?name+side:"border"+side+name});_specialProps[index>1?"border"+name:name]=function(plugin,target,property,endValue,tween){var a,vars;if(arguments.length<4)return a=props.map(function(prop){return _get(plugin,prop,property)}),vars=a.join(" "),vars.split(a[0]).length===5?a[0]:vars;a=(endValue+"").split(" "),vars={},props.forEach(function(prop,i){return vars[prop]=a[i]=a[i]||a[(i-1)/2|0]}),plugin.init(target,vars,tween)}});var CSSPlugin={name:"css",register:_initCore,targetTest:function targetTest(target){return target.style&&target.nodeType},init:function init(target,vars,tween,index,targets){var props=this._props,style=target.style,startAt=tween.vars.startAt,startValue,endValue,endNum,startNum,type,specialProp,p,startUnit,endUnit,relative,isTransformRelated,transformPropTween,cache,smooth,hasPriority,inlineProps;_pluginInitted||_initCore(),this.styles=this.styles||_getStyleSaver(target),inlineProps=this.styles.props,this.tween=tween;for(p in vars){if(p==="autoRound")continue;endValue=vars[p];if(_plugins[p]&&_checkPlugin(p,vars,tween,index,target,targets))continue;type=typeof endValue,specialProp=_specialProps[p],type==="function"&&(endValue=endValue.call(tween,index,target,targets),type=typeof endValue),type==="string"&&~endValue.indexOf("random(")&&(endValue=_replaceRandom(endValue));if(specialProp)specialProp(this,target,p,endValue,tween)&&(hasPriority=1);else if(p.substr(0,2)==="--")startValue=(getComputedStyle(target).getPropertyValue(p)+"").trim(),endValue+="",_colorExp.lastIndex=0,_colorExp.test(startValue)||(startUnit=getUnit(startValue),endUnit=getUnit(endValue)),endUnit?startUnit!==endUnit&&(startValue=_convertToUnit(target,p,startValue,endUnit)+endUnit):startUnit&&(endValue+=startUnit),this.add(style,"setProperty",startValue,endValue,index,targets,0,0,p),props.push(p),inlineProps.push(p,0,style[p]);else if(type!=="undefined"){startAt&&p in startAt?(startValue=typeof startAt[p]=="function"?startAt[p].call(tween,index,target,targets):startAt[p],_isString(startValue)&&~startValue.indexOf("random(")&&(startValue=_replaceRandom(startValue)),getUnit(startValue+"")||startValue==="auto"||(startValue+=_config.units[p]||getUnit(_get(target,p))||""),(startValue+"").charAt(1)==="="&&(startValue=_get(target,p))):startValue=_get(target,p),startNum=parseFloat(startValue),relative=type==="string"&&endValue.charAt(1)==="="&&endValue.substr(0,2),relative&&(endValue=endValue.substr(2)),endNum=parseFloat(endValue),p in _propertyAliases&&(p==="autoAlpha"&&(startNum===1&&_get(target,"visibility")==="hidden"&&endNum&&(startNum=0),inlineProps.push("visibility",0,style.visibility),_addNonTweeningPT(this,style,"visibility",startNum?"inherit":"hidden",endNum?"inherit":"hidden",!endNum)),p!=="scale"&&p!=="transform"&&(p=_propertyAliases[p],~p.indexOf(",")&&(p=p.split(",")[0]))),isTransformRelated=p in _transformProps;if(isTransformRelated){this.styles.save(p),transformPropTween||(cache=target._gsap,cache.renderTransform&&!vars.parseTransform||_parseTransform(target,vars.parseTransform),smooth=vars.smoothOrigin!==!1&&cache.smooth,transformPropTween=this._pt=new PropTween(this._pt,style,_transformProp,0,1,cache.renderTransform,cache,0,-1),transformPropTween.dep=1);if(p==="scale")this._pt=new PropTween(this._pt,cache,"scaleY",cache.scaleY,(relative?_parseRelative(cache.scaleY,relative+endNum):endNum)-cache.scaleY||0,_renderCSSProp),this._pt.u=0,props.push("scaleY",p),p+="X";else{if(p==="transformOrigin"){inlineProps.push(_transformOriginProp,0,style[_transformOriginProp]),endValue=_convertKeywordsToPercentages(endValue),cache.svg?_applySVGOrigin(target,endValue,0,smooth,0,this):(endUnit=parseFloat(endValue.split(" ")[2])||0,endUnit!==cache.zOrigin&&_addNonTweeningPT(this,cache,"zOrigin",cache.zOrigin,endUnit),_addNonTweeningPT(this,style,p,_firstTwoOnly(startValue),_firstTwoOnly(endValue)));continue}if(p==="svgOrigin"){_applySVGOrigin(target,endValue,1,smooth,0,this);continue}if(p in _rotationalProperties){_addRotationalPropTween(this,cache,p,startNum,relative?_parseRelative(startNum,relative+endValue):endValue);continue}if(p==="smoothOrigin"){_addNonTweeningPT(this,cache,"smooth",cache.smooth,endValue);continue}if(p==="force3D"){cache[p]=endValue;continue}if(p==="transform"){_addRawTransformPTs(this,endValue,target);continue}}}else p in style||(p=_checkPropPrefix(p)||p);if(isTransformRelated||(endNum||endNum===0)&&(startNum||startNum===0)&&!_complexExp.test(endValue)&&p in style)startUnit=(startValue+"").substr((startNum+"").length),endNum||(endNum=0),endUnit=getUnit(endValue)||(p in _config.units?_config.units[p]:startUnit),startUnit!==endUnit&&(startNum=_convertToUnit(target,p,startValue,endUnit)),this._pt=new PropTween(this._pt,isTransformRelated?cache:style,p,startNum,(relative?_parseRelative(startNum,relative+endNum):endNum)-startNum,!!isTransformRelated||endUnit!=="px"&&p!=="zIndex"||vars.autoRound===!1?_renderCSSProp:_renderRoundedCSSProp),this._pt.u=endUnit||0,startUnit!==endUnit&&endUnit!=="%"&&(this._pt.b=startValue,this._pt.r=_renderCSSPropWithBeginning);else if(p in style)_tweenComplexCSSString.call(this,target,p,startValue,relative?relative+endValue:endValue);else if(p in target)this.add(target,p,startValue||target[p],relative?relative+endValue:endValue,index,targets);else if(p!=="parseTransform"){_missingPlugin(p,endValue);continue}isTransformRelated||(p in style?inlineProps.push(p,0,style[p]):inlineProps.push(p,1,startValue||target[p])),props.push(p)}}hasPriority&&_sortPropTweensByPriority(this)},render:function render(ratio,data){if(data.tween._time||!_reverting$1()){var pt=data._pt;while(pt)pt.r(ratio,pt.d),pt=pt._next}else data.styles.revert()},get:_get,aliases:_propertyAliases,getSetter:function getSetter(target,property,plugin){var p=_propertyAliases[property];return p&&p.indexOf(",")<0&&(property=p),property in _transformProps&&property!==_transformOriginProp&&(target._gsap.x||_get(target,"x"))?plugin&&_recentSetterPlugin===plugin?property==="scale"?_setterScale:_setterTransform:(_recentSetterPlugin=plugin||{})&&(property==="scale"?_setterScaleWithRender:_setterTransformWithRender):target.style&&!_isUndefined(target.style[property])?_setterCSSStyle:~property.indexOf("-")?_setterCSSProp:_getSetter(target,property)},core:{_removeProperty:_removeProperty,_getMatrix:_getMatrix}};gsap.utils.checkPrefix=_checkPropPrefix,gsap.core.getStyleSaver=_getStyleSaver,function(positionAndScale,rotation,others,aliases){var all=_forEachName(positionAndScale+","+rotation+","+others,function(name){_transformProps[name]=1});_forEachName(rotation,function(name){_config.units[name]="deg",_rotationalProperties[name]=1}),_propertyAliases[all[13]]=positionAndScale+","+rotation,_forEachName(aliases,function(name){var split=name.split(":");_propertyAliases[split[1]]=all[split[0]]})}("x,y,z,scale,scaleX,scaleY,xPercent,yPercent","rotation,rotationX,rotationY,skewX,skewY","transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective","0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY"),_forEachName("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",function(name){_config.units[name]="px"}),gsap.registerPlugin(CSSPlugin);var gsapWithCSS=gsap.registerPlugin(CSSPlugin)||gsap,TweenMaxWithCSS=gsapWithCSS.core.Tween;exports.Back=Back,exports.Bounce=Bounce,exports.CSSPlugin=CSSPlugin,exports.Circ=Circ,exports.Cubic=Cubic,exports.Elastic=Elastic,exports.Expo=Expo,exports.Linear=Linear,exports.Power0=Power0,exports.Power1=Power1,exports.Power2=Power2,exports.Power3=Power3,exports.Power4=Power4,exports.Quad=Quad,exports.Quart=Quart,exports.Quint=Quint,exports.Sine=Sine,exports.SteppedEase=SteppedEase,exports.Strong=Strong,exports.TimelineLite=Timeline,exports.TimelineMax=Timeline,exports.TweenLite=Tween,exports.TweenMax=TweenMaxWithCSS,exports.default=gsapWithCSS,exports.gsap=gsapWithCSS,typeof window=="undefined"||window!==exports?Object.defineProperty(exports,"__esModule",{value:!0}):delete window.default}),"use strict",function(global,factory){(typeof exports=="undefined"?"undefined":_typeof(exports))==="object"&&typeof module!="undefined"?module.exports=factory():typeof define=="function"&&define.amd?define(factory):(global=typeof globalThis!="undefined"?globalThis:global||self,global.Lenis=factory())}(void 0,function(){"use strict";function clamp(min,input,max){return Math.max(min,Math.min(input,max))}function lerp(x,y,t){return(1-t)*x+t*y}function damp(x,y,lambda,dt){return lerp(x,y,1-Math.exp(-lambda*dt))}function modulo(n,d){return(n%d+d)%d}function debounce(callback,delay){var timer;return function(){var args=arguments,context=this;clearTimeout(timer),timer=setTimeout(function(){callback.apply(context,args)},delay)}}var version="1.1.9",Animate=function(){function Animate(){_classCallCheck(this,Animate),this.isRunning=!1,this.value=0,this.from=0,this.to=0,this.duration=0,this.currentTime=0}return _createClass(Animate,[{key:"advance",value:function advance(deltaTime){var _a;if(!this.isRunning)return;var completed=!1;if(this.duration&&this.easing){this.currentTime+=deltaTime;var linearProgress=clamp(0,this.currentTime/this.duration,1);completed=linearProgress>=1;var easedProgress=completed?1:this.easing(linearProgress);this.value=this.from+(this.to-this.from)*easedProgress}else this.lerp?(this.value=damp(this.value,this.to,this.lerp*60,deltaTime),Math.round(this.value)===this.to&&(this.value=this.to,completed=!0)):(this.value=this.to,completed=!0);completed&&this.stop(),(_a=this.onUpdate)===null||_a===void 0?void 0:_a.call(this,this.value,completed)}},{key:"stop",value:function stop(){this.isRunning=!1}},{key:"fromTo",value:function fromTo(from,to,_ref){var lerp=_ref.lerp,duration=_ref.duration,easing=_ref.easing,onStart=_ref.onStart,onUpdate=_ref.onUpdate;this.from=this.value=from,this.to=to,this.lerp=lerp,this.duration=duration,this.easing=easing,this.currentTime=0,this.isRunning=!0,onStart===null||onStart===void 0?void 0:onStart(),this.onUpdate=onUpdate}}]),Animate}(),Dimensions=function(){function Dimensions(){var _this=this,_ref2=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},wrapper=_ref2.wrapper,content=_ref2.content,_ref2$autoResize=_ref2.autoResize,autoResize=_ref2$autoResize===void 0?!0:_ref2$autoResize,_ref2$debounce=_ref2.debounce,debounceValue=_ref2$debounce===void 0?250:_ref2$debounce;_classCallCheck(this,Dimensions),this.width=0,this.height=0,this.scrollWidth=0,this.scrollHeight=0,this.resize=function(){_this.onWrapperResize(),_this.onContentResize()},this.onWrapperResize=function(){_this.wrapper===window?(_this.width=window.innerWidth,_this.height=window.innerHeight):_this.wrapper instanceof HTMLElement&&(_this.width=_this.wrapper.clientWidth,_this.height=_this.wrapper.clientHeight)},this.onContentResize=function(){_this.wrapper===window?(_this.scrollHeight=_this.content.scrollHeight,_this.scrollWidth=_this.content.scrollWidth):_this.wrapper instanceof HTMLElement&&(_this.scrollHeight=_this.wrapper.scrollHeight,_this.scrollWidth=_this.wrapper.scrollWidth)},this.wrapper=wrapper,this.content=content,autoResize&&(this.debouncedResize=debounce(this.resize,debounceValue),this.wrapper===window?window.addEventListener("resize",this.debouncedResize,!1):(this.wrapperResizeObserver=new ResizeObserver(this.debouncedResize),this.wrapperResizeObserver.observe(this.wrapper)),this.contentResizeObserver=new ResizeObserver(this.debouncedResize),this.contentResizeObserver.observe(this.content)),this.resize()}return _createClass(Dimensions,[{key:"destroy",value:function destroy(){var _a,_b;(_a=this.wrapperResizeObserver)===null||_a===void 0?void 0:_a.disconnect(),(_b=this.contentResizeObserver)===null||_b===void 0?void 0:_b.disconnect(),window.removeEventListener("resize",this.debouncedResize,!1)}},{key:"limit",get:function get(){return{x:this.scrollWidth-this.width,y:this.scrollHeight-this.height}}}]),Dimensions}(),Emitter=function(){function Emitter(){_classCallCheck(this,Emitter),this.events={}}return _createClass(Emitter,[{key:"emit",value:function emit(event){var callbacks=this.events[event]||[];for(var _len=arguments.length,args=new Array(_len>1?_len-1:0),_key=1;_key<_len;_key++)args[_key-1]=arguments[_key];for(var i=0,length=callbacks.length;i<length;i++)callbacks[i].apply(callbacks,args)}},{key:"on",value:function on(event,callback){var _this2=this,_a;return((_a=this.events[event])===null||_a===void 0?void 0:_a.push(callback))||(this.events[event]=[callback]),function(){var _a;_this2.events[event]=(_a=_this2.events[event])===null||_a===void 0?void 0:_a.filter(function(i){return callback!==i})}}},{key:"off",value:function off(event,callback){var _a;this.events[event]=(_a=this.events[event])===null||_a===void 0?void 0:_a.filter(function(i){return callback!==i})}},{key:"destroy",value:function destroy(){this.events={}}}]),Emitter}(),LINE_HEIGHT=100/6,VirtualScroll=function(){function VirtualScroll(element,_ref3){var _this3=this,_ref3$wheelMultiplier=_ref3.wheelMultiplier,wheelMultiplier=_ref3$wheelMultiplier===void 0?1:_ref3$wheelMultiplier,_ref3$touchMultiplier=_ref3.touchMultiplier,touchMultiplier=_ref3$touchMultiplier===void 0?1:_ref3$touchMultiplier;_classCallCheck(this,VirtualScroll),this.lastDelta={x:0,y:0},this.windowWidth=0,this.windowHeight=0,this.onTouchStart=function(event){var _ref4=event.targetTouches?event.targetTouches[0]:event,clientX=_ref4.clientX,clientY=_ref4.clientY;_this3.touchStart.x=clientX,_this3.touchStart.y=clientY,_this3.lastDelta={x:0,y:0},_this3.emitter.emit("scroll",{deltaX:0,deltaY:0,event:event})},this.onTouchMove=function(event){var _a,_b,_c,_d,_ref5=event.targetTouches?event.targetTouches[0]:event,clientX=_ref5.clientX,clientY=_ref5.clientY,deltaX=-(clientX-((_b=(_a=_this3.touchStart)===null||_a===void 0?void 0:_a.x)!==null&&_b!==void 0?_b:0))*_this3.touchMultiplier,deltaY=-(clientY-((_d=(_c=_this3.touchStart)===null||_c===void 0?void 0:_c.y)!==null&&_d!==void 0?_d:0))*_this3.touchMultiplier;_this3.touchStart.x=clientX,_this3.touchStart.y=clientY,_this3.lastDelta={x:deltaX,y:deltaY},_this3.emitter.emit("scroll",{deltaX:deltaX,deltaY:deltaY,event:event})},this.onTouchEnd=function(event){_this3.emitter.emit("scroll",{deltaX:_this3.lastDelta.x,deltaY:_this3.lastDelta.y,event:event})},this.onWheel=function(event){var deltaX=event.deltaX,deltaY=event.deltaY,deltaMode=event.deltaMode,multiplierX=deltaMode===1?LINE_HEIGHT:deltaMode===2?_this3.windowWidth:1,multiplierY=deltaMode===1?LINE_HEIGHT:deltaMode===2?_this3.windowHeight:1;deltaX*=multiplierX,deltaY*=multiplierY,deltaX*=_this3.wheelMultiplier,deltaY*=_this3.wheelMultiplier,_this3.emitter.emit("scroll",{deltaX:deltaX,deltaY:deltaY,event:event})},this.onWindowResize=function(){_this3.windowWidth=window.innerWidth,_this3.windowHeight=window.innerHeight},this.element=element,this.wheelMultiplier=wheelMultiplier,this.touchMultiplier=touchMultiplier,this.touchStart={x:null,y:null},this.emitter=new Emitter,window.addEventListener("resize",this.onWindowResize,!1),this.onWindowResize(),this.element.addEventListener("wheel",this.onWheel,{passive:!1}),this.element.addEventListener("touchstart",this.onTouchStart,{passive:!1}),this.element.addEventListener("touchmove",this.onTouchMove,{passive:!1}),this.element.addEventListener("touchend",this.onTouchEnd,{passive:!1})}return _createClass(VirtualScroll,[{key:"on",value:function on(event,callback){return this.emitter.on(event,callback)}},{key:"destroy",value:function destroy(){this.emitter.destroy(),window.removeEventListener("resize",this.onWindowResize,!1),this.element.removeEventListener("wheel",this.onWheel),this.element.removeEventListener("touchstart",this.onTouchStart),this.element.removeEventListener("touchmove",this.onTouchMove),this.element.removeEventListener("touchend",this.onTouchEnd)}}]),VirtualScroll}(),Lenis=function(){function Lenis(){var _this4=this,_ref6=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},_ref6$wrapper=_ref6.wrapper,wrapper=_ref6$wrapper===void 0?window:_ref6$wrapper,_ref6$content=_ref6.content,content=_ref6$content===void 0?document.documentElement:_ref6$content,_ref6$wheelEventsTarg=_ref6.wheelEventsTarget,wheelEventsTarget=_ref6$wheelEventsTarg===void 0?wrapper:_ref6$wheelEventsTarg,_ref6$eventsTarget=_ref6.eventsTarget,eventsTarget=_ref6$eventsTarget===void 0?wheelEventsTarget:_ref6$eventsTarget,_ref6$smoothWheel=_ref6.smoothWheel,smoothWheel=_ref6$smoothWheel===void 0?!0:_ref6$smoothWheel,_ref6$syncTouch=_ref6.syncTouch,syncTouch=_ref6$syncTouch===void 0?!1:_ref6$syncTouch,_ref6$syncTouchLerp=_ref6.syncTouchLerp,syncTouchLerp=_ref6$syncTouchLerp===void 0?.075:_ref6$syncTouchLerp,_ref6$touchInertiaMul=_ref6.touchInertiaMultiplier,touchInertiaMultiplier=_ref6$touchInertiaMul===void 0?35:_ref6$touchInertiaMul,duration=_ref6.duration,_ref6$easing=_ref6.easing,easing=_ref6$easing===void 0?function(t){return Math.min(1,1.001-Math.pow(2,-10*t))}:_ref6$easing,_ref6$lerp=_ref6.lerp,lerp=_ref6$lerp===void 0?.1:_ref6$lerp,_ref6$infinite=_ref6.infinite,infinite=_ref6$infinite===void 0?!1:_ref6$infinite,_ref6$orientation=_ref6.orientation,orientation=_ref6$orientation===void 0?"vertical":_ref6$orientation,_ref6$gestureOrientat=_ref6.gestureOrientation,gestureOrientation=_ref6$gestureOrientat===void 0?"vertical":_ref6$gestureOrientat,_ref6$touchMultiplier=_ref6.touchMultiplier,touchMultiplier=_ref6$touchMultiplier===void 0?1:_ref6$touchMultiplier,_ref6$wheelMultiplier=_ref6.wheelMultiplier,wheelMultiplier=_ref6$wheelMultiplier===void 0?1:_ref6$wheelMultiplier,_ref6$autoResize=_ref6.autoResize,autoResize=_ref6$autoResize===void 0?!0:_ref6$autoResize,prevent=_ref6.prevent,virtualScroll=_ref6.virtualScroll,_ref6$__experimental_=_ref6.__experimental__naiveDimensions,__experimental__naiveDimensions=_ref6$__experimental_===void 0?!1:_ref6$__experimental_;_classCallCheck(this,Lenis),this.__isScrolling=!1,this.__isStopped=!1,this.__isLocked=!1,this.userData={},this.lastVelocity=0,this.velocity=0,this.direction=0,this.onPointerDown=function(event){event.button===1&&_this4.reset()},this.onVirtualScroll=function(data){if(typeof _this4.options.virtualScroll=="function"&&_this4.options.virtualScroll(data)===!1)return;var deltaX=data.deltaX,deltaY=data.deltaY,event=data.event;_this4.emitter.emit("virtual-scroll",{deltaX:deltaX,deltaY:deltaY,event:event});if(event.ctrlKey)return;var isTouch=event.type.includes("touch"),isWheel=event.type.includes("wheel");_this4.isTouching=event.type==="touchstart"||event.type==="touchmove";var isTapToStop=_this4.options.syncTouch&&isTouch&&event.type==="touchstart"&&!_this4.isStopped&&!_this4.isLocked;if(isTapToStop){_this4.reset();return}var isClick=deltaX===0&&deltaY===0,isUnknownGesture=_this4.options.gestureOrientation==="vertical"&&deltaY===0||_this4.options.gestureOrientation==="horizontal"&&deltaX===0;if(isClick||isUnknownGesture)return;var composedPath=event.composedPath();composedPath=composedPath.slice(0,composedPath.indexOf(_this4.rootElement));var prevent=_this4.options.prevent;if(!!composedPath.find(function(node){var _a,_b,_c,_d,_e;return node instanceof Element&&(typeof prevent=="function"&&(prevent===null||prevent===void 0?void 0:prevent(node))||((_a=node.hasAttribute)===null||_a===void 0?void 0:_a.call(node,"data-lenis-prevent"))||isTouch&&((_b=node.hasAttribute)===null||_b===void 0?void 0:_b.call(node,"data-lenis-prevent-touch"))||isWheel&&((_c=node.hasAttribute)===null||_c===void 0?void 0:_c.call(node,"data-lenis-prevent-wheel"))||((_d=node.classList)===null||_d===void 0?void 0:_d.contains("lenis"))&&((_e=node.classList)===null||_e===void 0?!void 0:!_e.contains("lenis-stopped")))}))return;if(_this4.isStopped||_this4.isLocked){event.preventDefault();return}var isSmooth=_this4.options.syncTouch&&isTouch||_this4.options.smoothWheel&&isWheel;if(!isSmooth){_this4.isScrolling="native",_this4.animate.stop();return}event.preventDefault();var delta=deltaY;_this4.options.gestureOrientation==="both"?delta=Math.abs(deltaY)>Math.abs(deltaX)?deltaY:deltaX:_this4.options.gestureOrientation==="horizontal"&&(delta=deltaX);var syncTouch=isTouch&&_this4.options.syncTouch,isTouchEnd=isTouch&&event.type==="touchend",hasTouchInertia=isTouchEnd&&Math.abs(delta)>5;hasTouchInertia&&(delta=_this4.velocity*_this4.options.touchInertiaMultiplier),_this4.scrollTo(_this4.targetScroll+delta,Object.assign({programmatic:!1},syncTouch?{lerp:hasTouchInertia?_this4.options.syncTouchLerp:1}:{lerp:_this4.options.lerp,duration:_this4.options.duration,easing:_this4.options.easing}))},this.onNativeScroll=function(){clearTimeout(_this4.__resetVelocityTimeout),delete _this4.__resetVelocityTimeout;if(_this4.__preventNextNativeScrollEvent){delete _this4.__preventNextNativeScrollEvent;return}if(_this4.isScrolling===!1||_this4.isScrolling==="native"){var lastScroll=_this4.animatedScroll;_this4.animatedScroll=_this4.targetScroll=_this4.actualScroll,_this4.lastVelocity=_this4.velocity,_this4.velocity=_this4.animatedScroll-lastScroll,_this4.direction=Math.sign(_this4.animatedScroll-lastScroll),_this4.isScrolling="native",_this4.emit(),_this4.velocity!==0&&(_this4.__resetVelocityTimeout=setTimeout(function(){_this4.lastVelocity=_this4.velocity,_this4.velocity=0,_this4.isScrolling=!1,_this4.emit()},400))}},window.lenisVersion=version;if(!wrapper||wrapper===document.documentElement||wrapper===document.body)wrapper=window;this.options={wrapper:wrapper,content:content,wheelEventsTarget:wheelEventsTarget,eventsTarget:eventsTarget,smoothWheel:smoothWheel,syncTouch:syncTouch,syncTouchLerp:syncTouchLerp,touchInertiaMultiplier:touchInertiaMultiplier,duration:duration,easing:easing,lerp:lerp,infinite:infinite,gestureOrientation:gestureOrientation,orientation:orientation,touchMultiplier:touchMultiplier,wheelMultiplier:wheelMultiplier,autoResize:autoResize,prevent:prevent,virtualScroll:virtualScroll,__experimental__naiveDimensions:__experimental__naiveDimensions},this.animate=new Animate,this.emitter=new Emitter,this.dimensions=new Dimensions({wrapper:wrapper,content:content,autoResize:autoResize}),this.updateClassName(),this.userData={},this.time=0,this.velocity=this.lastVelocity=0,this.isLocked=!1,this.isStopped=!1,this.isScrolling=!1,this.targetScroll=this.animatedScroll=this.actualScroll,this.options.wrapper.addEventListener("scroll",this.onNativeScroll,!1),this.options.wrapper.addEventListener("pointerdown",this.onPointerDown,!1),this.virtualScroll=new VirtualScroll(eventsTarget,{touchMultiplier:touchMultiplier,wheelMultiplier:wheelMultiplier}),this.virtualScroll.on("scroll",this.onVirtualScroll)}return _createClass(Lenis,[{key:"destroy",value:function destroy(){this.emitter.destroy(),this.options.wrapper.removeEventListener("scroll",this.onNativeScroll,!1),this.options.wrapper.removeEventListener("pointerdown",this.onPointerDown,!1),this.virtualScroll.destroy(),this.dimensions.destroy(),this.cleanUpClassName()}},{key:"on",value:function on(event,callback){return this.emitter.on(event,callback)}},{key:"off",value:function off(event,callback){return this.emitter.off(event,callback)}},{key:"setScroll",value:function setScroll(scroll){this.isHorizontal?this.rootElement.scrollLeft=scroll:this.rootElement.scrollTop=scroll}},{key:"resize",value:function resize(){this.dimensions.resize()}},{key:"emit",value:function emit(){this.emitter.emit("scroll",this)}},{key:"reset",value:function reset(){this.isLocked=!1,this.isScrolling=!1,this.animatedScroll=this.targetScroll=this.actualScroll,this.lastVelocity=this.velocity=0,this.animate.stop()}},{key:"start",value:function start(){if(!this.isStopped)return;this.isStopped=!1,this.reset()}},{key:"stop",value:function stop(){if(this.isStopped)return;this.isStopped=!0,this.animate.stop(),this.reset()}},{key:"raf",value:function raf(time){var deltaTime=time-(this.time||time);this.time=time,this.animate.advance(deltaTime*.001)}},{key:"scrollTo",value:function scrollTo(target){var _this5=this,_ref7=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},_ref7$offset=_ref7.offset,offset=_ref7$offset===void 0?0:_ref7$offset,_ref7$immediate=_ref7.immediate,immediate=_ref7$immediate===void 0?!1:_ref7$immediate,_ref7$lock=_ref7.lock,lock=_ref7$lock===void 0?!1:_ref7$lock,_ref7$duration=_ref7.duration,duration=_ref7$duration===void 0?this.options.duration:_ref7$duration,_ref7$easing=_ref7.easing,easing=_ref7$easing===void 0?this.options.easing:_ref7$easing,_ref7$lerp=_ref7.lerp,lerp=_ref7$lerp===void 0?this.options.lerp:_ref7$lerp,_onStart=_ref7.onStart,onComplete=_ref7.onComplete,_ref7$force=_ref7.force,force=_ref7$force===void 0?!1:_ref7$force,_ref7$programmatic=_ref7.programmatic,programmatic=_ref7$programmatic===void 0?!0:_ref7$programmatic,_ref7$userData=_ref7.userData,userData=_ref7$userData===void 0?{}:_ref7$userData;if((this.isStopped||this.isLocked)&&!force)return;if(typeof target=="string"&&["top","left","start"].includes(target))target=0;else if(typeof target=="string"&&["bottom","right","end"].includes(target))target=this.limit;else{var node;typeof target=="string"?node=document.querySelector(target):target instanceof HTMLElement&&(target===null||target===void 0?void 0:target.nodeType)&&(node=target);if(node){if(this.options.wrapper!==window){var wrapperRect=this.rootElement.getBoundingClientRect();offset-=this.isHorizontal?wrapperRect.left:wrapperRect.top}var rect=node.getBoundingClientRect();target=(this.isHorizontal?rect.left:rect.top)+this.animatedScroll}}if(typeof target!="number")return;target+=offset,target=Math.round(target),this.options.infinite?programmatic&&(this.targetScroll=this.animatedScroll=this.scroll):target=clamp(0,target,this.limit);if(target===this.targetScroll)return;this.userData=userData;if(immediate){this.animatedScroll=this.targetScroll=target,this.setScroll(this.scroll),this.reset(),this.preventNextNativeScrollEvent(),this.emit(),onComplete===null||onComplete===void 0?void 0:onComplete(this),this.userData={};return}programmatic||(this.targetScroll=target),this.animate.fromTo(this.animatedScroll,target,{duration:duration,easing:easing,lerp:lerp,onStart:function onStart(){lock&&(_this5.isLocked=!0),_this5.isScrolling="smooth",_onStart===null||_onStart===void 0?void 0:_onStart(_this5)},onUpdate:function onUpdate(value,completed){_this5.isScrolling="smooth",_this5.lastVelocity=_this5.velocity,_this5.velocity=value-_this5.animatedScroll,_this5.direction=Math.sign(_this5.velocity),_this5.animatedScroll=value,_this5.setScroll(_this5.scroll),programmatic&&(_this5.targetScroll=value),completed||_this5.emit(),completed&&(_this5.reset(),_this5.emit(),onComplete===null||onComplete===void 0?void 0:onComplete(_this5),_this5.userData={},_this5.preventNextNativeScrollEvent())}})}},{key:"preventNextNativeScrollEvent",value:function preventNextNativeScrollEvent(){var _this6=this;this.__preventNextNativeScrollEvent=!0,requestAnimationFrame(function(){delete _this6.__preventNextNativeScrollEvent})}},{key:"rootElement",get:function get(){return this.options.wrapper===window?document.documentElement:this.options.wrapper}},{key:"limit",get:function get(){return this.options.__experimental__naiveDimensions?this.isHorizontal?this.rootElement.scrollWidth-this.rootElement.clientWidth:this.rootElement.scrollHeight-this.rootElement.clientHeight:this.dimensions.limit[this.isHorizontal?"x":"y"]}},{key:"isHorizontal",get:function get(){return this.options.orientation==="horizontal"}},{key:"actualScroll",get:function get(){return this.isHorizontal?this.rootElement.scrollLeft:this.rootElement.scrollTop}},{key:"scroll",get:function get(){return this.options.infinite?modulo(this.animatedScroll,this.limit):this.animatedScroll}},{key:"progress",get:function get(){return this.limit===0?1:this.scroll/this.limit}},{key:"isScrolling",get:function get(){return this.__isScrolling},set:function set(value){this.__isScrolling!==value&&(this.__isScrolling=value,this.updateClassName())}},{key:"isStopped",get:function get(){return this.__isStopped},set:function set(value){this.__isStopped!==value&&(this.__isStopped=value,this.updateClassName())}},{key:"isLocked",get:function get(){return this.__isLocked},set:function set(value){this.__isLocked!==value&&(this.__isLocked=value,this.updateClassName())}},{key:"isSmooth",get:function get(){return this.isScrolling==="smooth"}},{key:"className",get:function get(){var className="lenis";return this.isStopped&&(className+=" lenis-stopped"),this.isLocked&&(className+=" lenis-locked"),this.isScrolling&&(className+=" lenis-scrolling"),this.isScrolling==="smooth"&&(className+=" lenis-smooth"),className}},{key:"updateClassName",value:function updateClassName(){this.cleanUpClassName(),this.rootElement.className="".concat(this.rootElement.className," ").concat(this.className).trim()}},{key:"cleanUpClassName",value:function cleanUpClassName(){this.rootElement.className=this.rootElement.className.replace(/lenis(-\w+)?/g,"").trim()}}]),Lenis}();return Lenis}),function(window,$){"use strict";var counter=0,$headCache=$("head"),oldBigText=window.BigText,oldjQueryMethod=$.fn.bigtext,BigText={DEBUG_MODE:!1,DEFAULT_MIN_FONT_SIZE_PX:null,DEFAULT_MAX_FONT_SIZE_PX:528,GLOBAL_STYLE_ID:"bigtext-style",STYLE_ID:"bigtext-id",LINE_CLASS_PREFIX:"bigtext-line",EXEMPT_CLASS:"bigtext-exempt",noConflict:function(restore){return restore&&($.fn.bigtext=oldjQueryMethod,window.BigText=oldBigText),BigText},supports:{wholeNumberFontSizeOnly:function(){if("getComputedStyle"in window){var test=$("<div/>").css({position:"absolute","font-size":"14.1px"}).insertBefore($("script").eq(0)),computedStyle=window.getComputedStyle(test[0],null),ret=computedStyle&&computedStyle.getPropertyValue("font-size")==="14px";return test.remove(),ret}return!0}()},init:function(){$("#"+BigText.GLOBAL_STYLE_ID).length||$headCache.append(BigText.generateStyleTag(BigText.GLOBAL_STYLE_ID,[".bigtext * { white-space: nowrap; } .bigtext > * { display: block; }",".bigtext ."+BigText.EXEMPT_CLASS+", .bigtext ."+BigText.EXEMPT_CLASS+" * { white-space: normal; }"]))},bindResize:function(eventName,resizeFunction){var timeoutId;$(window).off(eventName).on(eventName,function(){timeoutId&&clearTimeout(timeoutId),timeoutId=setTimeout(resizeFunction,100)})},getStyleId:function(id){return BigText.STYLE_ID+"-"+id},generateStyleTag:function(id,css){return $("<style>"+css.join("\n")+"</style>").attr("id",id)},clearCss:function(id){var styleId=BigText.getStyleId(id);$("#"+styleId).remove()},generateCss:function(id,linesFontSizes,lineWordSpacings,minFontSizes){var css=[];BigText.clearCss(id);for(var j=0,k=linesFontSizes.length;j<k;j++)css.push("#"+id+" ."+BigText.LINE_CLASS_PREFIX+j+" {"+(minFontSizes[j]?" white-space: normal;":"")+(linesFontSizes[j]?" font-size: "+linesFontSizes[j]+"px;":"")+(lineWordSpacings[j]?" word-spacing: "+lineWordSpacings[j]+"px;":"")+"}");return BigText.generateStyleTag(BigText.getStyleId(id),css)},jQueryMethod:function(options){return BigText.init(),options=$.extend({minfontsize:BigText.DEFAULT_MIN_FONT_SIZE_PX,maxfontsize:BigText.DEFAULT_MAX_FONT_SIZE_PX,childSelector:"",resize:!0},options||{}),this.each(function(){var $t=$(this).addClass("bigtext"),maxWidth=$t.width(),id=$t.attr("id"),$children=options.childSelector?$t.find(options.childSelector):$t.children();id||(id="bigtext-id"+counter++,$t.attr("id",id)),options.resize&&BigText.bindResize("resize.bigtext-event-"+id,function(){BigText.jQueryMethod.call($("#"+id),options)}),BigText.clearCss(id),$children.addClass(function(lineNumber,className){return[className.replace(new RegExp("\\b"+BigText.LINE_CLASS_PREFIX+"\\d+\\b"),""),BigText.LINE_CLASS_PREFIX+lineNumber].join(" ")});var sizes=BigText.calculateSizes($t,$children,maxWidth,options.maxfontsize,options.minfontsize);$headCache.append(BigText.generateCss(id,sizes.fontSizes,sizes.wordSpacings,sizes.minFontSizes))}),this.trigger("bigtext:complete")},testLineDimensions:function($line,maxWidth,property,size,interval,units,previousWidth){var width;previousWidth=typeof previousWidth=="number"?previousWidth:0,$line.css(property,size+units),width=$line.width();if(width>=maxWidth){$line.css(property,"");if(width===maxWidth)return{match:"exact",size:parseFloat((parseFloat(size)-.1).toFixed(3))};var under=maxWidth-previousWidth,over=width-maxWidth;return{match:"estimate",size:parseFloat((parseFloat(size)-(property==="word-spacing"&&previousWidth&&over<under?0:interval)).toFixed(3))}}return width},calculateSizes:function($t,$children,maxWidth,maxFontSize,minFontSize){var $c=$t.clone(!0).addClass("bigtext-cloned").css({fontFamily:$t.css("font-family"),textTransform:$t.css("text-transform"),wordSpacing:$t.css("word-spacing"),letterSpacing:$t.css("letter-spacing"),position:"absolute",left:BigText.DEBUG_MODE?0:-9999,top:BigText.DEBUG_MODE?0:-9999}).appendTo(document.body),fontSizes=[],wordSpacings=[],minFontSizes=[],ratios=[];return $children.css("float","left").each(function(){var $line=$(this),intervals=BigText.supports.wholeNumberFontSizeOnly?[8,4,1]:[8,4,1,.1],lineMax,newFontSize;if($line.hasClass(BigText.EXEMPT_CLASS)){fontSizes.push(null),ratios.push(null),minFontSizes.push(!1);return}var autoGuessSubtraction=32,currentFontSize=parseFloat($line.css("font-size")),ratio=($line.width()/currentFontSize).toFixed(6);newFontSize=parseInt(maxWidth/ratio,10)-autoGuessSubtraction;e:for(var m=0,n=intervals.length;m<n;m++)t:for(var j=1,k=10;j<=k;j++){if(newFontSize+j*intervals[m]>maxFontSize){newFontSize=maxFontSize;break e}lineMax=BigText.testLineDimensions($line,maxWidth,"font-size",newFontSize+j*intervals[m],intervals[m],"px",lineMax);if(typeof lineMax!="number"){newFontSize=lineMax.size;if(lineMax.match==="exact")break e;break t}}ratios.push(maxWidth/newFontSize),newFontSize>maxFontSize?(fontSizes.push(maxFontSize),minFontSizes.push(!1)):!!minFontSize&&newFontSize<minFontSize?(fontSizes.push(minFontSize),minFontSizes.push(!0)):(fontSizes.push(newFontSize),minFontSizes.push(!1))}).each(function(lineNumber){var $line=$(this),wordSpacing=0,interval=1,maxWordSpacing;if($line.hasClass(BigText.EXEMPT_CLASS)){wordSpacings.push(null);return}$line.css("font-size",fontSizes[lineNumber]+"px");for(var m=1,n=3;m<n;m+=interval){maxWordSpacing=BigText.testLineDimensions($line,maxWidth,"word-spacing",m,interval,"px",maxWordSpacing);if(typeof maxWordSpacing!="number"){wordSpacing=maxWordSpacing.size;break}}$line.css("font-size",""),wordSpacings.push(wordSpacing)}).removeAttr("style"),BigText.DEBUG_MODE?$c.css({"background-color":"rgba(255,255,255,.4)"}):$c.remove(),{fontSizes:fontSizes,wordSpacings:wordSpacings,ratios:ratios,minFontSizes:minFontSizes}}};$.fn.bigtext=BigText.jQueryMethod,window.BigText=BigText}(this,jQuery),function(window,factory){typeof define=="function"&&define.amd?define("jquery-bridget/jquery-bridget",["jquery"],function(jQuery){return factory(window,jQuery)}):typeof module=="object"&&module.exports?module.exports=factory(window,require("jquery")):window.jQueryBridget=factory(window,window.jQuery)}(window,function factory(window,jQuery){"use strict";function jQueryBridget(namespace,PluginClass,$){function methodCall($elems,methodName,args){var returnValue,pluginMethodStr="$()."+namespace+'("'+methodName+'")';return $elems.each(function(i,elem){var instance=$.data(elem,namespace);if(!instance){logError(namespace+" not initialized. Cannot call methods, i.e. "+pluginMethodStr);return}var method=instance[methodName];if(!method||methodName.charAt(0)=="_"){logError(pluginMethodStr+" is not a valid method");return}var value=method.apply(instance,args);returnValue=returnValue===undefined?value:returnValue}),returnValue!==undefined?returnValue:$elems}function plainCall($elems,options){$elems.each(function(i,elem){var instance=$.data(elem,namespace);instance?(instance.option(options),instance._init()):(instance=new PluginClass(elem,options),$.data(elem,namespace,instance))})}$=$||jQuery||window.jQuery;if(!$)return;PluginClass.prototype.option||(PluginClass.prototype.option=function(opts){if(!$.isPlainObject(opts))return;this.options=$.extend(!0,this.options,opts)}),$.fn[namespace]=function(arg0){if(typeof arg0=="string"){var args=arraySlice.call(arguments,1);return methodCall(this,arg0,args)}return plainCall(this,arg0),this},updateJQuery($)}function updateJQuery($){if(!$||$&&$.bridget)return;$.bridget=jQueryBridget}var arraySlice=Array.prototype.slice,console=window.console,logError=typeof console=="undefined"?function(){}:function(message){console.error(message)};return updateJQuery(jQuery||window.jQuery),jQueryBridget}),function(global,factory){typeof define=="function"&&define.amd?define("ev-emitter/ev-emitter",factory):typeof module=="object"&&module.exports?module.exports=factory():global.EvEmitter=factory()}(typeof window!="undefined"?window:this,function(){function EvEmitter(){}var proto=EvEmitter.prototype;return proto.on=function(eventName,listener){if(!eventName||!listener)return;var events=this._events=this._events||{},listeners=events[eventName]=events[eventName]||[];return listeners.indexOf(listener)==-1&&listeners.push(listener),this},proto.once=function(eventName,listener){if(!eventName||!listener)return;this.on(eventName,listener);var onceEvents=this._onceEvents=this._onceEvents||{},onceListeners=onceEvents[eventName]=onceEvents[eventName]||{};return onceListeners[listener]=!0,this},proto.off=function(eventName,listener){var listeners=this._events&&this._events[eventName];if(!listeners||!listeners.length)return;var index=listeners.indexOf(listener);return index!=-1&&listeners.splice(index,1),this},proto.emitEvent=function(eventName,args){var listeners=this._events&&this._events[eventName];if(!listeners||!listeners.length)return;listeners=listeners.slice(0),args=args||[];var onceListeners=this._onceEvents&&this._onceEvents[eventName];for(var i=0;i<listeners.length;i++){var listener=listeners[i],isOnce=onceListeners&&onceListeners[listener];isOnce&&(this.off(eventName,listener),delete onceListeners[listener]),listener.apply(this,args)}return this},proto.allOff=function(){delete this._events,delete this._onceEvents},EvEmitter}),function(window,factory){typeof define=="function"&&define.amd?define("get-size/get-size",factory):typeof module=="object"&&module.exports?module.exports=factory():window.getSize=factory()}(window,function factory(){"use strict";function getStyleSize(value){var num=parseFloat(value),isValid=value.indexOf("%")==-1&&!isNaN(num);return isValid&&num}function noop(){}function getZeroSize(){var size={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0};for(var i=0;i<measurementsLength;i++){var measurement=measurements[i];size[measurement]=0}return size}function getStyle(elem){var style=getComputedStyle(elem);return style||logError("Style returned "+style+". Are you running this code in a hidden iframe on Firefox? "+"See https://bit.ly/getsizebug1"),style}function setup(){if(isSetup)return;isSetup=!0;var div=document.createElement("div");div.style.width="200px",div.style.padding="1px 2px 3px 4px",div.style.borderStyle="solid",div.style.borderWidth="1px 2px 3px 4px",div.style.boxSizing="border-box";var body=document.body||document.documentElement;body.appendChild(div);var style=getStyle(div);isBoxSizeOuter=Math.round(getStyleSize(style.width))==200,getSize.isBoxSizeOuter=isBoxSizeOuter,body.removeChild(div)}function getSize(elem){setup(),typeof elem=="string"&&(elem=document.querySelector(elem));if(!elem||typeof elem!="object"||!elem.nodeType)return;var style=getStyle(elem);if(style.display=="none")return getZeroSize();var size={};size.width=elem.offsetWidth,size.height=elem.offsetHeight;var isBorderBox=size.isBorderBox=style.boxSizing=="border-box";for(var i=0;i<measurementsLength;i++){var measurement=measurements[i],value=style[measurement],num=parseFloat(value);size[measurement]=isNaN(num)?0:num}var paddingWidth=size.paddingLeft+size.paddingRight,paddingHeight=size.paddingTop+size.paddingBottom,marginWidth=size.marginLeft+size.marginRight,marginHeight=size.marginTop+size.marginBottom,borderWidth=size.borderLeftWidth+size.borderRightWidth,borderHeight=size.borderTopWidth+size.borderBottomWidth,isBorderBoxSizeOuter=isBorderBox&&isBoxSizeOuter,styleWidth=getStyleSize(style.width);styleWidth!==!1&&(size.width=styleWidth+(isBorderBoxSizeOuter?0:paddingWidth+borderWidth));var styleHeight=getStyleSize(style.height);return styleHeight!==!1&&(size.height=styleHeight+(isBorderBoxSizeOuter?0:paddingHeight+borderHeight)),size.innerWidth=size.width-(paddingWidth+borderWidth),size.innerHeight=size.height-(paddingHeight+borderHeight),size.outerWidth=size.width+marginWidth,size.outerHeight=size.height+marginHeight,size}var logError=typeof console=="undefined"?noop:function(message){console.error(message)},measurements=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],measurementsLength=measurements.length,isSetup=!1,isBoxSizeOuter;return getSize}),function(window,factory){"use strict";typeof define=="function"&&define.amd?define("desandro-matches-selector/matches-selector",factory):typeof module=="object"&&module.exports?module.exports=factory():window.matchesSelector=factory()}(window,function factory(){"use strict";var matchesMethod=function(){var ElemProto=window.Element.prototype;if(ElemProto.matches)return"matches";if(ElemProto.matchesSelector)return"matchesSelector";var prefixes=["webkit","moz","ms","o"];for(var i=0;i<prefixes.length;i++){var prefix=prefixes[i],method=prefix+"MatchesSelector";if(ElemProto[method])return method}}();return function matchesSelector(elem,selector){return elem[matchesMethod](selector)}}),function(window,factory){typeof define=="function"&&define.amd?define("fizzy-ui-utils/utils",["desandro-matches-selector/matches-selector"],function(matchesSelector){return factory(window,matchesSelector)}):typeof module=="object"&&module.exports?module.exports=factory(window,require("desandro-matches-selector")):window.fizzyUIUtils=factory(window,window.matchesSelector)}(window,function factory(window,matchesSelector){var utils={};utils.extend=function(a,b){for(var prop in b)a[prop]=b[prop];return a},utils.modulo=function(num,div){return(num%div+div)%div};var arraySlice=Array.prototype.slice;utils.makeArray=function(obj){if(Array.isArray(obj))return obj;if(obj===null||obj===undefined)return[];var isArrayLike=typeof obj=="object"&&typeof obj.length=="number";return isArrayLike?arraySlice.call(obj):[obj]},utils.removeFrom=function(ary,obj){var index=ary.indexOf(obj);index!=-1&&ary.splice(index,1)},utils.getParent=function(elem,selector){while(elem.parentNode&&elem!=document.body){elem=elem.parentNode;if(matchesSelector(elem,selector))return elem}},utils.getQueryElement=function(elem){return typeof elem=="string"?document.querySelector(elem):elem},utils.handleEvent=function(event){var method="on"+event.type;this[method]&&this[method](event)},utils.filterFindElements=function(elems,selector){elems=utils.makeArray(elems);var ffElems=[];return elems.forEach(function(elem){if(!(elem instanceof HTMLElement)&&!SiteParameters.is_frontend_editor)return;if(!selector){ffElems.push(elem);return}matchesSelector(elem,selector)&&ffElems.push(elem);var childElems=elem.querySelectorAll(selector);for(var i=0;i<childElems.length;i++)ffElems.push(childElems[i])}),ffElems},utils.debounceMethod=function(_class,methodName,threshold){threshold=threshold||100;var method=_class.prototype[methodName],timeoutName=methodName+"Timeout";_class.prototype[methodName]=function(){var timeout=this[timeoutName];clearTimeout(timeout);var args=arguments,_this=this;this[timeoutName]=setTimeout(function(){method.apply(_this,args),delete _this[timeoutName]},threshold)}},utils.docReady=function(callback){var readyState=document.readyState;readyState=="complete"||readyState=="interactive"?setTimeout(callback):document.addEventListener("DOMContentLoaded",callback)},utils.toDashed=function(str){return str.replace(/(.)([A-Z])/g,function(match,$1,$2){return $1+"-"+$2}).toLowerCase()};var console=window.console;return utils.htmlInit=function(WidgetClass,namespace){utils.docReady(function(){var dashedNamespace=utils.toDashed(namespace),dataAttr="data-"+dashedNamespace,dataAttrElems=document.querySelectorAll("["+dataAttr+"]"),jsDashElems=document.querySelectorAll(".js-"+dashedNamespace),elems=utils.makeArray(dataAttrElems).concat(utils.makeArray(jsDashElems)),dataOptionsAttr=dataAttr+"-options",jQuery=window.jQuery;elems.forEach(function(elem){var attr=elem.getAttribute(dataAttr)||elem.getAttribute(dataOptionsAttr),options;try{options=attr&&JSON.parse(attr)}catch(error){console&&console.error("Error parsing "+dataAttr+" on "+elem.className+": "+error);return}var instance=new WidgetClass(elem,options);jQuery&&jQuery.data(elem,namespace,instance)})})},utils}),function(window,factory){typeof define=="function"&&define.amd?define("outlayer/item",["ev-emitter/ev-emitter","get-size/get-size"],factory):typeof module=="object"&&module.exports?module.exports=factory(require("ev-emitter"),require("get-size")):(window.Outlayer={},window.Outlayer.Item=factory(window.EvEmitter,window.getSize))}(window,function factory(EvEmitter,getSize){"use strict";function isEmptyObj(obj){for(var prop in obj)return!1;return prop=null,!0}function Item(element,layout){if(!element)return;this.element=element,this.layout=layout,this.position={x:0,y:0},this._create()}function toDashedAll(str){return str.replace(/([A-Z])/g,function($1){return"-"+$1.toLowerCase()})}var docElemStyle=document.documentElement.style,transitionProperty=typeof docElemStyle.transition=="string"?"transition":"WebkitTransition",transformProperty=typeof docElemStyle.transform=="string"?"transform":"WebkitTransform",transitionEndEvent={WebkitTransition:"webkitTransitionEnd",transition:"transitionend"}[transitionProperty],vendorProperties={transform:transformProperty,transition:transitionProperty,transitionDuration:transitionProperty+"Duration",transitionProperty:transitionProperty+"Property",transitionDelay:transitionProperty+"Delay"},proto=Item.prototype=Object.create(EvEmitter.prototype);proto.constructor=Item,proto._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},proto.handleEvent=function(event){var method="on"+event.type;this[method]&&this[method](event)},proto.getSize=function(){this.size=getSize(this.element)},proto.css=function(style){var elemStyle=this.element.style;for(var prop in style){var supportedProp=vendorProperties[prop]||prop;elemStyle[supportedProp]=style[prop]}},proto.getPosition=function(){var style=getComputedStyle(this.element),isOriginLeft=this.layout._getOption("originLeft"),isOriginTop=this.layout._getOption("originTop"),xValue=style[isOriginLeft?"left":"right"],yValue=style[isOriginTop?"top":"bottom"],x=parseFloat(xValue),y=parseFloat(yValue),layoutSize=this.layout.size;xValue.indexOf("%")!=-1&&(x=x/100*layoutSize.width),yValue.indexOf("%")!=-1&&(y=y/100*layoutSize.height),x=isNaN(x)?0:x,y=isNaN(y)?0:y,x-=isOriginLeft?layoutSize.paddingLeft:layoutSize.paddingRight,y-=isOriginTop?layoutSize.paddingTop:layoutSize.paddingBottom,this.position.x=x,this.position.y=y},proto.layoutPosition=function(){var layoutSize=this.layout.size,style={},isOriginLeft=this.layout._getOption("originLeft"),isOriginTop=this.layout._getOption("originTop"),xPadding=isOriginLeft?"paddingLeft":"paddingRight",xProperty=isOriginLeft?"left":"right",xResetProperty=isOriginLeft?"right":"left",x=this.position.x+layoutSize[xPadding];style[xProperty]=this.getXValue(x),style[xResetProperty]="";var yPadding=isOriginTop?"paddingTop":"paddingBottom",yProperty=isOriginTop?"top":"bottom",yResetProperty=isOriginTop?"bottom":"top",y=this.position.y+layoutSize[yPadding];style[yProperty]=this.getYValue(y),style[yResetProperty]="",this.css(style),this.emitEvent("layout",[this])},proto.getXValue=function(x){var isHorizontal=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&!isHorizontal?x/this.layout.size.width*100+"%":x+"px"},proto.getYValue=function(y){var isHorizontal=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&isHorizontal?y/this.layout.size.height*100+"%":y+"px"},proto._transitionTo=function(x,y){this.getPosition();var curX=this.position.x,curY=this.position.y,didNotMove=x==this.position.x&&y==this.position.y;this.setPosition(x,y);if(didNotMove&&!this.isTransitioning){this.layoutPosition();return}var transX=x-curX,transY=y-curY,transitionStyle={};transitionStyle.transform=this.getTranslate(transX,transY),this.transition({to:transitionStyle,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})},proto.getTranslate=function(x,y){var isOriginLeft=this.layout._getOption("originLeft"),isOriginTop=this.layout._getOption("originTop");return x=isOriginLeft?x:-x,y=isOriginTop?y:-y,"translate3d("+x+"px, "+y+"px, 0)"},proto.goTo=function(x,y){this.setPosition(x,y),this.layoutPosition()},proto.moveTo=proto._transitionTo,proto.setPosition=function(x,y){this.position.x=parseFloat(x),this.position.y=parseFloat(y)},proto._nonTransition=function(args){this.css(args.to),args.isCleaning&&this._removeStyles(args.to);for(var prop in args.onTransitionEnd)args.onTransitionEnd[prop].call(this)},proto.transition=function(args){if(!parseFloat(this.layout.options.transitionDuration)){this._nonTransition(args);return}var _transition=this._transn;for(var prop in args.onTransitionEnd)_transition.onEnd[prop]=args.onTransitionEnd[prop];for(prop in args.to)_transition.ingProperties[prop]=!0,args.isCleaning&&(_transition.clean[prop]=!0);if(args.from){this.css(args.from);var h=this.element.offsetHeight;h=null}this.enableTransition(args.to),this.css(args.to),this.isTransitioning=!0};var transitionProps="opacity,"+toDashedAll(transformProperty);proto.enableTransition=function(){if(this.isTransitioning)return;var duration=this.layout.options.transitionDuration;duration=typeof duration=="number"?duration+"ms":duration,this.css({transitionProperty:transitionProps,transitionDuration:duration,transitionDelay:this.staggerDelay||0}),this.element.addEventListener(transitionEndEvent,this,!1)},proto.onwebkitTransitionEnd=function(event){this.ontransitionend(event)},proto.onotransitionend=function(event){this.ontransitionend(event)};var dashedVendorProperties={"-webkit-transform":"transform"};proto.ontransitionend=function(event){if(event.target!==this.element)return;var _transition=this._transn,propertyName=dashedVendorProperties[event.propertyName]||event.propertyName;delete _transition.ingProperties[propertyName],isEmptyObj(_transition.ingProperties)&&this.disableTransition(),propertyName in _transition.clean&&(this.element.style[event.propertyName]="",delete _transition.clean[propertyName]);if(propertyName in _transition.onEnd){var onTransitionEnd=_transition.onEnd[propertyName];onTransitionEnd.call(this),delete _transition.onEnd[propertyName]}this.emitEvent("transitionEnd",[this])},proto.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(transitionEndEvent,this,!1),this.isTransitioning=!1},proto._removeStyles=function(style){var cleanStyle={};for(var prop in style)cleanStyle[prop]="";this.css(cleanStyle)};var cleanTransitionStyle={transitionProperty:"",transitionDuration:"",transitionDelay:""};return proto.removeTransitionStyles=function(){this.css(cleanTransitionStyle)},proto.stagger=function(delay){delay=isNaN(delay)?0:delay,this.staggerDelay=delay+"ms"},proto.removeElem=function(){this.element.parentNode.removeChild(this.element),this.css({display:""}),this.emitEvent("remove",[this])},proto.remove=function(){if(!transitionProperty||!parseFloat(this.layout.options.transitionDuration)){this.removeElem();return}this.once("transitionEnd",function(){this.removeElem()}),this.hide()},proto.reveal=function(){delete this.isHidden,this.css({display:""});var options=this.layout.options,onTransitionEnd={},transitionEndProperty=this.getHideRevealTransitionEndProperty("visibleStyle");onTransitionEnd[transitionEndProperty]=this.onRevealTransitionEnd,this.transition({from:options.hiddenStyle,to:options.visibleStyle,isCleaning:!0,onTransitionEnd:onTransitionEnd})},proto.onRevealTransitionEnd=function(){this.isHidden||this.emitEvent("reveal")},proto.getHideRevealTransitionEndProperty=function(styleProperty){var optionStyle=this.layout.options[styleProperty];if(optionStyle.opacity)return"opacity";for(var prop in optionStyle)return prop},proto.hide=function(){this.isHidden=!0,this.css({display:""});var options=this.layout.options,onTransitionEnd={},transitionEndProperty=this.getHideRevealTransitionEndProperty("hiddenStyle");onTransitionEnd[transitionEndProperty]=this.onHideTransitionEnd,this.transition({from:options.visibleStyle,to:options.hiddenStyle,isCleaning:!0,onTransitionEnd:onTransitionEnd})},proto.onHideTransitionEnd=function(){this.isHidden&&(this.css({display:"none"}),this.emitEvent("hide"))},proto.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},Item}),function(window,factory){"use strict";typeof define=="function"&&define.amd?define("outlayer/outlayer",["ev-emitter/ev-emitter","get-size/get-size","fizzy-ui-utils/utils","./item"],function(EvEmitter,getSize,utils,Item){return factory(window,EvEmitter,getSize,utils,Item)}):typeof module=="object"&&module.exports?module.exports=factory(window,require("ev-emitter"),require("get-size"),require("fizzy-ui-utils"),require("./item")):window.Outlayer=factory(window,window.EvEmitter,window.getSize,window.fizzyUIUtils,window.Outlayer.Item)}(window,function factory(window,EvEmitter,getSize,utils,Item){"use strict";function Outlayer(element,options){var queryElement=utils.getQueryElement(element);if(!queryElement){console&&console.error("Bad element for "+this.constructor.namespace+": "+(queryElement||element));return}this.element=queryElement,jQuery&&(this.$element=jQuery(this.element)),this.options=utils.extend({},this.constructor.defaults),this.option(options);var id=++GUID;this.element.outlayerGUID=id,instances[id]=this,this._create();var isInitLayout=this._getOption("initLayout");isInitLayout&&this.layout()}function subclass(Parent){function SubClass(){Parent.apply(this,arguments)}return SubClass.prototype=Object.create(Parent.prototype),SubClass.prototype.constructor=SubClass,SubClass}function getMilliseconds(time){if(typeof time=="number")return time;var matches=time.match(/(^\d*\.?\d*)(\w*)/),num=matches&&matches[1],unit=matches&&matches[2];if(!num.length)return 0;num=parseFloat(num);var mult=msUnits[unit]||1;return num*mult}var console=window.console,jQuery=window.jQuery,noop=function(){},GUID=0,instances={};Outlayer.namespace="outlayer",Outlayer.Item=Item,Outlayer.defaults={containerStyle:{position:"relative"},initLayout:!0,originLeft:!0,originTop:!0,resize:!0,resizeContainer:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}};var proto=Outlayer.prototype;utils.extend(proto,EvEmitter.prototype),proto.option=function(opts){utils.extend(this.options,opts)},proto._getOption=function(option){var oldOption=this.constructor.compatOptions[option];return oldOption&&this.options[oldOption]!==undefined?this.options[oldOption]:this.options[option]},Outlayer.compatOptions={initLayout:"isInitLayout",horizontal:"isHorizontal",layoutInstant:"isLayoutInstant",originLeft:"isOriginLeft",originTop:"isOriginTop",resize:"isResizeBound",resizeContainer:"isResizingContainer"},proto._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),utils.extend(this.element.style,this.options.containerStyle);var canBindResize=this._getOption("resize");canBindResize&&this.bindResize()},proto.reloadItems=function(){this.items=this._itemize(this.element.children)},proto._itemize=function(elems){var itemElems=this._filterFindItemElements(elems),Item=this.constructor.Item,items=[];for(var i=0;i<itemElems.length;i++){var elem=itemElems[i],item=new Item(elem,this);items.push(item)}return items},proto._filterFindItemElements=function(elems){return utils.filterFindElements(elems,this.options.itemSelector)},proto.getItemElements=function(){return this.items.map(function(item){return item.element})},proto.layout=function(){this._resetLayout(),this._manageStamps();var layoutInstant=this._getOption("layoutInstant"),isInstant=layoutInstant!==undefined?layoutInstant:!this._isLayoutInited;this.layoutItems(this.items,isInstant),this._isLayoutInited=!0},proto._init=proto.layout,proto._resetLayout=function(){this.getSize()},proto.getSize=function(){this.size=getSize(this.element)},proto._getMeasurement=function(measurement,size){var option=this.options[measurement],elem;option?(typeof option=="string"?elem=this.element.querySelector(option):option instanceof HTMLElement&&(elem=option),this[measurement]=elem?getSize(elem)[size]:option):this[measurement]=0},proto.layoutItems=function(items,isInstant){items=this._getItemsForLayout(items),this._layoutItems(items,isInstant),this._postLayout()},proto._getItemsForLayout=function(items){return items.filter(function(item){return!item.isIgnored})},proto._layoutItems=function(items,isInstant){this._emitCompleteOnItems("layout",items);if(!items||!items.length)return;var queue=[];items.forEach(function(item){var position=this._getItemLayoutPosition(item);position.item=item,position.isInstant=isInstant||item.isLayoutInstant,queue.push(position)},this),this._processLayoutQueue(queue)},proto._getItemLayoutPosition=function(){return{x:0,y:0}},proto._processLayoutQueue=function(queue){this.updateStagger(),queue.forEach(function(obj,i){this._positionItem(obj.item,obj.x,obj.y,obj.isInstant,i)},this)},proto.updateStagger=function(){var stagger=this.options.stagger;if(stagger===null||stagger===undefined){this.stagger=0;return}return this.stagger=getMilliseconds(stagger),this.stagger},proto._positionItem=function(item,x,y,isInstant,i){isInstant?item.goTo(x,y):(item.stagger(i*this.stagger),item.moveTo(x,y))},proto._postLayout=function(){this.resizeContainer()},proto.resizeContainer=function(){var isResizingContainer=this._getOption("resizeContainer");if(!isResizingContainer)return;var size=this._getContainerSize();size&&(this._setContainerMeasure(size.width,!0),this._setContainerMeasure(size.height,!1))},proto._getContainerSize=noop,proto._setContainerMeasure=function(measure,isWidth){if(measure===undefined)return;var elemSize=this.size;elemSize.isBorderBox&&(measure+=isWidth?elemSize.paddingLeft+elemSize.paddingRight+elemSize.borderLeftWidth+elemSize.borderRightWidth:elemSize.paddingBottom+elemSize.paddingTop+elemSize.borderTopWidth+elemSize.borderBottomWidth),measure=Math.max(measure,0),this.element.style[isWidth?"width":"height"]=measure+"px"},proto._emitCompleteOnItems=function(eventName,items){function onComplete(){_this.dispatchEvent(eventName+"Complete",null,[items])}function tick(){doneCount++,doneCount==count&&onComplete()}var _this=this,count=items.length;if(!items||!count){onComplete();return}var doneCount=0;items.forEach(function(item){item.once(eventName,tick)})},proto.dispatchEvent=function(type,event,args){var emitArgs=event?[event].concat(args):args;this.emitEvent(type,emitArgs);if(jQuery){this.$element=this.$element||jQuery(this.element);if(event){var $event=jQuery.Event(event);$event.type=type,this.$element.trigger($event,args)}else this.$element.trigger(type,args)}},proto.ignore=function(elem){var item=this.getItem(elem);item&&(item.isIgnored=!0)},proto.unignore=function(elem){var item=this.getItem(elem);item&&delete item.isIgnored},proto.stamp=function(elems){elems=this._find(elems);if(!elems)return;this.stamps=this.stamps.concat(elems),elems.forEach(this.ignore,this)},proto.unstamp=function(elems){elems=this._find(elems);if(!elems)return;elems.forEach(function(elem){utils.removeFrom(this.stamps,elem),this.unignore(elem)},this)},proto._find=function(elems){if(!elems)return;return typeof elems=="string"&&(elems=this.element.querySelectorAll(elems)),elems=utils.makeArray(elems),elems},proto._manageStamps=function(){if(!this.stamps||!this.stamps.length)return;this._getBoundingRect(),this.stamps.forEach(this._manageStamp,this)},proto._getBoundingRect=function(){var boundingRect=this.element.getBoundingClientRect(),size=this.size;this._boundingRect={left:boundingRect.left+size.paddingLeft+size.borderLeftWidth,top:boundingRect.top+size.paddingTop+size.borderTopWidth,right:boundingRect.right-(size.paddingRight+size.borderRightWidth),bottom:boundingRect.bottom-(size.paddingBottom+size.borderBottomWidth)}},proto._manageStamp=noop,proto._getElementOffset=function(elem){var boundingRect=elem.getBoundingClientRect(),thisRect=this._boundingRect,size=getSize(elem),offset={left:boundingRect.left-thisRect.left-size.marginLeft,top:boundingRect.top-thisRect.top-size.marginTop,right:thisRect.right-boundingRect.right-size.marginRight,bottom:thisRect.bottom-boundingRect.bottom-size.marginBottom};return offset},proto.handleEvent=utils.handleEvent,proto.bindResize=function(){window.addEventListener("resize",this),this.isResizeBound=!0},proto.unbindResize=function(){window.removeEventListener("resize",this),this.isResizeBound=!1},proto.onresize=function(){this.resize()},utils.debounceMethod(Outlayer,"onresize",100),proto.resize=function(){if(!this.isResizeBound||!this.needsResizeLayout())return;this.layout()},proto.needsResizeLayout=function(){var size=getSize(this.element),hasSizes=this.size&&size;return hasSizes&&size.innerWidth!==this.size.innerWidth},proto.addItems=function(elems){var items=this._itemize(elems);return items.length&&(this.items=this.items.concat(items)),items},proto.appended=function(elems){var items=this.addItems(elems);if(!items.length)return;this.layoutItems(items,!0),this.reveal(items)},proto.prepended=function(elems){var items=this._itemize(elems);if(!items.length)return;var previousItems=this.items.slice(0);this.items=items.concat(previousItems),this._resetLayout(),this._manageStamps(),this.layoutItems(items,!0),this.reveal(items),this.layoutItems(previousItems)},proto.reveal=function(items){this._emitCompleteOnItems("reveal",items);if(!items||!items.length)return;var stagger=this.updateStagger();items.forEach(function(item,i){item.stagger(i*stagger),item.reveal()})},proto.hide=function(items){this._emitCompleteOnItems("hide",items);if(!items||!items.length)return;var stagger=this.updateStagger();items.forEach(function(item,i){item.stagger(i*stagger),item.hide()})},proto.revealItemElements=function(elems){var items=this.getItems(elems);this.reveal(items)},proto.hideItemElements=function(elems){var items=this.getItems(elems);this.hide(items)},proto.getItem=function(elem){for(var i=0;i<this.items.length;i++){var item=this.items[i];if(item.element==elem)return item}},proto.getItems=function(elems){elems=utils.makeArray(elems);var items=[];return elems.forEach(function(elem){var item=this.getItem(elem);item&&items.push(item)},this),items},proto.remove=function(elems){var removeItems=this.getItems(elems);this._emitCompleteOnItems("remove",removeItems);if(!removeItems||!removeItems.length)return;removeItems.forEach(function(item){item.remove(),utils.removeFrom(this.items,item)},this)},proto.destroy=function(){var style=this.element.style;style.height="",style.position="",style.width="",this.items.forEach(function(item){item.destroy()}),this.unbindResize();var id=this.element.outlayerGUID;delete instances[id],delete this.element.outlayerGUID,jQuery&&jQuery.removeData(this.element,this.constructor.namespace)},Outlayer.data=function(elem){elem=utils.getQueryElement(elem);var id=elem&&elem.outlayerGUID;return id&&instances[id]},Outlayer.create=function(namespace,options){var Layout=subclass(Outlayer);return Layout.defaults=utils.extend({},Outlayer.defaults),utils.extend(Layout.defaults,options),Layout.compatOptions=utils.extend({},Outlayer.compatOptions),Layout.namespace=namespace,Layout.data=Outlayer.data,Layout.Item=subclass(Item),utils.htmlInit(Layout,namespace),jQuery&&jQuery.bridget&&jQuery.bridget(namespace,Layout),Layout};var msUnits={ms:1,s:1e3};return Outlayer.Item=Item,Outlayer}),function(window,factory){typeof define=="function"&&define.amd?define("isotope-layout/js/item",["outlayer/outlayer"],factory):typeof module=="object"&&module.exports?module.exports=factory(require("outlayer")):(window.Isotope=window.Isotope||{},window.Isotope.Item=factory(window.Outlayer))}(window,function factory(Outlayer){"use strict";function Item(){Outlayer.Item.apply(this,arguments)}var proto=Item.prototype=Object.create(Outlayer.Item.prototype),_create=proto._create;proto._create=function(){this.id=this.layout.itemGUID++,_create.call(this),this.sortData={}},proto.updateSortData=function(){if(this.isIgnored)return;this.sortData.id=this.id,this.sortData["original-order"]=this.id,this.sortData.random=Math.random();var getSortData=this.layout.options.getSortData,sorters=this.layout._sorters;for(var key in getSortData){var sorter=sorters[key];this.sortData[key]=sorter(this.element,this)}};var _destroy=proto.destroy;return proto.destroy=function(){_destroy.apply(this,arguments),this.css({display:""})},Item}),function(window,factory){typeof define=="function"&&define.amd?define("isotope-layout/js/layout-mode",["get-size/get-size","outlayer/outlayer"],factory):typeof module=="object"&&module.exports?module.exports=factory(require("get-size"),require("outlayer")):(window.Isotope=window.Isotope||{},window.Isotope.LayoutMode=factory(window.getSize,window.Outlayer))}(window,function factory(getSize,Outlayer){"use strict";function LayoutMode(isotope){this.isotope=isotope,isotope&&(this.options=isotope.options[this.namespace],this.element=isotope.element,this.items=isotope.filteredItems,this.size=isotope.size)}var proto=LayoutMode.prototype,facadeMethods=["_resetLayout","_getItemLayoutPosition","_manageStamp","_getContainerSize","_getElementOffset","needsResizeLayout","_getOption"];return facadeMethods.forEach(function(methodName){proto[methodName]=function(){return Outlayer.prototype[methodName].apply(this.isotope,arguments)}}),proto.needsVerticalResizeLayout=function(){var size=getSize(this.isotope.element),hasSizes=this.isotope.size&&size;return hasSizes&&size.innerHeight!=this.isotope.size.innerHeight},proto._getMeasurement=function(){this.isotope._getMeasurement.apply(this,arguments)},proto.getColumnWidth=function(){this.getSegmentSize("column","Width")},proto.getRowHeight=function(){this.getSegmentSize("row","Height")},proto.getSegmentSize=function(segment,size){var segmentName=segment+size,outerSize="outer"+size;this._getMeasurement(segmentName,outerSize);if(this[segmentName])return;var firstItemSize=this.getFirstItemSize();this[segmentName]=firstItemSize&&firstItemSize[outerSize]||this.isotope.size["inner"+size]},proto.getFirstItemSize=function(){var firstItem=this.isotope.filteredItems[0];return firstItem&&firstItem.element&&getSize(firstItem.element)},proto.layout=function(){this.isotope.layout.apply(this.isotope,arguments)},proto.getSize=function(){this.isotope.getSize(),this.size=this.isotope.size},LayoutMode.modes={},LayoutMode.create=function(namespace,options){function Mode(){LayoutMode.apply(this,arguments)}return Mode.prototype=Object.create(proto),Mode.prototype.constructor=Mode,options&&(Mode.options=options),Mode.prototype.namespace=namespace,LayoutMode.modes[namespace]=Mode,Mode},LayoutMode}),function(window,factory){typeof define=="function"&&define.amd?define("masonry-layout/masonry",["outlayer/outlayer","get-size/get-size"],factory):typeof module=="object"&&module.exports?module.exports=factory(require("outlayer"),require("get-size")):window.Masonry=factory(window.Outlayer,window.getSize)}(window,function factory(Outlayer,getSize){var Masonry=Outlayer.create("masonry");Masonry.compatOptions.fitWidth="isFitWidth";var proto=Masonry.prototype;return proto._resetLayout=function(){this.getSize(),this._getMeasurement("columnWidth","outerWidth"),this._getMeasurement("gutter","outerWidth"),this.measureColumns(),this.colYs=[];for(var i=0;i<this.cols;i++)this.colYs.push(0);this.maxY=0,this.horizontalColIndex=0},proto.measureColumns=function(){this.getContainerWidth();if(!this.columnWidth){var firstItem=this.items[0],firstItemElem=firstItem&&firstItem.element;this.columnWidth=firstItemElem&&getSize(firstItemElem).outerWidth||this.containerWidth}var columnWidth=this.columnWidth+=this.gutter,containerWidth=this.containerWidth+this.gutter,cols=containerWidth/columnWidth,excess=columnWidth-containerWidth%columnWidth,mathMethod=excess&&excess<1?"round":"floor";cols=Math[mathMethod](cols),this.cols=Math.max(cols,1)},proto.getContainerWidth=function(){var isFitWidth=this._getOption("fitWidth"),container=isFitWidth?this.element.parentNode:this.element,size=getSize(container);this.containerWidth=size&&size.innerWidth},proto._getItemLayoutPosition=function(item){item.getSize();var remainder=item.size.outerWidth%this.columnWidth,mathMethod=remainder&&remainder<1?"round":"ceil",colSpan=Math[mathMethod](item.size.outerWidth/this.columnWidth);colSpan=Math.min(colSpan,this.cols);var colPosMethod=this.options.horizontalOrder?"_getHorizontalColPosition":"_getTopColPosition",colPosition=this[colPosMethod](colSpan,item),position={x:this.columnWidth*colPosition.col,y:colPosition.y},setHeight=colPosition.y+item.size.outerHeight,setMax=colSpan+colPosition.col;for(var i=colPosition.col;i<setMax;i++)this.colYs[i]=setHeight;return position},proto._getTopColPosition=function(colSpan){var colGroup=this._getTopColGroup(colSpan),minimumY=Math.min.apply(Math,colGroup);return{col:colGroup.indexOf(minimumY),y:minimumY}},proto._getTopColGroup=function(colSpan){if(colSpan<2)return this.colYs;var colGroup=[],groupCount=this.cols+1-colSpan;for(var i=0;i<groupCount;i++)colGroup[i]=this._getColGroupY(i,colSpan);return colGroup},proto._getColGroupY=function(col,colSpan){if(colSpan<2)return this.colYs[col];var groupColYs=this.colYs.slice(col,col+colSpan);return Math.max.apply(Math,groupColYs)},proto._getHorizontalColPosition=function(colSpan,item){var col=this.horizontalColIndex%this.cols,isOver=colSpan>1&&col+colSpan>this.cols;col=isOver?0:col;var hasSize=item.size.outerWidth&&item.size.outerHeight;return this.horizontalColIndex=hasSize?col+colSpan:this.horizontalColIndex,{col:col,y:this._getColGroupY(col,colSpan)}},proto._manageStamp=function(stamp){var stampSize=getSize(stamp),offset=this._getElementOffset(stamp),isOriginLeft=this._getOption("originLeft"),firstX=isOriginLeft?offset.left:offset.right,lastX=firstX+stampSize.outerWidth,firstCol=Math.floor(firstX/this.columnWidth);firstCol=Math.max(0,firstCol);var lastCol=Math.floor(lastX/this.columnWidth);lastCol-=lastX%this.columnWidth?0:1,lastCol=Math.min(this.cols-1,lastCol);var isOriginTop=this._getOption("originTop"),stampMaxY=(isOriginTop?offset.top:offset.bottom)+stampSize.outerHeight;for(var i=firstCol;i<=lastCol;i++)this.colYs[i]=Math.max(stampMaxY,this.colYs[i])},proto._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var size={height:this.maxY};return this._getOption("fitWidth")&&(size.width=this._getContainerFitWidth()),size},proto._getContainerFitWidth=function(){var unusedCols=0,i=this.cols;while(--i){if(this.colYs[i]!==0)break;unusedCols++}return(this.cols-unusedCols)*this.columnWidth-this.gutter},proto.needsResizeLayout=function(){var previousWidth=this.containerWidth;return this.getContainerWidth(),previousWidth!=this.containerWidth},Masonry}),function(window,factory){typeof define=="function"&&define.amd?define("isotope-layout/js/layout-modes/masonry",["../layout-mode","masonry-layout/masonry"],factory):typeof module=="object"&&module.exports?module.exports=factory(require("../layout-mode"),require("masonry-layout")):factory(window.Isotope.LayoutMode,window.Masonry)}(window,function factory(LayoutMode,Masonry){"use strict";var MasonryMode=LayoutMode.create("masonry"),proto=MasonryMode.prototype,keepModeMethods={_getElementOffset:!0,layout:!0,_getMeasurement:!0};for(var method in Masonry.prototype)keepModeMethods[method]||(proto[method]=Masonry.prototype[method]);var measureColumns=proto.measureColumns;proto.measureColumns=function(){this.items=this.isotope.filteredItems,measureColumns.call(this)};var _getOption=proto._getOption;return proto._getOption=function(option){return option=="fitWidth"?this.options.isFitWidth!==undefined?this.options.isFitWidth:this.options.fitWidth:_getOption.apply(this.isotope,arguments)},MasonryMode}),function(window,factory){typeof define=="function"&&define.amd?define("isotope-layout/js/layout-modes/fit-rows",["../layout-mode"],factory):typeof exports=="object"?module.exports=factory(require("../layout-mode")):factory(window.Isotope.LayoutMode)}(window,function factory(LayoutMode){"use strict";var FitRows=LayoutMode.create("fitRows"),proto=FitRows.prototype;return proto._resetLayout=function(){this.x=0,this.y=0,this.maxY=0,this._getMeasurement("gutter","outerWidth")},proto._getItemLayoutPosition=function(item){item.getSize();var itemWidth=item.size.outerWidth+this.gutter,containerWidth=this.isotope.size.innerWidth+this.gutter;this.x!==0&&itemWidth+this.x>containerWidth&&(this.x=0,this.y=this.maxY);var position={x:this.x,y:this.y};return this.maxY=Math.max(this.maxY,this.y+item.size.outerHeight),this.x+=itemWidth,position},proto._getContainerSize=function(){return{height:this.maxY}},FitRows}),function(window,factory){typeof define=="function"&&define.amd?define("isotope-layout/js/layout-modes/vertical",["../layout-mode"],factory):typeof module=="object"&&module.exports?module.exports=factory(require("../layout-mode")):factory(window.Isotope.LayoutMode)}(window,function factory(LayoutMode){"use strict";var Vertical=LayoutMode.create("vertical",{horizontalAlignment:0}),proto=Vertical.prototype;return proto._resetLayout=function(){this.y=0},proto._getItemLayoutPosition=function(item){item.getSize();var x=(this.isotope.size.innerWidth-item.size.outerWidth)*this.options.horizontalAlignment,y=this.y;return this.y+=item.size.outerHeight,{x:x,y:y}},proto._getContainerSize=function(){return{height:this.y}},Vertical}),function(window,factory){typeof define=="function"&&define.amd?define(["outlayer/outlayer","get-size/get-size","desandro-matches-selector/matches-selector","fizzy-ui-utils/utils","isotope-layout/js/item","isotope-layout/js/layout-mode","isotope-layout/js/layout-modes/masonry","isotope-layout/js/layout-modes/fit-rows","isotope-layout/js/layout-modes/vertical"],function(Outlayer,getSize,matchesSelector,utils,Item,LayoutMode){return factory(window,Outlayer,getSize,matchesSelector,utils,Item,LayoutMode)}):typeof module=="object"&&module.exports?module.exports=factory(window,require("outlayer"),require("get-size"),require("desandro-matches-selector"),require("fizzy-ui-utils"),require("isotope-layout/js/item"),require("isotope-layout/js/layout-mode"),require("isotope-layout/js/layout-modes/masonry"),require("isotope-layout/js/layout-modes/fit-rows"),require("isotope-layout/js/layout-modes/vertical")):window.Isotope=factory(window,window.Outlayer,window.getSize,window.matchesSelector,window.fizzyUIUtils,window.Isotope.Item,window.Isotope.LayoutMode)}(window,function factory(window,Outlayer,getSize,matchesSelector,utils,Item,LayoutMode){function getItemSorter(sortBys,sortAsc){return function sorter(itemA,itemB){for(var i=0;i<sortBys.length;i++){var sortBy=sortBys[i],a=itemA.sortData[sortBy],b=itemB.sortData[sortBy];if(a>b||a<b){var isAscending=sortAsc[sortBy]!==undefined?sortAsc[sortBy]:sortAsc,direction=isAscending?1:-1;return(a>b?1:-1)*direction}}return 0}}var jQuery=window.jQuery,trim=String.prototype.trim?function(str){return str.trim()}:function(str){return str.replace(/^\s+|\s+$/g,"")},Isotope=Outlayer.create("isotope",{layoutMode:"masonry",isJQueryFiltering:!0,sortAscending:!0});Isotope.Item=Item,Isotope.LayoutMode=LayoutMode;var proto=Isotope.prototype;proto._create=function(){this.itemGUID=0,this._sorters={},this._getSorters(),Outlayer.prototype._create.call(this),this.modes={},this.filteredItems=this.items,this.sortHistory=["original-order"];for(var name in LayoutMode.modes)this._initLayoutMode(name)},proto.reloadItems=function(){this.itemGUID=0,Outlayer.prototype.reloadItems.call(this)},proto._itemize=function(){var items=Outlayer.prototype._itemize.apply(this,arguments);for(var i=0;i<items.length;i++){var item=items[i];item.id=this.itemGUID++}return this._updateItemsSortData(items),items},proto._initLayoutMode=function(name){var Mode=LayoutMode.modes[name],initialOpts=this.options[name]||{};this.options[name]=Mode.options?utils.extend(Mode.options,initialOpts):initialOpts,this.modes[name]=new Mode(this)},proto.layout=function(){if(!this._isLayoutInited&&this._getOption("initLayout")){this.arrange();return}this._layout()},proto._layout=function(){var isInstant=this._getIsInstant();this._resetLayout(),this._manageStamps(),this.layoutItems(this.filteredItems,isInstant),this._isLayoutInited=!0},proto.arrange=function(opts){this.option(opts),this._getIsInstant();var filtered=this._filter(this.items);this.filteredItems=filtered.matches,this._bindArrangeComplete(),this._isInstant?this._noTransition(this._hideReveal,[filtered]):this._hideReveal(filtered),this._sort(),this._layout()},proto._init=proto.arrange,proto._hideReveal=function(filtered){this.reveal(filtered.needReveal),this.hide(filtered.needHide)},proto._getIsInstant=function(){var isLayoutInstant=this._getOption("layoutInstant"),isInstant=isLayoutInstant!==undefined?isLayoutInstant:!this._isLayoutInited;return this._isInstant=isInstant,isInstant},proto._bindArrangeComplete=function(){function arrangeParallelCallback(){isLayoutComplete&&isHideComplete&&isRevealComplete&&_this.dispatchEvent("arrangeComplete",null,[_this.filteredItems])}var isLayoutComplete,isHideComplete,isRevealComplete,_this=this;this.once("layoutComplete",function(){isLayoutComplete=!0,arrangeParallelCallback()}),this.once("hideComplete",function(){isHideComplete=!0,arrangeParallelCallback()}),this.once("revealComplete",function(){isRevealComplete=!0,arrangeParallelCallback()})},proto._filter=function(items){var filter=this.options.filter;filter=filter||"*";var matches=[],hiddenMatched=[],visibleUnmatched=[],test=this._getFilterTest(filter);for(var i=0;i<items.length;i++){var item=items[i];if(item.isIgnored)continue;var isMatched=test(item);isMatched&&matches.push(item),isMatched&&item.isHidden?hiddenMatched.push(item):!isMatched&&!item.isHidden&&visibleUnmatched.push(item)}return{matches:matches,needReveal:hiddenMatched,needHide:visibleUnmatched}},proto._getFilterTest=function(filter){return jQuery&&this.options.isJQueryFiltering?function(item){return jQuery(item.element).is(filter)}:typeof filter=="function"?function(item){return filter(item.element)}:function(item){return matchesSelector(item.element,filter)}},proto.updateSortData=function(elems){var items;elems?(elems=utils.makeArray(elems),items=this.getItems(elems)):items=this.items,this._getSorters(),this._updateItemsSortData(items)},proto._getSorters=function(){var getSortData=this.options.getSortData;for(var key in getSortData){var sorter=getSortData[key];this._sorters[key]=mungeSorter(sorter)}},proto._updateItemsSortData=function(items){var len=items&&items.length;for(var i=0;len&&i<len;i++){var item=items[i];item.updateSortData()}};var mungeSorter=function(){function mungeSorter(sorter){if(typeof sorter!="string")return sorter;var args=trim(sorter).split(" "),query=args[0],attrMatch=query.match(/^\[(.+)\]$/),attr=attrMatch&&attrMatch[1],getValue=getValueGetter(attr,query),parser=Isotope.sortDataParsers[args[1]];return sorter=parser?function(elem){return elem&&parser(getValue(elem))}:function(elem){return elem&&getValue(elem)},sorter}function getValueGetter(attr,query){return attr?function getAttribute(elem){return elem.getAttribute(attr)}:function getChildText(elem){var child=elem.querySelector(query);return child&&child.textContent}}return mungeSorter}();Isotope.sortDataParsers={parseInt:function(val){return parseInt(val,10)},parseFloat:function(val){return parseFloat(val)}},proto._sort=function(){if(!this.options.sortBy)return;var sortBys=utils.makeArray(this.options.sortBy);this._getIsSameSortBy(sortBys)||(this.sortHistory=sortBys.concat(this.sortHistory));var itemSorter=getItemSorter(this.sortHistory,this.options.sortAscending);this.filteredItems.sort(itemSorter)},proto._getIsSameSortBy=function(sortBys){for(var i=0;i<sortBys.length;i++)if(sortBys[i]!=this.sortHistory[i])return!1;return!0},proto._mode=function(){var layoutMode=this.options.layoutMode,mode=this.modes[layoutMode];if(!mode)throw new Error("No layout mode: "+layoutMode);return mode.options=this.options[layoutMode],mode},proto._resetLayout=function(){Outlayer.prototype._resetLayout.call(this),this._mode()._resetLayout()},proto._getItemLayoutPosition=function(item){return this._mode()._getItemLayoutPosition(item)},proto._manageStamp=function(stamp){this._mode()._manageStamp(stamp)},proto._getContainerSize=function(){return this._mode()._getContainerSize()},proto.needsResizeLayout=function(){return this._mode().needsResizeLayout()},proto.appended=function(elems){var items=this.addItems(elems);if(!items.length)return;var filteredItems=this._filterRevealAdded(items);this.filteredItems=this.filteredItems.concat(filteredItems)},proto.prepended=function(elems){var items=this._itemize(elems);if(!items.length)return;this._resetLayout(),this._manageStamps();var filteredItems=this._filterRevealAdded(items);this.layoutItems(this.filteredItems),this.filteredItems=filteredItems.concat(this.filteredItems),this.items=items.concat(this.items)},proto._filterRevealAdded=function(items){var filtered=this._filter(items);return this.hide(filtered.needHide),this.reveal(filtered.matches),this.layoutItems(filtered.matches,!0),filtered.matches},proto.insert=function(elems){var items=this.addItems(elems);if(!items.length)return;var i,item,len=items.length;for(i=0;i<len;i++)item=items[i],this.element.appendChild(item.element);var filteredInsertItems=this._filter(items).matches;for(i=0;i<len;i++)items[i].isLayoutInstant=!0;this.arrange();for(i=0;i<len;i++)delete items[i].isLayoutInstant;this.reveal(filteredInsertItems)};var _remove=proto.remove;return proto.remove=function(elems){elems=utils.makeArray(elems);var removeItems=this.getItems(elems);_remove.call(this,elems);var len=removeItems&&removeItems.length;for(var i=0;len&&i<len;i++){var item=removeItems[i];utils.removeFrom(this.filteredItems,item)}},proto.shuffle=function(){for(var i=0;i<this.items.length;i++){var item=this.items[i];item.sortData.random=Math.random()}this.options.sortBy="random",this._sort(),this._layout()},proto._noTransition=function(fn,args){var transitionDuration=this.options.transitionDuration;this.options.transitionDuration=0;var returnValue=fn.apply(this,args);return this.options.transitionDuration=transitionDuration,returnValue},proto.getFilteredItemElements=function(){return this.filteredItems.map(function(item){return item.element})},Isotope}),function(window,factory){typeof define=="function"&&define.amd?define("packery/js/rect",factory):typeof module=="object"&&module.exports?module.exports=factory():(window.Packery=window.Packery||{},window.Packery.Rect=factory())}(window,function factory(){function Rect(props){for(var prop in Rect.defaults)this[prop]=Rect.defaults[prop];for(prop in props)this[prop]=props[prop]}Rect.defaults={x:0,y:0,width:0,height:0};var proto=Rect.prototype;return proto.contains=function(rect){var otherWidth=rect.width||0,otherHeight=rect.height||0;return this.x<=rect.x&&this.y<=rect.y&&this.x+this.width>=rect.x+otherWidth&&this.y+this.height>=rect.y+otherHeight},proto.overlaps=function(rect){var thisRight=this.x+this.width,thisBottom=this.y+this.height,rectRight=rect.x+rect.width,rectBottom=rect.y+rect.height;return this.x<rectRight&&thisRight>rect.x&&this.y<rectBottom&&thisBottom>rect.y},proto.getMaximalFreeRects=function(rect){if(!this.overlaps(rect))return!1;var freeRects=[],freeRect,thisRight=this.x+this.width,thisBottom=this.y+this.height,rectRight=rect.x+rect.width,rectBottom=rect.y+rect.height;return this.y<rect.y&&(freeRect=new Rect({x:this.x,y:this.y,width:this.width,height:rect.y-this.y}),freeRects.push(freeRect)),thisRight>rectRight&&(freeRect=new Rect({x:rectRight,y:this.y,width:thisRight-rectRight,height:this.height}),freeRects.push(freeRect)),thisBottom>rectBottom&&(freeRect=new Rect({x:this.x,y:rectBottom,width:this.width,height:thisBottom-rectBottom}),freeRects.push(freeRect)),this.x<rect.x&&(freeRect=new Rect({x:this.x,y:this.y,width:rect.x-this.x,height:this.height}),freeRects.push(freeRect)),freeRects},proto.canFit=function(rect){return this.width>=rect.width&&this.height>=rect.height},Rect}),function(window,factory){if(typeof define=="function"&&define.amd)define("packery/js/packer",["./rect"],factory);else if(typeof module=="object"&&module.exports)module.exports=factory(require("./rect"));else{var Packery=window.Packery=window.Packery||{};Packery.Packer=factory(Packery.Rect)}}(window,function factory(Rect){function Packer(width,height,sortDirection){this.width=width||0,this.height=height||0,this.sortDirection=sortDirection||"downwardLeftToRight",this.reset()}var proto=Packer.prototype;proto.reset=function(){this.spaces=[];var initialSpace=new Rect({x:0,y:0,width:this.width,height:this.height});this.spaces.push(initialSpace),this.sorter=sorters[this.sortDirection]||sorters.downwardLeftToRight},proto.pack=function(rect){for(var i=0;i<this.spaces.length;i++){var space=this.spaces[i];if(space.canFit(rect)){this.placeInSpace(rect,space);break}}},proto.columnPack=function(rect){for(var i=0;i<this.spaces.length;i++){var space=this.spaces[i],canFitInSpaceColumn=space.x<=rect.x&&space.x+space.width>=rect.x+rect.width&&space.height>=rect.height-.01;if(canFitInSpaceColumn){rect.y=space.y,this.placed(rect);break}}},proto.rowPack=function(rect){for(var i=0;i<this.spaces.length;i++){var space=this.spaces[i],canFitInSpaceRow=space.y<=rect.y&&space.y+space.height>=rect.y+rect.height&&space.width>=rect.width-.01;if(canFitInSpaceRow){rect.x=space.x,this.placed(rect);break}}},proto.placeInSpace=function(rect,space){rect.x=space.x,rect.y=space.y,this.placed(rect)},proto.placed=function(rect){var revisedSpaces=[];for(var i=0;i<this.spaces.length;i++){var space=this.spaces[i],newSpaces=space.getMaximalFreeRects(rect);newSpaces?revisedSpaces.push.apply(revisedSpaces,newSpaces):revisedSpaces.push(space)}this.spaces=revisedSpaces,this.mergeSortSpaces()},proto.mergeSortSpaces=function(){Packer.mergeRects(this.spaces),this.spaces.sort(this.sorter)},proto.addSpace=function(rect){this.spaces.push(rect),this.mergeSortSpaces()},Packer.mergeRects=function(rects){var i=0,rect=rects[i];e:while(rect){var j=0,compareRect=rects[i+j];while(compareRect){if(compareRect==rect)j++;else{if(compareRect.contains(rect)){rects.splice(i,1),rect=rects[i];continue e}rect.contains(compareRect)?rects.splice(i+j,1):j++}compareRect=rects[i+j]}i++,rect=rects[i]}return rects};var sorters={downwardLeftToRight:function(a,b){return a.y-b.y||a.x-b.x},rightwardTopToBottom:function(a,b){return a.x-b.x||a.y-b.y}};return Packer}),function(window,factory){typeof define=="function"&&define.amd?define("packery/js/item",["outlayer/outlayer","./rect"],factory):typeof module=="object"&&module.exports?module.exports=factory(require("outlayer"),require("./rect")):window.Packery.Item=factory(window.Outlayer,window.Packery.Rect)}(window,function factory(Outlayer,Rect){var docElemStyle=document.documentElement.style,transformProperty=typeof docElemStyle.transform=="string"?"transform":"WebkitTransform",Item=function PackeryItem(){Outlayer.Item.apply(this,arguments)},proto=Item.prototype=Object.create(Outlayer.Item.prototype),__create=proto._create;proto._create=function(){__create.call(this),this.rect=new Rect};var _moveTo=proto.moveTo;return proto.moveTo=function(x,y){var dx=Math.abs(this.position.x-x),dy=Math.abs(this.position.y-y),canHackGoTo=this.layout.dragItemCount&&!this.isPlacing&&!this.isTransitioning&&dx<1&&dy<1;if(canHackGoTo){this.goTo(x,y);return}_moveTo.apply(this,arguments)},proto.enablePlacing=function(){this.removeTransitionStyles(),this.isTransitioning&&transformProperty&&(this.element.style[transformProperty]="none"),this.isTransitioning=!1,this.getSize(),this.layout._setRectSize(this.element,this.rect),this.isPlacing=!0},proto.disablePlacing=function(){this.isPlacing=!1},proto.removeElem=function(){this.element.parentNode.removeChild(this.element),this.layout.packer.addSpace(this.rect),this.emitEvent("remove",[this])},proto.showDropPlaceholder=function(){var dropPlaceholder=this.dropPlaceholder;dropPlaceholder||(dropPlaceholder=this.dropPlaceholder=document.createElement("div"),dropPlaceholder.className="packery-drop-placeholder",dropPlaceholder.style.position="absolute"),dropPlaceholder.style.width=this.size.width+"px",dropPlaceholder.style.height=this.size.height+"px",this.positionDropPlaceholder(),this.layout.element.appendChild(dropPlaceholder)},proto.positionDropPlaceholder=function(){this.dropPlaceholder.style[transformProperty]="translate("+this.rect.x+"px, "+this.rect.y+"px)"},proto.hideDropPlaceholder=function(){this.layout.element.removeChild(this.dropPlaceholder)},Item}),function(window,factory){typeof define=="function"&&define.amd?define("packery/js/packery",["get-size/get-size","outlayer/outlayer","./rect","./packer","./item"],factory):typeof module=="object"&&module.exports?module.exports=factory(require("get-size"),require("outlayer"),require("./rect"),require("./packer"),require("./item")):window.Packery=factory(window.getSize,window.Outlayer,window.Packery.Rect,window.Packery.Packer,window.Packery.Item)}(window,function factory(getSize,Outlayer,Rect,Packer,Item){function verticalSorter(a,b){return a.position.y-b.position.y||a.position.x-b.position.x}function horizontalSorter(a,b){return a.position.x-b.position.x||a.position.y-b.position.y}function getDistance(a,b){var dx=b.x-a.x,dy=b.y-a.y;return Math.sqrt(dx*dx+dy*dy)}Rect.prototype.canFit=function(rect){return this.width>=rect.width-1&&this.height>=rect.height-1};var Packery=Outlayer.create("packery");Packery.Item=Item;var proto=Packery.prototype;proto._create=function(){Outlayer.prototype._create.call(this),this.packer=new Packer,this.shiftPacker=new Packer,this.isEnabled=!0,this.dragItemCount=0;var _this=this;this.handleDraggabilly={dragStart:function(){_this.itemDragStart(this.element)},dragMove:function(){_this.itemDragMove(this.element,this.position.x,this.position.y)},dragEnd:function(){_this.itemDragEnd(this.element)}},this.handleUIDraggable={start:function handleUIDraggableStart(event,ui){if(!ui)return;_this.itemDragStart(event.currentTarget)},drag:function handleUIDraggableDrag(event,ui){if(!ui)return;_this.itemDragMove(event.currentTarget,ui.position.left,ui.position.top)},stop:function handleUIDraggableStop(event,ui){if(!ui)return;_this.itemDragEnd(event.currentTarget)}}},proto._resetLayout=function(){this.getSize(),this._getMeasurements();var width,height,sortDirection;this._getOption("horizontal")?(width=Infinity,height=this.size.innerHeight+this.gutter,sortDirection="rightwardTopToBottom"):(width=this.size.innerWidth+this.gutter,height=Infinity,sortDirection="downwardLeftToRight"),this.packer.width=this.shiftPacker.width=width,this.packer.height=this.shiftPacker.height=height,this.packer.sortDirection=this.shiftPacker.sortDirection=sortDirection,this.packer.reset(),this.maxY=0,this.maxX=0},proto._getMeasurements=function(){this._getMeasurement("columnWidth","width"),this._getMeasurement("rowHeight","height"),this._getMeasurement("gutter","width")},proto._getItemLayoutPosition=function(item){this._setRectSize(item.element,item.rect);if(this.isShifting||this.dragItemCount>0){var packMethod=this._getPackMethod();this.packer[packMethod](item.rect)}else this.packer.pack(item.rect);return this._setMaxXY(item.rect),item.rect},proto.shiftLayout=function(){this.isShifting=!0,this.layout(),delete this.isShifting},proto._getPackMethod=function(){return this._getOption("horizontal")?"rowPack":"columnPack"},proto._setMaxXY=function(rect){this.maxX=Math.max(rect.x+rect.width,this.maxX),this.maxY=Math.max(rect.y+rect.height,this.maxY)},proto._setRectSize=function(elem,rect){var size=getSize(elem),w=size.outerWidth,h=size.outerHeight;if(w||h)w=this._applyGridGutter(w,this.columnWidth),h=this._applyGridGutter(h,this.rowHeight);rect.width=Math.min(w,this.packer.width),rect.height=Math.min(h,this.packer.height)},proto._applyGridGutter=function(measurement,gridSize){if(!gridSize)return measurement+this.gutter;gridSize+=this.gutter;var remainder=measurement%gridSize,mathMethod=remainder&&remainder<1?"round":"ceil";return measurement=Math[mathMethod](measurement/gridSize)*gridSize,measurement},proto._getContainerSize=function(){return this._getOption("horizontal")?{width:this.maxX-this.gutter}:{height:this.maxY-this.gutter}},proto._manageStamp=function(elem){var item=this.getItem(elem),rect;if(item&&item.isPlacing)rect=item.rect;else{var offset=this._getElementOffset(elem);rect=new Rect({x:this._getOption("originLeft")?offset.left:offset.right,y:this._getOption("originTop")?offset.top:offset.bottom})}this._setRectSize(elem,rect),this.packer.placed(rect),this._setMaxXY(rect)},proto.sortItemsByPosition=function(){var sorter=this._getOption("horizontal")?horizontalSorter:verticalSorter;this.items.sort(sorter)},proto.fit=function(elem,x,y){var item=this.getItem(elem);if(!item)return;this.stamp(item.element),item.enablePlacing(),this.updateShiftTargets(item),x=x===undefined?item.rect.x:x,y=y===undefined?item.rect.y:y,this.shift(item,x,y),this._bindFitEvents(item),item.moveTo(item.rect.x,item.rect.y),this.shiftLayout(),this.unstamp(item.element),this.sortItemsByPosition(),item.disablePlacing()},proto._bindFitEvents=function(item){function onLayout(){ticks++;if(ticks!=2)return;_this.dispatchEvent("fitComplete",null,[item])}var _this=this,ticks=0;item.once("layout",onLayout),this.once("layoutComplete",onLayout)},proto.resize=function(){if(!this.isResizeBound||!this.needsResizeLayout())return;this.options.shiftPercentResize?this.resizeShiftPercentLayout():this.layout()},proto.needsResizeLayout=function(){var size=getSize(this.element),innerSize=this._getOption("horizontal")?"innerHeight":"innerWidth";return size[innerSize]!=this.size[innerSize]},proto.resizeShiftPercentLayout=function(){var items=this._getItemsForLayout(this.items),isHorizontal=this._getOption("horizontal"),coord=isHorizontal?"y":"x",measure=isHorizontal?"height":"width",segmentName=isHorizontal?"rowHeight":"columnWidth",innerSize=isHorizontal?"innerHeight":"innerWidth",previousSegment=this[segmentName];previousSegment=previousSegment&&previousSegment+this.gutter;if(previousSegment){this._getMeasurements();var currentSegment=this[segmentName]+this.gutter;items.forEach(function(item){var seg=Math.round(item.rect[coord]/previousSegment);item.rect[coord]=seg*currentSegment})}else{var currentSize=getSize(this.element)[innerSize]+this.gutter,previousSize=this.packer[measure];items.forEach(function(item){item.rect[coord]=item.rect[coord]/previousSize*currentSize})}this.shiftLayout()},proto.itemDragStart=function(elem){if(!this.isEnabled)return;this.stamp(elem);var item=this.getItem(elem);if(!item)return;item.enablePlacing(),item.showDropPlaceholder(),this.dragItemCount++,this.updateShiftTargets(item)},proto.updateShiftTargets=function(dropItem){this.shiftPacker.reset(),this._getBoundingRect();var isOriginLeft=this._getOption("originLeft"),isOriginTop=this._getOption("originTop");this.stamps.forEach(function(stamp){var item=this.getItem(stamp);if(item&&item.isPlacing)return;var offset=this._getElementOffset(stamp),rect=new Rect({x:isOriginLeft?offset.left:offset.right,y:isOriginTop?offset.top:offset.bottom});this._setRectSize(stamp,rect),this.shiftPacker.placed(rect)},this);var isHorizontal=this._getOption("horizontal"),segmentName=isHorizontal?"rowHeight":"columnWidth",measure=isHorizontal?"height":"width";this.shiftTargetKeys=[],this.shiftTargets=[];var boundsSize,segment=this[segmentName];segment=segment&&segment+this.gutter;if(segment){var segmentSpan=Math.ceil(dropItem.rect[measure]/segment),segs=Math.floor((this.shiftPacker[measure]+this.gutter)/segment);boundsSize=(segs-segmentSpan)*segment;for(var i=0;i<segs;i++)this._addShiftTarget(i*segment,0,boundsSize)}else boundsSize=this.shiftPacker[measure]+this.gutter-dropItem.rect[measure],this._addShiftTarget(0,0,boundsSize);var items=this._getItemsForLayout(this.items),packMethod=this._getPackMethod();items.forEach(function(item){var rect=item.rect;this._setRectSize(item.element,rect),this.shiftPacker[packMethod](rect),this._addShiftTarget(rect.x,rect.y,boundsSize);var cornerX=isHorizontal?rect.x+rect.width:rect.x,cornerY=isHorizontal?rect.y:rect.y+rect.height;this._addShiftTarget(cornerX,cornerY,boundsSize);if(segment){var segSpan=Math.round(rect[measure]/segment);for(var i=1;i<segSpan;i++){var segX=isHorizontal?cornerX:rect.x+segment*i,segY=isHorizontal?rect.y+segment*i:cornerY;this._addShiftTarget(segX,segY,boundsSize)}}},this)},proto._addShiftTarget=function(x,y,boundsSize){var checkCoord=this._getOption("horizontal")?y:x;if(checkCoord!==0&&checkCoord>boundsSize)return;var key=x+","+y,hasKey=this.shiftTargetKeys.indexOf(key)!=-1;if(hasKey)return;this.shiftTargetKeys.push(key),this.shiftTargets.push({x:x,y:y})},proto.shift=function(item,x,y){var shiftPosition,minDistance=Infinity,position={x:x,y:y};this.shiftTargets.forEach(function(target){var distance=getDistance(target,position);distance<minDistance&&(shiftPosition=target,minDistance=distance)}),item.rect.x=shiftPosition.x,item.rect.y=shiftPosition.y};var DRAG_THROTTLE_TIME=120;proto.itemDragMove=function(elem,x,y){function onDrag(){_this.shift(item,x,y),item.positionDropPlaceholder(),_this.layout()}var item=this.isEnabled&&this.getItem(elem);if(!item)return;x-=this.size.paddingLeft,y-=this.size.paddingTop;var _this=this,now=new Date;this._itemDragTime&&now-this._itemDragTime<DRAG_THROTTLE_TIME?(clearTimeout(this.dragTimeout),this.dragTimeout=setTimeout(onDrag,DRAG_THROTTLE_TIME)):(onDrag(),this._itemDragTime=now)},proto.itemDragEnd=function(elem){function onDragEndLayoutComplete(){completeCount++;if(completeCount!=2)return;item.element.classList.remove("is-positioning-post-drag"),item.hideDropPlaceholder(),_this.dispatchEvent("dragItemPositioned",null,[item])}var item=this.isEnabled&&this.getItem(elem);if(!item)return;clearTimeout(this.dragTimeout),item.element.classList.add("is-positioning-post-drag");var completeCount=0,_this=this;item.once("layout",onDragEndLayoutComplete),this.once("layoutComplete",onDragEndLayoutComplete),item.moveTo(item.rect.x,item.rect.y),this.layout(),this.dragItemCount=Math.max(0,this.dragItemCount-1),this.sortItemsByPosition(),item.disablePlacing(),this.unstamp(item.element)},proto.bindDraggabillyEvents=function(draggie){this._bindDraggabillyEvents(draggie,"on")},proto.unbindDraggabillyEvents=function(draggie){this._bindDraggabillyEvents(draggie,"off")},proto._bindDraggabillyEvents=function(draggie,method){var handlers=this.handleDraggabilly;draggie[method]("dragStart",handlers.dragStart),draggie[method]("dragMove",handlers.dragMove),draggie[method]("dragEnd",handlers.dragEnd)},proto.bindUIDraggableEvents=function($elems){this._bindUIDraggableEvents($elems,"on")},proto.unbindUIDraggableEvents=function($elems){this._bindUIDraggableEvents($elems,"off")},proto._bindUIDraggableEvents=function($elems,method){var handlers=this.handleUIDraggable;$elems[method]("dragstart",handlers.start)[method]("drag",handlers.drag)[method]("dragstop",handlers.stop)};var _destroy=proto.destroy;return proto.destroy=function(){_destroy.apply(this,arguments),this.isEnabled=!1},Packery.Rect=Rect,Packery.Packer=Packer,Packery}),function(window,factory){typeof define=="function"&&define.amd?define(["isotope-layout/js/layout-mode","packery/js/packery"],factory):typeof module=="object"&&module.exports?module.exports=factory(require("isotope-layout/js/layout-mode"),require("packery")):factory(window.Isotope.LayoutMode,window.Packery)}(window,function factor(LayoutMode,Packery){var PackeryMode=LayoutMode.create("packery"),proto=PackeryMode.prototype,keepModeMethods={_getElementOffset:!0,_getMeasurement:!0};for(var method in Packery.prototype)keepModeMethods[method]||(proto[method]=Packery.prototype[method]);var _resetLayout=proto._resetLayout;proto._resetLayout=function(){this.packer=this.packer||new Packery.Packer,this.shiftPacker=this.shiftPacker||new Packery.Packer,_resetLayout.apply(this,arguments)};var _getItemLayoutPosition=proto._getItemLayoutPosition;proto._getItemLayoutPosition=function(item){return item.rect=item.rect||new Packery.Rect,_getItemLayoutPosition.call(this,item)};var _needsResizeLayout=proto.needsResizeLayout;proto.needsResizeLayout=function(){return this._getOption("horizontal")?this.needsVerticalResizeLayout():_needsResizeLayout.call(this)};var _getOption=proto._getOption;return proto._getOption=function(option){return option=="horizontal"?this.options.isHorizontal!==undefined?this.options.isHorizontal:this.options.horizontal:_getOption.apply(this.isotope,arguments)},PackeryMode}),function(window,factory){typeof define=="function"&&define.amd?define(["isotope/js/layout-mode"],factory):typeof exports=="object"?module.exports=factory(require("isotope-layout/js/layout-mode")):factory(window.Isotope.LayoutMode)}(window,function factory(LayoutMode){"use strict";var CellsByRow=LayoutMode.create("cellsByRow"),proto=CellsByRow.prototype;return proto._resetLayout=function(){this.itemIndex=0,this.getColumnWidth(),this.getRowHeight(),this.cols=Math.floor(this.isotope.size.innerWidth/this.columnWidth),this.cols=Math.max(this.cols,1)},proto._getItemLayoutPosition=function(item){item.getSize();var col=this.itemIndex%this.cols,row=Math.floor(this.itemIndex/this.cols),x=(col+.5)*this.columnWidth-item.size.outerWidth/2,y=(row+.5)*this.rowHeight-item.size.outerHeight/2;return this.itemIndex++,{x:x,y:y}},proto._getContainerSize=function(){return{height:Math.ceil(this.itemIndex/this.cols)*this.rowHeight}},CellsByRow}),function(factory){typeof define=="function"&&define.amd?define(["jquery"],factory):factory(jQuery)}(function($,undefined){"use strict";$.infinitescroll=function infscr(options,callback,element){this.element=$(element),this._create(options,callback)||(this.failed=!0)},$.infinitescroll.defaults={loading:{finished:undefined,finishedMsg:"<em>Congratulations, you've reached the end of the internet.</em>",img:"data:image/gif;base64,R0lGODlh3AATAPQeAPDy+MnQ6LW/4N3h8MzT6rjC4sTM5r/I5NHX7N7j8c7U6tvg8OLl8uXo9Ojr9b3G5MfP6Ovu9tPZ7PT1+vX2+tbb7vf4+8/W69jd7rC73vn5/O/x+K243ai02////wAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQECgD/ACwAAAAA3AATAAAF/6AnjmRpnmiqrmzrvnAsz3Rt33iu73zv/8CgcEj0BAScpHLJbDqf0Kh0Sq1ar9isdioItAKGw+MAKYMFhbF63CW438f0mg1R2O8EuXj/aOPtaHx7fn96goR4hmuId4qDdX95c4+RBIGCB4yAjpmQhZN0YGYGXitdZBIVGAsLoq4BBKQDswm1CQRkcG6ytrYKubq8vbfAcMK9v7q7EMO1ycrHvsW6zcTKsczNz8HZw9vG3cjTsMIYqQkCLBwHCgsMDQ4RDAYIqfYSFxDxEfz88/X38Onr16+Bp4ADCco7eC8hQYMAEe57yNCew4IVBU7EGNDiRn8Z831cGLHhSIgdFf9chIeBg7oA7gjaWUWTVQAGE3LqBDCTlc9WOHfm7PkTqNCh54rePDqB6M+lR536hCpUqs2gVZM+xbrTqtGoWqdy1emValeXKzggYBBB5y1acFNZmEvXAoN2cGfJrTv3bl69Ffj2xZt3L1+/fw3XRVw4sGDGcR0fJhxZsF3KtBTThZxZ8mLMgC3fRatCbYMNFCzwLEqLgE4NsDWs/tvqdezZf13Hvk2A9Szdu2X3pg18N+68xXn7rh1c+PLksI/Dhe6cuO3ow3NfV92bdArTqC2Ebd3A8vjf5QWfH6Bg7Nz17c2fj69+fnq+8N2Lty+fuP78/eV2X13neIcCeBRwxorbZrA1ANoCDGrgoG8RTshahQ9iSKEEzUmYIYfNWViUhheCGJyIP5E4oom7WWjgCeBFAJNv1DVV01MAdJhhjdkplWNzO/5oXI846njjVEIqR2OS2B1pE5PVscajkxhMycqLJghQSwT40PgfAl4GqNSXYdZXJn5gSkmmmmJu1aZYb14V51do+pTOCmA40AqVCIhG5IJ9PvYnhIFOxmdqhpaI6GeHCtpooisuutmg+Eg62KOMKuqoTaXgicQWoIYq6qiklmoqFV0UoeqqrLbq6quwxirrrLTWauutJ4QAACH5BAUKABwALAcABADOAAsAAAX/IPd0D2dyRCoUp/k8gpHOKtseR9yiSmGbuBykler9XLAhkbDavXTL5k2oqFqNOxzUZPU5YYZd1XsD72rZpBjbeh52mSNnMSC8lwblKZGwi+0QfIJ8CncnCoCDgoVnBHmKfByGJimPkIwtiAeBkH6ZHJaKmCeVnKKTHIihg5KNq4uoqmEtcRUtEREMBggtEr4QDrjCuRC8h7/BwxENeicSF8DKy82pyNLMOxzWygzFmdvD2L3P0dze4+Xh1Arkyepi7dfFvvTtLQkZBC0T/FX3CRgCMOBHsJ+EHYQY7OinAGECgQsB+Lu3AOK+CewcWjwxQeJBihtNGHSoQOE+iQ3//4XkwBBhRZMcUS6YSXOAwIL8PGqEaSJCiYt9SNoCmnJPAgUVLChdaoFBURN8MAzl2PQphwQLfDFd6lTowglHve6rKpbjhK7/pG5VinZP1qkiz1rl4+tr2LRwWU64cFEihwEtZgbgR1UiHaMVvxpOSwBA37kzGz9e8G+B5MIEKLutOGEsAH2ATQwYfTmuX8aETWdGPZmiZcccNSzeTCA1Sw0bdiitC7LBWgu8jQr8HRzqgpK6gX88QbrB14z/kF+ELpwB8eVQj/JkqdylAudji/+ts3039vEEfK8Vz2dlvxZKG0CmbkKDBvllRd6fCzDvBLKBDSCeffhRJEFebFk1k/Mv9jVIoIJZSeBggwUaNeB+Qk34IE0cXlihcfRxkOAJFFhwGmKlmWDiakZhUJtnLBpnWWcnKaAZcxI0piFGGLBm1mc90kajSCveeBVWKeYEoU2wqeaQi0PetoE+rr14EpVC7oAbAUHqhYExbn2XHHsVqbcVew9tx8+XJKk5AZsqqdlddGpqAKdbAYBn1pcczmSTdWvdmZ17c1b3FZ99vnTdCRFM8OEcAhLwm1NdXnWcBBSMRWmfkWZqVlsmLIiAp/o1gGV2vpS4lalGYsUOqXrddcKCmK61aZ8SjEpUpVFVoCpTj4r661Km7kBHjrDyc1RAIQAAIfkEBQoAGwAsBwAEAM4ACwAABf/gtmUCd4goQQgFKj6PYKi0yrrbc8i4ohQt12EHcal+MNSQiCP8gigdz7iCioaCIvUmZLp8QBzW0EN2vSlCuDtFKaq4RyHzQLEKZNdiQDhRDVooCwkbfm59EAmKi4SGIm+AjIsKjhsqB4mSjT2IOIOUnICeCaB/mZKFNTSRmqVpmJqklSqskq6PfYYCDwYHDC4REQwGCBLGxxIQDsHMwhAIX8bKzcENgSLGF9PU1j3Sy9zX2NrgzQziChLk1BHWxcjf7N046tvN82715czn9Pryz6Ilc4ACj4EBOCZM8KEnAYYADBRKnACAYUMFv1wotIhCEcaJCisqwJFgAUSQGyX/kCSVUUTIdKMwJlyo0oXHlhskwrTJciZHEXsgaqS4s6PJiCAr1uzYU8kBBSgnWFqpoMJMUjGtDmUwkmfVmVypakWhEKvXsS4nhLW5wNjVroJIoc05wSzTr0PtiigpYe4EC2vj4iWrFu5euWIMRBhacaVJhYQBEFjA9jHjyQ0xEABwGceGAZYjY0YBOrRLCxUp29QM+bRkx5s7ZyYgVbTqwwti2ybJ+vLtDYpycyZbYOlptxdx0kV+V7lC5iJAyyRrwYKxAdiz82ng0/jnAdMJFz0cPi104Ec1Vj9/M6F173vKL/feXv156dw11tlqeMMnv4V5Ap53GmjQQH97nFfg+IFiucfgRX5Z8KAgbUlQ4IULIlghhhdOSB6AgX0IVn8eReghen3NRIBsRgnH4l4LuEidZBjwRpt6NM5WGwoW0KSjCwX6yJSMab2GwwAPDXfaBCtWpluRTQqC5JM5oUZAjUNS+VeOLWpJEQ7VYQANW0INJSZVDFSnZphjSikfmzE5N4EEbQI1QJmnWXCmHulRp2edwDXF43txukenJwvI9xyg9Q26Z3MzGUcBYFEChZh6DVTq34AU8Iflh51Sd+CnKFYQ6mmZkhqfBKfSxZWqA9DZanWjxmhrWwi0qtCrt/43K6WqVjjpmhIqgEGvculaGKklKstAACEAACH5BAUKABwALAcABADOAAsAAAX/ICdyQmaMYyAUqPgIBiHPxNpy79kqRXH8wAPsRmDdXpAWgWdEIYm2llCHqjVHU+jjJkwqBTecwItShMXkEfNWSh8e1NGAcLgpDGlRgk7EJ/6Ae3VKfoF/fDuFhohVeDeCfXkcCQqDVQcQhn+VNDOYmpSWaoqBlUSfmowjEA+iEAEGDRGztAwGCDcXEA60tXEiCrq8vREMEBLIyRLCxMWSHMzExnbRvQ2Sy7vN0zvVtNfU2tLY3rPgLdnDvca4VQS/Cpk3ABwSLQkYAQwT/P309vcI7OvXr94jBQMJ/nskkGA/BQBRLNDncAIAiDcG6LsxAWOLiQzmeURBKWSLCQbv/1F0eDGinJUKR47YY1IEgQASKk7Yc7ACRwZm7mHweRJoz59BJUogisKCUaFMR0x4SlJBVBFTk8pZivTR0K73rN5wqlXEAq5Fy3IYgHbEzQ0nLy4QSoCjXLoom96VOJEeCosK5n4kkFfqXjl94wa+l1gvAcGICbewAOAxY8l/Ky/QhAGz4cUkGxu2HNozhwMGBnCUqUdBg9UuW9eUynqSwLHIBujePef1ZGQZXcM+OFuEBeBhi3OYgLyqcuaxbT9vLkf4SeqyWxSQpKGB2gQpm1KdWbu72rPRzR9Ne2Nu9Kzr/1Jqj0yD/fvqP4aXOt5sW/5qsXXVcv1Nsp8IBUAmgswGF3llGgeU1YVXXKTN1FlhWFXW3gIE+DVChApysACHHo7Q4A35lLichh+ROBmLKAzgYmYEYDAhCgxKGOOMn4WR4kkDaoBBOxJtdNKQxFmg5JIWIBnQc07GaORfUY4AEkdV6jHlCEISSZ5yTXpp1pbGZbkWmcuZmQCaE6iJ0FhjMaDjTMsgZaNEHFRAQVp3bqXnZED1qYcECOz5V6BhSWCoVJQIKuKQi2KFKEkEFAqoAo7uYSmO3jk61wUUMKmknJ4SGimBmAa0qVQBhAAAIfkEBQoAGwAsBwAEAM4ACwAABf/gJm5FmRlEqhJC+bywgK5pO4rHI0D3pii22+Mg6/0Ej96weCMAk7cDkXf7lZTTnrMl7eaYoy10JN0ZFdco0XAuvKI6qkgVFJXYNwjkIBcNBgR8TQoGfRsJCRuCYYQQiI+ICosiCoGOkIiKfSl8mJkHZ4U9kZMbKaI3pKGXmJKrngmug4WwkhA0lrCBWgYFCCMQFwoQDRHGxwwGCBLMzRLEx8iGzMMO0cYNeCMKzBDW19lnF9DXDIY/48Xg093f0Q3s1dcR8OLe8+Y91OTv5wrj7o7B+7VNQqABIoRVCMBggsOHE36kSoCBIcSH3EbFangxogJYFi8CkJhqQciLJEf/LDDJEeJIBT0GsOwYUYJGBS0fjpQAMidGmyVP6sx4Y6VQhzs9VUwkwqaCCh0tmKoFtSMDmBOf9phg4SrVrROuasRQAaxXpVUhdsU6IsECZlvX3kwLUWzRt0BHOLTbNlbZG3vZinArge5Dvn7wbqtQkSYAAgtKmnSsYKVKo2AfW048uaPmG386i4Q8EQMBAIAnfB7xBxBqvapJ9zX9WgRS2YMpnvYMGdPK3aMjt/3dUcNI4blpj7iwkMFWDXDvSmgAlijrt9RTR78+PS6z1uAJZIe93Q8g5zcsWCi/4Y+C8bah5zUv3vv89uft30QP23punGCx5954oBBwnwYaNCDY/wYrsYeggnM9B2Fpf8GG2CEUVWhbWAtGouEGDy7Y4IEJVrbSiXghqGKIo7z1IVcXIkKWWR361QOLWWnIhwERpLaaCCee5iMBGJQmJGyPFTnbkfHVZGRtIGrg5HALEJAZbu39BuUEUmq1JJQIPtZilY5hGeSWsSk52G9XqsmgljdIcABytq13HyIM6RcUA+r1qZ4EBF3WHWB29tBgAzRhEGhig8KmqKFv8SeCeo+mgsF7YFXa1qWSbkDpom/mqR1PmHCqJ3fwNRVXjC7S6CZhFVCQ2lWvZiirhQq42SACt25IK2hv8TprriUV1usGgeka7LFcNmCldMLi6qZMgFLgpw16Cipb7bC1knXsBiEAACH5BAUKABsALAcABADOAAsAAAX/4FZsJPkUmUGsLCEUTywXglFuSg7fW1xAvNWLF6sFFcPb42C8EZCj24EJdCp2yoegWsolS0Uu6fmamg8n8YYcLU2bXSiRaXMGvqV6/KAeJAh8VgZqCX+BexCFioWAYgqNi4qAR4ORhRuHY408jAeUhAmYYiuVlpiflqGZa5CWkzc5fKmbbhIpsAoQDRG8vQwQCBLCwxK6vb5qwhfGxxENahvCEA7NzskSy7vNzzzK09W/PNHF1NvX2dXcN8K55cfh69Luveol3vO8zwi4Yhj+AQwmCBw4IYclDAAJDlQggVOChAoLKkgFkSCAHDwWLKhIEOONARsDKryogFPIiAUb/95gJNIiw4wnI778GFPhzBKFOAq8qLJEhQpiNArjMcHCmlTCUDIouTKBhApELSxFWiGiVKY4E2CAekPgUphDu0742nRrVLJZnyrFSqKQ2ohoSYAMW6IoDpNJ4bLdILTnAj8KUF7UeENjAKuDyxIgOuGiOI0EBBMgLNew5AUrDTMGsFixwBIaNCQuAXJB57qNJ2OWm2Aj4skwCQCIyNkhhtMkdsIuodE0AN4LJDRgfLPtn5YDLdBlraAByuUbBgxQwICxMOnYpVOPej074OFdlfc0TqC62OIbcppHjV4o+LrieWhfT8JC/I/T6W8oCl29vQ0XjLdBaA3s1RcPBO7lFvpX8BVoG4O5jTXRQRDuJ6FDTzEWF1/BCZhgbyAKE9qICYLloQYOFtahVRsWYlZ4KQJHlwHS/IYaZ6sZd9tmu5HQm2xi1UaTbzxYwJk/wBF5g5EEYOBZeEfGZmNdFyFZmZIR4jikbLThlh5kUUVJGmRT7sekkziRWUIACABk3T4qCsedgO4xhgGcY7q5pHJ4klBBTQRJ0CeHcoYHHUh6wgfdn9uJdSdMiebGJ0zUPTcoS286FCkrZxnYoYYKWLkBowhQoBeaOlZAgVhLidrXqg2GiqpQpZ4apwSwRtjqrB3muoF9BboaXKmshlqWqsWiGt2wphJkQbAU5hoCACH5BAUKABsALAcABADOAAsAAAX/oGFw2WZuT5oZROsSQnGaKjRvilI893MItlNOJ5v5gDcFrHhKIWcEYu/xFEqNv6B1N62aclysF7fsZYe5aOx2yL5aAUGSaT1oTYMBwQ5VGCAJgYIJCnx1gIOBhXdwiIl7d0p2iYGQUAQBjoOFSQR/lIQHnZ+Ue6OagqYzSqSJi5eTpTxGcjcSChANEbu8DBAIEsHBChe5vL13G7fFuscRDcnKuM3H0La3EA7Oz8kKEsXazr7Cw9/Gztar5uHHvte47MjktznZ2w0G1+D3BgirAqJmJMAQgMGEgwgn5Ei0gKDBhBMALGRYEOJBb5QcWlQo4cbAihZz3GgIMqFEBSM1/4ZEOWPAgpIIJXYU+PIhRG8ja1qU6VHlzZknJNQ6UanCjQkWCIGSUGEjAwVLjc44+DTqUQtPPS5gejUrTa5TJ3g9sWCr1BNUWZI161StiQUDmLYdGfesibQ3XMq1OPYthrwuA2yU2LBs2cBHIypYQPPlYAKFD5cVvNPtW8eVGbdcQADATsiNO4cFAPkvHpedPzc8kUcPgNGgZ5RNDZG05reoE9s2vSEP79MEGiQGy1qP8LA4ZcdtsJE48ONoLTBtTV0B9LsTnPceoIDBDQvS7W7vfjVY3q3eZ4A339J4eaAmKqU/sV58HvJh2RcnIBsDUw0ABqhBA5aV5V9XUFGiHfVeAiWwoFgJJrIXRH1tEMiDFV4oHoAEGlaWhgIGSGBO2nFomYY3mKjVglidaNYJGJDkWW2xxTfbjCbVaOGNqoX2GloR8ZeTaECS9pthRGJH2g0b3Agbk6hNANtteHD2GJUucfajCQBy5OOTQ25ZgUPvaVVQmbKh9510/qQpwXx3SQdfk8tZJOd5b6JJFplT3ZnmmX3qd5l1eg5q00HrtUkUn0AKaiGjClSAgKLYZcgWXwocGRcCFGCKwSB6ceqphwmYRUFYT/1WKlOdUpipmxW0mlCqHjYkAaeoZlqrqZ4qd+upQKaapn/AmgAegZ8KUtYtFAQQAgAh+QQFCgAbACwHAAQAzgALAAAF/+C2PUcmiCiZGUTrEkKBis8jQEquKwU5HyXIbEPgyX7BYa5wTNmEMwWsSXsqFbEh8DYs9mrgGjdK6GkPY5GOeU6ryz7UFopSQEzygOGhJBjoIgMDBAcBM0V/CYqLCQqFOwobiYyKjn2TlI6GKC2YjJZknouaZAcQlJUHl6eooJwKooobqoewrJSEmyKdt59NhRKFMxLEEA4RyMkMEAjDEhfGycqAG8TQx9IRDRDE3d3R2ctD1RLg0ttKEnbY5wZD3+zJ6M7X2RHi9Oby7u/r9g38UFjTh2xZJBEBMDAboogAgwkQI07IMUORwocSJwCgWDFBAIwZOaJIsOBjRogKJP8wTODw5ESVHVtm3AhzpEeQElOuNDlTZ0ycEUWKWFASqEahGwYUPbnxoAgEdlYSqDBkgoUNClAlIHbSAoOsqCRQnQHxq1axVb06FWFxLIqyaze0Tft1JVqyE+pWXMD1pF6bYl3+HTqAWNW8cRUFzmih0ZAAB2oGKukSAAGGRHWJgLiR6AylBLpuHKKUMlMCngMpDSAa9QIUggZVVvDaJobLeC3XZpvgNgCmtPcuwP3WgmXSq4do0DC6o2/guzcseECtUoO0hmcsGKDgOt7ssBd07wqesAIGZC1YIBa7PQHvb1+SFo+++HrJSQfB33xfav3i5eX3Hnb4CTJgegEq8tH/YQEOcIJzbm2G2EoYRLgBXFpVmFYDcREV4HIcnmUhiGBRouEMJGJGzHIspqgdXxK0yCKHRNXoIX4uorCdTyjkyNtdPWrA4Up82EbAbzMRxxZRR54WXVLDIRmRcag5d2R6ugl3ZXzNhTecchpMhIGVAKAYpgJjjsSklBEd99maZoo535ZvdamjBEpusJyctg3h4X8XqodBMx0tiNeg/oGJaKGABpogS40KSqiaEgBqlQWLUtqoVQnytekEjzo0hHqhRorppOZt2p923M2AAV+oBtpAnnPNoB6HaU6mAAIU+IXmi3j2mtFXuUoHKwXpzVrsjcgGOauKEjQrwq157hitGq2NoWmjh7z6Wmxb0m5w66+2VRAuXN/yFUAIACH5BAUKABsALAcABADOAAsAAAX/4CZuRiaM45MZqBgIRbs9AqTcuFLE7VHLOh7KB5ERdjJaEaU4ClO/lgKWjKKcMiJQ8KgumcieVdQMD8cbBeuAkkC6LYLhOxoQ2PF5Ys9PKPBMen17f0CCg4VSh32JV4t8jSNqEIOEgJKPlkYBlJWRInKdiJdkmQlvKAsLBxdABA4RsbIMBggtEhcQsLKxDBC2TAS6vLENdJLDxMZAubu8vjIbzcQRtMzJz79S08oQEt/guNiyy7fcvMbh4OezdAvGrakLAQwyABsELQkY9BP+//ckyPDD4J9BfAMh1GsBoImMeQUN+lMgUJ9CiRMa5msxoB9Gh/o8GmxYMZXIgxtR/yQ46S/gQAURR0pDwYDfywoyLPip5AdnCwsMFPBU4BPFhKBDi444quCmDKZOfwZ9KEGpCKgcN1jdALSpPqIYsabS+nSqvqplvYqQYAeDPgwKwjaMtiDl0oaqUAyo+3TuWwUAMPpVCfee0cEjVBGQq2ABx7oTWmQk4FglZMGN9fGVDMCuiH2AOVOu/PmyxM630gwM0CCn6q8LjVJ8GXvpa5Uwn95OTC/nNxkda1/dLSK475IjCD6dHbK1ZOa4hXP9DXs5chJ00UpVm5xo2qRpoxptwF2E4/IbJpB/SDz9+q9b1aNfQH08+p4a8uvX8B53fLP+ycAfemjsRUBgp1H20K+BghHgVgt1GXZXZpZ5lt4ECjxYR4ScUWiShEtZqBiIInRGWnERNnjiBglw+JyGnxUmGowsyiiZg189lNtPGACjV2+S9UjbU0JWF6SPvEk3QZEqsZYTk3UAaRSUnznJI5LmESCdBVSyaOWUWLK4I5gDUYVeV1T9l+FZClCAUVA09uSmRHBCKAECFEhW51ht6rnmWBXkaR+NjuHpJ40D3DmnQXt2F+ihZxlqVKOfQRACACH5BAUKABwALAcABADOAAsAAAX/ICdyUCkUo/g8mUG8MCGkKgspeC6j6XEIEBpBUeCNfECaglBcOVfJFK7YQwZHQ6JRZBUqTrSuVEuD3nI45pYjFuWKvjjSkCoRaBUMWxkwBGgJCXspQ36Bh4EEB0oKhoiBgyNLjo8Ki4QElIiWfJqHnISNEI+Ql5J9o6SgkqKkgqYihamPkW6oNBgSfiMMDQkGCBLCwxIQDhHIyQwQCGMKxsnKVyPCF9DREQ3MxMPX0cu4wt7J2uHWx9jlKd3o39MiuefYEcvNkuLt5O8c1ePI2tyELXGQwoGDAQf+iEC2xByDCRAjTlAgIUWCBRgCPJQ4AQBFXAs0coT40WLIjRxL/47AcHLkxIomRXL0CHPERZkpa4q4iVKiyp0tR/7kwHMkTUBBJR5dOCEBAVcKKtCAyOHpowXCpk7goABqBZdcvWploACpBKkpIJI1q5OD2rIWE0R1uTZu1LFwbWL9OlKuWb4c6+o9i3dEgw0RCGDUG9KlRw56gDY2qmCByZBaASi+TACA0TucAaTteCcy0ZuOK3N2vJlx58+LRQyY3Xm0ZsgjZg+oPQLi7dUcNXi0LOJw1pgNtB7XG6CBy+U75SYfPTSQAgZTNUDnQHt67wnbZyvwLgKiMN3oCZB3C76tdewpLFgIP2C88rbi4Y+QT3+8S5USMICZXWj1pkEDeUU3lOYGB3alSoEiMIjgX4WlgNF2EibIwQIXauWXSRg2SAOHIU5IIIMoZkhhWiJaiFVbKo6AQEgQXrTAazO1JhkBrBG3Y2Y6EsUhaGn95hprSN0oWpFE7rhkeaQBchGOEWnwEmc0uKWZj0LeuNV3W4Y2lZHFlQCSRjTIl8uZ+kG5HU/3sRlnTG2ytyadytnD3HrmuRcSn+0h1dycexIK1KCjYaCnjCCVqOFFJTZ5GkUUjESWaUIKU2lgCmAKKQIUjHapXRKE+t2og1VgankNYnohqKJ2CmKplso6GKz7WYCgqxeuyoF8u9IQAgA7",msg:null,msgText:"<em>Loading the next set of posts...</em>",selector:null,speed:"fast",start:undefined},state:{isDuringAjax:!1,isInvalidPage:!1,isDestroyed:!1,isDone:!1,isPaused:!1,isBeyondMaxPage:!1,currPage:1},debug:!1,behavior:undefined,binder:$(window),nextSelector:"div.navigation a:first",navSelector:"div.navigation",contentSelector:null,extraScrollPx:150,itemSelector:"div.post",animate:!1,pathParse:undefined,dataType:"html",appendCallback:!0,bufferPx:40,errorCallback:function(){},infid:0,pixelsFromNavToBottom:undefined,path:undefined,prefill:!1,maxPage:undefined},$.infinitescroll.prototype={_binding:function infscr_binding(binding){var instance=this,opts=instance.options;opts.v="2.0b2.120520";if(!!opts.behavior&&this["_binding_"+opts.behavior]!==undefined){this["_binding_"+opts.behavior].call(this);return}if(binding!=="bind"&&binding!=="unbind")return this._debug("Binding value  "+binding+" not valid"),!1;binding==="unbind"?this.options.binder.unbind("smartscroll.infscr."+instance.options.infid):this.options.binder[binding]("smartscroll.infscr."+instance.options.infid,function(){instance.scroll()}),this._debug("Binding",binding)},_create:function infscr_create(options,callback){var opts=$.extend(!0,{},$.infinitescroll.defaults,options);this.options=opts;var $window=$(window),instance=this;if(!instance._validate(options))return!1;var path=$(opts.nextSelector).attr("href");if(!path)return this._debug("Navigation selector not found"),!1;opts.path=opts.path||this._determinepath(path),opts.contentSelector=opts.contentSelector||this.element,opts.loading.selector=opts.loading.selector||opts.contentSelector,opts.loading.msg=opts.loading.msg||$('<div id="infscr-loading"><img alt="Loading..." src="'+opts.loading.img+'" /><div>'+opts.loading.msgText+"</div></div>"),(new Image).src=opts.loading.img,opts.pixelsFromNavToBottom===undefined&&(opts.pixelsFromNavToBottom=$(document).height()-$(opts.navSelector).offset().top,this._debug("pixelsFromNavToBottom: "+opts.pixelsFromNavToBottom));var self=this;return opts.loading.start=opts.loading.start||function(){$(opts.navSelector).hide(),opts.loading.msg.appendTo(opts.loading.selector).show(opts.loading.speed,$.proxy(function(){this.beginAjax(opts)},self))},opts.loading.finished=opts.loading.finished||function(){opts.state.isBeyondMaxPage||opts.loading.msg.fadeOut(opts.loading.speed)},opts.callback=function(instance,data,url){!!opts.behavior&&instance["_callback_"+opts.behavior]!==undefined&&instance["_callback_"+opts.behavior].call($(opts.contentSelector)[0],data,url),callback&&callback.call($(opts.contentSelector)[0],data,opts,url),opts.prefill&&$window.bind("resize.infinite-scroll",instance._prefill)},options.debug&&Function.prototype.bind&&(typeof console=="object"||typeof console=="function")&&typeof console.log=="object"&&["log","info","warn","error","assert","dir","clear","profile","profileEnd"].forEach(function(method){console[method]=this.call(console[method],console)},Function.prototype.bind),this._setup(),opts.prefill&&this._prefill(),!0},_prefill:function infscr_prefill(){function needsPrefill(){return $(instance.options.contentSelector).height()<=$window.height()}var instance=this,$window=$(window);this._prefill=function(){needsPrefill()&&instance.scroll(),$window.bind("resize.infinite-scroll",function(){needsPrefill()&&($window.unbind("resize.infinite-scroll"),instance.scroll())})},this._prefill()},_debug:function infscr_debug(){if(!0!==this.options.debug)return;typeof console!="undefined"&&typeof console.log=="function"?Array.prototype.slice.call(arguments).length===1&&typeof Array.prototype.slice.call(arguments)[0]=="string"?console.log(Array.prototype.slice.call(arguments).toString()):console.log(Array.prototype.slice.call(arguments)):!Function.prototype.bind&&typeof console!="undefined"&&typeof console.log=="object"&&Function.prototype.call.call(console.log,console,Array.prototype.slice.call(arguments))},_determinepath:function infscr_determinepath(path){var opts=this.options;if(!opts.behavior||this["_determinepath_"+opts.behavior]===undefined){var url=new URL(path),pathname=url.pathname,hasNumber=/\d/.test(pathname);if(!opts.pathParse){if(hasNumber&&path.match(/(\?|\&)(upage=)(\d+)/)){var parts=path.split(/(\?|\&)(upage=)(\d+)/);return[parts[0]+parts[1]+parts[2],parts[4]]}if(path.match(/^(.*?)\b2\b(.*?$)/))path=path.match(/^(.*?)\b2\b(.*?$)/).slice(1);else if(path.match(/^(.*?)2(.*?$)/)){if(path.match(/^(.*?page=)2(\/.*|$)/))return path=path.match(/^(.*?page=)2(\/.*|$)/).slice(1),path;path=path.match(/^(.*?)2(.*?$)/).slice(1)}else{if(path.match(/^(.*?page=)1(\/.*|$)/))return path=path.match(/^(.*?page=)1(\/.*|$)/).slice(1),path;this._debug("Sorry, we couldn't parse your Next (Previous Posts) URL. Verify your the css selector points to the correct A tag. If you still get this error: yell, scream, and kindly ask for help at infinite-scroll.com."),opts.state.isInvalidPage=!0}return this._debug("determinePath",path),path}return this._debug("pathParse manual"),opts.pathParse(path,this.options.state.currPage+1)}return this["_determinepath_"+opts.behavior].call(this,path)},_error:function infscr_error(xhr){var opts=this.options;if(!!opts.behavior&&this["_error_"+opts.behavior]!==undefined){this["_error_"+opts.behavior].call(this,xhr);return}xhr!=="destroy"&&xhr!=="end"&&(xhr="unknown"),this._debug("Error",xhr),(xhr==="end"||opts.state.isBeyondMaxPage)&&this._showdonemsg(),opts.state.isDone=!0,opts.state.currPage=1,opts.state.isPaused=!1,opts.state.isBeyondMaxPage=!1,this._binding("unbind")},_loadcallback:function infscr_loadcallback(box,data,url){var opts=this.options,callback=this.options.callback,result=opts.state.isDone?"done":opts.appendCallback?"append":"no-append",frag;if(!!opts.behavior&&this["_loadcallback_"+opts.behavior]!==undefined){this["_loadcallback_"+opts.behavior].call(this,box,data);return}switch(result){case"done":return this._showdonemsg(),!1;case"no-append":opts.dataType==="html"&&(data="<div>"+data+"</div>",data=$(data).find(opts.itemSelector));if(data.length===0)return this._error("end");break;case"append":var children=box.children();if(children.length===0)return this._error("end");frag=document.createDocumentFragment();while(box[0].firstChild)frag.appendChild(box[0].firstChild);this._debug("contentSelector",$(opts.contentSelector)[0]),$(opts.contentSelector)[0].appendChild(frag),data=children.get()}opts.loading.finished.call($(opts.contentSelector)[0],opts);if(opts.animate){var scrollTo=$(window).scrollTop()+$(opts.loading.msg).height()+opts.extraScrollPx+"px";$("html,body").animate({scrollTop:scrollTo},800,function(){opts.state.isDuringAjax=!1})}opts.animate||(opts.state.isDuringAjax=!1),callback(this,data,url),opts.prefill&&this._prefill()},_nearbottom:function infscr_nearbottom(){var opts=this.options,pixelsFromWindowBottomToBottom=0+$(document).height()-opts.binder.scrollTop()-$(window).height();return!opts.behavior||this["_nearbottom_"+opts.behavior]===undefined?(this._debug("math:",pixelsFromWindowBottomToBottom,opts.pixelsFromNavToBottom),pixelsFromWindowBottomToBottom-opts.bufferPx<opts.pixelsFromNavToBottom):this["_nearbottom_"+opts.behavior].call(this)},_pausing:function infscr_pausing(pause){var opts=this.options;if(!opts.behavior||this["_pausing_"+opts.behavior]===undefined){pause!=="pause"&&pause!=="resume"&&pause!==null&&this._debug("Invalid argument. Toggling pause value instead"),pause=!pause||pause!=="pause"&&pause!=="resume"?"toggle":pause;switch(pause){case"pause":opts.state.isPaused=!0;break;case"resume":opts.state.isPaused=!1;break;case"toggle":opts.state.isPaused=!opts.state.isPaused}return this._debug("Paused",opts.state.isPaused),!1}this["_pausing_"+opts.behavior].call(this,pause);return},_setup:function infscr_setup(){var opts=this.options;if(!opts.behavior||this["_setup_"+opts.behavior]===undefined)return this._binding("bind"),!1;this["_setup_"+opts.behavior].call(this);return},_showdonemsg:function infscr_showdonemsg(){var opts=this.options;if(!!opts.behavior&&this["_showdonemsg_"+opts.behavior]!==undefined){this["_showdonemsg_"+opts.behavior].call(this);return}opts.loading.msg.find("img").hide().parent().find("div").html(opts.loading.finishedMsg).animate({opacity:1},2e3,function(){$(this).parent().fadeOut(opts.loading.speed)}),opts.errorCallback.call($(opts.contentSelector)[0],"done")},_validate:function infscr_validate(opts){for(var key in opts)if(key.indexOf&&key.indexOf("Selector")>-1&&$(opts[key]).length===0)return this._debug("Your "+key+" found no elements."),!1;return!0},bind:function infscr_bind(){this._binding("bind")},destroy:function infscr_destroy(){return this.options.state.isDestroyed=!0,this.options.loading.finished(),this._error("destroy")},pause:function infscr_pause(){this._pausing("pause")},resume:function infscr_resume(){this._pausing("resume")},beginAjax:function infscr_ajax(opts){var instance=this,path=opts.path,box,desturl,method,condition;opts.state.currPage++;if(opts.maxPage!==undefined&&opts.state.currPage>opts.maxPage){opts.state.isBeyondMaxPage=!0,this.destroy();return}box=$(opts.contentSelector).is("table, tbody")?$("<tbody/>"):$("<div/>"),desturl=typeof path=="function"?path(opts.state.currPage):path.join(opts.state.currPage),instance._debug("heading into ajax",desturl),method=opts.dataType==="html"||opts.dataType==="json"?opts.dataType:"html+callback",opts.appendCallback&&opts.dataType==="html"&&(method+="+callback");switch(method){case"html+callback":instance._debug("Using HTML via .load() method"),box.load(desturl+" "+opts.itemSelector,undefined,function infscr_ajax_callback(responseText){instance._loadcallback(box,responseText,desturl)});break;case"html":instance._debug("Using "+method.toUpperCase()+" via $.ajax() method"),$.ajax({url:desturl,dataType:opts.dataType,complete:function infscr_ajax_callback(jqXHR,textStatus){condition=typeof jqXHR.isResolved!="undefined"?jqXHR.isResolved():textStatus==="success"||textStatus==="notmodified",condition?instance._loadcallback(box,jqXHR.responseText,desturl):instance._error("end")}});break;case"json":instance._debug("Using "+method.toUpperCase()+" via $.ajax() method"),$.ajax({dataType:"json",type:"GET",url:desturl,success:function(data,textStatus,jqXHR){condition=typeof jqXHR.isResolved!="undefined"?jqXHR.isResolved():textStatus==="success"||textStatus==="notmodified";if(opts.appendCallback)if(opts.template!==undefined){var theData=opts.template(data);box.append(theData),condition?instance._loadcallback(box,theData):instance._error("end")}else instance._debug("template must be defined."),instance._error("end");else condition?instance._loadcallback(box,data,desturl):instance._error("end")},error:function(){instance._debug("JSON ajax request failed."),instance._error("end")}})}},retrieve:function infscr_retrieve(pageNum){pageNum=pageNum||null;var instance=this,opts=instance.options;if(!!opts.behavior&&this["retrieve_"+opts.behavior]!==undefined){this["retrieve_"+opts.behavior].call(this,pageNum);return}if(opts.state.isDestroyed)return this._debug("Instance is destroyed"),!1;opts.state.isDuringAjax=!0,opts.loading.start.call($(opts.contentSelector)[0],opts)},scroll:function infscr_scroll(){var opts=this.options,state=opts.state;if(!!opts.behavior&&this["scroll_"+opts.behavior]!==undefined){this["scroll_"+opts.behavior].call(this);return}if(state.isDuringAjax||state.isInvalidPage||state.isDone||state.isDestroyed||state.isPaused)return;if(!this._nearbottom())return;this.retrieve()},toggle:function infscr_toggle(){this._pausing()},unbind:function infscr_unbind(){this._binding("unbind")},update:function infscr_options(key){$.isPlainObject(key)&&(this.options=$.extend(!0,this.options,key))}},$.fn.infinitescroll=function infscr_init(options,callback){var thisCall=typeof options;switch(thisCall){case"string":var args=Array.prototype.slice.call(arguments,1);this.each(function(){var instance=$.data(this,"infinitescroll");if(!instance)return!1;if(!$.isFunction(instance[options])||options.charAt(0)==="_")return!1;instance[options].apply(instance,args)});break;case"object":this.each(function(){var instance=$.data(this,"infinitescroll");instance?instance.update(options):(instance=new $.infinitescroll(options,callback,this),instance.failed||$.data(this,"infinitescroll",instance))})}return this};var event=$.event,scrollTimeout;event.special.smartscroll={setup:function(){$(this).bind("scroll",event.special.smartscroll.handler)},teardown:function(){$(this).unbind("scroll",event.special.smartscroll.handler)},handler:function(event,execAsap){var context=this,args=arguments;event.type="smartscroll",scrollTimeout&&clearTimeout(scrollTimeout),scrollTimeout=setTimeout(function(){$(context).trigger("smartscroll",args)},execAsap==="execAsap"?0:100)}},$.fn.smartscroll=function(fn){return fn?this.bind("smartscroll",fn):this.trigger("smartscroll",["execAsap"])}}),function(){"use strict";function Waypoint(options){if(!options)throw new Error("No options passed to Waypoint constructor");if(!options.element)throw new Error("No element option passed to Waypoint constructor");if(!options.handler)throw new Error("No handler option passed to Waypoint constructor");this.key="waypoint-"+keyCounter,this.options=Waypoint.Adapter.extend({},Waypoint.defaults,options),this.element=this.options.element,this.adapter=new Waypoint.Adapter(this.element),this.callback=options.handler,this.axis=this.options.horizontal?"horizontal":"vertical",this.enabled=this.options.enabled,this.triggerPoint=null,this.group=Waypoint.Group.findOrCreate({name:this.options.group,axis:this.axis}),this.context=Waypoint.Context.findOrCreateByElement(this.options.context),Waypoint.offsetAliases[this.options.offset]&&(this.options.offset=Waypoint.offsetAliases[this.options.offset]),this.group.add(this),this.context.add(this),allWaypoints[this.key]=this,keyCounter+=1}var keyCounter=0,allWaypoints={};Waypoint.prototype.queueTrigger=function(direction){this.group.queueTrigger(this,direction)},Waypoint.prototype.trigger=function(args){if(!this.enabled)return;this.callback&&this.callback.apply(this,args)},Waypoint.prototype.destroy=function(){this.context.remove(this),this.group.remove(this),delete allWaypoints[this.key]},Waypoint.prototype.disable=function(){return this.enabled=!1,this},Waypoint.prototype.enable=function(){return this.context.refresh(),this.enabled=!0,this},Waypoint.prototype.next=function(){return this.group.next(this)},Waypoint.prototype.previous=function(){return this.group.previous(this)},Waypoint.invokeAll=function(method){var allWaypointsArray=[];for(var waypointKey in allWaypoints)allWaypointsArray.push(allWaypoints[waypointKey]);for(var i=0,end=allWaypointsArray.length;i<end;i++)allWaypointsArray[i][method]()},Waypoint.destroyAll=function(){Waypoint.invokeAll("destroy")},Waypoint.disableAll=function(){Waypoint.invokeAll("disable")},Waypoint.enableAll=function(){Waypoint.Context.refreshAll();for(var waypointKey in allWaypoints)allWaypoints[waypointKey].enabled=!0;return this},Waypoint.refreshAll=function(){Waypoint.Context.refreshAll()},Waypoint.viewportHeight=function(){return window.innerHeight||document.documentElement.clientHeight},Waypoint.viewportWidth=function(){return document.documentElement.clientWidth},Waypoint.adapters=[],Waypoint.defaults={context:window,continuous:!0,enabled:!0,group:"default",horizontal:!1,offset:0},Waypoint.offsetAliases={"bottom-in-view":function(){return this.context.innerHeight()-this.adapter.outerHeight()},"right-in-view":function(){return this.context.innerWidth()-this.adapter.outerWidth()}},window.Waypoint=Waypoint}(),function(){"use strict";function requestAnimationFrameShim(callback){window.setTimeout(callback,1e3/60)}function Context(element){this.element=element,this.Adapter=Waypoint.Adapter,this.adapter=new this.Adapter(element),this.key="waypoint-context-"+keyCounter,this.didScroll=!1,this.didResize=!1,this.oldScroll={x:this.adapter.scrollLeft(),y:this.adapter.scrollTop()},this.waypoints={vertical:{},horizontal:{}},element.waypointContextKey=this.key,contexts[element.waypointContextKey]=this,keyCounter+=1,Waypoint.windowContext||(Waypoint.windowContext=!0,Waypoint.windowContext=new Context(window)),this.createThrottledScrollHandler(),this.createThrottledResizeHandler()}var keyCounter=0,contexts={},Waypoint=window.Waypoint,oldWindowLoad=window.onload;Context.prototype.add=function(waypoint){var axis=waypoint.options.horizontal?"horizontal":"vertical";this.waypoints[axis][waypoint.key]=waypoint,this.refresh()},Context.prototype.checkEmpty=function(){var horizontalEmpty=this.Adapter.isEmptyObject(this.waypoints.horizontal),verticalEmpty=this.Adapter.isEmptyObject(this.waypoints.vertical),isWindow=this.element==this.element.window;horizontalEmpty&&verticalEmpty&&!isWindow&&(this.adapter.off(".waypoints"),delete contexts[this.key])},Context.prototype.createThrottledResizeHandler=function(){function resizeHandler(){self.handleResize(),self.didResize=!1}var self=this;this.adapter.on("resize.waypoints",function(){self.didResize||(self.didResize=!0,Waypoint.requestAnimationFrame(resizeHandler))})},Context.prototype.createThrottledScrollHandler=function(){function scrollHandler(){self.handleScroll(),self.didScroll=!1}var self=this;this.adapter.on("scroll.waypoints",function(){if(!self.didScroll||Waypoint.isTouch)self.didScroll=!0,Waypoint.requestAnimationFrame(scrollHandler)})},Context.prototype.handleResize=function(){Waypoint.Context.refreshAll()},Context.prototype.handleScroll=function(){var triggeredGroups={},axes={horizontal:{newScroll:this.adapter.scrollLeft(),oldScroll:this.oldScroll.x,forward:"right",backward:"left"},vertical:{newScroll:this.adapter.scrollTop(),oldScroll:this.oldScroll.y,forward:"down",backward:"up"}};for(var axisKey in axes){var axis=axes[axisKey],isForward=axis.newScroll>axis.oldScroll,direction=isForward?axis.forward:axis.backward;for(var waypointKey in this.waypoints[axisKey]){var waypoint=this.waypoints[axisKey][waypointKey];if(waypoint.triggerPoint===null)continue;var wasBeforeTriggerPoint=axis.oldScroll<waypoint.triggerPoint,nowAfterTriggerPoint=axis.newScroll>=waypoint.triggerPoint,crossedForward=wasBeforeTriggerPoint&&nowAfterTriggerPoint,crossedBackward=!wasBeforeTriggerPoint&&!nowAfterTriggerPoint;if(crossedForward||crossedBackward)waypoint.queueTrigger(direction),triggeredGroups[waypoint.group.id]=waypoint.group}}for(var groupKey in triggeredGroups)triggeredGroups[groupKey].flushTriggers();this.oldScroll={x:axes.horizontal.newScroll,y:axes.vertical.newScroll}},Context.prototype.innerHeight=function(){return this.element==this.element.window?Waypoint.viewportHeight():this.adapter.innerHeight()},Context.prototype.remove=function(waypoint){delete this.waypoints[waypoint.axis][waypoint.key],this.checkEmpty()},Context.prototype.innerWidth=function(){return this.element==this.element.window?Waypoint.viewportWidth():this.adapter.innerWidth()},Context.prototype.destroy=function(){var allWaypoints=[];for(var axis in this.waypoints)for(var waypointKey in this.waypoints[axis])allWaypoints.push(this.waypoints[axis][waypointKey]);for(var i=0,end=allWaypoints.length;i<end;i++)allWaypoints[i].destroy()},Context.prototype.refresh=function(){var isWindow=this.element==this.element.window,contextOffset=isWindow?undefined:this.adapter.offset(),triggeredGroups={},axes;this.handleScroll(),axes={horizontal:{contextOffset:isWindow?0:contextOffset.left,contextScroll:isWindow?0:this.oldScroll.x,contextDimension:this.innerWidth(),oldScroll:this.oldScroll.x,forward:"right",backward:"left",offsetProp:"left"},vertical:{contextOffset:isWindow?0:contextOffset.top,contextScroll:isWindow?0:this.oldScroll.y,contextDimension:this.innerHeight(),oldScroll:this.oldScroll.y,forward:"down",backward:"up",offsetProp:"top"}};for(var axisKey in axes){var axis=axes[axisKey];for(var waypointKey in this.waypoints[axisKey]){var waypoint=this.waypoints[axisKey][waypointKey],adjustment=waypoint.options.offset,oldTriggerPoint=waypoint.triggerPoint,elementOffset=0,freshWaypoint=oldTriggerPoint==null,contextModifier,wasBeforeScroll,nowAfterScroll,triggeredBackward,triggeredForward;waypoint.element!==waypoint.element.window&&(elementOffset=waypoint.adapter.offset()[axis.offsetProp]),typeof adjustment=="function"?adjustment=adjustment.apply(waypoint):typeof adjustment=="string"&&(adjustment=parseFloat(adjustment),waypoint.options.offset.indexOf("%")>-1&&(adjustment=Math.ceil(axis.contextDimension*adjustment/100))),contextModifier=axis.contextScroll-axis.contextOffset,waypoint.triggerPoint=Math.floor(elementOffset+contextModifier-adjustment),wasBeforeScroll=oldTriggerPoint<axis.oldScroll,nowAfterScroll=waypoint.triggerPoint>=axis.oldScroll,triggeredBackward=wasBeforeScroll&&nowAfterScroll,triggeredForward=!wasBeforeScroll&&!nowAfterScroll,!freshWaypoint&&triggeredBackward?(waypoint.queueTrigger(axis.backward),triggeredGroups[waypoint.group.id]=waypoint.group):!freshWaypoint&&triggeredForward?(waypoint.queueTrigger(axis.forward),triggeredGroups[waypoint.group.id]=waypoint.group):freshWaypoint&&axis.oldScroll>=waypoint.triggerPoint&&(waypoint.queueTrigger(axis.forward),triggeredGroups[waypoint.group.id]=waypoint.group)}}return Waypoint.requestAnimationFrame(function(){for(var groupKey in triggeredGroups)triggeredGroups[groupKey].flushTriggers()}),this},Context.findOrCreateByElement=function(element){return Context.findByElement(element)||new Context(element)},Context.refreshAll=function(){for(var contextId in contexts)contexts[contextId].refresh()},Context.findByElement=function(element){return contexts[element.waypointContextKey]},window.onload=function(){oldWindowLoad&&oldWindowLoad(),Context.refreshAll()},Waypoint.requestAnimationFrame=function(callback){var requestFn=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||requestAnimationFrameShim;requestFn.call(window,callback)},Waypoint.Context=Context}(),function(){"use strict";function byTriggerPoint(a,b){return a.triggerPoint-b.triggerPoint}function byReverseTriggerPoint(a,b){return b.triggerPoint-a.triggerPoint}function Group(options){this.name=options.name,this.axis=options.axis,this.id=this.name+"-"+this.axis,this.waypoints=[],this.clearTriggerQueues(),groups[this.axis][this.name]=this}var groups={vertical:{},horizontal:{}},Waypoint=window.Waypoint;Group.prototype.add=function(waypoint){this.waypoints.push(waypoint)},Group.prototype.clearTriggerQueues=function(){this.triggerQueues={up:[],down:[],left:[],right:[]}},Group.prototype.flushTriggers=function(){for(var direction in this.triggerQueues){var waypoints=this.triggerQueues[direction],reverse=direction==="up"||direction==="left";waypoints.sort(reverse?byReverseTriggerPoint:byTriggerPoint);for(var i=0,end=waypoints.length;i<end;i+=1){var waypoint=waypoints[i];(waypoint.options.continuous||i===waypoints.length-1)&&waypoint.trigger([direction])}}this.clearTriggerQueues()},Group.prototype.next=function(waypoint){this.waypoints.sort(byTriggerPoint);var index=Waypoint.Adapter.inArray(waypoint,this.waypoints),isLast=index===this.waypoints.length-1;return isLast?null:this.waypoints[index+1]},Group.prototype.previous=function(waypoint){this.waypoints.sort(byTriggerPoint);var index=Waypoint.Adapter.inArray(waypoint,this.waypoints);return index?this.waypoints[index-1]:null},Group.prototype.queueTrigger=function(waypoint,direction){this.triggerQueues[direction].push(waypoint)},Group.prototype.remove=function(waypoint){var index=Waypoint.Adapter.inArray(waypoint,this.waypoints);index>-1&&this.waypoints.splice(index,1)},Group.prototype.first=function(){return this.waypoints[0]},Group.prototype.last=function(){return this.waypoints[this.waypoints.length-1]},Group.findOrCreate=function(options){return groups[options.axis][options.name]||new Group(options)},Waypoint.Group=Group}(),function(){"use strict";function JQueryAdapter(element){this.$element=$(element)}var $=window.jQuery,Waypoint=window.Waypoint;$.each(["innerHeight","innerWidth","off","offset","on","outerHeight","outerWidth","scrollLeft","scrollTop"],function(i,method){JQueryAdapter.prototype[method]=function(){var args=Array.prototype.slice.call(arguments);return this.$element[method].apply(this.$element,args)}}),$.each(["extend","inArray","isEmptyObject"],function(i,method){JQueryAdapter[method]=$[method]}),Waypoint.adapters.push({name:"jquery",Adapter:JQueryAdapter}),Waypoint.Adapter=JQueryAdapter}(),function(){"use strict";function createExtension(framework){return function(){var waypoints=[],overrides=arguments[0];return framework.isFunction(arguments[0])&&(overrides=framework.extend({},arguments[1]),overrides.handler=arguments[0]),this.each(function(){var options=framework.extend({},overrides,{element:this});typeof options.context=="string"&&(options.context=framework(this).closest(options.context)[0]),waypoints.push(new Waypoint(options))}),waypoints}}var Waypoint=window.Waypoint;window.jQuery&&(window.jQuery.fn.waypoint=createExtension(window.jQuery)),window.Zepto&&(window.Zepto.fn.waypoint=createExtension(window.Zepto))}(),function(){"use strict";function noop(){}function Inview(options){this.options=Waypoint.Adapter.extend({},Inview.defaults,options),this.axis=this.options.horizontal?"horizontal":"vertical",this.waypoints=[],this.element=this.options.element,this.createWaypoints()}var Waypoint=window.Waypoint;Inview.prototype.createWaypoints=function(){var configs={vertical:[{down:"enter",up:"exited",offset:"100%"},{down:"entered",up:"exit",offset:"bottom-in-view"},{down:"exit",up:"entered",offset:0},{down:"exited",up:"enter",offset:function(){return-this.adapter.outerHeight()}}],horizontal:[{right:"enter",left:"exited",offset:"100%"},{right:"entered",left:"exit",offset:"right-in-view"},{right:"exit",left:"entered",offset:0},{right:"exited",left:"enter",offset:function(){return-this.adapter.outerWidth()}}]};for(var i=0,end=configs[this.axis].length;i<end;i++){var config=configs[this.axis][i];this.createWaypoint(config)}},Inview.prototype.createWaypoint=function(config){var self=this;this.waypoints.push(new Waypoint({context:this.options.context,element:this.options.element,enabled:this.options.enabled,handler:function(config){return function(direction){self.options[config[direction]].call(self,direction)}}(config),offset:config.offset,horizontal:this.options.horizontal}))},Inview.prototype.destroy=function(){for(var i=0,end=this.waypoints.length;i<end;i++)this.waypoints[i].destroy();this.waypoints=[]},Inview.prototype.disable=function(){for(var i=0,end=this.waypoints.length;i<end;i++)this.waypoints[i].disable()},Inview.prototype.enable=function(){for(var i=0,end=this.waypoints.length;i<end;i++)this.waypoints[i].enable()},Inview.defaults={context:window,enabled:!0,enter:noop,entered:noop,exit:noop,exited:noop},Waypoint.Inview=Inview}(),function($){function initMouseDetection(disable){if(!mouseDetectionEnabled&&!disable){var firstTime=!0,lastMove=null;$(document).bind({"mousemove.smartmenus_mouse":function(e){var thisMove={x:e.pageX,y:e.pageY,timeStamp:(new Date).getTime()};if(lastMove){var deltaX=Math.abs(lastMove.x-thisMove.x),deltaY=Math.abs(lastMove.y-thisMove.y);if((deltaX>0||deltaY>0)&&deltaX<=2&&deltaY<=2&&thisMove.timeStamp-lastMove.timeStamp<=300){mouse=!0;if(firstTime){var $a=$(e.target).closest("a");$a.is("a")&&$.each(menuTrees,function(){if($.contains(this.$root[0],$a[0]))return this.itemEnter({currentTarget:$a[0]}),!1}),firstTime=!1}}}lastMove=thisMove},"touchstart.smartmenus_mouse pointerover.smartmenus_mouse MSPointerOver.smartmenus_mouse":function(e){/^(4|mouse|pen)$/.test(e.originalEvent.pointerType)||(mouse=!1)}}),mouseDetectionEnabled=!0}else mouseDetectionEnabled&&disable&&($(document).unbind(".smartmenus_mouse"),mouseDetectionEnabled=!1)}var menuTrees=[],IE=!!window.createPopup,IElt9=IE&&!document.defaultView,IElt8=IE&&!document.querySelector,IE6=IE&&typeof document.documentElement.currentStyle.minWidth=="undefined",mouse=!1,mouseDetectionEnabled=!1;$.SmartMenus=function(elm,options){this.$root=$(elm),this.opts=options,this.rootId="",this.$subArrow=null,this.subMenus=[],this.activatedItems=[],this.visibleSubMenus=[],this.showTimeout=0,this.hideTimeout=0,this.scrollTimeout=0,this.clickActivated=!1,this.zIndexInc=0,this.$firstLink=null,this.$firstSub=null,this.disabled=!1,this.$disableOverlay=null,this.init()},$.extend($.SmartMenus,{hideAll:function(){$.each(menuTrees,function(){this.menuHideAll()})},destroy:function(){while(menuTrees.length)menuTrees[0].destroy();initMouseDetection(!0)},prototype:{init:function(refresh){var self=this;if(!refresh){menuTrees.push(this),this.rootId=((new Date).getTime()+Math.random()+"").replace(/\D/g,""),this.$root.hasClass("sm-rtl")&&(this.opts.rightToLeftSubMenus=!0),this.$root.data("smartmenus",this).attr("data-smartmenus-id",this.rootId).dataSM("level",1).bind({"mouseover.smartmenus focusin.smartmenus":$.proxy(this.rootOver,this),"mouseout.smartmenus focusout.smartmenus":$.proxy(this.rootOut,this)}).delegate("a, div.logo-container",{"mouseenter.smartmenus":$.proxy(this.itemEnter,this),"mouseleave.smartmenus":$.proxy(this.itemLeave,this),"mousedown.smartmenus":$.proxy(this.itemDown,this),"focus.smartmenus":$.proxy(this.itemFocus,this),"blur.smartmenus":$.proxy(this.itemBlur,this),"click.smartmenus":$.proxy(this.itemClick,this),"touchend.smartmenus":$.proxy(this.itemTouchEnd,this)});var eNamespace=".smartmenus"+this.rootId;this.opts.hideOnClick&&$(document).on("touchstart"+eNamespace,$.proxy(this.docTouchStart,this)).on("touchmove"+eNamespace,$.proxy(this.docTouchMove,this)).on("touchend"+eNamespace,$.proxy(this.docTouchEnd,this)).on("click"+eNamespace,$.proxy(this.docClick,this)),$(window).on("resize"+eNamespace+" orientationchange"+eNamespace,$.proxy(this.winResize,this));var $vmenu=$("body.vmenu .vmenu-container");!$vmenu.length&&UNCODE.wwidth>UNCODE.mediaQuery&&$(window).on("scroll"+eNamespace+" orientationchange"+eNamespace,$.proxy(this.winResize,this)),this.opts.subIndicators&&(this.$subArrow=$("<span/>").addClass("sub-arrow"),this.opts.subIndicatorsText&&this.$subArrow.html(this.opts.subIndicatorsText)),initMouseDetection()}this.$firstSub=this.$root.find("ul").each(function(){self.menuInit($(this))}).eq(0),this.$firstLink=this.$root.find("a").eq(0);if(this.opts.markCurrentItem){var reDefaultDoc=/(index|default)\.[^#\?\/]*/i,reHash=/#.*/,locHref=window.location.href.replace(reDefaultDoc,""),locHrefNoHash=locHref.replace(reHash,"");this.$root.find("a").each(function(){var href=this.href.replace(reDefaultDoc,""),$this=$(this);if(href==locHref||href==locHrefNoHash)$this.addClass("current"),self.opts.markCurrentTree&&$this.parents("li").each(function(){var $this=$(this);$this.dataSM("sub")&&$this.children("a").addClass("current")})})}},destroy:function(){this.menuHideAll(),this.$root.removeData("smartmenus").removeAttr("data-smartmenus-id").removeDataSM("level").unbind(".smartmenus").undelegate(".smartmenus");var eNamespace=".smartmenus"+this.rootId;$(document).unbind(eNamespace),$(window).unbind(eNamespace),this.opts.subIndicators&&(this.$subArrow=null);var self=this;$.each(this.subMenus,function(){this.hasClass("mega-menu")&&this.find("ul").removeDataSM("in-mega");if(this.dataSM("shown-before")){IElt8&&this.children().css({styleFloat:"",width:""});if(self.opts.subMenusMinWidth||self.opts.subMenusMaxWidth)IE6?this.css({width:"",overflowX:"",overflowY:""}).children().children("a").css("white-space",""):this.css({width:"",minWidth:"",maxWidth:""}).removeClass("sm-nowrap");this.dataSM("scroll-arrows")&&this.dataSM("scroll-arrows").remove(),this.css({zIndex:"",top:"",left:"",marginLeft:"",marginTop:"",display:""})}self.opts.subIndicators&&this.dataSM("parent-a").removeClass("has-submenu").children("span.sub-arrow").remove(),this.removeDataSM("shown-before").removeDataSM("ie-shim").removeDataSM("scroll-arrows").removeDataSM("parent-a").removeDataSM("level").removeDataSM("beforefirstshowfired").parent().removeDataSM("sub")}),this.opts.markCurrentItem&&this.$root.find("a.current").removeClass("current"),this.$root=null,this.$firstLink=null,this.$firstSub=null,this.$disableOverlay&&(this.$disableOverlay.remove(),this.$disableOverlay=null),menuTrees.splice($.inArray(this,menuTrees),1)},disable:function(noOverlay){if(!this.disabled){this.menuHideAll();if(!noOverlay&&!this.opts.isPopup&&this.$root.is(":visible")){var pos=this.$root.offset();this.$disableOverlay=$('<div class="sm-jquery-disable-overlay"/>').css({position:"absolute",top:pos.top,left:pos.left,width:this.$root.outerWidth(),height:this.$root.outerHeight(),zIndex:this.getStartZIndex()+1,opacity:0}).appendTo(document.body)}this.disabled=!0}},docClick:function(e){(this.visibleSubMenus.length&&!$.contains(this.$root[0],e.target)||$(e.target).is("a"))&&this.menuHideAll($(e.target))},docTouchEnd:function(e){if(!this.lastTouch)return;if(this.visibleSubMenus.length&&(this.lastTouch.x2===undefined||this.lastTouch.x1==this.lastTouch.x2)&&(this.lastTouch.y2===undefined||this.lastTouch.y1==this.lastTouch.y2)&&(!this.lastTouch.target||!$.contains(this.$root[0],this.lastTouch.target))){this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0);var self=this;this.hideTimeout=setTimeout(function(){self.menuHideAll($(e.target))},350)}this.lastTouch=null},docTouchMove:function(e){if(!this.lastTouch)return;var touchPoint=e.originalEvent.touches[0];this.lastTouch.x2=touchPoint.pageX,this.lastTouch.y2=touchPoint.pageY},docTouchStart:function(e){var touchPoint=e.originalEvent.touches[0];this.lastTouch={x1:touchPoint.pageX,y1:touchPoint.pageY,target:touchPoint.target}},enable:function(){this.disabled&&(this.$disableOverlay&&(this.$disableOverlay.remove(),this.$disableOverlay=null),this.disabled=!1)},getHeight:function($elm){return this.getOffset($elm,!0)},getOffset:function($elm,height){var old,$win=$(window),winW=$win.width();$elm.css("display")=="none"&&(old={position:$elm[0].style.position,visibility:$elm[0].style.visibility},$elm.css({position:"absolute",visibility:"hidden"}).show(),($("body").hasClass("menu-mobile-off-canvas")&&winW<960&&$elm.closest(".main-menu-container").length||($("body").hasClass("vmenu-offcanvas-overlay")||$("body").hasClass("vmenu"))&&winW>=960&&$elm.closest(".main-menu-container").length&&!$elm.closest(".menu-horizontal-inner").length)&&$elm.closest("li").addClass("smartmenu-open-item"));var defaultView=$elm[0].ownerDocument.defaultView,compStyle=defaultView&&defaultView.getComputedStyle&&defaultView.getComputedStyle($elm[0],null),val=compStyle&&parseFloat(compStyle[height?"height":"width"]);return val?val+=parseFloat(compStyle[height?"paddingTop":"paddingLeft"])+parseFloat(compStyle[height?"paddingBottom":"paddingRight"])+parseInt(compStyle[height?"borderTopWidth":"borderLeftWidth"])+parseInt(compStyle[height?"borderBottomWidth":"borderRightWidth"]):val=height?$elm[0].offsetHeight:$elm[0].offsetWidth,old&&$elm.hide().css(old),val},getWidth:function($elm){return this.getOffset($elm)},getStartZIndex:function(){var zIndex=parseInt(this.$root.css("z-index"));return isNaN(zIndex)?1:zIndex},handleEvents:function(){return!this.disabled&&this.isCSSOn()},handleItemEvents:function($a){return this.handleEvents()&&!this.isLinkInMegaMenu($a)},isCollapsible:function(){return this.$firstSub.css("position")=="static"},isCSSOn:function(){return this.$firstLink.css("display")=="block"||this.$firstLink.css("display")=="flex"||this.$firstLink.css("display")=="inline-flex"||this.$firstLink.css("display")=="table-cell"||this.$firstLink.css("display")=="inline"},isFixed:function(){return this.$root.css("position")=="fixed"},isLinkInMegaMenu:function($a){return!$a.parent().parent().dataSM("level")},isTouchMode:function(){return!mouse||this.isCollapsible()},itemActivate:function($a){var $li=$a.parent(),$ul=$li.parent(),level=$ul.dataSM("level");if(level>1&&(!this.activatedItems[level-2]||this.activatedItems[level-2][0]!=$ul.dataSM("parent-a")[0])){var self=this;$($ul.parentsUntil("[data-smartmenus-id]","ul").get().reverse()).add($ul).each(function(){self.itemActivate($(this).dataSM("parent-a"))})}if(this.visibleSubMenus.length>level)for(var i=this.visibleSubMenus.length-1,l=!this.activatedItems[level-1]||this.activatedItems[level-1][0]!=$a[0]?level-1:level;i>l;i--)this.menuHide(this.visibleSubMenus[i]);this.activatedItems[level-1]=$a,this.visibleSubMenus[level-1]=$ul;if(this.$root.triggerHandler("activate.smapi",$a[0])===!1)return;var $sub=$li.dataSM("sub");$sub&&(this.isTouchMode()||!this.opts.showOnClick||this.clickActivated)&&this.menuShow($sub)},itemBlur:function(e){var $a=$(e.currentTarget);if(!this.handleItemEvents($a))return;this.$root.triggerHandler("blur.smapi",$a[0])},itemClick:function(e){var $a=$(e.currentTarget);if(!this.handleItemEvents($a))return;$a.removeDataSM("mousedown");if(this.$root.triggerHandler("click.smapi",$a[0])===!1)return!1;var $sub=$a.parent().dataSM("sub");if(this.isTouchMode()){$a.dataSM("href")&&$a.attr("href",$a.dataSM("href")).removeDataSM("href");if($sub&&(!$sub.dataSM("shown-before")||!$sub.is(":visible"))){this.itemActivate($a);if($sub.is(":visible"))return!1}}else if(this.opts.showOnClick&&$a.parent().parent().dataSM("level")==1&&$sub)return this.clickActivated=!0,this.menuShow($sub),!1;if($a.hasClass("disabled"))return!1;if(this.$root.triggerHandler("select.smapi",$a[0])===!1)return!1},itemDown:function(e){var $a=$(e.currentTarget);if(!this.handleItemEvents($a))return;$a.dataSM("mousedown",!0)},itemEnter:function(e){var $a=$(e.currentTarget);if(!this.handleItemEvents($a))return;if(!this.isTouchMode()){this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0);var self=this;this.showTimeout=setTimeout(function(){self.itemActivate($a)},this.opts.showOnClick&&$a.parent().parent().dataSM("level")==1?1:this.opts.showTimeout)}this.$root.triggerHandler("mouseenter.smapi",$a[0])},itemFocus:function(e){var $a=$(e.currentTarget);if(!this.handleItemEvents($a))return;(!this.isTouchMode()||!$a.dataSM("mousedown"))&&(!this.activatedItems.length||this.activatedItems[this.activatedItems.length-1][0]!=$a[0])&&this.itemActivate($a),this.$root.triggerHandler("focus.smapi",$a[0])},itemLeave:function(e){var $a=$(e.currentTarget);if(!this.handleItemEvents($a))return;this.isTouchMode()||($a[0].blur&&$a[0].blur(),this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0)),$a.removeDataSM("mousedown"),this.$root.triggerHandler("mouseleave.smapi",$a[0])},itemTouchEnd:function(e){var $a=$(e.currentTarget);if(!this.handleItemEvents($a))return;var $sub=$a.parent().dataSM("sub");$a.attr("href").charAt(0)!=="#"&&$sub&&(!$sub.dataSM("shown-before")||!$sub.is(":visible"))&&($a.dataSM("href",$a.attr("href")),$a.attr("href","#"))},menuFixLayout:function($ul){$ul.dataSM("shown-before")||($ul.hide().dataSM("shown-before",!0),IElt8&&$ul.children().css({styleFloat:"left",width:"100%"}))},menuHide:function($sub){if(this.$root.triggerHandler("beforehide.smapi",$sub[0])===!1)return;$sub.stop(!0,!0);if($sub.is(":visible")){var complete=function(){IElt9?$sub.parent().css("z-index",""):$sub.css("z-index","")};this.isCollapsible()?this.opts.collapsibleHideFunction?this.opts.collapsibleHideFunction.call(this,$sub,complete):$sub.hide(this.opts.collapsibleHideDuration,complete):this.opts.hideFunction?this.opts.hideFunction.call(this,$sub,complete):$sub.hide(this.opts.hideDuration,complete),$sub.dataSM("ie-shim")&&$sub.dataSM("ie-shim").remove(),$sub.dataSM("scroll")&&$sub.unbind(".smartmenus_scroll").removeDataSM("scroll").dataSM("scroll-arrows").hide(),$sub.dataSM("parent-a").removeClass("highlighted");var level=$sub.dataSM("level");this.activatedItems.splice(level-1,1),this.visibleSubMenus.splice(level-1,1),this.$root.triggerHandler("hide.smapi",$sub[0])}},menuHideAll:function($item){if($item!=undefined&&$item.parent().hasClass("menu-item")&&!$item.parent().hasClass("menu-item-has-children"))return;var $win=$(window),winW=$win.width();this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0);for(var i=this.visibleSubMenus.length-1;i>0;i--)if(this.visibleSubMenus[i].closest(".smartmenu-open-item").length){if($item==undefined||!$item.closest(".smartmenu-open-item").length)return;this.menuHide(this.visibleSubMenus[i]),$(this.visibleSubMenus[i]).closest(".smartmenu-open-item").removeClass("smartmenu-open-item")}else this.menuHide(this.visibleSubMenus[i]);this.opts.isPopup&&(this.$root.stop(!0,!0),this.$root.is(":visible")&&(this.opts.hideFunction?this.opts.hideFunction.call(this,this.$root):this.$root.hide(this.opts.hideDuration),this.$root.dataSM("ie-shim")&&this.$root.dataSM("ie-shim").remove())),this.activatedItems=[],this.visibleSubMenus=[],this.clickActivated=!1,this.zIndexInc=0},menuIframeShim:function($ul){IE&&this.opts.overlapControlsInIE&&!$ul.dataSM("ie-shim")&&$ul.dataSM("ie-shim",$("<iframe/>").attr({src:"javascript:0",tabindex:-9}).css({position:"absolute",top:"auto",left:"0",opacity:0,border:"0"}))},menuInit:function($ul){if(!$ul.dataSM("in-mega")){this.subMenus.push($ul),$ul.hasClass("mega-menu")&&$ul.find("ul").dataSM("in-mega",!0);var level=2,par=$ul[0];while(par!=null&&par.parentNode!=null&&(par=par.parentNode.parentNode)!=this.$root[0])level++;$ul.dataSM("parent-a",$ul.prevAll("a").eq(-1)).dataSM("level",level).parent().dataSM("sub",$ul),this.opts.subIndicators&&$ul.dataSM("parent-a").addClass("has-submenu")[this.opts.subIndicatorsPos](this.$subArrow.clone())}},menuPosition:function($sub){var fixIE=$("html.ie").length,$a=$sub.dataSM("parent-a"),$li=$sub.parent(),$ul=$sub.parent().parent(),$container=$ul.closest(".row-menu-inner").length?$("body").hasClass("megamenu-side-to-side")?$ul.closest(".row-menu"):$ul.closest(".row-menu-inner"):$ul.closest(".uncol"),level=$sub.dataSM("level"),subW=this.getWidth($sub),subH=this.getHeight($sub),itemOffset=$a.offset(),itemX=itemOffset.left,itemY=itemOffset.top,itemW=this.getWidth($a),itemH=this.getHeight($a),$win=$(window),winX=$win.scrollLeft(),winY=$win.scrollTop(),winW=$win.width(),winH=$win.height(),containerW=$container.width(),containerOffsetX=containerW+(winW-containerW)/2,horizontalParent=$ul.hasClass("sm")&&!$ul.hasClass("sm-vertical"),subOffsetX=level==2?this.opts.mainMenuSubOffsetX:this.opts.subMenusSubOffsetX,subOffsetY=level==2?this.opts.mainMenuSubOffsetY:this.opts.subMenusSubOffsetY,x,y,leftPos;horizontalParent?(x=this.opts.rightToLeftSubMenus?itemW-subW-subOffsetX:subOffsetX,y=this.opts.bottomToTopSubMenus?-subH-subOffsetY:itemH+subOffsetY):(x=this.opts.rightToLeftSubMenus?subOffsetX-subW:subW-subOffsetX,y=this.opts.bottomToTopSubMenus?itemH-subOffsetY-subH:subOffsetY);if(this.opts.keepInViewport&&!this.isCollapsible()){this.isFixed()&&(itemX-=winX,itemY-=winY,winX=winY=0);var absX=itemX+x,absY=itemY+y;this.opts.rightToLeftSubMenus&&absX<winX?x=horizontalParent?winX-absX+x:itemW-subOffsetX:!this.opts.rightToLeftSubMenus&&absX+subW>winX+containerOffsetX&&(x=horizontalParent?winX+containerOffsetX-subW-absX+x:subOffsetX-subW);if(!horizontalParent)if(subH<winH&&absY+subH>winY+winH)y+=winY+winH-subH-absY;else if(subH>=winH||absY<winY)y+=winY-absY;if(mouse&&(horizontalParent&&(absY+subH>winY+winH+.49||absY<winY)||!horizontalParent&&subH>winH+.49)){var self=this;$sub.dataSM("scroll-arrows")||$sub.dataSM("scroll-arrows",$([$('<span class="scroll-up"><span class="scroll-up-arrow"></span></span>')[0],$('<span class="scroll-down"><span class="scroll-down-arrow"></span></span>')[0]]).bind({mouseenter:function(){self.menuScroll($sub,$(this).hasClass("scroll-up"))},mouseleave:function(e){self.menuScrollStop($sub),self.menuScrollOut($sub,e)},"mousewheel DOMMouseScroll":function(e){e.preventDefault()}}).insertAfter($sub));var vportY=winY-(itemY+itemH);$sub.dataSM("scroll",{vportY:vportY,subH:subH,winH:winH,step:1}).bind({"mouseover.smartmenus_scroll":function(e){self.menuScrollOver($sub,e)},"mouseout.smartmenus_scroll":function(e){self.menuScrollOut($sub,e)},"mousewheel.smartmenus_scroll DOMMouseScroll.smartmenus_scroll":function(e){self.menuScrollMousewheel($sub,e)}}).dataSM("scroll-arrows").css({top:"auto",left:"0",marginLeft:x+(parseInt($sub.css("border-left-width"))||0),width:this.getWidth($sub)-(parseInt($sub.css("border-left-width"))||0)-(parseInt($sub.css("border-right-width"))||0),zIndex:this.getStartZIndex()+this.zIndexInc}).eq(0).css("margin-top",vportY).end().eq(1).css("margin-top",vportY+winH-this.getHeight($sub.dataSM("scroll-arrows").eq(1))).end().eq(horizontalParent&&this.opts.bottomToTopSubMenus?0:1).show()}}if(!$sub.closest(".menu-accordion").length){var rightPos="auto";$sub.closest(".grid-filters").length?($sub.closest(".text-right").length?(leftPos="0px",rightPos="auto"):(leftPos="auto",rightPos="0px"),x=0):$sub.hasClass("mega-menu-inner")?($sub.css({width:containerW}),leftPos=-1*(parseFloat($sub.closest("ul.menu-smart").offset().left)-parseFloat($sub.closest(".row-menu").offset().left)),$("body").hasClass("megamenu-side-to-side")||(leftPos+=parseFloat($sub.closest(".row-menu-inner").css("paddingLeft"))),x=0):(leftPos=(level>2?$li.position().left-parseFloat($li.closest("ul").css("paddingLeft")):$li.position().left)+"px",x=level>2&&x>=0?x+1:x-1)}$sub.css({top:level>2?$a[0].offsetTop:fixIE?itemH:"100%",left:leftPos,right:rightPos,marginLeft:x,marginTop:level>2?0:y-itemH+($sub.closest(".menu-borders").length&&!$sub.closest(".menu-borders.needs-after").length?1:0)}),this.menuIframeShim($sub),$sub.dataSM("ie-shim")&&$sub.dataSM("ie-shim").css({zIndex:$sub.css("z-index"),width:subW,height:subH,marginLeft:x,marginTop:y-itemH+($sub.closest(".menu-mini").length?0:1)})},menuScroll:function($sub,up,wheel){var y=parseFloat($sub.css("margin-top")),scroll=$sub.dataSM("scroll"),navH=$(".navbar-main").outerHeight(),end=scroll.vportY+(up?navH+54:scroll.winH-scroll.subH),step=wheel||!this.opts.scrollAccelerate?this.opts.scrollStep:Math.floor($sub.dataSM("scroll").step);$sub.add($sub.dataSM("ie-shim")).css("margin-top",Math.abs(end-y)>step?y+(up?step:-step):end),y=parseFloat($sub.css("margin-top")),(up&&y+scroll.subH>scroll.vportY+scroll.winH||!up&&y<scroll.vportY)&&$sub.dataSM("scroll-arrows").eq(up?1:0).show(),!wheel&&this.opts.scrollAccelerate&&$sub.dataSM("scroll").step<this.opts.scrollStep&&($sub.dataSM("scroll").step+=.5);if(Math.abs(y-end)<1)$sub.dataSM("scroll-arrows").eq(up?0:1).hide(),$sub.dataSM("scroll").step=1;else if(!wheel){var self=this;this.scrollTimeout=setTimeout(function(){self.menuScroll($sub,up)},this.opts.scrollInterval)}},menuScrollMousewheel:function($sub,e){var $closestSub=$(e.target).closest("ul");while($closestSub.dataSM("in-mega"))$closestSub=$closestSub.parent().closest("ul");if($closestSub[0]==$sub[0]){var up=(e.originalEvent.wheelDelta||-e.originalEvent.detail)>0;$sub.dataSM("scroll-arrows").eq(up?0:1).is(":visible")&&this.menuScroll($sub,up,!0)}$sub.hasClass("mega-menu-inner")||e.preventDefault()},menuScrollOut:function($sub,e){var reClass=/^scroll-(up|down)/,$closestSub=$(e.relatedTarget).closest("ul");while($closestSub.dataSM("in-mega"))$closestSub=$closestSub.parent().closest("ul");!reClass.test((e.relatedTarget||"").className)&&($sub[0]!=e.relatedTarget&&!$.contains($sub[0],e.relatedTarget)||$closestSub[0]!=$sub[0])&&$sub.dataSM("scroll-arrows").css("visibility","hidden")},menuScrollOver:function($sub,e){var reClass=/^scroll-(up|down)/,$closestSub=$(e.target).closest("ul");while($closestSub.dataSM("in-mega"))$closestSub=$closestSub.parent().closest("ul");!reClass.test(e.target.className)&&$closestSub[0]==$sub[0]&&$sub.dataSM("scroll-arrows").css("visibility","visible")},menuScrollStop:function($sub){this.scrollTimeout&&(clearTimeout(this.scrollTimeout),this.scrollTimeout=0,$sub.dataSM("scroll").step=1)},menuShow:function($sub){if(!$sub.dataSM("beforefirstshowfired")){$sub.dataSM("beforefirstshowfired",!0);if(this.$root.triggerHandler("beforefirstshow.smapi",$sub[0])===!1)return}if(this.$root.triggerHandler("beforeshow.smapi",$sub[0])===!1)return;this.menuFixLayout($sub),$sub.stop(!0,!0);if(!$sub.is(":visible")){$sub.css({visibility:"visible","pointer-events":"auto"});var zIndex=this.getStartZIndex()+ ++this.zIndexInc;IElt9?$sub.parent().css("z-index",zIndex):$sub.css("z-index",zIndex),(this.opts.keepHighlighted||this.isCollapsible())&&$sub.dataSM("parent-a").attr("data-type")!="title"&&$sub.dataSM("parent-a").addClass("highlighted");if(this.opts.subMenusMinWidth||this.opts.subMenusMaxWidth)if(!IElt8){$sub.css({width:$sub.hasClass("mega-menu-inner")?$(".box-container").outerWidth()+"px":"auto",minWidth:"",maxWidth:""}).addClass("sm-nowrap"),this.opts.subMenusMinWidth&&$sub.css("min-width",this.opts.subMenusMinWidth);if(this.opts.subMenusMaxWidth){var noMaxWidth=this.getWidth($sub);$sub.hasClass("mega-menu-inner")||$sub.css("max-width",this.opts.subMenusMaxWidth),noMaxWidth>this.getWidth($sub)&&$sub.removeClass("sm-nowrap").css("width",this.opts.subMenusMaxWidth)}}else{$sub.children().css("styleFloat","none"),IE6?$sub.width(this.opts.subMenusMinWidth?this.opts.subMenusMinWidth:1).children().children("a").css("white-space","nowrap"):($sub.css({width:$sub.hasClass("mega-menu-inner")?$(".box-container").outerWidth()+"px":"auto",minWidth:"",maxWidth:""}).addClass("sm-nowrap"),this.opts.subMenusMinWidth&&$sub.css("min-width",this.opts.subMenusMinWidth));if(this.opts.subMenusMaxWidth){var noMaxWidth=$sub.width();if(IE6){var maxWidth=$sub.css({width:this.opts.subMenusMaxWidth,overflowX:"hidden",overflowY:"hidden"}).width();noMaxWidth>maxWidth?$sub.css({width:maxWidth,overflowX:"visible",overflowY:"visible"}).children().children("a").css("white-space",""):$sub.css({width:noMaxWidth,overflowX:"visible",overflowY:"visible"})}else $sub.hasClass("mega-menu-inner")||$sub.css("max-width",this.opts.subMenusMaxWidth),noMaxWidth>$sub.width()?$sub.removeClass("sm-nowrap").css("width",this.opts.subMenusMaxWidth):$sub.width(noMaxWidth)}else $sub.width($sub.width());$sub.children().css("styleFloat","left")}if($sub.hasClass("mega-menu-inner")&&$("body").hasClass("scrollable-megamenu")&&UNCODE.wwidth>UNCODE.mediaQuery){var $nav=$(".navbar-main"),navH=0,navTop=0,$vmenu=$("body.vmenu .vmenu-container, body.menu-overlay .vmenu-container, body.menu-offcanvas .vmenu-container");if($nav.length&&typeof $nav[0]!="undefined"){var navRect=$nav[0].getBoundingClientRect();navH=navRect.height,navTop=navRect.top}$vmenu.length||$sub.css({maxHeight:UNCODE.wheight-navH})}this.menuPosition($sub),$sub.dataSM("ie-shim")&&$sub.dataSM("ie-shim").insertBefore($sub);var complete=function(){$sub.css("overflow","")};this.isCollapsible()?this.opts.collapsibleShowFunction?this.opts.collapsibleShowFunction.call(this,$sub,complete):$sub.show(this.opts.collapsibleShowDuration,complete):this.opts.showFunction?this.opts.showFunction.call(this,$sub,complete):$sub.show(this.opts.showDuration,complete),this.visibleSubMenus[$sub.dataSM("level")-1]=$sub,this.$root.triggerHandler("show.smapi",$sub[0])}},popupHide:function(noHideTimeout){this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0);var self=this;this.hideTimeout=setTimeout(function(){self.menuHideAll()},noHideTimeout?1:this.opts.hideTimeout)},popupShow:function(left,top){if(!this.opts.isPopup){alert('SmartMenus jQuery Error:\n\nIf you want to show this menu via the "popupShow" method, set the isPopup:true option.');return}this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0),this.menuFixLayout(this.$root),this.$root.stop(!0,!0),this.$root.is(":visible")||(this.$root.css({left:left,top:top}),this.menuIframeShim(this.$root),this.$root.dataSM("ie-shim")&&this.$root.dataSM("ie-shim").css({zIndex:this.$root.css("z-index"),width:this.getWidth(this.$root),height:this.getHeight(this.$root),left:left,top:top}).insertBefore(this.$root),this.opts.showFunction?this.opts.showFunction.call(this,this.$root):this.$root.show(this.opts.showDuration),this.visibleSubMenus[0]=this.$root)},refresh:function(){this.menuHideAll(),this.$root.find("ul").each(function(){var $this=$(this);$this.dataSM("scroll-arrows")&&$this.dataSM("scroll-arrows").remove()}).removeDataSM("in-mega").removeDataSM("shown-before").removeDataSM("ie-shim").removeDataSM("scroll-arrows").removeDataSM("parent-a").removeDataSM("level").removeDataSM("beforefirstshowfired"),this.$root.find("a.has-submenu").removeClass("has-submenu").parent().removeDataSM("sub"),this.opts.subIndicators&&this.$root.find("span.sub-arrow").remove(),this.opts.markCurrentItem&&this.$root.find("a.current").removeClass("current"),this.subMenus=[],this.init(!0)},rootOut:function(e){if(!this.handleEvents()||this.isTouchMode()||e.target==this.$root[0])return;this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0);if(!this.opts.showOnClick||!this.opts.hideOnClick){var self=this;this.hideTimeout=setTimeout(function(){self.menuHideAll()},this.opts.hideTimeout)}},rootOver:function(e){if(!this.handleEvents()||this.isTouchMode()||e.target==this.$root[0])return;this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0)},winResize:function(e){if(!this.handleEvents()){if(this.$disableOverlay){var pos=this.$root.offset();this.$disableOverlay.css({top:pos.top,left:pos.left,width:this.$root.outerWidth(),height:this.$root.outerHeight()})}return}!this.isCollapsible()&&(!("onorientationchange"in window)||e.type=="orientationchange")&&(this.activatedItems.length&&this.activatedItems[this.activatedItems.length-1][0].blur(),this.menuHideAll())}}}),$.fn.dataSM=function(key,val){return val?this.data(key+"_smartmenus",val):this.data(key+"_smartmenus")},$.fn.removeDataSM=function(key){return this.removeData(key+"_smartmenus")},$.fn.smartmenus=function(options){if(typeof options=="string"){var args=arguments,method=options;return Array.prototype.shift.call(args),this.each(function(){var smartmenus=$(this).data("smartmenus");smartmenus&&smartmenus[method]&&smartmenus[method].apply(smartmenus,args)})}var opts=$.extend({},$.fn.smartmenus.defaults,options);return this.each(function(){new $.SmartMenus(this,opts)})},$.fn.smartmenus.defaults={isPopup:!1,mainMenuSubOffsetX:0,mainMenuSubOffsetY:0,subMenusSubOffsetX:0,subMenusSubOffsetY:0,subMenusMinWidth:!1,subMenusMaxWidth:!1,subIndicators:!0,subIndicatorsPos:"prepend",subIndicatorsText:"+",scrollStep:30,scrollInterval:30,scrollAccelerate:!0,showTimeout:250,hideTimeout:500,showDuration:0,showFunction:null,hideDuration:0,hideFunction:function($ul,complete){$ul.fadeOut(200,complete)},collapsibleShowDuration:0,collapsibleShowFunction:function($ul,complete){$ul.slideDown(200,complete)},collapsibleHideDuration:0,collapsibleHideFunction:function($ul,complete){$ul.slideUp(200,complete)},showOnClick:!1,hideOnClick:!0,keepInViewport:!0,keepHighlighted:!0,markCurrentItem:!1,markCurrentTree:!0,rightToLeftSubMenus:!1,bottomToTopSubMenus:!1,overlapControlsInIE:!0}}(jQuery),function(factory){typeof define=="function"&&define.amd?define(["jquery"],function($){return factory($)}):typeof module=="object"&&typeof module.exports=="object"?module.exports=factory(require("jquery")):factory(jQuery)}(function($){function bounceOut(x){var n1=7.5625,d1=2.75;return x<1/d1?n1*x*x:x<2/d1?n1*(x-=1.5/d1)*x+.75:x<2.5/d1?n1*(x-=2.25/d1)*x+.9375:n1*(x-=2.625/d1)*x+.984375}typeof $.easing!="undefined"&&($.easing.jswing=$.easing.swing);var pow=Math.pow,sqrt=Math.sqrt,sin=Math.sin,cos=Math.cos,PI=Math.PI,c1=1.70158,c2=c1*1.525,c3=c1+1,c4=2*PI/3,c5=2*PI/4.5;return $.extend($.easing,{def:"easeOutQuad",swing:function(x){return $.easing[$.easing.def](x)},easeInQuad:function(x){return x*x},easeOutQuad:function(x){return 1-(1-x)*(1-x)},easeInOutQuad:function(x){return x<.5?2*x*x:1-pow(-2*x+2,2)/2},easeInCubic:function(x){return x*x*x},easeOutCubic:function(x){return 1-pow(1-x,3)},easeInOutCubic:function(x){return x<.5?4*x*x*x:1-pow(-2*x+2,3)/2},easeInQuart:function(x){return x*x*x*x},easeOutQuart:function(x){return 1-pow(1-x,4)},easeInOutQuart:function(x){return x<.5?8*x*x*x*x:1-pow(-2*x+2,4)/2},easeInQuint:function(x){return x*x*x*x*x},easeOutQuint:function(x){return 1-pow(1-x,5)},easeInOutQuint:function(x){return x<.5?16*x*x*x*x*x:1-pow(-2*x+2,5)/2},easeInSine:function(x){return 1-cos(x*PI/2)},easeOutSine:function(x){return sin(x*PI/2)},easeInOutSine:function(x){return-(cos(PI*x)-1)/2},easeInExpo:function(x){return x===0?0:pow(2,10*x-10)},easeOutExpo:function(x){return x===1?1:1-pow(2,-10*x)},easeInOutExpo:function(x){return x===0?0:x===1?1:x<.5?pow(2,20*x-10)/2:(2-pow(2,-20*x+10))/2},easeInCirc:function(x){return 1-sqrt(1-pow(x,2))},easeOutCirc:function(x){return sqrt(1-pow(x-1,2))},easeInOutCirc:function(x){return x<.5?(1-sqrt(1-pow(2*x,2)))/2:(sqrt(1-pow(-2*x+2,2))+1)/2},easeInElastic:function(x){return x===0?0:x===1?1:-pow(2,10*x-10)*sin((x*10-10.75)*c4)},easeOutElastic:function(x){return x===0?0:x===1?1:pow(2,-10*x)*sin((x*10-.75)*c4)+1},easeInOutElastic:function(x){return x===0?0:x===1?1:x<.5?-(pow(2,20*x-10)*sin((20*x-11.125)*c5))/2:pow(2,-20*x+10)*sin((20*x-11.125)*c5)/2+1},easeInBack:function(x){return c3*x*x*x-c1*x*x},easeOutBack:function(x){return 1+c3*pow(x-1,3)+c1*pow(x-1,2)},easeInOutBack:function(x){return x<.5?pow(2*x,2)*((c2+1)*2*x-c2)/2:(pow(2*x-2,2)*((c2+1)*(x*2-2)+c2)+2)/2},easeInBounce:function(x){return 1-bounceOut(1-x)},easeOutBounce:bounceOut,easeInOutBounce:function(x){return x<.5?(1-bounceOut(1-2*x))/2:(1+bounceOut(2*x-1))/2}}),$}),function($){function handler(event){var orgEvent=event||window.event,args=[].slice.call(arguments,1),delta=0,returnValue=!0,deltaX=0,deltaY=0;return event=$.event.fix(orgEvent),event.type="mousewheel",orgEvent.wheelDelta&&(delta=orgEvent.wheelDelta/120),orgEvent.detail&&(delta=-orgEvent.detail/3),deltaY=delta,orgEvent.axis!==undefined&&orgEvent.axis===orgEvent.HORIZONTAL_AXIS&&(deltaY=0,deltaX=-1*delta),orgEvent.wheelDeltaY!==undefined&&(deltaY=orgEvent.wheelDeltaY/120),orgEvent.wheelDeltaX!==undefined&&(deltaX=-1*orgEvent.wheelDeltaX/120),args.unshift(event,delta,deltaX,deltaY),($.event.dispatch||$.event.handle).apply(this,args)}var types=["DOMMouseScroll","mousewheel"];if($.event.fixHooks)for(var i=types.length;i;)$.event.fixHooks[types[--i]]=$.event.mouseHooks;$.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var i=types.length;i;)this.addEventListener(types[--i],handler,!1);else this.onmousewheel=handler},teardown:function(){if(this.removeEventListener)for(var i=types.length;i;)this.removeEventListener(types[--i],handler,!1);else this.onmousewheel=null}},$.fn.extend({mousewheel:function(fn){return fn?this.bind("mousewheel",fn):this.trigger("mousewheel")},unmousewheel:function(fn){return this.unbind("mousewheel",fn)}})}(jQuery),function($,window,undefined){function getPixel($element,property){return parseInt($element.css(property),10)||0}function within(number,min,max){return number<min?min:number>max?max:number}function getViewport(){var e=window,a="inner";return"innerWidth"in window||(a="client",e=document.documentElement||document.body),{width:e[a+"Width"],height:e[a+"Height"]}}function removeHash(){var scroll=getScrollXY();history.replaceState({},document.title,window.location.pathname+window.location.search),window.scrollTo(scroll.x,scroll.y)}function doAjax(url,callback){var url="//ilightbox.net/getSource/jsonp.php?url="+encodeURIComponent(url).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A");$.ajax({url:url,dataType:"jsonp"}),iLCallback=function(data){callback.call(this,data)}}function findImageInElement(element){var elements=$("*",element),imagesArr=new Array;return elements.each(function(){var url="",element=this;$(element).css("background-image")!="none"?url=$(element).css("background-image"):typeof $(element).attr("src")!="undefined"&&element.nodeName.toLowerCase()=="img"&&(url=$(element).attr("src"));if(url.indexOf("gradient")==-1){url=url.replace(/url\(\"/g,""),url=url.replace(/url\(/g,""),url=url.replace(/\"\)/g,""),url=url.replace(/\)/g,"");var urls=url.split(",");for(var i=0;i<urls.length;i++)if(urls[i].length>0&&$.inArray(urls[i],imagesArr)==-1){var extra="";browser.msie&&browser.version<9&&(extra="?"+floor(random()*3e3)),imagesArr.push(urls[i]+extra)}}}),imagesArr}function getExtension(URL){if(URL!==null){var ext=URL.indexOf("?")!==-1?URL.split("?")[0]:URL;return ext=ext.split(".").pop().toLowerCase(),ext}}function getTypeByExtension(URL){var type,ext=getExtension(URL);return URL==undefined?!1:(extensions.image.indexOf(ext)!==-1?type="image":extensions.flash.indexOf(ext)!==-1?type="flash":extensions.video.indexOf(ext)!==-1?type="video":ext.substring(0,1)=="#"?type="inline":type="iframe",type)}function percentToValue(percent,total){return parseInt(total/100*percent)}function parseURI(url){var m=String(url).replace(/^\s+|\s+$/g,"").match(/^([^:\/?#]+:)?(\/\/(?:[^:@]*(?::[^:@]*)?@)?(([^:\/?#]*)(?::(\d*))?))?([^?#]*)(\?[^#]*)?(#[\s\S]*)?/);return m?{href:m[0]||"",protocol:m[1]||"",authority:m[2]||"",host:m[3]||"",hostname:m[4]||"",port:m[5]||"",pathname:m[6]||"",search:m[7]||"",hash:m[8]||""}:null}function absolutizeURI(base,href){function removeDotSegments(input){var output=[];return input.replace(/^(\.\.?(\/|$))+/,"").replace(/\/(\.(\/|$))+/g,"/").replace(/\/\.\.$/,"/../").replace(/\/?[^\/]*/g,function(p){p==="/.."?output.pop():output.push(p)}),output.join("").replace(/^\//,input.charAt(0)==="/"?"/":"")}var iL=this;return href=parseURI(href||""),base=parseURI(base||""),!href||!base?null:(href.protocol||base.protocol)+(href.protocol||href.authority?href.authority:base.authority)+removeDotSegments(href.protocol||href.authority||href.pathname.charAt(0)==="/"?href.pathname:href.pathname?(base.authority&&!base.pathname?"/":"")+base.pathname.slice(0,base.pathname.lastIndexOf("/")+1)+href.pathname:base.pathname)+(href.protocol||href.authority||href.pathname?href.search:href.search||base.search)+href.hash}function version_compare(v1,v2,operator){this.php_js=this.php_js||{},this.php_js.ENV=this.php_js.ENV||{};var i=0,x=0,compare=0,vm={dev:-6,alpha:-5,a:-5,beta:-4,b:-4,RC:-3,rc:-3,"#":-2,p:1,pl:1},prepVersion=function(v){return v=(""+v).replace(/[_\-+]/g,"."),v=v.replace(/([^.\d]+)/g,".$1.").replace(/\.{2,}/g,"."),v.length?v.split("."):[-8]},numVersion=function(v){return v?isNaN(v)?vm[v]||-7:parseInt(v,10):0};v1=prepVersion(v1),v2=prepVersion(v2),x=max(v1.length,v2.length);for(i=0;i<x;i++){if(v1[i]==v2[i])continue;v1[i]=numVersion(v1[i]),v2[i]=numVersion(v2[i]);if(v1[i]<v2[i]){compare=-1;break}if(v1[i]>v2[i]){compare=1;break}}if(!operator)return compare;switch(operator){case">":case"gt":return compare>0;case">=":case"ge":return compare>=0;case"<=":case"le":return compare<=0;case"==":case"=":case"eq":return compare===0;case"<>":case"!=":case"ne":return compare!==0;case"":case"<":case"lt":return compare<0;default:return null}}function getScrollXY(){var scrOfX=0,scrOfY=0;return typeof window.pageYOffset=="number"?(scrOfY=window.pageYOffset,scrOfX=window.pageXOffset):document.body&&(document.body.scrollLeft||document.body.scrollTop)?(scrOfY=document.body.scrollTop,scrOfX=document.body.scrollLeft):document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)&&(scrOfY=document.documentElement.scrollTop,scrOfX=document.documentElement.scrollLeft),{x:scrOfX,y:scrOfY}}function AC_QuickTimeVersion(){return gQTGeneratorVersion}function _QTComplain(a,b){b=b.replace("%%",a),alert(b)}function _QTAddAttribute(a,b,c){var d;return d=gTagAttrs[a+b],null==d&&(d=gTagAttrs[b]),null!=d?(0==b.indexOf(a)&&null==c&&(c=b.substring(a.length)),null==c&&(c=b),c+'="'+d+'" '):""}function _QTAddObjectAttr(a,b){return 0==a.indexOf("emb#")?"":(0==a.indexOf("obj#")&&null==b&&(b=a.substring(4)),_QTAddAttribute("obj#",a,b))}function _QTAddEmbedAttr(a,b){return 0==a.indexOf("obj#")?"":(0==a.indexOf("emb#")&&null==b&&(b=a.substring(4)),_QTAddAttribute("emb#",a,b))}function _QTAddObjectParam(a,b){var c,d="",e=b?" />":">";return-1==a.indexOf("emb#")&&(c=gTagAttrs["obj#"+a],null==c&&(c=gTagAttrs[a]),0==a.indexOf("obj#")&&(a=a.substring(4)),null!=c&&(d='  <param name="'+a+'" value="'+c+'"'+e+"\n")),d}function _QTDeleteTagAttrs(){for(var a=0;a<arguments.length;a++){var b=arguments[a];delete gTagAttrs[b],delete gTagAttrs["emb#"+b],delete gTagAttrs["obj#"+b]}}function _QTGenerate(a,b,c){if(4>c.length||0!=c.length%2)return _QTComplain(a,gArgCountErr),"";gTagAttrs=[],gTagAttrs.src=c[0],gTagAttrs.width=c[1],gTagAttrs.height=c[2],gTagAttrs.classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B",gTagAttrs.pluginspage="http://www.apple.com/quicktime/download/",a=c[3];if(null==a||""==a)a="6,0,2,0";gTagAttrs.codebase="http://www.apple.com/qtactivex/qtplugin.cab#version="+a;for(var d,e=4;e<c.length;e+=2)d=c[e].toLowerCase(),a=c[e+1],"name"==d||"id"==d?gTagAttrs.name=a:gTagAttrs[d]=a;c="<object "+_QTAddObjectAttr("classid")+_QTAddObjectAttr("width")+_QTAddObjectAttr("height")+_QTAddObjectAttr("codebase")+_QTAddObjectAttr("name","id")+_QTAddObjectAttr("tabindex")+_QTAddObjectAttr("hspace")+_QTAddObjectAttr("vspace")+_QTAddObjectAttr("border")+_QTAddObjectAttr("align")+_QTAddObjectAttr("class")+_QTAddObjectAttr("title")+_QTAddObjectAttr("accesskey")+_QTAddObjectAttr("noexternaldata")+">\n"+_QTAddObjectParam("src",b),e="  <embed "+_QTAddEmbedAttr("src")+_QTAddEmbedAttr("width")+_QTAddEmbedAttr("height")+_QTAddEmbedAttr("pluginspage")+_QTAddEmbedAttr("name")+_QTAddEmbedAttr("align")+_QTAddEmbedAttr("tabindex"),_QTDeleteTagAttrs("src","width","height","pluginspage","classid","codebase","name","tabindex","hspace","vspace","border","align","noexternaldata","class","title","accesskey");for(d in gTagAttrs)a=gTagAttrs[d],null!=a&&(e+=_QTAddEmbedAttr(d),c+=_QTAddObjectParam(d,b));return c+e+"> </embed>\n</object>"}function QT_GenerateOBJECTText(){return _QTGenerate("QT_GenerateOBJECTText",!1,arguments)}var extensions={flash:["swf"],image:["bmp","gif","jpeg","jpg","png","tiff","tif","jfif","jpe","webp"],iframe:["asp","aspx","cgi","cfm","htm","html","jsp","php","pl","php3","php4","php5","phtml","rb","rhtml","shtml","txt"],video:["avi","mov","mpg","mpeg","movie","mp4","webm","ogv","ogg","3gp","m4v"]},$win=$(window),$doc=$(document),browser,transform,gpuAcceleration,fullScreenApi="",userAgent=navigator.userAgent||navigator.vendor||window.opera,supportTouch="ontouchstart"in window||navigator.msMaxTouchPoints||navigator.maxTouchPoints&&navigator.userAgent.indexOf("Windows")>-1,ishybrid=navigator.maxTouchPoints&&navigator.userAgent.indexOf("Windows")>-1,isMobile=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm(os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(userAgent)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s)|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp(i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac(|\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt(|\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg(g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v)|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v)|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-|)|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(userAgent.substr(0,4)),clickEvent=ishybrid?"itap.iLightBox click.iLightBox":supportTouch?"itap.iLightBox":"click.iLightBox",touchStartEvent=ishybrid?"touchstart.iLightBox mousedown.iLightBox":supportTouch?"touchstart.iLightBox":"mousedown.iLightBox",touchStopEvent=ishybrid?"touchend.iLightBox mouseup.iLightBox":supportTouch?"touchend.iLightBox":"mouseup.iLightBox",touchMoveEvent=ishybrid?"touchmove.iLightBox mousemove.iLightBox":supportTouch?"touchmove.iLightBox":"mousemove.iLightBox",abs=Math.abs,sqrt=Math.sqrt,round=Math.round,max=Math.max,min=Math.min,floor=Math.floor,random=Math.random,pluginspages={quicktime:"http://www.apple.com/quicktime/download",flash:"http://www.adobe.com/go/getflash"},iLightBox=function(el,options,items,instant){var iL=this;iL.options=options,iL.selector=options.selector||el,iL.context=document,iL.instant=instant,items.length<1?iL.attachItems():iL.items=items,iL.vars={total:iL.items.length,start:0,current:null,next:null,prev:null,BODY:$("body"),loadRequests:0,overlay:$('<div class="ilightbox-overlay"></div>'),loader:$('<div class="ilightbox-loader"><div></div></div>'),toolbar:$('<div class="ilightbox-toolbar"></div>'),innerToolbar:$('<div class="ilightbox-inner-toolbar"></div>'),title:$('<div class="ilightbox-title"></div>'),closeButton:$('<a class="ilightbox-close" title="'+iL.options.text.close+'"></a>'),fullScreenButton:$('<a class="ilightbox-fullscreen" title="'+iL.options.text.enterFullscreen+'"></a>'),innerPlayButton:$('<a class="ilightbox-play" title="'+iL.options.text.slideShow+'"></a>'),innerNextButton:$('<a class="ilightbox-next-button" title="'+iL.options.text.next+'"></a>'),innerPrevButton:$('<a class="ilightbox-prev-button" title="'+iL.options.text.previous+'"></a>'),holder:$('<div class="ilightbox-holder'+(supportTouch?" supportTouch":"")+'" ondragstart="return false;"><div class="ilightbox-container"></div></div>'),nextPhoto:$('<div class="ilightbox-holder'+(supportTouch?" supportTouch":"")+' ilightbox-next" ondragstart="return false;"><div class="ilightbox-container"></div></div>'),prevPhoto:$('<div class="ilightbox-holder'+(supportTouch?" supportTouch":"")+' ilightbox-prev" ondragstart="return false;"><div class="ilightbox-container"></div></div>'),nextButton:$('<a class="ilightbox-button ilightbox-next-button" ondragstart="return false;" title="'+iL.options.text.next+'"><span></span></a>'),prevButton:$('<a class="ilightbox-button ilightbox-prev-button" ondragstart="return false;" title="'+iL.options.text.previous+'"><span></span></a>'),thumbnails:$('<div class="ilightbox-thumbnails" ondragstart="return false;"><div class="ilightbox-thumbnails-container"><a class="ilightbox-thumbnails-dragger"></a><div class="ilightbox-thumbnails-grid"></div></div></div>'),thumbs:!1,nextLock:!1,prevLock:!1,hashLock:!1,isMobile:!1,mobileMaxWidth:980,isInFullScreen:!1,isSwipe:!1,mouseID:0,cycleID:0,isPaused:0,captionHeight:39},iL.vars.hideableElements=iL.vars.nextButton.add(iL.vars.prevButton),iL.normalizeItems(),iL.availPlugins(),iL.options.startFrom=iL.options.startFrom>0&&iL.options.startFrom>=iL.vars.total?iL.vars.total-1:iL.options.startFrom,iL.options.startFrom=iL.options.randomStart?floor(random()*iL.vars.total):iL.options.startFrom,iL.vars.start=iL.options.startFrom,instant?iL.instantCall():iL.patchItemsEvents(),iL.options.linkId&&(iL.hashChangeHandler(),$win.iLightBoxHashChange(function(){iL.hashChangeHandler()}));if(supportTouch){var RegExp=/(click|mouseenter|mouseleave|mouseover|mouseout)/ig,replace="itap";iL.options.caption.show=iL.options.caption.show.replace(RegExp,replace),iL.options.caption.hide=iL.options.caption.hide.replace(RegExp,replace),iL.options.social.show=iL.options.social.show.replace(RegExp,replace),iL.options.social.hide=iL.options.social.hide.replace(RegExp,replace)}(iL.options.controls.arrows||$(window).width()<UNCODE.mediaQuery)&&$.extend(iL.options.styles,{nextOffsetX:$(window).width()>UNCODE.mediaQuery?36:4,prevOffsetX:$(window).width()>UNCODE.mediaQuery?36:4,nextOpacity:0,prevOpacity:0})};iLightBox.prototype={showLoader:function(){var iL=this;iL.vars.loadRequests+=1,iL.options.path.toLowerCase()=="horizontal"?iL.vars.loader.addClass("ilightbox-show").stop().animate({opacity:"1"},iL.options.show.speed,"easeOutCirc"):iL.vars.loader.addClass("ilightbox-show").stop().animate({opacity:"1"},iL.options.show.speed,"easeOutCirc")},hideLoader:function(){var iL=this;iL.vars.loadRequests-=1,iL.vars.loadRequests=iL.vars.loadRequests<0?0:iL.vars.loadRequests,iL.options.path.toLowerCase()=="horizontal"?iL.vars.loadRequests<=0&&iL.vars.loader.removeClass("ilightbox-show").stop().animate({opacity:"0"},iL.options.show.speed,"easeInCirc"):iL.vars.loadRequests<=0&&iL.vars.loader.removeClass("ilightbox-show").stop().animate({opacity:"0"},iL.options.show.speed,"easeInCirc")},createUI:function(){var iL=this;iL.ui={currentElement:iL.vars.holder,nextElement:iL.vars.nextPhoto,prevElement:iL.vars.prevPhoto,currentItem:iL.vars.current,nextItem:iL.vars.next,prevItem:iL.vars.prev,hide:function(){iL.closeAction()},refresh:function(){arguments.length>0?iL.repositionPhoto(!0):iL.repositionPhoto()},fullscreen:function(){iL.fullScreenAction()}}},attachItems:function(){var iL=this,itemsObject=new Array,items=new Array;$(iL.selector,iL.context).each(function(){var t=$(this),URL=t.attr(iL.options.attr)||null,options=t.data("options")&&eval("({"+t.data("options")+"})")||{},caption=t.data("caption"),title=t.data("title"),type=t.data("type")||getTypeByExtension(URL),clone=t.data("lbox-clone")||!1;if(type===!1)return;if(t.data("lbox-clone")!=undefined)return;if(typeof t.attr("data-album")!="undefined"&&t.attr("data-album")!=""){var ALBUM_URLS=JSON.parse(t.attr("data-album")),URL_i,URLS_LENGHT=ALBUM_URLS.length;for(URL_i=0;URL_i<URLS_LENGHT;URL_i++)if(typeof ALBUM_URLS[URL_i].url!="undefined"&&ALBUM_URLS[URL_i].url!=""){var item_opts="width:"+ALBUM_URLS[URL_i].width+",height:"+ALBUM_URLS[URL_i].height+",thumbnail: '"+ALBUM_URLS[URL_i].thumbnail+"'";item_opts=item_opts&&eval("({"+item_opts+"})")||{},items.push({URL:ALBUM_URLS[URL_i].url,caption:ALBUM_URLS[URL_i].caption,title:ALBUM_URLS[URL_i].title,type:getTypeByExtension(ALBUM_URLS[URL_i].url),options:item_opts,clone:clone});var newT=t;newT.attr("href",ALBUM_URLS[URL_i].url),iL.instant||itemsObject.push(newT)}}else items.push({URL:URL,caption:caption,title:title,type:type,options:options,clone:clone});iL.vars!=undefined&&(iL.vars.total=items.length),iL.instant||itemsObject.push(t)}),iL.items=items,iL.itemsObject=itemsObject},normalizeItems:function(){var iL=this,newItems=new Array;$.each(iL.items,function(key,val){typeof val=="string"&&(val={url:val});var URL=val.url||val.URL||null,options=val.options||{},caption=val.caption||null,title=val.title||null,type=val.type?val.type.toLowerCase():getTypeByExtension(URL),ext=typeof URL!="object"?getExtension(URL):"";options.thumbnail=options.thumbnail||(type=="image"?URL:null),options.videoType=options.videoType||null,options.skin=options.skin||iL.options.skin,options.width=options.width||null,options.height=options.height||null,options.mousewheel=typeof options.mousewheel!="undefined"?options.mousewheel:!0,options.swipe=typeof options.swipe!="undefined"?options.swipe:!0,options.social=typeof options.social!="undefined"?options.social:iL.options.social.buttons&&$.extend({},{},iL.options.social.buttons),type=="video"&&(options.html5video=typeof options.html5video!="undefined"?options.html5video:{},options.html5video.webm=options.html5video.webm||options.html5video.WEBM||null,options.html5video.controls=typeof options.html5video.controls!="undefined"?options.html5video.controls:"controls",options.html5video.preload=options.html5video.preload||"metadata",options.html5video.autoplay=typeof options.html5video.autoplay!="undefined"?options.html5video.autoplay:!1,options.html5video.loop=typeof options.html5video.loop!="undefined"?options.html5video.loop:!1);if(!options.width||!options.height)type=="video"?(options.width=1280,options.height=720):type=="iframe"?(options.width="100%",options.height="90%"):type=="flash"&&(options.width=1280,options.height=720);delete val.url,val.index=key,val.URL=URL,val.caption=caption,val.title=title,val.type=type,val.options=options,val.ext=ext,newItems.push(val)}),iL.items=newItems},instantCall:function(){var iL=this,key=iL.vars.start;iL.vars.current=key,iL.vars.next=iL.items[key+1]?key+1:null,iL.vars.prev=iL.items[key-1]?key-1:null,iL.addContents(),iL.patchEvents()},addContents:function(){var iL=this,vars=iL.vars,opts=iL.options,viewport=getViewport(),path=opts.path.toLowerCase(),recognizingItems=vars.total>0&&iL.items.filter(function(e,i,arr){return["image","flash","video"].indexOf(e.type)===-1&&typeof e.recognized=="undefined"&&(opts.smartRecognition||e.options.smartRecognition)}),needRecognition=recognizingItems.length>0;opts.mobileOptimizer&&!opts.innerToolbar&&(vars.isMobile=viewport.width<=vars.mobileMaxWidth),vars.overlay.addClass(opts.skin).hide().css("opacity",opts.overlay.opacity),opts.linkId&&vars.overlay[0].setAttribute("linkid",opts.linkId),opts.controls.toolbar&&(vars.toolbar.addClass(opts.skin).append(vars.closeButton),opts.controls.fullscreen&&vars.toolbar.append(vars.fullScreenButton),opts.controls.slideshow&&vars.toolbar.append(vars.innerPlayButton),vars.total>1&&vars.toolbar.append(vars.innerPrevButton).append(vars.innerNextButton)),vars.BODY.addClass("ilightbox-noscroll").append(vars.overlay).append(vars.loader).append(vars.holder).append(vars.nextPhoto).append(vars.prevPhoto),opts.innerToolbar||vars.BODY.append(vars.toolbar),opts.controls.arrows&&vars.BODY.append(vars.nextButton).append(vars.prevButton),opts.controls.thumbnail&&vars.total>1&&(vars.BODY.append(vars.thumbnails),vars.thumbnails.addClass(opts.skin).addClass("ilightbox-"+path),$("div.ilightbox-thumbnails-grid",vars.thumbnails).empty(),vars.thumbs=!0);var loaderCss=opts.path.toLowerCase()=="horizontal"?{left:parseInt(viewport.width/2-vars.loader.outerWidth()/2)}:{top:parseInt(viewport.height/2-vars.loader.outerHeight()/2)};vars.loader.addClass(opts.skin).css(loaderCss),vars.nextButton.add(vars.prevButton).addClass(opts.skin),path=="horizontal"&&vars.loader.add(vars.nextButton).add(vars.prevButton).addClass("horizontal"),vars.BODY[vars.isMobile?"addClass":"removeClass"]("isMobile"),opts.infinite||(vars.prevButton.add(vars.prevButton).add(vars.innerPrevButton).add(vars.innerNextButton).removeClass("disabled"),vars.current==0&&vars.prevButton.add(vars.innerPrevButton).addClass("disabled"),vars.current>=vars.total-1&&vars.nextButton.add(vars.innerNextButton).addClass("disabled")),opts.show.effect?(vars.overlay.stop().fadeIn(opts.show.speed),vars.toolbar.stop().fadeIn(opts.show.speed)):(vars.overlay.show(),vars.toolbar.show());var length=recognizingItems.length;needRecognition?(iL.showLoader(),$.each(recognizingItems,function(key,val){var resultFnc=function(result){var key=-1,filter=iL.items.filter(function(e,i,arr){return e.URL==result.url&&(key=i),e.URL==result.url}),self=iL.items[key];result&&$.extend(!0,self,{URL:result.source,type:result.type,recognized:!0,options:{html5video:result.html5video,width:result.type=="image"?0:result.width||self.width,height:result.type=="image"?0:result.height||self.height,thumbnail:self.options.thumbnail||result.thumbnail}}),length--,length==0&&(iL.hideLoader(),vars.dontGenerateThumbs=!1,iL.generateThumbnails(),opts.show.effect?setTimeout(function(){iL.generateBoxes()},opts.show.speed):iL.generateBoxes())};iL.ogpRecognition(this,resultFnc)})):opts.show.effect?setTimeout(function(){iL.generateBoxes()},opts.show.speed):iL.generateBoxes(),iL.createUI(),window.iLightBox={close:function(){iL.closeAction()},fullscreen:function(){iL.fullScreenAction()},moveNext:function(){iL.moveTo("next")},movePrev:function(){iL.moveTo("prev")},goTo:function(index){iL.goTo(index)},refresh:function(){iL.refresh()},reposition:function(){arguments.length>0?iL.repositionPhoto(!0):iL.repositionPhoto()},setOption:function(options){iL.setOption(options)},destroy:function(){iL.closeAction(),iL.dispatchItemsEvents()}},opts.linkId&&(vars.hashLock=!0,window.location.hash=opts.linkId+"/"+vars.current,setTimeout(function(){vars.hashLock=!1},55)),opts.slideshow.startPaused||(iL.resume(),vars.innerPlayButton.removeClass("ilightbox-play").addClass("ilightbox-pause")),typeof iL.options.callback.onOpen=="function"&&iL.options.callback.onOpen.call(iL)},loadContent:function(obj,opt,speed){var iL=this,holder,item;iL.createUI(),obj.speed=speed||iL.options.effects.loadedFadeSpeed,opt=="current"&&(obj.options.mousewheel?iL.vars.lockWheel=!1:iL.vars.lockWheel=!0,obj.options.swipe?iL.vars.lockSwipe=!1:iL.vars.lockSwipe=!0);switch(opt){case"current":holder=iL.vars.holder,item=iL.vars.current;break;case"next":holder=iL.vars.nextPhoto,item=iL.vars.next;break;case"prev":holder=iL.vars.prevPhoto,item=iL.vars.prev}holder.removeAttr("style class").addClass("ilightbox-holder"+(supportTouch?" supportTouch":"")).addClass(obj.options.skin),$("div.ilightbox-inner-toolbar",holder).remove();if(obj.title||iL.options.innerToolbar){var innerToolbar=iL.vars.innerToolbar.clone();if(obj.title&&iL.options.show.title){var title=iL.vars.title.clone();title.empty().html(obj.title),innerToolbar.append(title)}iL.options.innerToolbar&&innerToolbar.append(iL.vars.total>1?iL.vars.toolbar.clone():iL.vars.toolbar),holder.prepend(innerToolbar)}iL.loadSwitcher(obj,holder,item,opt)},loadSwitcher:function(obj,holder,item,opt){var iL=this,opts=iL.options,api={element:holder,position:item};switch(obj.type){case"image":typeof opts.callback.onBeforeLoad=="function"&&opts.callback.onBeforeLoad.call(iL,iL.ui,item),typeof obj.options.onBeforeLoad=="function"&&obj.options.onBeforeLoad.call(iL,api),iL.loadImage(obj.URL,function(img){typeof opts.callback.onAfterLoad=="function"&&opts.callback.onAfterLoad.call(iL,iL.ui,item),typeof obj.options.onAfterLoad=="function"&&obj.options.onAfterLoad.call(iL,api);var width=img?img.width:400,height=img?img.height:200;holder.data({naturalWidth:width,naturalHeight:height}),$("div.ilightbox-container",holder).empty().append(img?'<img src="'+obj.URL+'" class="ilightbox-image" />':'<span class="ilightbox-alert">'+opts.errors.loadImage+"</span>"),typeof opts.callback.onRender=="function"&&opts.callback.onRender.call(iL,iL.ui,item),typeof obj.options.onRender=="function"&&obj.options.onRender.call(iL,api),iL.configureHolder(obj,opt,holder)});break;case"video":holder.data({naturalWidth:obj.options.width,naturalHeight:obj.options.height}),opt==="current"?(iL.addContent(holder,obj),typeof opts.callback.onRender=="function"&&opts.callback.onRender.call(iL,iL.ui,item),typeof obj.options.onRender=="function"&&obj.options.onRender.call(iL,api)):$("div.ilightbox-container",holder).empty(),iL.configureHolder(obj,opt,holder);break;case"iframe":holder.data({naturalWidth:obj.options.width,naturalHeight:obj.options.height}),iL.configureHolder(obj,opt,holder);if(opt==="current"){var el=iL.addContent(holder,obj);typeof opts.callback.onRender=="function"&&opts.callback.onRender.call(iL,iL.ui,item),typeof obj.options.onRender=="function"&&obj.options.onRender.call(iL,api),typeof opts.callback.onBeforeLoad=="function"&&opts.callback.onBeforeLoad.call(iL,iL.ui,item),typeof obj.options.onBeforeLoad=="function"&&obj.options.onBeforeLoad.call(iL,api),el.bind("load",function(){typeof opts.callback.onAfterLoad=="function"&&opts.callback.onAfterLoad.call(iL,iL.ui,item),typeof obj.options.onAfterLoad=="function"&&obj.options.onAfterLoad.call(iL,api),el.unbind("load")})}else $("div.ilightbox-container",holder).empty();break;case"inline":var el=$(obj.URL),content=iL.addContent(holder,obj),images=findImageInElement(holder);holder.data({naturalWidth:iL.items[item].options.width||el.outerWidth(),naturalHeight:iL.items[item].options.height||el.outerHeight()}),content.children().eq(0).show(),typeof opts.callback.onRender=="function"&&opts.callback.onRender.call(iL,iL.ui,item),typeof obj.options.onRender=="function"&&obj.options.onRender.call(iL,api),typeof opts.callback.onBeforeLoad=="function"&&opts.callback.onBeforeLoad.call(iL,iL.ui,item),typeof obj.options.onBeforeLoad=="function"&&obj.options.onBeforeLoad.call(iL,api),iL.loadImage(images,function(){typeof opts.callback.onAfterLoad=="function"&&opts.callback.onAfterLoad.call(iL,iL.ui,item),typeof obj.options.onAfterLoad=="function"&&obj.options.onAfterLoad.call(iL,api),iL.configureHolder(obj,opt,holder)});break;case"flash":var el=iL.addContent(holder,obj);holder.data({naturalWidth:iL.items[item].options.width||el.outerWidth(),naturalHeight:iL.items[item].options.height||el.outerHeight()}),typeof opts.callback.onRender=="function"&&opts.callback.onRender.call(iL,iL.ui,item),typeof obj.options.onRender=="function"&&obj.options.onRender.call(iL,api),iL.configureHolder(obj,opt,holder);break;case"ajax":var ajax=obj.options.ajax||{};typeof opts.callback.onBeforeLoad=="function"&&opts.callback.onBeforeLoad.call(iL,iL.ui,item),typeof obj.options.onBeforeLoad=="function"&&obj.options.onBeforeLoad.call(iL,api),iL.showLoader(),$.ajax({url:obj.URL||opts.ajaxSetup.url,data:ajax.data||null,dataType:ajax.dataType||"html",type:ajax.type||opts.ajaxSetup.type,cache:ajax.cache||opts.ajaxSetup.cache,crossDomain:ajax.crossDomain||opts.ajaxSetup.crossDomain,global:ajax.global||opts.ajaxSetup.global,ifModified:ajax.ifModified||opts.ajaxSetup.ifModified,username:ajax.username||opts.ajaxSetup.username,password:ajax.password||opts.ajaxSetup.password,beforeSend:ajax.beforeSend||opts.ajaxSetup.beforeSend,complete:ajax.complete||opts.ajaxSetup.complete,success:function(data,textStatus,jqXHR){iL.hideLoader();var el=$(data),container=$("div.ilightbox-container",holder),elWidth=iL.items[item].options.width||parseInt(el[0].getAttribute("width")),elHeight=iL.items[item].options.height||parseInt(el[0].getAttribute("height")),css=el[0].getAttribute("width")&&el[0].getAttribute("height")?{overflow:"hidden"}:{};container.empty().append($('<div class="ilightbox-wrapper"></div>').css(css).html(el)),holder.show().data({naturalWidth:elWidth||container.outerWidth(),naturalHeight:elHeight||container.outerHeight()}).hide(),typeof opts.callback.onRender=="function"&&opts.callback.onRender.call(iL,iL.ui,item),typeof obj.options.onRender=="function"&&obj.options.onRender.call(iL,api);var images=findImageInElement(holder);iL.loadImage(images,function(){typeof opts.callback.onAfterLoad=="function"&&opts.callback.onAfterLoad.call(iL,iL.ui,item),typeof obj.options.onAfterLoad=="function"&&obj.options.onAfterLoad.call(iL,api),iL.configureHolder(obj,opt,holder)}),opts.ajaxSetup.success(data,textStatus,jqXHR),typeof ajax.success=="function"&&ajax.success(data,textStatus,jqXHR)},error:function(jqXHR,textStatus,errorThrown){typeof opts.callback.onAfterLoad=="function"&&opts.callback.onAfterLoad.call(iL,iL.ui,item),typeof obj.options.onAfterLoad=="function"&&obj.options.onAfterLoad.call(iL,api),iL.hideLoader(),$("div.ilightbox-container",holder).empty().append('<span class="ilightbox-alert">'+opts.errors.loadContents+"</span>"),iL.configureHolder(obj,opt,holder),opts.ajaxSetup.error(jqXHR,textStatus,errorThrown),typeof ajax.error=="function"&&ajax.error(jqXHR,textStatus,errorThrown)}});break;case"html":var object=obj.URL,el;container=$("div.ilightbox-container",holder);if(object[0].nodeName)el=object.clone();else{var dom=$(object);dom.selector?el=$("<div>"+dom+"</div>"):el=dom}var elWidth=iL.items[item].options.width||parseInt(el.attr("width")),elHeight=iL.items[item].options.height||parseInt(el.attr("height"));iL.addContent(holder,obj),el.appendTo(document.documentElement).hide(),typeof opts.callback.onRender=="function"&&opts.callback.onRender.call(iL,iL.ui,item),typeof obj.options.onRender=="function"&&obj.options.onRender.call(iL,api);var images=findImageInElement(holder);typeof opts.callback.onBeforeLoad=="function"&&opts.callback.onBeforeLoad.call(iL,iL.ui,item),typeof obj.options.onBeforeLoad=="function"&&obj.options.onBeforeLoad.call(iL,api),iL.loadImage(images,function(){typeof opts.callback.onAfterLoad=="function"&&opts.callback.onAfterLoad.call(iL,iL.ui,item),typeof obj.options.onAfterLoad=="function"&&obj.options.onAfterLoad.call(iL,api),holder.show().data({naturalWidth:elWidth||container.outerWidth(),naturalHeight:elHeight||container.outerHeight()}).hide(),el.remove(),iL.configureHolder(obj,opt,holder)})}},configureHolder:function(obj,opt,holder){var iL=this,vars=iL.vars,opts=iL.options;opt!="current"&&(opt=="next"?holder.addClass("ilightbox-next"):holder.addClass("ilightbox-prev"));if(opt=="current")var item=vars.current;else if(opt=="next")var opacity=opts.styles.nextOpacity,item=vars.next;else var opacity=opts.styles.prevOpacity,item=vars.prev;var api={element:holder,position:item};iL.items[item].options.width=iL.items[item].options.width||0,iL.items[item].options.height=iL.items[item].options.height||0,opt=="current"?opts.show.effect?holder.css(transform,gpuAcceleration).fadeIn(obj.speed,function(){holder.css(transform,"");if(obj.caption){iL.setCaption(obj,holder);var caption=$("div.ilightbox-caption",holder),percent=parseInt(caption.outerHeight()/holder.outerHeight()*100);opts.caption.start&percent<=50&&caption.fadeIn(opts.effects.fadeSpeed)}var social=obj.options.social;social&&(iL.setSocial(social,obj.URL,holder),opts.social.start&&$("div.ilightbox-social",holder).fadeIn(opts.effects.fadeSpeed)),iL.generateThumbnails(),typeof opts.callback.onShow=="function"&&opts.callback.onShow.call(iL,iL.ui,item),typeof obj.options.onShow=="function"&&obj.options.onShow.call(iL,api)}):(holder.show(),iL.generateThumbnails(),typeof opts.callback.onShow=="function"&&opts.callback.onShow.call(iL,iL.ui,item),typeof obj.options.onShow=="function"&&obj.options.onShow.call(iL,api)):opts.show.effect?holder.fadeTo(obj.speed,opacity,function(){opt=="next"?vars.nextLock=!1:vars.prevLock=!1,iL.generateThumbnails(),typeof opts.callback.onShow=="function"&&opts.callback.onShow.call(iL,iL.ui,item),typeof obj.options.onShow=="function"&&obj.options.onShow.call(iL,api)}):(holder.css({opacity:opacity}).show(),opt=="next"?vars.nextLock=!1:vars.prevLock=!1,iL.generateThumbnails(),typeof opts.callback.onShow=="function"&&opts.callback.onShow.call(iL,iL.ui,item),typeof obj.options.onShow=="function"&&obj.options.onShow.call(iL,api)),setTimeout(function(){iL.repositionPhoto()},0)},generateBoxes:function(){var iL=this,vars=iL.vars,opts=iL.options;opts.infinite&&vars.total>=3?(vars.current==vars.total-1&&(vars.next=0),vars.current==0&&(vars.prev=vars.total-1)):opts.infinite=!1,typeof iL.items[vars.current]=="undefined"&&(vars.current=0),iL.loadContent(iL.items[vars.current],"current",opts.show.speed),iL.items[vars.next]&&iL.loadContent(iL.items[vars.next],"next",opts.show.speed),iL.items[vars.prev]&&iL.loadContent(iL.items[vars.prev],"prev",opts.show.speed)},generateThumbnails:function(){var iL=this,vars=iL.vars,opts=iL.options,timeOut=null;if(vars.thumbs&&!iL.vars.dontGenerateThumbs){var thumbnails=vars.thumbnails,container=$("div.ilightbox-thumbnails-container",thumbnails),grid=$("div.ilightbox-thumbnails-grid",container),i=0;grid.removeAttr("style").empty(),$.each(iL.items,function(key,val){var isActive=vars.current==key?"ilightbox-active":"",opacity=vars.current==key?opts.thumbnails.activeOpacity:opts.thumbnails.normalOpacity,thumb=val.options.thumbnail,thumbnail=$('<div class="ilightbox-thumbnail"></div>'),icon=$('<div class="ilightbox-thumbnail-icon"></div>');thumbnail.css({opacity:0}).addClass(isActive),val.type!="video"&&val.type!="flash"||typeof val.options.icon!="undefined"?val.options.icon&&(icon.addClass("ilightbox-thumbnail-"+val.options.icon),thumbnail.append(icon)):(icon.addClass("ilightbox-thumbnail-video"),thumbnail.append(icon)),thumb&&iL.loadImage(thumb,function(img){i++,img?thumbnail.data({naturalWidth:img.width,naturalHeight:img.height}).append('<img src="'+thumb+'" border="0" />'):thumbnail.data({naturalWidth:opts.thumbnails.maxWidth,naturalHeight:opts.thumbnails.maxHeight}),clearTimeout(timeOut),timeOut=setTimeout(function(){iL.positionThumbnails(thumbnails,container,grid)},20),setTimeout(function(){thumbnail.fadeTo(opts.effects.loadedFadeSpeed,opacity)},i*20)}),grid.append(thumbnail)}),iL.vars.dontGenerateThumbs=!0}},positionThumbnails:function(thumbnails,container,grid){var iL=this,vars=iL.vars,opts=iL.options,viewport=getViewport(),path=opts.path.toLowerCase();thumbnails||(thumbnails=vars.thumbnails),container||(container=$("div.ilightbox-thumbnails-container",thumbnails)),grid||(grid=$("div.ilightbox-thumbnails-grid",container));var thumbs=$(".ilightbox-thumbnail",grid),widthAvail=path=="horizontal"?viewport.width-opts.styles.pageOffsetX:thumbs.eq(0).outerWidth()-opts.styles.pageOffsetX,heightAvail=path=="horizontal"?thumbs.eq(0).outerHeight()-opts.styles.pageOffsetY:viewport.height-opts.styles.pageOffsetY,gridWidth=path=="horizontal"?0:widthAvail,gridHeight=path=="horizontal"?heightAvail:0,active=$(".ilightbox-active",grid),gridCss={},css={};arguments.length<3&&(thumbs.css({opacity:opts.thumbnails.normalOpacity}),active.css({opacity:opts.thumbnails.activeOpacity})),thumbs.each(function(i){var t=$(this),data=t.data(),width=path=="horizontal"?0:opts.thumbnails.maxWidth;height=path=="horizontal"?opts.thumbnails.maxHeight:0,dims=iL.getNewDimenstions(width,height,data.naturalWidth,data.naturalHeight,!0),t.css({width:dims.width,height:dims.height}),path=="horizontal"&&t.css({"float":"left"}),path=="horizontal"?gridWidth+=t.outerWidth():gridHeight+=t.outerHeight()}),gridCss={width:gridWidth,height:gridHeight},grid.css(gridCss),gridCss={};var gridOffset=grid.offset(),activeOffset=active.length?active.offset():{top:parseInt(heightAvail/2),left:parseInt(widthAvail/2)};gridOffset.top=gridOffset.top-$doc.scrollTop(),gridOffset.left=gridOffset.left-$doc.scrollLeft(),activeOffset.top=activeOffset.top-gridOffset.top-$doc.scrollTop(),activeOffset.left=activeOffset.left-gridOffset.left-$doc.scrollLeft(),path=="horizontal"?(gridCss.top=0,gridCss.left=parseInt(widthAvail/2-activeOffset.left-active.outerWidth()/2)):(gridCss.top=parseInt(heightAvail/2-activeOffset.top-active.outerHeight()/2),gridCss.left=0),arguments.length<3?grid.stop().animate(gridCss,opts.effects.repositionSpeed,"easeOutCirc"):grid.css(gridCss)},loadImage:function(image,callback){$.isArray(image)||(image=[image]);var iL=this,length=image.length;length>0?(iL.showLoader(),$.each(image,function(index,value){var img=new Image;img.onload=function(){length-=1,length==0&&(iL.hideLoader(),callback(img))},img.onerror=img.onabort=function(){length-=1,length==0&&(iL.hideLoader(),callback(!1))},img.src=image[index]})):callback(!1)},patchItemsEvents:function(){var iL=this,vars=iL.vars,clickEvent=ishybrid?"itap.iL click.iL":supportTouch?"itap.iL":"click.iL",vEvent=ishybrid?"click.iL itap.iL":supportTouch?"click.iL":"itap.iL";if(iL.context&&iL.selector){var $items=$(iL.selector,iL.context);$(iL.context).on(clickEvent,iL.selector,function(){var $this=$(this),key=typeof $(this).data("lb-index")!=""&&$(this).closest(".owl-item").length?$(this).data("lb-index"):$items.index($this);if(UNCODE.isMobile){var isCarousel=$this.closest(".owl-carousel");if(isCarousel.length&&isCarousel.hasClass("owl-translating"))return!1}return vars.current=key,vars.next=iL.items[key+1]?key+1:null,vars.prev=iL.items[key-1]?key-1:null,vars.BODY.hasClass("fp-slide-scrolling")?!1:(iL.addContents(),iL.patchEvents(),!1)}).on(vEvent,iL.selector,function(){return!1})}else $.each(iL.itemsObject,function(key,val){val.on(clickEvent,function(){return vars.current=key,vars.next=iL.items[key+1]?key+1:null,vars.prev=iL.items[key-1]?key-1:null,iL.addContents(),iL.patchEvents(),!1}).on(vEvent,function(){return!1})})},dispatchItemsEvents:function(){var iL=this,vars=iL.vars,opts=iL.options;iL.context&&iL.selector?$(iL.context).off(".iL",iL.selector):$.each(iL.itemsObject,function(key,val){val.off(".iL")})},refresh:function(){var iL=this;iL.dispatchItemsEvents(),iL.attachItems(),iL.normalizeItems(),iL.patchItemsEvents()},patchEvents:function(){function mouseMoveHandler(e){vars.isMobile||(vars.mouseID||vars.hideableElements.show(),vars.mouseID=clearTimeout(vars.mouseID),buttonsArray.indexOf(e.target)===-1&&(vars.mouseID=setTimeout(function(){vars.hideableElements.hide(),vars.mouseID=clearTimeout(vars.mouseID)},3e3)))}var iL=this,vars=iL.vars,opts=iL.options,path=opts.path.toLowerCase(),holders=$(".ilightbox-holder"),fullscreenEvent=fullScreenApi.fullScreenEventName+".iLightBox",durationThreshold=1e3,horizontalDistanceThreshold=verticalDistanceThreshold=100,buttonsArray=[vars.nextButton[0],vars.prevButton[0],vars.nextButton[0].firstChild,vars.prevButton[0].firstChild];$win.bind("resize.iLightBox",function(){var viewport=getViewport();opts.mobileOptimizer&&!opts.innerToolbar&&(vars.isMobile=viewport.width<=vars.mobileMaxWidth),vars.BODY[vars.isMobile?"addClass":"removeClass"]("isMobile"),iL.repositionPhoto(null),supportTouch&&(clearTimeout(vars.setTime),vars.setTime=setTimeout(function(){var scrollTop=getScrollXY().y;window.scrollTo(0,scrollTop-30),window.scrollTo(0,scrollTop+30),window.scrollTo(0,scrollTop)},2e3)),vars.thumbs&&iL.positionThumbnails()}).bind("keydown.iLightBox",function(event){if(opts.controls.keyboard)switch(event.keyCode){case 13:event.shiftKey&&opts.keyboard.shift_enter&&iL.fullScreenAction();break;case 27:opts.keyboard.esc&&iL.closeAction();break;case 37:opts.keyboard.left&&!vars.lockKey&&iL.moveTo("prev");break;case 38:opts.keyboard.up&&!vars.lockKey&&iL.moveTo("prev");break;case 39:opts.keyboard.right&&!vars.lockKey&&iL.moveTo("next");break;case 40:opts.keyboard.down&&!vars.lockKey&&iL.moveTo("next")}}),fullScreenApi.supportsFullScreen&&$win.bind(fullscreenEvent,function(){iL.doFullscreen()});var holderEventsArr=[opts.caption.show+".iLightBox",opts.caption.hide+".iLightBox",opts.social.show+".iLightBox",opts.social.hide+".iLightBox"].filter(function(e,i,arr){return arr.lastIndexOf(e)===i}),holderEvents="";$.each(holderEventsArr,function(key,val){key!=0&&(holderEvents+=" "),holderEvents+=val}),$doc.on(clickEvent,".ilightbox-overlay",function(){opts.overlay.blur&&iL.closeAction()}).on(clickEvent,".ilightbox-next, .ilightbox-next-button",function(){iL.moveTo("next")}).on(clickEvent,".ilightbox-prev, .ilightbox-prev-button",function(){iL.moveTo("prev")}).on(clickEvent,".ilightbox-thumbnail",function(){var t=$(this),thumbs=$(".ilightbox-thumbnail",vars.thumbnails),index=thumbs.index(t);index!=vars.current&&iL.goTo(index)}).on(holderEvents,".ilightbox-holder:not(.ilightbox-next, .ilightbox-prev)",function(e){var caption=$("div.ilightbox-caption",vars.holder),social=$("div.ilightbox-social",vars.holder),fadeSpeed=opts.effects.fadeSpeed;vars.nextLock||vars.prevLock?(e.type==opts.caption.show&&!caption.is(":visible")?caption.fadeIn(fadeSpeed):e.type==opts.caption.hide&&caption.is(":visible")&&caption.fadeOut(fadeSpeed),e.type==opts.social.show&&!social.is(":visible")?social.fadeIn(fadeSpeed):e.type==opts.social.hide&&social.is(":visible")&&social.fadeOut(fadeSpeed)):(e.type==opts.caption.show&&!caption.is(":visible")?caption.stop().fadeIn(fadeSpeed):e.type==opts.caption.hide&&caption.is(":visible")&&caption.stop().fadeOut(fadeSpeed),e.type==opts.social.show&&!social.is(":visible")?social.stop().fadeIn(fadeSpeed):e.type==opts.social.hide&&social.is(":visible")&&social.stop().fadeOut(fadeSpeed))}).on("mouseenter.iLightBox mouseleave.iLightBox",".ilightbox-wrapper",function(e){e.type=="mouseenter"?vars.lockWheel=!0:vars.lockWheel=!1}).on(clickEvent,".ilightbox-toolbar a.ilightbox-close, .ilightbox-toolbar a.ilightbox-fullscreen, .ilightbox-toolbar a.ilightbox-play, .ilightbox-toolbar a.ilightbox-pause",function(){var t=$(this);t.hasClass("ilightbox-fullscreen")?iL.fullScreenAction():t.hasClass("ilightbox-play")?(iL.resume(),t.addClass("ilightbox-pause").removeClass("ilightbox-play")):t.hasClass("ilightbox-pause")?(iL.pause(),t.addClass("ilightbox-play").removeClass("ilightbox-pause")):iL.closeAction()}).on(touchMoveEvent,".ilightbox-overlay, .ilightbox-thumbnails-container",function(e){e.preventDefault()}),opts.controls.arrows&&!supportTouch&&$doc.on("mousemove.iLightBox",mouseMoveHandler),opts.controls.slideshow&&opts.slideshow.pauseOnHover&&$doc.on("mouseenter.iLightBox mouseleave.iLightBox",".ilightbox-holder:not(.ilightbox-next, .ilightbox-prev)",function(e){e.type=="mouseenter"&&vars.cycleID?iL.pause():e.type=="mouseleave"&&vars.isPaused&&iL.resume()});var switchers=$(".ilightbox-overlay, .ilightbox-holder, .ilightbox-thumbnails"),delay=!1;opts.controls.mousewheel&&switchers.on("mousewheel.iLightBox",function(event,delta){event.preventDefault();if(delay)return;delay=!0,vars.lockWheel||(event.preventDefault(),delta<0?iL.moveTo("next"):delta>0&&iL.moveTo("prev")),setTimeout(function(){delay=!1},2e3)}),opts.controls.swipe&&holders.on(touchStartEvent,function(event){function moveEachHandler(i){var t=$(this),offset=offSet[i],scroll=[start.coords[0]-stop.coords[0],start.coords[1]-stop.coords[1]];t[0].style[path=="horizontal"?"left":"top"]=(path=="horizontal"?offset.left-scroll[0]:offset.top-scroll[1])+"px"}function moveHandler(event){if(!start)return;var data=event.originalEvent.touches?event.originalEvent.touches[0]:event;stop={time:(new Date).getTime(),coords:[data.pageX-scrollLeft,data.pageY-scrollTop]},holders.each(moveEachHandler),event.preventDefault()}function repositionHolders(){holders.each(function(){var t=$(this),offset=t.data("offset")||{top:t.offset().top-scrollTop,left:t.offset().left-scrollLeft},top=offset.top,left=offset.left;t.css(transform,gpuAcceleration).stop().animate({top:top,left:left},500,"easeOutCirc",function(){t.css(transform,"")})})}if(vars.nextLock||vars.prevLock||vars.total==1||vars.lockSwipe)return;vars.BODY.addClass("ilightbox-closedhand");var data=event.originalEvent.touches?event.originalEvent.touches[0]:event,scrollTop=$doc.scrollTop(),scrollLeft=$doc.scrollLeft(),offsets=[holders.eq(0).offset(),holders.eq(1).offset(),holders.eq(2).offset()],offSet=[{top:offsets[0].top-scrollTop,left:offsets[0].left-scrollLeft},{top:offsets[1].top-scrollTop,left:offsets[1].left-scrollLeft},{top:offsets[2].top-scrollTop,left:offsets[2].left-scrollLeft}],start={time:(new Date).getTime(),coords:[data.pageX-scrollLeft,data.pageY-scrollTop]},stop;holders.bind(touchMoveEvent,moveHandler),$doc.one(touchStopEvent,function(event){holders.unbind(touchMoveEvent,moveHandler),vars.BODY.removeClass("ilightbox-closedhand"),start&&stop&&(path=="horizontal"&&stop.time-start.time<durationThreshold&&abs(start.coords[0]-stop.coords[0])>horizontalDistanceThreshold&&abs(start.coords[1]-stop.coords[1])<verticalDistanceThreshold?start.coords[0]>stop.coords[0]?vars.current==vars.total-1&&!opts.infinite?repositionHolders():(vars.isSwipe=!0,iL.moveTo("next")):vars.current==0&&!opts.infinite?repositionHolders():(vars.isSwipe=!0,iL.moveTo("prev")):path=="vertical"&&stop.time-start.time<durationThreshold&&abs(start.coords[1]-stop.coords[1])>horizontalDistanceThreshold&&abs(start.coords[0]-stop.coords[0])<verticalDistanceThreshold?start.coords[1]>stop.coords[1]?vars.current==vars.total-1&&!opts.infinite?repositionHolders():(vars.isSwipe=!0,iL.moveTo("next")):vars.current==0&&!opts.infinite?repositionHolders():(vars.isSwipe=!0,iL.moveTo("prev")):repositionHolders()),start=stop=undefined})})},goTo:function(index){var iL=this,vars=iL.vars,opts=iL.options,diff=index-vars.current;opts.infinite&&(index==vars.total-1&&vars.current==0&&(diff=-1),vars.current==vars.total-1&&index==0&&(diff=1));if(diff==1)iL.moveTo("next");else if(diff==-1)iL.moveTo("prev");else{if(vars.nextLock||vars.prevLock)return!1;typeof opts.callback.onBeforeChange=="function"&&opts.callback.onBeforeChange.call(iL,iL.ui),opts.linkId&&(vars.hashLock=!0,window.location.hash=opts.linkId+"/"+index),iL.items[index]&&(iL.items[index].options.mousewheel?iL.vars.lockWheel=!1:vars.lockWheel=!0,iL.items[index].options.swipe?vars.lockSwipe=!1:vars.lockSwipe=!0),$.each([vars.holder,vars.nextPhoto,vars.prevPhoto],function(key,val){val.css(transform,gpuAcceleration).fadeOut(opts.effects.loadedFadeSpeed)}),vars.current=index,vars.next=index+1,vars.prev=index-1,iL.createUI(),setTimeout(function(){iL.generateBoxes()},opts.effects.loadedFadeSpeed+50),$(".ilightbox-thumbnail",vars.thumbnails).removeClass("ilightbox-active").eq(index).addClass("ilightbox-active"),iL.positionThumbnails(),opts.linkId&&setTimeout(function(){vars.hashLock=!1},55),opts.infinite||(vars.nextButton.add(vars.prevButton).add(vars.innerPrevButton).add(vars.innerNextButton).removeClass("disabled"),vars.current==0&&vars.prevButton.add(vars.innerPrevButton).addClass("disabled"),vars.current>=vars.total-1&&vars.nextButton.add(vars.innerNextButton).addClass("disabled")),iL.resetCycle(),typeof opts.callback.onAfterChange=="function"&&opts.callback.onAfterChange.call(iL,iL.ui)}},moveTo:function(side){var iL=this,vars=iL.vars,opts=iL.options,path=opts.path.toLowerCase(),viewport=getViewport(),switchSpeed=opts.effects.switchSpeed;if(vars.nextLock||vars.prevLock)return!1;var item=side=="next"?vars.next:vars.prev;opts.linkId&&(vars.hashLock=!0,window.location.hash=opts.linkId+"/"+item);if(side=="next"){if(!iL.items[item])return!1;var firstHolder=vars.nextPhoto,secondHolder=vars.holder,lastHolder=vars.prevPhoto,firstClass="ilightbox-prev",secondClass="ilightbox-next"}else if(side=="prev"){if(!iL.items[item])return!1;var firstHolder=vars.prevPhoto,secondHolder=vars.holder,lastHolder=vars.nextPhoto,firstClass="ilightbox-next",secondClass="ilightbox-prev"}typeof opts.callback.onBeforeChange=="function"&&opts.callback.onBeforeChange.call(iL,iL.ui),side=="next"?vars.nextLock=!0:vars.prevLock=!0;var captionFirst=$("div.ilightbox-caption",secondHolder),socialFirst=$("div.ilightbox-social",secondHolder);captionFirst.length&&captionFirst.stop().fadeOut(switchSpeed,function(){$(this).remove()}),socialFirst.length&&socialFirst.stop().fadeOut(switchSpeed,function(){$(this).remove()});if(iL.items[item].caption){iL.setCaption(iL.items[item],firstHolder);var caption=$("div.ilightbox-caption",firstHolder),percent=parseInt(caption.outerHeight()/firstHolder.outerHeight()*100);opts.caption.start&&percent<=50&&caption.fadeIn(switchSpeed)}var social=iL.items[item].options.social;social&&(iL.setSocial(social,iL.items[item].URL,firstHolder),opts.social.start&&$("div.ilightbox-social",firstHolder).fadeIn(opts.effects.fadeSpeed)),$.each([firstHolder,secondHolder,lastHolder],function(key,val){val.removeClass("ilightbox-next ilightbox-prev")});var firstOffset=firstHolder.data("offset"),winW=viewport.width-opts.styles.pageOffsetX,winH=viewport.height-opts.styles.pageOffsetY,width=firstOffset.newDims.width,height=firstOffset.newDims.height,thumbsOffset=firstOffset.thumbsOffset,diff=firstOffset.diff,top=parseInt(winH/2-height/2-diff.H-thumbsOffset.H/2),left=parseInt(winW/2-width/2-diff.W-thumbsOffset.W/2),secondOffset=secondHolder.data("offset"),object=secondOffset.object;firstHolder.show().css(transform,gpuAcceleration).animate({top:top,left:left,opacity:1},switchSpeed,vars.isSwipe?"easeOutCirc":"easeInOutCirc",function(){firstHolder.css(transform,"")}),$("div.ilightbox-container",firstHolder).animate({width:width,height:height},switchSpeed,vars.isSwipe?"easeOutCirc":"easeInOutCirc"),diff=secondOffset.diff,width=secondOffset.newDims.width,height=secondOffset.newDims.height,width=parseInt(width*opts.styles[side=="next"?"prevScale":"nextScale"]),height=parseInt(height*opts.styles[side=="next"?"prevScale":"nextScale"]),top=path=="horizontal"?parseInt(winH/2-object.offsetY-height/2-diff.H-thumbsOffset.H/2):parseInt(winH-object.offsetX-diff.H-thumbsOffset.H/2),side=="prev"?left=path=="horizontal"?parseInt(winW-object.offsetX-diff.W-thumbsOffset.W/2):parseInt(winW/2-width/2-diff.W-object.offsetY-thumbsOffset.W/2):(top=path=="horizontal"?top:parseInt(object.offsetX-diff.H-height-thumbsOffset.H/2),left=path=="horizontal"?parseInt(object.offsetX-diff.W-width-thumbsOffset.W/2):parseInt(winW/2-object.offsetY-width/2-diff.W-thumbsOffset.W/2)),$("div.ilightbox-container",secondHolder).animate({width:width,height:height},switchSpeed,vars.isSwipe?"easeOutCirc":"easeInOutCirc"),secondHolder.addClass(firstClass).css(transform,gpuAcceleration).animate({top:top,left:left,opacity:opts.styles.prevOpacity},switchSpeed,vars.isSwipe?"easeOutCirc":"easeInOutCirc",function(){secondHolder.css(transform,""),$(".ilightbox-thumbnail",vars.thumbnails).removeClass("ilightbox-active").eq(item).addClass("ilightbox-active"),iL.positionThumbnails(),iL.items[item]&&(iL.items[item].options.mousewheel?vars.lockWheel=!1:vars.lockWheel=!0,iL.items[item].options.swipe?vars.lockSwipe=!1:vars.lockSwipe=!0),vars.isSwipe=!1,["iframe","video"].indexOf(iL.items[vars.current].type)!==-1&&$("div.ilightbox-container",secondHolder).empty(),side=="next"?(vars.nextPhoto=lastHolder,vars.prevPhoto=secondHolder,vars.holder=firstHolder,vars.nextPhoto.hide(),vars.next=vars.next+1,vars.prev=vars.current,vars.current=vars.current+1,opts.infinite&&(vars.current>vars.total-1&&(vars.current=0),vars.current==vars.total-1&&(vars.next=0),vars.current==0&&(vars.prev=vars.total-1)),iL.createUI(),iL.items[vars.next]?iL.loadContent(iL.items[vars.next],"next"):vars.nextLock=!1):(vars.prevPhoto=lastHolder,vars.nextPhoto=secondHolder,vars.holder=firstHolder,vars.prevPhoto.hide(),vars.next=vars.current,vars.current=vars.prev,vars.prev=vars.current-1,opts.infinite&&(vars.current==vars.total-1&&(vars.next=0),vars.current==0&&(vars.prev=vars.total-1)),iL.createUI(),iL.items[vars.prev]?iL.loadContent(iL.items[vars.prev],"prev"):vars.prevLock=!1),["iframe","video"].indexOf(iL.items[vars.current].type)!==-1&&iL.loadContent(iL.items[vars.current],"current"),opts.linkId&&setTimeout(function(){vars.hashLock=!1},55),opts.infinite||(vars.nextButton.add(vars.prevButton).add(vars.innerPrevButton).add(vars.innerNextButton).removeClass("disabled"),vars.current==0&&vars.prevButton.add(vars.innerPrevButton).addClass("disabled"),vars.current>=vars.total-1&&vars.nextButton.add(vars.innerNextButton).addClass("disabled")),iL.repositionPhoto(),iL.resetCycle(),typeof opts.callback.onAfterChange=="function"&&opts.callback.onAfterChange.call(iL,iL.ui)}),top=path=="horizontal"?getPixel(lastHolder,"top"):side=="next"?parseInt(-(winH/2)-lastHolder.outerHeight()):parseInt(top*2),left=path=="horizontal"?side=="next"?parseInt(-(winW/2)-lastHolder.outerWidth()):parseInt(left*2):getPixel(lastHolder,"left"),lastHolder.css(transform,gpuAcceleration).animate({top:top,left:left,opacity:opts.styles.nextOpacity},switchSpeed,vars.isSwipe?"easeOutCirc":"easeInOutCirc",function(){lastHolder.css(transform,"")}).addClass(secondClass)},setCaption:function(obj,target){var iL=this,caption=$('<div class="ilightbox-caption"></div>');obj.caption&&(caption.html(obj.caption),$("div.ilightbox-container",target).append(caption))},normalizeSocial:function(obj,url){var iL=this,vars=iL.vars,opts=iL.options,baseURL=window.location.href;return $.each(obj,function(key,value){if(!value)return!0;var item=key.toLowerCase(),source,text;switch(item){case"facebook":source="http://www.facebook.com/share.php?v=4&src=bm&u={URL}",text="Share on Facebook";break;case"twitter":source="http://twitter.com/home?status={URL}",text="Share on Twitter";break;case"digg":source="http://digg.com/submit?phase=2&url={URL}",text="Share on Digg";break;case"reddit":source="http://reddit.com/submit?url={URL}",text="Share on reddit"}obj[key]={URL:value.URL&&absolutizeURI(baseURL,value.URL)||opts.linkId&&window.location.href||typeof url!="string"&&baseURL||url&&absolutizeURI(baseURL,url)||baseURL,source:value.source||source||value.URL&&absolutizeURI(baseURL,value.URL)||url&&absolutizeURI(baseURL,url),text:value.text||text||"Share on "+key,width:typeof value.width!="undefined"&&!isNaN(value.width)?parseInt(value.width):640,height:value.height||360}}),obj},setSocial:function(obj,url,target){var iL=this,socialBar=$('<div class="ilightbox-social"></div>'),buttons="<ul>";obj=iL.normalizeSocial(obj,url),$.each(obj,function(key,value){var item=key.toLowerCase(),source=value.source.replace(/\{URL\}/g,encodeURIComponent(value.URL).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A").replace(/%20/g,"+"));buttons+='<li class="'+key+'"><a href="'+source+'" onclick="javascript:window.open(this.href'+(value.width<=0||value.height<=0?"":", '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height="+value.height+",width="+value.width+",left=40,top=40'")+');return false;" title="'+value.text+'" target="_blank"></a></li>'}),buttons+="</ul>",socialBar.html(buttons),$("div.ilightbox-container",target).append(socialBar)},fullScreenAction:function(){var iL=this,vars=iL.vars;fullScreenApi.supportsFullScreen?fullScreenApi.isFullScreen()?fullScreenApi.cancelFullScreen(document.documentElement):fullScreenApi.requestFullScreen(document.documentElement):iL.doFullscreen()},doFullscreen:function(){var iL=this,vars=iL.vars,viewport=getViewport(),opts=iL.options;if(opts.fullAlone){var currentHolder=vars.holder,current=iL.items[vars.current],windowWidth=viewport.width,windowHeight=viewport.height,elements=[currentHolder,vars.nextPhoto,vars.prevPhoto,vars.nextButton,vars.prevButton,vars.overlay,vars.toolbar,vars.thumbnails,vars.loader],hideElements=[vars.nextPhoto,vars.prevPhoto,vars.nextButton,vars.prevButton,vars.loader,vars.thumbnails];if(!vars.isInFullScreen){vars.isInFullScreen=vars.lockKey=vars.lockWheel=vars.lockSwipe=!0,vars.overlay.css({opacity:1}),$.each(hideElements,function(i,element){element.hide()}),vars.fullScreenButton.attr("title",opts.text.exitFullscreen);if(opts.fullStretchTypes.indexOf(current.type)!=-1)currentHolder.data({naturalWidthOld:currentHolder.data("naturalWidth"),naturalHeightOld:currentHolder.data("naturalHeight"),naturalWidth:windowWidth,naturalHeight:windowHeight});else{var viewport=current.options.fullViewPort||opts.fullViewPort||"",newWidth=windowWidth,newHeight=windowHeight,width=currentHolder.data("naturalWidth"),height=currentHolder.data("naturalHeight");if(viewport.toLowerCase()=="fill")newHeight=newWidth/width*height,newHeight<windowHeight&&(newWidth=windowHeight/height*width,newHeight=windowHeight);else if(viewport.toLowerCase()=="fit"){var dims=iL.getNewDimenstions(newWidth,newHeight,width,height,!0);newWidth=dims.width,newHeight=dims.height}else if(viewport.toLowerCase()=="stretch")newWidth=newWidth,newHeight=newHeight;else{var scale=width>newWidth||height>newHeight?!0:!1,dims=iL.getNewDimenstions(newWidth,newHeight,width,height,scale);newWidth=dims.width,newHeight=dims.height}currentHolder.data({naturalWidthOld:currentHolder.data("naturalWidth"),naturalHeightOld:currentHolder.data("naturalHeight"),naturalWidth:newWidth,naturalHeight:newHeight})}$.each(elements,function(key,val){val.addClass("ilightbox-fullscreen")}),typeof opts.callback.onEnterFullScreen=="function"&&opts.callback.onEnterFullScreen.call(iL,iL.ui)}else vars.isInFullScreen=vars.lockKey=vars.lockWheel=vars.lockSwipe=!1,vars.overlay.css({opacity:iL.options.overlay.opacity}),$.each(hideElements,function(i,element){element.show()}),vars.fullScreenButton.attr("title",opts.text.enterFullscreen),currentHolder.data({naturalWidth:currentHolder.data("naturalWidthOld"),naturalHeight:currentHolder.data("naturalHeightOld"),naturalWidthOld:null,naturalHeightOld:null}),$.each(elements,function(key,val){val.removeClass("ilightbox-fullscreen")}),typeof opts.callback.onExitFullScreen=="function"&&opts.callback.onExitFullScreen.call(iL,iL.ui)}else vars.isInFullScreen?vars.isInFullScreen=!1:vars.isInFullScreen=!0;iL.repositionPhoto(!0)},closeAction:function(){var iL=this,vars=iL.vars,opts=iL.options;$win.unbind(".iLightBox"),$doc.off(".iLightBox"),vars.isInFullScreen&&fullScreenApi.cancelFullScreen(document.documentElement),$(".ilightbox-overlay, .ilightbox-holder, .ilightbox-thumbnails").off(".iLightBox"),opts.hide.effect?vars.overlay.stop().fadeOut(opts.hide.speed,function(){vars.overlay.remove(),vars.BODY.removeClass("ilightbox-noscroll").off(".iLightBox")}):(vars.overlay.remove(),vars.BODY.removeClass("ilightbox-noscroll").off(".iLightBox"));var fadeOuts=[vars.toolbar,vars.holder,vars.nextPhoto,vars.prevPhoto,vars.nextButton,vars.prevButton,vars.loader,vars.thumbnails];$.each(fadeOuts,function(i,element){element.removeAttr("style").remove()}),vars.dontGenerateThumbs=vars.isInFullScreen=!1,window.iLightBox=null,opts.linkId&&(vars.hashLock=!0,removeHash(),setTimeout(function(){vars.hashLock=!1},55)),vars.nextButton.add(vars.prevButton).add(vars.innerPrevButton).add(vars.innerNextButton).removeClass("disabled"),typeof opts.callback.onHide=="function"&&opts.callback.onHide.call(iL,iL.ui)},repositionPhoto:function(){var iL=this,vars=iL.vars,opts=iL.options,path=opts.path.toLowerCase(),viewport=getViewport(),winWidth=viewport.width,winHeight=viewport.height;viewport.width<UNCODE.mediaQuery&&(opts.styles.nextOffsetX=0);var thumbsOffsetW=vars.isInFullScreen&&opts.fullAlone||vars.isMobile?0:path=="horizontal"?0:vars.thumbnails.outerWidth(),thumbsOffsetH=vars.isMobile?vars.toolbar.outerHeight():vars.isInFullScreen&&opts.fullAlone?0:path=="horizontal"?vars.thumbnails.outerHeight():0,width=vars.isInFullScreen&&opts.fullAlone?winWidth:winWidth-opts.styles.pageOffsetX,height=vars.isInFullScreen&&opts.fullAlone?winHeight:winHeight-opts.styles.pageOffsetY,offsetW=path=="horizontal"?parseInt(iL.items[vars.next]||iL.items[vars.prev]?(opts.styles.nextOffsetX+opts.styles.prevOffsetX)*2:width/10<=30?30:width/10):parseInt(width/10<=30?30:width/10)+thumbsOffsetW,offsetH=path=="horizontal"?parseInt(height/10<=30?30:height/10)+thumbsOffsetH:parseInt(iL.items[vars.next]||iL.items[vars.prev]?(opts.styles.nextOffsetX+opts.styles.prevOffsetX)*2:height/10<=30?30:height/10),elObject={type:"current",width:width,height:height,item:iL.items[vars.current],offsetW:offsetW,offsetH:offsetH,thumbsOffsetW:thumbsOffsetW,thumbsOffsetH:thumbsOffsetH,animate:arguments.length,holder:vars.holder};iL.repositionEl(elObject),iL.items[vars.next]&&(elObject=$.extend(elObject,{type:"next",item:iL.items[vars.next],offsetX:opts.styles.nextOffsetX,offsetY:opts.styles.nextOffsetY,holder:vars.nextPhoto}),iL.repositionEl(elObject)),iL.items[vars.prev]&&(elObject=$.extend(elObject,{type:"prev",item:iL.items[vars.prev],offsetX:opts.styles.nextOffsetX,offsetY:opts.styles.prevOffsetY,holder:vars.prevPhoto}),iL.repositionEl(elObject));var loaderCss=path=="horizontal"?{left:parseInt(width/2-vars.loader.outerWidth()/2)}:{top:parseInt(height/2-vars.loader.outerHeight()/2)};vars.loader.css(loaderCss)},repositionEl:function(obj){var iL=this,vars=iL.vars,opts=iL.options,path=opts.path.toLowerCase(),widthAvail=obj.type=="current"?vars.isInFullScreen&&opts.fullAlone?obj.width:obj.width-obj.offsetW:obj.width-obj.offsetW,heightAvail=obj.type=="current"?vars.isInFullScreen&&opts.fullAlone?obj.height:obj.height-obj.offsetH:obj.height-obj.offsetH,itemParent=obj.item,item=obj.item.options,holder=obj.holder,offsetX=obj.offsetX||0,offsetY=obj.offsetY||0,toolbarHeight=$(".ilightbox-inner-toolbar",holder).length?parseInt($(".ilightbox-inner-toolbar",holder).outerHeight()):0,thumbsOffsetW=obj.thumbsOffsetW,thumbsOffsetH=obj.thumbsOffsetH;obj.type=="current"?(typeof item.width=="number"&&item.width&&(widthAvail=vars.isInFullScreen&&opts.fullAlone&&(opts.fullStretchTypes.indexOf(itemParent.type)!=-1||item.fullViewPort||opts.fullViewPort)?widthAvail:item.width>widthAvail?widthAvail:item.width),typeof item.height=="number"&&item.height&&(heightAvail=vars.isInFullScreen&&opts.fullAlone&&(opts.fullStretchTypes.indexOf(itemParent.type)!=-1||item.fullViewPort||opts.fullViewPort)?heightAvail:item.height>heightAvail?heightAvail:item.height)):(typeof item.width=="number"&&item.width&&(widthAvail=item.width>widthAvail?widthAvail:item.width),typeof item.height=="number"&&item.height&&(heightAvail=item.height>heightAvail?heightAvail:item.height)),heightAvail=parseInt(heightAvail-toolbarHeight);var width=typeof item.width=="string"&&item.width.indexOf("%")!=-1?percentToValue(parseInt(item.width.replace("%","")),obj.width):holder.data("naturalWidth"),height=typeof item.height=="string"&&item.height.indexOf("%")!=-1?percentToValue(parseInt(item.height.replace("%","")),obj.height):holder.data("naturalHeight"),dims=typeof item.width=="string"&&item.width.indexOf("%")!=-1||typeof item.height=="string"&&item.height.indexOf("%")!=-1?{width:width,height:height}:iL.getNewDimenstions(widthAvail,heightAvail,width,height),newDims=$.extend({},dims,{});obj.type=="prev"||obj.type=="next"?(width=parseInt(dims.width*(obj.type=="next"?opts.styles.nextScale:opts.styles.prevScale)),height=parseInt(dims.height*(obj.type=="next"?opts.styles.nextScale:opts.styles.prevScale))):(width=dims.width,height=dims.height);var widthDiff=parseInt((getPixel(holder,"padding-left")+getPixel(holder,"padding-right")+getPixel(holder,"border-left-width")+getPixel(holder,"border-right-width"))/2),heightDiff=parseInt((getPixel(holder,"padding-top")+getPixel(holder,"padding-bottom")+getPixel(holder,"border-top-width")+getPixel(holder,"border-bottom-width")+($(".ilightbox-inner-toolbar",holder).outerHeight()||0))/2);switch(obj.type){case"current":var top=parseInt(obj.height/2-height/2-heightDiff-thumbsOffsetH/2),left=parseInt(obj.width/2-width/2-widthDiff-thumbsOffsetW/2);break;case"next":var top=path=="horizontal"?parseInt(obj.height/2-offsetY-height/2-heightDiff-thumbsOffsetH/2):parseInt(obj.height-offsetX-heightDiff-thumbsOffsetH/2),left=path=="horizontal"?parseInt(obj.width-offsetX-widthDiff-thumbsOffsetW/2):parseInt(obj.width/2-width/2-widthDiff-offsetY-thumbsOffsetW/2);break;case"prev":var top=path=="horizontal"?parseInt(obj.height/2-offsetY-height/2-heightDiff-thumbsOffsetH/2):parseInt(offsetX-heightDiff-height-thumbsOffsetH/2),left=path=="horizontal"?parseInt(offsetX-widthDiff-width-thumbsOffsetW/2):parseInt(obj.width/2-offsetY-width/2-widthDiff-thumbsOffsetW/2)}holder.data("offset",{top:top,left:left,newDims:newDims,diff:{W:widthDiff,H:heightDiff},thumbsOffset:{W:thumbsOffsetW,H:thumbsOffsetH},object:obj});var opacityMobile;isMobile?opacityMobile={opacity:1,top:top,left:left}:opacityMobile={top:top,left:left},obj.animate>0&&opts.effects.reposition?(holder.css(transform,gpuAcceleration).stop().animate(opacityMobile,opts.effects.repositionSpeed,"easeOutCirc",function(){holder.css(transform,"")}),$("div.ilightbox-container",holder).stop().animate({width:width,height:height},opts.effects.repositionSpeed,"easeOutCirc"),$("div.ilightbox-inner-toolbar",holder).stop().animate({width:width},opts.effects.repositionSpeed,"easeOutCirc",function(){$(this).css("overflow","visible")})):(holder.css(opacityMobile),$("div.ilightbox-container",holder).css({width:width,height:height}),$("div.ilightbox-inner-toolbar",holder).css({width:width}))},resume:function(priority){var iL=this,vars=iL.vars,opts=iL.options;if(!opts.slideshow.pauseTime||opts.controls.slideshow&&vars.total<=1||priority<vars.isPaused)return;vars.isPaused=0,vars.cycleID&&(vars.cycleID=clearTimeout(vars.cycleID)),vars.cycleID=setTimeout(function(){vars.current==vars.total-1?iL.goTo(0):iL.moveTo("next")},opts.slideshow.pauseTime)},pause:function(priority){var iL=this,vars=iL.vars,opts=iL.options;if(priority<vars.isPaused)return;vars.isPaused=priority||100,vars.cycleID&&(vars.cycleID=clearTimeout(vars.cycleID))},resetCycle:function(){var iL=this,vars=iL.vars,opts=iL.options;opts.controls.slideshow&&vars.cycleID&&!vars.isPaused&&iL.resume()},getNewDimenstions:function(width,height,width_old,height_old,thumb){var iL=this;width?height?factor=min(width/width_old,height/height_old):factor=width/width_old:factor=height/height_old,thumb||(factor>iL.options.maxScale?factor=iL.options.maxScale:factor<iL.options.minScale&&(factor=iL.options.minScale));var final_width=iL.options.keepAspectRatio?round(width_old*factor):width,final_height=iL.options.keepAspectRatio?round(height_old*factor):height;return{width:final_width,height:final_height,ratio:factor}},setOption:function(options){var iL=this;iL.options=$.extend(!0,iL.options,options||{}),iL.refresh()},availPlugins:function(){var iL=this,testEl=document.createElement("video");iL.plugins={flash:!isMobile,quicktime:parseInt(PluginDetect.getVersion("QuickTime"))>=0?!0:!1,html5H264:!!testEl.canPlayType&&!!testEl.canPlayType("video/mp4").replace(/no/,""),html5WebM:!!testEl.canPlayType&&!!testEl.canPlayType("video/webm").replace(/no/,""),html5Vorbis:!!testEl.canPlayType&&!!testEl.canPlayType("video/ogg").replace(/no/,""),html5QuickTime:!!testEl.canPlayType&&!!testEl.canPlayType("video/quicktime").replace(/no/,"")}},addContent:function(element,obj){var iL=this,el;switch(obj.type){case"video":var HTML5=!1,videoType=obj.videoType,html5video=obj.options.html5video;(videoType=="video/mp4"||obj.ext=="mp4"||obj.ext=="m4v"||html5video.h264)&&iL.plugins.html5H264?(obj.ext="mp4",obj.URL=html5video.h264||obj.URL):html5video.webm&&iL.plugins.html5WebM?(obj.ext="webm",obj.URL=html5video.webm||obj.URL):html5video.ogg&&iL.plugins.html5Vorbis&&(obj.ext="ogv",obj.URL=html5video.ogg||obj.URL),!iL.plugins.html5H264||videoType!="video/mp4"&&obj.ext!="mp4"&&obj.ext!="m4v"?!iL.plugins.html5WebM||videoType!="video/webm"&&obj.ext!="webm"?!iL.plugins.html5Vorbis||videoType!="video/ogg"&&obj.ext!="ogv"?iL.plugins.html5QuickTime&&(videoType=="video/quicktime"||obj.ext=="mov"||obj.ext=="qt")&&(HTML5=!0,videoType="video/quicktime"):(HTML5=!0,videoType="video/ogg"):(HTML5=!0,videoType="video/webm"):(HTML5=!0,videoType="video/mp4"),HTML5?el=$("<video />",{width:"100%",height:"100%",preload:html5video.preload,autoplay:html5video.autoplay,loop:html5video.loop,poster:html5video.poster,controls:html5video.controls,controlslist:"nodownload"}).append($("<source />",{src:obj.URL,type:videoType})):iL.plugins.quicktime?(el=$("<object />",{type:"video/quicktime",pluginspage:pluginspages.quicktime}).attr({data:obj.URL,width:"100%",height:"100%"}).append($("<param />",{name:"src",value:obj.URL})).append($("<param />",{name:"autoplay",value:"false"})).append($("<param />",{name:"loop",value:"false"})).append($("<param />",{name:"scale",value:"tofit"})),browser.msie&&(el=QT_GenerateOBJECTText(obj.URL,"100%","100%","","SCALE","tofit","AUTOPLAY","false","LOOP","false"))):el=$("<span />",{"class":"ilightbox-alert",html:iL.options.errors.missingPlugin.replace("{pluginspage}",pluginspages.quicktime).replace("{type}","QuickTime")});break;case"flash":if(!iL.plugins.flash)el=$("<span />",{"class":"ilightbox-alert",html:iL.options.errors.missingPlugin.replace("{pluginspage}",pluginspages.flash).replace("{type}","Adobe Flash player")});else{var flashvars="",i=0;obj.options.flashvars?$.each(obj.options.flashvars,function(k,v){i!=0&&(flashvars+="&"),flashvars+=k+"="+encodeURIComponent(v),i++}):flashvars=null,el=$("<embed />").attr({type:"application/x-shockwave-flash",src:obj.URL,width:typeof obj.options.width=="number"&&obj.options.width&&iL.options.minScale=="1"&&iL.options.maxScale=="1"?obj.options.width:"100%",height:typeof obj.options.height=="number"&&obj.options.height&&iL.options.minScale=="1"&&iL.options.maxScale=="1"?obj.options.height:"100%",quality:"high",bgcolor:"#000000",play:"true",loop:"true",menu:"true",wmode:"transparent",scale:"showall",allowScriptAccess:"always",allowFullScreen:"true",flashvars:flashvars,fullscreen:"yes"})}break;case"iframe":el=$("<iframe />").attr({width:typeof obj.options.width=="number"&&obj.options.width&&iL.options.minScale=="1"&&iL.options.maxScale=="1"?obj.options.width:"100%",height:typeof obj.options.height=="number"&&obj.options.height&&iL.options.minScale=="1"&&iL.options.maxScale=="1"?obj.options.height:"100%",src:obj.URL,frameborder:0,hspace:0,vspace:0,scrolling:supportTouch?"auto":"scroll",webkitAllowFullScreen:"",mozallowfullscreen:"",allowFullScreen:""});break;case"inline":el=$('<div class="ilightbox-wrapper"></div>').html($(obj.URL).clone(!0));break;case"html":var object=obj.URL,el;if(object[0].nodeName)el=$('<div class="ilightbox-wrapper"></div>').html(object);else{var dom=$(obj.URL),html=dom.selector?$("<div>"+dom+"</div>"):dom;el=$('<div class="ilightbox-wrapper"></div>').html(html)}}return $("div.ilightbox-container",element).empty().html(el),el[0].tagName.toLowerCase()==="video"&&browser.webkit&&setTimeout(function(){var src=el[0].currentSrc+"?"+floor(random()*3e4);el[0].currentSrc=src,el[0].src=src}),el},ogpRecognition:function(obj,callback){var iL=this,url=obj.URL;iL.showLoader(),doAjax(url,function(data){iL.hideLoader();if(data){var object=new Object;object.length=!1,object.url=data.url;if(data.status==200){var result=data.results,type=result.type,source=result.source;object.source=source.src,object.width=source.width&&parseInt(source.width)||0,object.height=source.height&&parseInt(source.height)||0,object.type=type,object.thumbnail=source.thumbnail||result.images&&result.images[0],object.html5video=result.html5video||{},object.length=!0,source.type=="application/x-shockwave-flash"?object.type="flash":source.type.indexOf("video/")!=-1?object.type="video":source.type.indexOf("/html")!=-1?object.type="iframe":source.type.indexOf("image/")!=-1&&(object.type="image")}else if(typeof data.response!="undefined")throw data.response;callback.call(this,object.length?object:!1)}})},hashChangeHandler:function(url){var iL=this,vars=iL.vars,opts=iL.options,URL=url||window.location.href,hash=parseURI(URL).hash,split=hash.split("/"),index=split[1];if(vars.hashLock||"#"+opts.linkId!=split[0]&&hash.length>1)return;if(index){var target=split[1]||0;if(iL.items[target]){var overlay=$(".ilightbox-overlay");overlay.length&&overlay.attr("linkid")==opts.linkId?iL.goTo(target):iL.itemsObject[target].trigger(ishybrid?"itap click":supportTouch?"itap":"click")}else{var overlay=$(".ilightbox-overlay");overlay.length&&iL.closeAction()}}else{var overlay=$(".ilightbox-overlay");overlay.length&&iL.closeAction()}}},$.fn.iLightBox=function(){var args=arguments,opt=$.isPlainObject(args[0])?args[0]:args[1],items=$.isArray(args[0])||typeof args[0]=="string"?args[0]:args[1];opt||(opt={});var options=$.extend(!0,{attr:"href",path:"vertical",skin:"dark",linkId:!1,infinite:!1,startFrom:0,randomStart:!1,keepAspectRatio:!0,maxScale:1,minScale:.2,innerToolbar:!1,smartRecognition:!1,mobileOptimizer:!0,fullAlone:!0,fullViewPort:null,fullStretchTypes:"flash, video",overlay:{blur:!0,opacity:.85},controls:{arrows:!1,slideshow:!1,toolbar:!0,fullscreen:!0,thumbnail:!0,keyboard:!0,mousewheel:!0,swipe:!0},keyboard:{left:!0,right:!0,up:!0,down:!0,esc:!0,shift_enter:!0},show:{effect:!0,speed:300,title:!0},hide:{effect:!0,speed:300},caption:{start:!0,show:"mouseenter",hide:"mouseleave"},social:{start:!0,show:"mouseenter",hide:"mouseleave",buttons:!1},styles:{pageOffsetX:0,pageOffsetY:0,nextOffsetX:45,nextOffsetY:0,nextOpacity:1,nextScale:1,prevOffsetX:45,prevOffsetY:0,prevOpacity:1,prevScale:1},thumbnails:{maxWidth:120,maxHeight:80,normalOpacity:1,activeOpacity:.6},effects:{reposition:!0,repositionSpeed:200,switchSpeed:500,loadedFadeSpeed:180,fadeSpeed:200},slideshow:{pauseTime:5e3,pauseOnHover:!1,startPaused:!0},text:{close:"Press Esc to close",enterFullscreen:"Enter Fullscreen (Shift+Enter)",exitFullscreen:"Exit Fullscreen (Shift+Enter)",slideShow:"Slideshow",next:"Next",previous:"Previous"},errors:{loadImage:"An error occurred when trying to load photo.",loadContents:"An error occurred when trying to load contents.",missingPlugin:"The content your are attempting to view requires the <a href='{pluginspage}' target='_blank'>{type} plugin</a>."},ajaxSetup:{url:"",beforeSend:function(jqXHR,settings){},cache:!1,complete:function(jqXHR,textStatus){},crossDomain:!1,error:function(jqXHR,textStatus,errorThrown){},success:function(data,textStatus,jqXHR){},global:!0,ifModified:!1,username:null,password:null,type:"GET"},callback:{}},opt),instant=$.isArray(items)||typeof items=="string"?!0:!1;items=$.isArray(items)?items:new Array,typeof args[0]=="string"&&(items[0]=args[0]);if(version_compare($.fn.jquery,"1.8",">=")){var iLB=new iLightBox($(this),options,items,instant);return{close:function(){iLB.closeAction()},fullscreen:function(){iLB.fullScreenAction()},moveNext:function(){iLB.moveTo("next")},movePrev:function(){iLB.moveTo("prev")},goTo:function(index){iLB.goTo(index)},refresh:function(){iLB.refresh()},reposition:function(){arguments.length>0?iLB.repositionPhoto(!0):iLB.repositionPhoto()},setOption:function(options){iLB.setOption(options)},destroy:function(){iLB.closeAction(),iLB.dispatchItemsEvents()}}}throw"The jQuery version that was loaded is too old. iLightBox requires jQuery 1.8+"},$.iLightBox=function(){return $.fn.iLightBox(arguments[0],arguments[1])},function(){$.each("touchstart touchmove touchend tap taphold swipe swipeleft swiperight scrollstart scrollstop".split(" "),function(i,name){$.fn[name]=function(fn){return fn?this.bind(name,fn):this.trigger(name)}});var tapSettings={startEvent:"touchstart.iTap",endEvent:"touchend.iTap"};$.event.special.itap={setup:function(){var self=this,$self=$(this),start,stop;$self.bind(tapSettings.startEvent,function(event){start=getScrollXY(),$self.one(tapSettings.endEvent,function(event){stop=getScrollXY();var orgEvent=event||window.event;event=$.event.fix(orgEvent),event.type="itap",start&&stop&&start.x==stop.x&&start.y==stop.y&&($.event.dispatch||$.event.handle).call(self,event),start=stop=undefined})})},teardown:function(){$(this).unbind(tapSettings.startEvent)}}}(),function(){fullScreenApi={supportsFullScreen:!1,isFullScreen:function(){return!1},requestFullScreen:function(){},cancelFullScreen:function(){},fullScreenEventName:"",prefix:""},browserPrefixes="webkit moz o ms khtml".split(" ");if(typeof document.cancelFullScreen!="undefined")fullScreenApi.supportsFullScreen=!0;else for(var i=0,il=browserPrefixes.length;i<il;i++){fullScreenApi.prefix=browserPrefixes[i];if(typeof document[fullScreenApi.prefix+"CancelFullScreen"]!="undefined"){fullScreenApi.supportsFullScreen=!0;break}}fullScreenApi.supportsFullScreen&&(fullScreenApi.fullScreenEventName=fullScreenApi.prefix+"fullscreenchange",fullScreenApi.isFullScreen=function(){switch(this.prefix){case"":return document.fullScreen;case"webkit":return document.webkitIsFullScreen;default:return document[this.prefix+"FullScreen"]}},fullScreenApi.requestFullScreen=function(el){return this.prefix===""?el.requestFullScreen():el[this.prefix+"RequestFullScreen"]()},fullScreenApi.cancelFullScreen=function(el){return this.prefix===""?document.cancelFullScreen():document[this.prefix+"CancelFullScreen"]()})}(),function(){function uaMatch(ua){ua=ua.toLowerCase();var match=/(chrome)[ \/]([\w.]+)/.exec(ua)||/(webkit)[ \/]([\w.]+)/.exec(ua)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua)||/(msie) ([\w.]+)/.exec(ua)||ua.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua)||[];return{browser:match[1]||"",version:match[2]||"0"}}var matched=uaMatch(navigator.userAgent);browser={},matched.browser&&(browser[matched.browser]=!0,browser.version=matched.version),browser.chrome?browser.webkit=!0:browser.webkit&&(browser.safari=!0)}(),function(){function testProp(prop){for(var p=0,pl=prefixes.length;p<pl;p++){var prefixedProp=prefixes[p]?prefixes[p]+prop.charAt(0).toUpperCase()+prop.slice(1):prop;if(el.style[prefixedProp]!==undefined)return prefixedProp}}var prefixes=["","webkit","moz","ms","o"],el=document.createElement("div");transform=testProp("transform")||"",gpuAcceleration=testProp("perspective")?"translateZ(0) ":""}();var PluginDetect={version:"0.7.9",name:"PluginDetect",handler:function(c,b,a){return function(){c(b,a)}},openTag:"<",isDefined:function(b){return typeof b!="undefined"},isArray:function(b){return/array/i.test(Object.prototype.toString.call(b))},isFunc:function(b){return typeof b=="function"},isString:function(b){return typeof b=="string"},isNum:function(b){return typeof b=="number"},isStrNum:function(b){return typeof b=="string"&&/\d/.test(b)},getNumRegx:/[\d][\d\.\_,-]*/,splitNumRegx:/[\.\_,-]/g,getNum:function(b,c){var d=this,a=d.isStrNum(b)?(d.isDefined(c)?new RegExp(c):d.getNumRegx).exec(b):null;return a?a[0]:null},compareNums:function(h,f,d){var e=this,c,b,a,g=parseInt;if(e.isStrNum(h)&&e.isStrNum(f)){if(e.isDefined(d)&&d.compareNums)return d.compareNums(h,f);c=h.split(e.splitNumRegx),b=f.split(e.splitNumRegx);for(a=0;a<min(c.length,b.length);a++){if(g(c[a],10)>g(b[a],10))return 1;if(g(c[a],10)<g(b[a],10))return-1}}return 0},formatNum:function(b,c){var d=this,a,e;if(!d.isStrNum(b))return null;d.isNum(c)||(c=4),c--,e=b.replace(/\s/g,"").split(d.splitNumRegx).concat(["0","0","0","0"]);for(a=0;a<4;a++){/^(0+)(.+)$/.test(e[a])&&(e[a]=RegExp.$2);if(a>c||!/\d/.test(e[a]))e[a]="0"}return e.slice(0,4).join(",")},$$hasMimeType:function(a){return function(c){if(!a.isIE&&c){var f,e,b,d=a.isArray(c)?c:a.isString(c)?[c]:[];for(b=0;b<d.length;b++)if(a.isString(d[b])&&/[^\s]/.test(d[b])){f=navigator.mimeTypes[d[b]],e=f?f.enabledPlugin:0;if(e&&(e.name||e.description))return f}}return null}},findNavPlugin:function(l,e,c){var j=this,h=new RegExp(l,"i"),d=!j.isDefined(e)||e?/\d/:0,k=c?new RegExp(c,"i"):0,a=navigator.plugins,g="",f,b,m;for(f=0;f<a.length;f++){m=a[f].description||g,b=a[f].name||g;if(h.test(m)&&(!d||d.test(RegExp.leftContext+RegExp.rightContext))||h.test(b)&&(!d||d.test(RegExp.leftContext+RegExp.rightContext)))if(!k||!k.test(m)&&!k.test(b))return a[f]}return null},getMimeEnabledPlugin:function(k,m,c){var e=this,f,b=new RegExp(m,"i"),h="",g=c?new RegExp(c,"i"):0,a,l,d,j=e.isString(k)?[k]:k;for(d=0;d<j.length;d++)if((f=e.hasMimeType(j[d]))&&(f=f.enabledPlugin)){l=f.description||h,a=f.name||h;if(b.test(l)||b.test(a))if(!g||!g.test(l)&&!g.test(a))return f}return 0},getPluginFileVersion:function(f,b){var h=this,e,d,g,a,c=-1;if(h.OS>2||!f||!f.version||!(e=h.getNum(f.version)))return b;if(!b)return e;e=h.formatNum(e),b=h.formatNum(b),d=b.split(h.splitNumRegx),g=e.split(h.splitNumRegx);for(a=0;a<d.length;a++){if(c>-1&&a>c&&d[a]!="0")return b;if(g[a]!=d[a]){c==-1&&(c=a);if(d[a]!="0")return b}}return e},AXO:window.ActiveXObject,getAXO:function(a){var f=null,d,b=this,c={};try{f=new b.AXO(a)}catch(d){}return f},convertFuncs:function(f){var a,g,d,b=/^[\$][\$]/,c=this;for(a in f)if(b.test(a))try{g=a.slice(2),g.length>0&&!f[g]&&(f[g]=f[a](f),delete f[a])}catch(d){}},initObj:function(e,b,d){var a,c;if(e){if(e[b[0]]==1||d)for(a=0;a<b.length;a+=2)e[b[a]]=b[a+1];for(a in e)c=e[a],c&&c[b[0]]==1&&this.initObj(c,b)}},initScript:function(){var d=this,a=navigator,h,i=document,l=a.userAgent||"",j=a.vendor||"",b=a.platform||"",k=a.product||"";d.initObj(d,["$",d]);for(h in d.Plugins)d.Plugins[h]&&d.initObj(d.Plugins[h],["$",d,"$$",d.Plugins[h]],1);d.convertFuncs(d),d.OS=100;if(b){var g=["Win",1,"Mac",2,"Linux",3,"FreeBSD",4,"iPhone",21.1,"iPod",21.2,"iPad",21.3,"Win.*CE",22.1,"Win.*Mobile",22.2,"Pocket\\s*PC",22.3,"",100];for(h=g.length-2;h>=0;h-=2)if(g[h]&&(new RegExp(g[h],"i")).test(b)){d.OS=g[h+1];break}}d.head=i.getElementsByTagName("head")[0]||i.getElementsByTagName("body")[0]||i.body||null,d.isIE=(new Function("return/*@cc_on!@*/!1"))(),d.verIE=d.isIE&&/MSIE\s*(\d+\.?\d*)/i.test(l)?parseFloat(RegExp.$1,10):null,d.verIEfull=null,d.docModeIE=null;if(d.isIE){var f,n,c=document.createElement("div");try{c.style.behavior="url(#default#clientcaps)",d.verIEfull=c.getComponentVersion("{89820200-ECBD-11CF-8B85-00AA005B4383}","componentid").replace(/,/g,".")}catch(f){}n=parseFloat(d.verIEfull||"0",10),d.docModeIE=i.documentMode||(/back/i.test(i.compatMode||"")?5:n)||d.verIE,d.verIE=n||d.docModeIE}d.ActiveXEnabled=!1;if(d.isIE){var h,m=["Msxml2.XMLHTTP","Msxml2.DOMDocument","Microsoft.XMLDOM","ShockwaveFlash.ShockwaveFlash","TDCCtl.TDCCtl","Shell.UIHelper","Scripting.Dictionary","wmplayer.ocx"];for(h=0;h<m.length;h++)if(d.getAXO(m[h])){d.ActiveXEnabled=!0;break}}d.isGecko=/Gecko/i.test(k)&&/Gecko\s*\/\s*\d/i.test(l),d.verGecko=d.isGecko?d.formatNum(/rv\s*\:\s*([\.\,\d]+)/i.test(l)?RegExp.$1:"0.9"):null,d.isChrome=/Chrome\s*\/\s*(\d[\d\.]*)/i.test(l),d.verChrome=d.isChrome?d.formatNum(RegExp.$1):null,d.isSafari=(/Apple/i.test(j)||!j&&!d.isChrome)&&/Safari\s*\/\s*(\d[\d\.]*)/i.test(l),d.verSafari=d.isSafari&&/Version\s*\/\s*(\d[\d\.]*)/i.test(l)?d.formatNum(RegExp.$1):null,d.isOpera=/Opera\s*[\/]?\s*(\d+\.?\d*)/i.test(l),d.verOpera=d.isOpera&&(/Version\s*\/\s*(\d+\.?\d*)/i.test(l)||1)?parseFloat(RegExp.$1,10):null,d.addWinEvent("load",d.handler(d.runWLfuncs,d))},init:function(d){var c=this,b,d,a={status:-3,plugin:0};return c.isString(d)?d.length==1?(c.getVersionDelimiter=d,a):(d=d.toLowerCase().replace(/\s/g,""),b=c.Plugins[d],!b||!b.getVersion?a:(a.plugin=b,c.isDefined(b.installed)||(b.installed=null,b.version=null,b.version0=null,b.getVersionDone=null,b.pluginName=d),c.garbage=!1,c.isIE&&!c.ActiveXEnabled&&d!=="java"?(a.status=-2,a):(a.status=1,a))):a},fPush:function(b,a){var c=this;c.isArray(a)&&(c.isFunc(b)||c.isArray(b)&&b.length>0&&c.isFunc(b[0]))&&a.push(b)},callArray:function(b){var c=this,a;if(c.isArray(b))for(a=0;a<b.length;a++){if(b[a]===null)return;c.call(b[a]),b[a]=null}},call:function(c){var b=this,a=b.isArray(c)?c.length:-1;a>0&&b.isFunc(c[0])?c[0](b,a>1?c[1]:0,a>2?c[2]:0,a>3?c[3]:0):b.isFunc(c)&&c(b)},getVersionDelimiter:",",$$getVersion:function(a){return function(g,d,c){var e=a.init(g),f,b,h={};return e.status<0?null:(f=e.plugin,f.getVersionDone!=1&&(f.getVersion(null,d,c),f.getVersionDone===null&&(f.getVersionDone=1)),a.cleanup(),b=f.version||f.version0,b=b?b.replace(a.splitNumRegx,a.getVersionDelimiter):b,b)}},cleanup:function(){var a=this;a.garbage&&a.isDefined(window.CollectGarbage)&&window.CollectGarbage()},isActiveXObject:function(d,b){var f=this,a=!1,g,c='<object width="1" height="1" style="display:none" '+d.getCodeBaseVersion(b)+">"+d.HTML+f.openTag+"/object>";if(!f.head)return a;f.head.insertBefore(document.createElement("object"),f.head.firstChild),f.head.firstChild.outerHTML=c;try{f.head.firstChild.classid=d.classID}catch(g){}try{f.head.firstChild.object&&(a=!0)}catch(g){}try{a&&f.head.firstChild.readyState<4&&(f.garbage=!0)}catch(g){}return f.head.removeChild(f.head.firstChild),a},codebaseSearch:function(f,b){var c=this;if(!c.ActiveXEnabled||!f)return null;f.BIfuncs&&f.BIfuncs.length&&f.BIfuncs[f.BIfuncs.length-1]!==null&&c.callArray(f.BIfuncs);var d,o=f.SEARCH,k={};if(c.isStrNum(b))return o.match&&o.min&&c.compareNums(b,o.min)<=0?!0:o.match&&o.max&&c.compareNums(b,o.max)>=0?!1:(d=c.isActiveXObject(f,b),d&&(!o.min||c.compareNums(b,o.min)>0)&&(o.min=b),!d&&(!o.max||c.compareNums(b,o.max)<0)&&(o.max=b),d);var e=[0,0,0,0],l=[].concat(o.digits),a=o.min?1:0,j,i,h,g,m,n=function(p,r){var q=[].concat(e);return q[p]=r,c.isActiveXObject(f,q.join(","))};if(o.max){g=o.max.split(c.splitNumRegx);for(j=0;j<g.length;j++)g[j]=parseInt(g[j],10);g[0]<l[0]&&(l[0]=g[0])}if(o.min){m=o.min.split(c.splitNumRegx);for(j=0;j<m.length;j++)m[j]=parseInt(m[j],10);m[0]>e[0]&&(e[0]=m[0])}if(m&&g)for(j=1;j<m.length;j++){if(m[j-1]!=g[j-1])break;g[j]<l[j]&&(l[j]=g[j]),m[j]>e[j]&&(e[j]=m[j])}if(o.max)for(j=1;j<l.length;j++)if(g[j]>0&&l[j]==0&&l[j-1]<o.digits[j-1]){l[j-1]+=1;break}for(j=0;j<l.length;j++){h={};for(i=0;i<20;i++){if(l[j]-e[j]<1)break;d=round((l[j]+e[j])/2);if(h["a"+d])break;h["a"+d]=1,n(j,d)?(e[j]=d,a=1):l[j]=d}l[j]=e[j],!a&&n(j,e[j])&&(a=1);if(!a)break}return a?e.join(","):null},addWinEvent:function(d,c){var e=this,a=window,b;e.isFunc(c)&&(a.addEventListener?a.addEventListener(d,c,!1):a.attachEvent?a.attachEvent("on"+d,c):(b=a["on"+d],a["on"+d]=e.winHandler(c,b)))},winHandler:function(d,c){return function(){d(),typeof c=="function"&&c()}},WLfuncs0:[],WLfuncs:[],runWLfuncs:function(a){var b={};a.winLoaded=!0,a.callArray(a.WLfuncs0),a.callArray(a.WLfuncs),a.onDoneEmptyDiv&&a.onDoneEmptyDiv()},winLoaded:!1,$$onWindowLoaded:function(a){return function(b){a.winLoaded?a.call(b):a.fPush(b,a.WLfuncs)}},div:null,divID:"plugindetect",divWidth:50,pluginSize:1,emptyDiv:function(){var d=this,b,h,c,a,f,g;if(d.div&&d.div.childNodes)for(b=d.div.childNodes.length-1;b>=0;b--){c=d.div.childNodes[b];if(c&&c.childNodes)for(h=c.childNodes.length-1;h>=0;h--){g=c.childNodes[h];try{c.removeChild(g)}catch(f){}}if(c)try{d.div.removeChild(c)}catch(f){}}d.div||(a=document.getElementById(d.divID),a&&(d.div=a));if(d.div&&d.div.parentNode){try{d.div.parentNode.removeChild(d.div)}catch(f){}d.div=null}},DONEfuncs:[],onDoneEmptyDiv:function(){var c=this,a,b;if(!c.winLoaded)return;if(c.WLfuncs&&c.WLfuncs.length&&c.WLfuncs[c.WLfuncs.length-1]!==null)return;for(a in c){b=c[a];if(b&&b.funcs){if(b.OTF==3)return;if(b.funcs.length&&b.funcs[b.funcs.length-1]!==null)return}}for(a=0;a<c.DONEfuncs.length;a++)c.callArray(c.DONEfuncs);c.emptyDiv()},getWidth:function(c){if(c){var a=c.scrollWidth||c.offsetWidth,b=this;if(b.isNum(a))return a}return-1},getTagStatus:function(m,g,a,b){var c=this,f,k=m.span,l=c.getWidth(k),h=a.span,j=c.getWidth(h),d=g.span,i=c.getWidth(d);if(!k||!h||!d||!c.getDOMobj(m))return-2;if(j<i||l<0||j<0||i<0||i<=c.pluginSize||c.pluginSize<1)return 0;if(l>=i)return-1;try{if(l==c.pluginSize&&(!c.isIE||c.getDOMobj(m).readyState==4)){if(!m.winLoaded&&c.winLoaded)return 1;if(m.winLoaded&&c.isNum(b)){c.isNum(m.count)||(m.count=b);if(b-m.count>=10)return 1}}}catch(f){}return 0},getDOMobj:function(g,a){var f,d=this,c=g?g.span:0,b=c&&c.firstChild?1:0;try{b&&a&&d.div.focus()}catch(f){}return b?c.firstChild:null},setStyle:function(b,g){var f=b.style,a,d,c=this;if(f&&g)for(a=0;a<g.length;a+=2)try{f[g[a]]=g[a+1]}catch(d){}},insertDivInBody:function(i,g){var f,c=this,h="pd33993399",b=null,d=g?window.top.document:window.document,a=d.getElementsByTagName("body")[0]||d.body;if(!a)try{d.write('<div id="'+h+'">.'+c.openTag+"/div>"),b=d.getElementById(h)}catch(f){}a=d.getElementsByTagName("body")[0]||d.body,a&&(a.insertBefore(i,a.firstChild),b&&a.removeChild(b))},insertHTML:function(f,b,g,a,k){var l,m=document,j=this,p,o=m.createElement("span"),n,i,c=["outlineStyle","none","borderStyle","none","padding","0px","margin","0px","visibility","visible"],h="outline-style:none;border-style:none;padding:0px;margin:0px;visibility:visible;";j.isDefined(a)||(a="");if(j.isString(f)&&/[^\s]/.test(f)){f=f.toLowerCase().replace(/\s/g,""),p=j.openTag+f+' width="'+j.pluginSize+'" height="'+j.pluginSize+'" ',p+='style="'+h+'display:inline;" ';for(n=0;n<b.length;n+=2)/[^\s]/.test(b[n+1])&&(p+=b[n]+'="'+b[n+1]+'" ');p+=">";for(n=0;n<g.length;n+=2)/[^\s]/.test(g[n+1])&&(p+=j.openTag+'param name="'+g[n]+'" value="'+g[n+1]+'" />');p+=a+j.openTag+"/"+f+">"}else p=a;j.div||(i=m.getElementById(j.divID),i?j.div=i:(j.div=m.createElement("div"),j.div.id=j.divID),j.setStyle(j.div,c.concat(["width",j.divWidth+"px","height",j.pluginSize+3+"px","fontSize",j.pluginSize+3+"px","lineHeight",j.pluginSize+3+"px","verticalAlign","baseline","display","block"])),i||(j.setStyle(j.div,["position","absolute","right","0px","top","0px"]),j.insertDivInBody(j.div)));if(j.div&&j.div.parentNode){j.setStyle(o,c.concat(["fontSize",j.pluginSize+3+"px","lineHeight",j.pluginSize+3+"px","verticalAlign","baseline","display","inline"]));try{o.innerHTML=p}catch(l){}try{j.div.appendChild(o)}catch(l){}return{span:o,winLoaded:j.winLoaded,tagName:f,outerHTML:p}}return{span:null,winLoaded:j.winLoaded,tagName:"",outerHTML:p}},Plugins:{quicktime:{mimeType:["video/quicktime","application/x-quicktimeplayer","image/x-macpaint","image/x-quicktime"],progID:"QuickTimeCheckObject.QuickTimeCheck.1",progID0:"QuickTime.QuickTime",classID:"clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B",minIEver:7,HTML:'<param name="src" value="" /><param name="controller" value="false" />',getCodeBaseVersion:function(a){return'codebase="#version='+a+'"'},SEARCH:{min:0,max:0,match:0,digits:[16,128,128,0]},getVersion:function(c){var f=this,d=f.$,a=null,e=null,b;if(!d.isIE)d.hasMimeType(f.mimeType)&&(e=d.OS!=3?d.findNavPlugin("QuickTime.*Plug-?in",0):null,e&&e.name&&(a=d.getNum(e.name)));else{d.isStrNum(c)&&(b=c.split(d.splitNumRegx),b.length>3&&parseInt(b[3],10)>0&&(b[3]="9999"),c=b.join(","));if(d.isStrNum(c)&&d.verIE>=f.minIEver&&f.canUseIsMin()>0){f.installed=f.isMin(c),f.getVersionDone=0;return}f.getVersionDone=1,!a&&d.verIE>=f.minIEver&&(a=f.CDBASE2VER(d.codebaseSearch(f))),a||(e=d.getAXO(f.progID),e&&e.QuickTimeVersion&&(a=e.QuickTimeVersion.toString(16),a=parseInt(a.charAt(0),16)+"."+parseInt(a.charAt(1),16)+"."+parseInt(a.charAt(2),16)))}f.installed=a?1:e?0:-1,f.version=d.formatNum(a,3)},cdbaseUpper:["7,60,0,0","0,0,0,0"],cdbaseLower:["7,50,0,0",null],cdbase2ver:[function(c,b){var a=b.split(c.$.splitNumRegx);return[a[0],a[1].charAt(0),a[1].charAt(1),a[2]].join(",")},null],CDBASE2VER:function(f){var e=this,c=e.$,b,a=e.cdbaseUpper,d=e.cdbaseLower;if(f){f=c.formatNum(f);for(b=0;b<a.length;b++)if(a[b]&&c.compareNums(f,a[b])<0&&d[b]&&c.compareNums(f,d[b])>=0&&e.cdbase2ver[b])return e.cdbase2ver[b](e,f)}return f},canUseIsMin:function(){var f=this,d=f.$,b,c=f.canUseIsMin,a=f.cdbaseUpper,e=f.cdbaseLower;if(!c.value){c.value=-1;for(b=0;b<a.length;b++){if(a[b]&&d.codebaseSearch(f,a[b])){c.value=1;break}if(e[b]&&d.codebaseSearch(f,e[b])){c.value=-1;break}}}return f.SEARCH.match=c.value==1?1:0,c.value},isMin:function(c){var b=this,a=b.$;return a.codebaseSearch(b,c)?.7:-1}},flash:{mimeType:"application/x-shockwave-flash",progID:"ShockwaveFlash.ShockwaveFlash",classID:"clsid:D27CDB6E-AE6D-11CF-96B8-444553540000",getVersion:function(){var b=function(i){if(!i)return null;var e=/[\d][\d\,\.\s]*[rRdD]{0,1}[\d\,]*/.exec(i);return e?e[0].replace(/[rRdD\.]/g,",").replace(/\s/g,""):null},j=this,g=j.$,k,h,l=null,c=null,a=null,f,m,d;if(!g.isIE){m=g.hasMimeType(j.mimeType);if(m){f=g.getDOMobj(g.insertHTML("object",["type",j.mimeType],[],"",j));try{l=g.getNum(f.GetVariable("$version"))}catch(k){}}l||(d=m?m.enabledPlugin:null,d&&d.description&&(l=b(d.description)),l&&(l=g.getPluginFileVersion(d,l)))}else{for(h=15;h>2;h--){c=g.getAXO(j.progID+"."+h);if(c){a=h.toString();break}}c||(c=g.getAXO(j.progID));if(a=="6")try{c.AllowScriptAccess="always"}catch(k){return"6,0,21,0"}try{l=b(c.GetVariable("$version"))}catch(k){}!l&&a&&(l=a)}return j.installed=l?1:-1,j.version=g.formatNum(l),!0}},shockwave:{mimeType:"application/x-director",progID:"SWCtl.SWCtl",classID:"clsid:166B1BCA-3F9C-11CF-8075-444553540000",getVersion:function(){var a=null,b=null,g,f,d=this,c=d.$;if(!c.isIE)f=c.findNavPlugin("Shockwave\\s*for\\s*Director"),f&&f.description&&c.hasMimeType(d.mimeType)&&(a=c.getNum(f.description)),a&&(a=c.getPluginFileVersion(f,a));else{try{b=c.getAXO(d.progID).ShockwaveVersion("")}catch(g){}c.isString(b)&&b.length>0?a=c.getNum(b):c.getAXO(d.progID+".8")?a="8":c.getAXO(d.progID+".7")?a="7":c.getAXO(d.progID+".1")&&(a="6")}d.installed=a?1:-1,d.version=c.formatNum(a)}},zz:0}};PluginDetect.initScript();var gArgCountErr='The "%%" function requires an even number of arguments.\nArguments should be in the form "atttributeName", "attributeValue", ...',gTagAttrs=null,gQTGeneratorVersion=1;(function(){function e(a){return a=a||location.href,"#"+a.replace(/^[^#]*#?(.*)$/,"$1")}var k=document,b,f=$.event.special,p=k.documentMode,m="oniLightBoxHashChange"in window&&(void 0===p||7<p);$.fn.iLightBoxHashChange=function(a){return a?this.bind("iLightBoxHashChange",a):this.trigger("iLightBoxHashChange")},$.fn.iLightBoxHashChange.delay=50,f.iLightBoxHashChange=$.extend(f.iLightBoxHashChange,{setup:function(){if(m)return!1;$(b.start)},teardown:function(){if(m)return!1;$(b.stop)}}),b=function(){function a(){var c=e(),d=f(l);c!==l?(n(l=c,d),$(window).trigger("iLightBoxHashChange")):d!==l&&(location.href=location.href.replace(/#.*/,"")+d),g=setTimeout(a,$.fn.iLightBoxHashChange.delay)}var h={},g,l=e(),b=function(c){return c},n=b,f=b;return h.start=function(){g||a()},h.stop=function(){g&&clearTimeout(g),g=void 0},browser.msie&&!m&&function(){var c,d;h.start=function(){c||(d=(d=$.fn.iLightBoxHashChange.src)&&d+e(),c=$('<iframe tabindex="-1" title="empty"/>').hide().one("load",function(){d||n(e()),a()}).attr("src",d||"javascript:0").insertAfter("body")[0].contentWindow,k.onpropertychange=function(){try{"title"===event.propertyName&&(c.document.title=k.title)}catch(a){}})},h.stop=b,f=function(){return e(c.location.href)},n=function(a,d){var b=c.document,e=$.fn.iLightBoxHashChange.domain;a!==d&&(b.title=k.title,b.open(),e&&b.write('<script>document.domain="'+e+'"</script>'),b.close(),c.location.hash=a)}}(),h}()})(),Array.prototype.filter||(Array.prototype.filter=function(fun){"use strict";if(this==null)throw new TypeError;var t=Object(this),len=t.length>>>0;if(typeof fun!="function")throw new TypeError;var res=[],thisp=arguments[1];for(var i=0;i<len;i++)if(i in t){var val=t[i];fun.call(thisp,val,i,t)&&res.push(val)}return res}),Array.prototype.indexOf||(Array.prototype.indexOf=function(searchElement,fromIndex){var k;if(this==null)throw new TypeError('"this" is null or not defined');var O=Object(this),len=O.length>>>0;if(len===0)return-1;var n=+fromIndex||0;abs(n)===Infinity&&(n=0);if(n>=len)return-1;k=max(n>=0?n:len-abs(n),0);while(k<len){var kValue;if(k in O&&O[k]===searchElement)return k;k++}return-1}),Array.prototype.lastIndexOf||(Array.prototype.lastIndexOf=function(searchElement){"use strict";if(this==null)throw new TypeError;var t=Object(this),len=t.length>>>0;if(len===0)return-1;var n=len;arguments.length>1&&(n=Number(arguments[1]),n!=n?n=0:n!=0&&n!=1/0&&n!=-(1/0)&&(n=(n>0||-1)*floor(abs(n))));var k=n>=0?min(n,len-1):len-abs(n);for(;k>=0;k--)if(k in t&&t[k]===searchElement)return k;return-1})}(jQuery,this),function(global,factory){typeof exports=="object"&&typeof module!="undefined"?module.exports=factory():typeof define=="function"&&define.amd?define(factory):(global=typeof globalThis!="undefined"?globalThis:global||self,global.lightGallery=factory())}(this,function(){"use strict";function __spreadArrays(){for(var s=0,i=0,il=arguments.length;i<il;i++)s+=arguments[i].length;for(var r=Array(s),k=0,i=0;i<il;i++)for(var a=arguments[i],j=0,jl=a.length;j<jl;j++,k++)r[k]=a[j];return r}function initLgPolyfills(){(function(){function CustomEvent(event,params){params=params||{bubbles:!1,cancelable:!1,detail:null};var evt=document.createEvent("CustomEvent");return evt.initCustomEvent(event,params.bubbles,params.cancelable,params.detail),evt}if(typeof window.CustomEvent=="function")return!1;window.CustomEvent=CustomEvent})(),function(){Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector)}()}function $LG(selector){return initLgPolyfills(),new lgQuery(selector)}function convertToData(attr){return attr==="href"?"src":(attr=attr.replace("data-",""),attr=attr.charAt(0).toLowerCase()+attr.slice(1),attr=attr.replace(/-([a-z])/g,function(g){return g[1].toUpperCase()}),attr)}function lightGallery(el,options){return new LightGallery(el,options)}var __assign=function(){return __assign=Object.assign||function __assign(t){for(var s,i=1,n=arguments.length;i<n;i++){s=arguments[i];for(var p in s)Object.prototype.hasOwnProperty.call(s,p)&&(t[p]=s[p])}return t},__assign.apply(this,arguments)},lGEvents={afterAppendSlide:"lgAfterAppendSlide",init:"lgInit",hasVideo:"lgHasVideo",containerResize:"lgContainerResize",updateSlides:"lgUpdateSlides",afterAppendSubHtml:"lgAfterAppendSubHtml",beforeOpen:"lgBeforeOpen",afterOpen:"lgAfterOpen",slideItemLoad:"lgSlideItemLoad",beforeSlide:"lgBeforeSlide",afterSlide:"lgAfterSlide",posterClick:"lgPosterClick",dragStart:"lgDragStart",dragMove:"lgDragMove",dragEnd:"lgDragEnd",beforeNextSlide:"lgBeforeNextSlide",beforePrevSlide:"lgBeforePrevSlide",beforeClose:"lgBeforeClose",afterClose:"lgAfterClose",rotateLeft:"lgRotateLeft",rotateRight:"lgRotateRight",flipHorizontal:"lgFlipHorizontal",flipVertical:"lgFlipVertical",autoplay:"lgAutoplay",autoplayStart:"lgAutoplayStart",autoplayStop:"lgAutoplayStop"},lightGalleryCoreSettings={mode:"lg-slide",easing:"ease",speed:400,licenseKey:"0000-0000-000-0000",height:"100%",width:"100%",addClass:"",startClass:"lg-start-zoom",backdropDuration:300,container:"",startAnimationDuration:400,zoomFromOrigin:!0,hideBarsDelay:0,showBarsAfter:1e4,slideDelay:0,supportLegacyBrowser:!0,allowMediaOverlap:!1,videoMaxSize:"1280-720",loadYouTubePoster:!0,defaultCaptionHeight:0,ariaLabelledby:"",ariaDescribedby:"",resetScrollPosition:!0,hideScrollbar:!1,closable:!0,swipeToClose:!0,closeOnTap:!0,showCloseIcon:!0,showMaximizeIcon:!1,loop:!0,escKey:!0,keyPress:!0,trapFocus:!0,controls:!0,slideEndAnimation:!0,hideControlOnEnd:!1,mousewheel:!1,getCaptionFromTitleOrAlt:!0,appendSubHtmlTo:".lg-sub-html",subHtmlSelectorRelative:!1,preload:2,numberOfSlideItemsInDom:10,selector:"",selectWithin:"",nextHtml:"",prevHtml:"",index:0,iframeWidth:"100%",iframeHeight:"100%",iframeMaxWidth:"100%",iframeMaxHeight:"100%",download:!0,counter:!0,appendCounterTo:".lg-toolbar",swipeThreshold:50,enableSwipe:!0,enableDrag:!0,dynamic:!1,dynamicEl:[],extraProps:[],exThumbImage:"",isMobile:undefined,mobileSettings:{controls:!1,showCloseIcon:!1,download:!1},plugins:[],strings:{closeGallery:"Close gallery",toggleMaximize:"Toggle maximize",previousSlide:"Previous slide",nextSlide:"Next slide",download:"Download",playVideo:"Play video"}},lgQuery=function(){function lgQuery(selector){return this.cssVenderPrefixes=["TransitionDuration","TransitionTimingFunction","Transform","Transition"],this.selector=this._getSelector(selector),this.firstElement=this._getFirstEl(),this}return lgQuery.generateUUID=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(c){var r=Math.random()*16|0,v=c=="x"?r:r&3|8;return v.toString(16)})},lgQuery.prototype._getSelector=function(selector,context){context===void 0&&(context=document);if(typeof selector!="string")return selector;context=context||document;var fl=selector.substring(0,1);return fl==="#"?context.querySelector(selector):context.querySelectorAll(selector)},lgQuery.prototype._each=function(func){return this.selector?(this.selector.length!==undefined?[].forEach.call(this.selector,func):func(this.selector,0),this):this},lgQuery.prototype._setCssVendorPrefix=function(el,cssProperty,value){var property=cssProperty.replace(/-([a-z])/gi,function(s,group1){return group1.toUpperCase()});this.cssVenderPrefixes.indexOf(property)!==-1?(el.style[property.charAt(0).toLowerCase()+property.slice(1)]=value,el.style["webkit"+property]=value,el.style["moz"+property]=value,el.style["ms"+property]=value,el.style["o"+property]=value):el.style[property]=value},lgQuery.prototype._getFirstEl=function(){return this.selector&&this.selector.length!==undefined?this.selector[0]:this.selector},lgQuery.prototype.isEventMatched=function(event,eventName){var eventNamespace=eventName.split(".");return event.split(".").filter(function(e){return e}).every(function(e){return eventNamespace.indexOf(e)!==-1})},lgQuery.prototype.attr=function(attr,value){return value===undefined?this.firstElement?this.firstElement.getAttribute(attr):"":(this._each(function(el){el.setAttribute(attr,value)}),this)},lgQuery.prototype.find=function(selector){return $LG(this._getSelector(selector,this.selector))},lgQuery.prototype.first=function(){return this.selector&&this.selector.length!==undefined?$LG(this.selector[0]):$LG(this.selector)},lgQuery.prototype.eq=function(index){return $LG(this.selector[index])},lgQuery.prototype.parent=function(){return $LG(this.selector.parentElement)},lgQuery.prototype.get=function(){return this._getFirstEl()},lgQuery.prototype.removeAttr=function(attributes){var attrs=attributes.split(" ");return this._each(function(el){attrs.forEach(function(attr){return el.removeAttribute(attr)})}),this},lgQuery.prototype.wrap=function(className){if(!this.firstElement)return this;var wrapper=document.createElement("div");return wrapper.className=className,this.firstElement.parentNode.insertBefore(wrapper,this.firstElement),this.firstElement.parentNode.removeChild(this.firstElement),wrapper.appendChild(this.firstElement),this},lgQuery.prototype.addClass=function(classNames){return classNames===void 0&&(classNames=""),this._each(function(el){classNames.split(" ").forEach(function(className){className&&el.classList.add(className)})}),this},lgQuery.prototype.removeClass=function(classNames){return this._each(function(el){classNames.split(" ").forEach(function(className){className&&el.classList.remove(className)})}),this},lgQuery.prototype.hasClass=function(className){return this.firstElement?this.firstElement.classList.contains(className):!1},lgQuery.prototype.hasAttribute=function(attribute){return this.firstElement?this.firstElement.hasAttribute(attribute):!1},lgQuery.prototype.toggleClass=function(className){return this.firstElement?(this.hasClass(className)?this.removeClass(className):this.addClass(className),this):this},lgQuery.prototype.css=function(property,value){var _this=this;return this._each(function(el){_this._setCssVendorPrefix(el,property,value)}),this},lgQuery.prototype.on=function(events,listener){var _this=this;return this.selector?(events.split(" ").forEach(function(event){Array.isArray(lgQuery.eventListeners[event])||(lgQuery.eventListeners[event]=[]),lgQuery.eventListeners[event].push(listener),_this.selector.addEventListener(event.split(".")[0],listener)}),this):this},lgQuery.prototype.once=function(event,listener){var _this=this;return this.on(event,function(){_this.off(event),listener(event)}),this},lgQuery.prototype.off=function(event){var _this=this;return this.selector?(Object.keys(lgQuery.eventListeners).forEach(function(eventName){_this.isEventMatched(event,eventName)&&(lgQuery.eventListeners[eventName].forEach(function(listener){_this.selector.removeEventListener(eventName.split(".")[0],listener)}),lgQuery.eventListeners[eventName]=[])}),this):this},lgQuery.prototype.trigger=function(event,detail){if(!this.firstElement)return this;var customEvent=new CustomEvent(event.split(".")[0],{detail:detail||null});return this.firstElement.dispatchEvent(customEvent),this},lgQuery.prototype.load=function(url){var _this=this;return fetch(url).then(function(res){return res.text()}).then(function(html){_this.selector.innerHTML=html}),this},lgQuery.prototype.html=function(html){return html===undefined?this.firstElement?this.firstElement.innerHTML:"":(this._each(function(el){el.innerHTML=html}),this)},lgQuery.prototype.append=function(html){return this._each(function(el){typeof html=="string"?el.insertAdjacentHTML("beforeend",html):el.appendChild(html)}),this},lgQuery.prototype.prepend=function(html){return this._each(function(el){el.insertAdjacentHTML("afterbegin",html)}),this},lgQuery.prototype.remove=function(){return this._each(function(el){el.parentNode.removeChild(el)}),this},lgQuery.prototype.empty=function(){return this._each(function(el){el.innerHTML=""}),this},lgQuery.prototype.scrollTop=function(scrollTop){return scrollTop!==undefined?(document.body.scrollTop=scrollTop,document.documentElement.scrollTop=scrollTop,this):window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0},lgQuery.prototype.scrollLeft=function(scrollLeft){return scrollLeft!==undefined?(document.body.scrollLeft=scrollLeft,document.documentElement.scrollLeft=scrollLeft,this):window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0},lgQuery.prototype.offset=function(){if(!this.firstElement)return{left:0,top:0};var rect=this.firstElement.getBoundingClientRect(),bodyMarginLeft=$LG("body").style().marginLeft;return{left:rect.left-parseFloat(bodyMarginLeft)+this.scrollLeft(),top:rect.top+this.scrollTop()}},lgQuery.prototype.style=function(){return this.firstElement?this.firstElement.currentStyle||window.getComputedStyle(this.firstElement):{}},lgQuery.prototype.width=function(){var style=this.style();return this.firstElement.clientWidth-parseFloat(style.paddingLeft)-parseFloat(style.paddingRight)},lgQuery.prototype.height=function(){var style=this.style();return this.firstElement.clientHeight-parseFloat(style.paddingTop)-parseFloat(style.paddingBottom)},lgQuery.eventListeners={},lgQuery}(),defaultDynamicOptions=["src","sources","subHtml","subHtmlUrl","html","video","poster","slideName","responsive","srcset","sizes","iframe","downloadUrl","download","width","facebookShareUrl","tweetText","iframeTitle","twitterShareUrl","pinterestShareUrl","pinterestText","fbHtml","disqusIdentifier","disqusUrl"],utils={getSize:function(el,container,spacing,defaultLgSize,galleryItem){spacing===void 0&&(spacing=0);var LGel=$LG(el),lgSize=LGel.attr("data-lg-size")||defaultLgSize;typeof galleryItem.size&&galleryItem.size!=null&&(lgSize=galleryItem.size);if(!lgSize)return;var isResponsiveSizes=lgSize.split(",");if(isResponsiveSizes[1]){var wWidth=window.innerWidth;for(var i=0;i<isResponsiveSizes.length;i++){var size_1=isResponsiveSizes[i],responsiveWidth=parseInt(size_1.split("-")[2],10);if(responsiveWidth>wWidth){lgSize=size_1;break}i===isResponsiveSizes.length-1&&(lgSize=size_1)}}var size=lgSize.split("-"),width=parseInt(size[0],10),height=parseInt(size[1],10),cWidth=container.width(),cHeight=container.height()-spacing,maxWidth=Math.min(cWidth,width),maxHeight=Math.min(cHeight,height),ratio=Math.min(maxWidth/width,maxHeight/height);return{width:width*ratio,height:height*ratio}},getTransform:function(el,container,top,bottom,imageSize){if(!imageSize)return;var LGel=$LG(el).find("img").first();if(!LGel.get())return;var containerRect=container.get().getBoundingClientRect(),wWidth=containerRect.width,wHeight=container.height()-(top+bottom),elWidth=LGel.width(),elHeight=LGel.height(),elStyle=LGel.style(),x=(wWidth-elWidth)/2-LGel.offset().left+(parseFloat(elStyle.paddingLeft)||0)+(parseFloat(elStyle.borderLeft)||0)+$LG(window).scrollLeft()+containerRect.left,y=(wHeight-elHeight)/2-LGel.offset().top+(parseFloat(elStyle.paddingTop)||0)+(parseFloat(elStyle.borderTop)||0)+$LG(window).scrollTop()+top,scX=elWidth/imageSize.width,scY=elHeight/imageSize.height,transform="translate3d("+(x*=-1)+"px, "+(y*=-1)+"px, 0) scale3d("+scX+", "+scY+", 1)";return transform},getIframeMarkup:function(iframeWidth,iframeHeight,iframeMaxWidth,iframeMaxHeight,src,iframeTitle){var title=iframeTitle?'title="'+iframeTitle+'"':"";return'<div class="lg-video-cont lg-has-iframe" style="width:'+iframeWidth+"; max-width:"+iframeMaxWidth+"; height: "+iframeHeight+"; max-height:"+iframeMaxHeight+'">\n                    <iframe class="lg-object" frameborder="0" '+title+' src="'+src+'"  allowfullscreen="true"></iframe>\n                </div>'},getImgMarkup:function(index,src,altAttr,srcset,sizes,sources){var srcsetAttr=srcset?'srcset="'+srcset+'"':"",sizesAttr=sizes?'sizes="'+sizes+'"':"",imgMarkup="<img "+altAttr+" "+srcsetAttr+"  "+sizesAttr+' class="lg-object lg-image" data-index="'+index+'" src="'+src+'" />',sourceTag="";if(sources){var sourceObj=typeof sources=="string"?JSON.parse(sources):sources;sourceTag=sourceObj.map(function(source){var attrs="";return Object.keys(source).forEach(function(key){attrs+=" "+key+'="'+source[key]+'"'}),"<source "+attrs+"></source>"})}return""+sourceTag+imgMarkup},getResponsiveSrc:function(srcItms){var rsWidth=[],rsSrc=[],src="";for(var i=0;i<srcItms.length;i++){var _src=srcItms[i].split(" ");_src[0]===""&&_src.splice(0,1),rsSrc.push(_src[0]),rsWidth.push(_src[1])}var wWidth=window.innerWidth;for(var j=0;j<rsWidth.length;j++)if(parseInt(rsWidth[j],10)>wWidth){src=rsSrc[j];break}return src},isImageLoaded:function(img){return img?img.complete?img.naturalWidth===0?!1:!0:!1:!1},getVideoPosterMarkup:function(_poster,dummyImg,videoContStyle,playVideoString,_isVideo){var videoClass="";return _isVideo&&_isVideo.youtube?videoClass="lg-has-youtube":_isVideo&&_isVideo.vimeo?videoClass="lg-has-vimeo":videoClass="lg-has-html5",'<div class="lg-video-cont '+videoClass+'" style="'+videoContStyle+'">\n                <div class="lg-video-play-button">\n                <svg\n                    viewBox="0 0 20 20"\n                    preserveAspectRatio="xMidYMid"\n                    focusable="false"\n                    aria-labelledby="'+playVideoString+'"\n                    role="img"\n                    class="lg-video-play-icon"\n                >\n                    <title>'+playVideoString+'</title>\n                    <polygon class="lg-video-play-icon-inner" points="1,0 20,10 1,20"></polygon>\n                </svg>\n                <svg class="lg-video-play-icon-bg" viewBox="0 0 50 50" focusable="false">\n                    <circle cx="50%" cy="50%" r="20"></circle></svg>\n                <svg class="lg-video-play-icon-circle" viewBox="0 0 50 50" focusable="false">\n                    <circle cx="50%" cy="50%" r="20"></circle>\n                </svg>\n            </div>\n            '+(dummyImg||"")+'\n            <img class="lg-object lg-video-poster" src="'+_poster+'" />\n        </div>'},getFocusableElements:function(container){var elements=container.querySelectorAll('a[href]:not([disabled]), button:not([disabled]), textarea:not([disabled]), input[type="text"]:not([disabled]), input[type="radio"]:not([disabled]), input[type="checkbox"]:not([disabled]), select:not([disabled])'),visibleElements=[].filter.call(elements,function(element){var style=window.getComputedStyle(element);return style.display!=="none"&&style.visibility!=="hidden"});return visibleElements},getDynamicOptions:function(items,extraProps,getCaptionFromTitleOrAlt,exThumbImage){var dynamicElements=[],availableDynamicOptions=__spreadArrays(defaultDynamicOptions,extraProps);return[].forEach.call(items,function(item){var dynamicEl={};for(var i=0;i<item.attributes.length;i++){var attr=item.attributes[i];if(attr.specified){var dynamicAttr=convertToData(attr.name),label="";availableDynamicOptions.indexOf(dynamicAttr)>-1&&(label=dynamicAttr),label&&(dynamicEl[label]=attr.value)}}var currentItem=$LG(item),alt=currentItem.find("img").first().attr("alt"),title=currentItem.attr("title"),thumb=exThumbImage&&currentItem.attr(exThumbImage)?currentItem.attr(exThumbImage):currentItem.find("img").first().attr("src");dynamicEl.thumb=thumb,getCaptionFromTitleOrAlt&&!dynamicEl.subHtml&&(dynamicEl.subHtml=title||""),dynamicEl.alt=title||"";var inlineType=currentItem.attr("data-type");dynamicEl.type=inlineType,dynamicElements.push(dynamicEl)}),dynamicElements},isMobile:function(){return/iPhone|iPad|iPod|Android/i.test(navigator.userAgent)},isVideo:function(src,isHTML5VIdeo,index){if(!src||src.match(/\.(mp4|m4v|ogg|webm)$/)){if(isHTML5VIdeo)return{html5:!0};console.warn("lightGallery :- data-src is not provided on slide item "+(index+1)+". Please make sure the selector property is properly configured. More info - https://www.lightgalleryjs.com/demos/html-markup/");return}var youtube=src.match(/\/\/(?:www\.)?youtu(?:\.be|be\.com|be-nocookie\.com)\/(?:watch\?v=|embed\/)?([a-z0-9\-\_\%]+)([\&|?][\S]*)*/i),vimeo=src.match(/\/\/(?:www\.)?(?:player\.)?vimeo.com\/(?:video\/)?([0-9a-z\-_]+)(.*)?/i),wistia=src.match(/https?:\/\/(.+)?(wistia\.com|wi\.st)\/(medias|embed)\/([0-9a-z\-_]+)(.*)/);if(youtube)return{youtube:youtube};if(vimeo)return{vimeo:vimeo};if(wistia)return{wistia:wistia}}},lgId=0,LightGallery=function(){function LightGallery(element,options){this.lgOpened=!1,this.index=0,this.plugins=[],this.lGalleryOn=!1,this.lgBusy=!1,this.currentItemsInDom=[],this.prevScrollTop=0,this.bodyPaddingRight=0,this.isDummyImageRemoved=!1,this.dragOrSwipeEnabled=!1,this.mediaContainerPosition={top:0,bottom:0};if(!element)return this;lgId++,this.lgId=lgId,this.el=element,this.LGel=$LG(element),this.generateSettings(options),this.buildModules();if(this.settings.dynamic&&this.settings.dynamicEl!==undefined&&!Array.isArray(this.settings.dynamicEl))throw"When using dynamic mode, you must also define dynamicEl as an Array.";return this.galleryItems=this.getItems(),this.normalizeSettings(),this.init(),this}return LightGallery.prototype.generateSettings=function(options){this.settings=__assign(__assign({},lightGalleryCoreSettings),options);if(this.settings.isMobile&&typeof this.settings.isMobile=="function"?this.settings.isMobile():utils.isMobile()){var mobileSettings=__assign(__assign({},this.settings.mobileSettings),this.settings.mobileSettings);this.settings=__assign(__assign({},this.settings),mobileSettings)}},LightGallery.prototype.normalizeSettings=function(){this.settings.slideEndAnimation&&(this.settings.hideControlOnEnd=!1),this.settings.closable||(this.settings.swipeToClose=!1),this.zoomFromOrigin=this.settings.zoomFromOrigin,this.settings.dynamic&&(this.zoomFromOrigin=!1),this.settings.container||(this.settings.container=document.body),this.settings.preload=Math.min(this.settings.preload,this.galleryItems.length)},LightGallery.prototype.init=function(){var _this=this;this.addSlideVideoInfo(this.galleryItems),this.buildStructure(),this.LGel.trigger(lGEvents.init,{instance:this}),this.settings.keyPress&&this.keyPress(),setTimeout(function(){_this.enableDrag(),_this.enableSwipe(),_this.triggerPosterClick()},50),this.arrow(),this.settings.mousewheel&&this.mousewheel(),this.settings.dynamic||this.openGalleryOnItemClick()},LightGallery.prototype.openGalleryOnItemClick=function(){var _this=this,_loop_1=function(index){var element=this_1.items[index],$element=$LG(element),uuid=lgQuery.generateUUID();$element.attr("data-lg-id",uuid).on("click.lgcustom-item-"+uuid,function(e){e.preventDefault();var currentItemIndex=_this.settings.index||index;_this.openGallery(currentItemIndex,element)})},this_1=this;for(var index=0;index<this.items.length;index++)_loop_1(index)},LightGallery.prototype.buildModules=function(){var _this=this;this.settings.plugins.forEach(function(plugin){_this.plugins.push(new plugin(_this,$LG))})},LightGallery.prototype.validateLicense=function(){this.settings.licenseKey?this.settings.licenseKey==="0000-0000-000-0000"&&console.warn("lightGallery: "+this.settings.licenseKey+" license key is not valid for production use"):console.warn("Please provide a valid license key")},LightGallery.prototype.getSlideItem=function(index){return $LG(this.getSlideItemId(index))},LightGallery.prototype.getSlideItemId=function(index){return"#lg-item-"+this.lgId+"-"+index},LightGallery.prototype.getIdName=function(id){return id+"-"+this.lgId},LightGallery.prototype.getElementById=function(id){return $LG("#"+this.getIdName(id))},LightGallery.prototype.manageSingleSlideClassName=function(){this.galleryItems.length<2?this.outer.addClass("lg-single-item"):this.outer.removeClass("lg-single-item")},LightGallery.prototype.buildStructure=function(){var _this=this,container=this.$container&&this.$container.get();if(container)return;var controls="",subHtmlCont="";this.settings.controls&&(controls='<button type="button" id="'+this.getIdName("lg-prev")+'" aria-label="'+this.settings.strings.previousSlide+'" class="lg-prev lg-icon"> '+this.settings.prevHtml+' </button>\n                <button type="button" id="'+this.getIdName("lg-next")+'" aria-label="'+this.settings.strings.nextSlide+'" class="lg-next lg-icon"> '+this.settings.nextHtml+" </button>"),this.settings.appendSubHtmlTo!==".lg-item"&&(subHtmlCont='<div class="lg-sub-html" role="status" aria-live="polite"></div>');var addClasses="";this.settings.allowMediaOverlap&&(addClasses+="lg-media-overlap ");var ariaLabelledby=this.settings.ariaLabelledby?'aria-labelledby="'+this.settings.ariaLabelledby+'"':"",ariaDescribedby=this.settings.ariaDescribedby?'aria-describedby="'+this.settings.ariaDescribedby+'"':"",containerClassName="lg-container "+this.settings.addClass+" "+(document.body!==this.settings.container?"lg-inline":""),closeIcon=this.settings.closable&&this.settings.showCloseIcon?'<button type="button" aria-label="'+this.settings.strings.closeGallery+'" id="'+this.getIdName("lg-close")+'" class="lg-close lg-icon"></button>':"",maximizeIcon=this.settings.showMaximizeIcon?'<button type="button" aria-label="'+this.settings.strings.toggleMaximize+'" id="'+this.getIdName("lg-maximize")+'" class="lg-maximize lg-icon"></button>':"",template='\n        <div class="'+containerClassName+'" id="'+this.getIdName("lg-container")+'" tabindex="-1" aria-modal="true" '+ariaLabelledby+" "+ariaDescribedby+' role="dialog"\n        >\n            <div id="'+this.getIdName("lg-backdrop")+'" class="lg-backdrop"></div>\n\n            <div id="'+this.getIdName("lg-outer")+'" class="lg-outer lg-use-css3 lg-css3 lg-hide-items '+addClasses+' ">\n\n              <div id="'+this.getIdName("lg-content")+'" class="lg-content">\n                <div id="'+this.getIdName("lg-inner")+'" class="lg-inner">\n                </div>\n                '+controls+'\n              </div>\n                <div id="'+this.getIdName("lg-toolbar")+'" class="lg-toolbar lg-group">\n                    '+maximizeIcon+"\n                    "+closeIcon+"\n                    </div>\n                    "+(this.settings.appendSubHtmlTo===".lg-outer"?subHtmlCont:"")+'\n                <div id="'+this.getIdName("lg-components")+'" class="lg-components">\n                    '+(this.settings.appendSubHtmlTo===".lg-sub-html"?subHtmlCont:"")+"\n                </div>\n            </div>\n        </div>\n        ";$LG(this.settings.container).append(template),document.body!==this.settings.container&&$LG(this.settings.container).css("position","relative"),this.outer=this.getElementById("lg-outer"),this.$lgComponents=this.getElementById("lg-components"),this.$backdrop=this.getElementById("lg-backdrop"),this.$container=this.getElementById("lg-container"),this.$inner=this.getElementById("lg-inner"),this.$content=this.getElementById("lg-content"),this.$toolbar=this.getElementById("lg-toolbar"),this.$backdrop.css("transition-duration",this.settings.backdropDuration+"ms");var outerClassNames=this.settings.mode+" ";this.manageSingleSlideClassName(),this.settings.enableDrag&&(outerClassNames+="lg-grab "),this.outer.addClass(outerClassNames),this.$inner.css("transition-timing-function",this.settings.easing),this.$inner.css("transition-duration",this.settings.speed+"ms"),this.settings.download&&this.$toolbar.append('<a id="'+this.getIdName("lg-download")+'" target="_blank" rel="noopener" aria-label="'+this.settings.strings.download+'" download class="lg-download lg-icon"></a>'),this.counter(),$LG(window).on("resize.lg.global"+this.lgId+" orientationchange.lg.global"+this.lgId,function(){_this.refreshOnResize()}),this.hideBars(),this.manageCloseGallery(),this.toggleMaximize(),this.initModules()},LightGallery.prototype.refreshOnResize=function(){if(this.lgOpened){var currentGalleryItem=this.galleryItems[this.index],__slideVideoInfo=currentGalleryItem.__slideVideoInfo;this.mediaContainerPosition=this.getMediaContainerPosition();var _a=this.mediaContainerPosition,top_1=_a.top,bottom=_a.bottom;this.currentImageSize=utils.getSize(this.items[this.index],this.outer,top_1+bottom,__slideVideoInfo&&this.settings.videoMaxSize,this.galleryItems[this.index]),__slideVideoInfo&&this.resizeVideoSlide(this.index,this.currentImageSize);if(this.zoomFromOrigin&&!this.isDummyImageRemoved){var imgStyle=this.getDummyImgStyles(this.currentImageSize);this.outer.find(".lg-current .lg-dummy-img").first().attr("style",imgStyle)}this.LGel.trigger(lGEvents.containerResize)}},LightGallery.prototype.resizeVideoSlide=function(index,imageSize){var lgVideoStyle=this.getVideoContStyle(imageSize),currentSlide=this.getSlideItem(index);currentSlide.find(".lg-video-cont").attr("style",lgVideoStyle)},LightGallery.prototype.updateSlides=function(items,index){this.index>items.length-1&&(this.index=items.length-1),items.length===1&&(this.index=0);if(!items.length){this.closeGallery();return}var currentSrc=this.galleryItems[index].src;this.galleryItems=items,this.updateControls(),this.$inner.empty(),this.currentItemsInDom=[];var _index=0;this.galleryItems.some(function(galleryItem,itemIndex){return galleryItem.src===currentSrc?(_index=itemIndex,!0):!1}),this.currentItemsInDom=this.organizeSlideItems(_index,-1),this.loadContent(_index,!0),this.getSlideItem(_index).addClass("lg-current"),this.index=_index,this.updateCurrentCounter(_index),this.LGel.trigger(lGEvents.updateSlides)},LightGallery.prototype.getItems=function(){this.items=[];if(!this.settings.dynamic){if(this.settings.selector==="this")this.items.push(this.el);else if(this.settings.selector)if(typeof this.settings.selector=="string")if(this.settings.selectWithin){var selectWithin=$LG(this.settings.selectWithin);this.items=selectWithin.find(this.settings.selector).get()}else this.items=this.el.querySelectorAll(this.settings.selector);else this.items=this.settings.selector;else this.items=this.el.children;return utils.getDynamicOptions(this.items,this.settings.extraProps,this.settings.getCaptionFromTitleOrAlt,this.settings.exThumbImage)}return this.settings.dynamicEl||[]},LightGallery.prototype.shouldHideScrollbar=function(){return this.settings.hideScrollbar&&document.body===this.settings.container},LightGallery.prototype.hideScrollbar=function(){if(!this.shouldHideScrollbar())return;this.bodyPaddingRight=parseFloat($LG("body").style().paddingRight);var bodyRect=document.documentElement.getBoundingClientRect(),scrollbarWidth=window.innerWidth-bodyRect.width;$LG(document.body).css("padding-right",scrollbarWidth+this.bodyPaddingRight+"px"),$LG(document.body).addClass("lg-overlay-open")},LightGallery.prototype.resetScrollBar=function(){if(!this.shouldHideScrollbar())return;$LG(document.body).css("padding-right",this.bodyPaddingRight+"px"),$LG(document.body).removeClass("lg-overlay-open")},LightGallery.prototype.openGallery=function(index,element){var _this=this;index===void 0&&(index=this.settings.index);if(this.lgOpened)return;this.lgOpened=!0,this.outer.removeClass("lg-hide-items"),this.hideScrollbar(),this.$container.addClass("lg-show");var itemsToBeInsertedToDom=this.getItemsToBeInsertedToDom(index,index);this.currentItemsInDom=itemsToBeInsertedToDom;var items="";itemsToBeInsertedToDom.forEach(function(item){items+='<div id="'+item+'" class="lg-item"></div>'}),this.$inner.append(items),this.addHtml(index);var transform="";this.mediaContainerPosition=this.getMediaContainerPosition();var _a=this.mediaContainerPosition,top=_a.top,bottom=_a.bottom;this.settings.allowMediaOverlap||this.setMediaContainerPosition(top,bottom);var __slideVideoInfo=this.galleryItems[index].__slideVideoInfo;this.zoomFromOrigin&&element&&(this.currentImageSize=utils.getSize(element,this.outer,top+bottom,__slideVideoInfo&&this.settings.videoMaxSize,this.galleryItems[this.index]),transform=utils.getTransform(element,this.outer,top,bottom,this.currentImageSize));if(!this.zoomFromOrigin||!transform)this.outer.addClass(this.settings.startClass),this.getSlideItem(index).removeClass("lg-complete");var timeout=this.settings.zoomFromOrigin?100:this.settings.backdropDuration;setTimeout(function(){_this.outer.addClass("lg-components-open")},timeout),this.index=index,this.LGel.trigger(lGEvents.beforeOpen,{galleryItems:this.galleryItems,items:this.items,outer:this.outer}),this.getSlideItem(index).addClass("lg-current"),this.lGalleryOn=!1,this.prevScrollTop=$LG(window).scrollTop(),setTimeout(function(){if(_this.zoomFromOrigin&&transform){var currentSlide_1=_this.getSlideItem(index);currentSlide_1.css("transform",transform),setTimeout(function(){currentSlide_1.addClass("lg-start-progress lg-start-end-progress").css("transition-duration",_this.settings.startAnimationDuration+"ms"),_this.outer.addClass("lg-zoom-from-image")}),setTimeout(function(){currentSlide_1.css("transform","translate3d(0, 0, 0)")},100)}setTimeout(function(){_this.$backdrop.addClass("in"),_this.$container.addClass("lg-show-in")},10),setTimeout(function(){_this.settings.trapFocus&&document.body===_this.settings.container&&_this.trapFocus()},_this.settings.backdropDuration+50),(!_this.zoomFromOrigin||!transform)&&setTimeout(function(){_this.outer.addClass("lg-visible")},_this.settings.backdropDuration),_this.slide(index,!1,!1,!1),_this.LGel.trigger(lGEvents.afterOpen)}),document.body===this.settings.container&&$LG("html").addClass("lg-on")},LightGallery.prototype.getMediaContainerPosition=function(){if(this.settings.allowMediaOverlap)return{top:0,bottom:0};var top=this.$toolbar.get().clientHeight||0,subHtml=this.outer.find(".lg-components .lg-sub-html").get(),captionHeight=this.settings.defaultCaptionHeight||subHtml&&subHtml.clientHeight||0,thumbContainer=this.outer.find(".lg-thumb-outer").get(),thumbHeight=thumbContainer?thumbContainer.clientHeight:0,bottom=thumbHeight+captionHeight;return bottom=bottom<55?55:bottom,{top:top,bottom:bottom}},LightGallery.prototype.setMediaContainerPosition=function(top,bottom){top===void 0&&(top=0),bottom===void 0&&(bottom=0),this.$content.css("top",top+"px").css("bottom",bottom+"px")},LightGallery.prototype.hideBars=function(){var _this=this;setTimeout(function(){_this.outer.removeClass("lg-hide-items"),_this.settings.hideBarsDelay>0&&(_this.outer.on("mousemove.lg click.lg touchstart.lg",function(){_this.outer.removeClass("lg-hide-items"),clearTimeout(_this.hideBarTimeout),_this.hideBarTimeout=setTimeout(function(){_this.outer.addClass("lg-hide-items")},_this.settings.hideBarsDelay)}),_this.outer.trigger("mousemove.lg"))},this.settings.showBarsAfter)},LightGallery.prototype.initPictureFill=function($img){if(this.settings.supportLegacyBrowser)try{picturefill({elements:[$img.get()]})}catch(e){console.warn("lightGallery :- If you want srcset or picture tag to be supported for older browser please include picturefil javascript library in your document.")}},LightGallery.prototype.counter=function(){if(this.settings.counter){var counterHtml='<div class="lg-counter" role="status" aria-live="polite">\n                <span id="'+this.getIdName("lg-counter-current")+'" class="lg-counter-current">'+(this.index+1)+' </span> /\n                <span id="'+this.getIdName("lg-counter-all")+'" class="lg-counter-all">'+this.galleryItems.length+" </span></div>";this.outer.find(this.settings.appendCounterTo).append(counterHtml)}},LightGallery.prototype.addHtml=function(index){var subHtml,subHtmlUrl;this.galleryItems[index].subHtmlUrl?subHtmlUrl=this.galleryItems[index].subHtmlUrl:subHtml=this.galleryItems[index].subHtml;if(!subHtmlUrl)if(subHtml){var fL=subHtml.substring(0,1);if(fL==="."||fL==="#")this.settings.subHtmlSelectorRelative&&!this.settings.dynamic?subHtml=$LG(this.items).eq(index).find(subHtml).first().html():subHtml=$LG(subHtml).first().html()}else subHtml="";if(this.settings.appendSubHtmlTo!==".lg-item")subHtmlUrl?this.outer.find(".lg-sub-html").load(subHtmlUrl):this.outer.find(".lg-sub-html").html(subHtml);else{var currentSlide=$LG(this.getSlideItemId(index));subHtmlUrl?currentSlide.load(subHtmlUrl):currentSlide.append('<div class="lg-sub-html">'+subHtml+"</div>")}typeof subHtml!="undefined"&&subHtml!==null&&(subHtml===""?this.outer.find(this.settings.appendSubHtmlTo).addClass("lg-empty-html"):this.outer.find(this.settings.appendSubHtmlTo).removeClass("lg-empty-html")),this.LGel.trigger(lGEvents.afterAppendSubHtml,{index:index})},LightGallery.prototype.preload=function(index){for(var i=1;i<=this.settings.preload;i++){if(i>=this.galleryItems.length-index)break;this.loadContent(index+i,!1)}for(var j=1;j<=this.settings.preload;j++){if(index-j<0)break;this.loadContent(index-j,!1)}},LightGallery.prototype.getDummyImgStyles=function(imageSize){return imageSize?"width:"+imageSize.width+"px;\n                margin-left: -"+imageSize.width/2+"px;\n                margin-top: -"+imageSize.height/2+"px;\n                height:"+imageSize.height+"px":""},LightGallery.prototype.getVideoContStyle=function(imageSize){return imageSize?"width:"+imageSize.width+"px;\n                height:"+imageSize.height+"px":""},LightGallery.prototype.getDummyImageContent=function($currentSlide,index,alt){var $currentItem;this.settings.dynamic||($currentItem=$LG(this.items).eq(index));if($currentItem){var _dummyImgSrc=void 0;this.settings.exThumbImage?_dummyImgSrc=$currentItem.attr(this.settings.exThumbImage):_dummyImgSrc=$currentItem.find("img").first().attr("src");if(!_dummyImgSrc)return"";var imgStyle=this.getDummyImgStyles(this.currentImageSize),dummyImgContent="<img "+alt+' style="'+imgStyle+'" class="lg-dummy-img" src="'+_dummyImgSrc+'" />';return $currentSlide.addClass("lg-first-slide"),this.outer.addClass("lg-first-slide-loading"),dummyImgContent}return""},LightGallery.prototype.setImgMarkup=function(src,$currentSlide,index){var currentGalleryItem=this.galleryItems[index],alt=currentGalleryItem.alt,srcset=currentGalleryItem.srcset,sizes=currentGalleryItem.sizes,sources=currentGalleryItem.sources,imgContent="",altAttr=alt?'alt="'+alt+'"':"";this.isFirstSlideWithZoomAnimation()?imgContent=this.getDummyImageContent($currentSlide,index,altAttr):imgContent=utils.getImgMarkup(index,src,altAttr,srcset,sizes,sources);var imgMarkup='<picture class="lg-img-wrap"> '+imgContent+"</picture>";$currentSlide.prepend(imgMarkup)},LightGallery.prototype.onSlideObjectLoad=function($slide,isHTML5VideoWithoutPoster,onLoad,onError){var mediaObject=$slide.find(".lg-object").first();utils.isImageLoaded(mediaObject.get())||isHTML5VideoWithoutPoster?onLoad():(mediaObject.on("load.lg error.lg",function(){onLoad&&onLoad()}),mediaObject.on("error.lg",function(){onError&&onError()}))},LightGallery.prototype.onLgObjectLoad=function(currentSlide,index,delay,speed,isFirstSlide,isHTML5VideoWithoutPoster){var _this=this,$item=_this.galleryItems[index],type=$item.type;if(typeof $item.src!="undefined"){var inline_id=$item.src.replace("#",""),$inline=document.getElementById(inline_id),inline_html;type==="inline"&&inline_id!=null&&typeof $inline!="undefined"?inline_html=$inline.innerHTML:inline_html=""}this.onSlideObjectLoad(currentSlide,!0,function(){_this.triggerSlideItemLoad(currentSlide,index,delay,speed,isFirstSlide)},function(){currentSlide.addClass("lg-complete lg-complete_"),inline_html!==""?currentSlide.html(inline_html):currentSlide.html('<span class="lg-error-msg">Oops... Failed to load content...</span>')})},LightGallery.prototype.triggerSlideItemLoad=function($currentSlide,index,delay,speed,isFirstSlide){var _this=this,currentGalleryItem=this.galleryItems[index],_speed=isFirstSlide&&this.getSlideType(currentGalleryItem)==="video"&&!currentGalleryItem.poster?speed:0;setTimeout(function(){$currentSlide.addClass("lg-complete lg-complete_"),_this.LGel.trigger(lGEvents.slideItemLoad,{index:index,delay:delay||0,isFirstSlide:isFirstSlide})},_speed)},LightGallery.prototype.isFirstSlideWithZoomAnimation=function(){return!!(!this.lGalleryOn&&this.zoomFromOrigin&&this.currentImageSize)},LightGallery.prototype.addSlideVideoInfo=function(items){var _this=this;items.forEach(function(element,index){element.__slideVideoInfo=utils.isVideo(element.src,!!element.video,index),element.__slideVideoInfo&&_this.settings.loadYouTubePoster&&!element.poster&&element.__slideVideoInfo.youtube&&(element.poster="//img.youtube.com/vi/"+element.__slideVideoInfo.youtube[1]+"/maxresdefault.jpg")})},LightGallery.prototype.loadContent=function(index,rec){var _this=this,currentGalleryItem=this.galleryItems[index],$currentSlide=$LG(this.getSlideItemId(index)),poster=currentGalleryItem.poster,srcset=currentGalleryItem.srcset,sizes=currentGalleryItem.sizes,sources=currentGalleryItem.sources,src=currentGalleryItem.src,video=currentGalleryItem.video,_html5Video=video&&typeof video=="string"?JSON.parse(video):video;if(currentGalleryItem.responsive){var srcDyItms=currentGalleryItem.responsive.split(",");src=utils.getResponsiveSrc(srcDyItms)||src}var videoInfo=currentGalleryItem.__slideVideoInfo,lgVideoStyle="",iframe=!!currentGalleryItem.iframe,isFirstSlide=!this.lGalleryOn,delay=0;isFirstSlide&&(this.zoomFromOrigin&&this.currentImageSize?delay=this.settings.startAnimationDuration+10:delay=this.settings.backdropDuration+10);if(!$currentSlide.hasClass("lg-loaded")){if(videoInfo){var _a=this.mediaContainerPosition,top_2=_a.top,bottom=_a.bottom,videoSize=utils.getSize(this.items[index],this.outer,top_2+bottom,videoInfo&&this.settings.videoMaxSize,this.galleryItems[this.index]);lgVideoStyle=this.getVideoContStyle(videoSize)}if(iframe){var markup=utils.getIframeMarkup(this.settings.iframeWidth,this.settings.iframeHeight,this.settings.iframeMaxWidth,this.settings.iframeMaxHeight,src,currentGalleryItem.iframeTitle);$currentSlide.prepend(markup)}else if(poster){var dummyImg="",hasStartAnimation=isFirstSlide&&this.zoomFromOrigin&&this.currentImageSize;hasStartAnimation&&(dummyImg=this.getDummyImageContent($currentSlide,index,""));var markup=utils.getVideoPosterMarkup(poster,dummyImg||"",lgVideoStyle,this.settings.strings.playVideo,videoInfo);$currentSlide.prepend(markup)}else if(videoInfo||this.getSlideType(currentGalleryItem)==="audio"){if(!_html5Video)var markup='<div class="lg-video-cont " style="'+lgVideoStyle+'"></div>';$currentSlide.prepend(markup)}else{var $item=_this.galleryItems[index],type=$item.type;if(typeof $item.src!="undefined"){var inline_id=$item.src.replace("#",""),$inline=document.getElementById(inline_id),inline_html;type==="inline"&&inline_id!=null&&typeof $inline!="undefined"?inline_html=$inline.innerHTML:inline_html=""}if(inline_html!=="")$currentSlide.html(inline_html);else{this.setImgMarkup(src,$currentSlide,index);if(srcset||sources){var $img=$currentSlide.find(".lg-object");this.initPictureFill($img)}}}(poster||videoInfo)&&this.LGel.trigger(lGEvents.hasVideo,{index:index,src:src,html5Video:_html5Video,hasPoster:!!poster}),this.LGel.trigger(lGEvents.afterAppendSlide,{index:index}),this.lGalleryOn&&this.settings.appendSubHtmlTo===".lg-item"&&this.addHtml(index)}var _speed=0;delay&&!$LG(document.body).hasClass("lg-from-hash")&&(_speed=delay),this.isFirstSlideWithZoomAnimation()&&(setTimeout(function(){$currentSlide.removeClass("lg-start-end-progress lg-start-progress").removeAttr("style")},this.settings.startAnimationDuration+100),$currentSlide.hasClass("lg-loaded")||setTimeout(function(){if(_this.getSlideType(currentGalleryItem)==="image"){var alt=currentGalleryItem.alt,altAttr=alt?'alt="'+alt+'"':"";$currentSlide.find(".lg-img-wrap").append(utils.getImgMarkup(index,src,altAttr,srcset,sizes,currentGalleryItem.sources));if(srcset||sources){var $img=$currentSlide.find(".lg-object");_this.initPictureFill($img)}}if(_this.getSlideType(currentGalleryItem)==="image"||_this.getSlideType(currentGalleryItem)==="video"&&poster)_this.onLgObjectLoad($currentSlide,index,delay,_speed,!0,!1),_this.onSlideObjectLoad($currentSlide,!!(videoInfo&&videoInfo.html5&&!poster),function(){_this.loadContentOnFirstSlideLoad(index,$currentSlide,_speed)},function(){_this.loadContentOnFirstSlideLoad(index,$currentSlide,_speed)})},this.settings.startAnimationDuration+100)),$currentSlide.addClass("lg-loaded"),(!this.isFirstSlideWithZoomAnimation()||this.getSlideType(currentGalleryItem)==="video"&&!poster)&&this.onLgObjectLoad($currentSlide,index,delay,_speed,isFirstSlide,!!(videoInfo&&videoInfo.html5&&!poster||this.getSlideType(currentGalleryItem)==="audio")),(!this.zoomFromOrigin||!this.currentImageSize)&&$currentSlide.hasClass("lg-complete_")&&!this.lGalleryOn&&setTimeout(function(){$currentSlide.addClass("lg-complete")},this.settings.backdropDuration),this.lGalleryOn=!0,rec===!0&&($currentSlide.hasClass("lg-complete_")?this.preload(index):$currentSlide.find(".lg-object").first().on("load.lg error.lg",function(){_this.preload(index)}))},LightGallery.prototype.loadContentOnFirstSlideLoad=function(index,$currentSlide,speed){var _this=this;setTimeout(function(){$currentSlide.find(".lg-dummy-img").remove(),$currentSlide.removeClass("lg-first-slide"),_this.outer.removeClass("lg-first-slide-loading"),_this.isDummyImageRemoved=!0,_this.preload(index)},speed+300)},LightGallery.prototype.getItemsToBeInsertedToDom=function(index,prevIndex,numberOfItems){var _this=this;numberOfItems===void 0&&(numberOfItems=0);var itemsToBeInsertedToDom=[],possibleNumberOfItems=Math.max(numberOfItems,3);possibleNumberOfItems=Math.min(possibleNumberOfItems,this.galleryItems.length);var prevIndexItem="lg-item-"+this.lgId+"-"+prevIndex;if(this.galleryItems.length<=3)return this.galleryItems.forEach(function(_element,index){itemsToBeInsertedToDom.push("lg-item-"+_this.lgId+"-"+index)}),itemsToBeInsertedToDom;if(index<(this.galleryItems.length-1)/2){for(var idx=index;idx>index-possibleNumberOfItems/2&&idx>=0;idx--)itemsToBeInsertedToDom.push("lg-item-"+this.lgId+"-"+idx);var numberOfExistingItems=itemsToBeInsertedToDom.length;for(var idx=0;idx<possibleNumberOfItems-numberOfExistingItems;idx++)itemsToBeInsertedToDom.push("lg-item-"+this.lgId+"-"+(index+idx+1))}else{for(var idx=index;idx<=this.galleryItems.length-1&&idx<index+possibleNumberOfItems/2;idx++)itemsToBeInsertedToDom.push("lg-item-"+this.lgId+"-"+idx);var numberOfExistingItems=itemsToBeInsertedToDom.length;for(var idx=0;idx<possibleNumberOfItems-numberOfExistingItems;idx++)itemsToBeInsertedToDom.push("lg-item-"+this.lgId+"-"+(index-idx-1))}return this.settings.loop&&(index===this.galleryItems.length-1?itemsToBeInsertedToDom.push("lg-item-"+this.lgId+"-"+0):index===0&&itemsToBeInsertedToDom.push("lg-item-"+this.lgId+"-"+(this.galleryItems.length-1))),itemsToBeInsertedToDom.indexOf(prevIndexItem)===-1&&itemsToBeInsertedToDom.push("lg-item-"+this.lgId+"-"+prevIndex),itemsToBeInsertedToDom},LightGallery.prototype.organizeSlideItems=function(index,prevIndex){var _this=this,itemsToBeInsertedToDom=this.getItemsToBeInsertedToDom(index,prevIndex,this.settings.numberOfSlideItemsInDom);return itemsToBeInsertedToDom.forEach(function(item){_this.currentItemsInDom.indexOf(item)===-1&&_this.$inner.append('<div id="'+item+'" class="lg-item"></div>')}),this.currentItemsInDom.forEach(function(item){itemsToBeInsertedToDom.indexOf(item)===-1&&$LG("#"+item).remove()}),itemsToBeInsertedToDom},LightGallery.prototype.getPreviousSlideIndex=function(){var prevIndex=0;try{var currentItemId=this.outer.find(".lg-current").first().attr("id");prevIndex=parseInt(currentItemId.split("-")[3])||0}catch(error){prevIndex=0}return prevIndex},LightGallery.prototype.setDownloadValue=function(index){if(this.settings.download){var currentGalleryItem=this.galleryItems[index],hideDownloadBtn=currentGalleryItem.downloadUrl===!1||currentGalleryItem.downloadUrl==="false";if(hideDownloadBtn)this.outer.addClass("lg-hide-download");else{var $download=this.getElementById("lg-download");this.outer.removeClass("lg-hide-download"),$download.attr("href",currentGalleryItem.downloadUrl||currentGalleryItem.src);if(currentGalleryItem.download)if(typeof currentGalleryItem.video!="undefined"&&currentGalleryItem.video){var currentVideo=JSON.parse(currentGalleryItem.video),download_name=currentVideo.source[0].src;$download.attr("href",download_name).removeAttr("download")}else{var download_url=currentGalleryItem.downloadUrl||currentGalleryItem.src,download_name=download_url.substring(download_url.lastIndexOf("/")+1);$download.attr("download",download_name)}}}},LightGallery.prototype.makeSlideAnimation=function(direction,currentSlideItem,previousSlideItem){var _this=this;this.lGalleryOn&&previousSlideItem.addClass("lg-slide-progress"),setTimeout(function(){_this.outer.addClass("lg-no-trans"),_this.outer.find(".lg-item").removeClass("lg-prev-slide lg-next-slide"),direction==="prev"?(currentSlideItem.addClass("lg-prev-slide"),previousSlideItem.addClass("lg-next-slide")):(currentSlideItem.addClass("lg-next-slide"),previousSlideItem.addClass("lg-prev-slide")),setTimeout(function(){_this.outer.find(".lg-item").removeClass("lg-current"),currentSlideItem.addClass("lg-current"),_this.outer.removeClass("lg-no-trans")},50)},this.lGalleryOn?this.settings.slideDelay:0)},LightGallery.prototype.slide=function(index,fromTouch,fromThumb,direction){var _this=this,prevIndex=this.getPreviousSlideIndex();this.currentItemsInDom=this.organizeSlideItems(index,prevIndex);if(this.lGalleryOn&&prevIndex===index)return;var numberOfGalleryItems=this.galleryItems.length;if(!this.lgBusy){this.settings.counter&&this.updateCurrentCounter(index);var currentSlideItem=this.getSlideItem(index),previousSlideItem_1=this.getSlideItem(prevIndex),currentGalleryItem=this.galleryItems[index],videoInfo=currentGalleryItem.__slideVideoInfo;this.outer.attr("data-lg-slide-type",this.getSlideType(currentGalleryItem)),this.setDownloadValue(index);if(videoInfo){var _a=this.mediaContainerPosition,top_3=_a.top,bottom=_a.bottom,videoSize=utils.getSize(this.items[index],this.outer,top_3+bottom,videoInfo&&this.settings.videoMaxSize,this.galleryItems[this.index]);this.resizeVideoSlide(index,videoSize)}this.LGel.trigger(lGEvents.beforeSlide,{prevIndex:prevIndex,index:index,fromTouch:!!fromTouch,fromThumb:!!fromThumb,currentSlide:currentSlideItem,previousSlide:previousSlideItem_1,info:currentGalleryItem,item:this.items[index]}),this.lgBusy=!0,clearTimeout(this.hideBarTimeout),this.arrowDisable(index),direction||(index<prevIndex?direction="prev":index>prevIndex&&(direction="next"));if(!fromTouch)this.makeSlideAnimation(direction,currentSlideItem,previousSlideItem_1);else{this.outer.find(".lg-item").removeClass("lg-prev-slide lg-current lg-next-slide");var touchPrev=void 0,touchNext=void 0;numberOfGalleryItems>2?(touchPrev=index-1,touchNext=index+1,index===0&&prevIndex===numberOfGalleryItems-1?(touchNext=0,touchPrev=numberOfGalleryItems-1):index===numberOfGalleryItems-1&&prevIndex===0&&(touchNext=0,touchPrev=numberOfGalleryItems-1)):(touchPrev=0,touchNext=1),direction==="prev"?this.getSlideItem(touchNext).addClass("lg-next-slide"):this.getSlideItem(touchPrev).addClass("lg-prev-slide"),currentSlideItem.addClass("lg-current")}this.lGalleryOn?setTimeout(function(){_this.loadContent(index,!0),_this.settings.appendSubHtmlTo!==".lg-item"&&_this.addHtml(index)},this.settings.speed+50+(fromTouch?0:this.settings.slideDelay)):this.loadContent(index,!0),setTimeout(function(){_this.lgBusy=!1,previousSlideItem_1.removeClass("lg-slide-progress"),_this.LGel.trigger(lGEvents.afterSlide,{prevIndex:prevIndex,index:index,fromTouch:fromTouch,fromThumb:fromThumb})},(this.lGalleryOn?this.settings.speed+100:100)+(fromTouch?0:this.settings.slideDelay))}this.index=index},LightGallery.prototype.updateCurrentCounter=function(index){this.getElementById("lg-counter-current").html(index+1+"")},LightGallery.prototype.updateCounterTotal=function(){this.getElementById("lg-counter-all").html(this.galleryItems.length+"")},LightGallery.prototype.getSlideType=function(item){return item.__slideVideoInfo?"video":item.iframe?"iframe":typeof item.src!=""&&item.src.search(/.mp3|.m4a/i)>-1?"audio":"image"},LightGallery.prototype.touchMove=function(startCoords,endCoords,e){var distanceX=endCoords.pageX-startCoords.pageX,distanceY=endCoords.pageY-startCoords.pageY,allowSwipe=!1;this.swipeDirection?allowSwipe=!0:Math.abs(distanceX)>15?(this.swipeDirection="horizontal",allowSwipe=!0):Math.abs(distanceY)>15&&(this.swipeDirection="vertical",allowSwipe=!0);if(!allowSwipe)return;var $currentSlide=this.getSlideItem(this.index);if(this.swipeDirection==="horizontal"){e===null||e===void 0?void 0:e.preventDefault(),this.outer.addClass("lg-dragging"),this.setTranslate($currentSlide,distanceX,0);var width=$currentSlide.get().offsetWidth,slideWidthAmount=width*15/100,gutter=slideWidthAmount-Math.abs(distanceX*10/100);this.setTranslate(this.outer.find(".lg-prev-slide").first(),-width+distanceX-gutter,0),this.setTranslate(this.outer.find(".lg-next-slide").first(),width+distanceX+gutter,0)}else if(this.swipeDirection==="vertical"&&this.settings.swipeToClose){e===null||e===void 0?void 0:e.preventDefault(),this.$container.addClass("lg-dragging-vertical");var opacity=1-Math.abs(distanceY)/window.innerHeight;this.$backdrop.css("opacity",opacity);var scale=1-Math.abs(distanceY)/(window.innerWidth*2);this.setTranslate($currentSlide,0,distanceY,scale,scale),Math.abs(distanceY)>100&&this.outer.addClass("lg-hide-items").removeClass("lg-components-open")}},LightGallery.prototype.touchEnd=function(endCoords,startCoords,event){var _this=this,distance;this.settings.mode!=="lg-slide"&&this.outer.addClass("lg-slide"),setTimeout(function(){_this.$container.removeClass("lg-dragging-vertical"),_this.outer.removeClass("lg-dragging lg-hide-items").addClass("lg-components-open");var triggerClick=!0;if(_this.swipeDirection==="horizontal"){distance=endCoords.pageX-startCoords.pageX;var distanceAbs=Math.abs(endCoords.pageX-startCoords.pageX);distance<0&&distanceAbs>_this.settings.swipeThreshold?(_this.goToNextSlide(!0),triggerClick=!1):distance>0&&distanceAbs>_this.settings.swipeThreshold&&(_this.goToPrevSlide(!0),triggerClick=!1)}else if(_this.swipeDirection==="vertical"){distance=Math.abs(endCoords.pageY-startCoords.pageY);if(_this.settings.closable&&_this.settings.swipeToClose&&distance>100){_this.closeGallery();return}_this.$backdrop.css("opacity",1)}_this.outer.find(".lg-item").removeAttr("style");if(triggerClick&&Math.abs(endCoords.pageX-startCoords.pageX)<5){var target=$LG(event.target);_this.isPosterElement(target)&&_this.LGel.trigger(lGEvents.posterClick)}_this.swipeDirection=undefined}),setTimeout(function(){!_this.outer.hasClass("lg-dragging")&&_this.settings.mode!=="lg-slide"&&_this.outer.removeClass("lg-slide")},this.settings.speed+100)},LightGallery.prototype.enableSwipe=function(){var _this=this,startCoords={},endCoords={},isMoved=!1,isSwiping=!1;this.settings.enableSwipe&&(this.$inner.on("touchstart.lg",function(e){_this.dragOrSwipeEnabled=!0;var $item=_this.getSlideItem(_this.index);($LG(e.target).hasClass("lg-item")||$item.get().contains(e.target))&&!_this.outer.hasClass("lg-zoomed")&&!_this.lgBusy&&e.targetTouches.length===1&&(isSwiping=!0,_this.touchAction="swipe",_this.manageSwipeClass(),startCoords={pageX:e.targetTouches[0].pageX,pageY:e.targetTouches[0].pageY})}),this.$inner.on("touchmove.lg",function(e){isSwiping&&_this.touchAction==="swipe"&&e.targetTouches.length===1&&(endCoords={pageX:e.targetTouches[0].pageX,pageY:e.targetTouches[0].pageY},_this.touchMove(startCoords,endCoords,e),isMoved=!0)}),this.$inner.on("touchend.lg",function(event){if(_this.touchAction==="swipe"){if(isMoved)isMoved=!1,_this.touchEnd(endCoords,startCoords,event);else if(isSwiping){var target=$LG(event.target);_this.isPosterElement(target)&&_this.LGel.trigger(lGEvents.posterClick)}_this.touchAction=undefined,isSwiping=!1}}))},LightGallery.prototype.enableDrag=function(){var _this=this,startCoords={},endCoords={},isDraging=!1,isMoved=!1;this.settings.enableDrag&&(this.outer.on("mousedown.lg",function(e){_this.dragOrSwipeEnabled=!0;var $item=_this.getSlideItem(_this.index);($LG(e.target).hasClass("lg-item")||$item.get().contains(e.target))&&!_this.outer.hasClass("lg-zoomed")&&!_this.lgBusy&&(e.preventDefault(),_this.lgBusy||(_this.manageSwipeClass(),startCoords={pageX:e.pageX,pageY:e.pageY},isDraging=!0,_this.outer.get().scrollLeft+=1,_this.outer.get().scrollLeft-=1,_this.outer.removeClass("lg-grab").addClass("lg-grabbing"),_this.LGel.trigger(lGEvents.dragStart)))}),$LG(window).on("mousemove.lg.global"+this.lgId,function(e){isDraging&&_this.lgOpened&&(isMoved=!0,endCoords={pageX:e.pageX,pageY:e.pageY},_this.touchMove(startCoords,endCoords),_this.LGel.trigger(lGEvents.dragMove))}),$LG(window).on("mouseup.lg.global"+this.lgId,function(event){if(!_this.lgOpened)return;var target=$LG(event.target);isMoved?(isMoved=!1,_this.touchEnd(endCoords,startCoords,event),_this.LGel.trigger(lGEvents.dragEnd)):_this.isPosterElement(target)&&_this.LGel.trigger(lGEvents.posterClick),isDraging&&(isDraging=!1,_this.outer.removeClass("lg-grabbing").addClass("lg-grab"))}))},LightGallery.prototype.triggerPosterClick=function(){var _this=this;this.$inner.on("click.lg",function(event){!_this.dragOrSwipeEnabled&&_this.isPosterElement($LG(event.target))&&_this.LGel.trigger(lGEvents.posterClick)})},LightGallery.prototype.manageSwipeClass=function(){var _touchNext=this.index+1,_touchPrev=this.index-1;this.settings.loop&&this.galleryItems.length>2&&(this.index===0?_touchPrev=this.galleryItems.length-1:this.index===this.galleryItems.length-1&&(_touchNext=0)),this.outer.find(".lg-item").removeClass("lg-next-slide lg-prev-slide"),_touchPrev>-1&&this.getSlideItem(_touchPrev).addClass("lg-prev-slide"),this.getSlideItem(_touchNext).addClass("lg-next-slide")},LightGallery.prototype.goToNextSlide=function(fromTouch){var _this=this,_loop=this.settings.loop;fromTouch&&this.galleryItems.length<3&&(_loop=!1),this.lgBusy||(this.index+1<this.galleryItems.length?(this.index++,this.LGel.trigger(lGEvents.beforeNextSlide,{index:this.index}),this.slide(this.index,!!fromTouch,!1,"next")):_loop?(this.index=0,this.LGel.trigger(lGEvents.beforeNextSlide,{index:this.index}),this.slide(this.index,!!fromTouch,!1,"next")):this.settings.slideEndAnimation&&!fromTouch&&(this.outer.addClass("lg-right-end"),setTimeout(function(){_this.outer.removeClass("lg-right-end")},400)))},LightGallery.prototype.goToPrevSlide=function(fromTouch){var _this=this,_loop=this.settings.loop;fromTouch&&this.galleryItems.length<3&&(_loop=!1),this.lgBusy||(this.index>0?(this.index--,this.LGel.trigger(lGEvents.beforePrevSlide,{index:this.index,fromTouch:fromTouch}),this.slide(this.index,!!fromTouch,!1,"prev")):_loop?(this.index=this.galleryItems.length-1,this.LGel.trigger(lGEvents.beforePrevSlide,{index:this.index,fromTouch:fromTouch}),this.slide(this.index,!!fromTouch,!1,"prev")):this.settings.slideEndAnimation&&!fromTouch&&(this.outer.addClass("lg-left-end"),setTimeout(function(){_this.outer.removeClass("lg-left-end")},400)))},LightGallery.prototype.keyPress=function(){var _this=this;$LG(window).on("keydown.lg.global"+this.lgId,function(e){_this.lgOpened&&_this.settings.escKey===!0&&e.keyCode===27&&(e.preventDefault(),_this.settings.allowMediaOverlap&&_this.outer.hasClass("lg-can-toggle")&&_this.outer.hasClass("lg-components-open")?_this.outer.removeClass("lg-components-open"):_this.closeGallery()),_this.lgOpened&&_this.galleryItems.length>1&&(e.keyCode===37&&(e.preventDefault(),_this.goToPrevSlide()),e.keyCode===39&&(e.preventDefault(),_this.goToNextSlide()))})},LightGallery.prototype.arrow=function(){var _this=this;this.getElementById("lg-prev").on("click.lg",function(){_this.goToPrevSlide()}),this.getElementById("lg-next").on("click.lg",function(){_this.goToNextSlide()})},LightGallery.prototype.arrowDisable=function(index){if(!this.settings.loop&&this.settings.hideControlOnEnd){var $prev=this.getElementById("lg-prev"),$next=this.getElementById("lg-next");index+1===this.galleryItems.length?$next.attr("disabled","disabled").addClass("disabled"):$next.removeAttr("disabled").removeClass("disabled"),index===0?$prev.attr("disabled","disabled").addClass("disabled"):$prev.removeAttr("disabled").removeClass("disabled")}},LightGallery.prototype.setTranslate=function($el,xValue,yValue,scaleX,scaleY){scaleX===void 0&&(scaleX=1),scaleY===void 0&&(scaleY=1),$el.css("transform","translate3d("+xValue+"px, "+yValue+"px, 0px) scale3d("+scaleX+", "+scaleY+", 1)")},LightGallery.prototype.mousewheel=function(){var _this=this,lastCall=0;this.outer.on("wheel.lg",function(e){if(!e.deltaY||_this.galleryItems.length<2)return;e.preventDefault();var now=(new Date).getTime();if(now-lastCall<1e3)return;lastCall=now,e.deltaY>0?_this.goToNextSlide():e.deltaY<0&&_this.goToPrevSlide()})},LightGallery.prototype.isSlideElement=function(target){return target.hasClass("lg-outer")||target.hasClass("lg-item")||target.hasClass("lg-img-wrap")},LightGallery.prototype.isPosterElement=function(target){var playButton=this.getSlideItem(this.index).find(".lg-video-play-button").get();return target.hasClass("lg-video-poster")||target.hasClass("lg-video-play-button")||playButton&&playButton.contains(target.get())},LightGallery.prototype.toggleMaximize=function(){var _this=this;this.getElementById("lg-maximize").on("click.lg",function(){_this.$container.toggleClass("lg-inline"),_this.refreshOnResize()})},LightGallery.prototype.invalidateItems=function(){for(var index=0;index<this.items.length;index++){var element=this.items[index],$element=$LG(element);$element.off("click.lgcustom-item-"+$element.attr("data-lg-id"))}},LightGallery.prototype.trapFocus=function(){var _this=this;this.$container.get().focus({preventScroll:!0}),$LG(window).on("keydown.lg.global"+this.lgId,function(e){if(!_this.lgOpened)return;var isTabPressed=e.key==="Tab"||e.keyCode===9;if(!isTabPressed)return;var focusableEls=utils.getFocusableElements(_this.$container.get()),firstFocusableEl=focusableEls[0],lastFocusableEl=focusableEls[focusableEls.length-1];e.shiftKey?document.activeElement===firstFocusableEl&&(lastFocusableEl.focus(),e.preventDefault()):document.activeElement===lastFocusableEl&&(firstFocusableEl.focus(),e.preventDefault())})},LightGallery.prototype.manageCloseGallery=function(){var _this=this;if(!this.settings.closable)return;var mousedown=!1;this.getElementById("lg-close").on("click.lg",function(){_this.closeGallery()}),this.settings.closeOnTap&&(this.outer.on("mousedown.lg",function(e){var target=$LG(e.target);_this.isSlideElement(target)?mousedown=!0:mousedown=!1}),this.outer.on("mousemove.lg",function(){mousedown=!1}),this.outer.on("mouseup.lg",function(e){var target=$LG(e.target);_this.isSlideElement(target)&&mousedown&&(_this.outer.hasClass("lg-dragging")||_this.closeGallery())}))},LightGallery.prototype.closeGallery=function(force){var _this=this;if(!this.lgOpened||!this.settings.closable&&!force)return 0;this.LGel.trigger(lGEvents.beforeClose),this.settings.resetScrollPosition&&!this.settings.hideScrollbar&&$LG(window).scrollTop(this.prevScrollTop);var currentItem=this.items[this.index],transform;if(this.zoomFromOrigin&&currentItem){var _a=this.mediaContainerPosition,top_4=_a.top,bottom=_a.bottom,_b=this.galleryItems[this.index],__slideVideoInfo=_b.__slideVideoInfo,poster=_b.poster,imageSize=utils.getSize(currentItem,this.outer,top_4+bottom,__slideVideoInfo&&poster&&this.settings.videoMaxSize,this.galleryItems[this.index]);transform=utils.getTransform(currentItem,this.outer,top_4,bottom,imageSize)}this.zoomFromOrigin&&transform?(this.outer.addClass("lg-closing lg-zoom-from-image"),this.getSlideItem(this.index).addClass("lg-start-end-progress").css("transition-duration",this.settings.startAnimationDuration+"ms").css("transform",transform)):(this.outer.addClass("lg-hide-items"),this.outer.removeClass("lg-zoom-from-image")),this.destroyModules(),this.lGalleryOn=!1,this.isDummyImageRemoved=!1,this.zoomFromOrigin=this.settings.zoomFromOrigin,clearTimeout(this.hideBarTimeout),this.hideBarTimeout=!1,$LG("html").removeClass("lg-on"),this.outer.removeClass("lg-visible lg-components-open"),this.$backdrop.removeClass("in").css("opacity",0);var removeTimeout=this.zoomFromOrigin&&transform?Math.max(this.settings.startAnimationDuration,this.settings.backdropDuration):this.settings.backdropDuration;return this.$container.removeClass("lg-show-in"),setTimeout(function(){_this.zoomFromOrigin&&transform&&_this.outer.removeClass("lg-zoom-from-image"),_this.$container.removeClass("lg-show"),_this.resetScrollBar(),_this.$backdrop.removeAttr("style").css("transition-duration",_this.settings.backdropDuration+"ms"),_this.outer.removeClass("lg-closing "+_this.settings.startClass),_this.getSlideItem(_this.index).removeClass("lg-start-end-progress"),_this.$inner.empty(),_this.lgOpened&&_this.LGel.trigger(lGEvents.afterClose,{instance:_this}),_this.$container.get()&&_this.$container.get().blur(),_this.lgOpened=!1},removeTimeout+100),removeTimeout+100},LightGallery.prototype.initModules=function(){this.plugins.forEach(function(module){try{module.init()}catch(err){console.warn("lightGallery:- make sure lightGallery module is properly initiated")}})},LightGallery.prototype.destroyModules=function(destroy){this.plugins.forEach(function(module){try{destroy?module.destroy():module.closeGallery&&module.closeGallery()}catch(err){console.warn("lightGallery:- make sure lightGallery module is properly destroyed")}})},LightGallery.prototype.refresh=function(galleryItems){this.settings.dynamic||this.invalidateItems(),galleryItems?this.galleryItems=galleryItems:this.galleryItems=this.getItems(),this.updateControls(),this.openGalleryOnItemClick(),this.LGel.trigger(lGEvents.updateSlides)},LightGallery.prototype.updateControls=function(){this.addSlideVideoInfo(this.galleryItems),this.updateCounterTotal(),this.manageSingleSlideClassName()},LightGallery.prototype.destroy=function(){var _this=this,closeTimeout=this.closeGallery(!0);return setTimeout(function(){_this.destroyModules(!0),_this.settings.dynamic||_this.invalidateItems(),$LG(window).off(".lg.global"+_this.lgId),_this.LGel.off(".lg"),_this.$container.remove()},closeTimeout),closeTimeout},LightGallery}();return lightGallery}),function(global,factory){typeof exports=="object"&&typeof module!="undefined"?module.exports=factory():typeof define=="function"&&define.amd?define(factory):(global=typeof globalThis!="undefined"?globalThis:global||self,global.lgZoom=factory())}(this,function(){"use strict";var __assign=function(){return __assign=Object.assign||function __assign(t){for(var s,i=1,n=arguments.length;i<n;i++){s=arguments[i];for(var p in s)Object.prototype.hasOwnProperty.call(s,p)&&(t[p]=s[p])}return t},__assign.apply(this,arguments)},zoomSettings={scale:1,zoom:!0,actualSize:!0,showZoomInOutIcons:!1,actualSizeIcons:{zoomIn:"lg-zoom-in",zoomOut:"lg-zoom-out"},enableZoomAfter:300,zoomPluginStrings:{zoomIn:"Zoom in",zoomOut:"Zoom out",viewActualSize:"View actual size"}},lGEvents={afterAppendSlide:"lgAfterAppendSlide",init:"lgInit",hasVideo:"lgHasVideo",containerResize:"lgContainerResize",updateSlides:"lgUpdateSlides",afterAppendSubHtml:"lgAfterAppendSubHtml",beforeOpen:"lgBeforeOpen",afterOpen:"lgAfterOpen",slideItemLoad:"lgSlideItemLoad",beforeSlide:"lgBeforeSlide",afterSlide:"lgAfterSlide",posterClick:"lgPosterClick",dragStart:"lgDragStart",dragMove:"lgDragMove",dragEnd:"lgDragEnd",beforeNextSlide:"lgBeforeNextSlide",beforePrevSlide:"lgBeforePrevSlide",beforeClose:"lgBeforeClose",afterClose:"lgAfterClose",rotateLeft:"lgRotateLeft",rotateRight:"lgRotateRight",flipHorizontal:"lgFlipHorizontal",flipVertical:"lgFlipVertical",autoplay:"lgAutoplay",autoplayStart:"lgAutoplayStart",autoplayStop:"lgAutoplayStop"},Zoom=function(){function Zoom(instance,$LG){return this.core=instance,this.$LG=$LG,this.settings=__assign(__assign({},zoomSettings),this.core.settings),this}return Zoom.prototype.buildTemplates=function(){var zoomIcons=this.settings.showZoomInOutIcons?'<button id="'+this.core.getIdName("lg-zoom-in")+'" type="button" aria-label="'+this.settings.zoomPluginStrings.zoomIn+'" class="lg-zoom-in lg-icon"></button><button id="'+this.core.getIdName("lg-zoom-out")+'" type="button" aria-label="'+this.settings.zoomPluginStrings.zoomIn+'" class="lg-zoom-out lg-icon"></button>':"";this.settings.actualSize&&(zoomIcons+='<button id="'+this.core.getIdName("lg-actual-size")+'" type="button" aria-label="'+this.settings.zoomPluginStrings.viewActualSize+'" class="'+this.settings.actualSizeIcons.zoomIn+' lg-icon"></button>'),this.core.outer.addClass("lg-use-transition-for-zoom"),this.core.$toolbar.first().append(zoomIcons)},Zoom.prototype.enableZoom=function(event){var _this=this,_speed=this.settings.enableZoomAfter+event.detail.delay;this.$LG("body").first().hasClass("lg-from-hash")&&event.detail.delay?_speed=0:this.$LG("body").first().removeClass("lg-from-hash"),this.zoomableTimeout=setTimeout(function(){if(!_this.isImageSlide())return;_this.core.getSlideItem(event.detail.index).addClass("lg-zoomable"),event.detail.index===_this.core.index&&_this.setZoomEssentials()},_speed+30)},Zoom.prototype.enableZoomOnSlideItemLoad=function(){this.core.LGel.on(lGEvents.slideItemLoad+".zoom",this.enableZoom.bind(this))},Zoom.prototype.getModifier=function(rotateValue,axis,el){var originalRotate=rotateValue;rotateValue=Math.abs(rotateValue);var transformValues=this.getCurrentTransform(el);if(!transformValues)return 1;var modifier=1;if(axis==="X"){var flipHorizontalValue=Math.sign(parseFloat(transformValues[0]));rotateValue===0||rotateValue===180?modifier=1:rotateValue===90&&(originalRotate===-90&&flipHorizontalValue===1||originalRotate===90&&flipHorizontalValue===-1?modifier=-1:modifier=1),modifier*=flipHorizontalValue}else{var flipVerticalValue=Math.sign(parseFloat(transformValues[3]));if(rotateValue===0||rotateValue===180)modifier=1;else if(rotateValue===90){var sinX=parseFloat(transformValues[1]),sinMinusX=parseFloat(transformValues[2]);modifier=Math.sign(sinX*sinMinusX*originalRotate*flipVerticalValue)}modifier*=flipVerticalValue}return modifier},Zoom.prototype.getImageSize=function($image,rotateValue,axis){var imageSizes={y:"offsetHeight",x:"offsetWidth"};return Math.abs(rotateValue)===90&&(axis==="x"?axis="y":axis="x"),$image[imageSizes[axis]]},Zoom.prototype.getDragCords=function(e,rotateValue){return rotateValue===90?{x:e.pageY,y:e.pageX}:{x:e.pageX,y:e.pageY}},Zoom.prototype.getSwipeCords=function(e,rotateValue){var x=e.targetTouches[0].pageX,y=e.targetTouches[0].pageY;return rotateValue===90?{x:y,y:x}:{x:x,y:y}},Zoom.prototype.getDragAllowedAxises=function(rotateValue,scale){scale=scale||this.scale||1;var allowY=this.imageYSize*scale>this.containerRect.height,allowX=this.imageXSize*scale>this.containerRect.width;return rotateValue===90?{allowX:allowY,allowY:allowX}:{allowX:allowX,allowY:allowY}},Zoom.prototype.getCurrentTransform=function(el){if(!el)return;var st=window.getComputedStyle(el,null),tm=st.getPropertyValue("-webkit-transform")||st.getPropertyValue("-moz-transform")||st.getPropertyValue("-ms-transform")||st.getPropertyValue("-o-transform")||st.getPropertyValue("transform")||"none";if(tm!=="none")return tm.split("(")[1].split(")")[0].split(",");return},Zoom.prototype.getCurrentRotation=function(el){if(!el)return 0;var values=this.getCurrentTransform(el);return values?Math.round(Math.atan2(parseFloat(values[1]),parseFloat(values[0]))*(180/Math.PI)):0},Zoom.prototype.setZoomEssentials=function(){var $image=this.core.getSlideItem(this.core.index).find(".lg-image").first(),rotateEl=this.core.getSlideItem(this.core.index).find(".lg-img-rotate").first().get();this.rotateValue=this.getCurrentRotation(rotateEl),this.imageYSize=this.getImageSize($image.get(),this.rotateValue,"y"),this.imageXSize=this.getImageSize($image.get(),this.rotateValue,"x"),this.containerRect=this.core.outer.get().getBoundingClientRect(),this.modifierX=this.getModifier(this.rotateValue,"X",rotateEl),this.modifierY=this.getModifier(this.rotateValue,"Y",rotateEl)},Zoom.prototype.zoomImage=function(scale){var offsetX=(this.containerRect.width-this.imageXSize)/2+this.containerRect.left,_a=this.core.mediaContainerPosition,top=_a.top,bottom=_a.bottom,topBottomSpacing=Math.abs(top-bottom)/2,offsetY=(this.containerRect.height-this.imageYSize-topBottomSpacing*this.modifierX)/2+this.scrollTop+this.containerRect.top,originalX,originalY;scale===1&&(this.positionChanged=!1);var dragAllowedAxises=this.getDragAllowedAxises(Math.abs(this.rotateValue),scale),allowY=dragAllowedAxises.allowY,allowX=dragAllowedAxises.allowX;this.positionChanged&&(originalX=this.left/(this.scale-1),originalY=this.top/(this.scale-1),this.pageX=Math.abs(originalX)+offsetX,this.pageY=Math.abs(originalY)+offsetY,this.positionChanged=!1);var possibleSwipeCords=this.getPossibleSwipeDragCords(this.rotateValue,scale),_x=offsetX-this.pageX,_y=offsetY-this.pageY,x=(scale-1)*_x,y=(scale-1)*_y;allowX?this.isBeyondPossibleLeft(x,possibleSwipeCords.minX)?x=possibleSwipeCords.minX:this.isBeyondPossibleRight(x,possibleSwipeCords.maxX)&&(x=possibleSwipeCords.maxX):scale>1&&(x<possibleSwipeCords.minX?x=possibleSwipeCords.minX:x>possibleSwipeCords.maxX&&(x=possibleSwipeCords.maxX)),allowY?this.isBeyondPossibleTop(y,possibleSwipeCords.minY)?y=possibleSwipeCords.minY:this.isBeyondPossibleBottom(y,possibleSwipeCords.maxY)&&(y=possibleSwipeCords.maxY):scale>1&&(y<possibleSwipeCords.minY?y=possibleSwipeCords.minY:y>possibleSwipeCords.maxY&&(y=possibleSwipeCords.maxY)),this.setZoomStyles({x:x,y:y,scale:scale})},Zoom.prototype.setZoomStyles=function(style){var $image=this.core.getSlideItem(this.core.index).find(".lg-image").first(),$dummyImage=this.core.outer.find(".lg-current .lg-dummy-img").first(),$imageWrap=$image.parent();this.scale=style.scale,$image.css("transform","scale3d("+style.scale+", "+style.scale+", 1)"),$dummyImage.css("transform","scale3d("+style.scale+", "+style.scale+", 1)");var transform="translate3d("+style.x+"px, "+style.y+"px, 0)";$imageWrap.css("transform",transform),this.left=style.x,this.top=style.y},Zoom.prototype.setActualSize=function(index,event){var _this=this;if(!this.isImageSlide()||this.core.outer.hasClass("lg-first-slide-loading"))return;var scale=this.getCurrentImageActualSizeScale();this.core.outer.hasClass("lg-zoomed")?this.scale=1:this.scale=this.getScale(scale),this.setPageCords(event),this.beginZoom(this.scale),this.zoomImage(this.scale),setTimeout(function(){_this.core.outer.removeClass("lg-grabbing").addClass("lg-grab")},10)},Zoom.prototype.getNaturalWidth=function(index){var $image=this.core.getSlideItem(index).find(".lg-image").first(),naturalWidth=this.core.galleryItems[index].width;return naturalWidth?parseFloat(naturalWidth):$image.get().naturalWidth},Zoom.prototype.getActualSizeScale=function(naturalWidth,width){var _scale,scale;return naturalWidth>width?(_scale=naturalWidth/width,scale=_scale||2):scale=1,scale},Zoom.prototype.getCurrentImageActualSizeScale=function(){var $image=this.core.getSlideItem(this.core.index).find(".lg-image").first(),width=$image.get().offsetWidth,naturalWidth=this.getNaturalWidth(this.core.index)||width;return this.getActualSizeScale(naturalWidth,width)},Zoom.prototype.getPageCords=function(event){var cords={};if(event)cords.x=event.pageX||event.targetTouches[0].pageX,cords.y=event.pageY||event.targetTouches[0].pageY;else{var containerRect=this.core.outer.get().getBoundingClientRect();cords.x=containerRect.width/2+containerRect.left,cords.y=containerRect.height/2+this.scrollTop+containerRect.top}return cords},Zoom.prototype.setPageCords=function(event){var pageCords=this.getPageCords(event);this.pageX=pageCords.x,this.pageY=pageCords.y},Zoom.prototype.beginZoom=function(scale){this.core.outer.removeClass("lg-zoom-drag-transition lg-zoom-dragging");if(scale>1){this.core.outer.addClass("lg-zoomed");var $actualSize=this.core.getElementById("lg-actual-size");$actualSize.removeClass(this.settings.actualSizeIcons.zoomIn).addClass(this.settings.actualSizeIcons.zoomOut)}else this.resetZoom();return scale>1},Zoom.prototype.getScale=function(scale){var actualSizeScale=this.getCurrentImageActualSizeScale();return scale<1?scale=1:scale>actualSizeScale&&(scale=actualSizeScale),scale},Zoom.prototype.init=function(){var _this=this;if(!this.settings.zoom)return;this.buildTemplates(),this.enableZoomOnSlideItemLoad();var tapped=null;this.core.outer.on("dblclick.lg",function(event){if(!_this.$LG(event.target).hasClass("lg-image"))return;_this.setActualSize(_this.core.index,event)}),this.core.outer.on("touchstart.lg",function(event){var $target=_this.$LG(event.target);event.targetTouches.length===1&&$target.hasClass("lg-image")&&(tapped?(clearTimeout(tapped),tapped=null,event.preventDefault(),_this.setActualSize(_this.core.index,event)):tapped=setTimeout(function(){tapped=null},300))}),this.core.LGel.on(lGEvents.containerResize+".zoom "+lGEvents.rotateRight+".zoom "+lGEvents.rotateLeft+".zoom "+lGEvents.flipHorizontal+".zoom "+lGEvents.flipVertical+".zoom",function(){if(!_this.core.lgOpened||!_this.isImageSlide())return;_this.setPageCords(),_this.setZoomEssentials(),_this.zoomImage(_this.scale)}),this.$LG(window).on("scroll.lg.zoom.global"+this.core.lgId,function(){if(!_this.core.lgOpened)return;_this.scrollTop=_this.$LG(window).scrollTop()}),this.core.getElementById("lg-zoom-out").on("click.lg",function(){_this.core.outer.find(".lg-current .lg-image").get()&&(_this.scale-=_this.settings.scale,_this.scale=_this.getScale(_this.scale),_this.beginZoom(_this.scale),_this.zoomImage(_this.scale))}),this.core.getElementById("lg-zoom-in").on("click.lg",function(){_this.zoomIn()}),this.core.getElementById("lg-actual-size").on("click.lg",function(){_this.setActualSize(_this.core.index)}),this.core.LGel.on(lGEvents.beforeOpen+".zoom",function(){_this.core.outer.find(".lg-item").removeClass("lg-zoomable")}),this.core.LGel.on(lGEvents.afterOpen+".zoom",function(){_this.scrollTop=_this.$LG(window).scrollTop(),_this.pageX=_this.core.outer.width()/2,_this.pageY=_this.core.outer.height()/2+_this.scrollTop,_this.scale=1}),this.core.LGel.on(lGEvents.afterSlide+".zoom",function(event){var prevIndex=event.detail.prevIndex;_this.scale=1,_this.positionChanged=!1,_this.resetZoom(prevIndex),_this.isImageSlide()&&_this.setZoomEssentials()}),this.zoomDrag(),this.pinchZoom(),this.zoomSwipe(),this.zoomableTimeout=!1,this.positionChanged=!1},Zoom.prototype.zoomIn=function(scale){if(!this.isImageSlide())return;scale?this.scale=scale:this.scale+=this.settings.scale,this.scale=this.getScale(this.scale),this.beginZoom(this.scale),this.zoomImage(this.scale)},Zoom.prototype.resetZoom=function(index){this.core.outer.removeClass("lg-zoomed lg-zoom-drag-transition");var $actualSize=this.core.getElementById("lg-actual-size"),$item=this.core.getSlideItem(index!==undefined?index:this.core.index);$actualSize.removeClass(this.settings.actualSizeIcons.zoomOut).addClass(this.settings.actualSizeIcons.zoomIn),$item.find(".lg-img-wrap").first().removeAttr("style"),$item.find(".lg-image").first().removeAttr("style"),this.scale=1,this.left=0,this.top=0,this.setPageCords()},Zoom.prototype.getTouchDistance=function(e){return Math.sqrt((e.targetTouches[0].pageX-e.targetTouches[1].pageX)*(e.targetTouches[0].pageX-e.targetTouches[1].pageX)+(e.targetTouches[0].pageY-e.targetTouches[1].pageY)*(e.targetTouches[0].pageY-e.targetTouches[1].pageY))},Zoom.prototype.pinchZoom=function(){var _this=this,startDist=0,pinchStarted=!1,initScale=1,$item=this.core.getSlideItem(this.core.index);this.core.$inner.on("touchstart.lg",function(e){$item=_this.core.getSlideItem(_this.core.index);if(!_this.isImageSlide())return;e.targetTouches.length===2&&!_this.core.outer.hasClass("lg-first-slide-loading")&&(_this.$LG(e.target).hasClass("lg-item")||$item.get().contains(e.target))&&(initScale=_this.scale||1,_this.core.outer.removeClass("lg-zoom-drag-transition lg-zoom-dragging"),_this.core.touchAction="pinch",startDist=_this.getTouchDistance(e))}),this.core.$inner.on("touchmove.lg",function(e){if(e.targetTouches.length===2&&_this.core.touchAction==="pinch"&&(_this.$LG(e.target).hasClass("lg-item")||$item.get().contains(e.target))){e.preventDefault();var endDist=_this.getTouchDistance(e),distance=startDist-endDist;!pinchStarted&&Math.abs(distance)>5&&(pinchStarted=!0),pinchStarted&&(_this.scale=Math.max(1,initScale+ -distance*.008),_this.zoomImage(_this.scale))}}),this.core.$inner.on("touchend.lg",function(e){_this.core.touchAction==="pinch"&&(_this.$LG(e.target).hasClass("lg-item")||$item.get().contains(e.target))&&(pinchStarted=!1,startDist=0,_this.scale<=1?_this.resetZoom():(_this.scale=_this.getScale(_this.scale),_this.zoomImage(_this.scale),_this.core.outer.addClass("lg-zoomed")),_this.core.touchAction=undefined)})},Zoom.prototype.touchendZoom=function(startCoords,endCoords,allowX,allowY,touchDuration,rotateValue){var distanceXnew=endCoords.x-startCoords.x,distanceYnew=endCoords.y-startCoords.y,speedX=Math.abs(distanceXnew)/touchDuration+1,speedY=Math.abs(distanceYnew)/touchDuration+1;speedX>2&&(speedX+=1),speedY>2&&(speedY+=1),distanceXnew*=speedX,distanceYnew*=speedY;var _LGel=this.core.getSlideItem(this.core.index).find(".lg-img-wrap").first(),distance={};distance.x=this.left+distanceXnew*this.modifierX,distance.y=this.top+distanceYnew*this.modifierY;var possibleSwipeCords=this.getPossibleSwipeDragCords(rotateValue);if(Math.abs(distanceXnew)>15||Math.abs(distanceYnew)>15)allowY&&(this.isBeyondPossibleTop(distance.y,possibleSwipeCords.minY)?distance.y=possibleSwipeCords.minY:this.isBeyondPossibleBottom(distance.y,possibleSwipeCords.maxY)&&(distance.y=possibleSwipeCords.maxY)),allowX&&(this.isBeyondPossibleLeft(distance.x,possibleSwipeCords.minX)?distance.x=possibleSwipeCords.minX:this.isBeyondPossibleRight(distance.x,possibleSwipeCords.maxX)&&(distance.x=possibleSwipeCords.maxX)),allowY?this.top=distance.y:distance.y=this.top,allowX?this.left=distance.x:distance.x=this.left,this.setZoomSwipeStyles(_LGel,distance),this.positionChanged=!0},Zoom.prototype.getZoomSwipeCords=function(startCoords,endCoords,allowX,allowY,possibleSwipeCords){var distance={};if(allowY){distance.y=this.top+(endCoords.y-startCoords.y)*this.modifierY;if(this.isBeyondPossibleTop(distance.y,possibleSwipeCords.minY)){var diffMinY=possibleSwipeCords.minY-distance.y;distance.y=possibleSwipeCords.minY-diffMinY/6}else if(this.isBeyondPossibleBottom(distance.y,possibleSwipeCords.maxY)){var diffMaxY=distance.y-possibleSwipeCords.maxY;distance.y=possibleSwipeCords.maxY+diffMaxY/6}}else distance.y=this.top;if(allowX){distance.x=this.left+(endCoords.x-startCoords.x)*this.modifierX;if(this.isBeyondPossibleLeft(distance.x,possibleSwipeCords.minX)){var diffMinX=possibleSwipeCords.minX-distance.x;distance.x=possibleSwipeCords.minX-diffMinX/6}else if(this.isBeyondPossibleRight(distance.x,possibleSwipeCords.maxX)){var difMaxX=distance.x-possibleSwipeCords.maxX;distance.x=possibleSwipeCords.maxX+difMaxX/6}}else distance.x=this.left;return distance},Zoom.prototype.isBeyondPossibleLeft=function(x,minX){return x>=minX},Zoom.prototype.isBeyondPossibleRight=function(x,maxX){return x<=maxX},Zoom.prototype.isBeyondPossibleTop=function(y,minY){return y>=minY},Zoom.prototype.isBeyondPossibleBottom=function(y,maxY){return y<=maxY},Zoom.prototype.isImageSlide=function(){var currentItem=this.core.galleryItems[this.core.index];return this.core.getSlideType(currentItem)==="image"},Zoom.prototype.getPossibleSwipeDragCords=function(rotateValue,scale){var dataScale=scale||this.scale||1,elDataScale=Math.abs(dataScale),_a=this.core.mediaContainerPosition,top=_a.top,bottom=_a.bottom,topBottomSpacing=Math.abs(top-bottom)/2,minY=(this.imageYSize-this.containerRect.height)/2+topBottomSpacing*this.modifierX,maxY=this.containerRect.height-this.imageYSize*elDataScale+minY,minX=(this.imageXSize-this.containerRect.width)/2,maxX=this.containerRect.width-this.imageXSize*elDataScale+minX,possibleSwipeCords={minY:minY,maxY:maxY,minX:minX,maxX:maxX};return Math.abs(rotateValue)===90&&(possibleSwipeCords={minY:minX,maxY:maxX,minX:minY,maxX:maxY}),possibleSwipeCords},Zoom.prototype.setZoomSwipeStyles=function(LGel,distance){LGel.css("transform","translate3d("+distance.x+"px, "+distance.y+"px, 0)")},Zoom.prototype.zoomSwipe=function(){var _this=this,startCoords={},endCoords={},isMoved=!1,allowX=!1,allowY=!1,startTime=new Date,endTime=new Date,possibleSwipeCords,_LGel,$item=this.core.getSlideItem(this.core.index);this.core.$inner.on("touchstart.lg",function(e){if(!_this.isImageSlide())return;$item=_this.core.getSlideItem(_this.core.index);if((_this.$LG(e.target).hasClass("lg-item")||$item.get().contains(e.target))&&e.targetTouches.length===1&&_this.core.outer.hasClass("lg-zoomed")){e.preventDefault(),startTime=new Date,_this.core.touchAction="zoomSwipe",_LGel=_this.core.getSlideItem(_this.core.index).find(".lg-img-wrap").first();var dragAllowedAxises=_this.getDragAllowedAxises(Math.abs(_this.rotateValue));allowY=dragAllowedAxises.allowY,allowX=dragAllowedAxises.allowX;if(allowX||allowY)startCoords=_this.getSwipeCords(e,Math.abs(_this.rotateValue));possibleSwipeCords=_this.getPossibleSwipeDragCords(_this.rotateValue),_this.core.outer.addClass("lg-zoom-dragging lg-zoom-drag-transition")}}),this.core.$inner.on("touchmove.lg",function(e){if(e.targetTouches.length===1&&_this.core.touchAction==="zoomSwipe"&&(_this.$LG(e.target).hasClass("lg-item")||$item.get().contains(e.target))){e.preventDefault(),_this.core.touchAction="zoomSwipe",endCoords=_this.getSwipeCords(e,Math.abs(_this.rotateValue));var distance=_this.getZoomSwipeCords(startCoords,endCoords,allowX,allowY,possibleSwipeCords);if(Math.abs(endCoords.x-startCoords.x)>15||Math.abs(endCoords.y-startCoords.y)>15)isMoved=!0,_this.setZoomSwipeStyles(_LGel,distance)}}),this.core.$inner.on("touchend.lg",function(e){if(_this.core.touchAction==="zoomSwipe"&&(_this.$LG(e.target).hasClass("lg-item")||$item.get().contains(e.target))){_this.core.touchAction=undefined,_this.core.outer.removeClass("lg-zoom-dragging");if(!isMoved)return;isMoved=!1,endTime=new Date;var touchDuration=endTime.valueOf()-startTime.valueOf();_this.touchendZoom(startCoords,endCoords,allowX,allowY,touchDuration,_this.rotateValue)}})},Zoom.prototype.zoomDrag=function(){var _this=this,startCoords={},endCoords={},isDragging=!1,isMoved=!1,allowX=!1,allowY=!1,startTime,endTime,possibleSwipeCords,_LGel;this.core.outer.on("mousedown.lg.zoom",function(e){if(!_this.isImageSlide())return;var $item=_this.core.getSlideItem(_this.core.index);if(_this.$LG(e.target).hasClass("lg-item")||$item.get().contains(e.target)){startTime=new Date,_LGel=_this.core.getSlideItem(_this.core.index).find(".lg-img-wrap").first();var dragAllowedAxises=_this.getDragAllowedAxises(Math.abs(_this.rotateValue));allowY=dragAllowedAxises.allowY,allowX=dragAllowedAxises.allowX,_this.core.outer.hasClass("lg-zoomed")&&_this.$LG(e.target).hasClass("lg-object")&&(allowX||allowY)&&(e.preventDefault(),startCoords=_this.getDragCords(e,Math.abs(_this.rotateValue)),possibleSwipeCords=_this.getPossibleSwipeDragCords(_this.rotateValue),isDragging=!0,_this.core.outer.get().scrollLeft+=1,_this.core.outer.get().scrollLeft-=1,_this.core.outer.removeClass("lg-grab").addClass("lg-grabbing lg-zoom-drag-transition lg-zoom-dragging"))}}),this.$LG(window).on("mousemove.lg.zoom.global"+this.core.lgId,function(e){if(isDragging){isMoved=!0,endCoords=_this.getDragCords(e,Math.abs(_this.rotateValue));var distance=_this.getZoomSwipeCords(startCoords,endCoords,allowX,allowY,possibleSwipeCords);_this.setZoomSwipeStyles(_LGel,distance)}}),this.$LG(window).on("mouseup.lg.zoom.global"+this.core.lgId,function(e){if(isDragging){endTime=new Date,isDragging=!1,_this.core.outer.removeClass("lg-zoom-dragging");if(isMoved&&(startCoords.x!==endCoords.x||startCoords.y!==endCoords.y)){endCoords=_this.getDragCords(e,Math.abs(_this.rotateValue));var touchDuration=endTime.valueOf()-startTime.valueOf();_this.touchendZoom(startCoords,endCoords,allowX,allowY,touchDuration,_this.rotateValue)}isMoved=!1}_this.core.outer.removeClass("lg-grabbing").addClass("lg-grab")})},Zoom.prototype.closeGallery=function(){this.resetZoom()},Zoom.prototype.destroy=function(){this.$LG(window).off(".lg.zoom.global"+this.core.lgId),this.core.LGel.off(".lg.zoom"),this.core.LGel.off(".zoom"),clearTimeout(this.zoomableTimeout),this.zoomableTimeout=!1},Zoom}();return Zoom}),function(global,factory){typeof exports=="object"&&typeof module!="undefined"?module.exports=factory():typeof define=="function"&&define.amd?define(factory):(global=typeof globalThis!="undefined"?globalThis:global||self,global.lgFullscreen=factory())}(this,function(){"use strict";var __assign=function(){return __assign=Object.assign||function __assign(t){for(var s,i=1,n=arguments.length;i<n;i++){s=arguments[i];for(var p in s)Object.prototype.hasOwnProperty.call(s,p)&&(t[p]=s[p])}return t},__assign.apply(this,arguments)},fullscreenSettings={fullScreen:!0,fullscreenPluginStrings:{toggleFullscreen:"Toggle Fullscreen"}},FullScreen=function(){function FullScreen(instance,$LG){return this.core=instance,this.$LG=$LG,this.settings=__assign(__assign({},fullscreenSettings),this.core.settings),this}return FullScreen.prototype.init=function(){var fullScreen="";if(this.settings.fullScreen){if(!document.fullscreenEnabled&&!document.webkitFullscreenEnabled&&!document.mozFullScreenEnabled&&!document.msFullscreenEnabled)return;fullScreen='<button type="button" aria-label="'+this.settings.fullscreenPluginStrings.toggleFullscreen+'" class="lg-fullscreen lg-icon"></button>',this.core.$toolbar.append(fullScreen),this.fullScreen()}},FullScreen.prototype.isFullScreen=function(){return document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement},FullScreen.prototype.requestFullscreen=function(){var el=document.documentElement;el.requestFullscreen?el.requestFullscreen():el.msRequestFullscreen?el.msRequestFullscreen():el.mozRequestFullScreen?el.mozRequestFullScreen():el.webkitRequestFullscreen&&el.webkitRequestFullscreen()},FullScreen.prototype.exitFullscreen=function(){document.exitFullscreen?document.exitFullscreen():document.msExitFullscreen?document.msExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen()},FullScreen.prototype.fullScreen=function(){var _this=this;this.$LG(document).on("fullscreenchange.lg.global"+this.core.lgId+" \n            webkitfullscreenchange.lg.global"+this.core.lgId+" \n            mozfullscreenchange.lg.global"+this.core.lgId+" \n            MSFullscreenChange.lg.global"+this.core.lgId,function(){if(!_this.core.lgOpened)return;_this.core.outer.toggleClass("lg-fullscreen-on")}),this.core.outer.find(".lg-fullscreen").first().on("click.lg",function(){_this.isFullScreen()?_this.exitFullscreen():_this.requestFullscreen()})},FullScreen.prototype.closeGallery=function(){this.isFullScreen()&&this.exitFullscreen()},FullScreen.prototype.destroy=function(){this.$LG(document).off("fullscreenchange.lg.global"+this.core.lgId+" \n            webkitfullscreenchange.lg.global"+this.core.lgId+" \n            mozfullscreenchange.lg.global"+this.core.lgId+" \n            MSFullscreenChange.lg.global"+this.core.lgId)},FullScreen}();return FullScreen}),function(global,factory){typeof exports=="object"&&typeof module!="undefined"?module.exports=factory():typeof define=="function"&&define.amd?define(factory):(global=typeof globalThis!="undefined"?globalThis:global||self,global.lgHash=factory())}(this,function(){"use strict";var __assign=function(){return __assign=Object.assign||function __assign(t){for(var s,i=1,n=arguments.length;i<n;i++){s=arguments[i];for(var p in s)Object.prototype.hasOwnProperty.call(s,p)&&(t[p]=s[p])}return t},__assign.apply(this,arguments)},lGEvents={afterAppendSlide:"lgAfterAppendSlide",init:"lgInit",hasVideo:"lgHasVideo",containerResize:"lgContainerResize",updateSlides:"lgUpdateSlides",afterAppendSubHtml:"lgAfterAppendSubHtml",beforeOpen:"lgBeforeOpen",afterOpen:"lgAfterOpen",slideItemLoad:"lgSlideItemLoad",beforeSlide:"lgBeforeSlide",afterSlide:"lgAfterSlide",posterClick:"lgPosterClick",dragStart:"lgDragStart",dragMove:"lgDragMove",dragEnd:"lgDragEnd",beforeNextSlide:"lgBeforeNextSlide",beforePrevSlide:"lgBeforePrevSlide",beforeClose:"lgBeforeClose",afterClose:"lgAfterClose",rotateLeft:"lgRotateLeft",rotateRight:"lgRotateRight",flipHorizontal:"lgFlipHorizontal",flipVertical:"lgFlipVertical",autoplay:"lgAutoplay",autoplayStart:"lgAutoplayStart",autoplayStop:"lgAutoplayStop"},hashSettings={hash:!0,galleryId:"1",customSlideName:!1},Hash=function(){function Hash(instance,$LG){return this.core=instance,this.$LG=$LG,this.settings=__assign(__assign({},hashSettings),this.core.settings),this}return Hash.prototype.init=function(){var _this=this;if(!this.settings.hash)return;this.oldHash=window.location.hash,setTimeout(function(){_this.buildFromHash()},100),this.core.LGel.on(lGEvents.afterSlide+".hash",this.onAfterSlide.bind(this)),this.core.LGel.on(lGEvents.afterClose+".hash",this.onCloseAfter.bind(this)),this.$LG(window).on("hashchange.lg.hash.global"+this.core.lgId,this.onHashchange.bind(this))},Hash.prototype.onAfterSlide=function(event){var slideName=this.core.galleryItems[event.detail.index].slideName;slideName=this.settings.customSlideName?slideName||event.detail.index:event.detail.index,history.replaceState?history.replaceState(null,"",window.location.pathname+window.location.search+"#lg="+this.settings.galleryId+"&slide="+slideName):window.location.hash="lg="+this.settings.galleryId+"&slide="+slideName},Hash.prototype.getIndexFromUrl=function(hash){hash===void 0&&(hash=window.location.hash);var slideName=hash.split("&slide=")[1],_idx=0;if(this.settings.customSlideName)for(var index=0;index<this.core.galleryItems.length;index++){var dynamicEl=this.core.galleryItems[index];if(dynamicEl.slideName===slideName){_idx=index;break}}else _idx=parseInt(slideName,10);return isNaN(_idx)?0:_idx},Hash.prototype.buildFromHash=function(){var _hash=window.location.hash;if(_hash.indexOf("lg="+this.settings.galleryId+"&")>0){this.$LG(document.body).addClass("lg-from-hash");var index=this.getIndexFromUrl(_hash);return this.core.openGallery(index),!0}},Hash.prototype.onCloseAfter=function(){this.oldHash&&this.oldHash.indexOf("lg="+this.settings.galleryId)<0?history.replaceState?history.replaceState(null,"",this.oldHash):window.location.hash=this.oldHash:history.replaceState?history.replaceState(null,document.title,window.location.pathname+window.location.search):window.location.hash=""},Hash.prototype.onHashchange=function(){if(!this.core.lgOpened)return;var _hash=window.location.hash,index=this.getIndexFromUrl(_hash);_hash.indexOf("lg="+this.settings.galleryId)>-1?this.core.slide(index,!1,!1):this.core.lGalleryOn&&this.core.closeGallery()},Hash.prototype.closeGallery=function(){this.settings.hash&&this.$LG(document.body).removeClass("lg-from-hash")},Hash.prototype.destroy=function(){this.core.LGel.off(".lg.hash"),this.core.LGel.off(".hash"),this.$LG(window).off("hashchange.lg.hash.global"+this.core.lgId)},Hash}();return Hash}),function(global,factory){typeof exports=="object"&&typeof module!="undefined"?module.exports=factory():typeof define=="function"&&define.amd?define(factory):(global=typeof globalThis!="undefined"?globalThis:global||self,global.lgShare=factory())}(this,function(){"use strict";function __spreadArrays(){for(var s=0,i=0,il=arguments.length;i<il;i++)s+=arguments[i].length;for(var r=Array(s),k=0,i=0;i<il;i++)for(var a=arguments[i],j=0,jl=a.length;j<jl;j++,k++)r[k]=a[j];return r}function getFacebookShareLink(galleryItem){var facebookBaseUrl="//www.facebook.com/sharer/sharer.php?u=";return facebookBaseUrl+encodeURIComponent(galleryItem.facebookShareUrl||window.location.href)}function getTwitterShareLink(galleryItem){var twitterBaseUrl="//twitter.com/intent/tweet?text=",url=encodeURIComponent(galleryItem.twitterShareUrl||window.location.href),text=galleryItem.tweetText;return twitterBaseUrl+text+"&url="+url}function getPinterestShareLink(galleryItem){var pinterestBaseUrl="http://www.pinterest.com/pin/create/button/?url=",description=galleryItem.pinterestText,media=encodeURIComponent(galleryItem.src),url=encodeURIComponent(galleryItem.pinterestShareUrl||window.location.href);return pinterestBaseUrl+url+"&media="+media+"&description="+description}var __assign=function(){return __assign=Object.assign||function __assign(t){for(var s,i=1,n=arguments.length;i<n;i++){s=arguments[i];for(var p in s)Object.prototype.hasOwnProperty.call(s,p)&&(t[p]=s[p])}return t},__assign.apply(this,arguments)},shareSettings={share:!0,facebook:!0,facebookDropdownText:"Facebook",twitter:!0,twitterDropdownText:"Twitter",pinterest:!0,pinterestDropdownText:"Pinterest",additionalShareOptions:[],sharePluginStrings:{share:"Share"}},lGEvents={afterAppendSlide:"lgAfterAppendSlide",init:"lgInit",hasVideo:"lgHasVideo",containerResize:"lgContainerResize",updateSlides:"lgUpdateSlides",afterAppendSubHtml:"lgAfterAppendSubHtml",beforeOpen:"lgBeforeOpen",afterOpen:"lgAfterOpen",slideItemLoad:"lgSlideItemLoad",beforeSlide:"lgBeforeSlide",afterSlide:"lgAfterSlide",posterClick:"lgPosterClick",dragStart:"lgDragStart",dragMove:"lgDragMove",dragEnd:"lgDragEnd",beforeNextSlide:"lgBeforeNextSlide",beforePrevSlide:"lgBeforePrevSlide",beforeClose:"lgBeforeClose",afterClose:"lgAfterClose",rotateLeft:"lgRotateLeft",rotateRight:"lgRotateRight",flipHorizontal:"lgFlipHorizontal",flipVertical:"lgFlipVertical",autoplay:"lgAutoplay",autoplayStart:"lgAutoplayStart",autoplayStop:"lgAutoplayStop"},Share=function(){function Share(instance){return this.shareOptions=[],this.core=instance,this.settings=__assign(__assign({},shareSettings),this.core.settings),this}return Share.prototype.init=function(){if(!this.settings.share)return;this.shareOptions=__spreadArrays(this.getDefaultShareOptions(),this.settings.additionalShareOptions),this.setLgShareMarkup(),this.core.outer.find(".lg-share .lg-dropdown").append(this.getShareListHtml()),this.core.LGel.on(lGEvents.afterSlide+".share",this.onAfterSlide.bind(this))},Share.prototype.getShareListHtml=function(){var shareHtml="";return this.shareOptions.forEach(function(shareOption){shareHtml+=shareOption.dropdownHTML}),shareHtml},Share.prototype.setLgShareMarkup=function(){var _this=this;this.core.$toolbar.append('<button type="button" aria-label="'+this.settings.sharePluginStrings.share+'" aria-haspopup="true" aria-expanded="false" class="lg-share lg-icon">\n                <ul class="lg-dropdown" style="position: absolute;"></ul></button>'),this.core.outer.append('<div class="lg-dropdown-overlay"></div>');var $shareButton=this.core.outer.find(".lg-share");$shareButton.first().on("click.lg",function(){_this.core.outer.toggleClass("lg-dropdown-active"),_this.core.outer.hasClass("lg-dropdown-active")?_this.core.outer.attr("aria-expanded",!0):_this.core.outer.attr("aria-expanded",!1)}),this.core.outer.find(".lg-dropdown-overlay").first().on("click.lg",function(){_this.core.outer.removeClass("lg-dropdown-active"),_this.core.outer.attr("aria-expanded",!1)})},Share.prototype.onAfterSlide=function(event){var _this=this,index=event.detail.index,currentItem=this.core.galleryItems[index];setTimeout(function(){_this.shareOptions.forEach(function(shareOption){var selector=shareOption.selector;_this.core.outer.find(selector).attr("href",shareOption.generateLink(currentItem))})},100)},Share.prototype.getShareListItemHTML=function(type,text){return'<li><a class="lg-share-'+type+'" rel="noopener" target="_blank"><span class="lg-icon"></span><span class="lg-dropdown-text">'+text+"</span></a></li>"},Share.prototype.getDefaultShareOptions=function(){return __spreadArrays(this.settings.facebook?[{type:"facebook",generateLink:getFacebookShareLink,dropdownHTML:this.getShareListItemHTML("facebook",this.settings.facebookDropdownText),selector:".lg-share-facebook"}]:[],this.settings.twitter?[{type:"twitter",generateLink:getTwitterShareLink,dropdownHTML:this.getShareListItemHTML("twitter",this.settings.twitterDropdownText),selector:".lg-share-twitter"}]:[],this.settings.pinterest?[{type:"pinterest",generateLink:getPinterestShareLink,dropdownHTML:this.getShareListItemHTML("pinterest",this.settings.pinterestDropdownText),selector:".lg-share-pinterest"}]:[])},Share.prototype.destroy=function(){this.core.outer.find(".lg-dropdown-overlay").remove(),this.core.outer.find(".lg-share").remove(),this.core.LGel.off(".lg.share"),this.core.LGel.off(".share")},Share}();return Share}),function(global,factory){typeof exports=="object"&&typeof module!="undefined"?module.exports=factory():typeof define=="function"&&define.amd?define(factory):(global=typeof globalThis!="undefined"?globalThis:global||self,global.lgThumbnail=factory())}(this,function(){"use strict";var __assign=function(){return __assign=Object.assign||function __assign(t){for(var s,i=1,n=arguments.length;i<n;i++){s=arguments[i];for(var p in s)Object.prototype.hasOwnProperty.call(s,p)&&(t[p]=s[p])}return t},__assign.apply(this,arguments)},thumbnailsSettings={thumbnail:!0,animateThumb:!0,currentPagerPosition:"middle",alignThumbnails:"middle",thumbWidth:100,thumbHeight:"80px",thumbMargin:5,appendThumbnailsTo:".lg-components",toggleThumb:!1,enableThumbDrag:!0,enableThumbSwipe:!0,thumbnailSwipeThreshold:10,loadYouTubeThumbnail:!0,youTubeThumbSize:1,thumbnailPluginStrings:{toggleThumbnails:"Toggle thumbnails"}},lGEvents={afterAppendSlide:"lgAfterAppendSlide",init:"lgInit",hasVideo:"lgHasVideo",containerResize:"lgContainerResize",updateSlides:"lgUpdateSlides",afterAppendSubHtml:"lgAfterAppendSubHtml",beforeOpen:"lgBeforeOpen",afterOpen:"lgAfterOpen",slideItemLoad:"lgSlideItemLoad",beforeSlide:"lgBeforeSlide",afterSlide:"lgAfterSlide",posterClick:"lgPosterClick",dragStart:"lgDragStart",dragMove:"lgDragMove",dragEnd:"lgDragEnd",beforeNextSlide:"lgBeforeNextSlide",beforePrevSlide:"lgBeforePrevSlide",beforeClose:"lgBeforeClose",afterClose:"lgAfterClose",rotateLeft:"lgRotateLeft",rotateRight:"lgRotateRight",flipHorizontal:"lgFlipHorizontal",flipVertical:"lgFlipVertical",autoplay:"lgAutoplay",autoplayStart:"lgAutoplayStart",autoplayStop:"lgAutoplayStop"},Thumbnail=function(){function Thumbnail(instance,$LG){return this.thumbOuterWidth=0,this.thumbTotalWidth=0,this.translateX=0,this.thumbClickable=!1,this.core=instance,this.$LG=$LG,this}return Thumbnail.prototype.init=function(){this.settings=__assign(__assign({},thumbnailsSettings),this.core.settings),this.thumbOuterWidth=0,this.thumbTotalWidth=this.core.galleryItems.length*(this.settings.thumbWidth+this.settings.thumbMargin),this.translateX=0,this.setAnimateThumbStyles(),this.core.settings.allowMediaOverlap||(this.settings.toggleThumb=!1),this.settings.thumbnail&&(this.build(),this.settings.animateThumb?(this.settings.enableThumbDrag&&this.enableThumbDrag(),this.settings.enableThumbSwipe&&this.enableThumbSwipe(),this.thumbClickable=!1):this.thumbClickable=!0,this.toggleThumbBar(),this.thumbKeyPress())},Thumbnail.prototype.build=function(){var _this=this;this.setThumbMarkup(),this.manageActiveClassOnSlideChange(),this.$lgThumb.first().on("click.lg touchend.lg",function(e){var $target=_this.$LG(e.target);if(!$target.hasAttribute("data-lg-item-id"))return;setTimeout(function(){if(_this.thumbClickable&&!_this.core.lgBusy){var index=parseInt($target.attr("data-lg-item-id"));_this.core.slide(index,!1,!0,!1)}},50)}),this.core.LGel.on(lGEvents.beforeSlide,function(event){var index=event.detail.index;_this.animateThumb(index)}),this.core.LGel.on(lGEvents.beforeOpen,function(){_this.thumbOuterWidth=_this.core.outer.get().offsetWidth}),this.core.LGel.on(lGEvents.updateSlides,function(){_this.rebuildThumbnails()}),this.core.LGel.on(lGEvents.containerResize,function(){if(!_this.core.lgOpened)return;setTimeout(function(){_this.thumbOuterWidth=_this.core.outer.get().offsetWidth,_this.animateThumb(_this.core.index),_this.thumbOuterWidth=_this.core.outer.get().offsetWidth},50)})},Thumbnail.prototype.setThumbMarkup=function(){var thumbOuterClassNames="lg-thumb-outer ";this.settings.alignThumbnails&&(thumbOuterClassNames+="lg-thumb-align-"+this.settings.alignThumbnails);var html='<div class="'+thumbOuterClassNames+'">\n        <div class="lg-thumb lg-group">\n        </div>\n        </div>';this.core.outer.addClass("lg-has-thumb"),this.settings.appendThumbnailsTo===".lg-components"?this.core.$lgComponents.append(html):this.core.outer.append(html),this.$thumbOuter=this.core.outer.find(".lg-thumb-outer").first(),this.$lgThumb=this.core.outer.find(".lg-thumb").first(),this.settings.animateThumb&&this.core.outer.find(".lg-thumb").css("transition-duration",this.core.settings.speed+"ms").css("width",this.thumbTotalWidth+"px").css("position","relative"),this.setThumbItemHtml(this.core.galleryItems)},Thumbnail.prototype.enableThumbDrag=function(){var _this=this,thumbDragUtils={cords:{startX:0,endX:0},isMoved:!1,newTranslateX:0,startTime:new Date,endTime:new Date,touchMoveTime:0},isDragging=!1;this.$thumbOuter.addClass("lg-grab"),this.core.outer.find(".lg-thumb").first().on("mousedown.lg.thumb",function(e){_this.thumbTotalWidth>_this.thumbOuterWidth&&(e.preventDefault(),thumbDragUtils.cords.startX=e.pageX,thumbDragUtils.startTime=new Date,_this.thumbClickable=!1,isDragging=!0,_this.core.outer.get().scrollLeft+=1,_this.core.outer.get().scrollLeft-=1,_this.$thumbOuter.removeClass("lg-grab").addClass("lg-grabbing"))}),this.$LG(window).on("mousemove.lg.thumb.global"+this.core.lgId,function(e){if(!_this.core.lgOpened)return;isDragging&&(thumbDragUtils.cords.endX=e.pageX,thumbDragUtils=_this.onThumbTouchMove(thumbDragUtils))}),this.$LG(window).on("mouseup.lg.thumb.global"+this.core.lgId,function(){if(!_this.core.lgOpened)return;thumbDragUtils.isMoved?thumbDragUtils=_this.onThumbTouchEnd(thumbDragUtils):_this.thumbClickable=!0,isDragging&&(isDragging=!1,_this.$thumbOuter.removeClass("lg-grabbing").addClass("lg-grab"))})},Thumbnail.prototype.enableThumbSwipe=function(){var _this=this,thumbDragUtils={cords:{startX:0,endX:0},isMoved:!1,newTranslateX:0,startTime:new Date,endTime:new Date,touchMoveTime:0};this.$lgThumb.on("touchstart.lg",function(e){_this.thumbTotalWidth>_this.thumbOuterWidth&&(e.preventDefault(),thumbDragUtils.cords.startX=e.targetTouches[0].pageX,_this.thumbClickable=!1,thumbDragUtils.startTime=new Date)}),this.$lgThumb.on("touchmove.lg",function(e){_this.thumbTotalWidth>_this.thumbOuterWidth&&(e.preventDefault(),thumbDragUtils.cords.endX=e.targetTouches[0].pageX,thumbDragUtils=_this.onThumbTouchMove(thumbDragUtils))}),this.$lgThumb.on("touchend.lg",function(){thumbDragUtils.isMoved?thumbDragUtils=_this.onThumbTouchEnd(thumbDragUtils):_this.thumbClickable=!0})},Thumbnail.prototype.rebuildThumbnails=function(){var _this=this;this.$thumbOuter.addClass("lg-rebuilding-thumbnails"),setTimeout(function(){_this.thumbTotalWidth=_this.core.galleryItems.length*(_this.settings.thumbWidth+_this.settings.thumbMargin),_this.$lgThumb.css("width",_this.thumbTotalWidth+"px"),_this.$lgThumb.empty(),_this.setThumbItemHtml(_this.core.galleryItems),_this.animateThumb(_this.core.index)},50),setTimeout(function(){_this.$thumbOuter.removeClass("lg-rebuilding-thumbnails")},200)},Thumbnail.prototype.setTranslate=function(value){this.$lgThumb.css("transform","translate3d(-"+value+"px, 0px, 0px)")},Thumbnail.prototype.getPossibleTransformX=function(left){return left>this.thumbTotalWidth-this.thumbOuterWidth&&(left=this.thumbTotalWidth-this.thumbOuterWidth),left<0&&(left=0),left},Thumbnail.prototype.animateThumb=function(index){this.$lgThumb.css("transition-duration",this.core.settings.speed+"ms");if(this.settings.animateThumb){var position=0;switch(this.settings.currentPagerPosition){case"left":position=0;break;case"middle":position=this.thumbOuterWidth/2-this.settings.thumbWidth/2;break;case"right":position=this.thumbOuterWidth-this.settings.thumbWidth}this.translateX=(this.settings.thumbWidth+this.settings.thumbMargin)*index-1-position,this.translateX>this.thumbTotalWidth-this.thumbOuterWidth&&(this.translateX=this.thumbTotalWidth-this.thumbOuterWidth),this.translateX<0&&(this.translateX=0),this.setTranslate(this.translateX)}},Thumbnail.prototype.onThumbTouchMove=function(thumbDragUtils){return thumbDragUtils.newTranslateX=this.translateX,thumbDragUtils.isMoved=!0,thumbDragUtils.touchMoveTime=(new Date).valueOf(),thumbDragUtils.newTranslateX-=thumbDragUtils.cords.endX-thumbDragUtils.cords.startX,thumbDragUtils.newTranslateX=this.getPossibleTransformX(thumbDragUtils.newTranslateX),this.setTranslate(thumbDragUtils.newTranslateX),this.$thumbOuter.addClass("lg-dragging"),thumbDragUtils},Thumbnail.prototype.onThumbTouchEnd=function(thumbDragUtils){thumbDragUtils.isMoved=!1,thumbDragUtils.endTime=new Date,this.$thumbOuter.removeClass("lg-dragging");var touchDuration=thumbDragUtils.endTime.valueOf()-thumbDragUtils.startTime.valueOf(),distanceXnew=thumbDragUtils.cords.endX-thumbDragUtils.cords.startX,speedX=Math.abs(distanceXnew)/touchDuration;return speedX>.15&&thumbDragUtils.endTime.valueOf()-thumbDragUtils.touchMoveTime<30?(speedX+=1,speedX>2&&(speedX+=1),speedX+=speedX*(Math.abs(distanceXnew)/this.thumbOuterWidth),this.$lgThumb.css("transition-duration",Math.min(speedX-1,2)+"settings"),distanceXnew*=speedX,this.translateX=this.getPossibleTransformX(this.translateX-distanceXnew),this.setTranslate(this.translateX)):this.translateX=thumbDragUtils.newTranslateX,Math.abs(thumbDragUtils.cords.endX-thumbDragUtils.cords.startX)<this.settings.thumbnailSwipeThreshold&&(this.thumbClickable=!0),thumbDragUtils},Thumbnail.prototype.getThumbHtml=function(thumb,index){var slideVideoInfo=this.core.galleryItems[index].__slideVideoInfo||{},thumbImg;return slideVideoInfo.youtube?this.settings.loadYouTubeThumbnail?thumbImg="//img.youtube.com/vi/"+slideVideoInfo.youtube[1]+"/"+this.settings.youTubeThumbSize+".jpg":thumbImg=thumb:thumbImg=thumb,'<div data-lg-item-id="'+index+'" class="lg-thumb-item '+(index===this.core.index?" active":"")+'" \n        style="width:'+this.settings.thumbWidth+"px; height: "+this.settings.thumbHeight+";\n            margin-right: "+this.settings.thumbMargin+'px;">\n            <img data-lg-item-id="'+index+'" src="'+thumbImg+'" />\n        </div>'},Thumbnail.prototype.getThumbItemHtml=function(items){var thumbList="";for(var i=0;i<items.length;i++)thumbList+=this.getThumbHtml(items[i].thumb,i);return thumbList},Thumbnail.prototype.setThumbItemHtml=function(items){var thumbList=this.getThumbItemHtml(items);this.$lgThumb.html(thumbList)},Thumbnail.prototype.setAnimateThumbStyles=function(){this.settings.animateThumb&&this.core.outer.addClass("lg-animate-thumb")},Thumbnail.prototype.manageActiveClassOnSlideChange=function(){var _this=this;this.core.LGel.on(lGEvents.beforeSlide,function(event){var $thumb=_this.core.outer.find(".lg-thumb-item"),index=event.detail.index;$thumb.removeClass("active"),$thumb.eq(index).addClass("active")})},Thumbnail.prototype.toggleThumbBar=function(){var _this=this;this.settings.toggleThumb&&(this.core.outer.addClass("lg-can-toggle"),this.core.$toolbar.append('<button type="button" aria-label="'+this.settings.thumbnailPluginStrings.toggleThumbnails+'" class="lg-toggle-thumb lg-icon"></button>'),this.core.outer.find(".lg-toggle-thumb").first().on("click.lg",function(){_this.core.outer.toggleClass("lg-components-open")}))},Thumbnail.prototype.thumbKeyPress=function(){var _this=this;this.$LG(window).on("keydown.lg.thumb.global"+this.core.lgId,function(e){if(!_this.core.lgOpened||!_this.settings.toggleThumb)return;e.keyCode===38?(e.preventDefault(),_this.core.outer.addClass("lg-components-open")):e.keyCode===40&&(e.preventDefault(),_this.core.outer.removeClass("lg-components-open"))})},Thumbnail.prototype.destroy=function(){this.settings.thumbnail&&(this.$LG(window).off(".lg.thumb.global"+this.core.lgId),this.core.LGel.off(".lg.thumb"),this.core.LGel.off(".thumb"),this.$thumbOuter.remove(),this.core.outer.removeClass("lg-has-thumb"))},Thumbnail}();return Thumbnail}),function(global,factory){typeof exports=="object"&&typeof module!="undefined"?module.exports=factory():typeof define=="function"&&define.amd?define(factory):(global=typeof globalThis!="undefined"?globalThis:global||self,global.lgVideo=factory())}(this,function(){"use strict";var __assign=function(){return __assign=Object.assign||function __assign(t){for(var s,i=1,n=arguments.length;i<n;i++){s=arguments[i];for(var p in s)Object.prototype.hasOwnProperty.call(s,p)&&(t[p]=s[p])}return t},__assign.apply(this,arguments)},videoSettings={autoplayFirstVideo:!0,youTubePlayerParams:!1,vimeoPlayerParams:!1,wistiaPlayerParams:!1,gotoNextSlideOnVideoEnd:!0,autoplayVideoOnSlide:!1,videojs:!1,videojsTheme:"",videojsOptions:{}},lGEvents={afterAppendSlide:"lgAfterAppendSlide",init:"lgInit",hasVideo:"lgHasVideo",containerResize:"lgContainerResize",updateSlides:"lgUpdateSlides",afterAppendSubHtml:"lgAfterAppendSubHtml",beforeOpen:"lgBeforeOpen",afterOpen:"lgAfterOpen",slideItemLoad:"lgSlideItemLoad",beforeSlide:"lgBeforeSlide",afterSlide:"lgAfterSlide",posterClick:"lgPosterClick",dragStart:"lgDragStart",dragMove:"lgDragMove",dragEnd:"lgDragEnd",beforeNextSlide:"lgBeforeNextSlide",beforePrevSlide:"lgBeforePrevSlide",beforeClose:"lgBeforeClose",afterClose:"lgAfterClose",rotateLeft:"lgRotateLeft",rotateRight:"lgRotateRight",flipHorizontal:"lgFlipHorizontal",flipVertical:"lgFlipVertical",autoplay:"lgAutoplay",autoplayStart:"lgAutoplayStart",autoplayStop:"lgAutoplayStop"},param=function(obj){return Object.keys(obj).map(function(k){return encodeURIComponent(k)+"="+encodeURIComponent(obj[k])}).join("&")},getVimeoURLParams=function(defaultParams,videoInfo){if(!videoInfo||!videoInfo.vimeo)return"";var urlParams=videoInfo.vimeo[2]||"",defaultPlayerParams=defaultParams&&Object.keys(defaultParams).length!==0?"&"+param(defaultParams):"",urlWithHash=videoInfo.vimeo[0].split("/").pop()||"",urlWithHashWithParams=urlWithHash.split("?")[0]||"",hash=urlWithHashWithParams.split("#")[0],isPrivate=videoInfo.vimeo[1]!==hash;isPrivate&&(urlParams=urlParams.replace("/"+hash,"")),urlParams=urlParams[0]=="?"?"&"+urlParams.slice(1):urlParams||"";var vimeoPlayerParams="?autoplay=0";return videoInfo.autoplay!==""?(vimeoPlayerParams=vimeoPlayerParams.replace(new RegExp("([?&])autoplay=(.*?)(&|$)"),"$1$3"),vimeoPlayerParams=vimeoPlayerParams.replace(new RegExp("([?&])autoplay(&|$)"),"$1$2")):typeof SiteParameters!="undefined"&&typeof SiteParameters.vimeoPlayerParams!="undefined"&&SiteParameters.vimeoPlayerParams!==""&&(vimeoPlayerParams=SiteParameters.vimeoPlayerParams),videoInfo.muted!==""?vimeoPlayerParams+="&muted="+(videoInfo.muted==="yes"):urlParams.indexOf("muted=")<0&&vimeoPlayerParams.indexOf("muted=")<0&&(vimeoPlayerParams+="&muted=1"),vimeoPlayerParams+=(isPrivate?"&h="+hash:"")+defaultPlayerParams+urlParams,vimeoPlayerParams},Video=function(){function Video(instance){return this.core=instance,this.settings=__assign(__assign({},videoSettings),this.core.settings),this}return Video.prototype.init=function(){var _this=this;this.core.LGel.on(lGEvents.hasVideo+".video",this.onHasVideo.bind(this)),this.core.LGel.on(lGEvents.posterClick+".video",function(){var $el=_this.core.getSlideItem(_this.core.index);_this.loadVideoOnPosterClick($el)}),this.core.LGel.on(lGEvents.slideItemLoad+".video",this.onSlideItemLoad.bind(this)),this.core.LGel.on(lGEvents.beforeSlide+".video",this.onBeforeSlide.bind(this)),this.core.LGel.on(lGEvents.afterSlide+".video",this.onAfterSlide.bind(this))},Video.prototype.onSlideItemLoad=function(event){var _this=this,_a=event.detail,isFirstSlide=_a.isFirstSlide,index=_a.index;this.settings.autoplayFirstVideo&&isFirstSlide&&index===this.core.index&&setTimeout(function(){_this.loadAndPlayVideo(index)},200),!isFirstSlide&&this.settings.autoplayVideoOnSlide&&index===this.core.index&&setTimeout(function(){_this.loadAndPlayVideo(index)},500)},Video.prototype.onHasVideo=function(event){var _a=event.detail,index=_a.index,src=_a.src,html5Video=_a.html5Video,hasPoster=_a.hasPoster;hasPoster||(this.appendVideos(this.core.getSlideItem(index),{src:src,addClass:"lg-object",index:index,html5Video:html5Video,autoplay:event.target.getAttribute("data-lb-autoplay"),muted:event.target.getAttribute("data-lb-muted")}),this.gotoNextSlideOnVideoEnd(src,index))},Video.prototype.onBeforeSlide=function(event){if(this.core.lGalleryOn){var prevIndex=event.detail.prevIndex;this.pauseVideo(prevIndex)}var _a=event.detail,index=_a.index,$slide=this.core.getSlideItem(index),iframe=$slide.selector.querySelector("iframe");if(iframe!=null){var data_play=iframe.getAttribute("data-autoplay");if(typeof data_play!="undefined"&&data_play==="1"){this.loadAndPlayVideo(index);var videoInfo=this.core.galleryItems[index].__slideVideoInfo||{},$videoElement=this.core.getSlideItem(index).find(".lg-video-object").first();if(videoInfo.vimeo){var vimeoPlayer=new Vimeo.Player($videoElement.get());vimeoPlayer.on("play",function(){vimeoPlayer.setCurrentTime(0)})}else if(videoInfo.youtube)try{$videoElement.get().contentWindow.postMessage('{"event":"command","func":"seekTo","args":[0, true]}',"*")}catch(e){console.warn(e)}}}},Video.prototype.onAfterSlide=function(event){var _this=this,_a=event.detail,index=_a.index,prevIndex=_a.prevIndex,$slide=this.core.getSlideItem(index);this.settings.autoplayVideoOnSlide&&index!==prevIndex&&$slide.hasClass("lg-complete")&&setTimeout(function(){_this.loadAndPlayVideo(index)},100)},Video.prototype.loadAndPlayVideo=function(index){var $slide=this.core.getSlideItem(index),currentGalleryItem=this.core.galleryItems[index];if(currentGalleryItem.poster)this.loadVideoOnPosterClick($slide,!0);else{var iframe=$slide.selector.querySelector("iframe");if(iframe!=null){var data_play=iframe.getAttribute("data-autoplay");typeof data_play!="undefined"&&(data_play==="1"&&this.core.index==index?this.playVideo(index):this.pauseVideo(index))}}},Video.prototype.playVideo=function(index){this.controlVideo(index,"play")},Video.prototype.pauseVideo=function(index){this.controlVideo(index,"pause")},Video.prototype.getVideoHtml=function(src,addClass,index,html5Video,autoplay,muted){var video="",videoInfo=this.core.galleryItems[index].__slideVideoInfo||{},currentGalleryItem=this.core.galleryItems[index],videoTitle=currentGalleryItem.title||currentGalleryItem.alt;videoTitle=videoTitle?'title="'+videoTitle+'"':"";var commonIframeProps='allowtransparency="true"\n            frameborder="0"\n            scrolling="no"\n            allowfullscreen\n            mozallowfullscreen\n            webkitallowfullscreen\n            oallowfullscreen\n            msallowfullscreen';if(videoInfo.youtube){var videoId="lg-youtube"+index,slideUrlParams=videoInfo.youtube[2]?videoInfo.youtube[2]+"&":"",youTubePlayerParams="?"+slideUrlParams+"wmode=opaque&enablejsapi=1";slideUrlParams.indexOf("autoplay=")<0&&youTubePlayerParams.indexOf("autoplay=")<0&&(youTubePlayerParams+="&autoplay=0"),slideUrlParams.indexOf("mute=")<0&&youTubePlayerParams.indexOf("mute=")<0&&(youTubePlayerParams+="&mute=1");var data_video="";autoplay!==""&&(youTubePlayerParams=youTubePlayerParams.replace(new RegExp("([?&])autoplay=(.*?)(&|$)"),"$1$3"),youTubePlayerParams=youTubePlayerParams.replace(new RegExp("([?&])autoplay"),"$1"),data_video=' data-autoplay="'+(autoplay==="yes"?1:0)+'"'),youTubePlayerParams=youTubePlayerParams.replace(new RegExp("([?&])mute=(.*?)(&|$)"),"$1$3"),youTubePlayerParams=youTubePlayerParams.replace("??","?");var playerParams=youTubePlayerParams+(this.settings.youTubePlayerParams?"&"+param(this.settings.youTubePlayerParams):""),nocookie=typeof SiteParameters.uncode_nocookie!="undefined"?SiteParameters.uncode_nocookie:"";video='<iframe allow="autoplay"'+data_video+" id="+videoId+' class="lg-video-object lg-youtube '+addClass+'" '+videoTitle+' src="//www.youtube'+nocookie+".com/embed/"+(videoInfo.youtube[1]+playerParams)+'" '+commonIframeProps+"></iframe>";var tag=document.createElement("script");tag.src="//www.youtube.com/player_api";var firstScriptTag=document.getElementsByTagName("script")[0];firstScriptTag.parentNode.insertBefore(tag,firstScriptTag);var ytIframeplayer,setMute=muted==="yes"?0:100;window.onYouTubePlayerAPIReady=function(){ytIframeplayer=new YT.Player(videoId,{videoId:videoInfo.youtube[1],events:{onReady:function(event){event.target.setVolume(setMute)}}})}}else if(videoInfo.vimeo){var videoId="lg-vimeo"+index;videoInfo.autoplay=autoplay,videoInfo.muted=muted;var playerParams=getVimeoURLParams(this.settings.vimeoPlayerParams,videoInfo),data_video="";autoplay!==""&&(data_video=' data-autoplay="'+(autoplay==="yes"?1:0)+'"'),video='<iframe allow="autoplay"'+data_video+" id="+videoId+' class="lg-video-object lg-vimeo '+addClass+'" '+videoTitle+' src="//player.vimeo.com/video/'+(videoInfo.vimeo[1]+playerParams)+'" '+commonIframeProps+"></iframe>"}else if(videoInfo.wistia){var wistiaId="lg-wistia"+index,playerParams=param(this.settings.wistiaPlayerParams);playerParams=playerParams?"?"+playerParams:"",video='<iframe allow="autoplay" id="'+wistiaId+'" src="//fast.wistia.net/embed/iframe/'+(videoInfo.wistia[4]+playerParams)+'" '+videoTitle+' class="wistia_embed lg-video-object lg-wistia '+addClass+'" name="wistia_embed" '+commonIframeProps+"></iframe>"}else if(videoInfo.html5){var html5VideoMarkup="";for(var i=0;i<html5Video.source.length;i++)html5VideoMarkup+='<source src="'+html5Video.source[i].src+'" type="'+html5Video.source[i].type+'">';if(html5Video.tracks){var _loop_1=function(i){var trackAttributes="",track=html5Video.tracks[i];Object.keys(track||{}).forEach(function(key){trackAttributes+=key+'="'+track[key]+'" '}),html5VideoMarkup+="<track "+trackAttributes+">"};for(var i=0;i<html5Video.tracks.length;i++)_loop_1(i)}var html5VideoAttrs_1="",videoAttributes_1=html5Video.attributes||{};Object.keys(videoAttributes_1||{}).forEach(function(key){html5VideoAttrs_1+=key+'="'+videoAttributes_1[key]+'" '}),video='<video class="lg-video-object lg-html5 '+(this.settings.videojs&&this.settings.videojsTheme?this.settings.videojsTheme+" ":"")+" "+(this.settings.videojs?" video-js":"")+'" '+html5VideoAttrs_1+">\n                "+html5VideoMarkup+"\n                Your browser does not support HTML5 video.\n            </video>"}return video},Video.prototype.appendVideos=function(el,videoParams){var _a,videoHtml=this.getVideoHtml(videoParams.src,videoParams.addClass,videoParams.index,videoParams.html5Video,videoParams.autoplay,videoParams.muted);el.find(".lg-video-cont").append(videoHtml);var $videoElement=el.find(".lg-video-object").first();videoParams.html5Video&&$videoElement.on("mousedown.lg.video",function(e){e.stopPropagation()});if(this.settings.videojs&&((_a=this.core.galleryItems[videoParams.index].__slideVideoInfo)===null||_a===void 0?void 0:_a.html5))try{return videojs($videoElement.get(),this.settings.videojsOptions)}catch(e){console.warn("lightGallery:- Make sure you have included videojs")}},Video.prototype.gotoNextSlideOnVideoEnd=function(src,index){var _this=this,$videoElement=this.core.getSlideItem(index).find(".lg-video-object").first(),videoInfo=this.core.galleryItems[index].__slideVideoInfo||{};if(this.settings.gotoNextSlideOnVideoEnd)if(videoInfo.html5)$videoElement.on("ended",function(){_this.core.goToNextSlide()});else if(videoInfo.vimeo)try{(new Vimeo.Player($videoElement.get())).on("ended",function(){_this.core.goToNextSlide()})}catch(e){console.warn("lightGallery:- Make sure you have included //github.com/vimeo/player.js")}else if(videoInfo.wistia)try{window._wq=window._wq||[],window._wq.push({id:$videoElement.attr("id"),onReady:function(video){video.bind("end",function(){_this.core.goToNextSlide()})}})}catch(e){console.warn("lightGallery:- Make sure you have included //fast.wistia.com/assets/external/E-v1.js")}},Video.prototype.controlVideo=function(index,action){var $videoElement=this.core.getSlideItem(index).find(".lg-video-object").first(),videoInfo=this.core.galleryItems[index].__slideVideoInfo||{};if(!$videoElement.get())return;if(videoInfo.youtube)try{$videoElement.get().contentWindow.postMessage('{"event":"command","func":"'+action+'Video","args":""}',"*")}catch(e){console.warn("lightGallery:- "+e)}else if(videoInfo.vimeo)try{(new Vimeo.Player($videoElement.get()))[action]()}catch(e){console.warn("lightGallery:- Make sure you have included //github.com/vimeo/player.js")}else if(videoInfo.html5)if(this.settings.videojs)try{videojs($videoElement.get())[action]()}catch(e){console.warn("lightGallery:- Make sure you have included videojs")}else $videoElement.get()[action]();else if(videoInfo.wistia)try{window._wq=window._wq||[],window._wq.push({id:$videoElement.attr("id"),onReady:function(video){video[action]()}})}catch(e){console.warn("lightGallery:- Make sure you have included //fast.wistia.com/assets/external/E-v1.js")}},Video.prototype.loadVideoOnPosterClick=function($el,forcePlay){var _this=this;if(!$el.hasClass("lg-video-loaded"))if(!$el.hasClass("lg-has-video")){$el.addClass("lg-has-video");var _html=void 0,_src=this.core.galleryItems[this.core.index].src,video=this.core.galleryItems[this.core.index].video;video&&(_html=typeof video=="string"?JSON.parse(video):video);var videoJsPlayer_1=this.appendVideos($el,{src:_src,addClass:"",index:this.core.index,html5Video:_html});this.gotoNextSlideOnVideoEnd(_src,this.core.index);var $tempImg=$el.find(".lg-object").first().get();$el.find(".lg-video-cont").first().append($tempImg),$el.addClass("lg-video-loading"),videoJsPlayer_1&&videoJsPlayer_1.ready(function(){videoJsPlayer_1.on("loadedmetadata",function(){_this.onVideoLoadAfterPosterClick($el,_this.core.index)})}),$el.find(".lg-video-object").first().on("load.lg error.lg loadedmetadata.lg",function(){setTimeout(function(){_this.onVideoLoadAfterPosterClick($el,_this.core.index)},50)})}else this.playVideo(this.core.index);else forcePlay&&this.playVideo(this.core.index)},Video.prototype.onVideoLoadAfterPosterClick=function($el,index){$el.addClass("lg-video-loaded"),this.playVideo(index)},Video.prototype.destroy=function(){this.core.LGel.off(".lg.video"),this.core.LGel.off(".video")},Video}();return Video}),!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):((e="undefined"!=typeof globalThis?globalThis:e||self).Vimeo=e.Vimeo||{},e.Vimeo.Player=t())}(this,function(){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function i(e,t){return 0===e.indexOf(t.toLowerCase())?e:"".concat(t.toLowerCase()).concat(e.substr(0,1).toUpperCase()).concat(e.substr(1))}function c(e){return/^(https?:)?\/\/((player|www)\.)?vimeo\.com(?=$|\/)/.test(e)}function s(e){var t,n=0<arguments.length&&void 0!==e?e:{},r=n.id,o=n.url,i=r||o;if(!i)throw new Error("An id or url must be passed, either in an options object or as a data-vimeo-id or data-vimeo-url attribute.");if(t=i,!isNaN(parseFloat(t))&&isFinite(t)&&Math.floor(t)==t)return"https://vimeo.com/".concat(i);if(c(i))return i.replace("http:","https:");throw r?new TypeError("“".concat(r,"” is not a valid video id.")):new TypeError("“".concat(i,"” is not a vimeo.com url."))}function d(){if(void 0===this)throw new TypeError("Constructor WeakMap requires 'new'");if(l(this,"_id","_WeakMap_"+v()+"."+v()),0<arguments.length)throw new TypeError("WeakMap iterable is not supported")}function h(e,t){if(!m(e)||!a.call(e,"_id"))throw new TypeError(t+" method called on incompatible receiver "+typeof e)}function v(){return Math.random().toString().substring(2)}function m(e){return Object(e)===e}function w(e,t,n){var r=g.get(e.element)||{};t in r||(r[t]=[]),r[t].push(n),g.set(e.element,r)}function b(e,t){return(g.get(e.element)||{})[t]||[]}function k(e,t,n){var r=g.get(e.element)||{};if(!r[t])return!0;if(!n)return r[t]=[],g.set(e.element,r),!0;var o=r[t].indexOf(n);return-1!==o&&r[t].splice(o,1),g.set(e.element,r),r[t]&&0===r[t].length}function E(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){return console.warn(e),{}}return e}function T(e,t,n){var r,o;e.element.contentWindow&&e.element.contentWindow.postMessage&&(r={method:t},void 0!==n&&(r.value=n),8<=(o=parseFloat(navigator.userAgent.toLowerCase().replace(/^.*msie (\d+).*$/,"$1")))&&o<10&&(r=JSON.stringify(r)),e.element.contentWindow.postMessage(r,e.origin))}function P(n,r){var t,e,o=[];(r=E(r)).event?("error"===r.event&&b(n,r.data.method).forEach(function(e){var t=new Error(r.data.message);t.name=r.data.name,e.reject(t),k(n,r.data.method,e)}),o=b(n,"event:".concat(r.event)),t=r.data):!r.method||(e=function(e,t){var n=b(e,t);if(n.length<1)return!1;var r=n.shift();return k(e,t,r),r}(n,r.method))&&(o.push(e),t=r.value),o.forEach(function(e){try{if("function"==typeof e)return void e.call(n,t);e.resolve(t)}catch(e){}})}function _(r,e){var t=1<arguments.length&&void 0!==e?e:{};return M.reduce(function(e,t){var n=r.getAttribute("data-vimeo-".concat(t));return!n&&""!==n||(e[t]=""===n?1:n),e},t)}function N(e,t){var n=e.html;if(!t)throw new TypeError("An element must be provided");if(null!==t.getAttribute("data-vimeo-initialized"))return t.querySelector("iframe");var r=document.createElement("div");return r.innerHTML=n,t.appendChild(r.firstChild),t.setAttribute("data-vimeo-initialized","true"),t.querySelector("iframe")}function F(i,e,t){var a=1<arguments.length&&void 0!==e?e:{},u=2<arguments.length?t:void 0;return new Promise(function(t,n){if(!c(i))throw new TypeError("“".concat(i,"” is not a vimeo.com url."));var e="https://vimeo.com/api/oembed.json?url=".concat(encodeURIComponent(i));for(var r in a)a.hasOwnProperty(r)&&(e+="&".concat(r,"=").concat(encodeURIComponent(a[r])));var o=new("XDomainRequest"in window?XDomainRequest:XMLHttpRequest);o.open("GET",e,!0),o.onload=function(){if(404!==o.status)if(403!==o.status)try{var e=JSON.parse(o.responseText);if(403===e.domain_status_code)return N(e,u),void n(new Error("“".concat(i,"” is not embeddable.")));t(e)}catch(e){n(e)}else n(new Error("“".concat(i,"” is not embeddable.")));else n(new Error("“".concat(i,"” was not found.")))},o.onerror=function(){var e=o.status?" (".concat(o.status,")"):"";n(new Error("There was an error fetching the embed code from Vimeo".concat(e,".")))},o.send()})}var e="undefined"!=typeof global&&"[object global]"==={}.toString.call(global),t=void 0!==Array.prototype.indexOf,n="undefined"!=typeof window&&void 0!==window.postMessage;if(!(e||t&&n))throw new Error("Sorry, the Vimeo Player API is not available in this browser.");var o,a,u,l,f="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};(o="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:f).WeakMap||(a=Object.prototype.hasOwnProperty,u=Object.defineProperty&&function(){try{return 1===Object.defineProperty({},"x",{value:1}).x}catch(e){}}(),l=function(e,t,n){u?Object.defineProperty(e,t,{configurable:!0,writable:!0,value:n}):e[t]=n},o.WeakMap=(l(d.prototype,"delete",function(e){if(h(this,"delete"),!m(e))return!1;var t=e[this._id];return!!t&&t[0]===e&&(delete e[this._id],!0)}),l(d.prototype,"get",function(e){if(h(this,"get"),m(e)){var t=e[this._id];return t&&t[0]===e?t[1]:void 0}}),l(d.prototype,"has",function(e){if(h(this,"has"),!m(e))return!1;var t=e[this._id];return!!t&&t[0]===e}),l(d.prototype,"set",function(e,t){if(h(this,"set"),!m(e))throw new TypeError("Invalid value used as weak map key");var n=e[this._id];return n&&n[0]===e?n[1]=t:l(e,this._id,[e,t]),this}),l(d,"_polyfill",!0),d));var p,y=(function(e){var t,n,r;r=function(){function l(e,t){this.fn=e,this.self=t,this.next=void 0}function c(e,t){r.add(e,t),n=n||u(r.drain)}function s(e){var t,n=typeof e;return null==e||"object"!=n&&"function"!=n||(t=e.then),"function"==typeof t&&t}function f(){for(var e=0;e<this.chain.length;e++)!function(e,t,n){var r,o;try{!1===t?n.reject(e.msg):(r=!0===t?e.msg:t.call(void 0,e.msg))===n.promise?n.reject(TypeError("Promise-chain cycle")):(o=s(r))?o.call(r,n.resolve,n.reject):n.resolve(r)}catch(e){n.reject(e)}}(this,1===this.state?this.chain[e].success:this.chain[e].failure,this.chain[e]);this.chain.length=0}function d(e){var n,r=this;if(!r.triggered){r.triggered=!0,r.def&&(r=r.def);try{(n=s(e))?c(function(){var t=new m(r);try{n.call(e,function(){d.apply(t,arguments)},function(){h.apply(t,arguments)})}catch(e){h.call(t,e)}}):(r.msg=e,r.state=1,0<r.chain.length&&c(f,r))}catch(e){h.call(new m(r),e)}}}function h(e){var t=this;t.triggered||(t.triggered=!0,t.def&&(t=t.def),t.msg=e,t.state=2,0<t.chain.length&&c(f,t))}function v(e,n,r,o){for(var t=0;t<n.length;t++)!function(t){e.resolve(n[t]).then(function(e){r(t,e)},o)}(t)}function m(e){this.def=e,this.triggered=!1}function p(e){this.promise=e,this.state=0,this.triggered=!1,this.chain=[],this.msg=void 0}function y(e){if("function"!=typeof e)throw TypeError("Not a function");if(0!==this.__NPO__)throw TypeError("Not a promise");this.__NPO__=1;var r=new p(this);this.then=function(e,t){var n={success:"function"!=typeof e||e,failure:"function"==typeof t&&t};return n.promise=new this.constructor(function(e,t){if("function"!=typeof e||"function"!=typeof t)throw TypeError("Not a function");n.resolve=e,n.reject=t}),r.chain.push(n),0!==r.state&&c(f,r),n.promise},this.catch=function(e){return this.then(void 0,e)};try{e.call(void 0,function(e){d.call(r,e)},function(e){h.call(r,e)})}catch(e){h.call(r,e)}}var t,n,r,o,i,a,e=Object.prototype.toString,u="undefined"!=typeof setImmediate?function(e){return setImmediate(e)}:setTimeout;try{Object.defineProperty({},"x",{}),t=function(e,t,n,r){return Object.defineProperty(e,t,{value:n,writable:!0,configurable:!1!==r})}}catch(e){t=function(e,t,n){return e[t]=n,e}}var g=t({},"constructor",y,!(r={add:function(e,t){a=new l(e,t),i?i.next=a:o=a,i=a,a=void 0},drain:function(){var e=o;for(o=i=n=void 0;e;)e.fn.call(e.self),e=e.next}}));return t(y.prototype=g,"__NPO__",0,!1),t(y,"resolve",function(n){return n&&"object"==typeof n&&1===n.__NPO__?n:new this(function(e,t){if("function"!=typeof e||"function"!=typeof t)throw TypeError("Not a function");e(n)})}),t(y,"reject",function(n){return new this(function(e,t){if("function"!=typeof e||"function"!=typeof t)throw TypeError("Not a function");t(n)})}),t(y,"all",function(t){var a=this;return"[object Array]"!=e.call(t)?a.reject(TypeError("Not an array")):0===t.length?a.resolve([]):new a(function(n,e){if("function"!=typeof n||"function"!=typeof e)throw TypeError("Not a function");var r=t.length,o=Array(r),i=0;v(a,t,function(e,t){o[e]=t,++i===r&&n(o)},e)})}),t(y,"race",function(t){var r=this;return"[object Array]"!=e.call(t)?r.reject(TypeError("Not an array")):new r(function(n,e){if("function"!=typeof n||"function"!=typeof e)throw TypeError("Not a function");v(r,t,function(e,t){n(t)},e)})}),y},(n=f)[t="Promise"]=n[t]||r(),e.exports&&(e.exports=n[t])}(p={exports:{}}),p.exports),g=new WeakMap,M=["autopause","autoplay","background","byline","color","controls","dnt","height","id","interactive_params","keyboard","loop","maxheight","maxwidth","muted","playsinline","portrait","responsive","speed","texttrack","title","transparent","url","width"],x,C,j,A=new WeakMap,S=new WeakMap,q={},Player=function(){function Player(u){var e,t,l=this,n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};if(!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,Player),window.jQuery&&u instanceof jQuery&&(1<u.length&&window.console&&console.warn&&console.warn("A jQuery object with multiple elements was passed, using the first element."),u=u[0]),"undefined"!=typeof document&&"string"==typeof u&&(u=document.getElementById(u)),e=u,!Boolean(e&&1===e.nodeType&&"nodeName"in e&&e.ownerDocument&&e.ownerDocument.defaultView))throw new TypeError("You must pass either a valid element or a valid id.");if("IFRAME"===u.nodeName||(t=u.querySelector("iframe"))&&(u=t),"IFRAME"===u.nodeName&&!c(u.getAttribute("src")||""))throw new Error("The player element passed isn’t a Vimeo embed.");if(A.has(u))return A.get(u);this._window=u.ownerDocument.defaultView,this.element=u,this.origin="*";var r,o=new y(function(i,a){var e;l._onMessage=function(e){if(c(e.origin)&&l.element.contentWindow===e.source){"*"===l.origin&&(l.origin=e.origin);var t=E(e.data);if(t&&"error"===t.event&&t.data&&"ready"===t.data.method){var n=new Error(t.data.message);return n.name=t.data.name,void a(n)}var r=t&&"ready"===t.event,o=t&&"ping"===t.method;if(r||o)return l.element.setAttribute("data-ready","true"),void i();P(l,t)}},l._window.addEventListener("message",l._onMessage),"IFRAME"!==l.element.nodeName&&F(s(e=_(u,n)),e,u).then(function(e){var t,n,r,o=N(e,u);return l.element=o,l._originalElement=u,t=u,n=o,r=g.get(t),g.set(n,r),g.delete(t),A.set(l.element,l),e}).catch(a)});return S.set(this,o),A.set(this.element,this),"IFRAME"===this.element.nodeName&&T(this,"ping"),q.isEnabled&&(r=function(){return q.exit()},this.fullscreenchangeHandler=function(){(q.isFullscreen?w:k)(l,"event:exitFullscreen",r),l.ready().then(function(){T(l,"fullscreenchange",q.isFullscreen)})},q.on("fullscreenchange",this.fullscreenchangeHandler)),this}var e,t,n;return e=Player,(t=[{key:"callMethod",value:function(n,e){var r=this,o=1<arguments.length&&void 0!==e?e:{};return new y(function(e,t){return r.ready().then(function(){w(r,n,{resolve:e,reject:t}),T(r,n,o)}).catch(t)})}},{key:"get",value:function(n){var r=this;return new y(function(e,t){return n=i(n,"get"),r.ready().then(function(){w(r,n,{resolve:e,reject:t}),T(r,n)}).catch(t)})}},{key:"set",value:function(n,r){var o=this;return new y(function(e,t){if(n=i(n,"set"),null==r)throw new TypeError("There must be a value to set.");return o.ready().then(function(){w(o,n,{resolve:e,reject:t}),T(o,n,r)}).catch(t)})}},{key:"on",value:function(e,t){if(!e)throw new TypeError("You must pass an event name.");if(!t)throw new TypeError("You must pass a callback function.");if("function"!=typeof t)throw new TypeError("The callback must be a function.");0===b(this,"event:".concat(e)).length&&this.callMethod("addEventListener",e).catch(function(){}),w(this,"event:".concat(e),t)}},{key:"off",value:function(e,t){if(!e)throw new TypeError("You must pass an event name.");if(t&&"function"!=typeof t)throw new TypeError("The callback must be a function.");k(this,"event:".concat(e),t)&&this.callMethod("removeEventListener",e).catch(function(e){})}},{key:"loadVideo",value:function(e){return this.callMethod("loadVideo",e)}},{key:"ready",value:function(){var e=S.get(this)||new y(function(e,t){t(new Error("Unknown player. Probably unloaded."))});return y.resolve(e)}},{key:"addCuePoint",value:function(e,t){var n=1<arguments.length&&void 0!==t?t:{};return this.callMethod("addCuePoint",{time:e,data:n})}},{key:"removeCuePoint",value:function(e){return this.callMethod("removeCuePoint",e)}},{key:"enableTextTrack",value:function(e,t){if(!e)throw new TypeError("You must pass a language.");return this.callMethod("enableTextTrack",{language:e,kind:t})}},{key:"disableTextTrack",value:function(){return this.callMethod("disableTextTrack")}},{key:"pause",value:function(){return this.callMethod("pause")}},{key:"play",value:function(){return this.callMethod("play")}},{key:"requestFullscreen",value:function(){return q.isEnabled?q.request(this.element):this.callMethod("requestFullscreen")}},{key:"exitFullscreen",value:function(){return q.isEnabled?q.exit():this.callMethod("exitFullscreen")}},{key:"getFullscreen",value:function(){return q.isEnabled?y.resolve(q.isFullscreen):this.get("fullscreen")}},{key:"requestPictureInPicture",value:function(){return this.callMethod("requestPictureInPicture")}},{key:"exitPictureInPicture",value:function(){return this.callMethod("exitPictureInPicture")}},{key:"getPictureInPicture",value:function(){return this.get("pictureInPicture")}},{key:"unload",value:function(){return this.callMethod("unload")}},{key:"destroy",value:function(){var n=this;return new y(function(e){var t;S.delete(n),A.delete(n.element),n._originalElement&&(A.delete(n._originalElement),n._originalElement.removeAttribute("data-vimeo-initialized")),n.element&&"IFRAME"===n.element.nodeName&&n.element.parentNode&&(n.element.parentNode.parentNode&&n._originalElement&&n._originalElement!==n.element.parentNode?n.element.parentNode.parentNode.removeChild(n.element.parentNode):n.element.parentNode.removeChild(n.element)),n.element&&"DIV"===n.element.nodeName&&n.element.parentNode&&(n.element.removeAttribute("data-vimeo-initialized"),(t=n.element.querySelector("iframe"))&&t.parentNode&&(t.parentNode.parentNode&&n._originalElement&&n._originalElement!==t.parentNode?t.parentNode.parentNode.removeChild(t.parentNode):t.parentNode.removeChild(t))),n._window.removeEventListener("message",n._onMessage),q.isEnabled&&q.off("fullscreenchange",n.fullscreenchangeHandler),e()})}},{key:"getAutopause",value:function(){return this.get("autopause")}},{key:"setAutopause",value:function(e){return this.set("autopause",e)}},{key:"getBuffered",value:function(){return this.get("buffered")}},{key:"getCameraProps",value:function(){return this.get("cameraProps")}},{key:"setCameraProps",value:function(e){return this.set("cameraProps",e)}},{key:"getChapters",value:function(){return this.get("chapters")}},{key:"getCurrentChapter",value:function(){return this.get("currentChapter")}},{key:"getColor",value:function(){return this.get("color")}},{key:"setColor",value:function(e){return this.set("color",e)}},{key:"getCuePoints",value:function(){return this.get("cuePoints")}},{key:"getCurrentTime",value:function(){return this.get("currentTime")}},{key:"setCurrentTime",value:function(e){return this.set("currentTime",e)}},{key:"getDuration",value:function(){return this.get("duration")}},{key:"getEnded",value:function(){return this.get("ended")}},{key:"getLoop",value:function(){return this.get("loop")}},{key:"setLoop",value:function(e){return this.set("loop",e)}},{key:"setMuted",value:function(e){return this.set("muted",e)}},{key:"getMuted",value:function(){return this.get("muted")}},{key:"getPaused",value:function(){return this.get("paused")}},{key:"getPlaybackRate",value:function(){return this.get("playbackRate")}},{key:"setPlaybackRate",value:function(e){return this.set("playbackRate",e)}},{key:"getPlayed",value:function(){return this.get("played")}},{key:"getQualities",value:function(){return this.get("qualities")}},{key:"getQuality",value:function(){return this.get("quality")}},{key:"setQuality",value:function(e){return this.set("quality",e)}},{key:"getSeekable",value:function(){return this.get("seekable")}},{key:"getSeeking",value:function(){return this.get("seeking")}},{key:"getTextTracks",value:function(){return this.get("textTracks")}},{key:"getVideoEmbedCode",value:function(){return this.get("videoEmbedCode")}},{key:"getVideoId",value:function(){return this.get("videoId")}},{key:"getVideoTitle",value:function(){return this.get("videoTitle")}},{key:"getVideoWidth",value:function(){return this.get("videoWidth")}},{key:"getVideoHeight",value:function(){return this.get("videoHeight")}},{key:"getVideoUrl",value:function(){return this.get("videoUrl")}},{key:"getVolume",value:function(){return this.get("volume")}},{key:"setVolume",value:function(e){return this.set("volume",e)}}])&&r(e.prototype,t),n&&r(e,n),Player}();return e||(x=function(){for(var e,t=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],n=0,r=t.length,o={};n<r;n++)if((e=t[n])&&e[1]in document){for(n=0;n<e.length;n++)o[t[0][n]]=e[n];return o}return!1}(),C={fullscreenchange:x.fullscreenchange,fullscreenerror:x.fullscreenerror},j={request:function(o){return new Promise(function(e,t){function n(){j.off("fullscreenchange",n),e()}j.on("fullscreenchange",n);var r=(o=o||document.documentElement)[x.requestFullscreen]();r instanceof Promise&&r.then(n).catch(t)})},exit:function(){return new Promise(function(t,e){var n,r;j.isFullscreen?(n=function e(){j.off("fullscreenchange",e),t()},j.on("fullscreenchange",n),(r=document[x.exitFullscreen]())instanceof Promise&&r.then(n).catch(e)):t()})},on:function(e,t){var n=C[e];n&&document.addEventListener(n,t)},off:function(e,t){var n=C[e];n&&document.removeEventListener(n,t)}},Object.defineProperties(j,{isFullscreen:{get:function(){return Boolean(document[x.fullscreenElement])}},element:{enumerable:!0,get:function(){return document[x.fullscreenElement]}},isEnabled:{enumerable:!0,get:function(){return Boolean(document[x.fullscreenEnabled])}}}),q=j,function(e){function n(e){"console"in window&&console.error&&console.error("There was an error creating an embed: ".concat(e))}var t=0<arguments.length&&void 0!==e?e:document;[].slice.call(t.querySelectorAll("[data-vimeo-id], [data-vimeo-url]")).forEach(function(t){try{if(null!==t.getAttribute("data-vimeo-defer"))return;var e=_(t);F(s(e),e,t).then(function(e){return N(e,t)}).catch(n)}catch(e){n(e)}})}(),function(e){var r=0<arguments.length&&void 0!==e?e:document;window.VimeoPlayerResizeEmbeds_||(window.VimeoPlayerResizeEmbeds_=!0,window.addEventListener("message",function(e){if(c(e.origin)&&e.data&&"spacechange"===e.data.event)for(var t=r.querySelectorAll("iframe"),n=0;n<t.length;n++)if(t[n].contentWindow===e.source){t[n].parentElement.style.paddingBottom="".concat(e.data.data[0].bottom,"px");break}}))}(),function(e){var u=0<arguments.length&&void 0!==e?e:document;window.VimeoSeoMetadataAppended||(window.VimeoSeoMetadataAppended=!0,window.addEventListener("message",function(e){if(c(e.origin)){var t=E(e.data);if(t&&"ready"===t.event)for(var n,r=u.querySelectorAll("iframe"),o=0;o<r.length;o++){var i=r[o],a=i.contentWindow===e.source;n=i.src,/^https:\/\/player\.vimeo\.com\/video\/\d+/.test(n)&&a&&(new Player(i)).callMethod("appendVideoMetadata",window.location.href)}}}))}()),Player}),function($,window,document,undefined){function Owl(element,options){this.settings=null,this.options=$.extend({},Owl.Defaults,options),this.$element=$(element),this._handlers={},this._plugins={},this._supress={},this._current=null,this._speed=null,this._coordinates=[],this._breakpoint=null,this._width=null,this._items=[],this._clones=[],this._mergers=[],this._widths=[],this._invalidated={},this._pipe=[],this._drag={time:null,target:null,pointer:null,stage:{start:null,current:null},direction:null},this._states={current:{},tags:{initializing:["busy"],animating:["busy"],dragging:["interacting"]}},$.each(["onResize","onThrottledResize"],$.proxy(function(i,handler){this._handlers[handler]=$.proxy(this[handler],this)},this)),$.each(Owl.Plugins,$.proxy(function(key,plugin){this._plugins[key.charAt(0).toLowerCase()+key.slice(1)]=new plugin(this)},this)),$.each(Owl.Workers,$.proxy(function(priority,worker){this._pipe.push({filter:worker.filter,run:$.proxy(worker.run,this)})},this)),this.setup(),this.initialize()}Owl.Defaults={items:3,loop:!1,center:!1,rewind:!1,mouseDrag:!0,touchDrag:!0,pullDrag:!0,freeDrag:!1,margin:0,stagePadding:0,merge:!1,mergeFit:!0,autoWidth:!1,startPosition:0,rtl:!1,smartSpeed:250,fluidSpeed:!1,dragEndSpeed:!1,responsive:{},responsiveRefreshRate:200,responsiveBaseElement:window,fallbackEasing:"swing",info:!1,nestedItemSelector:!1,itemElement:"div",stageElement:"div",refreshClass:"owl-refresh",loadedClass:"owl-loaded",loadingClass:"owl-loading",rtlClass:"owl-rtl",responsiveClass:"owl-responsive",dragClass:"owl-drag",itemClass:"owl-item",stageClass:"owl-stage",stageOuterClass:"owl-stage-outer",grabClass:"owl-grab"},Owl.Width={Default:"default",Inner:"inner",Outer:"outer"},Owl.Type={Event:"event",State:"state"},Owl.Plugins={},Owl.Workers=[{filter:["width","settings"],run:function(){this._width=this.$element.closest(".px-gutter").length?12*Math.ceil(this.$element.width()/12):this.$element.width()}},{filter:["width","items","settings"],run:function(cache){cache.current=this._items&&this._items[this.relative(this._current)]}},{filter:["items","settings"],run:function(){this.$stage.children(".cloned").remove()}},{filter:["width","items","settings"],run:function(cache){var margin=this.settings.margin||"",grid=!this.settings.autoWidth,rtl=this.settings.rtl,css={width:"auto","margin-left":rtl?margin:"","margin-right":rtl?"":margin};!grid&&this.$stage.children().css(css),cache.css=css}},{filter:["width","items","settings"],run:function(cache){var width=Math.round((this.width()/this.settings.items).toFixed(3)-this.settings.margin),merge=null,iterator=this._items.length,grid=!this.settings.autoWidth,widths=[];cache.items={merge:!1,width:width};while(iterator--)merge=this._mergers[iterator],merge=this.settings.mergeFit&&Math.min(merge,this.settings.items)||merge,cache.items.merge=merge>1||cache.items.merge,widths[iterator]=grid?width*merge:this._items[iterator].width();this._widths=widths}},{filter:["items","settings"],run:function(){var clones=[],items=this._items,settings=this.settings,view=Math.max(settings.items*2,4),size=Math.ceil(items.length/2)*2,repeat=settings.loop&&items.length?settings.rewind?view:Math.max(view,size):0,append="",prepend="";repeat/=2;while(repeat--)clones.push(this.normalize(clones.length/2,!0)),append+=items[clones[clones.length-1]][0].outerHTML,clones.push(this.normalize(items.length-1-(clones.length-1)/2,!0)),prepend=items[clones[clones.length-1]][0].outerHTML+prepend;this._clones=clones,$(append).addClass("cloned").appendTo(this.$stage),$(prepend).addClass("cloned").prependTo(this.$stage)}},{filter:["width","items","settings"],run:function(){var rtl=this.settings.rtl?1:-1,size=this._clones.length+this._items.length,iterator=-1,previous=0,current=0,coordinates=[];while(++iterator<size)previous=coordinates[iterator-1]||0,current=this._widths[this.relative(iterator)]+this.settings.margin,coordinates.push(previous+current*rtl);this._coordinates=coordinates}},{filter:["width","items","settings"],run:function(){var stagePadding=this._width<480&&this.settings.stagePadding>0?41:this._width*this.settings.stagePadding/200,padding=stagePadding,coordinates=this._coordinates,css={width:Math.ceil(Math.abs(coordinates[coordinates.length-1]))+padding*2,"padding-left":padding||"","padding-right":padding||""};this.$stage.css(css)}},{filter:["width","items","settings"],run:function(cache){var iterator=this._coordinates.length,grid=!this.settings.autoWidth,items=this.$stage.children();if(grid&&cache.items.merge)while(iterator--)cache.css.width=this._widths[this.relative(iterator)],items.eq(iterator).css(cache.css);else grid&&(cache.css.width=cache.items.width,items.css(cache.css))}},{filter:["items"],run:function(){this._coordinates.length<1&&this.$stage.removeAttr("style")}},{filter:["width","items","settings"],run:function(cache){cache.current=cache.current?this.$stage.children().index(cache.current):0,cache.current=Math.max(this.minimum(),Math.min(this.maximum(),cache.current)),this.reset(cache.current)}},{filter:["position"],run:function(){this.animate(this.coordinates(this._current))}},{filter:["width","position","items","settings"],run:function(){var stagePadding=this._width<480&&this.settings.stagePadding>0?41:this._width*this.settings.stagePadding/200,rtl=this.settings.rtl?1:-1,padding=this.settings.stagePadding*2,begin=this.coordinates(this.current())+padding,end=begin+this.width()*rtl,inner,outer,matches=[],i,n;for(i=0,n=this._coordinates.length;i<n;i++)inner=this._coordinates[i-1]||0,outer=Math.abs(this._coordinates[i])+padding*rtl,(this.op(inner,"<=",begin)&&this.op(inner,">",end)||this.op(outer,"<",begin)&&this.op(outer,">",end))&&matches.push(i);this.$stage.children(".active").removeClass("active"),this.$stage.children(":eq("+matches.join("), :eq(")+")").addClass("active"),this.settings.center&&(this.$stage.children(".center").removeClass("center"),this.$stage.children().eq(this.current()).addClass("center"))}}],Owl.prototype.initialize=function(){this.enter("initializing"),this.trigger("initialize"),this.$element.toggleClass(this.settings.rtlClass,this.settings.rtl);if(this.settings.autoWidth&&!this.is("pre-loading")){var imgs,nestedSelector,width;imgs=this.$element.find("img"),nestedSelector=this.settings.nestedItemSelector?"."+this.settings.nestedItemSelector:undefined,width=this.$element.children(nestedSelector).width(),imgs.length&&width<=0&&this.preloadAutoWidthImages(imgs)}this.$element.addClass(this.options.loadingClass),this.$stage=$("<"+this.settings.stageElement+' class="'+this.settings.stageClass+'"/>').wrap('<div class="'+this.settings.stageOuterClass+'"/>'),this.$element.append(this.$stage.parent()),this.replace(this.$element.children().not(this.$stage.parent())),this.$element.is(":visible")?this.refresh():this.invalidate("width"),this.$element.removeClass(this.options.loadingClass).addClass(this.options.loadedClass),this.registerEventHandlers(),this.leave("initializing"),this.trigger("initialized")},Owl.prototype.setup=function(){var viewport=this.viewport(),overwrites=this.options.responsive,match=-1,settings=null;overwrites?($.each(overwrites,function(breakpoint){breakpoint<=viewport&&breakpoint>match&&(match=Number(breakpoint))}),settings=$.extend({},this.options,overwrites[match]),delete settings.responsive,settings.responsiveClass&&this.$element.attr("class",this.$element.attr("class").replace(new RegExp("("+this.options.responsiveClass+"-)\\S+\\s","g"),"$1"+match))):settings=$.extend({},this.options);if(this.settings===null||this._breakpoint!==match)this.trigger("change",{property:{name:"settings",value:settings}}),this._breakpoint=match,this.settings=settings,this.invalidate("settings"),this.trigger("changed",{property:{name:"settings",value:this.settings}})},Owl.prototype.optionsLogic=function(){this.settings.autoWidth&&(this.settings.stagePadding=!1,this.settings.merge=!1)},Owl.prototype.prepare=function(item,index){var event=this.trigger("prepare",{content:item});return event.data||(event.data=$("<"+this.settings.itemElement+"/>").addClass(this.options.itemClass).attr("data-index",index+1).append(item)),this.trigger("prepared",{content:event.data}),event.data},Owl.prototype.update=function(){var i=0,n=this._pipe.length,filter=$.proxy(function(p){return this[p]},this._invalidated),cache={};while(i<n)(this._invalidated.all||$.grep(this._pipe[i].filter,filter).length>0)&&this._pipe[i].run(cache),i++;this._invalidated={},!this.is("valid")&&this.enter("valid")},Owl.prototype.width=function(dimension){dimension=dimension||Owl.Width.Default;var stagePadding=this._width<480&&this.settings.stagePadding>0?41:this._width*this.settings.stagePadding/200;switch(dimension){case Owl.Width.Inner:case Owl.Width.Outer:return this._width;default:return this._width-stagePadding*2+this.settings.margin}},Owl.prototype.refresh=function(){this.enter("refreshing"),this.trigger("refresh"),this.setup(),this.optionsLogic(),this.$element.addClass(this.options.refreshClass),this.update(),this.$element.removeClass(this.options.refreshClass),this.leave("refreshing"),this.trigger("refreshed")},Owl.prototype.onThrottledResize=function(){window.clearTimeout(this.resizeTimer),this.resizeTimer=window.setTimeout(this._handlers.onResize,this.settings.responsiveRefreshRate)},Owl.prototype.onResize=function(){if(!this._items.length)return!1;if(this._width===this.$element.width())return!1;if(!this.$element.is(":visible"))return!1;this.enter("resizing");if(this.trigger("resize").isDefaultPrevented())return this.leave("resizing"),!1;this.invalidate("width"),this.refresh(),this.leave("resizing"),this.trigger("resized")},Owl.prototype.registerEventHandlers=function(){$.support.transition&&this.$stage.on($.support.transition.end+".owl.core",$.proxy(this.onTransitionEnd,this)),this.settings.responsive!==!1&&this.on(window,"resize",this._handlers.onThrottledResize),this.settings.mouseDrag&&(this.$element.addClass(this.options.dragClass),this.$stage.on("mousedown.owl.core",$.proxy(this.onDragStart,this)),this.$stage.on("dragstart.owl.core selectstart.owl.core",function(){return!1})),this.settings.touchDrag&&(this.$stage.on("touchstart.owl.core",$.proxy(this.onDragStart,this)),this.$stage.on("touchcancel.owl.core",$.proxy(this.onDragEnd,this)))},Owl.prototype.onDragStart=function(event){var stage=null;if(event.which===3)return;$.support.transform?(stage=this.$stage.css("transform").replace(/.*\(|\)| /g,"").split(","),stage={x:stage[stage.length===16?12:4],y:stage[stage.length===16?13:5]}):(stage=this.$stage.position(),stage={x:this.settings.rtl?stage.left+this.$stage.width()-this.width()+this.settings.margin:stage.left,y:stage.top}),this.is("animating")&&($.support.transform?this.animate(stage.x):this.$stage.stop(),this.invalidate("position")),this.$element.toggleClass(this.options.grabClass,event.type==="mousedown"),this.speed(0),this._drag.time=(new Date).getTime(),this._drag.target=$(event.target),this._drag.stage.start=stage,this._drag.stage.current=stage,this._drag.pointer=this.pointer(event),$(document).on("mouseup.owl.core touchend.owl.core",$.proxy(this.onDragEnd,this)),$(document).one("mousemove.owl.core touchmove.owl.core",$.proxy(function(event){var delta=this.difference(this._drag.pointer,this.pointer(event));$(document).on("mousemove.owl.core touchmove.owl.core",$.proxy(this.onDragMove,this));if(Math.abs(delta.x)<Math.abs(delta.y)&&this.is("valid"))return;event.preventDefault(),this.enter("dragging"),this.trigger("drag")},this))},Owl.prototype.onDragMove=function(event){var minimum=null,maximum=null,pull=null,delta=this.difference(this._drag.pointer,this.pointer(event)),stage=this.difference(this._drag.stage.start,delta);if(!this.is("dragging"))return;event.preventDefault(),this.settings.loop?(minimum=this.coordinates(this.minimum()),maximum=this.coordinates(this.maximum()+1)-minimum,stage.x=((stage.x-minimum)%maximum+maximum)%maximum+minimum):(minimum=this.settings.rtl?this.coordinates(this.maximum()):this.coordinates(this.minimum()),maximum=this.settings.rtl?this.coordinates(this.minimum()):this.coordinates(this.maximum()),pull=this.settings.pullDrag?-1*delta.x/5:0,stage.x=Math.max(Math.min(stage.x,minimum+pull),maximum+pull)),this._drag.stage.current=stage,this.animate(stage.x)},Owl.prototype.onDragEnd=function(event){var delta=this.difference(this._drag.pointer,this.pointer(event)),stage=this._drag.stage.current,direction=delta.x>0^this.settings.rtl?"left":"right";$(document).off(".owl.core"),this.$element.removeClass(this.options.grabClass);if(delta.x!==0&&this.is("dragging")||!this.is("valid"))this.speed(this.settings.dragEndSpeed||this.settings.smartSpeed),this.current(this.closest(stage.x,delta.x!==0?direction:this._drag.direction)),this.invalidate("position"),this.update(),this._drag.direction=direction,(Math.abs(delta.x)>3||(new Date).getTime()-this._drag.time>300)&&this._drag.target.one("click.owl.core",function(){return!1});if(!this.is("dragging"))return;this.leave("dragging"),this.trigger("dragged")},Owl.prototype.closest=function(coordinate,direction){var position=-1,pull=30,width=this.width(),coordinates=this.coordinates();return this.settings.freeDrag||$.each(coordinates,$.proxy(function(index,value){return coordinate>value-pull&&coordinate<value+pull?position=index:this.op(coordinate,"<",value)&&this.op(coordinate,">",coordinates[index+1]||value-width)&&(position=direction==="left"?index+1:index),position===-1},this)),this.settings.loop||(this.op(coordinate,">",coordinates[this.minimum()])?position=coordinate=this.minimum():this.op(coordinate,"<",coordinates[this.maximum()])&&(position=coordinate=this.maximum())),position},Owl.prototype.animate=function(coordinate){var animate=this.speed()>0;this.is("animating")&&this.onTransitionEnd(),animate&&(this.enter("animating"),this.trigger("translate")),$.support.transform3d&&$.support.transition?this.$stage.css({transform:"translate3d("+coordinate+"px,0px,0px)",transition:this.speed()/1e3+"s"}):animate?this.$stage.animate({left:coordinate+"px"},this.speed(),this.settings.fallbackEasing,$.proxy(this.onTransitionEnd,this)):this.$stage.css({left:coordinate+"px"})},Owl.prototype.is=function(state){return this._states.current[state]&&this._states.current[state]>0},Owl.prototype.current=function(position){if(position===undefined)return this._current;if(this._items.length===0)return undefined;position=this.normalize(position);if(this._current!==position){var event=this.trigger("change",{property:{name:"position",value:position}});event.data!==undefined&&(position=this.normalize(event.data)),this._current=position,this.invalidate("position"),this.trigger("changed",{property:{name:"position",value:this._current}})}return this._current},Owl.prototype.invalidate=function(part){return $.type(part)==="string"&&(this._invalidated[part]=!0,this.is("valid")&&this.leave("valid")),$.map(this._invalidated,function(v,i){return i})},Owl.prototype.reset=function(position){position=this.normalize(position);if(position===undefined)return;this._speed=0,this._current=position,this.suppress(["translate","translated"]),this.animate(this.coordinates(position)),this.release(["translate","translated"])},Owl.prototype.normalize=function(position,relative){var n=this._items.length,m=relative?0:this._clones.length;if(!$.isNumeric(position)||n<1)position=undefined;else if(position<0||position>=n+m)position=((position-m/2)%n+n)%n+m/2;return position},Owl.prototype.relative=function(position){return position-=this._clones.length/2,this.normalize(position,!0)},Owl.prototype.maximum=function(relative){var settings=this.settings,maximum=this._coordinates.length,boundary=Math.abs(this._coordinates[maximum-1])-this._width,i=-1,j;if(settings.loop)maximum=this._clones.length/2+this._items.length-1;else if(settings.autoWidth||settings.merge)while(maximum-i>1)Math.abs(this._coordinates[j=maximum+i>>1])<boundary?i=j:maximum=j;else settings.center?maximum=this._items.length-1:maximum=this._items.length-settings.items;return relative&&(maximum-=this._clones.length/2),Math.max(maximum,0)},Owl.prototype.minimum=function(relative){return relative?0:this._clones.length/2},Owl.prototype.items=function(position){return position===undefined?this._items.slice():(position=this.normalize(position,!0),this._items[position])},Owl.prototype.mergers=function(position){return position===undefined?this._mergers.slice():(position=this.normalize(position,!0),this._mergers[position])},Owl.prototype.clones=function(position){var odd=this._clones.length/2,even=odd+this._items.length,map=function(index){return index%2===0?even+index/2:odd-(index+1)/2};return position===undefined?$.map(this._clones,function(v,i){return map(i)}):$.map(this._clones,function(v,i){return v===position?map(i):null})},Owl.prototype.speed=function(speed){return speed!==undefined&&(this._speed=speed),this._speed},Owl.prototype.coordinates=function(position){var coordinate=null;return position===undefined?$.map(this._coordinates,$.proxy(function(coordinate,index){return this.coordinates(index)},this)):(this.settings.center?(coordinate=this._coordinates[position],coordinate+=(this.width()-coordinate+(this._coordinates[position-1]||0))/2*(this.settings.rtl?-1:1)):coordinate=this._coordinates[position-1]||0,coordinate)},Owl.prototype.duration=function(from,to,factor){return Math.min(Math.max(Math.abs(to-from),1),6)*Math.abs(factor||this.settings.smartSpeed)},Owl.prototype.to=function(position,speed){var current=this.current(),revert=null,distance=position-this.relative(current),direction=(distance>0)-(distance<0),items=this._items.length,minimum=this.minimum(),maximum=this.maximum();this.settings.loop?(!this.settings.rewind&&Math.abs(distance)>items/2&&(distance+=direction*-1*items),position=current+distance,revert=((position-minimum)%items+items)%items+minimum,revert!==position&&revert-distance<=maximum&&revert-distance>0&&(current=revert-distance,position=revert,this.reset(current))):this.settings.rewind?(maximum+=1,position=(position%maximum+maximum)%maximum):position=Math.max(minimum,Math.min(maximum,position)),this.speed(this.duration(current,position,speed)),this.current(position),this.$element.is(":visible")&&this.update()},Owl.prototype.next=function(speed){speed=speed||!1,this.to(this.relative(this.current())+1,speed)},Owl.prototype.prev=function(speed){speed=speed||!1,this.to(this.relative(this.current())-1,speed)},Owl.prototype.onTransitionEnd=function(event){if(event!==undefined){event.stopPropagation();if((event.target||event.srcElement||event.originalTarget)!==this.$stage.get(0))return!1}this.leave("animating"),this.trigger("translated")},Owl.prototype.viewport=function(){var width;if(this.options.responsiveBaseElement!==window)width=$(this.options.responsiveBaseElement).width();else if(window.innerWidth)width=window.innerWidth;else{if(!document.documentElement||!document.documentElement.clientWidth)throw"Can not detect viewport width.";width=document.documentElement.clientWidth}return width},Owl.prototype.replace=function(content){this.$stage.empty(),this._items=[],content&&(content=content instanceof jQuery?content:$(content)),this.settings.nestedItemSelector&&(content=content.find("."+this.settings.nestedItemSelector)),content.filter(function(){return this.nodeType===1}).each($.proxy(function(index,item){item=this.prepare(item,index),this.$stage.append(item),this._items.push(item),this._mergers.push(item.find("[data-merge]").addBack("[data-merge]").attr("data-merge")*1||1)},this)),this.reset($.isNumeric(this.settings.startPosition)?this.settings.startPosition:0),this.invalidate("items")},Owl.prototype.add=function(content,position){var current=this.relative(this._current);position=position===undefined?this._items.length:this.normalize(position,!0),content=content instanceof jQuery?content:$(content),this.trigger("add",{content:content,position:position}),content=this.prepare(content,this._items[current].index()),this._items.length===0||position===this._items.length?(this._items.length===0&&this.$stage.append(content),this._items.length!==0&&this._items[position-1].after(content),this._items.push(content),this._mergers.push(content.find("[data-merge]").andSelf("[data-merge]").attr("data-merge")*1||1)):(this._items[position].before(content),this._items.splice(position,0,content),this._mergers.splice(position,0,content.find("[data-merge]").andSelf("[data-merge]").attr("data-merge")*1||1)),this._items[current]&&this.reset(this._items[current].index()),this.invalidate("items"),this.trigger("added",{content:content,position:position})},Owl.prototype.remove=function(position){position=this.normalize(position,!0);if(position===undefined)return;this.trigger("remove",{content:this._items[position],position:position}),this._items[position].remove(),this._items.splice(position,1),this._mergers.splice(position,1),this.invalidate("items"),this.trigger("removed",{content:null,position:position})},Owl.prototype.preloadAutoWidthImages=function(images){images.each($.proxy(function(i,element){this.enter("pre-loading"),element=$(element),$(new Image).one("load",$.proxy(function(e){element.attr("src",e.target.src),element.css("opacity",1),this.leave("pre-loading"),!this.is("pre-loading")&&!this.is("initializing")&&this.refresh()},this)).attr("src",element.attr("src")||element.attr("data-src")||element.attr("data-src-retina"))},this))},Owl.prototype.destroy=function(){this.$element.off(".owl.core"),this.$stage.off(".owl.core"),$(document).off(".owl.core"),this.settings.responsive!==!1&&(window.clearTimeout(this.resizeTimer),this.off(window,"resize",this._handlers.onThrottledResize));for(var i in this._plugins)this._plugins[i].destroy();this.$stage.children(".cloned").remove(),this.$stage.unwrap(),this.$stage.children().contents().unwrap(),this.$stage.children().unwrap(),this.$element.removeClass(this.options.refreshClass).removeClass(this.options.loadingClass).removeClass(this.options.loadedClass).removeClass(this.options.rtlClass).removeClass(this.options.dragClass).removeClass(this.options.grabClass).attr("class",this.$element.attr("class").replace(new RegExp(this.options.responsiveClass+"-\\S+\\s","g"),"")).removeData("owl.carousel")},Owl.prototype.op=function(a,o,b){var rtl=this.settings.rtl;switch(o){case"<":return rtl?a>b:a<b;case">":return rtl?a<b:a>b;case">=":return rtl?a<=b:a>=b;case"<=":return rtl?a>=b:a<=b;default:}},Owl.prototype.on=function(element,event,listener,capture){element.addEventListener?element.addEventListener(event,listener,capture):element.attachEvent&&element.attachEvent("on"+event,listener)},Owl.prototype.off=function(element,event,listener,capture){element.removeEventListener?element.removeEventListener(event,listener,capture):element.detachEvent&&element.detachEvent("on"+event,listener)},Owl.prototype.trigger=function(name,data,namespace,state,enter){var status={item:{count:this._items.length,index:this.current()}},handler=$.camelCase($.grep(["on",name,namespace],function(v){return v}).join("-").toLowerCase()),event=$.Event([name,"owl",namespace||"carousel"].join(".").toLowerCase(),$.extend({relatedTarget:this},status,data));return this._supress[name]||($.each(this._plugins,function(name,plugin){plugin.onTrigger&&plugin.onTrigger(event)}),this.register({type:Owl.Type.Event,name:name}),this.$element.trigger(event),this.settings&&typeof this.settings[handler]=="function"&&this.settings[handler].call(this,event)),event},Owl.prototype.enter=function(name){$.each([name].concat(this._states.tags[name]||[]),$.proxy(function(i,name){this._states.current[name]===undefined&&(this._states.current[name]=0),this._states.current[name]++},this))},Owl.prototype.leave=function(name){$.each([name].concat(this._states.tags[name]||[]),$.proxy(function(i,name){this._states.current[name]--},this))},Owl.prototype.register=function(object){if(object.type===Owl.Type.Event){$.event.special[object.name]||($.event.special[object.name]={});if(!$.event.special[object.name].owl){var _default=$.event.special[object.name]._default;$.event.special[object.name]._default=function(e){return _default&&_default.apply&&(!e.namespace||e.namespace.indexOf("owl")===-1)?_default.apply(this,arguments):e.namespace&&e.namespace.indexOf("owl")>-1},$.event.special[object.name].owl=!0}}else object.type===Owl.Type.State&&(this._states.tags[object.name]?this._states.tags[object.name]=this._states.tags[object.name].concat(object.tags):this._states.tags[object.name]=object.tags,this._states.tags[object.name]=$.grep(this._states.tags[object.name],$.proxy(function(tag,i){return $.inArray(tag,this._states.tags[object.name])===i},this)))},Owl.prototype.suppress=function(events){$.each(events,$.proxy(function(index,event){this._supress[event]=!0},this))},Owl.prototype.release=function(events){$.each(events,$.proxy(function(index,event){delete this._supress[event]},this))},Owl.prototype.pointer=function(event){var result={x:null,y:null};return event=event.originalEvent||event||window.event,event=event.touches&&event.touches.length?event.touches[0]:event.changedTouches&&event.changedTouches.length?event.changedTouches[0]:event,event.pageX?(result.x=event.pageX,result.y=event.pageY):(result.x=event.clientX,result.y=event.clientY),result},Owl.prototype.difference=function(first,second){return{x:first.x-second.x,y:first.y-second.y}},$.fn.owlCarousel=function(option){var args=Array.prototype.slice.call(arguments,1);return this.each(function(){var $this=$(this),data=$this.data("owl.carousel");data||(data=new Owl(this,typeof option=="object"&&option),$this.data("owl.carousel",data),$.each(["next","prev","to","destroy","refresh","replace","add","remove"],function(i,event){data.register({type:Owl.Type.Event,name:event}),data.$element.on(event+".owl.carousel.core",$.proxy(function(e){e.namespace&&e.relatedTarget!==this&&(this.suppress([event]),data[event].apply(this,[].slice.call(arguments,1)),this.release([event]))},data))})),typeof option=="string"&&option.charAt(0)!=="_"&&data[option].apply(data,args)})},$.fn.owlCarousel.Constructor=Owl}(window.Zepto||window.jQuery,window,document),function($,window,document,undefined){var AutoRefresh=function(carousel){this._core=carousel,this._interval=null,this._visible=null,this._handlers={"initialized.owl.carousel":$.proxy(function(e){e.namespace&&this._core.settings.autoRefresh&&this.watch()},this)},this._core.options=$.extend({},AutoRefresh.Defaults,this._core.options),this._core.$element.on(this._handlers)};AutoRefresh.Defaults={autoRefresh:!0,autoRefreshInterval:500},AutoRefresh.prototype.watch=function(){if(this._interval)return;this._visible=this._core.$element.is(":visible"),this._interval=window.setInterval($.proxy(this.refresh,this),this._core.settings.autoRefreshInterval)},AutoRefresh.prototype.refresh=function(){if(this._core.$element.is(":visible")===this._visible)return;this._visible=!this._visible,this._core.$element.toggleClass("owl-hidden",!this._visible),this._visible&&this._core.invalidate("width")&&this._core.refresh()},AutoRefresh.prototype.destroy=function(){var handler,property;window.clearInterval(this._interval);for(handler in this._handlers)this._core.$element.off(handler,this._handlers[handler]);for(property in Object.getOwnPropertyNames(this))typeof this[property]!="function"&&(this[property]=null)},$.fn.owlCarousel.Constructor.Plugins.AutoRefresh=AutoRefresh}(window.Zepto||window.jQuery,window,document),function($,window,document,undefined){var Lazy=function(carousel){this._core=carousel,this._loaded=[],this._handlers={"initialized.owl.carousel change.owl.carousel":$.proxy(function(e){if(!e.namespace)return;if(!this._core.settings||!this._core.settings.lazyLoad)return;if(e.property&&e.property.name=="position"||e.type=="initialized"){var settings=this._core.settings,n=settings.center&&Math.ceil(settings.items/2)||settings.items,i=settings.center&&n*-1||0,position=(e.property&&e.property.value||this._core.current())+i,clones=this._core.clones().length,load=$.proxy(function(i,v){this.load(v)},this);while(i++<n)this.load(clones/2+this._core.relative(position)),clones&&$.each(this._core.clones(this._core.relative(position)),load),position++}},this)},this._core.options=$.extend({},Lazy.Defaults,this._core.options),this._core.$element.on(this._handlers)};Lazy.Defaults={lazyLoad:!1},Lazy.prototype.load=function(position){var $item=this._core.$stage.children().eq(position),$elements=$item&&$item.find(".owl-lazy");if(!$elements||$.inArray($item.get(0),this._loaded)>-1)return;$elements.each($.proxy(function(index,element){var $element=$(element),image,url=window.devicePixelRatio>1&&$element.attr("data-src-retina")||$element.attr("data-src");this._core.trigger("load",{element:$element,url:url},"lazy"),$element.is("img")?$element.one("load.owl.lazy",$.proxy(function(){$element.css("opacity",1),this._core.trigger("loaded",{element:$element,url:url},"lazy")},this)).attr("src",url):(image=new Image,image.onload=$.proxy(function(){$element.css({"background-image":"url("+url+")",opacity:"1"}),this._core.trigger("loaded",{element:$element,url:url},"lazy")},this),image.src=url)},this)),this._loaded.push($item.get(0))},Lazy.prototype.destroy=function(){var handler,property;for(handler in this.handlers)this._core.$element.off(handler,this.handlers[handler]);for(property in Object.getOwnPropertyNames(this))typeof this[property]!="function"&&(this[property]=null)},$.fn.owlCarousel.Constructor.Plugins.Lazy=Lazy}(window.Zepto||window.jQuery,window,document),function($,window,document,undefined){var AutoHeight=function(carousel){this._core=carousel,this._handlers={"initialized.owl.carousel refreshed.owl.carousel":$.proxy(function(e){e.namespace&&this._core.settings.autoHeight&&this.update()},this),"changed.owl.carousel":$.proxy(function(e){e.namespace&&this._core.settings.autoHeight&&e.property.name=="position"&&this.update()},this),"loaded.owl.lazy":$.proxy(function(e){e.namespace&&this._core.settings.autoHeight&&e.element.closest("."+this._core.settings.itemClass).index()===this._core.current()&&this.update()},this)},this._core.options=$.extend({},AutoHeight.Defaults,this._core.options),this._core.$element.on(this._handlers)};AutoHeight.Defaults={autoHeight:!1,autoHeightClass:"owl-height"},AutoHeight.prototype.update=function(){var start=this._core._current,end=start+this._core.settings.items,visible=this._core.$stage.children().toArray().slice(start,end);heights=[],maxheight=0,$.each(visible,function(index,item){heights.push($(item).height())}),maxheight=Math.max.apply(null,heights),this._core.$stage.parent().height(maxheight).addClass(this._core.settings.autoHeightClass)},AutoHeight.prototype.destroy=function(){var handler,property;for(handler in this._handlers)this._core.$element.off(handler,this._handlers[handler]);for(property in Object.getOwnPropertyNames(this))typeof this[property]!="function"&&(this[property]=null)},$.fn.owlCarousel.Constructor.Plugins.AutoHeight=AutoHeight}(window.Zepto||window.jQuery,window,document),function($,window,document,undefined){var Video=function(carousel){this._core=carousel,this._videos={},this._playing=null,this._handlers={"initialized.owl.carousel":$.proxy(function(e){e.namespace&&this._core.register({type:"state",name:"playing",tags:["interacting"]})},this),"resize.owl.carousel":$.proxy(function(e){e.namespace&&this._core.settings.video&&this.isInFullScreen()&&e.preventDefault()},this),"refreshed.owl.carousel":$.proxy(function(e){e.namespace&&this._core.is("resizing")&&this._core.$stage.find(".cloned .owl-video-frame").remove()},this),"changed.owl.carousel":$.proxy(function(e){e.namespace&&e.property.name==="position"&&this._playing&&this.stop()},this),"prepared.owl.carousel":$.proxy(function(e){if(!e.namespace)return;var $element=$(e.content).find(".owl-video");$element.length&&($element.css("display","none"),this.fetch($element,$(e.content)))},this)},this._core.options=$.extend({},Video.Defaults,this._core.options),this._core.$element.on(this._handlers),this._core.$element.on("click.owl.video",".owl-video-play-icon",$.proxy(function(e){this.play(e)},this))};Video.Defaults={video:!1,videoHeight:!1,videoWidth:!1},Video.prototype.fetch=function(target,item){var type=target.attr("data-vimeo-id")?"vimeo":"youtube",id=target.attr("data-vimeo-id")||target.attr("data-youtube-id"),width=target.attr("data-width")||this._core.settings.videoWidth,height=target.attr("data-height")||this._core.settings.videoHeight,url=target.attr("href");if(!url)throw new Error("Missing video URL.");id=url.match(/(http:|https:|)\/\/(player.|www.)?(vimeo\.com|youtu(be\.com|\.be|be\.googleapis\.com))\/(video\/|embed\/|watch\?v=|v\/)?([A-Za-z0-9._%-]*)(\&\S+)?/);if(id[3].indexOf("youtu")>-1)type="youtube";else{if(!(id[3].indexOf("vimeo")>-1))throw new Error("Video URL not supported.");type="vimeo"}id=id[6],this._videos[url]={type:type,id:id,width:width,height:height},item.attr("data-video",url),this.thumbnail(target,this._videos[url])},Video.prototype.thumbnail=function(target,video){var tnLink,icon,path,dimensions=video.width&&video.height?'style="width:'+video.width+"px;height:"+video.height+'px;"':"",customTn=target.find("img"),srcType="src",lazyClass="",settings=this._core.settings,create=function(path){icon='<div class="owl-video-play-icon"></div>',settings.lazyLoad?tnLink='<div class="owl-video-tn '+lazyClass+'" '+srcType+'="'+path+'"></div>':tnLink='<div class="owl-video-tn" style="opacity:1;background-image:url('+path+')"></div>',target.after(tnLink),target.after(icon)};target.wrap('<div class="owl-video-wrapper"'+dimensions+"></div>"),this._core.settings.lazyLoad&&(srcType="data-src",lazyClass="owl-lazy");if(customTn.length)return create(customTn.attr(srcType)),customTn.remove(),!1;video.type==="youtube"?(path="//img.youtube.com/vi/"+video.id+"/hqdefault.jpg",create(path)):video.type==="vimeo"&&$.ajax({type:"GET",url:"//vimeo.com/api/v2/video/"+video.id+".json",jsonp:"callback",dataType:"jsonp",success:function(data){path=data[0].thumbnail_large,create(path)}})},Video.prototype.stop=function(){this._core.trigger("stop",null,"video"),this._playing.find(".owl-video-frame").remove(),this._playing.removeClass("owl-video-playing"),this._playing=null,this._core.leave("playing"),this._core.trigger("stopped",null,"video")},Video.prototype.play=function(event){var target=$(event.target),item=target.closest("."+this._core.settings.itemClass),video=this._videos[item.attr("data-video")],width=video.width||"100%",height=video.height||this._core.$stage.height(),html;if(this._playing)return;this._core.enter("playing"),this._core.trigger("play",null,"video"),item=this._core.items(this._core.relative(item.index())),this._core.reset(item.index()),video.type==="youtube"?html='<iframe width="'+width+'" height="'+height+'" src="//www.youtube.com/embed/'+video.id+"?autoplay=1&v="+video.id+'" frameborder="0" allowfullscreen></iframe>':video.type==="vimeo"&&(html='<iframe src="//player.vimeo.com/video/'+video.id+'?autoplay=1" width="'+width+'" height="'+height+'" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>'),$('<div class="owl-video-frame">'+html+"</div>").insertAfter(item.find(".owl-video")),this._playing=item.addClass("owl-video-playing")},Video.prototype.isInFullScreen=function(){var element=document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement;return element&&$(element).parent().hasClass("owl-video-frame")},Video.prototype.destroy=function(){var handler,property;this._core.$element.off("click.owl.video");for(handler in this._handlers)this._core.$element.off(handler,this._handlers[handler]);for(property in Object.getOwnPropertyNames(this))typeof this[property]!="function"&&(this[property]=null)},$.fn.owlCarousel.Constructor.Plugins.Video=Video}(window.Zepto||window.jQuery,window,document),function($,window,document,undefined){var Animate=function(scope){this.core=scope,this.core.options=$.extend({},Animate.Defaults,this.core.options),this.swapping=!0,this.previous=undefined,this.next=undefined,this.handlers={"change.owl.carousel":$.proxy(function(e){e.namespace&&e.property.name=="position"&&(this.previous=this.core.current(),this.next=e.property.value)},this),"drag.owl.carousel dragged.owl.carousel translated.owl.carousel":$.proxy(function(e){e.namespace&&(this.swapping=e.type=="translated")},this),"translate.owl.carousel":$.proxy(function(e){e.namespace&&this.swapping&&(this.core.options.animateOut||this.core.options.animateIn)&&this.swap()},this)},this.core.$element.on(this.handlers)};Animate.Defaults={animateOut:!1,animateIn:!1},Animate.prototype.swap=function(){if(this.core.settings.items!==1)return;if(!$.support.animation||!$.support.transition)return;this.core.speed(0);var left,clear=$.proxy(this.clear,this),previous=this.core.$stage.children().eq(this.previous),next=this.core.$stage.children().eq(this.next),incoming=this.core.settings.animateIn,outgoing=this.core.settings.animateOut;if(this.core.current()===this.previous)return;outgoing&&(left=this.core.coordinates(this.previous)-this.core.coordinates(this.next),previous.css({left:left+"px"}).addClass("animated owl-animated-out").addClass(outgoing).on($.support.animation.end,clear)),incoming&&next.addClass("animated owl-animated-in").addClass(incoming).on($.support.animation.end,clear)},Animate.prototype.clear=function(e){$(e.target).hasClass("animated")&&($(e.target).css({left:""}).removeClass("animated owl-animated-out owl-animated-in").removeClass(this.core.settings.animateIn).removeClass(this.core.settings.animateOut),this.core.onTransitionEnd())},Animate.prototype.destroy=function(){var handler,property;for(handler in this.handlers)this.core.$element.off(handler,this.handlers[handler]);for(property in Object.getOwnPropertyNames(this))typeof this[property]!="function"&&(this[property]=null)},$.fn.owlCarousel.Constructor.Plugins.Animate=Animate}(window.Zepto||window.jQuery,window,document),function($,window,document,undefined){var Autoplay=function(carousel){this._core=carousel,this._interval=null,this._paused=!1,this._handlers={"changed.owl.carousel":$.proxy(function(e){e.namespace&&e.property.name==="settings"&&(this._core.settings.autoplay?this.play():this.stop())},this),"initialized.owl.carousel":$.proxy(function(e){e.namespace&&this._core.settings.autoplay&&this.play()},this),"play.owl.autoplay":$.proxy(function(e,t,s){e.namespace&&this.play(t,s)},this),"stop.owl.autoplay":$.proxy(function(e){e.namespace&&this.stop()},this),"mouseover.owl.autoplay":$.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.pause()},this),"mouseleave.owl.autoplay":$.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.play()},this)},this._core.$element.on(this._handlers),this._core.options=$.extend({},Autoplay.Defaults,this._core.options)};Autoplay.Defaults={autoplay:!1,autoplayTimeout:5e3,autoplayHoverPause:!1,autoplaySpeed:!1},Autoplay.prototype.play=function(timeout,speed){this._paused=!1;if(this._core.is("rotating"))return;this._core.enter("rotating"),this._interval=window.setInterval($.proxy(function(){if(this._paused||this._core.is("busy")||this._core.is("interacting")||document.hidden)return;this._core.next(speed||this._core.settings.autoplaySpeed)},this),timeout||this._core.settings.autoplayTimeout)},Autoplay.prototype.stop=function(){if(!this._core.is("rotating"))return;window.clearInterval(this._interval),this._core.leave("rotating")},Autoplay.prototype.pause=function(){if(!this._core.is("rotating"))return;this._paused=!0},Autoplay.prototype.destroy=function(){var handler,property;this.stop();for(handler in this._handlers)this._core.$element.off(handler,this._handlers[handler]);for(property in Object.getOwnPropertyNames(this))typeof this[property]!="function"&&(this[property]=null)},$.fn.owlCarousel.Constructor.Plugins.autoplay=Autoplay}(window.Zepto||window.jQuery,window,document),function($,window,document,undefined){"use strict";var Navigation=function(carousel){this._core=carousel,this._initialized=!1,this._pages=[],this._controls={},this._templates=[],this.$element=this._core.$element,this._overrides={next:this._core.next,prev:this._core.prev,to:this._core.to},this._handlers={"prepared.owl.carousel":$.proxy(function(e){e.namespace&&this._core.settings.dotsData&&this._templates.push('<div class="'+this._core.settings.dotClass+'">'+$(e.content).find("[data-dot]").andSelf("[data-dot]").attr("data-dot")+"</div>")},this),"added.owl.carousel":$.proxy(function(e){e.namespace&&this._core.settings.dotsData&&this._templates.splice(e.position,0,this._templates.pop())},this),"remove.owl.carousel":$.proxy(function(e){e.namespace&&this._core.settings.dotsData&&this._templates.splice(e.position,1)},this),"changed.owl.carousel":$.proxy(function(e){e.namespace&&e.property.name=="position"&&this.draw()},this),"initialized.owl.carousel":$.proxy(function(e){e.namespace&&!this._initialized&&(this._core.trigger("initialize",null,"navigation"),this.initialize(),this.update(),this.draw(),this._initialized=!0,this._core.trigger("initialized",null,"navigation"))},this),"refreshed.owl.carousel":$.proxy(function(e){e.namespace&&this._initialized&&(this._core.trigger("refresh",null,"navigation"),this.update(),this.draw(),this._core.trigger("refreshed",null,"navigation"))},this)},this._core.options=$.extend({},Navigation.Defaults,this._core.options),this.$element.on(this._handlers)};Navigation.Defaults={nav:!1,navText:["prev","next"],navSpeed:!1,navElement:"div",navContainer:!1,navContainerClass:"owl-nav",navClass:["owl-prev","owl-next"],slideBy:1,dotClass:"owl-dot",dotsClass:"owl-dots",dots:!0,dotsEach:!1,dotsData:!1,dotsSpeed:!1,dotsContainer:!1},Navigation.prototype.initialize=function(){var override,settings=this._core.settings;this._controls.$relative=(settings.navContainer?$(settings.navContainer):$("<div>").addClass(settings.navContainerClass).appendTo(this.$element)).addClass("disabled"),this._controls.$previous=$("<"+settings.navElement+">").addClass(settings.navClass[0]).html(settings.navText[0]).prependTo(this._controls.$relative).on("click",$.proxy(function(e){this.prev(settings.navSpeed)},this)),this._controls.$next=$("<"+settings.navElement+">").addClass(settings.navClass[1]).html(settings.navText[1]).appendTo(this._controls.$relative).on("click",$.proxy(function(e){this.next(settings.navSpeed)},this)),settings.dotsData||(this._templates=[$("<div>").addClass(settings.dotClass).append($("<span>")).prop("outerHTML")]),this._controls.$absolute=(settings.dotsContainer?$(settings.dotsContainer):$("<div>").addClass(settings.dotsClass).appendTo(this.$element)).addClass("disabled"),this._controls.$absolute.on("click","div",$.proxy(function(e){var index=$(e.target).parent().is(this._controls.$absolute)?$(e.target).index():$(e.target).parent().index();e.preventDefault(),this.to(index,settings.dotsSpeed)},this));for(override in this._overrides)this._core[override]=$.proxy(this[override],this)},Navigation.prototype.destroy=function(){var handler,control,property,override;for(handler in this._handlers)this.$element.off(handler,this._handlers[handler]);for(control in this._controls)this._controls[control].remove();for(override in this.overides)this._core[override]=this._overrides[override];for(property in Object.getOwnPropertyNames(this))typeof this[property]!="function"&&(this[property]=null)},Navigation.prototype.update=function(){var i,j,k,lower=this._core.clones().length/2,upper=lower+this._core.items().length,maximum=this._core.maximum(!0),settings=this._core.settings,size=settings.center||settings.autoWidth||settings.dotsData?1:settings.dotsEach||settings.items;settings.slideBy!=="page"&&(settings.slideBy=Math.min(settings.slideBy,settings.items));if(settings.dots||settings.slideBy=="page"){this._pages=[];for(i=lower,j=0,k=0;i<upper;i++){if(j>=size||j===0){this._pages.push({start:Math.min(maximum,i-lower),end:i-lower+size-1});if(Math.min(maximum,i-lower)===maximum)break;j=0,++k}j+=this._core.mergers(this._core.relative(i))}}},Navigation.prototype.draw=function(){var difference,settings=this._core.settings,disabled=this._core.items().length<=settings.items,index=this._core.relative(this._core.current()),loop=settings.loop||settings.rewind;this._controls.$relative.toggleClass("disabled",!settings.nav||disabled),settings.nav&&(this._controls.$previous.toggleClass("disabled",!loop&&index<=this._core.minimum(!0)),this._controls.$next.toggleClass("disabled",!loop&&index>=this._core.maximum(!0))),this._controls.$absolute.toggleClass("disabled",!settings.dots||disabled),settings.dots&&(difference=this._pages.length-this._controls.$absolute.children().length,settings.dotsData&&difference!==0?this._controls.$absolute.html(this._templates.join("")):difference>0?this._controls.$absolute.append((new Array(difference+1)).join(this._templates[0])):difference<0&&this._controls.$absolute.children().slice(difference).remove(),this._controls.$absolute.find(".active").removeClass("active"),this._controls.$absolute.children().eq($.inArray(this.current(),this._pages)).addClass("active"))},Navigation.prototype.onTrigger=function(event){var settings=this._core.settings;event.page={index:$.inArray(this.current(),this._pages),count:this._pages.length,size:settings&&(settings.center||settings.autoWidth||settings.dotsData?1:settings.dotsEach||settings.items)}},Navigation.prototype.current=function(){var current=this._core.relative(this._core.current());return $.grep(this._pages,$.proxy(function(page,index){return page.start<=current&&page.end>=current},this)).pop()},Navigation.prototype.getPosition=function(successor){var position,length,settings=this._core.settings;return settings.slideBy=="page"?(position=$.inArray(this.current(),this._pages),length=this._pages.length,successor?++position:--position,position=this._pages[(position%length+length)%length].start):(position=this._core.relative(this._core.current()),length=this._core.items().length,successor?position+=settings.slideBy:position-=settings.slideBy),position},Navigation.prototype.next=function(speed){$.proxy(this._overrides.to,this._core)(this.getPosition(!0),speed)},Navigation.prototype.prev=function(speed){$.proxy(this._overrides.to,this._core)(this.getPosition(!1),speed)},Navigation.prototype.to=function(position,speed,standard){var length;standard?$.proxy(this._overrides.to,this._core)(position,speed):(length=this._pages.length,$.proxy(this._overrides.to,this._core)(this._pages[(position%length+length)%length].start,speed))},$.fn.owlCarousel.Constructor.Plugins.Navigation=Navigation}(window.Zepto||window.jQuery,window,document),function($,window,document,undefined){"use strict";var Hash=function(carousel){this._core=carousel,this._hashes={},this.$element=this._core.$element,this._handlers={"initialized.owl.carousel":$.proxy(function(e){e.namespace&&this._core.settings.startPosition==="URLHash"&&$(window).trigger("hashchange.owl.navigation")},this),"prepared.owl.carousel":$.proxy(function(e){if(e.namespace){var hash=$(e.content).find("[data-hash]").addBack("[data-hash]").attr("data-hash");if(!hash)return;this._hashes[hash]=e.content}},this),"changed.owl.carousel":$.proxy(function(e){if(e.namespace&&e.property.name==="position"){var current=this._core.items(this._core.relative(this._core.current())),hash=$.map(this._hashes,function(item,hash){return item===current?hash:null}).join();if(!hash||window.location.hash.slice(1)===hash)return;window.location.hash=hash}},this)},this._core.options=$.extend({},Hash.Defaults,this._core.options),this.$element.on(this._handlers)};Hash.Defaults={URLhashListener:!1},Hash.prototype.destroy=function(){var handler,property;$(window).off("hashchange.owl.navigation");for(handler in this._handlers)this._core.$element.off(handler,this._handlers[handler]);for(property in Object.getOwnPropertyNames(this))typeof this[property]!="function"&&(this[property]=null)},$.fn.owlCarousel.Constructor.Plugins.Hash=Hash}(window.Zepto||window.jQuery,window,document),function($,window,document,undefined){function test(property,prefixed){var result=!1,upper=property.charAt(0).toUpperCase()+property.slice(1);return $.each((property+" "+prefixes.join(upper+" ")+upper).split(" "),function(i,property){if(style[property]!==undefined)return result=prefixed?property:!0,!1}),result}function prefixed(property){return test(property,!0)}var style=$("<support>").get(0).style,prefixes="Webkit Moz O ms".split(" "),events={transition:{end:{WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd",transition:"transitionend"}},animation:{end:{WebkitAnimation:"webkitAnimationEnd",MozAnimation:"animationend",OAnimation:"oAnimationEnd",animation:"animationend"}}},tests={csstransforms:function(){return!!test("transform")},csstransforms3d:function(){return!!test("perspective")},csstransitions:function(){return!!test("transition")},cssanimations:function(){return!!test("animation")}};tests.csstransitions()&&($.support.transition=new String(prefixed("transition")),$.support.transition.end=events.transition.end[$.support.transition]),tests.cssanimations()&&($.support.animation=new String(prefixed("animation")),$.support.animation.end=events.animation.end[$.support.animation]),tests.csstransforms()&&($.support.transform=new String(prefixed("transform")),$.support.transform3d=tests.csstransforms3d())}(window.Zepto||window.jQuery,window,document),function(window,document,undefined){var absPos=function(element){var offsetLeft,offsetTop;offsetLeft=offsetTop=0;if(element.offsetParent)do offsetLeft+=element.offsetLeft,offsetTop+=element.offsetTop;while(element=element.offsetParent);return[offsetLeft,offsetTop]},ProgressCircle=function(params){this.canvas=params.canvas,this.minRadius=params.minRadius||15,this.arcWidth=params.arcWidth||5,this.gapWidth=params.gapWidth||3,this.centerX=params.centerX||this.canvas.width/2,this.centerY=params.centerY||this.canvas.height/2,this.infoLineLength=params.infoLineLength||60,this.horizLineLength=params.horizLineLength||10,this.infoLineAngleInterval=params.infoLineAngleInterval||Math.PI/8,this.infoLineBaseAngle=params.infoLineBaseAngle||Math.PI/6,this.context=this.canvas.getContext("2d"),this.width=this.canvas.width,this.height=this.canvas.height,this.circles=[],this.runningCount=0};ProgressCircle.prototype={constructor:ProgressCircle,addEntry:function(params){return this.circles.push(new Circle({canvas:this.canvas,context:this.context,centerX:this.centerX,centerY:this.centerY,innerRadius:this.minRadius+this.circles.length*(this.gapWidth+this.arcWidth),arcWidth:this.arcWidth,infoLineLength:this.infoLineLength,horizLineLength:this.horizLineLength,id:this.circles.length,fillColor:params.fillColor,outlineColor:params.outlineColor,progressListener:params.progressListener,infoListener:params.infoListener,infoLineAngle:this.infoLineBaseAngle+this.circles.length*this.infoLineAngleInterval})),this},start:function(interval){var self=this;return this.timer=setInterval(function(){self._update()},interval||33),this},stop:function(){clearTimeout(this.timer)},_update:function(){return this._clear(),this.circles.forEach(function(circle,idx,array){circle.update()}),this},_clear:function(){return this.context.clearRect(0,0,this.canvas.width,this.canvas.height),this}};var Circle=function(params){this.id=params.id,this.canvas=params.canvas,this.context=params.context,this.centerX=params.centerX,this.centerY=params.centerY,this.arcWidth=params.arcWidth,this.innerRadius=params.innerRadius||0,this.fillColor=params.fillColor||"#fff",this.outlineColor=params.outlineColor||this.fillColor,this.progressListener=params.progressListener,this.infoLineLength=params.infoLineLength||250,this.horizLineLength=params.horizLineLength||50,this.infoListener=params.infoListener,this.infoLineAngle=params.infoLineAngle,this.outerRadius=this.innerRadius+this.arcWidth;if(!this.infoListener)return;var angle=this.infoLineAngle,arcDistance=(this.innerRadius+this.outerRadius)/2,sinA=Math.sin(angle),cosA=Math.cos(angle);this.infoLineStartX=this.centerX+sinA*arcDistance,this.infoLineStartY=this.centerY-cosA*arcDistance,this.infoLineMidX=this.centerX+sinA*this.infoLineLength,this.infoLineMidY=this.centerY-cosA*this.infoLineLength,this.infoLineEndX=this.infoLineMidX+(sinA<0?-this.horizLineLength:this.horizLineLength),this.infoLineEndY=this.infoLineMidY;var infoText=document.createElement("div"),style=infoText.style;style.color=this.fillColor,style.position="absolute",style.left=this.infoLineEndX+absPos(this.canvas)[0]+"px",infoText.className="ProgressCircleInfo",infoText.id="progress_circle_info_"+this.id,document.body.appendChild(infoText),this.infoText=infoText};Circle.prototype={constructor:Circle,update:function(){this.progress=this.progressListener(),this._draw(),this.infoListener&&(this.info=this.infoListener(),this._drawInfo())},_draw:function(){var ctx=this.context,ANGLE_OFFSET=-Math.PI/2,startAngle=0+ANGLE_OFFSET,endAngle=startAngle+this.progress*Math.PI*2,x=this.centerX,y=this.centerY,innerRadius=this.innerRadius-this.arcWidth-1,outerRadius=this.outerRadius-this.arcWidth-1;if(innerRadius<0)return;return ctx.fillStyle=this.fillColor,ctx.strokeStyle=this.outlineColor,ctx.beginPath(),ctx.arc(x,y,innerRadius,startAngle,endAngle,!1),ctx.arc(x,y,outerRadius,endAngle,startAngle,!0),ctx.closePath(),ctx.stroke(),ctx.fill(),this},_drawInfo:function(){var pointList,lineHeight;return pointList=[[this.infoLineStartX,this.infoLineStartY],[this.infoLineMidX,this.infoLineMidY],[this.infoLineEndX,this.infoLineEndY]],this._drawSegments(pointList,!1),this.infoText.innerHTML=this.info,lineHeight=this.infoText.offsetHeight,this.infoText.style.top=this.infoLineEndY+absPos(this.canvas)[1]-lineHeight/2+"px",this},_drawSegments:function(pointList,close){var ctx=this.context;ctx.beginPath(),ctx.moveTo(pointList[0][0],pointList[0][1]);for(var i=1;i<pointList.length;++i)ctx.lineTo(pointList[i][0],pointList[i][1]);close&&ctx.closePath(),ctx.stroke()}},window.ProgressCircle=ProgressCircle}(window,document),function($){var VcChart=function(element,options){this.el=element,this.$el=$(this.el);var $this=this;$this.options=$.extend({color:"wpb_button",units:"",width:"",label_selector:".vc_pie_chart_value",back_selector:".vc_pie_chart_back",responsive:!0},options),$this.init()};VcChart.prototype={constructor:VcChart,_progress_v:0,animated:!1,colors:{wpb_button:"rgba(247, 247, 247, 1)","btn-primary":"rgba(0, 136, 204, 1)","btn-info":"rgba(88, 185, 218, 1)","btn-success":"rgba(106, 177, 101, 1)","btn-warning":"rgba(255, 153, 0, 1)","btn-danger":"rgba(255, 103, 91, 1)","btn-inverse":"rgba(85, 85, 85, 1)"},init:function(){this.setupColor(),this.value=this.$el.data("pie-value")/100,this.label_value=this.$el.data("pie-label-value")||this.$el.data("pie-value"),this.$wrapper=$(".vc_pie_wrapper",this.$el),this.$label=$(this.options.label_selector,this.$el),this.$back=$(this.options.back_selector,this.$el),this.$canvas=this.$el.find("canvas"),this.arcWidth=this.$el.data("pie-width")*2,this.draw(),this.setWayPoint(),this.options.responsive===!0&&this.setResponsive(),UNCODE.isMobile&&(this._progress_v=this.value)},setupColor:function(){typeof this.options.color!="undefined"?this.color=this.options.color:this.color="rgba(247, 247, 247, 0.2)"},setResponsive:function(){var that=this;UNCODE.isMobile||$(window).resize(function(){that.animated===!0&&that.circle.stop(),that.draw(!0)})},draw:function(redraw){var w=this.$el.addClass("vc_ready").width()*2,border_w=this.arcWidth,radius;w||(w=this.$el.parents(":visible").first().width()-2),radius=w/2,this.$wrapper.css({width:w/2+"px"}),this.$label.css({width:w/2,height:w/2,"line-height":w/2+"px"}),this.$back.css({width:w/2,height:w/2}),this.$canvas.attr({width:w+"px",height:w+"px"}),this.$el.addClass("vc_ready"),this.circle=new ProgressCircle({canvas:this.$canvas.get(0),minRadius:radius,arcWidth:border_w}),redraw===!0&&this.animated===!0&&(this._progress_v=this.value,this.circle.addEntry({fillColor:this.color,progressListener:$.proxy(this.setProgress,this)}).start())},setProgress:function(){if(this._progress_v>=this.value)return this.circle.stop(),this.animated=!0,this.$label.html(this.label_value+this.options.units),this._progress_v;this._progress_v+=.01;if(!isNaN(this.label_value)){var label_value=this._progress_v/this.value*this.label_value,val=Math.round(label_value)+this.options.units;this.$label.html(val)}else this.$label.html(this.label_value+this.options.units);return this._progress_v},animate:function(){this.animated!==!0&&this.circle.addEntry({fillColor:this.color,progressListener:$.proxy(this.setProgress,this)}).start(10)},setWayPoint:function(){typeof $.fn.waypoint!="undefined"&&!UNCODE.isMobile?this.$el.waypoint($.proxy(this.animate,this),{offset:"85%"}):this.animate()}},$.fn.vcChat=function(option,value){return this.each(function(){var $this=$(this),data=$this.data("vc_chart"),options=typeof option=="object"?option:{color:$this.data("pie-color"),units:$this.data("pie-units")};typeof option=="undefined"&&$this.data("vc_chart",data=new VcChart(this,options)),typeof option=="string"&&data[option](value)})},typeof window["vc_pieChart"]!="function"&&(window.vc_pieChart=function(){$(".vc_pie_chart:visible:not(.vc_ready)").vcChat()}),$(document).ready(function(){!window.vc_iframe&&vc_pieChart(),$(".nav-tabs a").on("shown.bs.tab",function(e){var $cont=$(e.target).closest(".tab-container"),$active=$(".tab-pane.active",$cont);$(".vc_pie_chart:not(.vc_ready)",$active).vcChat()}),$(".panel-collapse").on("shown.bs.collapse",function(e){$(".vc_pie_chart:not(.vc_ready)",e.target).vcChat()})})}(window.jQuery),uncode_progress_bar(),function($){"use strict";$.fn.counterUp=function(options){var settings=$.extend({time:400,delay:10},options);return this.each(function(){var $this=$(this),$settings=settings,counterUpper=function(){var nums=[],divisions=$settings.time/$settings.delay,numReal=$this.attr("data-val"),num=numReal,isComma=/[0-9]+,[0-9]+/.test(num);num=num.replace(/,/g,"");var isInt=/^[0-9]+$/.test(num),isFloat=/^[0-9]+\.[0-9]+$/.test(num),decimalPlaces=isFloat?(num.split(".")[1]||[]).length:0;for(var i=divisions;i>=1;i--){var newNum=parseInt(num/divisions*i);isFloat&&(newNum=parseFloat(num/divisions*i).toFixed(decimalPlaces));if(isComma)while(/(\d+)(\d{3})/.test(newNum.toString()))newNum=newNum.toString().replace(/(\d+)(\d{3})/,"$1,$2");nums.unshift(newNum)}nums.push(numReal),$this.data("counterup-nums",nums),$this.text("0");var f=function(){$this.data("counterup-nums")!=null&&($this.text($this.data("counterup-nums").shift()),$this.data("counterup-nums").length?setTimeout($this.data("counterup-func"),$settings.delay):(delete $this.data("counterup-nums"),$this.data("counterup-nums",null),$this.data("counterup-func",null)))};$this.data("counterup-func",f),setTimeout($this.data("counterup-func"),$settings.delay)};new Waypoint({context:UNCODE.isUnmodalOpen?document.getElementById("unmodal-content"):window,element:this,handler:function(){counterUpper(),UNCODE.isUnmodalOpen||this.destroy()},offset:"100%"})})}}(jQuery),function(factory){"use strict";typeof define=="function"&&define.amd?define(["jquery"],factory):factory(jQuery)}(function($){"use strict";function parseDateString(dateString){if(dateString instanceof Date)return dateString;if(String(dateString).match(matchers))return String(dateString).match(/^[0-9]*$/)&&(dateString=Number(dateString)),String(dateString).match(/\-/)&&(dateString=String(dateString).replace(/\-/g,"/")),new Date(dateString);throw new Error("Couldn't cast `"+dateString+"` to a date object.")}function escapedRegExp(str){var sanitize=str.toString().replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1");return new RegExp(sanitize)}function strftime(offsetObject){return function(format){var directives=format.match(/%(-|!)?[A-Z]{1}(:[^;]+;)?/gi);if(directives)for(var i=0,len=directives.length;i<len;++i){var directive=directives[i].match(/%(-|!)?([a-zA-Z]{1})(:[^;]+;)?/),regexp=escapedRegExp(directive[0]),modifier=directive[1]||"",plural=directive[3]||"",value=null;directive=directive[2],DIRECTIVE_KEY_MAP.hasOwnProperty(directive)&&(value=DIRECTIVE_KEY_MAP[directive],value=Number(offsetObject[value])),value!==null&&(modifier==="!"&&(value=pluralize(plural,value)),modifier===""&&value<10&&(value="0"+value.toString()),format=format.replace(regexp,value.toString()))}return format=format.replace(/%%/,"%"),format}}function pluralize(format,count){var plural="s",singular="";return format&&(format=format.replace(/(:|;|\s)/gi,"").split(/\,/),format.length===1?plural=format[0]:(singular=format[0],plural=format[1])),Math.abs(count)>1?plural:singular}var instances=[],matchers=[],defaultOptions={precision:100,elapse:!1,defer:!1};matchers.push(/^[0-9]*$/.source),matchers.push(/([0-9]{1,2}\/){2}[0-9]{4}([0-9]{1,2}(:[0-9]{2}){2})?/.source),matchers.push(/[0-9]{4}([\/\-][0-9]{1,2}){2}([0-9]{1,2}(:[0-9]{2}){2})?/.source),matchers=new RegExp(matchers.join("|"));var DIRECTIVE_KEY_MAP={Y:"years",m:"months",n:"daysToMonth",d:"daysToWeek",w:"weeks",W:"weeksToMonth",H:"hours",M:"minutes",S:"seconds",D:"totalDays",I:"totalHours",N:"totalMinutes",T:"totalSeconds"},Countdown=function(el,finalDate,options){this.el=el,this.$el=$(el),this.interval=null,this.offset={},this.options=$.extend({},defaultOptions),this.instanceNumber=instances.length,instances.push(this),this.$el.data("countdown-instance",this.instanceNumber),options&&(typeof options=="function"?(this.$el.on("update.countdown",options),this.$el.on("stoped.countdown",options),this.$el.on("finish.countdown",options)):this.options=$.extend({},defaultOptions,options)),this.setFinalDate(finalDate),this.options.defer===!1&&this.start()};$.extend(Countdown.prototype,{start:function(){this.interval!==null&&clearInterval(this.interval);var self=this;this.update(),this.interval=setInterval(function(){self.update.call(self)},this.options.precision)},stop:function(){clearInterval(this.interval),this.interval=null,this.dispatchEvent("stoped")},toggle:function(){this.interval?this.stop():this.start()},pause:function(){this.stop()},resume:function(){this.start()},remove:function(){this.stop.call(this),instances[this.instanceNumber]=null,delete this.$el.data().countdownInstance},setFinalDate:function(value){this.finalDate=parseDateString(value)},update:function(){if(this.$el.closest("html").length===0){this.remove();return}var hasEventsAttached=$._data(this.el,"events")!==undefined,now=new Date,newTotalSecsLeft;newTotalSecsLeft=this.finalDate.getTime()-now.getTime(),newTotalSecsLeft=Math.ceil(newTotalSecsLeft/1e3),newTotalSecsLeft=!this.options.elapse&&newTotalSecsLeft<0?0:Math.abs(newTotalSecsLeft);if(this.totalSecsLeft===newTotalSecsLeft||!hasEventsAttached)return;this.totalSecsLeft=newTotalSecsLeft,this.elapsed=now>=this.finalDate,this.offset={seconds:this.totalSecsLeft%60,minutes:Math.floor(this.totalSecsLeft/60)%60,hours:Math.floor(this.totalSecsLeft/60/60)%24,days:Math.floor(this.totalSecsLeft/60/60/24)%7,daysToWeek:Math.floor(this.totalSecsLeft/60/60/24)%7,daysToMonth:Math.floor(this.totalSecsLeft/60/60/24%30.4368),weeks:Math.floor(this.totalSecsLeft/60/60/24/7),weeksToMonth:Math.floor(this.totalSecsLeft/60/60/24/7)%4,months:Math.floor(this.totalSecsLeft/60/60/24/30.4368),years:Math.abs(this.finalDate.getFullYear()-now.getFullYear()),totalDays:Math.floor(this.totalSecsLeft/60/60/24),totalHours:Math.floor(this.totalSecsLeft/60/60),totalMinutes:Math.floor(this.totalSecsLeft/60),totalSeconds:this.totalSecsLeft},!this.options.elapse&&this.totalSecsLeft===0?(this.stop(),this.dispatchEvent("finish")):this.dispatchEvent("update")},dispatchEvent:function(eventName){var event=$.Event(eventName+".countdown");event.finalDate=this.finalDate,event.elapsed=this.elapsed,event.offset=$.extend({},this.offset),event.strftime=strftime(this.offset),this.$el.trigger(event)}}),$.fn.countdown=function(){var argumentsArray=Array.prototype.slice.call(arguments,0);return this.each(function(){var instanceNumber=$(this).data("countdown-instance");if(instanceNumber!==undefined){var instance=instances[instanceNumber],method=argumentsArray[0];Countdown.prototype.hasOwnProperty(method)?instance[method].apply(instance,argumentsArray.slice(1)):String(method).match(/^[$A-Z_][0-9A-Z_$]*$/i)===null?(instance.setFinalDate.call(instance,method),instance.start()):$.error("Method %s does not exist on jQuery.countdown".replace(/\%s/gi,method))}else new Countdown(this,argumentsArray[0],argumentsArray[1])})}}),!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.Share=e()}}(function(){function getStyles(config){}var define,module,exports,ShareUtils;!("classList"in document.documentElement)&&Object.defineProperty&&typeof HTMLElement!="undefined"&&Object.defineProperty(HTMLElement.prototype,"classList",{get:function(){var ret,self,update;return update=function(fn){return function(value){var classes,index;classes=self.className.split(/\s+/),index=classes.indexOf(value),fn(classes,index,value),self.className=classes.join(" ")}},self=this,ret={add:update(function(classes,index,value){~index||classes.push(value)}),remove:update(function(classes,index){~index&&classes.splice(index,1)}),toggle:update(function(classes,index,value){~index?classes.splice(index,1):classes.push(value)}),contains:function(value){return!!~self.className.split(/\s+/).indexOf(value)},item:function(i){return self.className.split(/\s+/)[i]||null}},Object.defineProperty(ret,"length",{get:function(){return self.className.split(/\s+/).length}}),ret}}),String.prototype.to_rfc3986=function(){var tmp;return tmp=encodeURIComponent(this),tmp.replace(/[!'()*]/g,function(c){return"%"+c.charCodeAt(0).toString(16)})},ShareUtils=function(){function ShareUtils(){}return ShareUtils.prototype.extend=function(to,from,overwrite){var hasProp,prop;for(prop in from){hasProp=to[prop]!==undefined;if(hasProp&&typeof from[prop]=="object")this.extend(to[prop],from[prop],overwrite);else if(overwrite||!hasProp)to[prop]=from[prop]}},ShareUtils.prototype.hide=function(el){return el.style.display="none"},ShareUtils.prototype.show=function(el){return el.style.display="block"},ShareUtils.prototype.has_class=function(el,class_name){return el.classList.contains(class_name)},ShareUtils.prototype.add_class=function(el,class_name){return el.classList.add(class_name)},ShareUtils.prototype.remove_class=function(el,class_name){return el.classList.remove(class_name)},ShareUtils.prototype.is_encoded=function(str){return str=str.to_rfc3986(),decodeURIComponent(str)!==str},ShareUtils.prototype.encode=function(str){return typeof str=="undefined"||this.is_encoded(str)?str:str.to_rfc3986()},ShareUtils.prototype.popup=function(url,params){var k,popup,qs,v;return params==null&&(params={}),popup={width:500,height:350},popup.top=screen.height/2-popup.height/2,popup.left=screen.width/2-popup.width/2,qs=function(){var _results;_results=[];for(k in params)v=params[k],_results.push(""+k+"="+this.encode(v));return _results}.call(this).join("&"),qs&&(qs="?"+qs),window.open(url+qs,"targetWindow","toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,left="+popup.left+",top="+popup.top+",width="+popup.width+",height="+popup.height)},ShareUtils}();var Share,__hasProp={}.hasOwnProperty,__extends=function(child,parent){function ctor(){this.constructor=child}for(var key in parent)__hasProp.call(parent,key)&&(child[key]=parent[key]);return ctor.prototype=parent.prototype,child.prototype=new ctor,child.__super__=parent.prototype,child};return Share=function(_super){function Share(element,options){return this.element=element,this.el={head:document.getElementsByTagName("head")[0],body:document.getElementsByTagName("body")[0]},this.config={enabled_networks:0,protocol:["http","https"].indexOf(window.location.href.split(":")[0])===-1?"https://":"//",url:window.location.href.replace("&","%26"),caption:null,title:this.default_title(),image:this.default_image(),description:this.default_description(),ui:{flyout:"top center",button_text:"Share",button_font:!0,icon_font:!0},networks:{twitter:{enabled:!0,url:null,title:null,description:null},facebook:{enabled:!0,load_sdk:!0,url:null,app_id:null,title:null,caption:null,description:null,image:null},threads:{enabled:!0,url:null,title:null,description:null},bluesky:{enabled:!0,url:null,title:null,description:null},pinterest:{enabled:!0,url:null,image:null,description:null},reddit:{enabled:!0,url:null,title:null},linkedin:{enabled:!0,url:null,title:null,description:null},xing:{enabled:!0,url:null,title:null,image:null,description:null},whatsapp:{enabled:!0,title:null,url:null},email:{enabled:!0,title:null,description:null,url:null}}},this.setup(element,options),this}return __extends(Share,_super),Share.prototype.setup=function(element,opts){var index,instance,instances,_i,_len;instances=document.querySelectorAll(element),this.extend(this.config,opts,!0),this.set_global_configuration(),this.normalize_network_configuration(),this.config.ui.icon_font&&this.inject_icons(),this.config.ui.button_font&&this.inject_fonts(),this.config.networks.facebook.enabled&&this.config.networks.facebook.load_sdk&&this.inject_facebook_sdk();for(index=_i=0,_len=instances.length;_i<_len;index=++_i)instance=instances[index],this.setup_instance(element,index)},Share.prototype.setup_instance=function(element,index){var button,instance,label,network,networks,_i,_len,_results,_this=this;instance=document.querySelectorAll(element)[index],this.hide(instance),this.add_class(instance,"sharer-"+index),instance=document.querySelectorAll(element)[index],this.inject_css(instance),this.inject_html(instance),this.show(instance),label=instance.getElementsByTagName("label")[0],button=instance.getElementsByClassName("social")[0],networks=instance.getElementsByTagName("li"),this.add_class(button,"networks-"+this.config.enabled_networks),label.addEventListener("click",function(){return _this.event_toggle(button)}),_this=this,_results=[];for(index=_i=0,_len=networks.length;_i<_len;index=++_i)network=networks[index],_results.push(network.addEventListener("click",function(){return _this.event_network(instance,this),_this.event_close(button)}));return _results},Share.prototype.event_toggle=function(button){return this.has_class(button,"active")?this.event_close(button):this.event_open(button)},Share.prototype.event_open=function(button){return this.has_class(button,"load")&&this.remove_class(button,"load"),this.add_class(button,"active")},Share.prototype.event_close=function(button){return this.remove_class(button,"active")},Share.prototype.event_network=function(instance,network){var name;return name=network.getAttribute("data-network"),this.hook("before",name,instance),this["network_"+name](),this.hook("after",name,instance)},Share.prototype.open=function(){return this["public"]("open")},Share.prototype.close=function(){return this["public"]("close")},Share.prototype.toggle=function(){return this["public"]("toggle")},Share.prototype["public"]=function(action){var button,index,instance,_i,_len,_ref,_results;_ref=document.querySelectorAll(this.element),_results=[];for(index=_i=0,_len=_ref.length;_i<_len;index=++_i)instance=_ref[index],button=instance.getElementsByClassName("social")[0],_results.push(this["event_"+action](button));return _results},Share.prototype.network_facebook=function(){return this.config.networks.facebook.load_sdk?window.FB?FB.ui({method:"feed",name:this.config.networks.facebook.title,link:this.config.networks.facebook.url,picture:this.config.networks.facebook.image,caption:this.config.networks.facebook.caption,description:this.config.networks.facebook.description}):console.error("The Facebook JS SDK hasn't loaded yet."):this.popup("https://www.facebook.com/sharer/sharer.php",{u:this.config.networks.facebook.url})},Share.prototype.network_threads=function(){return this.popup("https://threads.net/intent/post",{text:this.config.networks.threads.title,url:this.config.networks.threads.url})},Share.prototype.network_bluesky=function(){return this.popup("https://bsky.app/intent/compose",{text:this.config.networks.bluesky.title+" "+this.config.networks.bluesky.url})},Share.prototype.network_twitter=function(){return this.popup("https://twitter.com/intent/tweet",{text:this.config.networks.twitter.title,url:this.config.networks.twitter.url})},Share.prototype.network_pinterest=function(){return this.popup("https://www.pinterest.com/pin/create/button",{url:this.config.networks.pinterest.url,media:this.config.networks.pinterest.image,description:this.config.networks.pinterest.description})},Share.prototype.network_linkedin=function(){return this.popup("https://www.linkedin.com/shareArticle",{url:this.config.networks.linkedin.url,title:this.config.networks.linkedin.title,summary:this.config.networks.linkedin.description})},Share.prototype.network_xing=function(){return this.popup("https://www.xing.com/spi/shares/new",{url:this.config.networks.xing.url,image:this.config.networks.xing.image,title:this.config.networks.xing.title,summary:this.config.networks.xing.description})},Share.prototype.network_whatsapp=function(){return this.popup("https://api.whatsapp.com/send",{text:this.config.networks.whatsapp.title+"%20"+this.config.networks.whatsapp.url})},Share.prototype.network_email=function(){return this.popup("mailto:",{subject:this.config.networks.email.title,body:this.config.networks.email.url+"%0A%0A"+this.config.networks.email.description})},Share.prototype.inject_icons=function(){},Share.prototype.inject_fonts=function(){},Share.prototype.inject_stylesheet=function(url){var link;if(!this.el.head.querySelector('link[href="'+url+'"]'))return link=document.createElement("link"),link.setAttribute("rel","stylesheet"),link.setAttribute("href",url),this.el.head.appendChild(link)},Share.prototype.inject_css=function(instance){var css,meta,selector,style;selector="."+instance.getAttribute("class").split(" ").join(".");if(!this.el.head.querySelector("meta[name='sharer"+selector+"']"))return this.config.selector=selector,css=getStyles(this.config),style=document.createElement("style"),style.type="text/css",style.styleSheet?style.styleSheet.cssText=css:style.appendChild(document.createTextNode(css)),this.el.head.appendChild(style),delete this.config.selector,meta=document.createElement("meta"),meta.setAttribute("name","sharer"+selector),this.el.head.appendChild(meta)},Share.prototype.inject_html=function(instance){return instance.innerHTML="<label class='social-export'><span>"+this.config.ui.button_text+"</span></label><div class='social load "+this.config.ui.flyout+"'><ul><li class='social-facebook' data-network='facebook' tabindex='0'></li><li class='social-twitter' data-network='twitter' tabindex='0'></li><li class='social-threads' data-network='threads' tabindex='0'></li><li class='social-pinterest' data-network='pinterest' tabindex='0'></li><li class='social-linkedin' data-network='linkedin' tabindex='0'></li><li class='social-whatsapp' data-network='whatsapp' tabindex='0'></li><li class='social-bluesky' data-network='bluesky' tabindex='0'></li><li class='social-xing' data-network='xing' tabindex='0'></li><li class='social-paper-plane' data-network='email' tabindex='0'></li></ul></div>"},Share.prototype.inject_facebook_sdk=function(){var fb_root,script;if(!window.FB&&this.config.networks.facebook.app_id&&!this.el.body.querySelector("#fb-root"))return script=document.createElement("script"),script.text="window.fbAsyncInit=function(){FB.init({appId:'"+this.config.networks.facebook.app_id+"',status:true,xfbml:true})};(function(e,t,n){var r,i=e.getElementsByTagName(t)[0];if(e.getElementById(n)){return}r=e.createElement(t);r.id=n;r.src='"+this.config.protocol+"connect.facebook.net/en_US/all.js';i.parentNode.insertBefore(r,i)})(document,'script','facebook-jssdk')",fb_root=document.createElement("div"),fb_root.id="fb-root",this.el.body.appendChild(fb_root),this.el.body.appendChild(script)},Share.prototype.hook=function(type,network,instance){var fn,opts;fn=this.config.networks[network][type],typeof fn=="function"&&(opts=fn.call(this.config.networks[network],instance),opts!==void 0&&(opts=this.normalize_filter_config_updates(opts),this.extend(this.config.networks[network],opts,!0),this.normalize_network_configuration()))},Share.prototype.default_title=function(){var content;if(content=document.querySelector('meta[property="og:title"]')||document.querySelector('meta[name="twitter:title"]'))return encodeURIComponent(content.getAttribute("content"));if(content=document.querySelector("title"))return encodeURIComponent(content.innerText)},Share.prototype.default_image=function(){var content;if(content=document.querySelector('meta[property="og:image"]')||document.querySelector('meta[name="twitter:image"]'))return content.getAttribute("content")},Share.prototype.default_description=function(){var content;return(content=document.querySelector('meta[property="og:description"]')||document.querySelector('meta[name="twitter:description"]')||document.querySelector('meta[name="description"]'))?encodeURIComponent(content.getAttribute("content")):""},Share.prototype.set_global_configuration=function(){var display,network,option,options,_ref,_results;_ref=this.config.networks,_results=[];for(network in _ref){options=_ref[network];for(option in options)this.config.networks[network][option]==null&&(this.config.networks[network][option]=this.config[option]);this.config.networks[network].enabled?(display="block",this.config.enabled_networks+=1):display="none",_results.push(this.config.networks[network].display=display)}return _results},Share.prototype.normalize_network_configuration=function(){this.config.networks.facebook.app_id||(this.config.networks.facebook.load_sdk=!1),this.is_encoded(this.config.networks.twitter.description)||(this.config.networks.twitter.description=encodeURIComponent(this.config.networks.twitter.description));if(typeof this.config.networks.facebook.app_id=="number")return this.config.networks.facebook.app_id=this.config.networks.facebook.app_id.toString()},Share.prototype.normalize_filter_config_updates=function(opts){return this.config.networks.facebook.app_id!==opts.app_id&&(console.warn("You are unable to change the Facebook app_id after the button has been initialized. Please-in-out update your Facebook filters accordingly."),delete opts.app_id),this.config.networks.facebook.load_sdk!==opts.load_sdk&&(console.warn("You are unable to change the Facebook load_sdk option after the button has been initialized. Please-in-out update your Facebook filters accordingly."),delete opts.app_id),opts},Share}(ShareUtils),Share}),function(){var $,win;$=this.jQuery||window.jQuery,win=$(window),$.fn.stick_in_parent=function(opts){var doc,elm,enable_bottoming,fn,i,inner_scrolling,len,manual_spacer,offset_top,outer_width,parent_selector,recalc_every,sticky_class;opts==null&&(opts={}),sticky_class=opts.sticky_class,inner_scrolling=opts.inner_scrolling,recalc_every=opts.recalc_every,parent_selector=opts.parent,offset_top=opts.offset_top,manual_spacer=opts.spacer,enable_bottoming=opts.bottoming,offset_top==null&&(offset_top=0),parent_selector==null&&(parent_selector=void 0),inner_scrolling==null&&(inner_scrolling=!0),sticky_class==null&&(sticky_class="is_stuck"),doc=$(document),enable_bottoming==null&&(enable_bottoming=!0),outer_width=function(el){var _el,computed,w;return window.getComputedStyle?(_el=el[0],computed=window.getComputedStyle(el[0]),w=parseFloat(computed.getPropertyValue("width"))+parseFloat(computed.getPropertyValue("margin-left"))+parseFloat(computed.getPropertyValue("margin-right")),computed.getPropertyValue("box-sizing")!=="border-box"&&(w+=parseFloat(computed.getPropertyValue("border-left-width"))+parseFloat(computed.getPropertyValue("border-right-width"))+parseFloat(computed.getPropertyValue("padding-left"))+parseFloat(computed.getPropertyValue("padding-right"))),w):el.outerWidth(!0)},fn=function(elm,padding_bottom,parent_top,parent_height,top,height,el_float,detached){var bottomed,detach,fixed,last_pos,last_scroll_height,offset,parent,recalc,recalc_and_tick,recalc_counter,spacer,tick;if(elm.data("sticky_kit"))return;elm.data("sticky_kit",!0),last_scroll_height=doc.height(),parent=elm.parent(),parent_selector!=null&&(parent=parent.closest(parent_selector));if(!parent.length)throw"failed to find stick parent";fixed=!1,bottomed=!1,spacer=manual_spacer!=null?manual_spacer&&elm.closest(manual_spacer):$("<div />"),spacer&&spacer.css("position",elm.css("position")),recalc=function(){var border_top,padding_top,restore;if(detached)return;last_scroll_height=doc.height(),border_top=parseInt(parent.css("border-top-width"),10),padding_top=parseInt(parent.css("padding-top"),10),padding_bottom=parseInt(parent.css("padding-bottom"),10),parent_top=parent.offset().top+border_top+padding_top,parent_height=parent.height(),fixed&&(fixed=!1,bottomed=!1,manual_spacer==null&&(elm.insertAfter(spacer),spacer.detach()),elm.css({position:"",top:"",width:"",bottom:""}).removeClass(sticky_class),restore=!0),top=elm.offset().top-(parseInt(elm.css("margin-top"),10)||0)-offset_top,height=elm.outerHeight(!0),el_float=elm.css("float"),spacer&&spacer.css({width:outer_width(elm),height:height,display:elm.css("display"),"vertical-align":elm.css("vertical-align"),"float":el_float});if(restore)return tick()},recalc();if(height===parent_height)return;return last_pos=void 0,offset=offset_top,recalc_counter=recalc_every,tick=function(){var css,delta,recalced,scroll,will_bottom,win_height;if(detached)return;recalced=!1,recalc_counter!=null&&(recalc_counter-=1,recalc_counter<=0&&(recalc_counter=recalc_every,recalc(),recalced=!0)),!recalced&&doc.height()!==last_scroll_height&&(recalc(),recalced=!0),scroll=win.scrollTop(),last_pos!=null&&(delta=scroll-last_pos),last_pos=scroll,fixed?(enable_bottoming&&(will_bottom=scroll+height+offset>parent_height+parent_top,bottomed&&!will_bottom&&(bottomed=!1,elm.css({position:"fixed",bottom:"",top:offset}).trigger("sticky_kit:unbottom"))),scroll<top&&(fixed=!1,offset=offset_top,manual_spacer==null&&((el_float==="left"||el_float==="right")&&elm.insertAfter(spacer),spacer.detach()),css={position:"",width:"",top:""},elm.css(css).removeClass(sticky_class).trigger("sticky_kit:unstick")),inner_scrolling&&(win_height=win.height(),height+offset_top>win_height&&(bottomed||(offset-=delta,offset=Math.max(win_height-height,offset),offset=Math.min(offset_top,offset),fixed&&elm.css({top:offset+"px"}))))):scroll>top&&(fixed=!0,css={position:"fixed",top:offset},css.width=elm.css("box-sizing")==="border-box"?elm.outerWidth()+"px":elm.width()+"px",elm.css(css).addClass(sticky_class),manual_spacer==null&&(elm.after(spacer),(el_float==="left"||el_float==="right")&&spacer.append(elm)),elm.trigger("sticky_kit:stick"));if(fixed&&enable_bottoming){will_bottom==null&&(will_bottom=scroll+height+offset>parent_height+parent_top);if(!bottomed&&will_bottom)return bottomed=!0,parent.css("position")==="static"&&parent.css({position:"relative"}),elm.css({position:"absolute",bottom:padding_bottom,top:"auto"}).trigger("sticky_kit:bottom")}},recalc_and_tick=function(){return recalc(),tick()},detach=function(){detached=!0,win.off("touchmove",tick),win.off("scroll",tick),win.off("resize",recalc_and_tick),$(document.body).off("sticky_kit:recalc",recalc_and_tick),elm.off("sticky_kit:detach",detach),elm.removeData("sticky_kit"),elm.css({position:"",bottom:"",top:"",width:""}),parent.position("position","");if(fixed)return manual_spacer==null&&((el_float==="left"||el_float==="right")&&elm.insertAfter(spacer),spacer.remove()),elm.removeClass(sticky_class)},win.on("touchmove",tick),win.on("scroll",tick),win.on("resize",recalc_and_tick),$(document.body).on("sticky_kit:recalc",recalc_and_tick),elm.on("sticky_kit:detach",detach),setTimeout(tick,0)};for(i=0,len=this.length;i<len;i++)elm=this[i],fn($(elm));return this}}.call(this),BootstrapTabHistory={options:{defaultAnchorYOffset:0,defaultChanger:"replace",defaultUpdateURL:!1,showTabsBasedOnAnchor:!0}},function(){"use strict";function backfillHistoryState(){var newState=null;jQuery("li.active > [data-tab-history], .panel-title.active [data-tab-history]").each(function(){var $activeTabElement=jQuery(this),selector=getTabSelector($activeTabElement);if(selector){var tabGroup=getTabGroup($activeTabElement);tabGroup&&(newState=createNewHistoryState(newState||history.state,tabGroup,selector))}}),newState&&history.replaceState(newState,"",null)}function createNewHistoryState(existingState,tabGroup,selector){var newState=jQuery.extend(!0,{},existingState,{bootstrapTabHistory:{}});return newState.bootstrapTabHistory[tabGroup]=selector,newState}function getTabGroup($tab){return parseTruthyAttributeValue($tab.data("tab-history"))}function getTabSelector($tab){return $tab.data("target")||$tab.attr("href")}function onShownTab(shownEvt){if(!showingTabsBasedOnState){var $activatedTab=jQuery(shownEvt.target);$activatedTab.hasClass("panel-collapse")&&($activatedTab=$activatedTab.closest(".panel").find("a"));var selector=getTabSelector($activatedTab);if(selector){var tabGroup=getTabGroup($activatedTab);if(tabGroup){var historyChanger=$activatedTab.data("tab-history-changer")||BootstrapTabHistory.options.defaultChanger,newState=createNewHistoryState(history.state,tabGroup,selector),updateURL=function($activatedTab){if(selector[0]==="#"){var elementUpdateURLOption=parseTruthyAttributeValue($activatedTab.data("tab-history-update-url"));return elementUpdateURLOption===undefined?BootstrapTabHistory.options.defaultUpdateURL:elementUpdateURLOption}return!1}($activatedTab);switch(historyChanger){case"push":history.pushState(newState,"",updateURL?selector:null);break;case"replace":history.replaceState(newState,"",updateURL?selector:null);break;default:throw new Error("Unknown tab-history-changer: "+historyChanger)}}}}}function onPopState(){var bootstrapTabHistory=history.state&&history.state.bootstrapTabHistory;bootstrapTabHistory&&showTabsBasedOnState(bootstrapTabHistory)}function parseTruthyAttributeValue(value){return value?value:value===""?!0:value}function showTabsBasedOnAnchor(){if(BootstrapTabHistory.options.showTabsBasedOnAnchor){var anchor=window.location&&window.location.hash;if(anchor){var $tabElement=showTabForSelector(anchor);if($tabElement&&window.addEventListener&&window.removeEventListener){var anchorYOffset=function($tabElement){var elementSetting=$tabElement.data("tab-history-anchor-y-offset");return elementSetting===undefined?BootstrapTabHistory.options.defaultAnchorYOffset:elementSetting}($tabElement);if(anchorYOffset||anchorYOffset===0){var scrollListener=function resetAnchorScroll(){window.removeEventListener("scroll",scrollListener),window.scrollTo(0,anchorYOffset)};window.addEventListener("scroll",scrollListener)}}}}}function showTabForSelector(selector){var $tabElement=function(selector){var $ret=null;return jQuery('[data-toggle="tab"], [data-toggle="pill"], [data-toggle="collapse"]').each(function(){var $potentialTab=jQuery(this);return $potentialTab.attr("href")!==selector&&$potentialTab.data("target")!==selector||!getTabGroup($potentialTab)?null:($ret=$potentialTab,!1)}),$ret}(selector);return $tabElement&&($tabElement.parent().hasClass("active")||$tabElement.trigger("click")),$tabElement}function showTabsBasedOnState(bootstrapTabHistory){showingTabsBasedOnState=!0;try{for(var k in bootstrapTabHistory)bootstrapTabHistory.hasOwnProperty(k)&&showTabForSelector(bootstrapTabHistory[k])}finally{showingTabsBasedOnState=!1}}jQuery(function(){if(history&&history.pushState&&history.replaceState){var bootstrapTabHistory=history.state&&history.state.bootstrapTabHistory;bootstrapTabHistory?showTabsBasedOnState(bootstrapTabHistory):showTabsBasedOnAnchor(),backfillHistoryState(),jQuery(document).on("shown.bs.tab show.bs.collapse",onShownTab),jQuery(window).on("popstate",onPopState)}else showTabsBasedOnAnchor()});var showingTabsBasedOnState=!1}(),function(factory){typeof define=="function"&&define.amd?define(["jquery"],factory):typeof module=="object"&&module.exports?module.exports=function(root,jQuery){return jQuery===undefined&&(typeof window!="undefined"?jQuery=require("jquery"):jQuery=require("jquery")(root)),factory(jQuery),jQuery}:factory(jQuery)}(function($){var JustifiedGallery=function($gallery,settings){this.settings=settings,this.checkSettings(),this.imgAnalyzerTimeout=null,this.entries=null,this.buildingRow={entriesBuff:[],width:0,height:0,aspectRatio:0},this.lastFetchedEntry=null,this.lastAnalyzedIndex=-1,this.yield={every:2,flushed:0},this.border=settings.border>=0?settings.border:settings.margins,this.maxRowHeight=this.retrieveMaxRowHeight(),this.suffixRanges=this.retrieveSuffixRanges(),this.offY=this.border,this.rows=0,this.spinner={phase:0,timeSlot:150,$el:$('<div class="jg-spinner"><span></span><span></span><span></span></div>'),intervalId:null},this.scrollBarOn=!1,this.checkWidthIntervalId=null,this.galleryWidth=$gallery.width(),this.$gallery=$gallery};JustifiedGallery.prototype.getSuffix=function(width,height){var longestSide,i;longestSide=width>height?width:height;for(i=0;i<this.suffixRanges.length;i++)if(longestSide<=this.suffixRanges[i])return this.settings.sizeRangeSuffixes[this.suffixRanges[i]];return this.settings.sizeRangeSuffixes[this.suffixRanges[i-1]]},JustifiedGallery.prototype.removeSuffix=function(str,suffix){return str.substring(0,str.length-suffix.length)},JustifiedGallery.prototype.endsWith=function(str,suffix){return str.indexOf(suffix,str.length-suffix.length)!==-1},JustifiedGallery.prototype.getUsedSuffix=function(str){for(var si in this.settings.sizeRangeSuffixes)if(this.settings.sizeRangeSuffixes.hasOwnProperty(si)){if(this.settings.sizeRangeSuffixes[si].length===0)continue;if(this.endsWith(str,this.settings.sizeRangeSuffixes[si]))return this.settings.sizeRangeSuffixes[si]}return""},JustifiedGallery.prototype.newSrc=function(imageSrc,imgWidth,imgHeight,image){var newImageSrc;if(this.settings.thumbnailPath)newImageSrc=this.settings.thumbnailPath(imageSrc,imgWidth,imgHeight,image);else{var matchRes=imageSrc.match(this.settings.extension),ext=matchRes!==null?matchRes[0]:"";newImageSrc=imageSrc.replace(this.settings.extension,""),newImageSrc=this.removeSuffix(newImageSrc,this.getUsedSuffix(newImageSrc)),newImageSrc+=this.getSuffix(imgWidth,imgHeight)+ext}return newImageSrc},JustifiedGallery.prototype.showImg=function($entry,callback){this.settings.cssAnimation?($entry.addClass("jg-entry-visible"),callback&&callback()):($entry.stop().fadeTo(this.settings.imagesAnimationDuration,1,callback),$entry.find(this.settings.imgSelector).stop().fadeTo(this.settings.imagesAnimationDuration,1,callback))},JustifiedGallery.prototype.extractImgSrcFromImage=function($image){var imageSrc=$image.data("safe-src"),imageSrcLoc="data-safe-src";if(typeof imageSrc=="undefined"){var imageCurrentSrc=$image[0].currentSrc;imageCurrentSrc?imageSrc=imageCurrentSrc:imageSrc=$image.attr("src"),imageSrcLoc="src"}return $image.data("jg.originalSrc",imageSrc),$image.data("jg.src",imageSrc),$image.data("jg.originalSrcLoc",imageSrcLoc),imageSrc},JustifiedGallery.prototype.imgFromEntry=function($entry){var $img=$entry.find(this.settings.imgSelector);return $img.length===0&&($img=$entry.find(".t-entry-visual-cont img")),$img.length===0?null:$img},JustifiedGallery.prototype.captionFromEntry=function($entry){var $caption=$entry.find("> .jg-caption");return $caption.length===0?null:$caption},JustifiedGallery.prototype.displayEntry=function($entry,x,y,imgWidth,imgHeight,rowHeight){$entry.width(imgWidth),$entry.height(Math.floor(rowHeight)),$entry.css("top",Math.floor(y)),$entry.css("left",x);var $image=this.imgFromEntry($entry);if($image!==null){$image.css("width",imgWidth),$image.css("height",imgHeight),$image.css("margin-left",-imgWidth/2),$image.css("margin-top",-imgHeight/2);var imageSrc=$image.data("jg.src");if(imageSrc){imageSrc=this.newSrc(imageSrc,imgWidth,imgHeight,$image[0]),$image.one("error",function(){this.resetImgSrc($image)});var loadNewImage=function(){$image.attr("src",imageSrc)};$entry.data("jg.loaded")==="skipped"&&imageSrc?this.onImageEvent(imageSrc,function(){this.showImg($entry,loadNewImage),$entry.data("jg.loaded",!0)}.bind(this)):this.showImg($entry,loadNewImage)}}else this.showImg($entry);this.displayEntryCaption($entry)},JustifiedGallery.prototype.displayEntryCaption=function($entry){var $image=this.imgFromEntry($entry);if($image!==null&&this.settings.captions){var $imgCaption=this.captionFromEntry($entry);if($imgCaption===null){var caption=$image.attr("alt");this.isValidCaption(caption)||(caption=$entry.attr("title")),this.isValidCaption(caption)&&($imgCaption=$('<div class="jg-caption">'+caption+"</div>"),$entry.append($imgCaption),$entry.data("jg.createdCaption",!0))}$imgCaption!==null&&(this.settings.cssAnimation||$imgCaption.stop().fadeTo(0,this.settings.captionSettings.nonVisibleOpacity),this.addCaptionEventsHandlers($entry))}else this.removeCaptionEventsHandlers($entry)},JustifiedGallery.prototype.isValidCaption=function(caption){return typeof caption!="undefined"&&caption.length>0},JustifiedGallery.prototype.onEntryMouseEnterForCaption=function(eventObject){var $caption=this.captionFromEntry($(eventObject.currentTarget));this.settings.cssAnimation?$caption.addClass("jg-caption-visible").removeClass("jg-caption-hidden"):$caption.stop().fadeTo(this.settings.captionSettings.animationDuration,this.settings.captionSettings.visibleOpacity)},JustifiedGallery.prototype.onEntryMouseLeaveForCaption=function(eventObject){var $caption=this.captionFromEntry($(eventObject.currentTarget));this.settings.cssAnimation?$caption.removeClass("jg-caption-visible").removeClass("jg-caption-hidden"):$caption.stop().fadeTo(this.settings.captionSettings.animationDuration,this.settings.captionSettings.nonVisibleOpacity)},JustifiedGallery.prototype.addCaptionEventsHandlers=function($entry){var captionMouseEvents=$entry.data("jg.captionMouseEvents");typeof captionMouseEvents=="undefined"&&(captionMouseEvents={mouseenter:$.proxy(this.onEntryMouseEnterForCaption,this),mouseleave:$.proxy(this.onEntryMouseLeaveForCaption,this)},$entry.on("mouseenter",undefined,undefined,captionMouseEvents.mouseenter),$entry.on("mouseleave",undefined,undefined,captionMouseEvents.mouseleave),$entry.data("jg.captionMouseEvents",captionMouseEvents))},JustifiedGallery.prototype.removeCaptionEventsHandlers=function($entry){var captionMouseEvents=$entry.data("jg.captionMouseEvents");typeof captionMouseEvents!="undefined"&&($entry.off("mouseenter",undefined,captionMouseEvents.mouseenter),$entry.off("mouseleave",undefined,captionMouseEvents.mouseleave),$entry.removeData("jg.captionMouseEvents"))},JustifiedGallery.prototype.clearBuildingRow=function(){this.buildingRow.entriesBuff=[],this.buildingRow.aspectRatio=0,this.buildingRow.width=0},JustifiedGallery.prototype.prepareBuildingRow=function(isLastRow,hiddenRow){var i,$entry,imgAspectRatio,newImgW,newImgH,justify=!0,minHeight=0,availableWidth=this.galleryWidth-2*this.border-(this.buildingRow.entriesBuff.length-1)*this.settings.margins,rowHeight=Math.floor(availableWidth/this.buildingRow.aspectRatio),defaultRowHeight=this.settings.rowHeight,justifiable=this.buildingRow.width/availableWidth>this.settings.justifyThreshold;if(hiddenRow||isLastRow&&this.settings.lastRow==="hide"&&!justifiable){for(i=0;i<this.buildingRow.entriesBuff.length;i++)$entry=this.buildingRow.entriesBuff[i],this.settings.cssAnimation?$entry.removeClass("jg-entry-visible"):($entry.stop().fadeTo(0,.1),$entry.find("> img, > a > img").fadeTo(0,0));return-1}isLastRow&&!justifiable&&this.settings.lastRow!=="justify"&&this.settings.lastRow!=="hide"&&(justify=!1,this.rows>0&&(defaultRowHeight=(this.offY-this.border-this.settings.margins*this.rows)/this.rows,justify=defaultRowHeight*this.buildingRow.aspectRatio/availableWidth>this.settings.justifyThreshold));for(i=0;i<this.buildingRow.entriesBuff.length;i++){$entry=this.buildingRow.entriesBuff[i],imgAspectRatio=$entry.data("jg.width")/$entry.data("jg.height"),justify?(newImgW=i===this.buildingRow.entriesBuff.length-1?availableWidth:rowHeight*imgAspectRatio,newImgH=rowHeight):(newImgW=defaultRowHeight*imgAspectRatio,newImgH=defaultRowHeight),availableWidth-=Math.round(newImgW),$entry.data("jg.jwidth",Math.round(newImgW)),$entry.data("jg.jheight",Math.ceil(newImgH));if(i===0||minHeight>newImgH)minHeight=newImgH}return this.buildingRow.height=minHeight,justify},JustifiedGallery.prototype.flushRow=function(isLastRow,hiddenRow){var settings=this.settings,$entry,buildingRowRes,offX=this.border,i;buildingRowRes=this.prepareBuildingRow(isLastRow,hiddenRow);if(hiddenRow||isLastRow&&settings.lastRow==="hide"&&buildingRowRes===-1){this.clearBuildingRow();return}this.maxRowHeight&&this.maxRowHeight<this.buildingRow.height&&(this.buildingRow.height=this.maxRowHeight);if(isLastRow&&(settings.lastRow==="center"||settings.lastRow==="right")){var availableWidth=this.galleryWidth-2*this.border-(this.buildingRow.entriesBuff.length-1)*settings.margins;for(i=0;i<this.buildingRow.entriesBuff.length;i++)$entry=this.buildingRow.entriesBuff[i],availableWidth-=$entry.data("jg.jwidth");settings.lastRow==="center"?offX+=Math.round(availableWidth/2):settings.lastRow==="right"&&(offX+=availableWidth)}var lastEntryIdx=this.buildingRow.entriesBuff.length-1;for(i=0;i<=lastEntryIdx;i++)$entry=this.buildingRow.entriesBuff[this.settings.rtl?lastEntryIdx-i:i],this.displayEntry($entry,offX,this.offY,$entry.data("jg.jwidth"),$entry.data("jg.jheight"),this.buildingRow.height),offX+=$entry.data("jg.jwidth")+settings.margins;this.galleryHeightToSet=this.offY+this.buildingRow.height+this.border,this.setGalleryTempHeight(this.galleryHeightToSet+this.getSpinnerHeight());if(!isLastRow||this.buildingRow.height<=settings.rowHeight&&buildingRowRes)this.offY+=this.buildingRow.height+settings.margins,this.rows+=1,this.clearBuildingRow(),this.settings.triggerEvent.call(this,"jg.rowflush")};var galleryPrevStaticHeight=0;JustifiedGallery.prototype.rememberGalleryHeight=function(){galleryPrevStaticHeight=this.$gallery.height(),this.$gallery.height(galleryPrevStaticHeight)},JustifiedGallery.prototype.setGalleryTempHeight=function(height){galleryPrevStaticHeight=Math.max(height,galleryPrevStaticHeight),this.$gallery.height(galleryPrevStaticHeight)},JustifiedGallery.prototype.setGalleryFinalHeight=function(height){galleryPrevStaticHeight=height,this.$gallery.height(height)},JustifiedGallery.prototype.checkWidth=function(){this.checkWidthIntervalId=setInterval($.proxy(function(){if(!this.$gallery.is(":visible"))return;var galleryWidth=parseFloat(this.$gallery.width());Math.abs(galleryWidth-this.galleryWidth)>this.settings.refreshSensitivity&&(this.galleryWidth=galleryWidth,this.rewind(),this.rememberGalleryHeight(),this.startImgAnalyzer(!0))},this),this.settings.refreshTime)},JustifiedGallery.prototype.isSpinnerActive=function(){return this.spinner.intervalId!==null},JustifiedGallery.prototype.getSpinnerHeight=function(){return this.spinner.$el.innerHeight()},JustifiedGallery.prototype.stopLoadingSpinnerAnimation=function(){clearInterval(this.spinner.intervalId),this.spinner.intervalId=null,this.setGalleryTempHeight(this.$gallery.height()-this.getSpinnerHeight()),this.spinner.$el.detach()},JustifiedGallery.prototype.startLoadingSpinnerAnimation=function(){var spinnerContext=this.spinner,$spinnerPoints=spinnerContext.$el.find("span");clearInterval(spinnerContext.intervalId),this.$gallery.append(spinnerContext.$el),this.setGalleryTempHeight(this.offY+this.buildingRow.height+this.getSpinnerHeight()),spinnerContext.intervalId=setInterval(function(){spinnerContext.phase<$spinnerPoints.length?$spinnerPoints.eq(spinnerContext.phase).fadeTo(spinnerContext.timeSlot,1):$spinnerPoints.eq(spinnerContext.phase-$spinnerPoints.length).fadeTo(spinnerContext.timeSlot,0),spinnerContext.phase=(spinnerContext.phase+1)%($spinnerPoints.length*2)},spinnerContext.timeSlot)},JustifiedGallery.prototype.rewind=function(){this.lastFetchedEntry=null,this.lastAnalyzedIndex=-1,this.offY=this.border,this.rows=0,this.clearBuildingRow()},JustifiedGallery.prototype.getSelectorWithoutSpinner=function(){return this.settings.selector+", div:not(.jg-spinner)"},JustifiedGallery.prototype.getAllEntries=function(){var selector=this.getSelectorWithoutSpinner();return this.$gallery.children(selector).toArray()},JustifiedGallery.prototype.updateEntries=function(norewind){var newEntries;if(norewind&&this.lastFetchedEntry!=null){var selector=this.getSelectorWithoutSpinner();newEntries=$(this.lastFetchedEntry).nextAll(selector).toArray()}else this.entries=[],newEntries=this.getAllEntries();return newEntries.length>0&&($.isFunction(this.settings.sort)?newEntries=this.sortArray(newEntries):this.settings.randomize&&(newEntries=this.shuffleArray(newEntries)),this.lastFetchedEntry=newEntries[newEntries.length-1],this.settings.filter?newEntries=this.filterArray(newEntries):this.resetFilters(newEntries)),this.entries=this.entries.concat(newEntries),!0},JustifiedGallery.prototype.insertToGallery=function(entries){var that=this;$.each(entries,function(){$(this).appendTo(that.$gallery)})},JustifiedGallery.prototype.shuffleArray=function(a){var i,j,temp;for(i=a.length-1;i>0;i--)j=Math.floor(Math.random()*(i+1)),temp=a[i],a[i]=a[j],a[j]=temp;return this.insertToGallery(a),a},JustifiedGallery.prototype.sortArray=function(a){return a.sort(this.settings.sort),this.insertToGallery(a),a},JustifiedGallery.prototype.resetFilters=function(a){for(var i=0;i<a.length;i++)$(a[i]).removeClass("jg-filtered")},JustifiedGallery.prototype.filterArray=function(a){var settings=this.settings;if($.type(settings.filter)==="string")return a.filter(function(el){var $el=$(el);return $el.is(settings.filter)?($el.removeClass("jg-filtered"),!0):($el.addClass("jg-filtered").removeClass("jg-visible"),!1)});if($.isFunction(settings.filter)){var filteredArr=a.filter(settings.filter);for(var i=0;i<a.length;i++)filteredArr.indexOf(a[i])===-1?$(a[i]).addClass("jg-filtered").removeClass("jg-visible"):$(a[i]).removeClass("jg-filtered");return filteredArr}},JustifiedGallery.prototype.resetImgSrc=function($img){$img.data("jg.originalSrcLoc")==="src"?$img.attr("src",$img.data("jg.originalSrc")):$img.attr("src","")},JustifiedGallery.prototype.destroy=function(){clearInterval(this.checkWidthIntervalId),this.stopImgAnalyzerStarter(),$.each(this.getAllEntries(),$.proxy(function(_,entry){var $entry=$(entry);$entry.css("width",""),$entry.css("height",""),$entry.css("top",""),$entry.css("left",""),$entry.data("jg.loaded",undefined),$entry.removeClass("jg-entry jg-filtered jg-entry-visible");var $img=this.imgFromEntry($entry);$img&&($img.css("width",""),$img.css("height",""),$img.css("margin-left",""),$img.css("margin-top",""),this.resetImgSrc($img),$img.data("jg.originalSrc",undefined),$img.data("jg.originalSrcLoc",undefined),$img.data("jg.src",undefined)),this.removeCaptionEventsHandlers($entry);var $caption=this.captionFromEntry($entry);$entry.data("jg.createdCaption")?($entry.data("jg.createdCaption",undefined),$caption!==null&&$caption.remove()):$caption!==null&&$caption.fadeTo(0,1)},this)),this.$gallery.css("height",""),this.$gallery.removeClass("justified-gallery"),this.$gallery.data("jg.controller",undefined),this.settings.triggerEvent.call(this,"jg.destroy")},JustifiedGallery.prototype.analyzeImages=function(isForResize){for(var i=this.lastAnalyzedIndex+1;i<this.entries.length;i++){var $entry=$(this.entries[i]);if($entry.data("jg.loaded")===!0||$entry.data("jg.loaded")==="skipped"){var availableWidth=this.galleryWidth-2*this.border-(this.buildingRow.entriesBuff.length-1)*this.settings.margins,imgAspectRatio=$entry.data("jg.width")/$entry.data("jg.height");this.buildingRow.entriesBuff.push($entry),this.buildingRow.aspectRatio+=imgAspectRatio,this.buildingRow.width+=imgAspectRatio*this.settings.rowHeight,this.lastAnalyzedIndex=i;if(availableWidth/(this.buildingRow.aspectRatio+imgAspectRatio)<this.settings.rowHeight){this.flushRow(!1,this.settings.maxRowsCount>0&&this.rows===this.settings.maxRowsCount);if(++this.yield.flushed>=this.yield.every){this.startImgAnalyzer(isForResize);return}}}else if($entry.data("jg.loaded")!=="error")return}this.buildingRow.entriesBuff.length>0&&this.flushRow(!0,this.settings.maxRowsCount>0&&this.rows===this.settings.maxRowsCount),this.isSpinnerActive()&&this.stopLoadingSpinnerAnimation(),this.stopImgAnalyzerStarter(),this.setGalleryFinalHeight(this.galleryHeightToSet),this.settings.triggerEvent.call(this,isForResize?"jg.resize":"jg.complete")},JustifiedGallery.prototype.stopImgAnalyzerStarter=function(){this.yield.flushed=0,this.imgAnalyzerTimeout!==null&&(clearTimeout(this.imgAnalyzerTimeout),this.imgAnalyzerTimeout=null)},JustifiedGallery.prototype.startImgAnalyzer=function(isForResize){var that=this;this.stopImgAnalyzerStarter(),this.imgAnalyzerTimeout=setTimeout(function(){that.analyzeImages(isForResize)},.001)},JustifiedGallery.prototype.onImageEvent=function(imageSrc,onLoad,onError){if(!onLoad&&!onError)return;var memImage=new Image,$memImage=$(memImage);onLoad&&$memImage.one("load",function(){$memImage.off("load error"),onLoad(memImage)}),onError&&$memImage.one("error",function(){$memImage.off("load error"),onError(memImage)}),memImage.src=imageSrc},JustifiedGallery.prototype.init=function(){var imagesToLoad=!1,skippedImages=!1,that=this;$.each(this.entries,function(index,entry){var $entry=$(entry),$image=that.imgFromEntry($entry);$entry.addClass("jg-entry");if($entry.data("jg.loaded")!==!0&&$entry.data("jg.loaded")!=="skipped"){that.settings.rel!==null&&$entry.attr("rel",that.settings.rel),that.settings.target!==null&&$entry.attr("target",that.settings.target);if($image!==null){var imageSrc=that.extractImgSrcFromImage($image);if(that.settings.waitThumbnailsLoad===!1||!imageSrc){var width=parseFloat($image.attr("width")),height=parseFloat($image.attr("height"));$image.prop("tagName")==="svg"&&(width=parseFloat($image[0].getBBox().width),height=parseFloat($image[0].getBBox().height));if(!isNaN(width)&&!isNaN(height))return $entry.data("jg.width",width),$entry.data("jg.height",height),$entry.data("jg.loaded","skipped"),skippedImages=!0,that.startImgAnalyzer(!1),!0}$entry.data("jg.loaded",!1),imagesToLoad=!0,that.isSpinnerActive()||that.startLoadingSpinnerAnimation(),that.onImageEvent(imageSrc,function(loadImg){$entry.data("jg.width",loadImg.width),$entry.data("jg.height",loadImg.height),$entry.data("jg.loaded",!0),that.startImgAnalyzer(!1)},function(){$entry.data("jg.loaded","error"),that.startImgAnalyzer(!1)})}else $entry.data("jg.loaded",!0),$entry.data("jg.width",$entry.width()|parseFloat($entry.css("width"))|1),$entry.data("jg.height",$entry.height()|parseFloat($entry.css("height"))|1)}}),!imagesToLoad&&!skippedImages&&this.startImgAnalyzer(!1),this.checkWidth()},JustifiedGallery.prototype.checkOrConvertNumber=function(settingContainer,settingName){$.type(settingContainer[settingName])==="string"&&(settingContainer[settingName]=parseFloat(settingContainer[settingName]));if($.type(settingContainer[settingName])!=="number")throw settingName+" must be a number";if(isNaN(settingContainer[settingName]))throw"invalid number for "+settingName},JustifiedGallery.prototype.checkSizeRangesSuffixes=function(){if($.type(this.settings.sizeRangeSuffixes)!=="object")throw"sizeRangeSuffixes must be defined and must be an object";var suffixRanges=[];for(var rangeIdx in this.settings.sizeRangeSuffixes)this.settings.sizeRangeSuffixes.hasOwnProperty(rangeIdx)&&suffixRanges.push(rangeIdx);var newSizeRngSuffixes={0:""};for(var i=0;i<suffixRanges.length;i++)if($.type(suffixRanges[i])==="string")try{var numIdx=parseInt(suffixRanges[i].replace(/^[a-z]+/,""),10);newSizeRngSuffixes[numIdx]=this.settings.sizeRangeSuffixes[suffixRanges[i]]}catch(e){throw"sizeRangeSuffixes keys must contains correct numbers ("+e+")"}else newSizeRngSuffixes[suffixRanges[i]]=this.settings.sizeRangeSuffixes[suffixRanges[i]];this.settings.sizeRangeSuffixes=newSizeRngSuffixes},JustifiedGallery.prototype.retrieveMaxRowHeight=function(){var newMaxRowHeight=null,rowHeight=this.settings.rowHeight;if($.type(this.settings.maxRowHeight)==="string")this.settings.maxRowHeight.match(/^[0-9]+%$/)?newMaxRowHeight=rowHeight*parseFloat(this.settings.maxRowHeight.match(/^([0-9]+)%$/)[1])/100:newMaxRowHeight=parseFloat(this.settings.maxRowHeight);else{if($.type(this.settings.maxRowHeight)!=="number"){if(this.settings.maxRowHeight===!1||this.settings.maxRowHeight==null)return null;throw"maxRowHeight must be a number or a percentage"}newMaxRowHeight=this.settings.maxRowHeight}if(isNaN(newMaxRowHeight))throw"invalid number for maxRowHeight";return newMaxRowHeight<rowHeight&&(newMaxRowHeight=rowHeight),newMaxRowHeight},JustifiedGallery.prototype.checkSettings=function(){this.checkSizeRangesSuffixes(),this.checkOrConvertNumber(this.settings,"rowHeight"),this.checkOrConvertNumber(this.settings,"margins"),this.checkOrConvertNumber(this.settings,"border"),this.checkOrConvertNumber(this.settings,"maxRowsCount");var lastRowModes=["justify","nojustify","left","center","right","hide"];if(lastRowModes.indexOf(this.settings.lastRow)===-1)throw"lastRow must be one of: "+lastRowModes.join(", ");this.checkOrConvertNumber(this.settings,"justifyThreshold");if(this.settings.justifyThreshold<0||this.settings.justifyThreshold>1)throw"justifyThreshold must be in the interval [0,1]";if($.type(this.settings.cssAnimation)!=="boolean")throw"cssAnimation must be a boolean";if($.type(this.settings.captions)!=="boolean")throw"captions must be a boolean";this.checkOrConvertNumber(this.settings.captionSettings,"animationDuration"),this.checkOrConvertNumber(this.settings.captionSettings,"visibleOpacity");if(this.settings.captionSettings.visibleOpacity<0||this.settings.captionSettings.visibleOpacity>1)throw"captionSettings.visibleOpacity must be in the interval [0, 1]";this.checkOrConvertNumber(this.settings.captionSettings,"nonVisibleOpacity");if(this.settings.captionSettings.nonVisibleOpacity<0||this.settings.captionSettings.nonVisibleOpacity>1)throw"captionSettings.nonVisibleOpacity must be in the interval [0, 1]";this.checkOrConvertNumber(this.settings,"imagesAnimationDuration"),this.checkOrConvertNumber(this.settings,"refreshTime"),this.checkOrConvertNumber(this.settings,"refreshSensitivity");if($.type(this.settings.randomize)!=="boolean")throw"randomize must be a boolean";if($.type(this.settings.selector)!=="string")throw"selector must be a string";if(this.settings.sort!==!1&&!$.isFunction(this.settings.sort))throw"sort must be false or a comparison function";if(this.settings.filter!==!1&&!$.isFunction(this.settings.filter)&&$.type(this.settings.filter)!=="string")throw"filter must be false, a string or a filter function"},JustifiedGallery.prototype.retrieveSuffixRanges=function(){var suffixRanges=[];for(var rangeIdx in this.settings.sizeRangeSuffixes)this.settings.sizeRangeSuffixes.hasOwnProperty(rangeIdx)&&suffixRanges.push(parseInt(rangeIdx,10));return suffixRanges.sort(function(a,b){return a>b?1:a<b?-1:0}),suffixRanges},JustifiedGallery.prototype.updateSettings=function(newSettings){this.settings=$.extend({},this.settings,newSettings),this.checkSettings(),this.border=this.settings.border>=0?this.settings.border:this.settings.margins,this.maxRowHeight=this.retrieveMaxRowHeight(),this.suffixRanges=this.retrieveSuffixRanges()},JustifiedGallery.prototype.defaults={sizeRangeSuffixes:{},thumbnailPath:undefined,rowHeight:120,maxRowHeight:!1,maxRowsCount:0,margins:1,border:-1,lastRow:"nojustify",justifyThreshold:.9,waitThumbnailsLoad:!0,captions:!0,cssAnimation:!0,imagesAnimationDuration:500,captionSettings:{animationDuration:500,visibleOpacity:.7,nonVisibleOpacity:0},rel:null,target:null,extension:/\.[^.\\/]+$/,refreshTime:200,refreshSensitivity:0,randomize:!1,rtl:!1,sort:!1,filter:!1,selector:"a",imgSelector:"> img, > a > img, > svg, > a > svg",triggerEvent:function(event){this.$gallery.trigger(event)}},$.fn.justifiedGallery=function(arg){return this.each(function(index,gallery){var $gallery=$(gallery);$gallery.addClass("justified-gallery");var controller=$gallery.data("jg.controller");if(typeof controller=="undefined"){if(typeof arg!="undefined"&&arg!==null&&$.type(arg)!=="object"){if(arg==="destroy")return;throw"The argument must be an object"}controller=new JustifiedGallery($gallery,$.extend({},JustifiedGallery.prototype.defaults,arg)),$gallery.data("jg.controller",controller)}else if(arg!=="norewind"){if(arg==="destroy"){controller.destroy();return}controller.updateSettings(arg),controller.rewind()}if(!controller.updateEntries(arg==="norewind"))return;controller.init()})}}),function(window,document,Math){function IScroll(el,options){this.wrapper=typeof el=="string"?document.querySelector(el):el,this.scroller=this.wrapper.children[0],this.scrollerStyle=this.scroller.style,this.options={resizeScrollbars:!0,mouseWheelSpeed:20,snapThreshold:.334,disablePointer:!utils.hasPointer,disableTouch:utils.hasPointer||!utils.hasTouch,disableMouse:utils.hasPointer||utils.hasTouch,startX:0,startY:0,scrollY:!0,directionLockThreshold:5,momentum:!0,bounce:!0,bounceTime:600,bounceEasing:"",preventDefault:!0,preventDefaultException:{tagName:/^(INPUT|TEXTAREA|BUTTON|SELECT|LABEL)$/},HWCompositing:!0,useTransition:!0,useTransform:!0,bindToWrapper:typeof window.onmousedown=="undefined"};for(var i in options)this.options[i]=options[i];this.translateZ=this.options.HWCompositing&&utils.hasPerspective?" translateZ(0)":"",this.options.useTransition=utils.hasTransition&&this.options.useTransition,this.options.useTransform=utils.hasTransform&&this.options.useTransform,this.options.eventPassthrough=this.options.eventPassthrough===!0?"vertical":this.options.eventPassthrough,this.options.preventDefault=!this.options.eventPassthrough&&this.options.preventDefault,this.options.scrollY=this.options.eventPassthrough=="vertical"?!1:this.options.scrollY,this.options.scrollX=this.options.eventPassthrough=="horizontal"?!1:this.options.scrollX,this.options.freeScroll=this.options.freeScroll&&!this.options.eventPassthrough,this.options.directionLockThreshold=this.options.eventPassthrough?0:this.options.directionLockThreshold,this.options.bounceEasing=typeof this.options.bounceEasing=="string"?utils.ease[this.options.bounceEasing]||utils.ease.circular:this.options.bounceEasing,this.options.resizePolling=this.options.resizePolling===undefined?60:this.options.resizePolling,this.options.tap===!0&&(this.options.tap="tap"),!this.options.useTransition&&!this.options.useTransform&&(/relative|absolute/i.test(this.scrollerStyle.position)||(this.scrollerStyle.position="relative")),this.options.shrinkScrollbars=="scale"&&(this.options.useTransition=!1),this.options.invertWheelDirection=this.options.invertWheelDirection?-1:1,this.x=0,this.y=0,this.directionX=0,this.directionY=0,this._events={},this._init(),this.refresh(),this.scrollTo(this.options.startX,this.options.startY),this.enable()}function createDefaultScrollbar(direction,interactive,type){var scrollbar=document.createElement("div"),indicator=document.createElement("div");return type===!0&&(scrollbar.style.cssText="position:absolute;z-index:9999",indicator.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:absolute;background:rgba(0,0,0,0.5);border:1px solid rgba(255,255,255,0.9);border-radius:3px"),indicator.className="iScrollIndicator",direction=="h"?(type===!0&&(scrollbar.style.cssText+=";height:7px;left:2px;right:2px;bottom:0",indicator.style.height="100%"),scrollbar.className="iScrollHorizontalScrollbar"):(type===!0&&(scrollbar.style.cssText+=";width:7px;bottom:2px;top:2px;right:1px",indicator.style.width="100%"),scrollbar.className="iScrollVerticalScrollbar"),scrollbar.style.cssText+=";overflow:hidden",interactive||(scrollbar.style.pointerEvents="none"),scrollbar.appendChild(indicator),scrollbar}function Indicator(scroller,options){this.wrapper=typeof options.el=="string"?document.querySelector(options.el):options.el,this.wrapperStyle=this.wrapper.style,this.indicator=this.wrapper.children[0],this.indicatorStyle=this.indicator.style,this.scroller=scroller,this.options={listenX:!0,listenY:!0,interactive:!1,resize:!0,defaultScrollbars:!1,shrink:!1,fade:!1,speedRatioX:0,speedRatioY:0};for(var i in options)this.options[i]=options[i];this.sizeRatioX=1,this.sizeRatioY=1,this.maxPosX=0,this.maxPosY=0,this.options.interactive&&(this.options.disableTouch||(utils.addEvent(this.indicator,"touchstart",this),utils.addEvent(window,"touchend",this)),this.options.disablePointer||(utils.addEvent(this.indicator,utils.prefixPointerEvent("pointerdown"),this),utils.addEvent(window,utils.prefixPointerEvent("pointerup"),this)),this.options.disableMouse||(utils.addEvent(this.indicator,"mousedown",this),utils.addEvent(window,"mouseup",this)));if(this.options.fade){this.wrapperStyle[utils.style.transform]=this.scroller.translateZ;var durationProp=utils.style.transitionDuration;if(!durationProp)return;this.wrapperStyle[durationProp]=utils.isBadAndroid?"0.0001ms":"0ms";var self=this;utils.isBadAndroid&&rAF(function(){self.wrapperStyle[durationProp]==="0.0001ms"&&(self.wrapperStyle[durationProp]="0s")}),this.wrapperStyle.opacity="0"}}var rAF=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(callback){window.setTimeout(callback,1e3/60)},utils=function(){function _prefixStyle(style){return _vendor===!1?!1:_vendor===""?style:_vendor+style.charAt(0).toUpperCase()+style.substr(1)}var me={},_elementStyle=document.createElement("div").style,_vendor=function(){var vendors=["t","webkitT","MozT","msT","OT"],transform,i=0,l=vendors.length;for(;i<l;i++){transform=vendors[i]+"ransform";if(transform in _elementStyle)return vendors[i].substr(0,vendors[i].length-1)}return!1}();me.getTime=Date.now||function getTime(){return(new Date).getTime()},me.extend=function(target,obj){for(var i in obj)target[i]=obj[i]},me.addEvent=function(el,type,fn,capture){el.addEventListener(type,fn,!!capture)},me.removeEvent=function(el,type,fn,capture){el.removeEventListener(type,fn,!!capture)},me.prefixPointerEvent=function(pointerEvent){return window.MSPointerEvent?"MSPointer"+pointerEvent.charAt(7).toUpperCase()+pointerEvent.substr(8):pointerEvent},me.momentum=function(current,start,time,lowerMargin,wrapperSize,deceleration){var distance=current-start,speed=Math.abs(distance)/time,destination,duration;return deceleration=deceleration===undefined?6e-4:deceleration,destination=current+speed*speed/(2*deceleration)*(distance<0?-1:1),duration=speed/deceleration,destination<lowerMargin?(destination=wrapperSize?lowerMargin-wrapperSize/2.5*(speed/8):lowerMargin,distance=Math.abs(destination-current),duration=distance/speed):destination>0&&(destination=wrapperSize?wrapperSize/2.5*(speed/8):0,distance=Math.abs(current)+destination,duration=distance/speed),{destination:Math.round(destination),duration:duration}};var _transform=_prefixStyle("transform");return me.extend(me,{hasTransform:_transform!==!1,hasPerspective:_prefixStyle("perspective")in _elementStyle,hasTouch:"ontouchstart"in window,hasPointer:!!window.PointerEvent||!!window.MSPointerEvent,hasTransition:_prefixStyle("transition")in _elementStyle}),me.isBadAndroid=function(){var appVersion=window.navigator.appVersion;if(/Android/.test(appVersion)&&!/Chrome\/\d/.test(appVersion)){var safariVersion=appVersion.match(/Safari\/(\d+.\d)/);return safariVersion&&typeof safariVersion=="object"&&safariVersion.length>=2?parseFloat(safariVersion[1])<535.19:!0}return!1}(),me.extend(me.style={},{transform:_transform,transitionTimingFunction:_prefixStyle("transitionTimingFunction"),transitionDuration:_prefixStyle("transitionDuration"),transitionDelay:_prefixStyle("transitionDelay"),transformOrigin:_prefixStyle("transformOrigin")}),me.hasClass=function(e,c){var re=new RegExp("(^|\\s)"+c+"(\\s|$)");return re.test(e.className)},me.addClass=function(e,c){if(me.hasClass(e,c))return;var newclass=e.className.split(" ");newclass.push(c),e.className=newclass.join(" ")},me.removeClass=function(e,c){if(!me.hasClass(e,c))return;var re=new RegExp("(^|\\s)"+c+"(\\s|$)","g");e.className=e.className.replace(re," ")},me.offset=function(el){var left=-el.offsetLeft,top=-el.offsetTop;while(el=el.offsetParent)left-=el.offsetLeft,top-=el.offsetTop;return{left:left,top:top}},me.preventDefaultException=function(el,exceptions){for(var i in exceptions)if(exceptions[i].test(el[i]))return!0;return!1},me.extend(me.eventType={},{touchstart:1,touchmove:1,touchend:1,mousedown:2,mousemove:2,mouseup:2,pointerdown:3,pointermove:3,pointerup:3,MSPointerDown:3,MSPointerMove:3,MSPointerUp:3}),me.extend(me.ease={},{quadratic:{style:"cubic-bezier(0.25, 0.46, 0.45, 0.94)",fn:function(k){return k*(2-k)}},circular:{style:"cubic-bezier(0.1, 0.57, 0.1, 1)",fn:function(k){return Math.sqrt(1- --k*k)}},back:{style:"cubic-bezier(0.175, 0.885, 0.32, 1.275)",fn:function(k){var b=4;return(k-=1)*k*((b+1)*k+b)+1}},bounce:{style:"",fn:function(k){return(k/=1)<1/2.75?7.5625*k*k:k<2/2.75?7.5625*(k-=1.5/2.75)*k+.75:k<2.5/2.75?7.5625*(k-=2.25/2.75)*k+.9375:7.5625*(k-=2.625/2.75)*k+.984375}},elastic:{style:"",fn:function(k){var f=.22,e=.4;return k===0?0:k==1?1:e*Math.pow(2,-10*k)*Math.sin((k-f/4)*2*Math.PI/f)+1}}}),me.tap=function(e,eventName){var ev=document.createEvent("Event");ev.initEvent(eventName,!0,!0),ev.pageX=e.pageX,ev.pageY=e.pageY,e.target.dispatchEvent(ev)},me.click=function(e){var target=e.target,ev;/(SELECT|INPUT|TEXTAREA)/i.test(target.tagName)||(ev=document.createEvent(window.MouseEvent?"MouseEvents":"Event"),ev.initEvent("click",!0,!0),ev.view=e.view||window,ev.detail=1,ev.screenX=target.screenX||0,ev.screenY=target.screenY||0,ev.clientX=target.clientX||0,ev.clientY=target.clientY||0,ev.ctrlKey=!!e.ctrlKey,ev.altKey=!!e.altKey,ev.shiftKey=!!e.shiftKey,ev.metaKey=!!e.metaKey,ev.button=0,ev.relatedTarget=null,ev._constructed=!0,target.dispatchEvent(ev))},me}();IScroll.prototype={version:"5.2.0",_init:function(){this._initEvents(),(this.options.scrollbars||this.options.indicators)&&this._initIndicators(),this.options.mouseWheel&&this._initWheel(),this.options.snap&&this._initSnap(),this.options.keyBindings&&this._initKeys()},destroy:function(){this._initEvents(!0),clearTimeout(this.resizeTimeout),this.resizeTimeout=null,this._execEvent("destroy")},_transitionEnd:function(e){if(e.target!=this.scroller||!this.isInTransition)return;this._transitionTime(),this.resetPosition(this.options.bounceTime)||(this.isInTransition=!1,this._execEvent("scrollEnd"))},_start:function(e){if(utils.eventType[e.type]!=1){var button;e.which?button=e.button:button=e.button<2?0:e.button==4?1:2;if(button!==0)return}if(!this.enabled||this.initiated&&utils.eventType[e.type]!==this.initiated)return;this.options.preventDefault&&!utils.isBadAndroid&&!utils.preventDefaultException(e.target,this.options.preventDefaultException)&&e.preventDefault();var point=e.touches?e.touches[0]:e,pos;this.initiated=utils.eventType[e.type],this.moved=!1,this.distX=0,this.distY=0,this.directionX=0,this.directionY=0,this.directionLocked=0,this.startTime=utils.getTime(),this.options.useTransition&&this.isInTransition?(this._transitionTime(),this.isInTransition=!1,pos=this.getComputedPosition(),this._translate(Math.round(pos.x),Math.round(pos.y)),this._execEvent("scrollEnd")):!this.options.useTransition&&this.isAnimating&&(this.isAnimating=!1,this._execEvent("scrollEnd")),this.startX=this.x,this.startY=this.y,this.absStartX=this.x,this.absStartY=this.y,this.pointX=point.pageX,this.pointY=point.pageY,this._execEvent("beforeScrollStart")},_move:function(e){if(!this.enabled||utils.eventType[e.type]!==this.initiated)return;this.options.preventDefault&&e.preventDefault();var point=e.touches?e.touches[0]:e,deltaX=point.pageX-this.pointX,deltaY=point.pageY-this.pointY,timestamp=utils.getTime(),newX,newY,absDistX,absDistY;this.pointX=point.pageX,this.pointY=point.pageY,this.distX+=deltaX,this.distY+=deltaY,absDistX=Math.abs(this.distX),absDistY=Math.abs(this.distY);if(timestamp-this.endTime>300&&absDistX<10&&absDistY<10)return;!this.directionLocked&&!this.options.freeScroll&&(absDistX>absDistY+this.options.directionLockThreshold?this.directionLocked="h":absDistY>=absDistX+this.options.directionLockThreshold?this.directionLocked="v":this.directionLocked="n");if(this.directionLocked=="h"){if(this.options.eventPassthrough=="vertical")e.preventDefault();else if(this.options.eventPassthrough=="horizontal"){this.initiated=!1;return}deltaY=0}else if(this.directionLocked=="v"){if(this.options.eventPassthrough=="horizontal")e.preventDefault();else if(this.options.eventPassthrough=="vertical"){this.initiated=!1;return}deltaX=0}deltaX=this.hasHorizontalScroll?deltaX:0,deltaY=this.hasVerticalScroll?deltaY:0,newX=this.x+deltaX,newY=this.y+deltaY;if(newX>0||newX<this.maxScrollX)newX=this.options.bounce?this.x+deltaX/3:newX>0?0:this.maxScrollX;if(newY>0||newY<this.maxScrollY)newY=this.options.bounce?this.y+deltaY/3:newY>0?0:this.maxScrollY;this.directionX=deltaX>0?-1:deltaX<0?1:0,this.directionY=deltaY>0?-1:deltaY<0?1:0,this.moved||this._execEvent("scrollStart"),this.moved=!0,this._translate(newX,newY),timestamp-this.startTime>300&&(this.startTime=timestamp,this.startX=this.x,this.startY=this.y)},_end:function(e){if(!this.enabled||utils.eventType[e.type]!==this.initiated)return;this.options.preventDefault&&!utils.preventDefaultException(e.target,this.options.preventDefaultException)&&e.preventDefault();var point=e.changedTouches?e.changedTouches[0]:e,momentumX,momentumY,duration=utils.getTime()-this.startTime,newX=Math.round(this.x),newY=Math.round(this.y),distanceX=Math.abs(newX-this.startX),distanceY=Math.abs(newY-this.startY),time=0,easing="";this.isInTransition=0,this.initiated=0,this.endTime=utils.getTime();if(this.resetPosition(this.options.bounceTime))return;this.scrollTo(newX,newY);if(!this.moved){this.options.tap&&utils.tap(e,this.options.tap),this.options.click&&utils.click(e),this._execEvent("scrollCancel");return}if(this._events.flick&&duration<200&&distanceX<100&&distanceY<100){this._execEvent("flick");return}this.options.momentum&&duration<300&&(momentumX=this.hasHorizontalScroll?utils.momentum(this.x,this.startX,duration,this.maxScrollX,this.options.bounce?this.wrapperWidth:0,this.options.deceleration):{destination:newX,duration:0},momentumY=this.hasVerticalScroll?utils.momentum(this.y,this.startY,duration,this.maxScrollY,this.options.bounce?this.wrapperHeight:0,this.options.deceleration):{destination:newY,duration:0},newX=momentumX.destination,newY=momentumY.destination,time=Math.max(momentumX.duration,momentumY.duration),this.isInTransition=1);if(this.options.snap){var snap=this._nearestSnap(newX,newY);this.currentPage=snap,time=this.options.snapSpeed||Math.max(Math.max(Math.min(Math.abs(newX-snap.x),1e3),Math.min(Math.abs(newY-snap.y),1e3)),300),newX=snap.x,newY=snap.y,this.directionX=0,this.directionY=0,easing=this.options.bounceEasing}if(newX!=this.x||newY!=this.y){if(newX>0||newX<this.maxScrollX||newY>0||newY<this.maxScrollY)easing=utils.ease.quadratic;this.scrollTo(newX,newY,time,easing);return}this._execEvent("scrollEnd")},_resize:function(){var that=this;clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(function(){that.refresh()},this.options.resizePolling)},resetPosition:function(time){var x=this.x,y=this.y;return time=time||0,!this.hasHorizontalScroll||this.x>0?x=0:this.x<this.maxScrollX&&(x=this.maxScrollX),!this.hasVerticalScroll||this.y>0?y=0:this.y<this.maxScrollY&&(y=this.maxScrollY),x==this.x&&y==this.y?!1:(this.scrollTo(x,y,time,this.options.bounceEasing),!0)},disable:function(){this.enabled=!1},enable:function(){this.enabled=!0},refresh:function(){var rf=this.wrapper.offsetHeight;this.wrapperWidth=this.wrapper.clientWidth,this.wrapperHeight=this.wrapper.clientHeight,this.scrollerWidth=this.scroller.offsetWidth,this.scrollerHeight=this.scroller.offsetHeight,this.maxScrollX=this.wrapperWidth-this.scrollerWidth,this.maxScrollY=this.wrapperHeight-this.scrollerHeight,this.hasHorizontalScroll=this.options.scrollX&&this.maxScrollX<0,this.hasVerticalScroll=this.options.scrollY&&this.maxScrollY<0,this.hasHorizontalScroll||(this.maxScrollX=0,this.scrollerWidth=this.wrapperWidth),this.hasVerticalScroll||(this.maxScrollY=0,this.scrollerHeight=this.wrapperHeight),this.endTime=0,this.directionX=0,this.directionY=0,this.wrapperOffset=utils.offset(this.wrapper),this._execEvent("refresh"),this.resetPosition()},on:function(type,fn){this._events[type]||(this._events[type]=[]),this._events[type].push(fn)},off:function(type,fn){if(!this._events[type])return;var index=this._events[type].indexOf(fn);index>-1&&this._events[type].splice(index,1)},_execEvent:function(type){if(!this._events[type])return;var i=0,l=this._events[type].length;if(!l)return;for(;i<l;i++)this._events[type][i].apply(this,[].slice.call(arguments,1))},scrollBy:function(x,y,time,easing){x=this.x+x,y=this.y+y,time=time||0,this.scrollTo(x,y,time,easing)},scrollTo:function(x,y,time,easing){easing=easing||utils.ease.circular,this.isInTransition=this.options.useTransition&&time>0;var transitionType=this.options.useTransition&&easing.style;!time||transitionType?(transitionType&&(this._transitionTimingFunction(easing.style),this._transitionTime(time)),this._translate(x,y)):this._animate(x,y,time,easing.fn)},scrollToElement:function(el,time,offsetX,offsetY,easing){el=el.nodeType?el:this.scroller.querySelector(el);if(!el)return;var pos=utils.offset(el);pos.left-=this.wrapperOffset.left,pos.top-=this.wrapperOffset.top,offsetX===!0&&(offsetX=Math.round(el.offsetWidth/2-this.wrapper.offsetWidth/2)),offsetY===!0&&(offsetY=Math.round(el.offsetHeight/2-this.wrapper.offsetHeight/2)),pos.left-=offsetX||0,pos.top-=offsetY||0,pos.left=pos.left>0?0:pos.left<this.maxScrollX?this.maxScrollX:pos.left,pos.top=pos.top>0?0:pos.top<this.maxScrollY?this.maxScrollY:pos.top,time=time===undefined||time===null||time==="auto"?Math.max(Math.abs(this.x-pos.left),Math.abs(this.y-pos.top)):time,this.scrollTo(pos.left,pos.top,time,easing)},_transitionTime:function(time){if(!this.options.useTransition)return;time=time||0;var durationProp=utils.style.transitionDuration;if(!durationProp)return;this.scrollerStyle[durationProp]=time+"ms";if(!time&&utils.isBadAndroid){this.scrollerStyle[durationProp]="0.0001ms";var self=this;rAF(function(){self.scrollerStyle[durationProp]==="0.0001ms"&&(self.scrollerStyle[durationProp]="0s")})}if(this.indicators)for(var i=this.indicators.length;i--;)this.indicators[i].transitionTime(time)},_transitionTimingFunction:function(easing){this.scrollerStyle[utils.style.transitionTimingFunction]=easing;if(this.indicators)for(var i=this.indicators.length;i--;)this.indicators[i].transitionTimingFunction(easing)},_translate:function(x,y){if((" "+this.wrapper.className+" ").replace(/[\n\t]/g," ").indexOf(" no-scrolloverflow ")>-1)return!1;this.options.useTransform?this.scrollerStyle[utils.style.transform]="translate("+x+"px,"+y+"px)"+this.translateZ:(x=Math.round(x),y=Math.round(y),this.scrollerStyle.left=x+"px",this.scrollerStyle.top=y+"px"),this.x=x,this.y=y;if(this.indicators)for(var i=this.indicators.length;i--;)this.indicators[i].updatePosition();var uncodevent=new CustomEvent("fp-slide-scroll");window.dispatchEvent(uncodevent)},_initEvents:function(remove){var eventType=remove?utils.removeEvent:utils.addEvent,target=this.options.bindToWrapper?this.wrapper:window;eventType(window,"orientationchange",this),eventType(window,"resize",this),this.options.click&&eventType(this.wrapper,"click",this,!0),this.options.disableMouse||(eventType(this.wrapper,"mousedown",this),eventType(target,"mousemove",this),eventType(target,"mousecancel",this),eventType(target,"mouseup",this)),utils.hasPointer&&!this.options.disablePointer&&(eventType(this.wrapper,utils.prefixPointerEvent("pointerdown"),this),eventType(target,utils.prefixPointerEvent("pointermove"),this),eventType(target,utils.prefixPointerEvent("pointercancel"),this),eventType(target,utils.prefixPointerEvent("pointerup"),this)),utils.hasTouch&&!this.options.disableTouch&&(eventType(this.wrapper,"touchstart",this),eventType(target,"touchmove",this),eventType(target,"touchcancel",this),eventType(target,"touchend",this)),eventType(this.scroller,"transitionend",this),eventType(this.scroller,"webkitTransitionEnd",this),eventType(this.scroller,"oTransitionEnd",this),eventType(this.scroller,"MSTransitionEnd",this)},getComputedPosition:function(){var matrix=window.getComputedStyle(this.scroller,null),x,y;return this.options.useTransform?(matrix=matrix[utils.style.transform].split(")")[0].split(", "),x=+(matrix[12]||matrix[4]),y=+(matrix[13]||matrix[5])):(x=+matrix.left.replace(/[^-\d.]/g,""),y=+matrix.top.replace(/[^-\d.]/g,"")),{x:x,y:y}},_initIndicators:function(){function _indicatorsMap(fn){if(that.indicators)for(var i=that.indicators.length;i--;)fn.call(that.indicators[i])}var interactive=this.options.interactiveScrollbars,customStyle=typeof this.options.scrollbars!="string",indicators=[],indicator,that=this;this.indicators=[],this.options.scrollbars&&(this.options.scrollY&&(indicator={el:createDefaultScrollbar("v",interactive,this.options.scrollbars),interactive:interactive,defaultScrollbars:!0,customStyle:customStyle,resize:this.options.resizeScrollbars,shrink:this.options.shrinkScrollbars,fade:this.options.fadeScrollbars,listenX:!1},this.wrapper.appendChild(indicator.el),indicators.push(indicator)),this.options.scrollX&&(indicator={el:createDefaultScrollbar("h",interactive,this.options.scrollbars),interactive:interactive,defaultScrollbars:!0,customStyle:customStyle,resize:this.options.resizeScrollbars,shrink:this.options.shrinkScrollbars,fade:this.options.fadeScrollbars,listenY:!1},this.wrapper.appendChild(indicator.el),indicators.push(indicator))),this.options.indicators&&(indicators=indicators.concat(this.options.indicators));for(var i=indicators.length;i--;)this.indicators.push(new Indicator(this,indicators[i]));this.options.fadeScrollbars&&(this.on("scrollEnd",function(){_indicatorsMap(function(){this.fade()})}),this.on("scrollCancel",function(){_indicatorsMap(function(){this.fade()})}),this.on("scrollStart",function(){_indicatorsMap(function(){this.fade(1)})}),this.on("beforeScrollStart",function(){_indicatorsMap(function(){this.fade(1,!0)})})),this.on("refresh",function(){_indicatorsMap(function(){this.refresh()})}),this.on("destroy",function(){_indicatorsMap(function(){this.destroy()}),delete this.indicators})},_initWheel:function(){utils.addEvent(this.wrapper,"wheel",this),utils.addEvent(this.wrapper,"mousewheel",this),utils.addEvent(this.wrapper,"DOMMouseScroll",this),this.on("destroy",function(){clearTimeout(this.wheelTimeout),this.wheelTimeout=null,utils.removeEvent(this.wrapper,"wheel",this),utils.removeEvent(this.wrapper,"mousewheel",this),utils.removeEvent(this.wrapper,"DOMMouseScroll",this)})},_wheel:function(e){if(!this.enabled)return;var wheelDeltaX,wheelDeltaY,newX,newY,that=this;this.wheelTimeout===undefined&&that._execEvent("scrollStart"),clearTimeout(this.wheelTimeout),this.wheelTimeout=setTimeout(function(){that.options.snap||that._execEvent("scrollEnd"),that.wheelTimeout=undefined},400);if("deltaX"in e)e.deltaMode===1?(wheelDeltaX=-e.deltaX*this.options.mouseWheelSpeed,wheelDeltaY=-e.deltaY*this.options.mouseWheelSpeed):(wheelDeltaX=-e.deltaX,wheelDeltaY=-e.deltaY);else if("wheelDeltaX"in e)wheelDeltaX=e.wheelDeltaX/120*this.options.mouseWheelSpeed,wheelDeltaY=e.wheelDeltaY/120*this.options.mouseWheelSpeed;else if("wheelDelta"in e)wheelDeltaX=wheelDeltaY=e.wheelDelta/120*this.options.mouseWheelSpeed;else{if(!("detail"in e))return;wheelDeltaX=wheelDeltaY=-e.detail/3*this.options.mouseWheelSpeed}wheelDeltaX*=this.options.invertWheelDirection,wheelDeltaY*=this.options.invertWheelDirection,this.hasVerticalScroll||(wheelDeltaX=wheelDeltaY,wheelDeltaY=0);if(this.options.snap){newX=this.currentPage.pageX,newY=this.currentPage.pageY,wheelDeltaX>0?newX--:wheelDeltaX<0&&newX++,wheelDeltaY>0?newY--:wheelDeltaY<0&&newY++,this.goToPage(newX,newY);return}newX=this.x+Math.round(this.hasHorizontalScroll?wheelDeltaX:0),newY=this.y+Math.round(this.hasVerticalScroll?wheelDeltaY:0),this.directionX=wheelDeltaX>0?-1:wheelDeltaX<0?1:0,this.directionY=wheelDeltaY>0?-1:wheelDeltaY<0?1:0,newX>0?newX=0:newX<this.maxScrollX&&(newX=this.maxScrollX),newY>0?newY=0:newY<this.maxScrollY&&(newY=this.maxScrollY),this.scrollTo(newX,newY,0)},_initSnap:function(){this.currentPage={},typeof this.options.snap=="string"&&(this.options.snap=this.scroller.querySelectorAll(this.options.snap)),this.on("refresh",function(){var i=0,l,m=0,n,cx,cy,x=0,y,stepX=this.options.snapStepX||this.wrapperWidth,stepY=this.options.snapStepY||this.wrapperHeight,el;this.pages=[];if(!this.wrapperWidth||!this.wrapperHeight||!this.scrollerWidth||!this.scrollerHeight)return;if(this.options.snap===!0){cx=Math.round(stepX/2),cy=Math.round(stepY/2);while(x>-this.scrollerWidth){this.pages[i]=[],l=0,y=0;while(y>-this.scrollerHeight)this.pages[i][l]={x:Math.max(x,this.maxScrollX),y:Math.max(y,this.maxScrollY),width:stepX,height:stepY,cx:x-cx,cy:y-cy},y-=stepY,l++;x-=stepX,i++}}else{el=this.options.snap,l=el.length,n=-1;for(;i<l;i++){if(i===0||el[i].offsetLeft<=el[i-1].offsetLeft)m=0,n++;this.pages[m]||(this.pages[m]=[]),x=Math.max(-el[i].offsetLeft,this.maxScrollX),y=Math.max(-el[i].offsetTop,this.maxScrollY),cx=x-Math.round(el[i].offsetWidth/2),cy=y-Math.round(el[i].offsetHeight/2),this.pages[m][n]={x:x,y:y,width:el[i].offsetWidth,height:el[i].offsetHeight,cx:cx,cy:cy},x>this.maxScrollX&&m++}}this.goToPage(this.currentPage.pageX||0,this.currentPage.pageY||0,0),this.options.snapThreshold%1===0?(this.snapThresholdX=this.options.snapThreshold,this.snapThresholdY=this.options.snapThreshold):(this.snapThresholdX=Math.round(this.pages[this.currentPage.pageX][this.currentPage.pageY].width*this.options.snapThreshold),this.snapThresholdY=Math.round(this.pages[this.currentPage.pageX][this.currentPage.pageY].height*this.options.snapThreshold))}),this.on("flick",function(){var time=this.options.snapSpeed||Math.max(Math.max(Math.min(Math.abs(this.x-this.startX),1e3),Math.min(Math.abs(this.y-this.startY),1e3)),300);this.goToPage(this.currentPage.pageX+this.directionX,this.currentPage.pageY+this.directionY,time)})},_nearestSnap:function(x,y){if(!this.pages.length)return{x:0,y:0,pageX:0,pageY:0};var i=0,l=this.pages.length,m=0;if(Math.abs(x-this.absStartX)<this.snapThresholdX&&Math.abs(y-this.absStartY)<this.snapThresholdY)return this.currentPage;x>0?x=0:x<this.maxScrollX&&(x=this.maxScrollX),y>0?y=0:y<this.maxScrollY&&(y=this.maxScrollY);for(;i<l;i++)if(x>=this.pages[i][0].cx){x=this.pages[i][0].x;break}l=this.pages[i].length;for(;m<l;m++)if(y>=this.pages[0][m].cy){y=this.pages[0][m].y;break}return i==this.currentPage.pageX&&(i+=this.directionX,i<0?i=0:i>=this.pages.length&&(i=this.pages.length-1),x=this.pages[i][0].x),m==this.currentPage.pageY&&(m+=this.directionY,m<0?m=0:m>=this.pages[0].length&&(m=this.pages[0].length-1),y=this.pages[0][m].y),{x:x,y:y,pageX:i,pageY:m}},goToPage:function(x,y,time,easing){easing=easing||this.options.bounceEasing,x>=this.pages.length?x=this.pages.length-1:x<0&&(x=0),y>=this.pages[x].length?y=this.pages[x].length-1:y<0&&(y=0);var posX=this.pages[x][y].x,posY=this.pages[x][y].y;time=time===undefined?this.options.snapSpeed||Math.max(Math.max(Math.min(Math.abs(posX-this.x),1e3),Math.min(Math.abs(posY-this.y),1e3)),300):time,this.currentPage={x:posX,y:posY,pageX:x,pageY:y},this.scrollTo(posX,posY,time,easing)},next:function(time,easing){var x=this.currentPage.pageX,y=this.currentPage.pageY;x++,x>=this.pages.length&&this.hasVerticalScroll&&(x=0,y++),this.goToPage(x,y,time,easing)},prev:function(time,easing){var x=this.currentPage.pageX,y=this.currentPage.pageY;x--,x<0&&this.hasVerticalScroll&&(x=0,y--),this.goToPage(x,y,time,easing)},_initKeys:function(e){var keys={pageUp:33,pageDown:34,end:35,home:36,left:37,up:38,right:39,down:40},i;if(typeof this.options.keyBindings=="object")for(i in this.options.keyBindings)typeof this.options.keyBindings[i]=="string"&&(this.options.keyBindings[i]=this.options.keyBindings[i].toUpperCase().charCodeAt(0));else this.options.keyBindings={};for(i in keys)this.options.keyBindings[i]=this.options.keyBindings[i]||keys[i];utils.addEvent(window,"keydown",this),this.on("destroy",function(){utils.removeEvent(window,"keydown",this)})},_key:function(e){if(!this.enabled)return;var snap=this.options.snap,newX=snap?this.currentPage.pageX:this.x,newY=snap?this.currentPage.pageY:this.y,now=utils.getTime(),prevTime=this.keyTime||0,acceleration=.25,pos;this.options.useTransition&&this.isInTransition&&(pos=this.getComputedPosition(),this._translate(Math.round(pos.x),Math.round(pos.y)),this.isInTransition=!1),this.keyAcceleration=now-prevTime<200?Math.min(this.keyAcceleration+acceleration,50):0;switch(e.keyCode){case this.options.keyBindings.pageUp:this.hasHorizontalScroll&&!this.hasVerticalScroll?newX+=snap?1:this.wrapperWidth:newY+=snap?1:this.wrapperHeight;break;case this.options.keyBindings.pageDown:this.hasHorizontalScroll&&!this.hasVerticalScroll?newX-=snap?1:this.wrapperWidth:newY-=snap?1:this.wrapperHeight;break;case this.options.keyBindings.end:newX=snap?this.pages.length-1:this.maxScrollX,newY=snap?this.pages[0].length-1:this.maxScrollY;break;case this.options.keyBindings.home:newX=0,newY=0;break;case this.options.keyBindings.left:newX+=snap?-1:5+this.keyAcceleration>>0;break;case this.options.keyBindings.up:newY+=snap?1:5+this.keyAcceleration>>0;break;case this.options.keyBindings.right:newX-=snap?-1:5+this.keyAcceleration>>0;break;case this.options.keyBindings.down:newY-=snap?1:5+this.keyAcceleration>>0;break;default:return}if(snap){this.goToPage(newX,newY);return}newX>0?(newX=0,this.keyAcceleration=0):newX<this.maxScrollX&&(newX=this.maxScrollX,this.keyAcceleration=0),newY>0?(newY=0,this.keyAcceleration=0):newY<this.maxScrollY&&(newY=this.maxScrollY,this.keyAcceleration=0),this.scrollTo(newX,newY,0),this.keyTime=now},_animate:function(destX,destY,duration,easingFn){function step(){var now=utils.getTime(),newX,newY,easing;if(now>=destTime){that.isAnimating=!1,that._translate(destX,destY),that.resetPosition(that.options.bounceTime)||that._execEvent("scrollEnd");return}now=(now-startTime)/duration,easing=easingFn(now),newX=(destX-startX)*easing+startX,newY=(destY-startY)*easing+startY,that._translate(newX,newY),that.isAnimating&&rAF(step)}var that=this,startX=this.x,startY=this.y,startTime=utils.getTime(),destTime=startTime+duration;this.isAnimating=!0,step()},handleEvent:function(e){switch(e.type){case"touchstart":case"pointerdown":case"MSPointerDown":case"mousedown":this._start(e);break;case"touchmove":case"pointermove":case"MSPointerMove":case"mousemove":this._move(e);break;case"touchend":case"pointerup":case"MSPointerUp":case"mouseup":case"touchcancel":case"pointercancel":case"MSPointerCancel":case"mousecancel":this._end(e);break;case"orientationchange":case"resize":this._resize();break;case"transitionend":case"webkitTransitionEnd":case"oTransitionEnd":case"MSTransitionEnd":this._transitionEnd(e);break;case"wheel":case"DOMMouseScroll":case"mousewheel":this._wheel(e);break;case"keydown":this._key(e);break;case"click":this.enabled&&!e._constructed&&(e.preventDefault(),e.stopPropagation())}}},Indicator.prototype={handleEvent:function(e){switch(e.type){case"touchstart":case"pointerdown":case"MSPointerDown":case"mousedown":this._start(e);break;case"touchmove":case"pointermove":case"MSPointerMove":case"mousemove":this._move(e);break;case"touchend":case"pointerup":case"MSPointerUp":case"mouseup":case"touchcancel":case"pointercancel":case"MSPointerCancel":case"mousecancel":this._end(e)}},destroy:function(){this.options.fadeScrollbars&&(clearTimeout(this.fadeTimeout),this.fadeTimeout=null),this.options.interactive&&(utils.removeEvent(this.indicator,"touchstart",this),utils.removeEvent(this.indicator,utils.prefixPointerEvent("pointerdown"),this),utils.removeEvent(this.indicator,"mousedown",this),utils.removeEvent(window,"touchmove",this),utils.removeEvent(window,utils.prefixPointerEvent("pointermove"),this),utils.removeEvent(window,"mousemove",this),utils.removeEvent(window,"touchend",this),utils.removeEvent(window,utils.prefixPointerEvent("pointerup"),this),utils.removeEvent(window,"mouseup",this)),this.options.defaultScrollbars&&this.wrapper.parentNode.removeChild(this.wrapper)},_start:function(e){var point=e.touches?e.touches[0]:e;e.preventDefault(),e.stopPropagation(),this.transitionTime(),this.initiated=!0,this.moved=!1,this.lastPointX=point.pageX,this.lastPointY=point.pageY,this.startTime=utils.getTime(),this.options.disableTouch||utils.addEvent(window,"touchmove",this),this.options.disablePointer||utils.addEvent(window,utils.prefixPointerEvent("pointermove"),this),this.options.disableMouse||utils.addEvent(window,"mousemove",this),this.scroller._execEvent("beforeScrollStart")},_move:function(e){var point=e.touches?e.touches[0]:e,deltaX,deltaY,newX,newY,timestamp=utils.getTime();this.moved||this.scroller._execEvent("scrollStart"),this.moved=!0,deltaX=point.pageX-this.lastPointX,this.lastPointX=point.pageX,deltaY=point.pageY-this.lastPointY,this.lastPointY=point.pageY,newX=this.x+deltaX,newY=this.y+deltaY,this._pos(newX,newY),e.preventDefault(),e.stopPropagation()},_end:function(e){if(!this.initiated)return;this.initiated=!1,e.preventDefault(),e.stopPropagation(),utils.removeEvent(window,"touchmove",this),utils.removeEvent(window,utils.prefixPointerEvent("pointermove"),this),utils.removeEvent(window,"mousemove",this);if(this.scroller.options.snap){var snap=this.scroller._nearestSnap(this.scroller.x,this.scroller.y),time=this.options.snapSpeed||Math.max(Math.max(Math.min(Math.abs(this.scroller.x-snap.x),1e3),Math.min(Math.abs(this.scroller.y-snap.y),1e3)),300);if(this.scroller.x!=snap.x||this.scroller.y!=snap.y)this.scroller.directionX=0,this.scroller.directionY=0,this.scroller.currentPage=snap,this.scroller.scrollTo(snap.x,snap.y,time,this.scroller.options.bounceEasing)}this.moved&&this.scroller._execEvent("scrollEnd")},transitionTime:function(time){time=time||0;var durationProp=utils.style.transitionDuration;if(!durationProp)return;this.indicatorStyle[durationProp]=time+"ms";if(!time&&utils.isBadAndroid){this.indicatorStyle[durationProp]="0.0001ms";var self=this;rAF(function(){self.indicatorStyle[durationProp]==="0.0001ms"&&(self.indicatorStyle[durationProp]="0s")})}},transitionTimingFunction:function(easing){this.indicatorStyle[utils.style.transitionTimingFunction]=easing},refresh:function(){this.transitionTime(),this.options.listenX&&!this.options.listenY?this.indicatorStyle.display=this.scroller.hasHorizontalScroll?"block":"none":this.options.listenY&&!this.options.listenX?this.indicatorStyle.display=this.scroller.hasVerticalScroll?"block":"none":this.indicatorStyle.display=this.scroller.hasHorizontalScroll||this.scroller.hasVerticalScroll?"block":"none",this.scroller.hasHorizontalScroll&&this.scroller.hasVerticalScroll?(utils.addClass(this.wrapper,"iScrollBothScrollbars"),utils.removeClass(this.wrapper,"iScrollLoneScrollbar"),this.options.defaultScrollbars&&this.options.customStyle&&(this.options.listenX?this.wrapper.style.right="8px":this.wrapper.style.bottom="8px")):(utils.removeClass(this.wrapper,"iScrollBothScrollbars"),utils.addClass(this.wrapper,"iScrollLoneScrollbar"),this.options.defaultScrollbars&&this.options.customStyle&&(this.options.listenX?this.wrapper.style.right="2px":this.wrapper.style.bottom="2px"));var r=this.wrapper.offsetHeight;this.options.listenX&&(this.wrapperWidth=this.wrapper.clientWidth,this.options.resize?(this.indicatorWidth=Math.max(Math.round(this.wrapperWidth*this.wrapperWidth/(this.scroller.scrollerWidth||this.wrapperWidth||1)),8),this.indicatorStyle.width=this.indicatorWidth+"px"):this.indicatorWidth=this.indicator.clientWidth,this.maxPosX=this.wrapperWidth-this.indicatorWidth,this.options.shrink=="clip"?(this.minBoundaryX=-this.indicatorWidth+8,this.maxBoundaryX=this.wrapperWidth-8):(this.minBoundaryX=0,this.maxBoundaryX=this.maxPosX),this.sizeRatioX=this.options.speedRatioX||this.scroller.maxScrollX&&this.maxPosX/this.scroller.maxScrollX),this.options.listenY&&(this.wrapperHeight=this.wrapper.clientHeight,this.options.resize?(this.indicatorHeight=Math.max(Math.round(this.wrapperHeight*this.wrapperHeight/(this.scroller.scrollerHeight||this.wrapperHeight||1)),8),this.indicatorStyle.height=this.indicatorHeight+"px"):this.indicatorHeight=this.indicator.clientHeight,this.maxPosY=this.wrapperHeight-this.indicatorHeight,this.options.shrink=="clip"?(this.minBoundaryY=-this.indicatorHeight+8,this.maxBoundaryY=this.wrapperHeight-8):(this.minBoundaryY=0,this.maxBoundaryY=this.maxPosY),this.maxPosY=this.wrapperHeight-this.indicatorHeight,this.sizeRatioY=this.options.speedRatioY||this.scroller.maxScrollY&&this.maxPosY/this.scroller.maxScrollY),this.updatePosition()},updatePosition:function(){var x=this.options.listenX&&Math.round(this.sizeRatioX*this.scroller.x)||0,y=this.options.listenY&&Math.round(this.sizeRatioY*this.scroller.y)||0;this.options.ignoreBoundaries||(x<this.minBoundaryX?(this.options.shrink=="scale"&&(this.width=Math.max(this.indicatorWidth+x,8),this.indicatorStyle.width=this.width+"px"),x=this.minBoundaryX):x>this.maxBoundaryX?this.options.shrink=="scale"?(this.width=Math.max(this.indicatorWidth-(x-this.maxPosX),8),this.indicatorStyle.width=this.width+"px",x=this.maxPosX+this.indicatorWidth-this.width):x=this.maxBoundaryX:this.options.shrink=="scale"&&this.width!=this.indicatorWidth&&(this.width=this.indicatorWidth,this.indicatorStyle.width=this.width+"px"),y<this.minBoundaryY?(this.options.shrink=="scale"&&(this.height=Math.max(this.indicatorHeight+y*3,8),this.indicatorStyle.height=this.height+"px"),y=this.minBoundaryY):y>this.maxBoundaryY?this.options.shrink=="scale"?(this.height=Math.max(this.indicatorHeight-(y-this.maxPosY)*3,8),this.indicatorStyle.height=this.height+"px",y=this.maxPosY+this.indicatorHeight-this.height):y=this.maxBoundaryY:this.options.shrink=="scale"&&this.height!=this.indicatorHeight&&(this.height=this.indicatorHeight,this.indicatorStyle.height=this.height+"px")),this.x=x,this.y=y,this.scroller.options.useTransform?this.indicatorStyle[utils.style.transform]="translate("+x+"px,"+y+"px)"+this.scroller.translateZ:(this.indicatorStyle.left=x+"px",this.indicatorStyle.top=y+"px")},_pos:function(x,y){x<0?x=0:x>this.maxPosX&&(x=this.maxPosX),y<0?y=0:y>this.maxPosY&&(y=this.maxPosY),x=this.options.listenX?Math.round(x/this.sizeRatioX):this.scroller.x,y=this.options.listenY?Math.round(y/this.sizeRatioY):this.scroller.y,this.scroller.scrollTo(x,y)},fade:function(val,hold){if(hold&&!this.visible)return;clearTimeout(this.fadeTimeout),this.fadeTimeout=null;var time=val?250:500,delay=val?0:300;val=val?"1":"0",this.wrapperStyle[utils.style.transitionDuration]=time+"ms",this.fadeTimeout=setTimeout(function(val){this.wrapperStyle.opacity=val,this.visible=+val}.bind(this,val),delay)}},IScroll.utils=utils,typeof module!="undefined"&&module.exports?module.exports=IScroll:typeof define=="function"&&define.amd?define(function(){return IScroll}):window.IScroll=IScroll}(window,document,Math),function(global,factory){"use strict";typeof define=="function"&&define.amd?define(["jquery"],function($){return factory($,global,global.document,global.Math)}):typeof exports=="object"&&exports?module.exports=factory(require("jquery"),global,global.document,global.Math):factory(jQuery,global,global.document,global.Math)}(typeof window!="undefined"?window:this,function($,window,document,Math,undefined){"use strict";var WRAPPER="fullpage-wrapper",WRAPPER_SEL="."+WRAPPER,SCROLLABLE="fp-scrollable",SCROLLABLE_SEL="."+SCROLLABLE,RESPONSIVE="fp-responsive",NO_TRANSITION="fp-notransition",DESTROYED="fp-destroyed",ENABLED="fp-enabled",VIEWING_PREFIX="fp-viewing",ACTIVE="active",ACTIVE_SEL="."+ACTIVE,COMPLETELY="fp-completely",COMPLETELY_SEL="."+COMPLETELY,SECTION_DEFAULT_SEL=".section",SECTION="fp-section",SECTION_SEL="."+SECTION,SECTION_ACTIVE_SEL=SECTION_SEL+ACTIVE_SEL,SECTION_FIRST_SEL=SECTION_SEL+":first",SECTION_LAST_SEL=SECTION_SEL+":last",TABLE_CELL="fp-tableCell",TABLE_CELL_SEL="."+TABLE_CELL,AUTO_HEIGHT="fp-auto-height",AUTO_HEIGHT_SEL=".fp-auto-height",NORMAL_SCROLL="fp-normal-scroll",NORMAL_SCROLL_SEL=".fp-normal-scroll",SECTION_NAV="fp-nav",SECTION_NAV_SEL="#"+SECTION_NAV,SECTION_NAV_TOOLTIP="fp-tooltip",SECTION_NAV_TOOLTIP_SEL="."+SECTION_NAV_TOOLTIP,SHOW_ACTIVE_TOOLTIP="fp-show-active",SLIDE_DEFAULT_SEL=".slide",SLIDE="fp-slide",SLIDE_SEL="."+SLIDE,SLIDE_ACTIVE_SEL=SLIDE_SEL+ACTIVE_SEL,SLIDES_WRAPPER="fp-slides",SLIDES_WRAPPER_SEL="."+SLIDES_WRAPPER,SLIDES_CONTAINER="fp-slidesContainer",SLIDES_CONTAINER_SEL="."+SLIDES_CONTAINER,TABLE="fp-table",SLIDES_NAV="fp-slidesNav",SLIDES_NAV_SEL="."+SLIDES_NAV,SLIDES_NAV_LINK_SEL=SLIDES_NAV_SEL+" a",SLIDES_ARROW="fp-controlArrow",SLIDES_ARROW_SEL="."+SLIDES_ARROW,SLIDES_PREV="fp-prev",SLIDES_PREV_SEL="."+SLIDES_PREV,SLIDES_ARROW_PREV=SLIDES_ARROW+" "+SLIDES_PREV,SLIDES_ARROW_PREV_SEL=SLIDES_ARROW_SEL+SLIDES_PREV_SEL,SLIDES_NEXT="fp-next",SLIDES_NEXT_SEL="."+SLIDES_NEXT,SLIDES_ARROW_NEXT=SLIDES_ARROW+" "+SLIDES_NEXT,SLIDES_ARROW_NEXT_SEL=SLIDES_ARROW_SEL+SLIDES_NEXT_SEL,$window=$(window),$document=$(document),iscrollOptions={scrollbars:!0,mouseWheel:!0,hideScrollbars:!1,fadeScrollbars:!1,disableMouse:!0,interactiveScrollbars:!0,bounce:!1};$.fn.fullpage=function(options){function setAutoScrolling(value,type){value||silentScroll(0),setVariableState("autoScrolling",value,type);var element=$(SECTION_ACTIVE_SEL);options.autoScrolling&&!options.scrollBar?($htmlBody.css({overflow:"hidden !important",height:"100%"}),container.css({"-ms-touch-action":"none","touch-action":"none"}),element.length&&silentScroll(element.position().top)):($htmlBody.css({overflow:"visible !important",height:"initial"}),container.css({"-ms-touch-action":"","touch-action":""}),element.length&&$htmlBody.scrollTop(element.position().top))}function setRecordHistory(value,type){setVariableState("recordHistory",value,type)}function setScrollingSpeed(value,type){setVariableState("scrollingSpeed",value,type)}function setFitToSection(value,type){setVariableState("fitToSection",value,type)}function setLockAnchors(value){options.lockAnchors=value}function setMouseWheelScrolling(value){value?(addMouseWheelHandler(),addMiddleWheelHandler()):(removeMouseWheelHandler(),removeMiddleWheelHandler())}function setAllowScrolling(value,directions){typeof directions!="undefined"?(directions=directions.replace(/ /g,"").split(","),$.each(directions,function(index,direction){setIsScrollAllowed(value,direction,"m")})):value?(setMouseWheelScrolling(!0),addTouchHandler()):(setMouseWheelScrolling(!1),removeTouchHandler())}function setKeyboardScrolling(value,directions){typeof directions!="undefined"?(directions=directions.replace(/ /g,"").split(","),$.each(directions,function(index,direction){setIsScrollAllowed(value,direction,"k")})):options.keyboardScrolling=value}function moveSectionUp(){var prev=$(SECTION_ACTIVE_SEL).prev(SECTION_SEL);!prev.length&&(options.loopTop||options.continuousVertical)&&(prev=$(SECTION_SEL).last()),prev.length&&scrollPage(prev,null,!0)}function moveSectionDown(){var next=$(SECTION_ACTIVE_SEL).next(SECTION_SEL);!next.length&&(options.loopBottom||options.continuousVertical)&&(next=$(SECTION_SEL).first()),next.length&&scrollPage(next,null,!1)}function silentMoveTo(sectionAnchor,slideAnchor){setScrollingSpeed(0,"internal"),moveTo(sectionAnchor,slideAnchor),setScrollingSpeed(originals.scrollingSpeed,"internal")}function moveTo(sectionAnchor,slideAnchor){var destiny=getSectionByAnchor(sectionAnchor);typeof slideAnchor!="undefined"?scrollPageAndSlide(sectionAnchor,slideAnchor):destiny.length>0&&scrollPage(destiny)}function moveSlideRight(section){moveSlide("right",section)}function moveSlideLeft(section){moveSlide("left",section)}function reBuild(resizing){if(container.hasClass(DESTROYED))return;isResizing=!0,windowsHeight=$window.height(),$(SECTION_SEL).each(function(){var slidesWrap=$(this).find(SLIDES_WRAPPER_SEL),slides=$(this).find(SLIDE_SEL);options.verticalCentered&&$(this).find(TABLE_CELL_SEL).css("height",getTableHeight($(this))+"px"),$(this).css("height",windowsHeight+"px"),options.scrollOverflow&&(slides.length?slides.each(function(){createScrollBar($(this))}):createScrollBar($(this))),slides.length>1&&landscapeScroll(slidesWrap,slidesWrap.find(SLIDE_ACTIVE_SEL))});var activeSection=$(SECTION_ACTIVE_SEL),sectionIndex=activeSection.index(SECTION_SEL);sectionIndex&&silentMoveTo(sectionIndex+1),isResizing=!1,$.isFunction(options.afterResize)&&resizing&&options.afterResize.call(container,getTableHeight()),$.isFunction(options.afterReBuild)&&!resizing&&options.afterReBuild.call(container)}function setResponsive(active){var isResponsive=$body.hasClass(RESPONSIVE);active?isResponsive||(setAutoScrolling(!1,"internal"),setFitToSection(!1,"internal"),$(SECTION_NAV_SEL).hide(),$body.addClass(RESPONSIVE),$.isFunction(options.afterResponsive)&&options.afterResponsive.call(container,active)):isResponsive&&(setAutoScrolling(originals.autoScrolling,"internal"),setFitToSection(originals.autoScrolling,"internal"),$(SECTION_NAV_SEL).show(),$body.removeClass(RESPONSIVE),$.isFunction(options.afterResponsive)&&options.afterResponsive.call(container,active))}function init(){options.css3&&(options.css3=support3d()),options.scrollBar=options.scrollBar||options.hybrid,setOptionsFromDOM(),prepareDom(),setAllowScrolling(!0),setAutoScrolling(options.autoScrolling,"internal"),responsive(),setBodyClass()}function bindEvents(){$window.on("hashchange",hashChangeHandler).blur(blurHandler).resize(resizeHandler),$document.keydown(keydownHandler).keyup(keyUpHandler).on("click touchstart",SECTION_NAV_SEL+" a",sectionBulletHandler).on("click touchstart",SLIDES_NAV_LINK_SEL,slideBulletHandler).on("click",SECTION_NAV_TOOLTIP_SEL,tooltipTextHandler),$(SECTION_SEL).on("click touchstart",SLIDES_ARROW_SEL,slideArrowHandler),options.normalScrollElements&&($document.on("mouseenter",options.normalScrollElements,function(){setMouseWheelScrolling(!1)}),$document.on("mouseleave",options.normalScrollElements,function(){setMouseWheelScrolling(!0)}))}function setOptionsFromDOM(){var sections=container.find(options.sectionSelector);options.anchors.length||(options.anchors=sections.filter("[data-anchor]").map(function(){return $(this).data("anchor").toString()}).get()),options.navigationTooltips.length||(options.navigationTooltips=sections.filter("[data-tooltip]").map(function(){return $(this).data("tooltip").toString()}).get())}function prepareDom(){container.css({height:"100%",position:"relative"}),container.addClass(WRAPPER),$("html").addClass(ENABLED),windowsHeight=$window.height(),container.removeClass(DESTROYED),addInternalSelectors(),$(SECTION_SEL).each(function(index){var section=$(this),slides=section.find(SLIDE_SEL),numSlides=slides.length;styleSection(section,index),styleMenu(section,index),numSlides>0?styleSlides(section,slides,numSlides):options.verticalCentered&&addTableClass(section)}),options.fixedElements&&options.css3&&$(options.fixedElements).appendTo($body),options.navigation&&addVerticalNavigation(),enableYoutubeAPI(),options.scrollOverflow?(document.readyState==="complete"&&createScrollBarHandler(),$window.on("load",createScrollBarHandler)):afterRenderActions()}function styleSlides(section,slides,numSlides){var sliderWidth=numSlides*100,slideWidth=100/numSlides;slides.wrapAll('<div class="'+SLIDES_CONTAINER+'" />'),slides.parent().wrap('<div class="'+SLIDES_WRAPPER+'" />'),section.find(SLIDES_CONTAINER_SEL).css("width",sliderWidth+"%"),numSlides>1&&(options.controlArrows&&createSlideArrows(section),options.slidesNavigation&&addSlidesNavigation(section,numSlides)),slides.each(function(index){$(this).css("width",slideWidth+"%"),options.verticalCentered&&addTableClass($(this))});var startingSlide=section.find(SLIDE_ACTIVE_SEL);startingSlide.length&&($(SECTION_ACTIVE_SEL).index(SECTION_SEL)!==0||$(SECTION_ACTIVE_SEL).index(SECTION_SEL)===0&&startingSlide.index()!==0)?silentLandscapeScroll(startingSlide,"internal"):slides.eq(0).addClass(ACTIVE)}function styleSection(section,index){!index&&$(SECTION_ACTIVE_SEL).length===0&&section.addClass(ACTIVE),startingSection=$(SECTION_ACTIVE_SEL),section.css("height",windowsHeight+"px"),options.paddingTop&&section.css("padding-top",options.paddingTop),options.paddingBottom&&section.css("padding-bottom",options.paddingBottom),typeof options.sectionsColor[index]!="undefined"&&section.css("background-color",options.sectionsColor[index]),typeof options.anchors[index]!="undefined"&&section.attr("data-anchor",options.anchors[index])}function styleMenu(section,index){typeof options.anchors[index]!="undefined"&&section.hasClass(ACTIVE)&&activateMenuAndNav(options.anchors[index],index),options.menu&&options.css3&&$(options.menu).closest(WRAPPER_SEL).length&&$(options.menu).appendTo($body)}function addInternalSelectors(){container.find(options.sectionSelector).addClass(SECTION),container.find(options.slideSelector).addClass(SLIDE)}function createSlideArrows(section){section.find(SLIDES_WRAPPER_SEL).after('<div class="'+SLIDES_ARROW_PREV+'"></div><div class="'+SLIDES_ARROW_NEXT+'"></div>'),options.controlArrowColor!="#fff"&&(section.find(SLIDES_ARROW_NEXT_SEL).css("border-color","transparent transparent transparent "+options.controlArrowColor),section.find(SLIDES_ARROW_PREV_SEL).css("border-color","transparent "+options.controlArrowColor+" transparent transparent")),options.loopHorizontal||section.find(SLIDES_ARROW_PREV_SEL).hide()}function addVerticalNavigation(){$body.append('<div id="'+SECTION_NAV+'"><ul></ul></div>');var nav=$(SECTION_NAV_SEL);nav.addClass(function(){return options.showActiveTooltip?SHOW_ACTIVE_TOOLTIP+" "+options.navigationPosition:options.navigationPosition});for(var i=0;i<$(SECTION_SEL).length;i++){var link="";options.anchors.length&&(link=options.anchors[i]);var li='<li><a href="#'+link+'"><span></span></a>',tooltip=options.navigationTooltips[i];typeof tooltip!="undefined"&&tooltip!==""&&(li+='<div class="'+SECTION_NAV_TOOLTIP+" "+options.navigationPosition+'">'+tooltip+"</div>"),li+="</li>",nav.find("ul").append(li)}$(SECTION_NAV_SEL).css("margin-top","-"+$(SECTION_NAV_SEL).height()/2+"px"),$(SECTION_NAV_SEL).find("li").eq($(SECTION_ACTIVE_SEL).index(SECTION_SEL)).find("a").addClass(ACTIVE)}function createScrollBarHandler(){$(SECTION_SEL).each(function(){var slides=$(this).find(SLIDE_SEL);slides.length?slides.each(function(){createScrollBar($(this))}):createScrollBar($(this))}),afterRenderActions()}function enableYoutubeAPI(){container.find('iframe[src*="youtube.com/embed/"]').each(function(){addURLParam($(this),"enablejsapi=1")})}function addURLParam(element,newParam){var originalSrc=element.attr("src");element.attr("src",originalSrc+getUrlParamSign(originalSrc)+newParam)}function getUrlParamSign(url){return/\?/.test(url)?"&":"?"}function afterRenderActions(){var section=$(SECTION_ACTIVE_SEL);section.addClass(COMPLETELY),options.scrollOverflowHandler.afterRender&&options.scrollOverflowHandler.afterRender(section),lazyLoad(section),playMedia(section),options.scrollOverflowHandler.afterLoad(),isDestinyTheStartingSection()&&$.isFunction(options.afterLoad)&&options.afterLoad.call(section,section.data("anchor"),section.index(SECTION_SEL)+1),$.isFunction(options.afterRender)&&options.afterRender.call(container,getTableHeight())}function isDestinyTheStartingSection(){var anchors=window.location.hash.replace("#","").split("/"),destinationSection=getSectionByAnchor(decodeURIComponent(anchors[0]));return!destinationSection.length||destinationSection.length&&destinationSection.index()===startingSection.index()}function scrollHandler(){var currentSection;if(!options.autoScrolling||options.scrollBar){var currentScroll=$window.scrollTop(),scrollDirection=getScrollDirection(currentScroll),visibleSectionIndex=0,screen_mid=currentScroll+$window.height()/2,isAtBottom=$body.height()-$window.height()===currentScroll,sections=document.querySelectorAll(SECTION_SEL);if(isAtBottom)visibleSectionIndex=sections.length-1;else if(!currentScroll)visibleSectionIndex=0;else for(var i=0;i<sections.length;++i){var section=sections[i];section.offsetTop<=screen_mid&&(visibleSectionIndex=i)}isCompletelyInViewPort(scrollDirection)&&($(SECTION_ACTIVE_SEL).hasClass(COMPLETELY)||$(SECTION_ACTIVE_SEL).addClass(COMPLETELY).siblings().removeClass(COMPLETELY)),currentSection=$(sections).eq(visibleSectionIndex);if(!currentSection.hasClass(ACTIVE)){isScrolling=!0;var leavingSection=$(SECTION_ACTIVE_SEL),leavingSectionIndex=leavingSection.index(SECTION_SEL)+1,yMovement=getYmovement(currentSection),anchorLink=currentSection.data("anchor"),sectionIndex=currentSection.index(SECTION_SEL)+1,activeSlide=currentSection.find(SLIDE_ACTIVE_SEL),slideIndex,slideAnchorLink;activeSlide.length&&(slideAnchorLink=activeSlide.data("anchor"),slideIndex=activeSlide.index()),canScroll&&(currentSection.addClass(ACTIVE).siblings().removeClass(ACTIVE),$.isFunction(options.onLeave)&&options.onLeave.call(leavingSection,leavingSectionIndex,sectionIndex,yMovement),$.isFunction(options.afterLoad)&&options.afterLoad.call(currentSection,anchorLink,sectionIndex),stopMedia(leavingSection),lazyLoad(currentSection),playMedia(currentSection),activateMenuAndNav(anchorLink,sectionIndex-1),options.anchors.length&&(lastScrolledDestiny=anchorLink),setState(slideIndex,slideAnchorLink,anchorLink,sectionIndex)),clearTimeout(scrollId),scrollId=setTimeout(function(){isScrolling=!1},100)}options.fitToSection&&(clearTimeout(scrollId2),scrollId2=setTimeout(function(){options.fitToSection&&fitToSection()},options.fitToSectionDelay))}}function fitToSection(){canScroll&&(isResizing=!0,scrollPage($(SECTION_ACTIVE_SEL)),isResizing=!1)}function isCompletelyInViewPort(movement){var top=$(SECTION_ACTIVE_SEL).position().top,bottom=top+$window.height();return movement=="up"?bottom>=$window.scrollTop()+$window.height():top<=$window.scrollTop()}function getScrollDirection(currentScroll){var direction=currentScroll>lastScroll?"down":"up";return lastScroll=currentScroll,previousDestTop=currentScroll,direction}function scrolling(type,scrollable){if(!isScrollAllowed.m[type])return;var check=type==="down"?"bottom":"top",scrollSection=type==="down"?moveSectionDown:moveSectionUp;if(scrollable.length>0){if(!options.scrollOverflowHandler.isScrolled(check,scrollable))return!0;scrollSection()}else scrollSection()}function preventBouncing(event){var e=event.originalEvent;!checkParentForNormalScrollElement(event.target)&&options.autoScrolling&&isReallyTouch(e)&&isScrollAllowed.m.up&&event.preventDefault()}function touchMoveHandler(event){var e=event.originalEvent,activeSection=$(e.target).closest(SECTION_SEL);if(!checkParentForNormalScrollElement(event.target)&&isReallyTouch(e)){options.autoScrolling&&event.preventDefault();var scrollable=options.scrollOverflowHandler.scrollable(activeSection),touchEvents=getEventsPage(e);touchEndY=touchEvents.y,touchEndX=touchEvents.x,activeSection.find(SLIDES_WRAPPER_SEL).length&&Math.abs(touchStartX-touchEndX)>Math.abs(touchStartY-touchEndY)?!slideMoving&&Math.abs(touchStartX-touchEndX)>$window.outerWidth()/100*options.touchSensitivity&&(touchStartX>touchEndX?isScrollAllowed.m.right&&moveSlideRight(activeSection):isScrollAllowed.m.left&&moveSlideLeft(activeSection)):options.autoScrolling&&canScroll&&Math.abs(touchStartY-touchEndY)>$window.height()/100*options.touchSensitivity&&(touchStartY>touchEndY?scrolling("down",scrollable):touchEndY>touchStartY&&scrolling("up",scrollable))}}function checkParentForNormalScrollElement(el,hop){hop=hop||0;var parent=$(el).parent();return hop<options.normalScrollElementTouchThreshold&&parent.is(options.normalScrollElements)?!0:hop==options.normalScrollElementTouchThreshold?!1:checkParentForNormalScrollElement(parent,++hop)}function isReallyTouch(e){return typeof e.pointerType=="undefined"||e.pointerType!="mouse"}function touchStartHandler(event){var e=event.originalEvent;options.fitToSection&&$htmlBody.stop();if(isReallyTouch(e)){var touchEvents=getEventsPage(e);touchStartY=touchEvents.y,touchStartX=touchEvents.x}}function getAverage(elements,number){var sum=0,lastElements=elements.slice(Math.max(elements.length-number,1));for(var i=0;i<lastElements.length;i++)sum+=lastElements[i];return Math.ceil(sum/number)}function MouseWheelHandler(e){var curTime=(new Date).getTime(),isNormalScroll=$(COMPLETELY_SEL).hasClass(NORMAL_SCROLL);if(options.autoScrolling&&!controlPressed&&!isNormalScroll){e=e||window.event;var value=e.wheelDelta||-e.deltaY||-e.detail,delta=Math.max(-1,Math.min(1,value)),horizontalDetection=typeof e.wheelDeltaX!="undefined"||typeof e.deltaX!="undefined",isScrollingVertically=Math.abs(e.wheelDeltaX)<Math.abs(e.wheelDelta)||Math.abs(e.deltaX)<Math.abs(e.deltaY)||!horizontalDetection;scrollings.length>149&&scrollings.shift(),scrollings.push(Math.abs(value)),options.scrollBar&&(e.preventDefault?e.preventDefault():e.returnValue=!1);var activeSection=$(SECTION_ACTIVE_SEL),scrollable=options.scrollOverflowHandler.scrollable(activeSection),timeDiff=curTime-prevTime;prevTime=curTime,timeDiff>200&&(scrollings=[]);if(canScroll){var averageEnd=getAverage(scrollings,10),averageMiddle=getAverage(scrollings,70),isAccelerating=averageEnd>=averageMiddle;isAccelerating&&isScrollingVertically&&(delta<0?scrolling("down",scrollable):scrolling("up",scrollable))}return!1}options.fitToSection&&$htmlBody.stop()}function moveSlide(direction,section){var activeSection=typeof section=="undefined"?$(SECTION_ACTIVE_SEL):section,slides=activeSection.find(SLIDES_WRAPPER_SEL),numSlides=slides.find(SLIDE_SEL).length;if(!slides.length||slideMoving||numSlides<2)return;var currentSlide=slides.find(SLIDE_ACTIVE_SEL),destiny=null;direction==="left"?destiny=currentSlide.prev(SLIDE_SEL):destiny=currentSlide.next(SLIDE_SEL);if(!destiny.length){if(!options.loopHorizontal)return;direction==="left"?destiny=currentSlide.siblings(":last"):destiny=currentSlide.siblings(":first")}slideMoving=!0,landscapeScroll(slides,destiny,direction)}function keepSlidesPosition(){$(SLIDE_ACTIVE_SEL).each(function(){silentLandscapeScroll($(this),"internal")})}function getDestinationPosition(element){var elemPosition=element.position(),position=elemPosition.top,isScrollingDown=elemPosition.top>previousDestTop,sectionBottom=position-windowsHeight+element.outerHeight(),bigSectionsDestination=options.bigSectionsDestination,containerH=container.outerHeight(),containerPosition=container.offset();!$masthead.hasClass("menu-transparent")&&$("body").hasClass("uncode-fp-menu-shrink")&&!element.is(":first-child")&&(position+=18);if(containerH+menuHeight+bodyBorder+adminBarHeight-windowsHeight<position||isResizing&&element.is(":last-child"))position=sectionBottom+menuHeight+bodyBorder*2+adminBarHeight;return previousDestTop=position,position}function scrollPage(element,callback,isMovementUp){if(typeof element=="undefined")return;var dtop=getDestinationPosition(element),slideAnchorLink,slideIndex,v={element:element,callback:callback,isMovementUp:isMovementUp,dtop:dtop,yMovement:getYmovement(element),anchorLink:element.data("anchor"),sectionIndex:element.index(SECTION_SEL),activeSlide:element.find(SLIDE_ACTIVE_SEL),activeSection:$(SECTION_ACTIVE_SEL),leavingSection:$(SECTION_ACTIVE_SEL).index(SECTION_SEL)+1,localIsResizing:isResizing};if(v.activeSection.is(element)&&!isResizing||options.scrollBar&&$window.scrollTop()===v.dtop&&!element.hasClass(AUTO_HEIGHT))return;v.activeSlide.length&&(slideAnchorLink=v.activeSlide.data("anchor"),slideIndex=v.activeSlide.index()),options.autoScrolling&&options.continuousVertical&&typeof v.isMovementUp!="undefined"&&(!v.isMovementUp&&v.yMovement=="up"||v.isMovementUp&&v.yMovement=="down")&&(v=createInfiniteSections(v));if($.isFunction(options.onLeave)&&!v.localIsResizing&&options.onLeave.call(v.activeSection,v.leavingSection,v.sectionIndex+1,v.yMovement)===!1)return;v.localIsResizing||stopMedia(v.activeSection),options.scrollOverflowHandler.beforeLeave(),element.addClass(ACTIVE).siblings().removeClass(ACTIVE),lazyLoad(element),options.scrollOverflowHandler.onLeave(),canScroll=!1,setState(slideIndex,slideAnchorLink,v.anchorLink,v.sectionIndex),performMovement(v),lastScrolledDestiny=v.anchorLink,activateMenuAndNav(v.anchorLink,v.sectionIndex)}function performMovement(v){if(options.css3&&options.autoScrolling&&!options.scrollBar){var translate3d="translate3d(0px, -"+Math.round(v.dtop)+"px, 0px)";transformContainer(translate3d,!0),options.scrollingSpeed?(clearTimeout(afterSectionLoadsId),afterSectionLoadsId=setTimeout(function(){afterSectionLoads(v)},options.scrollingSpeed)):afterSectionLoads(v)}else{var scrollSettings=getScrollSettings(v);$(scrollSettings.element).animate(scrollSettings.options,options.scrollingSpeed,options.easing).promise().done(function(){options.scrollBar?setTimeout(function(){afterSectionLoads(v)},30):afterSectionLoads(v)})}}function getScrollSettings(v){var scroll={};return options.autoScrolling&&!options.scrollBar?(scroll.options={top:-v.dtop},scroll.element=WRAPPER_SEL):(scroll.options={scrollTop:v.dtop},scroll.element="html, body"),scroll}function createInfiniteSections(v){return v.isMovementUp?$(SECTION_ACTIVE_SEL).before(v.activeSection.nextAll(SECTION_SEL)):$(SECTION_ACTIVE_SEL).after(v.activeSection.prevAll(SECTION_SEL).get().reverse()),silentScroll($(SECTION_ACTIVE_SEL).position().top),keepSlidesPosition(),v.wrapAroundElements=v.activeSection,v.dtop=v.element.position().top,v.yMovement=getYmovement(v.element),v}function continuousVerticalFixSectionOrder(v){if(!v.wrapAroundElements||!v.wrapAroundElements.length)return;v.isMovementUp?$(SECTION_FIRST_SEL).before(v.wrapAroundElements):$(SECTION_LAST_SEL).after(v.wrapAroundElements),silentScroll($(SECTION_ACTIVE_SEL).position().top),keepSlidesPosition()}function afterSectionLoads(v){continuousVerticalFixSectionOrder(v),$.isFunction(options.afterLoad)&&!v.localIsResizing&&options.afterLoad.call(v.element,v.anchorLink,v.sectionIndex+1),options.scrollOverflowHandler.afterLoad(),v.localIsResizing||playMedia(v.element),v.element.addClass(COMPLETELY).siblings().removeClass(COMPLETELY),canScroll=!0,$.isFunction(v.callback)&&v.callback.call(this)}function setSrc(element,attribute){element.attr(attribute,element.data(attribute)).removeAttr("data-"+attribute)}function lazyLoad(destiny){if(!options.lazyLoading)return;var panel=getSlideOrSection(destiny),element;panel.find("img[data-src], img[data-srcset], source[data-src], audio[data-src], iframe[data-src]").each(function(){element=$(this),$.each(["src","srcset"],function(index,type){var attribute=element.attr("data-"+type);typeof attribute!="undefined"&&attribute&&setSrc(element,type)}),element.is("source")&&element.closest("video").get(0).load()})}function playMedia(destiny){var panel=getSlideOrSection(destiny);panel.find("video, audio").each(function(){var element=$(this).get(0);element.hasAttribute("data-autoplay")&&typeof element.play=="function"&&element.play()}),panel.find('iframe[src*="youtube.com/embed/"]').each(function(){var element=$(this).get(0);element.hasAttribute("data-autoplay")&&playYoutube(element),element.onload=function(){element.hasAttribute("data-autoplay")&&playYoutube(element)}})}function playYoutube(element){element.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}',"*")}function stopMedia(destiny){var panel=getSlideOrSection(destiny);panel.find("video, audio").each(function(){var element=$(this).get(0);!element.hasAttribute("data-keepplaying")&&typeof element.pause=="function"&&element.pause()}),panel.find('iframe[src*="youtube.com/embed/"]').each(function(){var element=$(this).get(0);/youtube\.com\/embed\//.test($(this).attr("src"))&&!element.hasAttribute("data-keepplaying")&&$(this).get(0).contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*")})}function getSlideOrSection(destiny){var slide=destiny.find(SLIDE_ACTIVE_SEL);return slide.length&&(destiny=$(slide)),destiny}function scrollToAnchor(){var value=window.location.hash.replace("#","").split("/"),sectionAnchor=decodeURIComponent(value[0]),slideAnchor=decodeURIComponent(value[1]);sectionAnchor&&(options.animateAnchor?scrollPageAndSlide(sectionAnchor,slideAnchor):silentMoveTo(sectionAnchor,slideAnchor))}function hashChangeHandler(){if(!isScrolling&&!options.lockAnchors){var value=window.location.hash.replace("#","").split("/"),sectionAnchor=decodeURIComponent(value[0]),slideAnchor=decodeURIComponent(value[1]),isFirstSlideMove=typeof lastScrolledDestiny=="undefined",isFirstScrollMove=typeof lastScrolledDestiny=="undefined"&&typeof slideAnchor=="undefined"&&!slideMoving;sectionAnchor.length&&(sectionAnchor&&sectionAnchor!==lastScrolledDestiny&&!isFirstSlideMove||isFirstScrollMove||!slideMoving&&lastScrolledSlide!=slideAnchor)&&scrollPageAndSlide(sectionAnchor,slideAnchor)}}function keydownHandler(e){clearTimeout(keydownId);var activeElement=$(":focus");if(!activeElement.is("textarea")&&!activeElement.is("input")&&!activeElement.is("select")&&activeElement.attr("contentEditable")!=="true"&&activeElement.attr("contentEditable")!==""&&options.keyboardScrolling&&options.autoScrolling){var keyCode=e.which,keyControls=[40,38,32,33,34];$.inArray(keyCode,keyControls)>-1&&e.preventDefault(),controlPressed=e.ctrlKey,keydownId=setTimeout(function(){onkeydown(e)},150)}}function tooltipTextHandler(){$(this).prev().trigger("click")}function keyUpHandler(e){isWindowFocused&&(controlPressed=e.ctrlKey)}function mouseDownHandler(e){e.which==2&&(oldPageY=e.pageY,container.on("mousemove",mouseMoveHandler))}function mouseUpHandler(e){e.which==2&&container.off("mousemove")}function slideArrowHandler(){var section=$(this).closest(SECTION_SEL);$(this).hasClass(SLIDES_PREV)?isScrollAllowed.m.left&&moveSlideLeft(section):isScrollAllowed.m.right&&moveSlideRight(section)}function blurHandler(){isWindowFocused=!1,controlPressed=!1}function sectionBulletHandler(e){e.preventDefault();var index=$(this).parent().index();scrollPage($(SECTION_SEL).eq(index))}function slideBulletHandler(e){e.preventDefault();var slides=$(this).closest(SECTION_SEL).find(SLIDES_WRAPPER_SEL),destiny=slides.find(SLIDE_SEL).eq($(this).closest("li").index());landscapeScroll(slides,destiny)}function onkeydown(e){var shiftPressed=e.shiftKey;if(!canScroll&&[37,39].indexOf(e.which)<0)return;switch(e.which){case 38:case 33:isScrollAllowed.k.up&&moveSectionUp();break;case 32:if(shiftPressed&&isScrollAllowed.k.up){moveSectionUp();break};case 40:case 34:isScrollAllowed.k.down&&moveSectionDown();break;case 36:isScrollAllowed.k.up&&moveTo(1);break;case 35:isScrollAllowed.k.down&&moveTo($(SECTION_SEL).length);break;case 37:isScrollAllowed.k.left&&moveSlideLeft();break;case 39:isScrollAllowed.k.right&&moveSlideRight();break;default:return}}function mouseMoveHandler(e){canScroll&&(e.pageY<oldPageY&&isScrollAllowed.m.up?moveSectionUp():e.pageY>oldPageY&&isScrollAllowed.m.down&&moveSectionDown()),oldPageY=e.pageY}function landscapeScroll(slides,destiny,direction){var section=slides.closest(SECTION_SEL),v={slides:slides,destiny:destiny,direction:direction,destinyPos:destiny.position(),slideIndex:destiny.index(),section:section,sectionIndex:section.index(SECTION_SEL),anchorLink:section.data("anchor"),slidesNav:section.find(SLIDES_NAV_SEL),slideAnchor:getAnchor(destiny),prevSlide:section.find(SLIDE_ACTIVE_SEL),prevSlideIndex:section.find(SLIDE_ACTIVE_SEL).index(),localIsResizing:isResizing};v.xMovement=getXmovement(v.prevSlideIndex,v.slideIndex),v.direction=v.direction?v.direction:v.xMovement,v.localIsResizing||(canScroll=!1);if(options.onSlideLeave&&!v.localIsResizing&&v.xMovement!=="none"&&$.isFunction(options.onSlideLeave)&&options.onSlideLeave.call(v.prevSlide,v.anchorLink,v.sectionIndex+1,v.prevSlideIndex,v.xMovement,v.slideIndex)===!1){slideMoving=!1;return}destiny.addClass(ACTIVE).siblings().removeClass(ACTIVE),v.localIsResizing||(stopMedia(v.prevSlide),lazyLoad(destiny)),!options.loopHorizontal&&options.controlArrows&&(section.find(SLIDES_ARROW_PREV_SEL).toggle(v.slideIndex!==0),section.find(SLIDES_ARROW_NEXT_SEL).toggle(!destiny.is(":last-child"))),section.hasClass(ACTIVE)&&!v.localIsResizing&&setState(v.slideIndex,v.slideAnchor,v.anchorLink,v.sectionIndex),performHorizontalMove(slides,v,!0)}function afterSlideLoads(v){activeSlidesNavigation(v.slidesNav,v.slideIndex),v.localIsResizing||($.isFunction(options.afterSlideLoad)&&options.afterSlideLoad.call(v.destiny,v.anchorLink,v.sectionIndex+1,v.slideAnchor,v.slideIndex),canScroll=!0,playMedia(v.destiny)),slideMoving=!1}function performHorizontalMove(slides,v,fireCallback){var destinyPos=v.destinyPos;if(options.css3){var translate3d="translate3d(-"+Math.round(destinyPos.left)+"px, 0px, 0px)";addAnimation(slides.find(SLIDES_CONTAINER_SEL)).css(getTransforms(translate3d),v),afterSlideLoadsId=setTimeout(function(){fireCallback&&afterSlideLoads(v)},options.scrollingSpeed,options.easing)}else slides.animate({scrollLeft:Math.round(destinyPos.left)},options.scrollingSpeed,options.easing,function(){fireCallback&&afterSlideLoads(v)})}function activeSlidesNavigation(slidesNav,slideIndex){slidesNav.find(ACTIVE_SEL).removeClass(ACTIVE),slidesNav.find("li").eq(slideIndex).find("a").addClass(ACTIVE)}function resizeHandler(){responsive();if(isTouchDevice){var activeElement=$(document.activeElement);if(!activeElement.is("textarea")&&!activeElement.is("input")&&!activeElement.is("select")){var currentHeight=$window.height();Math.abs(currentHeight-previousHeight)>20*Math.max(previousHeight,currentHeight)/100&&(reBuild(!0),previousHeight=currentHeight)}}else clearTimeout(resizeId),resizeId=setTimeout(function(){reBuild(!0)},350)}function responsive(){var widthLimit=options.responsive||options.responsiveWidth,heightLimit=options.responsiveHeight,isBreakingPointWidth=widthLimit&&$window.outerWidth()<widthLimit,isBreakingPointHeight=heightLimit&&$window.height()<heightLimit;widthLimit&&heightLimit?setResponsive(isBreakingPointWidth||isBreakingPointHeight):widthLimit?setResponsive(isBreakingPointWidth):heightLimit&&setResponsive(isBreakingPointHeight)}function addAnimation(container,element){var transition="all "+options.scrollingSpeed+"ms "+options.easingcss3;return container.removeClass(NO_TRANSITION),container.css({"-webkit-transition":transition,transition:transition})}function removeAnimation(element){return element.addClass(NO_TRANSITION)}function activateNavDots(name,sectionIndex){options.navigation&&($(SECTION_NAV_SEL).find(ACTIVE_SEL).removeClass(ACTIVE),name?$(SECTION_NAV_SEL).find('a[href="#'+name+'"]').addClass(ACTIVE):$(SECTION_NAV_SEL).find("li").eq(sectionIndex).find("a").addClass(ACTIVE))}function activateMenuElement(name){options.menu&&($(options.menu).find(ACTIVE_SEL).removeClass(ACTIVE),$(options.menu).find('[data-menuanchor="'+name+'"]').addClass(ACTIVE))}function activateMenuAndNav(anchor,index){activateMenuElement(anchor),activateNavDots(anchor,index)}function getYmovement(destiny){var fromIndex=$(SECTION_ACTIVE_SEL).index(SECTION_SEL),toIndex=destiny.index(SECTION_SEL);return fromIndex==toIndex?"none":fromIndex>toIndex?"up":"down"}function getXmovement(fromIndex,toIndex){return fromIndex==toIndex?"none":fromIndex>toIndex?"left":"right"}function createScrollBar(element){if(element.hasClass("fp-noscroll"))return;element.css("overflow","hidden");var scrollOverflowHandler=options.scrollOverflowHandler,wrap=scrollOverflowHandler.wrapContent(),section=element.closest(SECTION_SEL),scrollable=scrollOverflowHandler.scrollable(element),contentHeight;scrollable.length?contentHeight=scrollOverflowHandler.scrollHeight(element):(contentHeight=element.get(0).scrollHeight,options.verticalCentered&&(contentHeight=element.find(TABLE_CELL_SEL).get(0).scrollHeight));var scrollHeight=windowsHeight-parseInt(section.css("padding-bottom"))-parseInt(section.css("padding-top"));contentHeight>scrollHeight?scrollable.length?scrollOverflowHandler.update(element,scrollHeight):(options.verticalCentered?element.find(TABLE_CELL_SEL).wrapInner(wrap):element.wrapInner(wrap),scrollOverflowHandler.create(element,scrollHeight)):scrollOverflowHandler.remove(element),element.css("overflow","")}function addTableClass(element){element.hasClass(TABLE)||element.addClass(TABLE).wrapInner('<div class="'+TABLE_CELL+'" style="height:'+getTableHeight(element)+'px;" />')}function getTableHeight(element){var sectionHeight=windowsHeight;if(options.paddingTop||options.paddingBottom){var section=element;section.hasClass(SECTION)||(section=element.closest(SECTION_SEL));var paddings=parseInt(section.css("padding-top"))+parseInt(section.css("padding-bottom"));sectionHeight=windowsHeight-paddings}return sectionHeight}function transformContainer(translate3d,animated){animated?addAnimation(container):removeAnimation(container),container.css(getTransforms(translate3d)),setTimeout(function(){container.removeClass(NO_TRANSITION)},10)}function getSectionByAnchor(sectionAnchor){if(!sectionAnchor)return[];var section=container.find(SECTION_SEL+'[data-anchor="'+sectionAnchor+'"]');return section.length||(section=$(SECTION_SEL).eq(sectionAnchor-1)),section}function getSlideByAnchor(slideAnchor,section){var slides=section.find(SLIDES_WRAPPER_SEL),slide=slides.find(SLIDE_SEL+'[data-anchor="'+slideAnchor+'"]');return slide.length||(slide=slides.find(SLIDE_SEL).eq(slideAnchor)),slide}function scrollPageAndSlide(destiny,slide){var section=getSectionByAnchor(destiny);if(!section.length)return;typeof slide=="undefined"&&(slide=0),destiny!==lastScrolledDestiny&&!section.hasClass(ACTIVE)?scrollPage(section,function(){scrollSlider(section,slide)}):scrollSlider(section,slide)}function scrollSlider(section,slideAnchor){if(typeof slideAnchor!="undefined"){var slides=section.find(SLIDES_WRAPPER_SEL),destiny=getSlideByAnchor(slideAnchor,section);destiny.length&&landscapeScroll(slides,destiny)}}function addSlidesNavigation(section,numSlides){section.append('<div class="'+SLIDES_NAV+'"><ul></ul></div>');var nav=section.find(SLIDES_NAV_SEL);nav.addClass(options.slidesNavPosition);for(var i=0;i<numSlides;i++)nav.find("ul").append('<li><a href="#"><span></span></a></li>');nav.css("margin-left","-"+nav.width()/2+"px"),nav.find("li").first().find("a").addClass(ACTIVE)}function setState(slideIndex,slideAnchor,anchorLink,sectionIndex){var sectionHash="";options.anchors.length&&!options.lockAnchors&&(slideIndex?(typeof anchorLink!="undefined"&&(sectionHash=anchorLink),typeof slideAnchor=="undefined"&&(slideAnchor=slideIndex),lastScrolledSlide=slideAnchor,setUrlHash(sectionHash+"/"+slideAnchor)):typeof slideIndex!="undefined"?(lastScrolledSlide=slideAnchor,setUrlHash(anchorLink)):setUrlHash(anchorLink)),setBodyClass()}function setUrlHash(url){if(typeof SiteParameters.slide_footer!="undefined"&&url==SiteParameters.slide_footer)return!1;if(!options.recordHistory)return!1;location.hash=url}function getAnchor(element){var anchor=element.data("anchor"),index=element.index();return typeof anchor=="undefined"&&(anchor=index),anchor}function setBodyClass(){var section=$(SECTION_ACTIVE_SEL),slide=section.find(SLIDE_ACTIVE_SEL),sectionAnchor=getAnchor(section),slideAnchor=getAnchor(slide),text=String(sectionAnchor);slide.length&&(text=text+"-"+slideAnchor),text=text.replace("/","-").replace("#","");var classRe=new RegExp("\\b\\s?"+VIEWING_PREFIX+"-[^\\s]+\\b","g");$body[0].className=$body[0].className.replace(classRe,""),$body.addClass(VIEWING_PREFIX+"-"+text)}function support3d(){var el=document.createElement("p"),has3d,transforms={webkitTransform:"-webkit-transform",OTransform:"-o-transform",msTransform:"-ms-transform",MozTransform:"-moz-transform",transform:"transform"};document.body.insertBefore(el,null);for(var t in transforms)el.style[t]!==undefined&&(el.style[t]="translate3d(1px,1px,1px)",has3d=window.getComputedStyle(el).getPropertyValue(transforms[t]));return document.body.removeChild(el),has3d!==undefined&&has3d.length>0&&has3d!=="none"}function removeMouseWheelHandler(){document.addEventListener?(document.removeEventListener("mousewheel",MouseWheelHandler,!1),document.removeEventListener("wheel",MouseWheelHandler,!1),document.removeEventListener("MozMousePixelScroll",MouseWheelHandler,!1)):document.detachEvent("onmousewheel",MouseWheelHandler)}function addMouseWheelHandler(){var prefix="",_addEventListener;window.addEventListener?_addEventListener="addEventListener":(_addEventListener="attachEvent",prefix="on");var support="onwheel"in document.createElement("div")?"wheel":document.onmousewheel!==undefined?"mousewheel":"DOMMouseScroll",passiveEvent=g_supportsPassive?{passive:!1}:!1;support=="DOMMouseScroll"?document[_addEventListener](prefix+"MozMousePixelScroll",MouseWheelHandler,passiveEvent):document[_addEventListener](prefix+support,MouseWheelHandler,passiveEvent)}function addMiddleWheelHandler(){container.on("mousedown",mouseDownHandler).on("mouseup",mouseUpHandler)}function removeMiddleWheelHandler(){container.off("mousedown",mouseDownHandler).off("mouseup",mouseUpHandler)}function addTouchHandler(){if(isTouchDevice||isTouch)options.autoScrolling&&$body.off(events.touchmove).on(events.touchmove,preventBouncing),$(WRAPPER_SEL).off(events.touchstart).on(events.touchstart,touchStartHandler).off(events.touchmove).on(events.touchmove,touchMoveHandler)}function removeTouchHandler(){(isTouchDevice||isTouch)&&$(WRAPPER_SEL).off(events.touchstart).off(events.touchmove)}function getMSPointer(){var pointer;return window.PointerEvent?pointer={down:"pointerdown",move:"pointermove"}:pointer={down:"MSPointerDown",move:"MSPointerMove"},pointer}function getEventsPage(e){var events=[];return events.y=typeof e.pageY!="undefined"&&(e.pageY||e.pageX)?e.pageY:e.touches[0].pageY,events.x=typeof e.pageX!="undefined"&&(e.pageY||e.pageX)?e.pageX:e.touches[0].pageX,isTouch&&isReallyTouch(e)&&options.scrollBar&&(events.y=e.touches[0].pageY,events.x=e.touches[0].pageX),events}function silentLandscapeScroll(activeSlide,noCallbacks){setScrollingSpeed(0,"internal"),typeof noCallbacks!="undefined"&&(isResizing=!0),landscapeScroll(activeSlide.closest(SLIDES_WRAPPER_SEL),activeSlide),typeof noCallbacks!="undefined"&&(isResizing=!1),setScrollingSpeed(originals.scrollingSpeed,"internal")}function silentScroll(top){var roundedTop=Math.round(top);if(options.css3&&options.autoScrolling&&!options.scrollBar){var translate3d="translate3d(0px, -"+roundedTop+"px, 0px)";transformContainer(translate3d,!1)}else options.autoScrolling&&!options.scrollBar?container.css("top",-roundedTop):$htmlBody.scrollTop(roundedTop)}function getTransforms(translate3d){return{"-webkit-transform":translate3d,"-moz-transform":translate3d,"-ms-transform":translate3d,transform:translate3d}}function setIsScrollAllowed(value,direction,type){switch(direction){case"up":isScrollAllowed[type].up=value;break;case"down":isScrollAllowed[type].down=value;break;case"left":isScrollAllowed[type].left=value;break;case"right":isScrollAllowed[type].right=value;break;case"all":type=="m"?setAllowScrolling(value):setKeyboardScrolling(value)}}function destroy(all){setAutoScrolling(!1,"internal"),setAllowScrolling(!1),setKeyboardScrolling(!1),container.addClass(DESTROYED),clearTimeout(afterSlideLoadsId),clearTimeout(afterSectionLoadsId),clearTimeout(resizeId),clearTimeout(scrollId),clearTimeout(scrollId2),$window.off("scroll",scrollHandler).off("hashchange",hashChangeHandler).off("resize",resizeHandler),$document.off("click touchstart",SECTION_NAV_SEL+" a").off("mouseenter",SECTION_NAV_SEL+" li").off("mouseleave",SECTION_NAV_SEL+" li").off("click touchstart",SLIDES_NAV_LINK_SEL).off("mouseover",options.normalScrollElements).off("mouseout",options.normalScrollElements),$(SECTION_SEL).off("click touchstart",SLIDES_ARROW_SEL),clearTimeout(afterSlideLoadsId),clearTimeout(afterSectionLoadsId),all&&destroyStructure()}function destroyStructure(){silentScroll(0),container.find("img[data-src], source[data-src], audio[data-src], iframe[data-src]").each(function(){setSrc($(this),"src")}),container.find("img[data-srcset]").each(function(){setSrc($(this),"srcset")}),$(SECTION_NAV_SEL+", "+SLIDES_NAV_SEL+", "+SLIDES_ARROW_SEL).remove(),$(SECTION_SEL).css({height:"","background-color":"",padding:""}),$(SLIDE_SEL).css({width:""}),container.css({height:"",position:"","-ms-touch-action":"","touch-action":""}),$htmlBody.css({overflow:"",height:""}),$("html").removeClass(ENABLED),$body.removeClass(RESPONSIVE),$.each($body.get(0).className.split(/\s+/),function(index,className){className.indexOf(VIEWING_PREFIX)===0&&$body.removeClass(className)}),$(SECTION_SEL+", "+SLIDE_SEL).each(function(){options.scrollOverflowHandler.remove($(this)),$(this).removeClass(TABLE+" "+ACTIVE)}),removeAnimation(container),container.find(TABLE_CELL_SEL+", "+SLIDES_CONTAINER_SEL+", "+SLIDES_WRAPPER_SEL).each(function(){$(this).replaceWith(this.childNodes)}),container.css({"-webkit-transition":"none",transition:"none"}),$htmlBody.scrollTop(0);var usedSelectors=[SECTION,SLIDE,SLIDES_CONTAINER];$.each(usedSelectors,function(index,value){$("."+value).removeClass(value)})}function setVariableState(variable,value,type){options[variable]=value,type!=="internal"&&(originals[variable]=value)}function displayWarnings(){var extensions=["fadingEffect","continuousHorizontal","scrollHorizontally","interlockedSlides","resetSliders","responsiveSlides","offsetSections","dragAndMove","scrollOverflowReset","parallax"];$.each(extensions,function(index,extension){options[extension]&&showError("warn","fullpage.js extensions require jquery.fullpage.extensions.min.js file instead of the usual jquery.fullpage.js. Requested: "+extension)}),$.each(options.anchors,function(index,name){var nameAttr=$document.find("[name]").filter(function(){return $(this).attr("name")&&$(this).attr("name").toLowerCase()==name.toLowerCase()}),idAttr=$document.find("[id]").filter(function(){return $(this).attr("id")&&$(this).attr("id").toLowerCase()==name.toLowerCase()});if(idAttr.length||nameAttr.length)showError("error","data-anchor tags can not have the same value as any `id` element on the site (or `name` element for IE)."),idAttr.length&&showError("error",'"'+name+'" is is being used by another element `id` property'),nameAttr.length&&showError("error",'"'+name+'" is is being used by another element `name` property')})}function showError(type,text){console&&console[type]&&console[type]("fullPage: "+text)}if($("html").hasClass(ENABLED)){displayWarnings();return}var $htmlBody=$("html, body"),$body=$("body"),FP=$.fn.fullpage;options=$.extend({menu:!1,anchors:[],lockAnchors:!1,navigation:!1,navigationPosition:"right",navigationTooltips:[],showActiveTooltip:!1,slidesNavigation:!1,slidesNavPosition:"bottom",scrollBar:!1,hybrid:!1,css3:!0,scrollingSpeed:700,autoScrolling:!0,fitToSection:!0,fitToSectionDelay:1e3,easing:"easeInOutCubic",easingcss3:"ease",loopBottom:!1,loopTop:!1,loopHorizontal:!0,continuousVertical:!1,continuousHorizontal:!1,scrollHorizontally:!1,interlockedSlides:!1,dragAndMove:!1,offsetSections:!1,resetSliders:!1,fadingEffect:!1,normalScrollElements:null,scrollOverflow:!1,scrollOverflowReset:!1,scrollOverflowHandler:iscrollHandler,scrollOverflowOptions:null,touchSensitivity:5,normalScrollElementTouchThreshold:5,bigSectionsDestination:null,keyboardScrolling:!0,animateAnchor:!0,recordHistory:!0,controlArrows:!0,controlArrowColor:"#fff",verticalCentered:!0,sectionsColor:[],paddingTop:0,paddingBottom:0,fixedElements:null,responsive:0,responsiveWidth:0,responsiveHeight:0,responsiveSlides:!1,parallax:!1,parallaxOptions:{type:"reveal",percentage:62,property:"translate"},sectionSelector:SECTION_DEFAULT_SEL,slideSelector:SLIDE_DEFAULT_SEL,afterLoad:null,onLeave:null,afterRender:null,afterResize:null,afterReBuild:null,afterSlideLoad:null,onSlideLeave:null,afterResponsive:null,lazyLoading:!0},options);var slideMoving=!1,isTouchDevice=navigator.userAgent.match(/(iPhone|iPod|iPad|Android|playbook|silk|BlackBerry|BB10|Windows Phone|Tizen|Bada|webOS|IEMobile|Opera Mini)/),isTouch="ontouchstart"in window||navigator.msMaxTouchPoints>0||navigator.maxTouchPoints,container=$(this),windowsHeight=$window.height(),isResizing=!1,isWindowFocused=!0,lastScrolledDestiny,lastScrolledSlide,canScroll=!0,scrollings=[],controlPressed,startingSection,isScrollAllowed={};isScrollAllowed.m={up:!0,down:!0,left:!0,right:!0},isScrollAllowed.k=$.extend(!0,{},isScrollAllowed.m);var MSPointer=getMSPointer(),events={touchmove:"ontouchmove"in window?"touchmove":MSPointer.move,touchstart:"ontouchstart"in window?"touchstart":MSPointer.down},g_supportsPassive=!1;try{var opts=Object.defineProperty({},"passive",{get:function(){g_supportsPassive=!0}});window.addEventListener("testPassive",null,opts),window.removeEventListener("testPassive",null,opts)}catch(e){}var resizeId,afterSectionLoadsId,afterSlideLoadsId,scrollId,scrollId2,keydownId,originals=$.extend(!0,{},options),$masthead=$("#masthead"),hideMenu=!$("body").hasClass("vmenu")&&$("body").hasClass("uncode-fp-menu-hide")?!0:!1,menuHeight=$masthead.hasClass("menu-transparent")||hideMenu?0:UNCODE.menuHeight,bodyBorder=UNCODE.bodyBorder,adminBarHeight=UNCODE.adminBarHeight;displayWarnings(),iscrollOptions.click=isTouch,iscrollOptions=$.extend(iscrollOptions,options.scrollOverflowOptions),$.extend($.easing,{easeInOutCubic:function(x,t,b,c,d){return(t/=d/2)<1?c/2*t*t*t+b:c/2*((t-=2)*t*t+2)+b}}),$(this).length&&(FP.setAutoScrolling=setAutoScrolling,FP.setRecordHistory=setRecordHistory,FP.setScrollingSpeed=setScrollingSpeed,FP.setFitToSection=setFitToSection,FP.setLockAnchors=setLockAnchors,FP.setMouseWheelScrolling=setMouseWheelScrolling,FP.setAllowScrolling=setAllowScrolling,FP.setKeyboardScrolling=setKeyboardScrolling,FP.moveSectionUp=moveSectionUp,FP.moveSectionDown=moveSectionDown,FP.silentMoveTo=silentMoveTo,FP.moveTo=moveTo,FP.moveSlideRight=moveSlideRight,FP.moveSlideLeft=moveSlideLeft,FP.fitToSection=fitToSection,FP.reBuild=reBuild,FP.setResponsive=setResponsive,FP.destroy=destroy,init(),bindEvents());var isScrolling=!1,lastScroll=0,touchStartY=0,touchStartX=0,touchEndY=0,touchEndX=0,prevTime=(new Date).getTime(),previousDestTop=0,oldPageY=0,previousHeight=windowsHeight},typeof IScroll!="undefined"&&(IScroll.prototype.wheelOn=function(){this.wrapper.addEventListener("wheel",this),this.wrapper.addEventListener("mousewheel",this),this.wrapper.addEventListener("DOMMouseScroll",this)},IScroll.prototype.wheelOff=function(){this.wrapper.removeEventListener("wheel",this),this.wrapper.removeEventListener("mousewheel",this),this.wrapper.removeEventListener("DOMMouseScroll",this)});var iscrollHandler={refreshId:null,iScrollInstances:[],toggleWheel:function(value){var scrollable=$(SECTION_ACTIVE_SEL).find(SCROLLABLE_SEL);scrollable.each(function(){var iScrollInstance=$(this).data("iscrollInstance");typeof iScrollInstance!="undefined"&&iScrollInstance&&(value?iScrollInstance.wheelOn():iScrollInstance.wheelOff())})},onLeave:function(){iscrollHandler.toggleWheel(!1)},beforeLeave:function(){iscrollHandler.onLeave()},afterLoad:function(){iscrollHandler.toggleWheel(!0)},create:function(element,scrollHeight){var scrollable=element.find(SCROLLABLE_SEL);scrollable.height(scrollHeight),scrollable.each(function(){var $this=$(this),iScrollInstance=$this.data("iscrollInstance");iScrollInstance&&$.each(iscrollHandler.iScrollInstances,function(){$(this).destroy()}),iScrollInstance=new IScroll($this.get(0),iscrollOptions),iscrollHandler.iScrollInstances.push(iScrollInstance),iScrollInstance.wheelOff(),$this.data("iscrollInstance",iScrollInstance)})},isScrolled:function(type,scrollable){var scroller=scrollable.data("iscrollInstance");if(!scroller)return!0;var uncode_body_borders=parseFloat($(".body-borders").attr("data-border"))||0;if(type==="top")return scroller.y>=0&&!scrollable.scrollTop();if(type==="bottom")return 0-scroller.y+scrollable.scrollTop()+1+uncode_body_borders*2+scrollable.innerHeight()>=scrollable[0].scrollHeight},scrollable:function(activeSection){return activeSection.find(SLIDES_WRAPPER_SEL).length?activeSection.find(SLIDE_ACTIVE_SEL).find(SCROLLABLE_SEL):activeSection.find(SCROLLABLE_SEL)},scrollHeight:function(element){return element.find(SCROLLABLE_SEL).children().first().get(0).scrollHeight},remove:function(element){var scrollable=element.find(SCROLLABLE_SEL);if(scrollable.length){var iScrollInstance=scrollable.data("iscrollInstance");iScrollInstance.destroy(),scrollable.data("iscrollInstance",null)}element.find(SCROLLABLE_SEL).children().first().children().first().unwrap().unwrap()},update:function(element,scrollHeight){clearTimeout(iscrollHandler.refreshId),iscrollHandler.refreshId=setTimeout(function(){$.each(iscrollHandler.iScrollInstances,function(){$(this).get(0).refresh()})},150),element.find(SCROLLABLE_SEL).css("height",scrollHeight+"px").parent().css("height",scrollHeight+"px")},wrapContent:function(){return'<div class="'+SCROLLABLE+'"><div class="fp-scroller"></div></div>'}}}),function(global,factory){typeof exports=="object"&&typeof module!="undefined"?factory(exports):typeof define=="function"&&define.amd?define(["exports"],factory):(global=global||self,factory(global.window=global.window||{}))}(this,function(exports){"use strict";function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){return protoProps&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Constructor}var gsap,_coreInitted,_clamp,_win,_doc,_docEl,_body,_isTouch,_pointerType,ScrollTrigger,_root,_normalizer,_eventTypes,_context,_getGSAP=function _getGSAP(){return gsap||typeof window!="undefined"&&(gsap=window.gsap)&&gsap.registerPlugin&&gsap},_startup=1,_observers=[],_scrollers=[],_proxies=[],_getTime=Date.now,_bridge=function _bridge(name,value){return value},_integrate=function _integrate(){var core=ScrollTrigger.core,data=core.bridge||{},scrollers=core._scrollers,proxies=core._proxies;scrollers.push.apply(scrollers,_scrollers),proxies.push.apply(proxies,_proxies),_scrollers=scrollers,_proxies=proxies,_bridge=function _bridge(name,value){return data[name](value)}},_getProxyProp=function _getProxyProp(element,property){return~_proxies.indexOf(element)&&_proxies[_proxies.indexOf(element)+1][property]},_isViewport=function _isViewport(el){return!!~_root.indexOf(el)},_addListener=function _addListener(element,type,func,passive,capture){return element.addEventListener(type,func,{passive:passive!==!1,capture:!!capture})},_removeListener=function _removeListener(element,type,func,capture){return element.removeEventListener(type,func,!!capture)},_scrollLeft="scrollLeft",_scrollTop="scrollTop",_onScroll=function _onScroll(){return _normalizer&&_normalizer.isPressed||_scrollers.cache++},_scrollCacheFunc=function _scrollCacheFunc(f,doNotCache){var cachingFunc=function cachingFunc(value){if(value||value===0){_startup&&(_win.history.scrollRestoration="manual");var isNormalizing=_normalizer&&_normalizer.isPressed;value=cachingFunc.v=Math.round(value)||(_normalizer&&_normalizer.iOS?1:0),f(value),cachingFunc.cacheID=_scrollers.cache,isNormalizing&&_bridge("ss",value)}else if(doNotCache||_scrollers.cache!==cachingFunc.cacheID||_bridge("ref"))cachingFunc.cacheID=_scrollers.cache,cachingFunc.v=f();return cachingFunc.v+cachingFunc.offset};return cachingFunc.offset=0,f&&cachingFunc},_horizontal={s:_scrollLeft,p:"left",p2:"Left",os:"right",os2:"Right",d:"width",d2:"Width",a:"x",sc:_scrollCacheFunc(function(value){return arguments.length?_win.scrollTo(value,_vertical.sc()):_win.pageXOffset||_doc[_scrollLeft]||_docEl[_scrollLeft]||_body[_scrollLeft]||0})},_vertical={s:_scrollTop,p:"top",p2:"Top",os:"bottom",os2:"Bottom",d:"height",d2:"Height",a:"y",op:_horizontal,sc:_scrollCacheFunc(function(value){return arguments.length?_win.scrollTo(_horizontal.sc(),value):_win.pageYOffset||_doc[_scrollTop]||_docEl[_scrollTop]||_body[_scrollTop]||0})},_getTarget=function _getTarget(t,self){return(self&&self._ctx&&self._ctx.selector||gsap.utils.toArray)(t)[0]||(typeof t=="string"&&gsap.config().nullTargetWarn!==!1?console.warn("Element not found:",t):null)},_getScrollFunc=function _getScrollFunc(element,_ref){var s=_ref.s,sc=_ref.sc;_isViewport(element)&&(element=_doc.scrollingElement||_docEl);var i=_scrollers.indexOf(element),offset=sc===_vertical.sc?1:2;!~i&&(i=_scrollers.push(element)-1),_scrollers[i+offset]||_addListener(element,"scroll",_onScroll);var prev=_scrollers[i+offset],func=prev||(_scrollers[i+offset]=_scrollCacheFunc(_getProxyProp(element,s),!0)||(_isViewport(element)?sc:_scrollCacheFunc(function(value){return arguments.length?element[s]=value:element[s]})));return func.target=element,prev||(func.smooth=gsap.getProperty(element,"scrollBehavior")==="smooth"),func},_getVelocityProp=function _getVelocityProp(value,minTimeRefresh,useDelta){var v1=value,v2=value,t1=_getTime(),t2=t1,min=minTimeRefresh||50,dropToZeroTime=Math.max(500,min*3),update=function update(value,force){var t=_getTime();force||t-t1>min?(v2=v1,v1=value,t2=t1,t1=t):useDelta?v1+=value:v1=v2+(value-v2)/(t-t2)*(t1-t2)},reset=function reset(){v2=v1=useDelta?0:v1,t2=t1=0},getVelocity=function getVelocity(latestValue){var tOld=t2,vOld=v2,t=_getTime();return(latestValue||latestValue===0)&&latestValue!==v1&&update(latestValue),t1===t2||t-t2>dropToZeroTime?0:(v1+(useDelta?vOld:-vOld))/((useDelta?t:t1)-tOld)*1e3};return{update:update,reset:reset,getVelocity:getVelocity}},_getEvent=function _getEvent(e,preventDefault){return preventDefault&&!e._gsapAllow&&e.preventDefault(),e.changedTouches?e.changedTouches[0]:e},_getAbsoluteMax=function _getAbsoluteMax(a){var max=Math.max.apply(Math,a),min=Math.min.apply(Math,a);return Math.abs(max)>=Math.abs(min)?max:min},_setScrollTrigger=function _setScrollTrigger(){ScrollTrigger=gsap.core.globals().ScrollTrigger,ScrollTrigger&&ScrollTrigger.core&&_integrate()},_initCore=function _initCore(core){return gsap=core||_getGSAP(),!_coreInitted&&gsap&&typeof document!="undefined"&&document.body&&(_win=window,_doc=document,_docEl=_doc.documentElement,_body=_doc.body,_root=[_win,_doc,_docEl,_body],_clamp=gsap.utils.clamp,_context=gsap.core.context||function(){},_pointerType="onpointerenter"in _body?"pointer":"mouse",_isTouch=Observer.isTouch=_win.matchMedia&&_win.matchMedia("(hover: none), (pointer: coarse)").matches?1:"ontouchstart"in _win||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0?2:0,_eventTypes=Observer.eventTypes=("ontouchstart"in _docEl?"touchstart,touchmove,touchcancel,touchend":"onpointerdown"in _docEl?"pointerdown,pointermove,pointercancel,pointerup":"mousedown,mousemove,mouseup,mouseup").split(","),setTimeout(function(){return _startup=0},500),_setScrollTrigger(),_coreInitted=1),_coreInitted};_horizontal.op=_vertical,_scrollers.cache=0;var Observer=function(){function Observer(vars){this.init(vars)}var _proto=Observer.prototype;return _proto.init=function init(vars){_coreInitted||_initCore(gsap)||console.warn("Please gsap.registerPlugin(Observer)"),ScrollTrigger||_setScrollTrigger();var tolerance=vars.tolerance,dragMinimum=vars.dragMinimum,type=vars.type,target=vars.target,lineHeight=vars.lineHeight,debounce=vars.debounce,preventDefault=vars.preventDefault,onStop=vars.onStop,onStopDelay=vars.onStopDelay,ignore=vars.ignore,wheelSpeed=vars.wheelSpeed,event=vars.event,onDragStart=vars.onDragStart,onDragEnd=vars.onDragEnd,onDrag=vars.onDrag,onPress=vars.onPress,onRelease=vars.onRelease,onRight=vars.onRight,onLeft=vars.onLeft,onUp=vars.onUp,onDown=vars.onDown,onChangeX=vars.onChangeX,onChangeY=vars.onChangeY,onChange=vars.onChange,onToggleX=vars.onToggleX,onToggleY=vars.onToggleY,onHover=vars.onHover,onHoverEnd=vars.onHoverEnd,onMove=vars.onMove,ignoreCheck=vars.ignoreCheck,isNormalizer=vars.isNormalizer,onGestureStart=vars.onGestureStart,onGestureEnd=vars.onGestureEnd,onWheel=vars.onWheel,onEnable=vars.onEnable,onDisable=vars.onDisable,onClick=vars.onClick,scrollSpeed=vars.scrollSpeed,capture=vars.capture,allowClicks=vars.allowClicks,lockAxis=vars.lockAxis,onLockAxis=vars.onLockAxis;this.target=target=_getTarget(target)||_docEl,this.vars=vars,ignore&&(ignore=gsap.utils.toArray(ignore)),tolerance=tolerance||1e-9,dragMinimum=dragMinimum||0,wheelSpeed=wheelSpeed||1,scrollSpeed=scrollSpeed||1,type=type||"wheel,touch,pointer",debounce=debounce!==!1,lineHeight||(lineHeight=parseFloat(_win.getComputedStyle(_body).lineHeight)||22);var id,onStopDelayedCall,dragged,moved,wheeled,locked,axis,self=this,prevDeltaX=0,prevDeltaY=0,passive=vars.passive||!preventDefault,scrollFuncX=_getScrollFunc(target,_horizontal),scrollFuncY=_getScrollFunc(target,_vertical),scrollX=scrollFuncX(),scrollY=scrollFuncY(),limitToTouch=~type.indexOf("touch")&&!~type.indexOf("pointer")&&_eventTypes[0]==="pointerdown",isViewport=_isViewport(target),ownerDoc=target.ownerDocument||_doc,deltaX=[0,0,0],deltaY=[0,0,0],onClickTime=0,clickCapture=function clickCapture(){return onClickTime=_getTime()},_ignoreCheck=function _ignoreCheck(e,isPointerOrTouch){return(self.event=e)&&ignore&&~ignore.indexOf(e.target)||isPointerOrTouch&&limitToTouch&&e.pointerType!=="touch"||ignoreCheck&&ignoreCheck(e,isPointerOrTouch)},onStopFunc=function onStopFunc(){self._vx.reset(),self._vy.reset(),onStopDelayedCall.pause(),onStop&&onStop(self)},update=function update(){var dx=self.deltaX=_getAbsoluteMax(deltaX),dy=self.deltaY=_getAbsoluteMax(deltaY),changedX=Math.abs(dx)>=tolerance,changedY=Math.abs(dy)>=tolerance;onChange&&(changedX||changedY)&&onChange(self,dx,dy,deltaX,deltaY),changedX&&(onRight&&self.deltaX>0&&onRight(self),onLeft&&self.deltaX<0&&onLeft(self),onChangeX&&onChangeX(self),onToggleX&&self.deltaX<0!=prevDeltaX<0&&onToggleX(self),prevDeltaX=self.deltaX,deltaX[0]=deltaX[1]=deltaX[2]=0),changedY&&(onDown&&self.deltaY>0&&onDown(self),onUp&&self.deltaY<0&&onUp(self),onChangeY&&onChangeY(self),onToggleY&&self.deltaY<0!=prevDeltaY<0&&onToggleY(self),prevDeltaY=self.deltaY,deltaY[0]=deltaY[1]=deltaY[2]=0);if(moved||dragged)onMove&&onMove(self),dragged&&(onDrag(self),dragged=!1),moved=!1;locked&&!(locked=!1)&&onLockAxis&&onLockAxis(self),wheeled&&(onWheel(self),wheeled=!1),id=0},onDelta=function onDelta(x,y,index){deltaX[index]+=x,deltaY[index]+=y,self._vx.update(x),self._vy.update(y),debounce?id||(id=requestAnimationFrame(update)):update()},onTouchOrPointerDelta=function onTouchOrPointerDelta(x,y){lockAxis&&!axis&&(self.axis=axis=Math.abs(x)>Math.abs(y)?"x":"y",locked=!0),axis!=="y"&&(deltaX[2]+=x,self._vx.update(x,!0)),axis!=="x"&&(deltaY[2]+=y,self._vy.update(y,!0)),debounce?id||(id=requestAnimationFrame(update)):update()},_onDrag=function _onDrag(e){if(_ignoreCheck(e,1))return;e=_getEvent(e,preventDefault);var x=e.clientX,y=e.clientY,dx=x-self.x,dy=y-self.y,isDragging=self.isDragging;self.x=x,self.y=y;if(isDragging||Math.abs(self.startX-x)>=dragMinimum||Math.abs(self.startY-y)>=dragMinimum)onDrag&&(dragged=!0),isDragging||(self.isDragging=!0),onTouchOrPointerDelta(dx,dy),isDragging||onDragStart&&onDragStart(self)},_onPress=self.onPress=function(e){if(_ignoreCheck(e,1)||e&&e.button)return;self.axis=axis=null,onStopDelayedCall.pause(),self.isPressed=!0,e=_getEvent(e),prevDeltaX=prevDeltaY=0,self.startX=self.x=e.clientX,self.startY=self.y=e.clientY,self._vx.reset(),self._vy.reset(),_addListener(isNormalizer?target:ownerDoc,_eventTypes[1],_onDrag,passive,!0),self.deltaX=self.deltaY=0,onPress&&onPress(self)},_onRelease=self.onRelease=function(e){if(_ignoreCheck(e,1))return;_removeListener(isNormalizer?target:ownerDoc,_eventTypes[1],_onDrag,!0);var isTrackingDrag=!isNaN(self.y-self.startY),wasDragging=self.isDragging,isDragNotClick=wasDragging&&(Math.abs(self.x-self.startX)>3||Math.abs(self.y-self.startY)>3),eventData=_getEvent(e);!isDragNotClick&&isTrackingDrag&&(self._vx.reset(),self._vy.reset(),preventDefault&&allowClicks&&gsap.delayedCall(.08,function(){if(_getTime()-onClickTime>300&&!e.defaultPrevented)if(e.target.click)e.target.click();else if(ownerDoc.createEvent){var syntheticEvent=ownerDoc.createEvent("MouseEvents");syntheticEvent.initMouseEvent("click",!0,!0,_win,1,eventData.screenX,eventData.screenY,eventData.clientX,eventData.clientY,!1,!1,!1,!1,0,null),e.target.dispatchEvent(syntheticEvent)}})),self.isDragging=self.isGesturing=self.isPressed=!1,onStop&&wasDragging&&!isNormalizer&&onStopDelayedCall.restart(!0),onDragEnd&&wasDragging&&onDragEnd(self),onRelease&&onRelease(self,isDragNotClick)},_onGestureStart=function _onGestureStart(e){return e.touches&&e.touches.length>1&&(self.isGesturing=!0)&&onGestureStart(e,self.isDragging)},_onGestureEnd=function _onGestureEnd(){return(self.isGesturing=!1)||onGestureEnd(self)},onScroll=function onScroll(e){if(_ignoreCheck(e))return;var x=scrollFuncX(),y=scrollFuncY();onDelta((x-scrollX)*scrollSpeed,(y-scrollY)*scrollSpeed,1),scrollX=x,scrollY=y,onStop&&onStopDelayedCall.restart(!0)},_onWheel=function _onWheel(e){if(_ignoreCheck(e))return;e=_getEvent(e,preventDefault),onWheel&&(wheeled=!0);var multiplier=(e.deltaMode===1?lineHeight:e.deltaMode===2?_win.innerHeight:1)*wheelSpeed;onDelta(e.deltaX*multiplier,e.deltaY*multiplier,0),onStop&&!isNormalizer&&onStopDelayedCall.restart(!0)},_onMove=function _onMove(e){if(_ignoreCheck(e))return;var x=e.clientX,y=e.clientY,dx=x-self.x,dy=y-self.y;self.x=x,self.y=y,moved=!0,onStop&&onStopDelayedCall.restart(!0),(dx||dy)&&onTouchOrPointerDelta(dx,dy)},_onHover=function _onHover(e){self.event=e,onHover(self)},_onHoverEnd=function _onHoverEnd(e){self.event=e,onHoverEnd(self)},_onClick=function _onClick(e){return _ignoreCheck(e)||_getEvent(e,preventDefault)&&onClick(self)};onStopDelayedCall=self._dc=gsap.delayedCall(onStopDelay||.25,onStopFunc).pause(),self.deltaX=self.deltaY=0,self._vx=_getVelocityProp(0,50,!0),self._vy=_getVelocityProp(0,50,!0),self.scrollX=scrollFuncX,self.scrollY=scrollFuncY,self.isDragging=self.isGesturing=self.isPressed=!1,_context(this),self.enable=function(e){if(!self.isEnabled){_addListener(isViewport?ownerDoc:target,"scroll",_onScroll),type.indexOf("scroll")>=0&&_addListener(isViewport?ownerDoc:target,"scroll",onScroll,passive,capture),type.indexOf("wheel")>=0&&_addListener(target,"wheel",_onWheel,passive,capture);if(type.indexOf("touch")>=0&&_isTouch||type.indexOf("pointer")>=0)_addListener(target,_eventTypes[0],_onPress,passive,capture),_addListener(ownerDoc,_eventTypes[2],_onRelease),_addListener(ownerDoc,_eventTypes[3],_onRelease),allowClicks&&_addListener(target,"click",clickCapture,!0,!0),onClick&&_addListener(target,"click",_onClick),onGestureStart&&_addListener(ownerDoc,"gesturestart",_onGestureStart),onGestureEnd&&_addListener(ownerDoc,"gestureend",_onGestureEnd),onHover&&_addListener(target,_pointerType+"enter",_onHover),onHoverEnd&&_addListener(target,_pointerType+"leave",_onHoverEnd),onMove&&_addListener(target,_pointerType+"move",_onMove);self.isEnabled=!0,e&&e.type&&_onPress(e),onEnable&&onEnable(self)}return self},self.disable=function(){self.isEnabled&&(_observers.filter(function(o){return o!==self&&_isViewport(o.target)}).length||_removeListener(isViewport?ownerDoc:target,"scroll",_onScroll),self.isPressed&&(self._vx.reset(),self._vy.reset(),_removeListener(isNormalizer?target:ownerDoc,_eventTypes[1],_onDrag,!0)),_removeListener(isViewport?ownerDoc:target,"scroll",onScroll,capture),_removeListener(target,"wheel",_onWheel,capture),_removeListener(target,_eventTypes[0],_onPress,capture),_removeListener(ownerDoc,_eventTypes[2],_onRelease),_removeListener(ownerDoc,_eventTypes[3],_onRelease),_removeListener(target,"click",clickCapture,!0),_removeListener(target,"click",_onClick),_removeListener(ownerDoc,"gesturestart",_onGestureStart),_removeListener(ownerDoc,"gestureend",_onGestureEnd),_removeListener(target,_pointerType+"enter",_onHover),_removeListener(target,_pointerType+"leave",_onHoverEnd),_removeListener(target,_pointerType+"move",_onMove),self.isEnabled=self.isPressed=self.isDragging=!1,onDisable&&onDisable(self))},self.kill=self.revert=function(){self.disable();var i=_observers.indexOf(self);i>=0&&_observers.splice(i,1),_normalizer===self&&(_normalizer=0)},_observers.push(self),isNormalizer&&_isViewport(target)&&(_normalizer=self),self.enable(event)},_createClass(Observer,[{key:"velocityX",get:function get(){return this._vx.getVelocity()}},{key:"velocityY",get:function get(){return this._vy.getVelocity()}}]),Observer}();Observer.version="3.12.5",Observer.create=function(vars){return new Observer(vars)},Observer.register=_initCore,Observer.getAll=function(){return _observers.slice()},Observer.getById=function(id){return _observers.filter(function(o){return o.vars.id===id})[0]},_getGSAP()&&gsap.registerPlugin(Observer);var gsap$1,_coreInitted$1,_win$1,_doc$1,_docEl$1,_body$1,_root$1,_resizeDelay,_toArray,_clamp$1,_time2,_syncInterval,_refreshing,_pointerIsDown,_transformProp,_i,_prevWidth,_prevHeight,_autoRefresh,_sort,_suppressOverwrites,_ignoreResize,_normalizer$1,_ignoreMobileResize,_baseScreenHeight,_baseScreenWidth,_fixIOSBug,_context$1,_scrollRestoration,_div100vh,_100vh,_isReverted,_clampingMax,_limitCallbacks,_startup$1=1,_getTime$1=Date.now,_time1=_getTime$1(),_lastScrollTime=0,_enabled=0,_parseClamp=function _parseClamp(value,type,self){var clamp=_isString(value)&&(value.substr(0,6)==="clamp("||value.indexOf("max")>-1);return self["_"+type+"Clamp"]=clamp,clamp?value.substr(6,value.length-7):value},_keepClamp=function _keepClamp(value,clamp){return clamp&&(!_isString(value)||value.substr(0,6)!=="clamp(")?"clamp("+value+")":value},_rafBugFix=function _rafBugFix(){return _enabled&&requestAnimationFrame(_rafBugFix)},_pointerDownHandler=function _pointerDownHandler(){return _pointerIsDown=1},_pointerUpHandler=function _pointerUpHandler(){return _pointerIsDown=0},_passThrough=function _passThrough(v){return v},_round=function _round(value){return Math.round(value*1e5)/1e5||0},_windowExists=function _windowExists(){return typeof window!="undefined"},_getGSAP$1=function _getGSAP(){return gsap$1||_windowExists()&&(gsap$1=window.gsap)&&gsap$1.registerPlugin&&gsap$1},_isViewport$1=function _isViewport(e){return!!~_root$1.indexOf(e)},_getViewportDimension=function _getViewportDimension(dimensionProperty){return(dimensionProperty==="Height"?_100vh:_win$1["inner"+dimensionProperty])||_docEl$1["client"+dimensionProperty]||_body$1["client"+dimensionProperty]},_getBoundsFunc=function _getBoundsFunc(element){return _getProxyProp(element,"getBoundingClientRect")||(_isViewport$1(element)?function(){return _winOffsets.width=_win$1.innerWidth,_winOffsets.height=_100vh,_winOffsets}:function(){return _getBounds(element)})},_getSizeFunc=function _getSizeFunc(scroller,isViewport,_ref){var d=_ref.d,d2=_ref.d2,a=_ref.a;return(a=_getProxyProp(scroller,"getBoundingClientRect"))?function(){return a()[d]}:function(){return(isViewport?_getViewportDimension(d2):scroller["client"+d2])||0}},_getOffsetsFunc=function _getOffsetsFunc(element,isViewport){return!isViewport||~_proxies.indexOf(element)?_getBoundsFunc(element):function(){return _winOffsets}},_maxScroll=function _maxScroll(element,_ref2){var s=_ref2.s,d2=_ref2.d2,d=_ref2.d,a=_ref2.a;return Math.max(0,(s="scroll"+d2)&&(a=_getProxyProp(element,s))?a()-_getBoundsFunc(element)()[d]:_isViewport$1(element)?(_docEl$1[s]||_body$1[s])-_getViewportDimension(d2):element[s]-element["offset"+d2])},_iterateAutoRefresh=function _iterateAutoRefresh(func,events){for(var i=0;i<_autoRefresh.length;i+=3)(!events||~events.indexOf(_autoRefresh[i+1]))&&func(_autoRefresh[i],_autoRefresh[i+1],_autoRefresh[i+2])},_isString=function _isString(value){return typeof value=="string"},_isFunction=function _isFunction(value){return typeof value=="function"},_isNumber=function _isNumber(value){return typeof value=="number"},_isObject=function _isObject(value){return typeof value=="object"},_endAnimation=function _endAnimation(animation,reversed,pause){return animation&&animation.progress(reversed?0:1)&&pause&&animation.pause()},_callback=function _callback(self,func){if(self.enabled){var result=self._ctx?self._ctx.add(function(){return func(self)}):func(self);result&&result.totalTime&&(self.callbackAnimation=result)}},_abs=Math.abs,_left="left",_top="top",_right="right",_bottom="bottom",_width="width",_height="height",_Right="Right",_Left="Left",_Top="Top",_Bottom="Bottom",_padding="padding",_margin="margin",_Width="Width",_Height="Height",_px="px",_getComputedStyle=function _getComputedStyle(element){return _win$1.getComputedStyle(element)},_makePositionable=function _makePositionable(element){var position=_getComputedStyle(element).position;element.style.position=position==="absolute"||position==="fixed"?position:"relative"},_setDefaults=function _setDefaults(obj,defaults){for(var p in defaults)p in obj||(obj[p]=defaults[p]);return obj},_getBounds=function _getBounds(element,withoutTransforms){var tween=withoutTransforms&&_getComputedStyle(element)[_transformProp]!=="matrix(1, 0, 0, 1, 0, 0)"&&gsap$1.to(element,{x:0,y:0,xPercent:0,yPercent:0,rotation:0,rotationX:0,rotationY:0,scale:1,skewX:0,skewY:0}).progress(1),bounds=element.getBoundingClientRect();return tween&&tween.progress(0).kill(),bounds},_getSize=function _getSize(element,_ref3){var d2=_ref3.d2;return element["offset"+d2]||element["client"+d2]||0},_getLabelRatioArray=function _getLabelRatioArray(timeline){var a=[],labels=timeline.labels,duration=timeline.duration(),p;for(p in labels)a.push(labels[p]/duration);return a},_getClosestLabel=function _getClosestLabel(animation){return function(value){return gsap$1.utils.snap(_getLabelRatioArray(animation),value)}},_snapDirectional=function _snapDirectional(snapIncrementOrArray){var snap=gsap$1.utils.snap(snapIncrementOrArray),a=Array.isArray(snapIncrementOrArray)&&snapIncrementOrArray.slice(0).sort(function(a,b){return a-b});return a?function(value,direction,threshold){threshold===void 0&&(threshold=.001);var i;if(!direction)return snap(value);if(direction>0){value-=threshold;for(i=0;i<a.length;i++)if(a[i]>=value)return a[i];return a[i-1]}i=a.length,value+=threshold;while(i--)if(a[i]<=value)return a[i];return a[0]}:function(value,direction,threshold){threshold===void 0&&(threshold=.001);var snapped=snap(value);return!direction||Math.abs(snapped-value)<threshold||snapped-value<0==direction<0?snapped:snap(direction<0?value-snapIncrementOrArray:value+snapIncrementOrArray)}},_getLabelAtDirection=function _getLabelAtDirection(timeline){return function(value,st){return _snapDirectional(_getLabelRatioArray(timeline))(value,st.direction)}},_multiListener=function _multiListener(func,element,types,callback){return types.split(",").forEach(function(type){return func(element,type,callback)})},_addListener$1=function _addListener(element,type,func,nonPassive,capture){return element.addEventListener(type,func,{passive:!nonPassive,capture:!!capture})},_removeListener$1=function _removeListener(element,type,func,capture){return element.removeEventListener(type,func,!!capture)},_wheelListener=function _wheelListener(func,el,scrollFunc){scrollFunc=scrollFunc&&scrollFunc.wheelHandler,scrollFunc&&(func(el,"wheel",scrollFunc),func(el,"touchmove",scrollFunc))},_markerDefaults={startColor:"green",endColor:"red",indent:0,fontSize:"16px",fontWeight:"normal"},_defaults={toggleActions:"play",anticipatePin:0},_keywords={top:0,left:0,center:.5,bottom:1,right:1},_offsetToPx=function _offsetToPx(value,size){if(_isString(value)){var eqIndex=value.indexOf("="),relative=~eqIndex?+(value.charAt(eqIndex-1)+1)*parseFloat(value.substr(eqIndex+1)):0;~eqIndex&&(value.indexOf("%")>eqIndex&&(relative*=size/100),value=value.substr(0,eqIndex-1)),value=relative+(value in _keywords?_keywords[value]*size:~value.indexOf("%")?parseFloat(value)*size/100:parseFloat(value)||0)}return value},_createMarker=function _createMarker(type,name,container,direction,_ref4,offset,matchWidthEl,containerAnimation){var startColor=_ref4.startColor,endColor=_ref4.endColor,fontSize=_ref4.fontSize,indent=_ref4.indent,fontWeight=_ref4.fontWeight,e=_doc$1.createElement("div"),useFixedPosition=_isViewport$1(container)||_getProxyProp(container,"pinType")==="fixed",isScroller=type.indexOf("scroller")!==-1,parent=useFixedPosition?_body$1:container,isStart=type.indexOf("start")!==-1,color=isStart?startColor:endColor,css="border-color:"+color+";font-size:"+fontSize+";color:"+color+";font-weight:"+fontWeight+";pointer-events:none;white-space:nowrap;font-family:sans-serif,Arial;z-index:1000;padding:4px 8px;border-width:0;border-style:solid;";return css+="position:"+((isScroller||containerAnimation)&&useFixedPosition?"fixed;":"absolute;"),(isScroller||containerAnimation||!useFixedPosition)&&(css+=(direction===_vertical?_right:_bottom)+":"+(offset+parseFloat(indent))+"px;"),matchWidthEl&&(css+="box-sizing:border-box;text-align:left;width:"+matchWidthEl.offsetWidth+"px;"),e._isStart=isStart,e.setAttribute("class","gsap-marker-"+type+(name?" marker-"+name:"")),e.style.cssText=css,e.innerText=name||name===0?type+"-"+name:type,parent.children[0]?parent.insertBefore(e,parent.children[0]):parent.appendChild(e),e._offset=e["offset"+direction.op.d2],_positionMarker(e,0,direction,isStart),e},_positionMarker=function _positionMarker(marker,start,direction,flipped){var vars={display:"block"},side=direction[flipped?"os2":"p2"],oppositeSide=direction[flipped?"p2":"os2"];marker._isFlipped=flipped,vars[direction.a+"Percent"]=flipped?-100:0,vars[direction.a]=flipped?"1px":0,vars["border"+side+_Width]=1,vars["border"+oppositeSide+_Width]=0,vars[direction.p]=start+"px",gsap$1.set(marker,vars)},_triggers=[],_ids={},_rafID,_sync=function _sync(){return _getTime$1()-_lastScrollTime>34&&(_rafID||(_rafID=requestAnimationFrame(_updateAll)))},_onScroll$1=function _onScroll(){if(!_normalizer$1||!_normalizer$1.isPressed||_normalizer$1.startX>_body$1.clientWidth)_scrollers.cache++,_normalizer$1?_rafID||(_rafID=requestAnimationFrame(_updateAll)):_updateAll(),_lastScrollTime||_dispatch("scrollStart"),_lastScrollTime=_getTime$1()},_setBaseDimensions=function _setBaseDimensions(){_baseScreenWidth=_win$1.innerWidth,_baseScreenHeight=_win$1.innerHeight},_onResize=function _onResize(){_scrollers.cache++,!_refreshing&&!_ignoreResize&&!_doc$1.fullscreenElement&&!_doc$1.webkitFullscreenElement&&(!_ignoreMobileResize||_baseScreenWidth!==_win$1.innerWidth||Math.abs(_win$1.innerHeight-_baseScreenHeight)>_win$1.innerHeight*.25)&&_resizeDelay.restart(!0)},_listeners={},_emptyArray=[],_softRefresh=function _softRefresh(){return _removeListener$1(ScrollTrigger$1,"scrollEnd",_softRefresh)||_refreshAll(!0)},_dispatch=function _dispatch(type){return _listeners[type]&&_listeners[type].map(function(f){return f()})||_emptyArray},_savedStyles=[],_revertRecorded=function _revertRecorded(media){for(var i=0;i<_savedStyles.length;i+=5)if(!media||_savedStyles[i+4]&&_savedStyles[i+4].query===media)_savedStyles[i].style.cssText=_savedStyles[i+1],_savedStyles[i].getBBox&&_savedStyles[i].setAttribute("transform",_savedStyles[i+2]||""),_savedStyles[i+3].uncache=1},_revertAll=function _revertAll(kill,media){var trigger;for(_i=0;_i<_triggers.length;_i++)trigger=_triggers[_i],trigger&&(!media||trigger._ctx===media)&&(kill?trigger.kill(1):trigger.revert(!0,!0));_isReverted=!0,media&&_revertRecorded(media),media||_dispatch("revert")},_clearScrollMemory=function _clearScrollMemory(scrollRestoration,force){_scrollers.cache++,(force||!_refreshingAll)&&_scrollers.forEach(function(obj){return _isFunction(obj)&&obj.cacheID++&&(obj.rec=0)}),_isString(scrollRestoration)&&(_win$1.history.scrollRestoration=_scrollRestoration=scrollRestoration)},_refreshingAll,_refreshID=0,_queueRefreshID,_queueRefreshAll=function _queueRefreshAll(){if(_queueRefreshID!==_refreshID){var id=_queueRefreshID=_refreshID;requestAnimationFrame(function(){return id===_refreshID&&_refreshAll(!0)})}},_refresh100vh=function _refresh100vh(){_body$1.appendChild(_div100vh),_100vh=!_normalizer$1&&_div100vh.offsetHeight||_win$1.innerHeight,_body$1.removeChild(_div100vh)},_hideAllMarkers=function _hideAllMarkers(hide){return _toArray(".gsap-marker-start, .gsap-marker-end, .gsap-marker-scroller-start, .gsap-marker-scroller-end").forEach(function(el){return el.style.display=hide?"none":"block"})},_refreshAll=function _refreshAll(force,skipRevert){if(_lastScrollTime&&!force&&!_isReverted){_addListener$1(ScrollTrigger$1,"scrollEnd",_softRefresh);return}_refresh100vh(),_refreshingAll=ScrollTrigger$1.isRefreshing=!0,_scrollers.forEach(function(obj){return _isFunction(obj)&&++obj.cacheID&&(obj.rec=obj())});var refreshInits=_dispatch("refreshInit");_sort&&ScrollTrigger$1.sort(),skipRevert||_revertAll(),_scrollers.forEach(function(obj){_isFunction(obj)&&(obj.smooth&&(obj.target.style.scrollBehavior="auto"),obj(0))}),_triggers.slice(0).forEach(function(t){return t.refresh()}),_isReverted=!1,_triggers.forEach(function(t){if(t._subPinOffset&&t.pin){var prop=t.vars.horizontal?"offsetWidth":"offsetHeight",original=t.pin[prop];t.revert(!0,1),t.adjustPinSpacing(t.pin[prop]-original),t.refresh()}}),_clampingMax=1,_hideAllMarkers(!0),_triggers.forEach(function(t){var max=_maxScroll(t.scroller,t._dir),endClamp=t.vars.end==="max"||t._endClamp&&t.end>max,startClamp=t._startClamp&&t.start>=max;(endClamp||startClamp)&&t.setPositions(startClamp?max-1:t.start,endClamp?Math.max(startClamp?max:t.start+1,max):t.end,!0)}),_hideAllMarkers(!1),_clampingMax=0,refreshInits.forEach(function(result){return result&&result.render&&result.render(-1)}),_scrollers.forEach(function(obj){_isFunction(obj)&&(obj.smooth&&requestAnimationFrame(function(){return obj.target.style.scrollBehavior="smooth"}),obj.rec&&obj(obj.rec))}),_clearScrollMemory(_scrollRestoration,1),_resizeDelay.pause(),_refreshID++,_refreshingAll=2,_updateAll(2),_triggers.forEach(function(t){return _isFunction(t.vars.onRefresh)&&t.vars.onRefresh(t)}),_refreshingAll=ScrollTrigger$1.isRefreshing=!1,_dispatch("refresh")},_lastScroll=0,_direction=1,_primary,_updateAll=function _updateAll(force){if(force===2||!_refreshingAll&&!_isReverted){ScrollTrigger$1.isUpdating=!0,_primary&&_primary.update(0);var l=_triggers.length,time=_getTime$1(),recordVelocity=time-_time1>=50,scroll=l&&_triggers[0].scroll();_direction=_lastScroll>scroll?-1:1,_refreshingAll||(_lastScroll=scroll),recordVelocity&&(_lastScrollTime&&!_pointerIsDown&&time-_lastScrollTime>200&&(_lastScrollTime=0,_dispatch("scrollEnd")),_time2=_time1,_time1=time);if(_direction<0){_i=l;while(_i-->0)_triggers[_i]&&_triggers[_i].update(0,recordVelocity);_direction=1}else for(_i=0;_i<l;_i++)_triggers[_i]&&_triggers[_i].update(0,recordVelocity);ScrollTrigger$1.isUpdating=!1}_rafID=0},_propNamesToCopy=[_left,_top,_bottom,_right,_margin+_Bottom,_margin+_Right,_margin+_Top,_margin+_Left,"display","flexShrink","float","zIndex","gridColumnStart","gridColumnEnd","gridRowStart","gridRowEnd","gridArea","justifySelf","alignSelf","placeSelf","order"],_stateProps=_propNamesToCopy.concat([_width,_height,"boxSizing","max"+_Width,"max"+_Height,"position",_margin,_padding,_padding+_Top,_padding+_Right,_padding+_Bottom,_padding+_Left]),_swapPinOut=function _swapPinOut(pin,spacer,state){_setState(state);var cache=pin._gsap;if(cache.spacerIsNative)_setState(cache.spacerState);else if(pin._gsap.swappedIn){var parent=spacer.parentNode;parent&&(parent.insertBefore(pin,spacer),parent.removeChild(spacer))}pin._gsap.swappedIn=!1},_swapPinIn=function _swapPinIn(pin,spacer,cs,spacerState){if(!pin._gsap.swappedIn){var i=_propNamesToCopy.length,spacerStyle=spacer.style,pinStyle=pin.style,p;while(i--)p=_propNamesToCopy[i],spacerStyle[p]=cs[p];spacerStyle.position=cs.position==="absolute"?"absolute":"relative",cs.display==="inline"&&(spacerStyle.display="inline-block"),pinStyle[_bottom]=pinStyle[_right]="auto",spacerStyle.flexBasis=cs.flexBasis||"auto",spacerStyle.overflow="visible",spacerStyle.boxSizing="border-box",spacerStyle[_width]=_getSize(pin,_horizontal)+_px,spacerStyle[_height]=_getSize(pin,_vertical)+_px,spacerStyle[_padding]=pinStyle[_margin]=pinStyle[_top]=pinStyle[_left]="0",_setState(spacerState),pinStyle[_width]=pinStyle["max"+_Width]=cs[_width],pinStyle[_height]=pinStyle["max"+_Height]=cs[_height],pinStyle[_padding]=cs[_padding],pin.parentNode!==spacer&&(pin.parentNode.insertBefore(spacer,pin),spacer.appendChild(pin)),pin._gsap.swappedIn=!0}},_capsExp=/([A-Z])/g,_setState=function _setState(state){if(state){var style=state.t.style,l=state.length,i=0,p,value;(state.t._gsap||gsap$1.core.getCache(state.t)).uncache=1;for(;i<l;i+=2)value=state[i+1],p=state[i],value?style[p]=value:style[p]&&style.removeProperty(p.replace(_capsExp,"-$1").toLowerCase())}},_getState=function _getState(element){var l=_stateProps.length,style=element.style,state=[],i=0;for(;i<l;i++)state.push(_stateProps[i],style[_stateProps[i]]);return state.t=element,state},_copyState=function _copyState(state,override,omitOffsets){var result=[],l=state.length,i=omitOffsets?8:0,p;for(;i<l;i+=2)p=state[i],result.push(p,p in override?override[p]:state[i+1]);return result.t=state.t,result},_winOffsets={left:0,top:0},_parsePosition=function _parsePosition(value,trigger,scrollerSize,direction,scroll,marker,markerScroller,self,scrollerBounds,borderWidth,useFixedPosition,scrollerMax,containerAnimation,clampZeroProp){_isFunction(value)&&(value=value(self)),_isString(value)&&value.substr(0,3)==="max"&&(value=scrollerMax+(value.charAt(4)==="="?_offsetToPx("0"+value.substr(3),scrollerSize):0));var time=containerAnimation?containerAnimation.time():0,p1,p2,element;containerAnimation&&containerAnimation.seek(0),isNaN(value)||(value=+value);if(!_isNumber(value)){_isFunction(trigger)&&(trigger=trigger(self));var offsets=(value||"0").split(" "),bounds,localOffset,globalOffset,display;element=_getTarget(trigger,self)||_body$1,bounds=_getBounds(element)||{},(!bounds||!bounds.left&&!bounds.top)&&_getComputedStyle(element).display==="none"&&(display=element.style.display,element.style.display="block",bounds=_getBounds(element),display?element.style.display=display:element.style.removeProperty("display")),localOffset=_offsetToPx(offsets[0],bounds[direction.d]),globalOffset=_offsetToPx(offsets[1]||"0",scrollerSize),value=bounds[direction.p]-scrollerBounds[direction.p]-borderWidth+localOffset+scroll-globalOffset,markerScroller&&_positionMarker(markerScroller,globalOffset,direction,scrollerSize-globalOffset<20||markerScroller._isStart&&globalOffset>20),scrollerSize-=scrollerSize-globalOffset}else containerAnimation&&(value=gsap$1.utils.mapRange(containerAnimation.scrollTrigger.start,containerAnimation.scrollTrigger.end,0,scrollerMax,value)),markerScroller&&_positionMarker(markerScroller,scrollerSize,direction,!0);clampZeroProp&&(self[clampZeroProp]=value||-0.001,value<0&&(value=0));if(marker){var position=value+scrollerSize,isStart=marker._isStart;p1="scroll"+direction.d2,_positionMarker(marker,position,direction,isStart&&position>20||!isStart&&(useFixedPosition?Math.max(_body$1[p1],_docEl$1[p1]):marker.parentNode[p1])<=position+1),useFixedPosition&&(scrollerBounds=_getBounds(markerScroller),useFixedPosition&&(marker.style[direction.op.p]=scrollerBounds[direction.op.p]-direction.op.m-marker._offset+_px))}return containerAnimation&&element&&(p1=_getBounds(element),containerAnimation.seek(scrollerMax),p2=_getBounds(element),containerAnimation._caScrollDist=p1[direction.p]-p2[direction.p],value=value/containerAnimation._caScrollDist*scrollerMax),containerAnimation&&containerAnimation.seek(time),containerAnimation?value:Math.round(value)},_prefixExp=/(webkit|moz|length|cssText|inset)/i,_reparent=function _reparent(element,parent,top,left){if(element.parentNode!==parent){var style=element.style,p,cs;if(parent===_body$1){element._stOrig=style.cssText,cs=_getComputedStyle(element);for(p in cs)!+p&&!_prefixExp.test(p)&&cs[p]&&typeof style[p]=="string"&&p!=="0"&&(style[p]=cs[p]);style.top=top,style.left=left}else style.cssText=element._stOrig;gsap$1.core.getCache(element).uncache=1,parent.appendChild(element)}},_interruptionTracker=function _interruptionTracker(getValueFunc,initialValue,onInterrupt){var last1=initialValue,last2=last1;return function(value){var current=Math.round(getValueFunc());return current!==last1&&current!==last2&&Math.abs(current-last1)>3&&Math.abs(current-last2)>3&&(value=current,onInterrupt&&onInterrupt()),last2=last1,last1=value,value}},_shiftMarker=function _shiftMarker(marker,direction,value){var vars={};vars[direction.p]="+="+value,gsap$1.set(marker,vars)},_getTweenCreator=function _getTweenCreator(scroller,direction){var getScroll=_getScrollFunc(scroller,direction),prop="_scroll"+direction.p2,getTween=function getTween(scrollTo,vars,initialValue,change1,change2){var tween=getTween.tween,onComplete=vars.onComplete,modifiers={};initialValue=initialValue||getScroll();var checkForInterruption=_interruptionTracker(getScroll,initialValue,function(){tween.kill(),getTween.tween=0});return change2=change1&&change2||0,change1=change1||scrollTo-initialValue,tween&&tween.kill(),vars[prop]=scrollTo,vars.inherit=!1,vars.modifiers=modifiers,modifiers[prop]=function(){return checkForInterruption(initialValue+change1*tween.ratio+change2*tween.ratio*tween.ratio)},vars.onUpdate=function(){_scrollers.cache++,getTween.tween&&_updateAll()},vars.onComplete=function(){getTween.tween=0,onComplete&&onComplete.call(tween)},tween=getTween.tween=gsap$1.to(scroller,vars),tween};return scroller[prop]=getScroll,getScroll.wheelHandler=function(){return getTween.tween&&getTween.tween.kill()&&(getTween.tween=0)},_addListener$1(scroller,"wheel",getScroll.wheelHandler),ScrollTrigger$1.isTouch&&_addListener$1(scroller,"touchmove",getScroll.wheelHandler),getTween},ScrollTrigger$1=function(){function ScrollTrigger(vars,animation){_coreInitted$1||ScrollTrigger.register(gsap$1)||console.warn("Please gsap.registerPlugin(ScrollTrigger)"),_context$1(this),this.init(vars,animation)}var _proto=ScrollTrigger.prototype;return _proto.init=function init(vars,animation){this.progress=this.start=0,this.vars&&this.kill(!0,!0);if(!_enabled){this.update=this.refresh=this.kill=_passThrough;return}vars=_setDefaults(_isString(vars)||_isNumber(vars)||vars.nodeType?{trigger:vars}:vars,_defaults);var _vars=vars,onUpdate=_vars.onUpdate,toggleClass=_vars.toggleClass,id=_vars.id,onToggle=_vars.onToggle,onRefresh=_vars.onRefresh,scrub=_vars.scrub,trigger=_vars.trigger,pin=_vars.pin,pinSpacing=_vars.pinSpacing,invalidateOnRefresh=_vars.invalidateOnRefresh,anticipatePin=_vars.anticipatePin,onScrubComplete=_vars.onScrubComplete,onSnapComplete=_vars.onSnapComplete,once=_vars.once,snap=_vars.snap,pinReparent=_vars.pinReparent,pinSpacer=_vars.pinSpacer,containerAnimation=_vars.containerAnimation,fastScrollEnd=_vars.fastScrollEnd,preventOverlaps=_vars.preventOverlaps,direction=vars.horizontal||vars.containerAnimation&&vars.horizontal!==!1?_horizontal:_vertical,isToggle=!scrub&&scrub!==0,scroller=_getTarget(vars.scroller||_win$1),scrollerCache=gsap$1.core.getCache(scroller),isViewport=_isViewport$1(scroller),useFixedPosition=("pinType"in vars?vars.pinType:_getProxyProp(scroller,"pinType")||isViewport&&"fixed")==="fixed",callbacks=[vars.onEnter,vars.onLeave,vars.onEnterBack,vars.onLeaveBack],toggleActions=isToggle&&vars.toggleActions.split(" "),markers="markers"in vars?vars.markers:_defaults.markers,borderWidth=isViewport?0:parseFloat(_getComputedStyle(scroller)["border"+direction.p2+_Width])||0,self=this,onRefreshInit=vars.onRefreshInit&&function(){return vars.onRefreshInit(self)},getScrollerSize=_getSizeFunc(scroller,isViewport,direction),getScrollerOffsets=_getOffsetsFunc(scroller,isViewport),lastSnap=0,lastRefresh=0,prevProgress=0,scrollFunc=_getScrollFunc(scroller,direction),tweenTo,pinCache,snapFunc,scroll1,scroll2,start,end,markerStart,markerEnd,markerStartTrigger,markerEndTrigger,markerVars,executingOnRefresh,change,pinOriginalState,pinActiveState,pinState,spacer,offset,pinGetter,pinSetter,pinStart,pinChange,spacingStart,spacerState,markerStartSetter,pinMoves,markerEndSetter,cs,snap1,snap2,scrubTween,scrubSmooth,snapDurClamp,snapDelayedCall,prevScroll,prevAnimProgress,caMarkerSetter,customRevertReturn;self._startClamp=self._endClamp=!1,self._dir=direction,anticipatePin*=45,self.scroller=scroller,self.scroll=containerAnimation?containerAnimation.time.bind(containerAnimation):scrollFunc,scroll1=scrollFunc(),self.vars=vars,animation=animation||vars.animation,"refreshPriority"in vars&&(_sort=1,vars.refreshPriority===-9999&&(_primary=self)),scrollerCache.tweenScroll=scrollerCache.tweenScroll||{top:_getTweenCreator(scroller,_vertical),left:_getTweenCreator(scroller,_horizontal)},self.tweenTo=tweenTo=scrollerCache.tweenScroll[direction.p],self.scrubDuration=function(value){scrubSmooth=_isNumber(value)&&value,scrubSmooth?scrubTween?scrubTween.duration(value):scrubTween=gsap$1.to(animation,{ease:"expo",totalProgress:"+=0",inherit:!1,duration:scrubSmooth,paused:!0,onComplete:function onComplete(){return onScrubComplete&&onScrubComplete(self)}}):(scrubTween&&scrubTween.progress(1).kill(),scrubTween=0)},animation&&(animation.vars.lazy=!1,animation._initted&&!self.isReverted||animation.vars.immediateRender!==!1&&vars.immediateRender!==!1&&animation.duration()&&animation.render(0,!0,!0),self.animation=animation.pause(),animation.scrollTrigger=self,self.scrubDuration(scrub),snap1=0,id||(id=animation.vars.id));if(snap){if(!_isObject(snap)||snap.push)snap={snapTo:snap};"scrollBehavior"in _body$1.style&&gsap$1.set(isViewport?[_body$1,_docEl$1]:scroller,{scrollBehavior:"auto"}),_scrollers.forEach(function(o){return _isFunction(o)&&o.target===(isViewport?_doc$1.scrollingElement||_docEl$1:scroller)&&(o.smooth=!1)}),snapFunc=_isFunction(snap.snapTo)?snap.snapTo:snap.snapTo==="labels"?_getClosestLabel(animation):snap.snapTo==="labelsDirectional"?_getLabelAtDirection(animation):snap.directional!==!1?function(value,st){return _snapDirectional(snap.snapTo)(value,_getTime$1()-lastRefresh<500?0:st.direction)}:gsap$1.utils.snap(snap.snapTo),snapDurClamp=snap.duration||{min:.1,max:2},snapDurClamp=_isObject(snapDurClamp)?_clamp$1(snapDurClamp.min,snapDurClamp.max):_clamp$1(snapDurClamp,snapDurClamp),snapDelayedCall=gsap$1.delayedCall(snap.delay||scrubSmooth/2||.1,function(){var scroll=scrollFunc(),refreshedRecently=_getTime$1()-lastRefresh<500,tween=tweenTo.tween;if((refreshedRecently||Math.abs(self.getVelocity())<10)&&!tween&&!_pointerIsDown&&lastSnap!==scroll){var progress=(scroll-start)/change,totalProgress=animation&&!isToggle?animation.totalProgress():progress,velocity=refreshedRecently?0:(totalProgress-snap2)/(_getTime$1()-_time2)*1e3||0,change1=gsap$1.utils.clamp(-progress,1-progress,_abs(velocity/2)*velocity/.185),naturalEnd=progress+(snap.inertia===!1?0:change1),endValue,endScroll,_snap=snap,onStart=_snap.onStart,_onInterrupt=_snap.onInterrupt,_onComplete=_snap.onComplete;endValue=snapFunc(naturalEnd,self),_isNumber(endValue)||(endValue=naturalEnd),endScroll=Math.round(start+endValue*change);if(scroll<=end&&scroll>=start&&endScroll!==scroll){if(tween&&!tween._initted&&tween.data<=_abs(endScroll-scroll))return;snap.inertia===!1&&(change1=endValue-progress),tweenTo(endScroll,{duration:snapDurClamp(_abs(Math.max(_abs(naturalEnd-totalProgress),_abs(endValue-totalProgress))*.185/velocity/.05||0)),ease:snap.ease||"power3",data:_abs(endScroll-scroll),onInterrupt:function onInterrupt(){return snapDelayedCall.restart(!0)&&_onInterrupt&&_onInterrupt(self)},onComplete:function onComplete(){self.update(),lastSnap=scrollFunc(),animation&&(scrubTween?scrubTween.resetTo("totalProgress",endValue,animation._tTime/animation._tDur):animation.progress(endValue)),snap1=snap2=animation&&!isToggle?animation.totalProgress():self.progress,onSnapComplete&&onSnapComplete(self),_onComplete&&_onComplete(self)}},scroll,change1*change,endScroll-scroll-change1*change),onStart&&onStart(self,tweenTo.tween)}}else self.isActive&&lastSnap!==scroll&&snapDelayedCall.restart(!0)}).pause()}id&&(_ids[id]=self),trigger=self.trigger=_getTarget(trigger||pin!==!0&&pin),customRevertReturn=trigger&&trigger._gsap&&trigger._gsap.stRevert,customRevertReturn&&(customRevertReturn=customRevertReturn(self)),pin=pin===!0?trigger:_getTarget(pin),_isString(toggleClass)&&(toggleClass={targets:trigger,className:toggleClass}),pin&&(pinSpacing===!1||pinSpacing===_margin||(pinSpacing=!pinSpacing&&pin.parentNode&&pin.parentNode.style&&_getComputedStyle(pin.parentNode).display==="flex"?!1:_padding),self.pin=pin,pinCache=gsap$1.core.getCache(pin),pinCache.spacer?pinOriginalState=pinCache.pinState:(pinSpacer&&(pinSpacer=_getTarget(pinSpacer),pinSpacer&&!pinSpacer.nodeType&&(pinSpacer=pinSpacer.current||pinSpacer.nativeElement),pinCache.spacerIsNative=!!pinSpacer,pinSpacer&&(pinCache.spacerState=_getState(pinSpacer))),pinCache.spacer=spacer=pinSpacer||_doc$1.createElement("div"),spacer.classList.add("pin-spacer"),id&&spacer.classList.add("pin-spacer-"+id),pinCache.pinState=pinOriginalState=_getState(pin)),vars.force3D!==!1&&gsap$1.set(pin,{force3D:!0}),self.spacer=spacer=pinCache.spacer,cs=_getComputedStyle(pin),spacingStart=cs[pinSpacing+direction.os2],pinGetter=gsap$1.getProperty(pin),pinSetter=gsap$1.quickSetter(pin,direction.a,_px),_swapPinIn(pin,spacer,cs),pinState=_getState(pin));if(markers){markerVars=_isObject(markers)?_setDefaults(markers,_markerDefaults):_markerDefaults,markerStartTrigger=_createMarker("scroller-start",id,scroller,direction,markerVars,0),markerEndTrigger=_createMarker("scroller-end",id,scroller,direction,markerVars,0,markerStartTrigger),offset=markerStartTrigger["offset"+direction.op.d2];var content=_getTarget(_getProxyProp(scroller,"content")||scroller);markerStart=this.markerStart=_createMarker("start",id,content,direction,markerVars,offset,0,containerAnimation),markerEnd=this.markerEnd=_createMarker("end",id,content,direction,markerVars,offset,0,containerAnimation),containerAnimation&&(caMarkerSetter=gsap$1.quickSetter([markerStart,markerEnd],direction.a,_px)),!useFixedPosition&&(!_proxies.length||_getProxyProp(scroller,"fixedMarkers")!==!0)&&(_makePositionable(isViewport?_body$1:scroller),gsap$1.set([markerStartTrigger,markerEndTrigger],{force3D:!0}),markerStartSetter=gsap$1.quickSetter(markerStartTrigger,direction.a,_px),markerEndSetter=gsap$1.quickSetter(markerEndTrigger,direction.a,_px))}if(containerAnimation){var oldOnUpdate=containerAnimation.vars.onUpdate,oldParams=containerAnimation.vars.onUpdateParams;containerAnimation.eventCallback("onUpdate",function(){self.update(0,0,1),oldOnUpdate&&oldOnUpdate.apply(containerAnimation,oldParams||[])})}self.previous=function(){return _triggers[_triggers.indexOf(self)-1]},self.next=function(){return _triggers[_triggers.indexOf(self)+1]},self.revert=function(revert,temp){if(!temp)return self.kill(!0);var r=revert!==!1||!self.enabled,prevRefreshing=_refreshing;r!==self.isReverted&&(r&&(prevScroll=Math.max(scrollFunc(),self.scroll.rec||0),prevProgress=self.progress,prevAnimProgress=animation&&animation.progress()),markerStart&&[markerStart,markerEnd,markerStartTrigger,markerEndTrigger].forEach(function(m){return m.style.display=r?"none":"block"}),r&&(_refreshing=self,self.update(r)),pin&&(!pinReparent||!self.isActive)&&(r?_swapPinOut(pin,spacer,pinOriginalState):_swapPinIn(pin,spacer,_getComputedStyle(pin),spacerState)),r||self.update(r),_refreshing=prevRefreshing,self.isReverted=r)},self.refresh=function(soft,force,position,pinOffset){if((_refreshing||!self.enabled)&&!force)return;if(pin&&soft&&_lastScrollTime){_addListener$1(ScrollTrigger,"scrollEnd",_softRefresh);return}!_refreshingAll&&onRefreshInit&&onRefreshInit(self),_refreshing=self,tweenTo.tween&&!position&&(tweenTo.tween.kill(),tweenTo.tween=0),scrubTween&&scrubTween.pause(),invalidateOnRefresh&&animation&&animation.revert({kill:!1}).invalidate(),self.isReverted||self.revert(!0,!0),self._subPinOffset=!1;var size=getScrollerSize(),scrollerBounds=getScrollerOffsets(),max=containerAnimation?containerAnimation.duration():_maxScroll(scroller,direction),isFirstRefresh=change<=.01,offset=0,otherPinOffset=pinOffset||0,parsedEnd=_isObject(position)?position.end:vars.end,parsedEndTrigger=vars.endTrigger||trigger,parsedStart=_isObject(position)?position.start:vars.start||(vars.start===0||!trigger?0:pin?"0 0":"0 100%"),pinnedContainer=self.pinnedContainer=vars.pinnedContainer&&_getTarget(vars.pinnedContainer,self),triggerIndex=trigger&&Math.max(0,_triggers.indexOf(self))||0,i=triggerIndex,cs,bounds,scroll,isVertical,override,curTrigger,curPin,oppositeScroll,initted,revertedPins,forcedOverflow,markerStartOffset,markerEndOffset;markers&&_isObject(position)&&(markerStartOffset=gsap$1.getProperty(markerStartTrigger,direction.p),markerEndOffset=gsap$1.getProperty(markerEndTrigger,direction.p));while(i--)curTrigger=_triggers[i],curTrigger.end||curTrigger.refresh(0,1)||(_refreshing=self),curPin=curTrigger.pin,curPin&&(curPin===trigger||curPin===pin||curPin===pinnedContainer)&&!curTrigger.isReverted&&(revertedPins||(revertedPins=[]),revertedPins.unshift(curTrigger),curTrigger.revert(!0,!0)),curTrigger!==_triggers[i]&&(triggerIndex--,i--);_isFunction(parsedStart)&&(parsedStart=parsedStart(self)),parsedStart=_parseClamp(parsedStart,"start",self),start=_parsePosition(parsedStart,trigger,size,direction,scrollFunc(),markerStart,markerStartTrigger,self,scrollerBounds,borderWidth,useFixedPosition,max,containerAnimation,self._startClamp&&"_startClamp")||(pin?-0.001:0),_isFunction(parsedEnd)&&(parsedEnd=parsedEnd(self)),_isString(parsedEnd)&&!parsedEnd.indexOf("+=")&&(~parsedEnd.indexOf(" ")?parsedEnd=(_isString(parsedStart)?parsedStart.split(" ")[0]:"")+parsedEnd:(offset=_offsetToPx(parsedEnd.substr(2),size),parsedEnd=_isString(parsedStart)?parsedStart:(containerAnimation?gsap$1.utils.mapRange(0,containerAnimation.duration(),containerAnimation.scrollTrigger.start,containerAnimation.scrollTrigger.end,start):start)+offset,parsedEndTrigger=trigger)),parsedEnd=_parseClamp(parsedEnd,"end",self),end=Math.max(start,_parsePosition(parsedEnd||(parsedEndTrigger?"100% 0":max),parsedEndTrigger,size,direction,scrollFunc()+offset,markerEnd,markerEndTrigger,self,scrollerBounds,borderWidth,useFixedPosition,max,containerAnimation,self._endClamp&&"_endClamp"))||-0.001,offset=0,i=triggerIndex;while(i--)curTrigger=_triggers[i],curPin=curTrigger.pin,curPin&&curTrigger.start-curTrigger._pinPush<=start&&!containerAnimation&&curTrigger.end>0&&(cs=curTrigger.end-(self._startClamp?Math.max(0,curTrigger.start):curTrigger.start),(curPin===trigger&&curTrigger.start-curTrigger._pinPush<start||curPin===pinnedContainer)&&isNaN(parsedStart)&&(offset+=cs*(1-curTrigger.progress)),curPin===pin&&(otherPinOffset+=cs));start+=offset,end+=offset,self._startClamp&&(self._startClamp+=offset),self._endClamp&&!_refreshingAll&&(self._endClamp=end||-0.001,end=Math.min(end,_maxScroll(scroller,direction))),change=end-start||(start-=.01)&&.001,isFirstRefresh&&(prevProgress=gsap$1.utils.clamp(0,1,gsap$1.utils.normalize(start,end,prevScroll))),self._pinPush=otherPinOffset,markerStart&&offset&&(cs={},cs[direction.a]="+="+offset,pinnedContainer&&(cs[direction.p]="-="+scrollFunc()),gsap$1.set([markerStart,markerEnd],cs));if(pin&&!(_clampingMax&&self.end>=_maxScroll(scroller,direction)))cs=_getComputedStyle(pin),isVertical=direction===_vertical,scroll=scrollFunc(),pinStart=parseFloat(pinGetter(direction.a))+otherPinOffset,!max&&end>1&&(forcedOverflow=(isViewport?_doc$1.scrollingElement||_docEl$1:scroller).style,forcedOverflow={style:forcedOverflow,value:forcedOverflow["overflow"+direction.a.toUpperCase()]},isViewport&&_getComputedStyle(_body$1)["overflow"+direction.a.toUpperCase()]!=="scroll"&&(forcedOverflow.style["overflow"+direction.a.toUpperCase()]="scroll")),_swapPinIn(pin,spacer,cs),pinState=_getState(pin),bounds=_getBounds(pin,!0),oppositeScroll=useFixedPosition&&_getScrollFunc(scroller,isVertical?_horizontal:_vertical)(),pinSpacing?(spacerState=[pinSpacing+direction.os2,change+otherPinOffset+_px],spacerState.t=spacer,i=pinSpacing===_padding?_getSize(pin,direction)+change+otherPinOffset:0,i&&(spacerState.push(direction.d,i+_px),spacer.style.flexBasis!=="auto"&&(spacer.style.flexBasis=i+_px)),_setState(spacerState),pinnedContainer&&_triggers.forEach(function(t){t.pin===pinnedContainer&&t.vars.pinSpacing!==!1&&(t._subPinOffset=!0)}),useFixedPosition&&scrollFunc(prevScroll)):(i=_getSize(pin,direction),i&&spacer.style.flexBasis!=="auto"&&(spacer.style.flexBasis=i+_px)),useFixedPosition&&(override={top:bounds.top+(isVertical?scroll-start:oppositeScroll)+_px,left:bounds.left+(isVertical?oppositeScroll:scroll-start)+_px,boxSizing:"border-box",position:"fixed"},override[_width]=override["max"+_Width]=Math.ceil(bounds.width)+_px,override[_height]=override["max"+_Height]=Math.ceil(bounds.height)+_px,override[_margin]=override[_margin+_Top]=override[_margin+_Right]=override[_margin+_Bottom]=override[_margin+_Left]="0",override[_padding]=cs[_padding],override[_padding+_Top]=cs[_padding+_Top],override[_padding+_Right]=cs[_padding+_Right],override[_padding+_Bottom]=cs[_padding+_Bottom],override[_padding+_Left]=cs[_padding+_Left],pinActiveState=_copyState(pinOriginalState,override,pinReparent),_refreshingAll&&scrollFunc(0)),animation?(initted=animation._initted,_suppressOverwrites(1),animation.render(animation.duration(),!0,!0),pinChange=pinGetter(direction.a)-pinStart+change+otherPinOffset,pinMoves=Math.abs(change-pinChange)>1,useFixedPosition&&pinMoves&&pinActiveState.splice(pinActiveState.length-2,2),animation.render(0,!0,!0),initted||animation.invalidate(!0),animation.parent||animation.totalTime(animation.totalTime()),_suppressOverwrites(0)):pinChange=change,forcedOverflow&&(forcedOverflow.value?forcedOverflow.style["overflow"+direction.a.toUpperCase()]=forcedOverflow.value:forcedOverflow.style.removeProperty("overflow-"+direction.a));else if(trigger&&scrollFunc()&&!containerAnimation){bounds=trigger.parentNode;while(bounds&&bounds!==_body$1)bounds._pinOffset&&(start-=bounds._pinOffset,end-=bounds._pinOffset),bounds=bounds.parentNode}revertedPins&&revertedPins.forEach(function(t){return t.revert(!1,!0)}),self.start=start,self.end=end,scroll1=scroll2=_refreshingAll?prevScroll:scrollFunc(),!containerAnimation&&!_refreshingAll&&(scroll1<prevScroll&&scrollFunc(prevScroll),self.scroll.rec=0),self.revert(!1,!0),lastRefresh=_getTime$1(),snapDelayedCall&&(lastSnap=-1,snapDelayedCall.restart(!0)),_refreshing=0,animation&&isToggle&&(animation._initted||prevAnimProgress)&&animation.progress()!==prevAnimProgress&&animation.progress(prevAnimProgress||0,!0).render(animation.time(),!0,!0);if(isFirstRefresh||prevProgress!==self.progress||containerAnimation||invalidateOnRefresh)animation&&!isToggle&&animation.totalProgress(containerAnimation&&start<-0.001&&!prevProgress?gsap$1.utils.normalize(start,end,0):prevProgress,!0),self.progress=isFirstRefresh||(scroll1-start)/change===prevProgress?0:prevProgress;pin&&pinSpacing&&(spacer._pinOffset=Math.round(self.progress*pinChange)),scrubTween&&scrubTween.invalidate(),isNaN(markerStartOffset)||(markerStartOffset-=gsap$1.getProperty(markerStartTrigger,direction.p),markerEndOffset-=gsap$1.getProperty(markerEndTrigger,direction.p),_shiftMarker(markerStartTrigger,direction,markerStartOffset),_shiftMarker(markerStart,direction,markerStartOffset-(pinOffset||0)),_shiftMarker(markerEndTrigger,direction,markerEndOffset),_shiftMarker(markerEnd,direction,markerEndOffset-(pinOffset||0))),isFirstRefresh&&!_refreshingAll&&self.update(),onRefresh&&!_refreshingAll&&!executingOnRefresh&&(executingOnRefresh=!0,onRefresh(self),executingOnRefresh=!1)},self.getVelocity=function(){return(scrollFunc()-scroll2)/(_getTime$1()-_time2)*1e3||0},self.endAnimation=function(){_endAnimation(self.callbackAnimation),animation&&(scrubTween?scrubTween.progress(1):animation.paused()?isToggle||_endAnimation(animation,self.direction<0,1):_endAnimation(animation,animation.reversed()))},self.labelToScroll=function(label){return animation&&animation.labels&&(start||self.refresh()||start)+animation.labels[label]/animation.duration()*change||0},self.getTrailing=function(name){var i=_triggers.indexOf(self),a=self.direction>0?_triggers.slice(0,i).reverse():_triggers.slice(i+1);return(_isString(name)?a.filter(function(t){return t.vars.preventOverlaps===name}):a).filter(function(t){return self.direction>0?t.end<=start:t.start>=end})},self.update=function(reset,recordVelocity,forceFake){if(containerAnimation&&!forceFake&&!reset)return;var scroll=_refreshingAll===!0?prevScroll:self.scroll(),p=reset?0:(scroll-start)/change,clipped=p<0?0:p>1?1:p||0,prevProgress=self.progress,isActive,wasActive,toggleState,action,stateChanged,toggled,isAtMax,isTakingAction;recordVelocity&&(scroll2=scroll1,scroll1=containerAnimation?scrollFunc():scroll,snap&&(snap2=snap1,snap1=animation&&!isToggle?animation.totalProgress():clipped)),anticipatePin&&pin&&!_refreshing&&!_startup$1&&_lastScrollTime&&(!clipped&&start<scroll+(scroll-scroll2)/(_getTime$1()-_time2)*anticipatePin?clipped=1e-4:clipped===1&&end>scroll+(scroll-scroll2)/(_getTime$1()-_time2)*anticipatePin&&(clipped=.9999));if(clipped!==prevProgress&&self.enabled){isActive=self.isActive=!!clipped&&clipped<1,wasActive=!!prevProgress&&prevProgress<1,toggled=isActive!==wasActive,stateChanged=toggled||!!clipped!=!!prevProgress,self.direction=clipped>prevProgress?1:-1,self.progress=clipped,stateChanged&&!_refreshing&&(toggleState=clipped&&!prevProgress?0:clipped===1?1:prevProgress===1?2:3,isToggle&&(action=!toggled&&toggleActions[toggleState+1]!=="none"&&toggleActions[toggleState+1]||toggleActions[toggleState],isTakingAction=animation&&(action==="complete"||action==="reset"||action in animation))),preventOverlaps&&(toggled||isTakingAction)&&(isTakingAction||scrub||!animation)&&(_isFunction(preventOverlaps)?preventOverlaps(self):self.getTrailing(preventOverlaps).forEach(function(t){return t.endAnimation()})),isToggle||(scrubTween&&!_refreshing&&!_startup$1?(scrubTween._dp._time-scrubTween._start!==scrubTween._time&&scrubTween.render(scrubTween._dp._time-scrubTween._start),scrubTween.resetTo?scrubTween.resetTo("totalProgress",clipped,animation._tTime/animation._tDur):(scrubTween.vars.totalProgress=clipped,scrubTween.invalidate().restart())):animation&&animation.totalProgress(clipped,!(!_refreshing||!lastRefresh&&!reset)));if(pin){reset&&pinSpacing&&(spacer.style[pinSpacing+direction.os2]=spacingStart);if(!useFixedPosition)pinSetter(_round(pinStart+pinChange*clipped));else if(stateChanged){isAtMax=!reset&&clipped>prevProgress&&end+1>scroll&&scroll+1>=_maxScroll(scroller,direction);if(pinReparent)if(!reset&&(isActive||isAtMax)){var bounds=_getBounds(pin,!0),_offset=scroll-start;_reparent(pin,_body$1,bounds.top+(direction===_vertical?_offset:0)+_px,bounds.left+(direction===_vertical?0:_offset)+_px)}else _reparent(pin,spacer);_setState(isActive||isAtMax?pinActiveState:pinState),pinMoves&&clipped<1&&isActive||pinSetter(pinStart+(clipped===1&&!isAtMax?pinChange:0))}}snap&&!tweenTo.tween&&!_refreshing&&!_startup$1&&snapDelayedCall.restart(!0),toggleClass&&(toggled||once&&clipped&&(clipped<1||!_limitCallbacks))&&_toArray(toggleClass.targets).forEach(function(el){return el.classList[isActive||once?"add":"remove"](toggleClass.className)}),onUpdate&&!isToggle&&!reset&&onUpdate(self);if(stateChanged&&!_refreshing){isToggle&&(isTakingAction&&(action==="complete"?animation.pause().totalProgress(1):action==="reset"?animation.restart(!0).pause():action==="restart"?animation.restart(!0):animation[action]()),onUpdate&&onUpdate(self));if(toggled||!_limitCallbacks)onToggle&&toggled&&_callback(self,onToggle),callbacks[toggleState]&&_callback(self,callbacks[toggleState]),once&&(clipped===1?self.kill(!1,1):callbacks[toggleState]=0),toggled||(toggleState=clipped===1?1:3,callbacks[toggleState]&&_callback(self,callbacks[toggleState]));fastScrollEnd&&!isActive&&Math.abs(self.getVelocity())>(_isNumber(fastScrollEnd)?fastScrollEnd:2500)&&(_endAnimation(self.callbackAnimation),scrubTween?scrubTween.progress(1):_endAnimation(animation,action==="reverse"?1:!clipped,1))}else isToggle&&onUpdate&&!_refreshing&&onUpdate(self)}if(markerEndSetter){var n=containerAnimation?scroll/containerAnimation.duration()*(containerAnimation._caScrollDist||0):scroll;markerStartSetter(n+(markerStartTrigger._isFlipped?1:0)),markerEndSetter(n)}caMarkerSetter&&caMarkerSetter(-scroll/containerAnimation.duration()*(containerAnimation._caScrollDist||0))},self.enable=function(reset,refresh){self.enabled||(self.enabled=!0,_addListener$1(scroller,"resize",_onResize),isViewport||_addListener$1(scroller,"scroll",_onScroll$1),onRefreshInit&&_addListener$1(ScrollTrigger,"refreshInit",onRefreshInit),reset!==!1&&(self.progress=prevProgress=0,scroll1=scroll2=lastSnap=scrollFunc()),refresh!==!1&&self.refresh())},self.getTween=function(snap){return snap&&tweenTo?tweenTo.tween:scrubTween},self.setPositions=function(newStart,newEnd,keepClamp,pinOffset){if(containerAnimation){var st=containerAnimation.scrollTrigger,duration=containerAnimation.duration(),_change=st.end-st.start;newStart=st.start+_change*newStart/duration,newEnd=st.start+_change*newEnd/duration}self.refresh(!1,!1,{start:_keepClamp(newStart,keepClamp&&!!self._startClamp),end:_keepClamp(newEnd,keepClamp&&!!self._endClamp)},pinOffset),self.update()},self.adjustPinSpacing=function(amount){if(spacerState&&amount){var i=spacerState.indexOf(direction.d)+1;spacerState[i]=parseFloat(spacerState[i])+amount+_px,spacerState[1]=parseFloat(spacerState[1])+amount+_px,_setState(spacerState)}},self.disable=function(reset,allowAnimation){if(self.enabled){reset!==!1&&self.revert(!0,!0),self.enabled=self.isActive=!1,allowAnimation||scrubTween&&scrubTween.pause(),prevScroll=0,pinCache&&(pinCache.uncache=1),onRefreshInit&&_removeListener$1(ScrollTrigger,"refreshInit",onRefreshInit),snapDelayedCall&&(snapDelayedCall.pause(),tweenTo.tween&&tweenTo.tween.kill()&&(tweenTo.tween=0));if(!isViewport){var i=_triggers.length;while(i--)if(_triggers[i].scroller===scroller&&_triggers[i]!==self)return;_removeListener$1(scroller,"resize",_onResize),isViewport||_removeListener$1(scroller,"scroll",_onScroll$1)}}},self.kill=function(revert,allowAnimation){self.disable(revert,allowAnimation),scrubTween&&!allowAnimation&&scrubTween.kill(),id&&delete _ids[id];var i=_triggers.indexOf(self);i>=0&&_triggers.splice(i,1),i===_i&&_direction>0&&_i--,i=0,_triggers.forEach(function(t){return t.scroller===self.scroller&&(i=1)}),i||_refreshingAll||(self.scroll.rec=0),animation&&(animation.scrollTrigger=null,revert&&animation.revert({kill:!1}),allowAnimation||animation.kill()),markerStart&&[markerStart,markerEnd,markerStartTrigger,markerEndTrigger].forEach(function(m){return m.parentNode&&m.parentNode.removeChild(m)}),_primary===self&&(_primary=0),pin&&(pinCache&&(pinCache.uncache=1),i=0,_triggers.forEach(function(t){return t.pin===pin&&i++}),i||(pinCache.spacer=0)),vars.onKill&&vars.onKill(self)},_triggers.push(self),self.enable(!1,!1),customRevertReturn&&customRevertReturn(self);if(animation&&animation.add&&!change){var updateFunc=self.update;self.update=function(){self.update=updateFunc,start||end||self.refresh()},gsap$1.delayedCall(.01,self.update),change=.01,start=end=0}else self.refresh();pin&&_queueRefreshAll()},ScrollTrigger.register=function register(core){return _coreInitted$1||(gsap$1=core||_getGSAP$1(),_windowExists()&&window.document&&ScrollTrigger.enable(),_coreInitted$1=_enabled),_coreInitted$1},ScrollTrigger.defaults=function defaults(config){if(config)for(var p in config)_defaults[p]=config[p];return _defaults},ScrollTrigger.disable=function disable(reset,kill){_enabled=0,_triggers.forEach(function(trigger){return trigger[kill?"kill":"disable"](reset)}),_removeListener$1(_win$1,"wheel",_onScroll$1),_removeListener$1(_doc$1,"scroll",_onScroll$1),clearInterval(_syncInterval),_removeListener$1(_doc$1,"touchcancel",_passThrough),_removeListener$1(_body$1,"touchstart",_passThrough),_multiListener(_removeListener$1,_doc$1,"pointerdown,touchstart,mousedown",_pointerDownHandler),_multiListener(_removeListener$1,_doc$1,"pointerup,touchend,mouseup",_pointerUpHandler),_resizeDelay.kill(),_iterateAutoRefresh(_removeListener$1);for(var i=0;i<_scrollers.length;i+=3)_wheelListener(_removeListener$1,_scrollers[i],_scrollers[i+1]),_wheelListener(_removeListener$1,_scrollers[i],_scrollers[i+2])},ScrollTrigger.enable=function enable(){_win$1=window,_doc$1=document,_docEl$1=_doc$1.documentElement,_body$1=_doc$1.body;if(gsap$1){_toArray=gsap$1.utils.toArray,_clamp$1=gsap$1.utils.clamp,_context$1=gsap$1.core.context||_passThrough,_suppressOverwrites=gsap$1.core.suppressOverwrites||_passThrough,_scrollRestoration=_win$1.history.scrollRestoration||"auto",_lastScroll=_win$1.pageYOffset,gsap$1.core.globals("ScrollTrigger",ScrollTrigger);if(_body$1){_enabled=1,_div100vh=document.createElement("div"),_div100vh.style.height="100vh",_div100vh.style.position="absolute",_refresh100vh(),_rafBugFix(),Observer.register(gsap$1),ScrollTrigger.isTouch=Observer.isTouch,_fixIOSBug=Observer.isTouch&&/(iPad|iPhone|iPod|Mac)/g.test(navigator.userAgent),_ignoreMobileResize=Observer.isTouch===1,_addListener$1(_win$1,"wheel",_onScroll$1),_root$1=[_win$1,_doc$1,_docEl$1,_body$1],gsap$1.matchMedia?(ScrollTrigger.matchMedia=function(vars){var mm=gsap$1.matchMedia(),p;for(p in vars)mm.add(p,vars[p]);return mm},gsap$1.addEventListener("matchMediaInit",function(){return _revertAll()}),gsap$1.addEventListener("matchMediaRevert",function(){return _revertRecorded()}),gsap$1.addEventListener("matchMedia",function(){_refreshAll(0,1),_dispatch("matchMedia")}),gsap$1.matchMedia("(orientation: portrait)",function(){return _setBaseDimensions(),_setBaseDimensions})):console.warn("Requires GSAP 3.11.0 or later"),_setBaseDimensions(),_addListener$1(_doc$1,"scroll",_onScroll$1);var bodyStyle=_body$1.style,border=bodyStyle.borderTopStyle,AnimationProto=gsap$1.core.Animation.prototype,bounds,i;AnimationProto.revert||Object.defineProperty(AnimationProto,"revert",{value:function value(){return this.time(-0.01,!0)}}),bodyStyle.borderTopStyle="solid",bounds=_getBounds(_body$1),_vertical.m=Math.round(bounds.top+_vertical.sc())||0,_horizontal.m=Math.round(bounds.left+_horizontal.sc())||0,border?bodyStyle.borderTopStyle=border:bodyStyle.removeProperty("border-top-style"),_syncInterval=setInterval(_sync,250),gsap$1.delayedCall(.5,function(){return _startup$1=0}),_addListener$1(_doc$1,"touchcancel",_passThrough),_addListener$1(_body$1,"touchstart",_passThrough),_multiListener(_addListener$1,_doc$1,"pointerdown,touchstart,mousedown",_pointerDownHandler),_multiListener(_addListener$1,_doc$1,"pointerup,touchend,mouseup",_pointerUpHandler),_transformProp=gsap$1.utils.checkPrefix("transform"),_stateProps.push(_transformProp),_coreInitted$1=_getTime$1(),_resizeDelay=gsap$1.delayedCall(.2,_refreshAll).pause(),_autoRefresh=[_doc$1,"visibilitychange",function(){var w=_win$1.innerWidth,h=_win$1.innerHeight;_doc$1.hidden?(_prevWidth=w,_prevHeight=h):(_prevWidth!==w||_prevHeight!==h)&&_onResize()},_doc$1,"DOMContentLoaded",_refreshAll,_win$1,"load",_refreshAll,_win$1,"resize",_onResize],_iterateAutoRefresh(_addListener$1),_triggers.forEach(function(trigger){return trigger.enable(0,1)});for(i=0;i<_scrollers.length;i+=3)_wheelListener(_removeListener$1,_scrollers[i],_scrollers[i+1]),_wheelListener(_removeListener$1,_scrollers[i],_scrollers[i+2])}}},ScrollTrigger.config=function config(vars){"limitCallbacks"in vars&&(_limitCallbacks=!!vars.limitCallbacks);var ms=vars.syncInterval;ms&&clearInterval(_syncInterval)||(_syncInterval=ms)&&setInterval(_sync,ms),"ignoreMobileResize"in vars&&(_ignoreMobileResize=ScrollTrigger.isTouch===1&&vars.ignoreMobileResize),"autoRefreshEvents"in vars&&(_iterateAutoRefresh(_removeListener$1)||_iterateAutoRefresh(_addListener$1,vars.autoRefreshEvents||"none"),_ignoreResize=(vars.autoRefreshEvents+"").indexOf("resize")===-1)},ScrollTrigger.scrollerProxy=function scrollerProxy(target,vars){var t=_getTarget(target),i=_scrollers.indexOf(t),isViewport=_isViewport$1(t);~i&&_scrollers.splice(i,isViewport?6:2),vars&&(isViewport?_proxies.unshift(_win$1,vars,_body$1,vars,_docEl$1,vars):_proxies.unshift(t,vars))},ScrollTrigger.clearMatchMedia=function clearMatchMedia(query){_triggers.forEach(function(t){return t._ctx&&t._ctx.query===query&&t._ctx.kill(!0,!0)})},ScrollTrigger.isInViewport=function isInViewport(element,ratio,horizontal){var bounds=(_isString(element)?_getTarget(element):element).getBoundingClientRect(),offset=bounds[horizontal?_width:_height]*ratio||0;return horizontal?bounds.right-offset>0&&bounds.left+offset<_win$1.innerWidth:bounds.bottom-offset>0&&bounds.top+offset<_win$1.innerHeight},ScrollTrigger.positionInViewport=function positionInViewport(element,referencePoint,horizontal){_isString(element)&&(element=_getTarget(element));var bounds=element.getBoundingClientRect(),size=bounds[horizontal?_width:_height],offset=referencePoint==null?size/2:referencePoint in _keywords?_keywords[referencePoint]*size:~referencePoint.indexOf("%")?parseFloat(referencePoint)*size/100:parseFloat(referencePoint)||0;return horizontal?(bounds.left+offset)/_win$1.innerWidth:(bounds.top+offset)/_win$1.innerHeight},ScrollTrigger.killAll=function killAll(allowListeners){_triggers.slice(0).forEach(function(t){return t.vars.id!=="ScrollSmoother"&&t.kill()});if(allowListeners!==!0){var listeners=_listeners.killAll||[];_listeners={},listeners.forEach(function(f){return f()})}},ScrollTrigger}();ScrollTrigger$1.version="3.12.5",ScrollTrigger$1.saveStyles=function(targets){return targets?_toArray(targets).forEach(function(target){if(target&&target.style){var i=_savedStyles.indexOf(target);i>=0&&_savedStyles.splice(i,5),_savedStyles.push(target,target.style.cssText,target.getBBox&&target.getAttribute("transform"),gsap$1.core.getCache(target),_context$1())}}):_savedStyles},ScrollTrigger$1.revert=function(soft,media){return _revertAll(!soft,media)},ScrollTrigger$1.create=function(vars,animation){return new ScrollTrigger$1(vars,animation)},ScrollTrigger$1.refresh=function(safe){return safe?_onResize():(_coreInitted$1||ScrollTrigger$1.register())&&_refreshAll(!0)},ScrollTrigger$1.update=function(force){return++_scrollers.cache&&_updateAll(force===!0?2:0)},ScrollTrigger$1.clearScrollMemory=_clearScrollMemory,ScrollTrigger$1.maxScroll=function(element,horizontal){return _maxScroll(element,horizontal?_horizontal:_vertical)},ScrollTrigger$1.getScrollFunc=function(element,horizontal){return _getScrollFunc(_getTarget(element),horizontal?_horizontal:_vertical)},ScrollTrigger$1.getById=function(id){return _ids[id]},ScrollTrigger$1.getAll=function(){return _triggers.filter(function(t){return t.vars.id!=="ScrollSmoother"})},ScrollTrigger$1.isScrolling=function(){return!!_lastScrollTime},ScrollTrigger$1.snapDirectional=_snapDirectional,ScrollTrigger$1.addEventListener=function(type,callback){var a=_listeners[type]||(_listeners[type]=[]);~a.indexOf(callback)||a.push(callback)},ScrollTrigger$1.removeEventListener=function(type,callback){var a=_listeners[type],i=a&&a.indexOf(callback);i>=0&&a.splice(i,1)},ScrollTrigger$1.batch=function(targets,vars){var result=[],varsCopy={},interval=vars.interval||.016,batchMax=vars.batchMax||1e9,proxyCallback=function proxyCallback(type,callback){var elements=[],triggers=[],delay=gsap$1.delayedCall(interval,function(){callback(elements,triggers),elements=[],triggers=[]}).pause();return function(self){elements.length||delay.restart(!0),elements.push(self.trigger),triggers.push(self),batchMax<=elements.length&&delay.progress(1)}},p;for(p in vars)varsCopy[p]=p.substr(0,2)==="on"&&_isFunction(vars[p])&&p!=="onRefreshInit"?proxyCallback(p,vars[p]):vars[p];return _isFunction(batchMax)&&(batchMax=batchMax(),_addListener$1(ScrollTrigger$1,"refresh",function(){return batchMax=vars.batchMax()})),_toArray(targets).forEach(function(target){var config={};for(p in varsCopy)config[p]=varsCopy[p];config.trigger=target,result.push(ScrollTrigger$1.create(config))}),result};var _clampScrollAndGetDurationMultiplier=function _clampScrollAndGetDurationMultiplier(scrollFunc,current,end,max){return current>max?scrollFunc(max):current<0&&scrollFunc(0),end>max?(max-current)/(end-current):end<0?current/(current-end):1},_allowNativePanning=function _allowNativePanning(target,direction){direction===!0?target.style.removeProperty("touch-action"):target.style.touchAction=direction===!0?"auto":direction?"pan-"+direction+(Observer.isTouch?" pinch-zoom":""):"none",target===_docEl$1&&_allowNativePanning(_body$1,direction)},_overflow={auto:1,scroll:1},_nestedScroll=function _nestedScroll(_ref5){var event=_ref5.event,target=_ref5.target,axis=_ref5.axis,node=(event.changedTouches?event.changedTouches[0]:event).target,cache=node._gsap||gsap$1.core.getCache(node),time=_getTime$1(),cs;if(!cache._isScrollT||time-cache._isScrollT>2e3){while(node&&node!==_body$1&&(node.scrollHeight<=node.clientHeight&&node.scrollWidth<=node.clientWidth||!_overflow[(cs=_getComputedStyle(node)).overflowY]&&!_overflow[cs.overflowX]))node=node.parentNode;cache._isScroll=node&&node!==target&&!_isViewport$1(node)&&(_overflow[(cs=_getComputedStyle(node)).overflowY]||_overflow[cs.overflowX]),cache._isScrollT=time}if(cache._isScroll||axis==="x")event.stopPropagation(),event._gsapAllow=!0},_inputObserver=function _inputObserver(target,type,inputs,nested){return Observer.create({target:target,capture:!0,debounce:!1,lockAxis:!0,type:type,onWheel:nested=nested&&_nestedScroll,onPress:nested,onDrag:nested,onScroll:nested,onEnable:function onEnable(){return inputs&&_addListener$1(_doc$1,Observer.eventTypes[0],_captureInputs,!1,!0)},onDisable:function onDisable(){return _removeListener$1(_doc$1,Observer.eventTypes[0],_captureInputs,!0)}})},_inputExp=/(input|label|select|textarea)/i,_inputIsFocused,_captureInputs=function _captureInputs(e){var isInput=_inputExp.test(e.target.tagName);if(isInput||_inputIsFocused)e._gsapAllow=!0,_inputIsFocused=isInput},_getScrollNormalizer=function _getScrollNormalizer(vars){_isObject(vars)||(vars={}),vars.preventDefault=vars.isNormalizer=vars.allowClicks=!0,vars.type||(vars.type="wheel,touch"),vars.debounce=!!vars.debounce,vars.id=vars.id||"normalizer";var _vars2=vars,normalizeScrollX=_vars2.normalizeScrollX,momentum=_vars2.momentum,allowNestedScroll=_vars2.allowNestedScroll,onRelease=_vars2.onRelease,self,maxY,target=_getTarget(vars.target)||_docEl$1,smoother=gsap$1.core.globals().ScrollSmoother,smootherInstance=smoother&&smoother.get(),content=_fixIOSBug&&(vars.content&&_getTarget(vars.content)||smootherInstance&&vars.content!==!1&&!smootherInstance.smooth()&&smootherInstance.content()),scrollFuncY=_getScrollFunc(target,_vertical),scrollFuncX=_getScrollFunc(target,_horizontal),scale=1,initialScale=(Observer.isTouch&&_win$1.visualViewport?_win$1.visualViewport.scale*_win$1.visualViewport.width:_win$1.outerWidth)/_win$1.innerWidth,wheelRefresh=0,resolveMomentumDuration=_isFunction(momentum)?function(){return momentum(self)}:function(){return momentum||2.8},lastRefreshID,skipTouchMove,inputObserver=_inputObserver(target,vars.type,!0,allowNestedScroll),resumeTouchMove=function resumeTouchMove(){return skipTouchMove=!1},scrollClampX=_passThrough,scrollClampY=_passThrough,updateClamps=function updateClamps(){maxY=_maxScroll(target,_vertical),scrollClampY=_clamp$1(_fixIOSBug?1:0,maxY),normalizeScrollX&&(scrollClampX=_clamp$1(0,_maxScroll(target,_horizontal))),lastRefreshID=_refreshID},removeContentOffset=function removeContentOffset(){content._gsap.y=_round(parseFloat(content._gsap.y)+scrollFuncY.offset)+"px",content.style.transform="matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, "+parseFloat(content._gsap.y)+", 0, 1)",scrollFuncY.offset=scrollFuncY.cacheID=0},ignoreDrag=function ignoreDrag(){if(skipTouchMove){requestAnimationFrame(resumeTouchMove);var offset=_round(self.deltaY/2),scroll=scrollClampY(scrollFuncY.v-offset);if(content&&scroll!==scrollFuncY.v+scrollFuncY.offset){scrollFuncY.offset=scroll-scrollFuncY.v;var y=_round((parseFloat(content&&content._gsap.y)||0)-scrollFuncY.offset);content.style.transform="matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, "+y+", 0, 1)",content._gsap.y=y+"px",scrollFuncY.cacheID=_scrollers.cache,_updateAll()}return!0}scrollFuncY.offset&&removeContentOffset(),skipTouchMove=!0},tween,startScrollX,startScrollY,onStopDelayedCall,onResize=function onResize(){updateClamps(),tween.isActive()&&tween.vars.scrollY>maxY&&(scrollFuncY()>maxY?tween.progress(1)&&scrollFuncY(maxY):tween.resetTo("scrollY",maxY))};return content&&gsap$1.set(content,{y:"+=0"}),vars.ignoreCheck=function(e){return _fixIOSBug&&e.type==="touchmove"&&ignoreDrag()||scale>1.05&&e.type!=="touchstart"||self.isGesturing||e.touches&&e.touches.length>1},vars.onPress=function(){skipTouchMove=!1;var prevScale=scale;scale=_round((_win$1.visualViewport&&_win$1.visualViewport.scale||1)/initialScale),tween.pause(),prevScale!==scale&&_allowNativePanning(target,scale>1.01?!0:normalizeScrollX?!1:"x"),startScrollX=scrollFuncX(),startScrollY=scrollFuncY(),updateClamps(),lastRefreshID=_refreshID},vars.onRelease=vars.onGestureStart=function(self,wasDragging){scrollFuncY.offset&&removeContentOffset();if(!wasDragging)onStopDelayedCall.restart(!0);else{_scrollers.cache++;var dur=resolveMomentumDuration(),currentScroll,endScroll;normalizeScrollX&&(currentScroll=scrollFuncX(),endScroll=currentScroll+dur*.05*-self.velocityX/.227,dur*=_clampScrollAndGetDurationMultiplier(scrollFuncX,currentScroll,endScroll,_maxScroll(target,_horizontal)),tween.vars.scrollX=scrollClampX(endScroll)),currentScroll=scrollFuncY(),endScroll=currentScroll+dur*.05*-self.velocityY/.227,dur*=_clampScrollAndGetDurationMultiplier(scrollFuncY,currentScroll,endScroll,_maxScroll(target,_vertical)),tween.vars.scrollY=scrollClampY(endScroll),tween.invalidate().duration(dur).play(.01),(_fixIOSBug&&tween.vars.scrollY>=maxY||currentScroll>=maxY-1)&&gsap$1.to({},{onUpdate:onResize,duration:dur})}onRelease&&onRelease(self)},vars.onWheel=function(){tween._ts&&tween.pause(),_getTime$1()-wheelRefresh>1e3&&(lastRefreshID=0,wheelRefresh=_getTime$1())},vars.onChange=function(self,dx,dy,xArray,yArray){_refreshID!==lastRefreshID&&updateClamps(),dx&&normalizeScrollX&&scrollFuncX(scrollClampX(xArray[2]===dx?startScrollX+(self.startX-self.x):scrollFuncX()+dx-xArray[1]));if(dy){scrollFuncY.offset&&removeContentOffset();var isTouch=yArray[2]===dy,y=isTouch?startScrollY+self.startY-self.y:scrollFuncY()+dy-yArray[1],yClamped=scrollClampY(y);isTouch&&y!==yClamped&&(startScrollY+=yClamped-y),scrollFuncY(yClamped)}(dy||dx)&&_updateAll()},vars.onEnable=function(){_allowNativePanning(target,normalizeScrollX?!1:"x"),ScrollTrigger$1.addEventListener("refresh",onResize),_addListener$1(_win$1,"resize",onResize),scrollFuncY.smooth&&(scrollFuncY.target.style.scrollBehavior="auto",scrollFuncY.smooth=scrollFuncX.smooth=!1),inputObserver.enable()},vars.onDisable=function(){_allowNativePanning(target,!0),_removeListener$1(_win$1,"resize",onResize),ScrollTrigger$1.removeEventListener("refresh",onResize),inputObserver.kill()},vars.lockAxis=vars.lockAxis!==!1,self=new Observer(vars),self.iOS=_fixIOSBug,_fixIOSBug&&!scrollFuncY()&&scrollFuncY(1),_fixIOSBug&&gsap$1.ticker.add(_passThrough),onStopDelayedCall=self._dc,tween=gsap$1.to(self,{ease:"power4",paused:!0,inherit:!1,scrollX:normalizeScrollX?"+=0.1":"+=0",scrollY:"+=0.1",modifiers:{scrollY:_interruptionTracker(scrollFuncY,scrollFuncY(),function(){return tween.pause()})},onUpdate:_updateAll,onComplete:onStopDelayedCall.vars.onComplete}),self};ScrollTrigger$1.sort=function(func){return _triggers.sort(func||function(a,b){return(a.vars.refreshPriority||0)*-1e6+a.start-(b.start+(b.vars.refreshPriority||0)*-1e6)})},ScrollTrigger$1.observe=function(vars){return new Observer(vars)},ScrollTrigger$1.normalizeScroll=function(vars){if(typeof vars=="undefined")return _normalizer$1;if(vars===!0&&_normalizer$1)return _normalizer$1.enable();if(vars===!1){_normalizer$1&&_normalizer$1.kill(),_normalizer$1=vars;return}var normalizer=vars instanceof Observer?vars:_getScrollNormalizer(vars);return _normalizer$1&&_normalizer$1.target===normalizer.target&&_normalizer$1.kill(),_isViewport$1(normalizer.target)&&(_normalizer$1=normalizer),normalizer},ScrollTrigger$1.core={_getVelocityProp:_getVelocityProp,_inputObserver:_inputObserver,_scrollers:_scrollers,_proxies:_proxies,bridge:{ss:function ss(){_lastScrollTime||_dispatch("scrollStart"),_lastScrollTime=_getTime$1()},ref:function ref(){return _refreshing}}},_getGSAP$1()&&gsap$1.registerPlugin(ScrollTrigger$1),exports.ScrollTrigger=ScrollTrigger$1,exports.default=ScrollTrigger$1,typeof window=="undefined"||window!==exports?Object.defineProperty(exports,"__esModule",{value:!0}):delete window.default}),function(global,factory){typeof exports=="object"&&typeof module!="undefined"?factory(exports):typeof define=="function"&&define.amd?define(["exports"],factory):(global=global||self,factory(global.window=global.window||{}))}(this,function(exports){"use strict";function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,subClass.__proto__=superClass}function _assertThisInitialized(self){if(self===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function getGlobalMatrix(element,inverse,adjustGOffset,includeScrollInFixed){if(!element||!element.parentNode||(_doc||_setDoc(element)).documentElement===element)return new Matrix2D;var zeroScales=_forceNonZeroScale(element),svg=_svgOwner(element),temps=svg?_svgTemps:_divTemps,container=_placeSiblings(element,adjustGOffset),b1=temps[0].getBoundingClientRect(),b2=temps[1].getBoundingClientRect(),b3=temps[2].getBoundingClientRect(),parent=container.parentNode,isFixed=!includeScrollInFixed&&_isFixed(element),m=new Matrix2D((b2.left-b1.left)/100,(b2.top-b1.top)/100,(b3.left-b1.left)/100,(b3.top-b1.top)/100,b1.left+(isFixed?0:_getDocScrollLeft()),b1.top+(isFixed?0:_getDocScrollTop()));parent.removeChild(container);if(zeroScales){b1=zeroScales.length;while(b1--)b2=zeroScales[b1],b2.scaleX=b2.scaleY=0,b2.renderTransform(1,b2)}return inverse?m.inverse():m}var _doc,_win,_docElement,_body,_divContainer,_svgContainer,_identityMatrix,_gEl,_transformProp="transform",_transformOriginProp=_transformProp+"Origin",_hasOffsetBug,_setDoc=function _setDoc(element){var doc=element.ownerDocument||element;!(_transformProp in element.style)&&"msTransform"in element.style&&(_transformProp="msTransform",_transformOriginProp=_transformProp+"Origin");while(doc.parentNode&&(doc=doc.parentNode));_win=window,_identityMatrix=new Matrix2D;if(doc){_doc=doc,_docElement=doc.documentElement,_body=doc.body,_gEl=_doc.createElementNS("http://www.w3.org/2000/svg","g"),_gEl.style.transform="none";var d1=doc.createElement("div"),d2=doc.createElement("div"),root=doc&&(doc.body||doc.firstElementChild);root&&root.appendChild&&(root.appendChild(d1),d1.appendChild(d2),d1.setAttribute("style","position:static;transform:translate3d(0,0,1px)"),_hasOffsetBug=d2.offsetParent!==d1,root.removeChild(d1))}return doc},_forceNonZeroScale=function _forceNonZeroScale(e){var a,cache;while(e&&e!==_body)cache=e._gsap,cache&&cache.uncache&&cache.get(e,"x"),cache&&!cache.scaleX&&!cache.scaleY&&cache.renderTransform&&(cache.scaleX=cache.scaleY=1e-4,cache.renderTransform(1,cache),a?a.push(cache):a=[cache]),e=e.parentNode;return a},_svgTemps=[],_divTemps=[],_getDocScrollTop=function _getDocScrollTop(){return _win.pageYOffset||_doc.scrollTop||_docElement.scrollTop||_body.scrollTop||0},_getDocScrollLeft=function _getDocScrollLeft(){return _win.pageXOffset||_doc.scrollLeft||_docElement.scrollLeft||_body.scrollLeft||0},_svgOwner=function _svgOwner(element){return element.ownerSVGElement||((element.tagName+"").toLowerCase()==="svg"?element:null)},_isFixed=function _isFixed(element){if(_win.getComputedStyle(element).position==="fixed")return!0;element=element.parentNode;if(element&&element.nodeType===1)return _isFixed(element)},_createSibling=function _createSibling(element,i){if(element.parentNode&&(_doc||_setDoc(element))){var svg=_svgOwner(element),ns=svg?svg.getAttribute("xmlns")||"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",type=svg?i?"rect":"g":"div",x=i!==2?0:100,y=i===3?100:0,css="position:absolute;display:block;pointer-events:none;margin:0;padding:0;",e=_doc.createElementNS?_doc.createElementNS(ns.replace(/^https/,"http"),type):_doc.createElement(type);return i&&(svg?(_svgContainer||(_svgContainer=_createSibling(element)),e.setAttribute("width",.01),e.setAttribute("height",.01),e.setAttribute("transform","translate("+x+","+y+")"),_svgContainer.appendChild(e)):(_divContainer||(_divContainer=_createSibling(element),_divContainer.style.cssText=css),e.style.cssText=css+"width:0.1px;height:0.1px;top:"+y+"px;left:"+x+"px",_divContainer.appendChild(e))),e}throw"Need document and parent."},_consolidate=function _consolidate(m){var c=new Matrix2D,i=0;for(;i<m.numberOfItems;i++)c.multiply(m.getItem(i).matrix);return c},_getCTM=function _getCTM(svg){var m=svg.getCTM(),transform;return m||(transform=svg.style[_transformProp],svg.style[_transformProp]="none",svg.appendChild(_gEl),m=_gEl.getCTM(),svg.removeChild(_gEl),transform?svg.style[_transformProp]=transform:svg.style.removeProperty(_transformProp.replace(/([A-Z])/g,"-$1").toLowerCase())),m||_identityMatrix.clone()},_placeSiblings=function _placeSiblings(element,adjustGOffset){var svg=_svgOwner(element),isRootSVG=element===svg,siblings=svg?_svgTemps:_divTemps,parent=element.parentNode,container,m,b,x,y,cs;if(element===_win)return element;siblings.length||siblings.push(_createSibling(element,1),_createSibling(element,2),_createSibling(element,3)),container=svg?_svgContainer:_divContainer;if(svg)isRootSVG?(b=_getCTM(element),x=-b.e/b.a,y=-b.f/b.d,m=_identityMatrix):element.getBBox?(b=element.getBBox(),m=element.transform?element.transform.baseVal:{},m=m.numberOfItems?m.numberOfItems>1?_consolidate(m):m.getItem(0).matrix:_identityMatrix,x=m.a*b.x+m.c*b.y,y=m.b*b.x+m.d*b.y):(m=new Matrix2D,x=y=0),adjustGOffset&&element.tagName.toLowerCase()==="g"&&(x=y=0),(isRootSVG?svg:parent).appendChild(container),container.setAttribute("transform","matrix("+m.a+","+m.b+","+m.c+","+m.d+","+(m.e+x)+","+(m.f+y)+")");else{x=y=0;if(_hasOffsetBug){m=element.offsetParent,b=element;while(b&&(b=b.parentNode)&&b!==m&&b.parentNode)(_win.getComputedStyle(b)[_transformProp]+"").length>4&&(x=b.offsetLeft,y=b.offsetTop,b=0)}cs=_win.getComputedStyle(element);if(cs.position!=="absolute"&&cs.position!=="fixed"){m=element.offsetParent;while(parent&&parent!==m)x+=parent.scrollLeft||0,y+=parent.scrollTop||0,parent=parent.parentNode}b=container.style,b.top=element.offsetTop-y+"px",b.left=element.offsetLeft-x+"px",b[_transformProp]=cs[_transformProp],b[_transformOriginProp]=cs[_transformOriginProp],b.position=cs.position==="fixed"?"fixed":"absolute",element.parentNode.appendChild(container)}return container},_setMatrix=function _setMatrix(m,a,b,c,d,e,f){return m.a=a,m.b=b,m.c=c,m.d=d,m.e=e,m.f=f,m},Matrix2D=function(){function Matrix2D(a,b,c,d,e,f){a===void 0&&(a=1),b===void 0&&(b=0),c===void 0&&(c=0),d===void 0&&(d=1),e===void 0&&(e=0),f===void 0&&(f=0),_setMatrix(this,a,b,c,d,e,f)}var _proto=Matrix2D.prototype;return _proto.inverse=function inverse(){var a=this.a,b=this.b,c=this.c,d=this.d,e=this.e,f=this.f,determinant=a*d-b*c||1e-10;return _setMatrix(this,d/determinant,-b/determinant,-c/determinant,a/determinant,(c*f-d*e)/determinant,-(a*f-b*e)/determinant)},_proto.multiply=function multiply(matrix){var a=this.a,b=this.b,c=this.c,d=this.d,e=this.e,f=this.f,a2=matrix.a,b2=matrix.c,c2=matrix.b,d2=matrix.d,e2=matrix.e,f2=matrix.f;return _setMatrix(this,a2*a+c2*c,a2*b+c2*d,b2*a+d2*c,b2*b+d2*d,e+e2*a+f2*c,f+e2*b+f2*d)},_proto.clone=function clone(){return new Matrix2D(this.a,this.b,this.c,this.d,this.e,this.f)},_proto.equals=function equals(matrix){var a=this.a,b=this.b,c=this.c,d=this.d,e=this.e,f=this.f;return a===matrix.a&&b===matrix.b&&c===matrix.c&&d===matrix.d&&e===matrix.e&&f===matrix.f},_proto.apply=function apply(point,decoratee){decoratee===void 0&&(decoratee={});var x=point.x,y=point.y,a=this.a,b=this.b,c=this.c,d=this.d,e=this.e,f=this.f;return decoratee.x=x*a+y*c+e||0,decoratee.y=x*b+y*d+f||0,decoratee},Matrix2D}(),gsap,_win$1,_doc$1,_docElement$1,_body$1,_tempDiv,_placeholderDiv,_coreInitted,_checkPrefix,_toArray,_supportsPassive,_isTouchDevice,_touchEventLookup,_isMultiTouching,_isAndroid,InertiaPlugin,_defaultCursor,_supportsPointer,_context,_getStyleSaver,_dragCount=0,_windowExists=function _windowExists(){return typeof window!="undefined"},_getGSAP=function _getGSAP(){return gsap||_windowExists()&&(gsap=window.gsap)&&gsap.registerPlugin&&gsap},_isFunction=function _isFunction(value){return typeof value=="function"},_isObject=function _isObject(value){return typeof value=="object"},_isUndefined=function _isUndefined(value){return typeof value=="undefined"},_emptyFunc=function _emptyFunc(){return!1},_transformProp$1="transform",_transformOriginProp$1="transformOrigin",_round=function _round(value){return Math.round(value*1e4)/1e4},_isArray=Array.isArray,_createElement=function _createElement(type,ns){var e=_doc$1.createElementNS?_doc$1.createElementNS((ns||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),type):_doc$1.createElement(type);return e.style?e:_doc$1.createElement(type)},_RAD2DEG=180/Math.PI,_bigNum=1e20,_identityMatrix$1=new Matrix2D,_getTime=Date.now||function(){return(new Date).getTime()},_renderQueue=[],_lookup={},_lookupCount=0,_clickableTagExp=/^(?:a|input|textarea|button|select)$/i,_lastDragTime=0,_temp1={},_windowProxy={},_copy=function _copy(obj,factor){var copy={},p;for(p in obj)copy[p]=factor?obj[p]*factor:obj[p];return copy},_extend=function _extend(obj,defaults){for(var p in defaults)p in obj||(obj[p]=defaults[p]);return obj},_setTouchActionForAllDescendants=function _setTouchActionForAllDescendants(elements,value){var i=elements.length,children;while(i--)value?elements[i].style.touchAction=value:elements[i].style.removeProperty("touch-action"),children=elements[i].children,children&&children.length&&_setTouchActionForAllDescendants(children,value)},_renderQueueTick=function _renderQueueTick(){return _renderQueue.forEach(function(func){return func()})},_addToRenderQueue=function _addToRenderQueue(func){_renderQueue.push(func),_renderQueue.length===1&&gsap.ticker.add(_renderQueueTick)},_renderQueueTimeout=function _renderQueueTimeout(){return!_renderQueue.length&&gsap.ticker.remove(_renderQueueTick)},_removeFromRenderQueue=function _removeFromRenderQueue(func){var i=_renderQueue.length;while(i--)_renderQueue[i]===func&&_renderQueue.splice(i,1);gsap.to(_renderQueueTimeout,{overwrite:!0,delay:15,duration:0,onComplete:_renderQueueTimeout,data:"_draggable"})},_setDefaults=function _setDefaults(obj,defaults){for(var p in defaults)p in obj||(obj[p]=defaults[p]);return obj},_addListener=function _addListener(element,type,func,capture){if(element.addEventListener){var touchType=_touchEventLookup[type];capture=capture||(_supportsPassive?{passive:!1}:null),element.addEventListener(touchType||type,func,capture),touchType&&type!==touchType&&element.addEventListener(type,func,capture)}},_removeListener=function _removeListener(element,type,func,capture){if(element.removeEventListener){var touchType=_touchEventLookup[type];element.removeEventListener(touchType||type,func,capture),touchType&&type!==touchType&&element.removeEventListener(type,func,capture)}},_preventDefault=function _preventDefault(event){event.preventDefault&&event.preventDefault(),event.preventManipulation&&event.preventManipulation()},_hasTouchID=function _hasTouchID(list,ID){var i=list.length;while(i--)if(list[i].identifier===ID)return!0},_onMultiTouchDocumentEnd=function _onMultiTouchDocumentEnd(event){_isMultiTouching=event.touches&&_dragCount<event.touches.length,_removeListener(event.target,"touchend",_onMultiTouchDocumentEnd)},_onMultiTouchDocument=function _onMultiTouchDocument(event){_isMultiTouching=event.touches&&_dragCount<event.touches.length,_addListener(event.target,"touchend",_onMultiTouchDocumentEnd)},_getDocScrollTop$1=function _getDocScrollTop(doc){return _win$1.pageYOffset||doc.scrollTop||doc.documentElement.scrollTop||doc.body.scrollTop||0},_getDocScrollLeft$1=function _getDocScrollLeft(doc){return _win$1.pageXOffset||doc.scrollLeft||doc.documentElement.scrollLeft||doc.body.scrollLeft||0},_addScrollListener=function _addScrollListener(e,callback){_addListener(e,"scroll",callback),_isRoot(e.parentNode)||_addScrollListener(e.parentNode,callback)},_removeScrollListener=function _removeScrollListener(e,callback){_removeListener(e,"scroll",callback),_isRoot(e.parentNode)||_removeScrollListener(e.parentNode,callback)},_isRoot=function _isRoot(e){return!e||e===_docElement$1||e.nodeType===9||e===_doc$1.body||e===_win$1||!e.nodeType||!e.parentNode},_getMaxScroll=function _getMaxScroll(element,axis){var dim=axis==="x"?"Width":"Height",scroll="scroll"+dim,client="client"+dim;return Math.max(0,_isRoot(element)?Math.max(_docElement$1[scroll],_body$1[scroll])-(_win$1["inner"+dim]||_docElement$1[client]||_body$1[client]):element[scroll]-element[client])},_recordMaxScrolls=function _recordMaxScrolls(e,skipCurrent){var x=_getMaxScroll(e,"x"),y=_getMaxScroll(e,"y");_isRoot(e)?e=_windowProxy:_recordMaxScrolls(e.parentNode,skipCurrent),e._gsMaxScrollX=x,e._gsMaxScrollY=y,skipCurrent||(e._gsScrollX=e.scrollLeft||0,e._gsScrollY=e.scrollTop||0)},_setStyle=function _setStyle(element,property,value){var style=element.style;if(!style)return;_isUndefined(style[property])&&(property=_checkPrefix(property,element)||property),value==null?style.removeProperty&&style.removeProperty(property.replace(/([A-Z])/g,"-$1").toLowerCase()):style[property]=value},_getComputedStyle=function _getComputedStyle(element){return _win$1.getComputedStyle(element instanceof Element?element:element.host||(element.parentNode||{}).host||element)},_tempRect={},_parseRect=function _parseRect(e){if(e===_win$1)return _tempRect.left=_tempRect.top=0,_tempRect.width=_tempRect.right=_docElement$1.clientWidth||e.innerWidth||_body$1.clientWidth||0,_tempRect.height=_tempRect.bottom=(e.innerHeight||0)-20<_docElement$1.clientHeight?_docElement$1.clientHeight:e.innerHeight||_body$1.clientHeight||0,_tempRect;var doc=e.ownerDocument||_doc$1,r=_isUndefined(e.pageX)?!e.nodeType&&!_isUndefined(e.left)&&!_isUndefined(e.top)?e:_toArray(e)[0].getBoundingClientRect():{left:e.pageX-_getDocScrollLeft$1(doc),top:e.pageY-_getDocScrollTop$1(doc),right:e.pageX-_getDocScrollLeft$1(doc)+1,bottom:e.pageY-_getDocScrollTop$1(doc)+1};return _isUndefined(r.right)&&!_isUndefined(r.width)?(r.right=r.left+r.width,r.bottom=r.top+r.height):_isUndefined(r.width)&&(r={width:r.right-r.left,height:r.bottom-r.top,right:r.right,left:r.left,bottom:r.bottom,top:r.top}),r},_dispatchEvent=function _dispatchEvent(target,type,callbackName){var vars=target.vars,callback=vars[callbackName],listeners=target._listeners[type],result;return _isFunction(callback)&&(result=callback.apply(vars.callbackScope||target,vars[callbackName+"Params"]||[target.pointerEvent])),listeners&&target.dispatchEvent(type)===!1&&(result=!1),result},_getBounds=function _getBounds(target,context){var e=_toArray(target)[0],top,left,offset;return!e.nodeType&&e!==_win$1?_isUndefined(target.left)?(left=target.min||target.minX||target.minRotation||0,top=target.min||target.minY||0,{left:left,top:top,width:(target.max||target.maxX||target.maxRotation||0)-left,height:(target.max||target.maxY||0)-top}):(offset={x:0,y:0},{left:target.left-offset.x,top:target.top-offset.y,width:target.width,height:target.height}):_getElementBounds(e,context)},_point1={},_getElementBounds=function _getElementBounds(element,context){context=_toArray(context)[0];var isSVG=element.getBBox&&element.ownerSVGElement,doc=element.ownerDocument||_doc$1,left,right,top,bottom,matrix,p1,p2,p3,p4,bbox,width,height,cs;if(element===_win$1)top=_getDocScrollTop$1(doc),left=_getDocScrollLeft$1(doc),right=left+(doc.documentElement.clientWidth||element.innerWidth||doc.body.clientWidth||0),bottom=top+((element.innerHeight||0)-20<doc.documentElement.clientHeight?doc.documentElement.clientHeight:element.innerHeight||doc.body.clientHeight||0);else{if(context===_win$1||_isUndefined(context))return element.getBoundingClientRect();left=top=0,isSVG?(bbox=element.getBBox(),width=bbox.width,height=bbox.height):(element.viewBox&&(bbox=element.viewBox.baseVal)&&(left=bbox.x||0,top=bbox.y||0,width=bbox.width,height=bbox.height),width||(cs=_getComputedStyle(element),bbox=cs.boxSizing==="border-box",width=(parseFloat(cs.width)||element.clientWidth||0)+(bbox?0:parseFloat(cs.borderLeftWidth)+parseFloat(cs.borderRightWidth)),height=(parseFloat(cs.height)||element.clientHeight||0)+(bbox?0:parseFloat(cs.borderTopWidth)+parseFloat(cs.borderBottomWidth)))),right=width,bottom=height}return element===context?{left:left,top:top,width:right-left,height:bottom-top}:(matrix=getGlobalMatrix(context,!0).multiply(getGlobalMatrix(element)),p1=matrix.apply({x:left,y:top}),p2=matrix.apply({x:right,y:top}),p3=matrix.apply({x:right,y:bottom}),p4=matrix.apply({x:left,y:bottom}),left=Math.min(p1.x,p2.x,p3.x,p4.x),top=Math.min(p1.y,p2.y,p3.y,p4.y),{left:left,top:top,width:Math.max(p1.x,p2.x,p3.x,p4.x)-left,height:Math.max(p1.y,p2.y,p3.y,p4.y)-top})},_parseInertia=function _parseInertia(draggable,snap,max,min,factor,forceZeroVelocity){var vars={},a,i,l;if(snap)if(factor!==1&&snap instanceof Array){vars.end=a=[],l=snap.length;if(_isObject(snap[0]))for(i=0;i<l;i++)a[i]=_copy(snap[i],factor);else for(i=0;i<l;i++)a[i]=snap[i]*factor;max+=1.1,min-=1.1}else _isFunction(snap)?vars.end=function(value){var result=snap.call(draggable,value),copy,p;if(factor!==1)if(_isObject(result)){copy={};for(p in result)copy[p]=result[p]*factor;result=copy}else result*=factor;return result}:vars.end=snap;if(max||max===0)vars.max=max;if(min||min===0)vars.min=min;return forceZeroVelocity&&(vars.velocity=0),vars},_isClickable=function _isClickable(element){var data;return!element||!element.getAttribute||element===_body$1?!1:(data=element.getAttribute("data-clickable"))==="true"||data!=="false"&&(_clickableTagExp.test(element.nodeName+"")||element.getAttribute("contentEditable")==="true")?!0:_isClickable(element.parentNode)},_setSelectable=function _setSelectable(elements,selectable){var i=elements.length,e;while(i--)e=elements[i],e.ondragstart=e.onselectstart=selectable?null:_emptyFunc,gsap.set(e,{lazy:!0,userSelect:selectable?"text":"none"})},_isFixed$1=function _isFixed(element){if(_getComputedStyle(element).position==="fixed")return!0;element=element.parentNode;if(element&&element.nodeType===1)return _isFixed(element)},_supports3D,_addPaddingBR,ScrollProxy=function ScrollProxy(element,vars){element=gsap.utils.toArray(element)[0],vars=vars||{};var content=document.createElement("div"),style=content.style,node=element.firstChild,offsetTop=0,offsetLeft=0,prevTop=element.scrollTop,prevLeft=element.scrollLeft,scrollWidth=element.scrollWidth,scrollHeight=element.scrollHeight,extraPadRight=0,maxLeft=0,maxTop=0,elementWidth,elementHeight,contentHeight,nextNode,transformStart,transformEnd;_supports3D&&vars.force3D!==!1?(transformStart="translate3d(",transformEnd="px,0px)"):_transformProp$1&&(transformStart="translate(",transformEnd="px)"),this.scrollTop=function(value,force){if(!arguments.length)return-this.top();this.top(-value,force)},this.scrollLeft=function(value,force){if(!arguments.length)return-this.left();this.left(-value,force)},this.left=function(value,force){if(!arguments.length)return-(element.scrollLeft+offsetLeft);var dif=element.scrollLeft-prevLeft,oldOffset=offsetLeft;if((dif>2||dif<-2)&&!force){prevLeft=element.scrollLeft,gsap.killTweensOf(this,{left:1,scrollLeft:1}),this.left(-prevLeft),vars.onKill&&vars.onKill();return}value=-value,value<0?(offsetLeft=value-.5|0,value=0):value>maxLeft?(offsetLeft=value-maxLeft|0,value=maxLeft):offsetLeft=0;if(offsetLeft||oldOffset)this._skip||(style[_transformProp$1]=transformStart+ -offsetLeft+"px,"+ -offsetTop+transformEnd),offsetLeft+extraPadRight>=0&&(style.paddingRight=offsetLeft+extraPadRight+"px");element.scrollLeft=value|0,prevLeft=element.scrollLeft},this.top=function(value,force){if(!arguments.length)return-(element.scrollTop+offsetTop);var dif=element.scrollTop-prevTop,oldOffset=offsetTop;if((dif>2||dif<-2)&&!force){prevTop=element.scrollTop,gsap.killTweensOf(this,{top:1,scrollTop:1}),this.top(-prevTop),vars.onKill&&vars.onKill();return}value=-value,value<0?(offsetTop=value-.5|0,value=0):value>maxTop?(offsetTop=value-maxTop|0,value=maxTop):offsetTop=0;if(offsetTop||oldOffset)this._skip||(style[_transformProp$1]=transformStart+ -offsetLeft+"px,"+ -offsetTop+transformEnd);element.scrollTop=value|0,prevTop=element.scrollTop},this.maxScrollTop=function(){return maxTop},this.maxScrollLeft=function(){return maxLeft},this.disable=function(){node=content.firstChild;while(node)nextNode=node.nextSibling,element.appendChild(node),node=nextNode;element===content.parentNode&&element.removeChild(content)},this.enable=function(){node=element.firstChild;if(node===content)return;while(node)nextNode=node.nextSibling,content.appendChild(node),node=nextNode;element.appendChild(content),this.calibrate()},this.calibrate=function(force){var widthMatches=element.clientWidth===elementWidth,cs,x,y;prevTop=element.scrollTop,prevLeft=element.scrollLeft;if(widthMatches&&element.clientHeight===elementHeight&&content.offsetHeight===contentHeight&&scrollWidth===element.scrollWidth&&scrollHeight===element.scrollHeight&&!force)return;if(offsetTop||offsetLeft)x=this.left(),y=this.top(),this.left(-element.scrollLeft),this.top(-element.scrollTop);cs=_getComputedStyle(element);if(!widthMatches||force)style.display="block",style.width="auto",style.paddingRight="0px",extraPadRight=Math.max(0,element.scrollWidth-element.clientWidth),extraPadRight&&(extraPadRight+=parseFloat(cs.paddingLeft)+(_addPaddingBR?parseFloat(cs.paddingRight):0));style.display="inline-block",style.position="relative",style.overflow="visible",style.verticalAlign="top",style.boxSizing="content-box",style.width="100%",style.paddingRight=extraPadRight+"px",_addPaddingBR&&(style.paddingBottom=cs.paddingBottom),elementWidth=element.clientWidth,elementHeight=element.clientHeight,scrollWidth=element.scrollWidth,scrollHeight=element.scrollHeight,maxLeft=element.scrollWidth-elementWidth,maxTop=element.scrollHeight-elementHeight,contentHeight=content.offsetHeight,style.display="block";if(x||y)this.left(x),this.top(y)},this.content=content,this.element=element,this._skip=!1,this.enable()},_initCore=function _initCore(required){if(_windowExists()&&document.body){var nav=window&&window.navigator;_win$1=window,_doc$1=document,_docElement$1=_doc$1.documentElement,_body$1=_doc$1.body,_tempDiv=_createElement("div"),_supportsPointer=!!window.PointerEvent,_placeholderDiv=_createElement("div"),_placeholderDiv.style.cssText="visibility:hidden;height:1px;top:-1px;pointer-events:none;position:relative;clear:both;cursor:grab",_defaultCursor=_placeholderDiv.style.cursor==="grab"?"grab":"move",_isAndroid=nav&&nav.userAgent.toLowerCase().indexOf("android")!==-1,_isTouchDevice="ontouchstart"in _docElement$1&&"orientation"in _win$1||nav&&(nav.MaxTouchPoints>0||nav.msMaxTouchPoints>0),_addPaddingBR=function(){var div=_createElement("div"),child=_createElement("div"),childStyle=child.style,parent=_body$1,val;return childStyle.display="inline-block",childStyle.position="relative",div.style.cssText="width:90px;height:40px;padding:10px;overflow:auto;visibility:hidden",div.appendChild(child),parent.appendChild(div),val=child.offsetHeight+18>div.scrollHeight,parent.removeChild(div),val}(),_touchEventLookup=function(types){var standard=types.split(","),converted=("onpointerdown"in _tempDiv?"pointerdown,pointermove,pointerup,pointercancel":"onmspointerdown"in _tempDiv?"MSPointerDown,MSPointerMove,MSPointerUp,MSPointerCancel":types).split(","),obj={},i=4;while(--i>-1)obj[standard[i]]=converted[i],obj[converted[i]]=standard[i];try{_docElement$1.addEventListener("test",null,Object.defineProperty({},"passive",{get:function get(){_supportsPassive=1}}))}catch(e){}return obj}("touchstart,touchmove,touchend,touchcancel"),_addListener(_doc$1,"touchcancel",_emptyFunc),_addListener(_win$1,"touchmove",_emptyFunc),_body$1&&_body$1.addEventListener("touchstart",_emptyFunc),_addListener(_doc$1,"contextmenu",function(){for(var p in _lookup)_lookup[p].isPressed&&_lookup[p].endDrag()}),gsap=_coreInitted=_getGSAP()}gsap?(InertiaPlugin=gsap.plugins.inertia,_context=gsap.core.context||function(){},_checkPrefix=gsap.utils.checkPrefix,_transformProp$1=_checkPrefix(_transformProp$1),_transformOriginProp$1=_checkPrefix(_transformOriginProp$1),_toArray=gsap.utils.toArray,_getStyleSaver=gsap.core.getStyleSaver,_supports3D=!!_checkPrefix("perspective")):required&&console.warn("Please gsap.registerPlugin(Draggable)")},EventDispatcher=function(){function EventDispatcher(target){this._listeners={},this.target=target||this}var _proto=EventDispatcher.prototype;return _proto.addEventListener=function addEventListener(type,callback){var list=this._listeners[type]||(this._listeners[type]=[]);~list.indexOf(callback)||list.push(callback)},_proto.removeEventListener=function removeEventListener(type,callback){var list=this._listeners[type],i=list&&list.indexOf(callback);i>=0&&list.splice(i,1)},_proto.dispatchEvent=function dispatchEvent(type){var _this=this,result;return(this._listeners[type]||[]).forEach(function(callback){return callback.call(_this,{type:type,target:_this.target})===!1&&(result=!1)}),result},EventDispatcher}(),Draggable=function(_EventDispatcher){function Draggable(target,vars){var _this2;_this2=_EventDispatcher.call(this)||this,_coreInitted||_initCore(1),target=_toArray(target)[0],_this2.styles=_getStyleSaver&&_getStyleSaver(target,"transform,left,top"),InertiaPlugin||(InertiaPlugin=gsap.plugins.inertia),_this2.vars=vars=_copy(vars||{}),_this2.target=target,_this2.x=_this2.y=_this2.rotation=0,_this2.dragResistance=parseFloat(vars.dragResistance)||0,_this2.edgeResistance=isNaN(vars.edgeResistance)?1:parseFloat(vars.edgeResistance)||0,_this2.lockAxis=vars.lockAxis,_this2.autoScroll=vars.autoScroll||0,_this2.lockedAxis=null,_this2.allowEventDefault=!!vars.allowEventDefault,gsap.getProperty(target,"x");var type=(vars.type||"x,y").toLowerCase(),xyMode=~type.indexOf("x")||~type.indexOf("y"),rotationMode=type.indexOf("rotation")!==-1,xProp=rotationMode?"rotation":xyMode?"x":"left",yProp=xyMode?"y":"top",allowX=!!~type.indexOf("x")||!!~type.indexOf("left")||type==="scroll",allowY=!!~type.indexOf("y")||!!~type.indexOf("top")||type==="scroll",minimumMovement=vars.minimumMovement||2,self=_assertThisInitialized(_this2),triggers=_toArray(vars.trigger||vars.handle||target),killProps={},dragEndTime=0,checkAutoScrollBounds=!1,autoScrollMarginTop=vars.autoScrollMarginTop||40,autoScrollMarginRight=vars.autoScrollMarginRight||40,autoScrollMarginBottom=vars.autoScrollMarginBottom||40,autoScrollMarginLeft=vars.autoScrollMarginLeft||40,isClickable=vars.clickableTest||_isClickable,clickTime=0,gsCache=target._gsap||gsap.core.getCache(target),isFixed=_isFixed$1(target),getPropAsNum=function getPropAsNum(property,unit){return parseFloat(gsCache.get(target,property,unit))},ownerDoc=target.ownerDocument||_doc$1,enabled,scrollProxy,startPointerX,startPointerY,startElementX,startElementY,hasBounds,hasDragCallback,hasMoveCallback,maxX,minX,maxY,minY,touch,touchID,rotationOrigin,dirty,old,snapX,snapY,snapXY,isClicking,touchEventTarget,matrix,interrupted,allowNativeTouchScrolling,touchDragAxis,isDispatching,clickDispatch,trustedClickDispatch,isPreventingDefault,innerMatrix,dragged,onContextMenu=function onContextMenu(e){return _preventDefault(e),e.stopImmediatePropagation&&e.stopImmediatePropagation(),!1},render=function render(suppressEvents){if(self.autoScroll&&self.isDragging&&(checkAutoScrollBounds||dirty)){var e=target,autoScrollFactor=self.autoScroll*15,parent,isRoot,rect,pointerX,pointerY,changeX,changeY,gap;checkAutoScrollBounds=!1,_windowProxy.scrollTop=_win$1.pageYOffset!=null?_win$1.pageYOffset:ownerDoc.documentElement.scrollTop!=null?ownerDoc.documentElement.scrollTop:ownerDoc.body.scrollTop,_windowProxy.scrollLeft=_win$1.pageXOffset!=null?_win$1.pageXOffset:ownerDoc.documentElement.scrollLeft!=null?ownerDoc.documentElement.scrollLeft:ownerDoc.body.scrollLeft,pointerX=self.pointerX-_windowProxy.scrollLeft,pointerY=self.pointerY-_windowProxy.scrollTop;while(e&&!isRoot)isRoot=_isRoot(e.parentNode),parent=isRoot?_windowProxy:e.parentNode,rect=isRoot?{bottom:Math.max(_docElement$1.clientHeight,_win$1.innerHeight||0),right:Math.max(_docElement$1.clientWidth,_win$1.innerWidth||0),left:0,top:0}:parent.getBoundingClientRect(),changeX=changeY=0,allowY&&(gap=parent._gsMaxScrollY-parent.scrollTop,gap<0?changeY=gap:pointerY>rect.bottom-autoScrollMarginBottom&&gap?(checkAutoScrollBounds=!0,changeY=Math.min(gap,autoScrollFactor*(1-Math.max(0,rect.bottom-pointerY)/autoScrollMarginBottom)|0)):pointerY<rect.top+autoScrollMarginTop&&parent.scrollTop&&(checkAutoScrollBounds=!0,changeY=-Math.min(parent.scrollTop,autoScrollFactor*(1-Math.max(0,pointerY-rect.top)/autoScrollMarginTop)|0)),changeY&&(parent.scrollTop+=changeY)),allowX&&(gap=parent._gsMaxScrollX-parent.scrollLeft,gap<0?changeX=gap:pointerX>rect.right-autoScrollMarginRight&&gap?(checkAutoScrollBounds=!0,changeX=Math.min(gap,autoScrollFactor*(1-Math.max(0,rect.right-pointerX)/autoScrollMarginRight)|0)):pointerX<rect.left+autoScrollMarginLeft&&parent.scrollLeft&&(checkAutoScrollBounds=!0,changeX=-Math.min(parent.scrollLeft,autoScrollFactor*(1-Math.max(0,pointerX-rect.left)/autoScrollMarginLeft)|0)),changeX&&(parent.scrollLeft+=changeX)),isRoot&&(changeX||changeY)&&(_win$1.scrollTo(parent.scrollLeft,parent.scrollTop),setPointerPosition(self.pointerX+changeX,self.pointerY+changeY)),e=parent}if(dirty){var x=self.x,y=self.y;rotationMode?(self.deltaX=x-parseFloat(gsCache.rotation),self.rotation=x,gsCache.rotation=x+"deg",gsCache.renderTransform(1,gsCache)):scrollProxy?(allowY&&(self.deltaY=y-scrollProxy.top(),scrollProxy.top(y)),allowX&&(self.deltaX=x-scrollProxy.left(),scrollProxy.left(x))):xyMode?(allowY&&(self.deltaY=y-parseFloat(gsCache.y),gsCache.y=y+"px"),allowX&&(self.deltaX=x-parseFloat(gsCache.x),gsCache.x=x+"px"),gsCache.renderTransform(1,gsCache)):(allowY&&(self.deltaY=y-parseFloat(target.style.top||0),target.style.top=y+"px"),allowX&&(self.deltaX=x-parseFloat(target.style.left||0),target.style.left=x+"px")),hasDragCallback&&!suppressEvents&&!isDispatching&&(isDispatching=!0,_dispatchEvent(self,"drag","onDrag")===!1&&(allowX&&(self.x-=self.deltaX),allowY&&(self.y-=self.deltaY),render(!0)),isDispatching=!1)}dirty=!1},syncXY=function syncXY(skipOnUpdate,skipSnap){var x=self.x,y=self.y,snappedValue,cs;target._gsap||(gsCache=gsap.core.getCache(target)),gsCache.uncache&&gsap.getProperty(target,"x"),xyMode?(self.x=parseFloat(gsCache.x),self.y=parseFloat(gsCache.y)):rotationMode?self.x=self.rotation=parseFloat(gsCache.rotation):scrollProxy?(self.y=scrollProxy.top(),self.x=scrollProxy.left()):(self.y=parseFloat(target.style.top||(cs=_getComputedStyle(target))&&cs.top)||0,self.x=parseFloat(target.style.left||(cs||{}).left)||0),(snapX||snapY||snapXY)&&!skipSnap&&(self.isDragging||self.isThrowing)&&(snapXY&&(_temp1.x=self.x,_temp1.y=self.y,snappedValue=snapXY(_temp1),snappedValue.x!==self.x&&(self.x=snappedValue.x,dirty=!0),snappedValue.y!==self.y&&(self.y=snappedValue.y,dirty=!0)),snapX&&(snappedValue=snapX(self.x),snappedValue!==self.x&&(self.x=snappedValue,rotationMode&&(self.rotation=snappedValue),dirty=!0)),snapY&&(snappedValue=snapY(self.y),snappedValue!==self.y&&(self.y=snappedValue),dirty=!0)),dirty&&render(!0),skipOnUpdate||(self.deltaX=self.x-x,self.deltaY=self.y-y,_dispatchEvent(self,"throwupdate","onThrowUpdate"))},buildSnapFunc=function buildSnapFunc(snap,min,max,factor){return min==null&&(min=-_bigNum),max==null&&(max=_bigNum),_isFunction(snap)?function(n){var edgeTolerance=self.isPressed?1-self.edgeResistance:1;return snap.call(self,(n>max?max+(n-max)*edgeTolerance:n<min?min+(n-min)*edgeTolerance:n)*factor)*factor}:_isArray(snap)?function(n){var i=snap.length,closest=0,absDif=_bigNum,val,dif;while(--i>-1)val=snap[i],dif=val-n,dif<0&&(dif=-dif),dif<absDif&&val>=min&&val<=max&&(closest=i,absDif=dif);return snap[closest]}:isNaN(snap)?function(n){return n}:function(){return snap*factor}},buildPointSnapFunc=function buildPointSnapFunc(snap,minX,maxX,minY,maxY,radius,factor){return radius=radius&&radius<_bigNum?radius*radius:_bigNum,_isFunction(snap)?function(point){var edgeTolerance=self.isPressed?1-self.edgeResistance:1,x=point.x,y=point.y,result,dx,dy;return point.x=x=x>maxX?maxX+(x-maxX)*edgeTolerance:x<minX?minX+(x-minX)*edgeTolerance:x,point.y=y=y>maxY?maxY+(y-maxY)*edgeTolerance:y<minY?minY+(y-minY)*edgeTolerance:y,result=snap.call(self,point),result!==point&&(point.x=result.x,point.y=result.y),factor!==1&&(point.x*=factor,point.y*=factor),radius<_bigNum&&(dx=point.x-x,dy=point.y-y,dx*dx+dy*dy>radius&&(point.x=x,point.y=y)),point}:_isArray(snap)?function(p){var i=snap.length,closest=0,minDist=_bigNum,x,y,point,dist;while(--i>-1)point=snap[i],x=point.x-p.x,y=point.y-p.y,dist=x*x+y*y,dist<minDist&&(closest=i,minDist=dist);return minDist<=radius?snap[closest]:p}:function(n){return n}},calculateBounds=function calculateBounds(){var bounds,targetBounds,snap,snapIsRaw;hasBounds=!1,scrollProxy?(scrollProxy.calibrate(),self.minX=minX=-scrollProxy.maxScrollLeft(),self.minY=minY=-scrollProxy.maxScrollTop(),self.maxX=maxX=self.maxY=maxY=0,hasBounds=!0):!vars.bounds||(bounds=_getBounds(vars.bounds,target.parentNode),rotationMode?(self.minX=minX=bounds.left,self.maxX=maxX=bounds.left+bounds.width,self.minY=minY=self.maxY=maxY=0):!_isUndefined(vars.bounds.maxX)||!_isUndefined(vars.bounds.maxY)?(bounds=vars.bounds,self.minX=minX=bounds.minX,self.minY=minY=bounds.minY,self.maxX=maxX=bounds.maxX,self.maxY=maxY=bounds.maxY):(targetBounds=_getBounds(target,target.parentNode),self.minX=minX=Math.round(getPropAsNum(xProp,"px")+bounds.left-targetBounds.left),self.minY=minY=Math.round(getPropAsNum(yProp,"px")+bounds.top-targetBounds.top),self.maxX=maxX=Math.round(minX+(bounds.width-targetBounds.width)),self.maxY=maxY=Math.round(minY+(bounds.height-targetBounds.height))),minX>maxX&&(self.minX=maxX,self.maxX=maxX=minX,minX=self.minX),minY>maxY&&(self.minY=maxY,self.maxY=maxY=minY,minY=self.minY),rotationMode&&(self.minRotation=minX,self.maxRotation=maxX),hasBounds=!0),vars.liveSnap&&(snap=vars.liveSnap===!0?vars.snap||{}:vars.liveSnap,snapIsRaw=_isArray(snap)||_isFunction(snap),rotationMode?(snapX=buildSnapFunc(snapIsRaw?snap:snap.rotation,minX,maxX,1),snapY=null):snap.points?snapXY=buildPointSnapFunc(snapIsRaw?snap:snap.points,minX,maxX,minY,maxY,snap.radius,scrollProxy?-1:1):(allowX&&(snapX=buildSnapFunc(snapIsRaw?snap:snap.x||snap.left||snap.scrollLeft,minX,maxX,scrollProxy?-1:1)),allowY&&(snapY=buildSnapFunc(snapIsRaw?snap:snap.y||snap.top||snap.scrollTop,minY,maxY,scrollProxy?-1:1))))},onThrowComplete=function onThrowComplete(){self.isThrowing=!1,_dispatchEvent(self,"throwcomplete","onThrowComplete")},onThrowInterrupt=function onThrowInterrupt(){self.isThrowing=!1},animate=function animate(inertia,forceZeroVelocity){var snap,snapIsRaw,tween,overshootTolerance;if(inertia&&InertiaPlugin){if(inertia===!0){snap=vars.snap||vars.liveSnap||{},snapIsRaw=_isArray(snap)||_isFunction(snap),inertia={resistance:(vars.throwResistance||vars.resistance||1e3)/(rotationMode?10:1)};if(rotationMode)inertia.rotation=_parseInertia(self,snapIsRaw?snap:snap.rotation,maxX,minX,1,forceZeroVelocity);else{allowX&&(inertia[xProp]=_parseInertia(self,snapIsRaw?snap:snap.points||snap.x||snap.left,maxX,minX,scrollProxy?-1:1,forceZeroVelocity||self.lockedAxis==="x")),allowY&&(inertia[yProp]=_parseInertia(self,snapIsRaw?snap:snap.points||snap.y||snap.top,maxY,minY,scrollProxy?-1:1,forceZeroVelocity||self.lockedAxis==="y"));if(snap.points||_isArray(snap)&&_isObject(snap[0]))inertia.linkedProps=xProp+","+yProp,inertia.radius=snap.radius}}self.isThrowing=!0,overshootTolerance=isNaN(vars.overshootTolerance)?vars.edgeResistance===1?0:1-self.edgeResistance+.2:vars.overshootTolerance,inertia.duration||(inertia.duration={max:Math.max(vars.minDuration||0,"maxDuration"in vars?vars.maxDuration:2),min:isNaN(vars.minDuration)?overshootTolerance===0||_isObject(inertia)&&inertia.resistance>1e3?0:.5:vars.minDuration,overshoot:overshootTolerance}),self.tween=tween=gsap.to(scrollProxy||target,{inertia:inertia,data:"_draggable",inherit:!1,onComplete:onThrowComplete,onInterrupt:onThrowInterrupt,onUpdate:vars.fastMode?_dispatchEvent:syncXY,onUpdateParams:vars.fastMode?[self,"onthrowupdate","onThrowUpdate"]:snap&&snap.radius?[!1,!0]:[]}),vars.fastMode||(scrollProxy&&(scrollProxy._skip=!0),tween.render(1e9,!0,!0),syncXY(!0,!0),self.endX=self.x,self.endY=self.y,rotationMode&&(self.endRotation=self.x),tween.play(0),syncXY(!0,!0),scrollProxy&&(scrollProxy._skip=!1))}else hasBounds&&self.applyBounds()},updateMatrix=function updateMatrix(shiftStart){var start=matrix,p;matrix=getGlobalMatrix(target.parentNode,!0),shiftStart&&self.isPressed&&!matrix.equals(start||new Matrix2D)&&(p=start.inverse().apply({x:startPointerX,y:startPointerY}),matrix.apply(p,p),startPointerX=p.x,startPointerY=p.y),matrix.equals(_identityMatrix$1)&&(matrix=null)},recordStartPositions=function recordStartPositions(){var edgeTolerance=1-self.edgeResistance,offsetX=isFixed?_getDocScrollLeft$1(ownerDoc):0,offsetY=isFixed?_getDocScrollTop$1(ownerDoc):0,parsedOrigin,x,y;xyMode&&(gsCache.x=getPropAsNum(xProp,"px")+"px",gsCache.y=getPropAsNum(yProp,"px")+"px",gsCache.renderTransform()),updateMatrix(!1),_point1.x=self.pointerX-offsetX,_point1.y=self.pointerY-offsetY,matrix&&matrix.apply(_point1,_point1),startPointerX=_point1.x,startPointerY=_point1.y,dirty&&(setPointerPosition(self.pointerX,self.pointerY),render(!0)),innerMatrix=getGlobalMatrix(target),scrollProxy?(calculateBounds(),startElementY=scrollProxy.top(),startElementX=scrollProxy.left()):(isTweening()?(syncXY(!0,!0),calculateBounds()):self.applyBounds(),rotationMode?(parsedOrigin=target.ownerSVGElement?[gsCache.xOrigin-target.getBBox().x,gsCache.yOrigin-target.getBBox().y]:(_getComputedStyle(target)[_transformOriginProp$1]||"0 0").split(" "),rotationOrigin=self.rotationOrigin=getGlobalMatrix(target).apply({x:parseFloat(parsedOrigin[0])||0,y:parseFloat(parsedOrigin[1])||0}),syncXY(!0,!0),x=self.pointerX-rotationOrigin.x-offsetX,y=rotationOrigin.y-self.pointerY+offsetY,startElementX=self.x,startElementY=self.y=Math.atan2(y,x)*_RAD2DEG):(startElementY=getPropAsNum(yProp,"px"),startElementX=getPropAsNum(xProp,"px"))),hasBounds&&edgeTolerance&&(startElementX>maxX?startElementX=maxX+(startElementX-maxX)/edgeTolerance:startElementX<minX&&(startElementX=minX-(minX-startElementX)/edgeTolerance),rotationMode||(startElementY>maxY?startElementY=maxY+(startElementY-maxY)/edgeTolerance:startElementY<minY&&(startElementY=minY-(minY-startElementY)/edgeTolerance))),self.startX=startElementX=_round(startElementX),self.startY=startElementY=_round(startElementY)},isTweening=function isTweening(){return self.tween&&self.tween.isActive()},removePlaceholder=function removePlaceholder(){_placeholderDiv.parentNode&&!isTweening()&&!self.isDragging&&_placeholderDiv.parentNode.removeChild(_placeholderDiv)},onPress=function onPress(e,force){var i;if(!enabled||self.isPressed||!e||(e.type==="mousedown"||e.type==="pointerdown")&&!force&&_getTime()-clickTime<30&&_touchEventLookup[self.pointerEvent.type]){isPreventingDefault&&e&&enabled&&_preventDefault(e);return}interrupted=isTweening(),dragged=!1,self.pointerEvent=e,_touchEventLookup[e.type]?(touchEventTarget=~e.type.indexOf("touch")?e.currentTarget||e.target:ownerDoc,_addListener(touchEventTarget,"touchend",onRelease),_addListener(touchEventTarget,"touchmove",onMove),_addListener(touchEventTarget,"touchcancel",onRelease),_addListener(ownerDoc,"touchstart",_onMultiTouchDocument)):(touchEventTarget=null,_addListener(ownerDoc,"mousemove",onMove)),touchDragAxis=null;if(!_supportsPointer||!touchEventTarget)_addListener(ownerDoc,"mouseup",onRelease),e&&e.target&&_addListener(e.target,"mouseup",onRelease);isClicking=isClickable.call(self,e.target)&&vars.dragClickables===!1&&!force;if(isClicking){_addListener(e.target,"change",onRelease),_dispatchEvent(self,"pressInit","onPressInit"),_dispatchEvent(self,"press","onPress"),_setSelectable(triggers,!0),isPreventingDefault=!1;return}allowNativeTouchScrolling=!touchEventTarget||allowX===allowY||self.vars.allowNativeTouchScrolling===!1||self.vars.allowContextMenu&&e&&(e.ctrlKey||e.which>2)?!1:allowX?"y":"x",isPreventingDefault=!allowNativeTouchScrolling&&!self.allowEventDefault,isPreventingDefault&&(_preventDefault(e),_addListener(_win$1,"touchforcechange",_preventDefault)),e.changedTouches?(e=touch=e.changedTouches[0],touchID=e.identifier):e.pointerId?touchID=e.pointerId:touch=touchID=null,_dragCount++,_addToRenderQueue(render),startPointerY=self.pointerY=e.pageY,startPointerX=self.pointerX=e.pageX,_dispatchEvent(self,"pressInit","onPressInit"),(allowNativeTouchScrolling||self.autoScroll)&&_recordMaxScrolls(target.parentNode),target.parentNode&&self.autoScroll&&!scrollProxy&&!rotationMode&&target.parentNode._gsMaxScrollX&&!_placeholderDiv.parentNode&&!target.getBBox&&(_placeholderDiv.style.width=target.parentNode.scrollWidth+"px",target.parentNode.appendChild(_placeholderDiv)),recordStartPositions(),self.tween&&self.tween.kill(),self.isThrowing=!1,gsap.killTweensOf(scrollProxy||target,killProps,!0),scrollProxy&&gsap.killTweensOf(target,{scrollTo:1},!0),self.tween=self.lockedAxis=null;if(vars.zIndexBoost||!rotationMode&&!scrollProxy&&vars.zIndexBoost!==!1)target.style.zIndex=Draggable.zIndex++;self.isPressed=!0,hasDragCallback=!!vars.onDrag||!!self._listeners.drag,hasMoveCallback=!!vars.onMove||!!self._listeners.move;if(vars.cursor!==!1||vars.activeCursor){i=triggers.length;while(--i>-1)gsap.set(triggers[i],{cursor:vars.activeCursor||vars.cursor||(_defaultCursor==="grab"?"grabbing":_defaultCursor)})}_dispatchEvent(self,"press","onPress")},onMove=function onMove(e){var originalEvent=e,touches,pointerX,pointerY,i,dx,dy;if(!enabled||_isMultiTouching||!self.isPressed||!e){isPreventingDefault&&e&&enabled&&_preventDefault(e);return}self.pointerEvent=e,touches=e.changedTouches;if(touches){e=touches[0];if(e!==touch&&e.identifier!==touchID){i=touches.length;while(--i>-1&&(e=touches[i]).identifier!==touchID&&e.target!==target);if(i<0)return}}else if(e.pointerId&&touchID&&e.pointerId!==touchID)return;if(touchEventTarget&&allowNativeTouchScrolling&&!touchDragAxis){_point1.x=e.pageX-(isFixed?_getDocScrollLeft$1(ownerDoc):0),_point1.y=e.pageY-(isFixed?_getDocScrollTop$1(ownerDoc):0),matrix&&matrix.apply(_point1,_point1),pointerX=_point1.x,pointerY=_point1.y,dx=Math.abs(pointerX-startPointerX),dy=Math.abs(pointerY-startPointerY);if(dx!==dy&&(dx>minimumMovement||dy>minimumMovement)||_isAndroid&&allowNativeTouchScrolling===touchDragAxis){touchDragAxis=dx>dy&&allowX?"x":"y",allowNativeTouchScrolling&&touchDragAxis!==allowNativeTouchScrolling&&_addListener(_win$1,"touchforcechange",_preventDefault),self.vars.lockAxisOnTouchScroll!==!1&&allowX&&allowY&&(self.lockedAxis=touchDragAxis==="x"?"y":"x",_isFunction(self.vars.onLockAxis)&&self.vars.onLockAxis.call(self,originalEvent));if(_isAndroid&&allowNativeTouchScrolling===touchDragAxis){onRelease(originalEvent);return}}}!self.allowEventDefault&&(!allowNativeTouchScrolling||touchDragAxis&&allowNativeTouchScrolling!==touchDragAxis)&&originalEvent.cancelable!==!1?(_preventDefault(originalEvent),isPreventingDefault=!0):isPreventingDefault&&(isPreventingDefault=!1),self.autoScroll&&(checkAutoScrollBounds=!0),setPointerPosition(e.pageX,e.pageY,hasMoveCallback)},setPointerPosition=function setPointerPosition(pointerX,pointerY,invokeOnMove){var dragTolerance=1-self.dragResistance,edgeTolerance=1-self.edgeResistance,prevPointerX=self.pointerX,prevPointerY=self.pointerY,prevStartElementY=startElementY,prevX=self.x,prevY=self.y,prevEndX=self.endX,prevEndY=self.endY,prevEndRotation=self.endRotation,prevDirty=dirty,xChange,yChange,x,y,dif,temp;self.pointerX=pointerX,self.pointerY=pointerY,isFixed&&(pointerX-=_getDocScrollLeft$1(ownerDoc),pointerY-=_getDocScrollTop$1(ownerDoc)),rotationMode?(y=Math.atan2(rotationOrigin.y-pointerY,pointerX-rotationOrigin.x)*_RAD2DEG,dif=self.y-y,dif>180?(startElementY-=360,self.y=y):dif<-180&&(startElementY+=360,self.y=y),self.x!==startElementX||Math.abs(startElementY-y)>minimumMovement?(self.y=y,x=startElementX+(startElementY-y)*dragTolerance):x=startElementX):(matrix&&(temp=pointerX*matrix.a+pointerY*matrix.c+matrix.e,pointerY=pointerX*matrix.b+pointerY*matrix.d+matrix.f,pointerX=temp),yChange=pointerY-startPointerY,xChange=pointerX-startPointerX,yChange<minimumMovement&&yChange>-minimumMovement&&(yChange=0),xChange<minimumMovement&&xChange>-minimumMovement&&(xChange=0),(self.lockAxis||self.lockedAxis)&&(xChange||yChange)&&(temp=self.lockedAxis,temp||(self.lockedAxis=temp=allowX&&Math.abs(xChange)>Math.abs(yChange)?"y":allowY?"x":null,temp&&_isFunction(self.vars.onLockAxis)&&self.vars.onLockAxis.call(self,self.pointerEvent)),temp==="y"?yChange=0:temp==="x"&&(xChange=0)),x=_round(startElementX+xChange*dragTolerance),y=_round(startElementY+yChange*dragTolerance)),(snapX||snapY||snapXY)&&(self.x!==x||self.y!==y&&!rotationMode)&&(snapXY&&(_temp1.x=x,_temp1.y=y,temp=snapXY(_temp1),x=_round(temp.x),y=_round(temp.y)),snapX&&(x=_round(snapX(x))),snapY&&(y=_round(snapY(y)))),hasBounds&&(x>maxX?x=maxX+Math.round((x-maxX)*edgeTolerance):x<minX&&(x=minX+Math.round((x-minX)*edgeTolerance)),rotationMode||(y>maxY?y=Math.round(maxY+(y-maxY)*edgeTolerance):y<minY&&(y=Math.round(minY+(y-minY)*edgeTolerance))));if(self.x!==x||self.y!==y&&!rotationMode)rotationMode?(self.endRotation=self.x=self.endX=x,dirty=!0):(allowY&&(self.y=self.endY=y,dirty=!0),allowX&&(self.x=self.endX=x,dirty=!0)),!invokeOnMove||_dispatchEvent(self,"move","onMove")!==!1?!self.isDragging&&self.isPressed&&(self.isDragging=dragged=!0,_dispatchEvent(self,"dragstart","onDragStart")):(self.pointerX=prevPointerX,self.pointerY=prevPointerY,startElementY=prevStartElementY,self.x=prevX,self.y=prevY,self.endX=prevEndX,self.endY=prevEndY,self.endRotation=prevEndRotation,dirty=prevDirty)},onRelease=function onRelease(e,force){if(!enabled||!self.isPressed||e&&touchID!=null&&!force&&(e.pointerId&&e.pointerId!==touchID&&e.target!==target||e.changedTouches&&!_hasTouchID(e.changedTouches,touchID))){isPreventingDefault&&e&&enabled&&_preventDefault(e);return}self.isPressed=!1;var originalEvent=e,wasDragging=self.isDragging,isContextMenuRelease=self.vars.allowContextMenu&&e&&(e.ctrlKey||e.which>2),placeholderDelayedCall=gsap.delayedCall(.001,removePlaceholder),touches,i,syntheticEvent,eventTarget,syntheticClick;touchEventTarget?(_removeListener(touchEventTarget,"touchend",onRelease),_removeListener(touchEventTarget,"touchmove",onMove),_removeListener(touchEventTarget,"touchcancel",onRelease),_removeListener(ownerDoc,"touchstart",_onMultiTouchDocument)):_removeListener(ownerDoc,"mousemove",onMove),_removeListener(_win$1,"touchforcechange",_preventDefault);if(!_supportsPointer||!touchEventTarget)_removeListener(ownerDoc,"mouseup",onRelease),e&&e.target&&_removeListener(e.target,"mouseup",onRelease);dirty=!1,wasDragging&&(dragEndTime=_lastDragTime=_getTime(),self.isDragging=!1),_removeFromRenderQueue(render);if(isClicking&&!isContextMenuRelease){e&&(_removeListener(e.target,"change",onRelease),self.pointerEvent=originalEvent),_setSelectable(triggers,!1),_dispatchEvent(self,"release","onRelease"),_dispatchEvent(self,"click","onClick"),isClicking=!1;return}i=triggers.length;while(--i>-1)_setStyle(triggers[i],"cursor",vars.cursor||(vars.cursor!==!1?_defaultCursor:null));_dragCount--;if(e){touches=e.changedTouches;if(touches){e=touches[0];if(e!==touch&&e.identifier!==touchID){i=touches.length;while(--i>-1&&(e=touches[i]).identifier!==touchID&&e.target!==target);if(i<0&&!force)return}}self.pointerEvent=originalEvent,self.pointerX=e.pageX,self.pointerY=e.pageY}return isContextMenuRelease&&originalEvent?(_preventDefault(originalEvent),isPreventingDefault=!0,_dispatchEvent(self,"release","onRelease")):originalEvent&&!wasDragging?(isPreventingDefault=!1,interrupted&&(vars.snap||vars.bounds)&&animate(vars.inertia||vars.throwProps),_dispatchEvent(self,"release","onRelease"),(!_isAndroid||originalEvent.type!=="touchmove")&&originalEvent.type.indexOf("cancel")===-1&&(_dispatchEvent(self,"click","onClick"),_getTime()-clickTime<300&&_dispatchEvent(self,"doubleclick","onDoubleClick"),eventTarget=originalEvent.target||target,clickTime=_getTime(),syntheticClick=function syntheticClick(){clickTime!==clickDispatch&&self.enabled()&&!self.isPressed&&!originalEvent.defaultPrevented&&(eventTarget.click?eventTarget.click():ownerDoc.createEvent&&(syntheticEvent=ownerDoc.createEvent("MouseEvents"),syntheticEvent.initMouseEvent("click",!0,!0,_win$1,1,self.pointerEvent.screenX,self.pointerEvent.screenY,self.pointerX,self.pointerY,!1,!1,!1,!1,0,null),eventTarget.dispatchEvent(syntheticEvent)))},!_isAndroid&&!originalEvent.defaultPrevented&&gsap.delayedCall(.05,syntheticClick))):(animate(vars.inertia||vars.throwProps),!self.allowEventDefault&&originalEvent&&(vars.dragClickables!==!1||!isClickable.call(self,originalEvent.target))&&wasDragging&&(!allowNativeTouchScrolling||touchDragAxis&&allowNativeTouchScrolling===touchDragAxis)&&originalEvent.cancelable!==!1?(isPreventingDefault=!0,_preventDefault(originalEvent)):isPreventingDefault=!1,_dispatchEvent(self,"release","onRelease")),isTweening()&&placeholderDelayedCall.duration(self.tween.duration()),wasDragging&&_dispatchEvent(self,"dragend","onDragEnd"),!0},updateScroll=function updateScroll(e){if(e&&self.isDragging&&!scrollProxy){var parent=e.target||target.parentNode,deltaX=parent.scrollLeft-parent._gsScrollX,deltaY=parent.scrollTop-parent._gsScrollY;if(deltaX||deltaY)matrix?(startPointerX-=deltaX*matrix.a+deltaY*matrix.c,startPointerY-=deltaY*matrix.d+deltaX*matrix.b):(startPointerX-=deltaX,startPointerY-=deltaY),parent._gsScrollX+=deltaX,parent._gsScrollY+=deltaY,setPointerPosition(self.pointerX,self.pointerY)}},onClick=function onClick(e){var time=_getTime(),recentlyClicked=time-clickTime<100,recentlyDragged=time-dragEndTime<50,alreadyDispatched=recentlyClicked&&clickDispatch===clickTime,defaultPrevented=self.pointerEvent&&self.pointerEvent.defaultPrevented,alreadyDispatchedTrusted=recentlyClicked&&trustedClickDispatch===clickTime,trusted=e.isTrusted||e.isTrusted==null&&recentlyClicked&&alreadyDispatched;(alreadyDispatched||recentlyDragged&&self.vars.suppressClickOnDrag!==!1)&&e.stopImmediatePropagation&&e.stopImmediatePropagation();if(recentlyClicked&&(!self.pointerEvent||!self.pointerEvent.defaultPrevented)&&(!alreadyDispatched||trusted&&!alreadyDispatchedTrusted)){trusted&&alreadyDispatched&&(trustedClickDispatch=clickTime),clickDispatch=clickTime;return}(self.isPressed||recentlyDragged||recentlyClicked)&&(!trusted||!e.detail||!recentlyClicked||defaultPrevented)&&_preventDefault(e),!recentlyClicked&&!recentlyDragged&&!dragged&&(e&&e.target&&(self.pointerEvent=e),_dispatchEvent(self,"click","onClick"))},localizePoint=function localizePoint(p){return matrix?{x:p.x*matrix.a+p.y*matrix.c+matrix.e,y:p.x*matrix.b+p.y*matrix.d+matrix.f}:{x:p.x,y:p.y}};return old=Draggable.get(target),old&&old.kill(),_this2.startDrag=function(event,align){var r1,r2,p1,p2;onPress(event||self.pointerEvent,!0),align&&!self.hitTest(event||self.pointerEvent)&&(r1=_parseRect(event||self.pointerEvent),r2=_parseRect(target),p1=localizePoint({x:r1.left+r1.width/2,y:r1.top+r1.height/2}),p2=localizePoint({x:r2.left+r2.width/2,y:r2.top+r2.height/2}),startPointerX-=p1.x-p2.x,startPointerY-=p1.y-p2.y),self.isDragging||(self.isDragging=dragged=!0,_dispatchEvent(self,"dragstart","onDragStart"))},_this2.drag=onMove,_this2.endDrag=function(e){return onRelease(e||self.pointerEvent,!0)},_this2.timeSinceDrag=function(){return self.isDragging?0:(_getTime()-dragEndTime)/1e3},_this2.timeSinceClick=function(){return(_getTime()-clickTime)/1e3},_this2.hitTest=function(target,threshold){return Draggable.hitTest(self.target,target,threshold)},_this2.getDirection=function(from,diagonalThreshold){var mode=from==="velocity"&&InertiaPlugin?from:_isObject(from)&&!rotationMode?"element":"start",xChange,yChange,ratio,direction,r1,r2;return mode==="element"&&(r1=_parseRect(self.target),r2=_parseRect(from)),xChange=mode==="start"?self.x-startElementX:mode==="velocity"?InertiaPlugin.getVelocity(target,xProp):r1.left+r1.width/2-(r2.left+r2.width/2),rotationMode?xChange<0?"counter-clockwise":"clockwise":(diagonalThreshold=diagonalThreshold||2,yChange=mode==="start"?self.y-startElementY:mode==="velocity"?InertiaPlugin.getVelocity(target,yProp):r1.top+r1.height/2-(r2.top+r2.height/2),ratio=Math.abs(xChange/yChange),direction=ratio<1/diagonalThreshold?"":xChange<0?"left":"right",ratio<diagonalThreshold&&(direction!==""&&(direction+="-"),direction+=yChange<0?"up":"down"),direction)},_this2.applyBounds=function(newBounds,sticky){var x,y,forceZeroVelocity,e,parent,isRoot;if(newBounds&&vars.bounds!==newBounds)return vars.bounds=newBounds,self.update(!0,sticky);syncXY(!0),calculateBounds();if(hasBounds&&!isTweening()){x=self.x,y=self.y,x>maxX?x=maxX:x<minX&&(x=minX),y>maxY?y=maxY:y<minY&&(y=minY);if(self.x!==x||self.y!==y){forceZeroVelocity=!0,self.x=self.endX=x,rotationMode?self.endRotation=x:self.y=self.endY=y,dirty=!0,render(!0);if(self.autoScroll&&!self.isDragging){_recordMaxScrolls(target.parentNode),e=target,_windowProxy.scrollTop=_win$1.pageYOffset!=null?_win$1.pageYOffset:ownerDoc.documentElement.scrollTop!=null?ownerDoc.documentElement.scrollTop:ownerDoc.body.scrollTop,_windowProxy.scrollLeft=_win$1.pageXOffset!=null?_win$1.pageXOffset:ownerDoc.documentElement.scrollLeft!=null?ownerDoc.documentElement.scrollLeft:ownerDoc.body.scrollLeft;while(e&&!isRoot)isRoot=_isRoot(e.parentNode),parent=isRoot?_windowProxy:e.parentNode,allowY&&parent.scrollTop>parent._gsMaxScrollY&&(parent.scrollTop=parent._gsMaxScrollY),allowX&&parent.scrollLeft>parent._gsMaxScrollX&&(parent.scrollLeft=parent._gsMaxScrollX),e=parent}}self.isThrowing&&(forceZeroVelocity||self.endX>maxX||self.endX<minX||self.endY>maxY||self.endY<minY)&&animate(vars.inertia||vars.throwProps,forceZeroVelocity)}return self},_this2.update=function(applyBounds,sticky,ignoreExternalChanges){if(sticky&&self.isPressed){var m=getGlobalMatrix(target),p=innerMatrix.apply({x:self.x-startElementX,y:self.y-startElementY}),m2=getGlobalMatrix(target.parentNode,!0);m2.apply({x:m.e-p.x,y:m.f-p.y},p),self.x-=p.x-m2.e,self.y-=p.y-m2.f,render(!0),recordStartPositions()}var x=self.x,y=self.y;return updateMatrix(!sticky),applyBounds?self.applyBounds():(dirty&&ignoreExternalChanges&&render(!0),syncXY(!0)),sticky&&(setPointerPosition(self.pointerX,self.pointerY),dirty&&render(!0)),self.isPressed&&!sticky&&(allowX&&Math.abs(x-self.x)>.01||allowY&&Math.abs(y-self.y)>.01&&!rotationMode)&&recordStartPositions(),self.autoScroll&&(_recordMaxScrolls(target.parentNode,self.isDragging),checkAutoScrollBounds=self.isDragging,render(!0),_removeScrollListener(target,updateScroll),_addScrollListener(target,updateScroll)),self},_this2.enable=function(type){var setVars={lazy:!0},id,i,trigger;vars.cursor!==!1&&(setVars.cursor=vars.cursor||_defaultCursor),gsap.utils.checkPrefix("touchCallout")&&(setVars.touchCallout="none");if(type!=="soft"){_setTouchActionForAllDescendants(triggers,allowX===allowY?"none":vars.allowNativeTouchScrolling&&target.scrollHeight===target.clientHeight==(target.scrollWidth===target.clientHeight)||vars.allowEventDefault?"manipulation":allowX?"pan-y":"pan-x"),i=triggers.length;while(--i>-1)trigger=triggers[i],_supportsPointer||_addListener(trigger,"mousedown",onPress),_addListener(trigger,"touchstart",onPress),_addListener(trigger,"click",onClick,!0),gsap.set(trigger,setVars),trigger.getBBox&&trigger.ownerSVGElement&&allowX!==allowY&&gsap.set(trigger.ownerSVGElement,{touchAction:vars.allowNativeTouchScrolling||vars.allowEventDefault?"manipulation":allowX?"pan-y":"pan-x"}),vars.allowContextMenu||_addListener(trigger,"contextmenu",onContextMenu);_setSelectable(triggers,!1)}return _addScrollListener(target,updateScroll),enabled=!0,InertiaPlugin&&type!=="soft"&&InertiaPlugin.track(scrollProxy||target,xyMode?"x,y":rotationMode?"rotation":"top,left"),target._gsDragID=id="d"+_lookupCount++,_lookup[id]=self,scrollProxy&&(scrollProxy.enable(),scrollProxy.element._gsDragID=id),(vars.bounds||rotationMode)&&recordStartPositions(),vars.bounds&&self.applyBounds(),self},_this2.disable=function(type){var dragging=self.isDragging,i=triggers.length,trigger;while(--i>-1)_setStyle(triggers[i],"cursor",null);if(type!=="soft"){_setTouchActionForAllDescendants(triggers,null),i=triggers.length;while(--i>-1)trigger=triggers[i],_setStyle(trigger,"touchCallout",null),_removeListener(trigger,"mousedown",onPress),_removeListener(trigger,"touchstart",onPress),_removeListener(trigger,"click",onClick,!0),_removeListener(trigger,"contextmenu",onContextMenu);_setSelectable(triggers,!0),touchEventTarget&&(_removeListener(touchEventTarget,"touchcancel",onRelease),_removeListener(touchEventTarget,"touchend",onRelease),_removeListener(touchEventTarget,"touchmove",onMove)),_removeListener(ownerDoc,"mouseup",onRelease),_removeListener(ownerDoc,"mousemove",onMove)}return _removeScrollListener(target,updateScroll),enabled=!1,InertiaPlugin&&type!=="soft"&&(InertiaPlugin.untrack(scrollProxy||target,xyMode?"x,y":rotationMode?"rotation":"top,left"),self.tween&&self.tween.kill()),scrollProxy&&scrollProxy.disable(),_removeFromRenderQueue(render),self.isDragging=self.isPressed=isClicking=!1,dragging&&_dispatchEvent(self,"dragend","onDragEnd"),self},_this2.enabled=function(value,type){return arguments.length?value?self.enable(type):self.disable(type):enabled},_this2.kill=function(){return self.isThrowing=!1,self.tween&&self.tween.kill(),self.disable(),gsap.set(triggers,{clearProps:"userSelect"}),delete _lookup[target._gsDragID],self},_this2.revert=function(){this.kill(),this.styles&&this.styles.revert()},~type.indexOf("scroll")&&(scrollProxy=_this2.scrollProxy=new ScrollProxy(target,_extend({onKill:function onKill(){self.isPressed&&onRelease(null)}},vars)),target.style.overflowY=allowY&&!_isTouchDevice?"auto":"hidden",target.style.overflowX=allowX&&!_isTouchDevice?"auto":"hidden",target=scrollProxy.content),rotationMode?killProps.rotation=1:(allowX&&(killProps[xProp]=1),allowY&&(killProps[yProp]=1)),gsCache.force3D="force3D"in vars?vars.force3D:!0,_context(_assertThisInitialized(_this2)),_this2.enable(),_this2}return _inheritsLoose(Draggable,_EventDispatcher),Draggable.register=function register(core){gsap=core,_initCore()},Draggable.create=function create(targets,vars){return _coreInitted||_initCore(!0),_toArray(targets).map(function(target){return new Draggable(target,vars)})},Draggable.get=function get(target){return _lookup[(_toArray(target)[0]||{})._gsDragID]},Draggable.timeSinceDrag=function timeSinceDrag(){return(_getTime()-_lastDragTime)/1e3},Draggable.hitTest=function hitTest(obj1,obj2,threshold){if(obj1===obj2)return!1;var r1=_parseRect(obj1),r2=_parseRect(obj2),top=r1.top,left=r1.left,right=r1.right,bottom=r1.bottom,width=r1.width,height=r1.height,isOutside=r2.left>right||r2.right<left||r2.top>bottom||r2.bottom<top,overlap,area,isRatio;return isOutside||!threshold?!isOutside:(isRatio=(threshold+"").indexOf("%")!==-1,threshold=parseFloat(threshold)||0,overlap={left:Math.max(left,r2.left),top:Math.max(top,r2.top)},overlap.width=Math.min(right,r2.right)-overlap.left,overlap.height=Math.min(bottom,r2.bottom)-overlap.top,overlap.width<0||overlap.height<0?!1:isRatio?(threshold*=.01,area=overlap.width*overlap.height,area>=width*height*threshold||area>=r2.width*r2.height*threshold):overlap.width>threshold&&overlap.height>threshold)},Draggable}(EventDispatcher);_setDefaults(Draggable.prototype,{pointerX:0,pointerY:0,startX:0,startY:0,deltaX:0,deltaY:0,isDragging:!1,isPressed:!1}),Draggable.zIndex=1e3,Draggable.version="3.12.5",_getGSAP()&&gsap.registerPlugin(Draggable),exports.Draggable=Draggable,exports.default=Draggable,typeof window=="undefined"||window!==exports?Object.defineProperty(exports,"__esModule",{value:!0}):delete window.default}),+function($){"use strict";var Collapse=function(element,options){this.$element=$(element),this.options=$.extend({},Collapse.DEFAULTS,options),this.transitioning=null,this.options.parent&&(this.$parent=$(this.options.parent)),this.options.toggle&&this.toggle()};Collapse.DEFAULTS={toggle:!0},Collapse.prototype.dimension=function(){var hasWidth=this.$element.hasClass("width");return hasWidth?"width":"height"},Collapse.prototype.show=function(){if(this.transitioning||this.$element.hasClass("in"))return;var startEvent=$.Event("show.bs.collapse");this.$element.trigger(startEvent);if(startEvent.isDefaultPrevented())return;var actives=this.$parent&&this.$parent.find("> .panel > .in");if(actives&&actives.length){var hasData=actives.data("bs.collapse");if(hasData&&hasData.transitioning)return;var parentNoToggle=this.$parent.data("no-toggle");parentNoToggle||actives.collapse("hide"),hasData||actives.data("bs.collapse",null)}var dimension=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[dimension](0),this.transitioning=1;var complete=function(e){if(e&&e.target!=this.$element[0])return;this.$element.removeClass("collapsing").addClass("collapse in")[dimension]("auto"),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!$.support.transition)return complete.call(this);var scrollSize=$.camelCase(["scroll",dimension].join("-"));this.$element.one($.support.transition.end,$.proxy(complete,this)).emulateTransitionEnd(350)[dimension](this.$element[0][scrollSize])},Collapse.prototype.hide=function(){if(this.transitioning||!this.$element.hasClass("in"))return;var startEvent=$.Event("hide.bs.collapse");this.$element.trigger(startEvent);if(startEvent.isDefaultPrevented())return;var dimension=this.dimension();this.$element[dimension](this.$element[dimension]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1;var complete=function(e){if(e&&e.target!=this.$element[0])return;this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse")};if(!$.support.transition)return complete.call(this);this.$element[dimension](0).one($.support.transition.end,$.proxy(complete,this)).emulateTransitionEnd(350)},Collapse.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var old=$.fn.collapse;$.fn.collapse=function(option){return this.each(function(){var $this=$(this),data=$this.data("bs.collapse"),options=$.extend({},Collapse.DEFAULTS,$this.data(),typeof option=="object"&&option);!data&&options.toggle&&option=="show"&&(option=!option),data||$this.data("bs.collapse",data=new Collapse(this,options)),typeof option=="string"&&data[option]()})},$.fn.collapse.Constructor=Collapse,$.fn.collapse.noConflict=function(){return $.fn.collapse=old,this},$(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(e){var $this=$(this),href,target=$this.attr("data-target")||e.preventDefault()||(href=$this.attr("href"))&&href.replace(/.*(?=#[^\s]+$)/,""),_target=href.replace(/^#/,"");if($('[data-id="'+_target+'"]').length)var $target=$('[data-id="'+_target+'"]');else var $target=$(target);var data=$target.data("bs.collapse"),option=data?"toggle":$this.data(),parent=$this.attr("data-parent"),$parent=parent&&$(parent);if(!data||!data.transitioning)$parent&&$parent.find('[data-toggle="collapse"][data-parent="'+parent+'"]').not($this).addClass("collapsed"),$this[$target.hasClass("in")?"addClass":"removeClass"]("collapsed");$target.collapse(option)})}(jQuery),+function($){"use strict";var Tab=function(element){this.element=$(element)};Tab.prototype.show=function(){var $this=this.element,$ul=$this.closest("ul:not(.dropdown-menu)"),selector=$this.data("target");selector||(selector=$this.attr("href"),selector=selector&&selector.replace(/.*(?=#[^\s]*$)/,""));if($this.parent("li").hasClass("active"))return;var previous=$ul.find(".active:last a")[0],e=$.Event("show.bs.tab",{relatedTarget:previous});$this.trigger(e);if(e.isDefaultPrevented())return;var _target=selector.replace(/^#/,"");if($('[data-id="'+_target+'"]').length)var $target=$('[data-id="'+_target+'"]');else var $target=$(selector);this.activate($this.parent("li"),$ul),this.activate($target,$target.parent(),function(){$this.trigger({type:"shown.bs.tab",relatedTarget:previous})})},Tab.prototype.activate=function(element,container,callback){function next(){$active.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),$active.find(".tab-excerpt").slideUp(),element.addClass("active"),$(".tab-excerpt",element).slideDown(),element[0].offsetWidth,element.add($active).addClass("in"),element.parent(".dropdown-menu")&&element.closest("li.dropdown").addClass("active"),element.is("li")||element.closest(".tab-content").find("> .active").not(element).removeClass("active"),callback&&callback()}var $active=container.find("> .active").add(container.find("> .active > .active")),transition=callback&&$.support.transition&&$active.hasClass("fade");transition?$active.one($.support.transition.end,next).emulateTransitionEnd(150):next(),$active.removeClass("in")};var old=$.fn.tab;$.fn.tab=function(option){return this.each(function(){var $this=$(this),data=$this.data("bs.tab");data||$this.data("bs.tab",data=new Tab(this)),typeof option=="string"&&data[option]()})},$.fn.tab.Constructor=Tab,$.fn.tab.noConflict=function(){return $.fn.tab=old,this},$(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(e){e.preventDefault(),$(this).tab("show")})}(jQuery),+function($){"use strict";var Tooltip=function(element,options){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null,this.init("tooltip",element,options)};Tooltip.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},Tooltip.prototype.init=function(type,element,options){this.enabled=!0,this.type=type,this.$element=$(element),this.options=this.getOptions(options),this.$viewport=this.options.viewport&&$(this.options.viewport.selector||this.options.viewport);var triggers=this.options.trigger.split(" ");for(var i=triggers.length;i--;){var trigger=triggers[i];if(trigger=="click")this.$element.on("click."+this.type,this.options.selector,$.proxy(this.toggle,this));else if(trigger!="manual"){var eventIn=trigger=="hover"?"mouseenter":"focusin",eventOut=trigger=="hover"?"mouseleave":"focusout";this.$element.on(eventIn+"."+this.type,this.options.selector,$.proxy(this.enter,this)),this.$element.on(eventOut+"."+this.type,this.options.selector,$.proxy(this.leave,this))}}this.options.selector?this._options=$.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},Tooltip.prototype.getDefaults=function(){return Tooltip.DEFAULTS},Tooltip.prototype.getOptions=function(options){return options=$.extend({},this.getDefaults(),this.$element.data(),options),options.delay&&typeof options.delay=="number"&&(options.delay={show:options.delay,hide:options.delay}),options},Tooltip.prototype.getDelegateOptions=function(){var options={},defaults=this.getDefaults();return this._options&&$.each(this._options,function(key,value){defaults[key]!=value&&(options[key]=value)}),options},Tooltip.prototype.enter=function(obj){var self=obj instanceof this.constructor?obj:$(obj.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);clearTimeout(self.timeout),self.hoverState="in";if(!self.options.delay||!self.options.delay.show)return self.show();self.timeout=setTimeout(function(){self.hoverState=="in"&&self.show()},self.options.delay.show)},Tooltip.prototype.leave=function(obj){var self=obj instanceof this.constructor?obj:$(obj.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);clearTimeout(self.timeout),self.hoverState="out";if(!self.options.delay||!self.options.delay.hide)return self.hide();self.timeout=setTimeout(function(){self.hoverState=="out"&&self.hide()},self.options.delay.hide)},Tooltip.prototype.show=function(){var e=$.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(e);if(e.isDefaultPrevented())return;var that=this,$tip=this.tip();this.setContent(),this.options.animation&&$tip.addClass("fade");var placement=typeof this.options.placement=="function"?this.options.placement.call(this,$tip[0],this.$element[0]):this.options.placement,autoToken=/\s?auto?\s?/i,autoPlace=autoToken.test(placement);autoPlace&&(placement=placement.replace(autoToken,"")||"top"),$tip.detach().css({top:0,left:0,display:"block"}).addClass(placement),this.options.container?$tip.appendTo($(document).find(this.options.container)):$tip.insertAfter(this.$element);var pos=this.getPosition(),actualWidth=$tip[0].offsetWidth,actualHeight=$tip[0].offsetHeight;if(autoPlace){var orgPlacement=placement,$parent=this.$element.parent(),parentDim=this.getPosition($parent);placement=placement=="bottom"&&pos.top+pos.height+actualHeight-parentDim.scroll>parentDim.height?"top":placement=="top"&&pos.top-parentDim.scroll-actualHeight<0?"bottom":placement=="right"&&pos.right+actualWidth>parentDim.width?"left":placement=="left"&&pos.left-actualWidth<parentDim.left?"right":placement,$tip.removeClass(orgPlacement).addClass(placement)}var calculatedOffset=this.getCalculatedOffset(placement,pos,actualWidth,actualHeight);this.applyPlacement(calculatedOffset,placement),this.hoverState=null;var complete=function(){that.$element.trigger("shown.bs."+that.type)};$.support.transition&&this.$tip.hasClass("fade")?$tip.one($.support.transition.end,complete).emulateTransitionEnd(150):complete()}},Tooltip.prototype.applyPlacement=function(offset,placement){var $tip=this.tip(),width=$tip[0].offsetWidth,height=$tip[0].offsetHeight,marginTop=parseInt($tip.css("margin-top"),10),marginLeft=parseInt($tip.css("margin-left"),10);isNaN(marginTop)&&(marginTop=0),isNaN(marginLeft)&&(marginLeft=0),offset.top=offset.top+marginTop,offset.left=offset.left+marginLeft,$.offset.setOffset($tip[0],$.extend({using:function(props){$tip.css({top:Math.round(props.top),left:Math.round(props.left)})}},offset),0),$tip.addClass("in");var actualWidth=$tip[0].offsetWidth,actualHeight=$tip[0].offsetHeight;placement=="top"&&actualHeight!=height&&(offset.top=offset.top+height-actualHeight);var delta=this.getViewportAdjustedDelta(placement,offset,actualWidth,actualHeight);delta.left?offset.left+=delta.left:offset.top+=delta.top;var arrowDelta=delta.left?delta.left*2-width+actualWidth:delta.top*2-height+actualHeight,arrowPosition=delta.left?"left":"top",arrowOffsetPosition=delta.left?"offsetWidth":"offsetHeight";$tip.offset(offset),this.replaceArrow(arrowDelta,$tip[0][arrowOffsetPosition],arrowPosition)},Tooltip.prototype.replaceArrow=function(delta,dimension,position){this.arrow().css(position,delta?50*(1-delta/dimension)+"%":"")},Tooltip.prototype.setContent=function(){var $tip=this.tip(),title=this.getTitle();$tip.find(".tooltip-inner")[this.options.html?"html":"text"](title),$tip.removeClass("fade in top bottom left right")},Tooltip.prototype.hide=function(){function complete(){that.hoverState!="in"&&$tip.detach(),that.$element.trigger("hidden.bs."+that.type)}var that=this,$tip=this.tip(),e=$.Event("hide.bs."+this.type);this.$element.trigger(e);if(e.isDefaultPrevented())return;return $tip.removeClass("in"),$.support.transition&&this.$tip.hasClass("fade")?$tip.one($.support.transition.end,complete).emulateTransitionEnd(150):complete(),this.hoverState=null,this},Tooltip.prototype.fixTitle=function(){var $e=this.$element;($e.attr("title")||typeof $e.attr("data-original-title")!="string")&&$e.attr("data-original-title",$e.attr("title")||"").attr("title","")},Tooltip.prototype.hasContent=function(){return this.getTitle()},Tooltip.prototype.getPosition=function($element){$element=$element||this.$element;var el=$element[0],isBody=el.tagName=="BODY";return $.extend({},typeof el.getBoundingClientRect=="function"?el.getBoundingClientRect():null,{scroll:isBody?document.documentElement.scrollTop||document.body.scrollTop:$element.scrollTop(),width:isBody?$(window).width():$element.outerWidth(),height:isBody?$(window).height():$element.outerHeight()},isBody?{top:0,left:0}:$element.offset())},Tooltip.prototype.getCalculatedOffset=function(placement,pos,actualWidth,actualHeight){return placement=="bottom"?{top:pos.top+pos.height,left:pos.left+pos.width/2-actualWidth/2}:placement=="top"?{top:pos.top-actualHeight,left:pos.left+pos.width/2-actualWidth/2}:placement=="left"?{top:pos.top+pos.height/2-actualHeight/2,left:pos.left-actualWidth}:{top:pos.top+pos.height/2-actualHeight/2,left:pos.left+pos.width}},Tooltip.prototype.getViewportAdjustedDelta=function(placement,pos,actualWidth,actualHeight){var delta={top:0,left:0};if(!this.$viewport)return delta;var viewportPadding=this.options.viewport&&this.options.viewport.padding||0,viewportDimensions=this.getPosition(this.$viewport);if(/right|left/.test(placement)){var topEdgeOffset=pos.top-viewportPadding-viewportDimensions.scroll,bottomEdgeOffset=pos.top+viewportPadding-viewportDimensions.scroll+actualHeight;topEdgeOffset<viewportDimensions.top?delta.top=viewportDimensions.top-topEdgeOffset:bottomEdgeOffset>viewportDimensions.top+viewportDimensions.height&&(delta.top=viewportDimensions.top+viewportDimensions.height-bottomEdgeOffset)}else{var leftEdgeOffset=pos.left-viewportPadding,rightEdgeOffset=pos.left+viewportPadding+actualWidth;leftEdgeOffset<viewportDimensions.left?delta.left=viewportDimensions.left-leftEdgeOffset:rightEdgeOffset>viewportDimensions.width&&(delta.left=viewportDimensions.left+viewportDimensions.width-rightEdgeOffset)}return delta},Tooltip.prototype.getTitle=function(){var title,$e=this.$element,o=this.options;return title=$e.attr("data-original-title")||(typeof o.title=="function"?o.title.call($e[0]):o.title),title},Tooltip.prototype.tip=function(){return this.$tip=this.$tip||$(this.options.template)},Tooltip.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},Tooltip.prototype.validate=function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},Tooltip.prototype.enable=function(){this.enabled=!0},Tooltip.prototype.disable=function(){this.enabled=!1},Tooltip.prototype.toggleEnabled=function(){this.enabled=!this.enabled},Tooltip.prototype.toggle=function(e){var self=e?$(e.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type):this;self.tip().hasClass("in")?self.leave(self):self.enter(self)},Tooltip.prototype.destroy=function(){clearTimeout(this.timeout),this.hide().$element.off("."+this.type).removeData("bs."+this.type)};var old=$.fn.tooltip;$.fn.tooltip=function(option){return this.each(function(){var $this=$(this),data=$this.data("bs.tooltip"),options=typeof option=="object"&&option;if(!data&&option=="destroy")return;data||$this.data("bs.tooltip",data=new Tooltip(this,options)),typeof option=="string"&&data[option]()})},$.fn.tooltip.Constructor=Tooltip,$.fn.tooltip.noConflict=function(){return $.fn.tooltip=old,this}}(jQuery),+function($){"use strict";function transitionEnd(){var el=document.createElement("bootstrap"),transEndEventNames={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var name in transEndEventNames)if(el.style[name]!==undefined)return{end:transEndEventNames[name]};return!1}$.fn.emulateTransitionEnd=function(duration){var called=!1,$el=this;$(this).one($.support.transition.end,function(){called=!0});var callback=function(){called||$($el).trigger($.support.transition.end)};return setTimeout(callback,duration),this},$(function(){$.support.transition=transitionEnd()})}(jQuery),function(root,factory){typeof define=="function"&&define.amd?define([],factory):typeof module=="object"&&module.exports?module.exports=factory():root.Rellax=factory()}(typeof window!="undefined"?window:global,function(){var Rellax=function(el,options){"use strict";function validateCustomBreakpoints(){if(self.options.breakpoints.length===3&&Array.isArray(self.options.breakpoints)){var isAscending=!0,isNumerical=!0,lastVal;self.options.breakpoints.forEach(function(i){typeof i!="number"&&(isNumerical=!1),lastVal!==null&&i<lastVal&&(isAscending=!1),lastVal=i});if(isAscending&&isNumerical)return}self.options.breakpoints=[576,768,1201],console.warn("Rellax: You must pass an array of 3 numbers in ascending order to the breakpoints option. Defaults reverted")}var self=Object.create(Rellax.prototype),posY=0,screenY=0,posX=0,screenX=0,blocks=[],pause=!0,loop=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame||function(callback){return setTimeout(callback,1e3/60)},loopId=null,supportsPassive=!1;try{var opts=Object.defineProperty({},"passive",{get:function(){supportsPassive=!0}});window.addEventListener("testPassive",null,opts),window.removeEventListener("testPassive",null,opts)}catch(e){}var clearLoop=window.cancelAnimationFrame||window.mozCancelAnimationFrame||clearTimeout,transformProp=window.transformProp||function(){var testEl=document.createElement("div");if(testEl.style.transform===null){var vendors=["Webkit","Moz","ms"];for(var vendor in vendors)if(testEl.style[vendors[vendor]+"Transform"]!==undefined)return vendors[vendor]+"Transform"}return"transform"}();self.options={speed:-2,verticalSpeed:null,horizontalSpeed:null,breakpoints:[576,768,1201],center:!1,wrapper:null,relativeToWrapper:!1,round:!0,vertical:!0,horizontal:!1,verticalScrollAxis:"y",horizontalScrollAxis:"x",callback:function(){}},options&&Object.keys(options).forEach(function(key){self.options[key]=options[key]}),options&&options.breakpoints&&validateCustomBreakpoints(),el||(el=".rellax");var elements=typeof el=="string"?document.querySelectorAll(el):[el];if(elements.length>0){self.elems=elements;if(self.options.wrapper&&!self.options.wrapper.nodeType){var wrapper=document.querySelector(self.options.wrapper);if(!wrapper){console.warn("Rellax: The wrapper you're trying to use doesn't exist.");return}self.options.wrapper=wrapper}var currentBreakpoint,getCurrentBreakpoint=function(w){var bp=self.options.breakpoints;return w<bp[0]?"xs":w>=bp[0]&&w<bp[1]?"sm":w>=bp[1]&&w<bp[2]?"md":"lg"},cacheBlocks=function(){for(var i=0;i<self.elems.length;i++){var block=createBlock(self.elems[i]);blocks.push(block)}},init=function(){for(var i=0;i<blocks.length;i++)self.elems[i].style.cssText=blocks[i].style;blocks=[],screenY=window.innerHeight,screenX=window.innerWidth,currentBreakpoint=getCurrentBreakpoint(screenX),setPosition(),cacheBlocks(),animate(),pause&&(window.addEventListener("resize",init),pause=!1,update())},createBlock=function(el){var dataPercentage=el.getAttribute("data-rellax-percentage"),dataSpeed=el.getAttribute("data-rellax-speed"),dataXsSpeed=el.getAttribute("data-rellax-xs-speed"),dataMobileSpeed=el.getAttribute("data-rellax-mobile-speed"),dataTabletSpeed=el.getAttribute("data-rellax-tablet-speed"),dataDesktopSpeed=el.getAttribute("data-rellax-desktop-speed"),dataVerticalSpeed=el.getAttribute("data-rellax-vertical-speed"),dataHorizontalSpeed=el.getAttribute("data-rellax-horizontal-speed"),dataVericalScrollAxis=el.getAttribute("data-rellax-vertical-scroll-axis"),dataHorizontalScrollAxis=el.getAttribute("data-rellax-horizontal-scroll-axis"),dataZindex=el.getAttribute("data-rellax-zindex")||0,dataMin=el.getAttribute("data-rellax-min"),dataMax=el.getAttribute("data-rellax-max"),dataMinX=el.getAttribute("data-rellax-min-x"),dataMaxX=el.getAttribute("data-rellax-max-x"),dataMinY=el.getAttribute("data-rellax-min-y"),dataMaxY=el.getAttribute("data-rellax-max-y"),mapBreakpoints,breakpoints=!0;!dataXsSpeed&&!dataMobileSpeed&&!dataTabletSpeed&&!dataDesktopSpeed?breakpoints=!1:mapBreakpoints={xs:dataXsSpeed,sm:dataMobileSpeed,md:dataTabletSpeed,lg:dataDesktopSpeed};var wrapperPosY=self.options.wrapper?self.options.wrapper.scrollTop:window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop;if(self.options.relativeToWrapper){var scrollPosY=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop;wrapperPosY=scrollPosY-self.options.wrapper.offsetTop}var posY=self.options.vertical?dataPercentage||self.options.center?wrapperPosY:0:0,posX=self.options.horizontal?dataPercentage||self.options.center?self.options.wrapper?self.options.wrapper.scrollLeft:window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft:0:0,blockTop=posY+el.getBoundingClientRect().top,blockHeight=el.clientHeight||el.offsetHeight||el.scrollHeight,blockLeft=posX+el.getBoundingClientRect().left,blockWidth=el.clientWidth||el.offsetWidth||el.scrollWidth,percentageY=dataPercentage?dataPercentage:(posY-blockTop+screenY)/(blockHeight+screenY),percentageX=dataPercentage?dataPercentage:(posX-blockLeft+screenX)/(blockWidth+screenX);self.options.center&&(percentageX=.5,percentageY=.5);var speed=breakpoints&&mapBreakpoints[currentBreakpoint]!==null?Number(mapBreakpoints[currentBreakpoint]):dataSpeed?dataSpeed:self.options.speed,verticalSpeed=dataVerticalSpeed?dataVerticalSpeed:self.options.verticalSpeed,horizontalSpeed=dataHorizontalSpeed?dataHorizontalSpeed:self.options.horizontalSpeed,verticalScrollAxis=dataVericalScrollAxis?dataVericalScrollAxis:self.options.verticalScrollAxis,horizontalScrollAxis=dataHorizontalScrollAxis?dataHorizontalScrollAxis:self.options.horizontalScrollAxis,bases=updatePosition(percentageX,percentageY,speed,verticalSpeed,horizontalSpeed),style=el.style.cssText,transform="",searchResult=/transform\s*:/i.exec(style);if(searchResult){var index=searchResult.index,trimmedStyle=style.slice(index),delimiter=trimmedStyle.indexOf(";");delimiter?transform=" "+trimmedStyle.slice(11,delimiter).replace(/\s/g,""):transform=" "+trimmedStyle.slice(11).replace(/\s/g,"")}return{baseX:bases.x,baseY:bases.y,top:blockTop,left:blockLeft,height:blockHeight,width:blockWidth,speed:speed,verticalSpeed:verticalSpeed,horizontalSpeed:horizontalSpeed,verticalScrollAxis:verticalScrollAxis,horizontalScrollAxis:horizontalScrollAxis,style:style,transform:transform,zindex:dataZindex,min:dataMin,max:dataMax,minX:dataMinX,maxX:dataMaxX,minY:dataMinY,maxY:dataMaxY}},setPosition=function(){var oldY=posY,oldX=posX;posY=self.options.wrapper?self.options.wrapper.scrollTop:(document.documentElement||document.body.parentNode||document.body).scrollTop||window.pageYOffset,posX=self.options.wrapper?self.options.wrapper.scrollLeft:(document.documentElement||document.body.parentNode||document.body).scrollLeft||window.pageXOffset;if(self.options.relativeToWrapper){var scrollPosY=(document.documentElement||document.body.parentNode||document.body).scrollTop||window.pageYOffset;posY=scrollPosY-self.options.wrapper.offsetTop}return oldY!=posY&&self.options.vertical?!0:oldX!=posX&&self.options.horizontal?!0:!1},updatePosition=function(percentageX,percentageY,speed,verticalSpeed,horizontalSpeed){var result={},valueX=(horizontalSpeed?horizontalSpeed:speed)*100*(1-percentageX),valueY=(verticalSpeed?verticalSpeed:speed)*100*(1-percentageY);return result.x=self.options.round?Math.round(valueX):Math.round(valueX*100)/100,result.y=self.options.round?Math.round(valueY):Math.round(valueY*100)/100,result},deferredUpdate=function(){window.removeEventListener("resize",deferredUpdate),window.removeEventListener("orientationchange",deferredUpdate),(self.options.wrapper?self.options.wrapper:window).removeEventListener("scroll",deferredUpdate),(self.options.wrapper?self.options.wrapper:document).removeEventListener("touchmove",deferredUpdate),loopId=loop(update)},update=function(){setPosition()&&pause===!1?(animate(),loopId=loop(update)):(loopId=null,window.addEventListener("resize",deferredUpdate),window.addEventListener("orientationchange",deferredUpdate),(self.options.wrapper?self.options.wrapper:window).addEventListener("scroll",deferredUpdate,supportsPassive?{passive:!0}:!1),(self.options.wrapper?self.options.wrapper:document).addEventListener("touchmove",deferredUpdate,supportsPassive?{passive:!0}:!1))},animate=function(){var positions;for(var i=0;i<self.elems.length;i++){var verticalScrollAxis=blocks[i].verticalScrollAxis.toLowerCase(),horizontalScrollAxis=blocks[i].horizontalScrollAxis.toLowerCase(),verticalScrollX=verticalScrollAxis.indexOf("x")!=-1?posY:0,verticalScrollY=verticalScrollAxis.indexOf("y")!=-1?posY:0,horizontalScrollX=horizontalScrollAxis.indexOf("x")!=-1?posX:0,horizontalScrollY=horizontalScrollAxis.indexOf("y")!=-1?posX:0,percentageY=(verticalScrollY+horizontalScrollY-blocks[i].top+screenY)/(blocks[i].height+screenY),percentageX=(verticalScrollX+horizontalScrollX-blocks[i].left+screenX)/(blocks[i].width+screenX);positions=updatePosition(percentageX,percentageY,blocks[i].speed,blocks[i].verticalSpeed,blocks[i].horizontalSpeed);var positionY=positions.y-blocks[i].baseY,positionX=positions.x-blocks[i].baseX;blocks[i].min!==null&&(self.options.vertical&&!self.options.horizontal&&(positionY=positionY<=blocks[i].min?blocks[i].min:positionY),self.options.horizontal&&!self.options.vertical&&(positionX=positionX<=blocks[i].min?blocks[i].min:positionX)),blocks[i].minY!=null&&(positionY=positionY<=blocks[i].minY?blocks[i].minY:positionY),blocks[i].minX!=null&&(positionX=positionX<=blocks[i].minX?blocks[i].minX:positionX),blocks[i].max!==null&&(self.options.vertical&&!self.options.horizontal&&(positionY=positionY>=blocks[i].max?blocks[i].max:positionY),self.options.horizontal&&!self.options.vertical&&(positionX=positionX>=blocks[i].max?blocks[i].max:positionX)),blocks[i].maxY!=null&&(positionY=positionY>=blocks[i].maxY?blocks[i].maxY:positionY),blocks[i].maxX!=null&&(positionX=positionX>=blocks[i].maxX?blocks[i].maxX:positionX);var zindex=blocks[i].zindex,translate="translate3d("+(self.options.horizontal?positionX:"0")+"px,"+(self.options.vertical?positionY:"0")+"px,"+zindex+"px) "+blocks[i].transform;self.elems[i].style[transformProp]=translate}self.options.callback(positions)};return self.destroy=function(){for(var i=0;i<self.elems.length;i++)self.elems[i].style.cssText=blocks[i].style;pause||(window.removeEventListener("resize",init),pause=!0),clearLoop(loopId),loopId=null},init(),self.refresh=init,self}console.warn("Rellax: The elements you're trying to select don't exist.");return};return Rellax});var player,OKEvents,options,videoWidth,videoHeight,YTplayers,youtubePlayers=new Array;OKEvents={yt:{ready:function(event){var id=event.target.videoId,$video=jQuery("#okplayer-"+id),options=jQuery(window).data("okoptions-"+id);if(typeof options=="undefined")return!0;youtubePlayers[id]=event.target,event.target.setVolume(options.volume);if(options.autoplay===1)if(options.playlist.list)player.loadPlaylist(options.playlist.list,options.playlist.index,options.playlist.startSeconds,options.playlist.suggestedQuality);else{var inCarousel=$video.closest(".owl-item");!inCarousel.length||inCarousel.length&&inCarousel.hasClass("active")?(options.time!=null&&event.target.seekTo(parseInt(options.time)),event.target.playVideo()):event.target.pauseVideo()}OKEvents.utils.isFunction(options.onReady)&&options.onReady(event.target),$video.closest("[data-provider]").on("uncode-resume",function(){options.time!=null?event.target.seekTo(parseInt(options.time)).playVideo():event.target.seekTo(0).playVideo()}),$video.closest("[data-provider]").on("uncode-pause",function(){options.time!=null?event.target.seekTo(parseInt(options.time)).pauseVideo():event.target.seekTo(0).pauseVideo()}),jQuery(window).trigger("okevents.y.loaded",[event])},onStateChange:function(event){var id=event.target.videoId,$video=jQuery("#okplayer-"+id),options=jQuery(window).data("okoptions-"+id);if(typeof options=="undefined"||typeof event.target.setVolume=="undefined")return!0;youtubePlayers[id]=event.target,event.target.setVolume(options.volume);var $fluid=$video.closest(".fluid-object"),$tmb=$video.closest(".tmb"),setTime;switch(event.data){case-1:OKEvents.utils.isFunction(options.unstarted)&&options.unstarted();break;case 0:OKEvents.utils.isFunction(options.onFinished)&&options.onFinished(),options.loop&&event.target.playVideo();break;case 1:OKEvents.utils.isFunction(options.onPlay)&&options.onPlay(),setTimeout(function(){UNCODE.initVideoComponent(document.body,".uncode-video-container.video:not(.drop-move), .uncode-video-container.self-video:not(.drop-move)"),jQuery("#okplayer-"+id).closest(".uncode-video-container:not(.t-entry-drop)").css("opacity","1"),jQuery("#okplayer-"+id).closest("#page-header").addClass("video-started"),jQuery("#okplayer-"+id).closest(".background-wrapper").find(".block-bg-blend-mode.not-ie").css("opacity","1")},300);break;case 2:OKEvents.utils.isFunction(options.onPause)&&options.onPause();break;case 3:OKEvents.utils.isFunction(options.buffering)&&options.buffering();break;case 5:OKEvents.utils.isFunction(options.cued)&&options.cued();break;default:throw"OKVideo: received invalid data from YT player."}jQuery(window).trigger("okevents.y.change",[event])},error:function(event){throw event}},v:{onReady:function(target){if(typeof options=="undefined")return!0;OKEvents.utils.isFunction(options.onReady)&&options.onReady(target)},onPlay:function(player){if(typeof options=="undefined")return!0;OKEvents.utils.isMobile()||player.setVolume(options.volume),OKEvents.utils.isFunction(options.onPlay)&&options.onPlay(),jQuery(player.element).closest(".uncode-video-container:not(.t-entry-drop)").css("opacity","1"),jQuery(player.element).closest("#page-header").addClass("video-started"),jQuery(player.element).closest(".background-wrapper").find(".block-bg-blend-mode.not-ie").css("opacity","1")},onPause:function(){if(typeof options=="undefined")return!0;OKEvents.utils.isFunction(options.onPause)&&options.onPause()},onFinish:function(){if(typeof options=="undefined")return!0;OKEvents.utils.isFunction(options.onFinish)&&options.onFinish()}},utils:{isFunction:function(func){return typeof func=="function"?!0:!1},isMobile:function(){return navigator.userAgent.match(/(iPhone|iPod|iPad|Android|BlackBerry)/)?!0:!1}}},"use strict",function(){"use strict";function Pathformer(element){if(typeof element=="undefined")throw new Error('Pathformer [constructor]: "element" parameter is required');if(element.constructor===String){element=document.getElementById(element);if(!element)throw new Error('Pathformer [constructor]: "element" parameter is not related to an existing ID')}if(!(element instanceof window.SVGElement||element instanceof window.SVGGElement||/^svg$/i.test(element.nodeName)))throw new Error('Pathformer [constructor]: "element" parameter must be a string or a SVGelement');this.el=element,this.scan(element)}function Vivus(element,options,callback){setupEnv(),this.isReady=!1,this.setElement(element,options),this.setOptions(options),this.setCallback(callback),this.isReady&&this.init()}Pathformer.prototype.TYPES=["line","ellipse","circle","polygon","polyline","rect"],Pathformer.prototype.ATTR_WATCH=["cx","cy","points","r","rx","ry","x","x1","x2","y","y1","y2"],Pathformer.prototype.scan=function(svg){var fn,element,pathData,pathDom,elements=svg.querySelectorAll(this.TYPES.join(","));for(var i=0;i<elements.length;i++)element=elements[i],fn=this[element.tagName.toLowerCase()+"ToPath"],pathData=fn(this.parseAttr(element.attributes)),pathDom=this.pathMaker(element,pathData),element.parentNode.replaceChild(pathDom,element)},Pathformer.prototype.lineToPath=function(element){var newElement={},x1=element.x1||0,y1=element.y1||0,x2=element.x2||0,y2=element.y2||0;return newElement.d="M"+x1+","+y1+"L"+x2+","+y2,newElement},Pathformer.prototype.rectToPath=function(element){var newElement={},x=parseFloat(element.x)||0,y=parseFloat(element.y)||0,width=parseFloat(element.width)||0,height=parseFloat(element.height)||0;if(element.rx||element.ry){var rx=parseInt(element.rx,10)||-1,ry=parseInt(element.ry,10)||-1;rx=Math.min(Math.max(rx<0?ry:rx,0),width/2),ry=Math.min(Math.max(ry<0?rx:ry,0),height/2),newElement.d="M "+(x+rx)+","+y+" "+"L "+(x+width-rx)+","+y+" "+"A "+rx+","+ry+",0,0,1,"+(x+width)+","+(y+ry)+" "+"L "+(x+width)+","+(y+height-ry)+" "+"A "+rx+","+ry+",0,0,1,"+(x+width-rx)+","+(y+height)+" "+"L "+(x+rx)+","+(y+height)+" "+"A "+rx+","+ry+",0,0,1,"+x+","+(y+height-ry)+" "+"L "+x+","+(y+ry)+" "+"A "+rx+","+ry+",0,0,1,"+(x+rx)+","+y}else newElement.d="M"+x+" "+y+" "+"L"+(x+width)+" "+y+" "+"L"+(x+width)+" "+(y+height)+" "+"L"+x+" "+(y+height)+" Z";return newElement},Pathformer.prototype.polylineToPath=function(element){var newElement={},points=element.points.trim().split(" "),i,path;if(element.points.indexOf(",")===-1){var formattedPoints=[];for(i=0;i<points.length;i+=2)formattedPoints.push(points[i]+","+points[i+1]);points=formattedPoints}path="M"+points[0];for(i=1;i<points.length;i++)points[i].indexOf(",")!==-1&&(path+="L"+points[i]);return newElement.d=path,newElement},Pathformer.prototype.polygonToPath=function(element){var newElement=Pathformer.prototype.polylineToPath(element);return newElement.d+="Z",newElement},Pathformer.prototype.ellipseToPath=function(element){var newElement={},rx=parseFloat(element.rx)||0,ry=parseFloat(element.ry)||0,cx=parseFloat(element.cx)||0,cy=parseFloat(element.cy)||0,startX=cx-rx,startY=cy,endX=parseFloat(cx)+parseFloat(rx),endY=cy;return newElement.d="M"+startX+","+startY+"A"+rx+","+ry+" 0,1,1 "+endX+","+endY+"A"+rx+","+ry+" 0,1,1 "+startX+","+endY,newElement},Pathformer.prototype.circleToPath=function(element){var newElement={},r=parseFloat(element.r)||0,cx=parseFloat(element.cx)||0,cy=parseFloat(element.cy)||0,startX=cx-r,startY=cy,endX=parseFloat(cx)+parseFloat(r),endY=cy;return newElement.d="M"+startX+","+startY+"A"+r+","+r+" 0,1,1 "+endX+","+endY+"A"+r+","+r+" 0,1,1 "+startX+","+endY,newElement},Pathformer.prototype.pathMaker=function(element,pathData){var i,attr,pathTag=document.createElementNS("http://www.w3.org/2000/svg","path");for(i=0;i<element.attributes.length;i++)attr=element.attributes[i],this.ATTR_WATCH.indexOf(attr.name)===-1&&pathTag.setAttribute(attr.name,attr.value);for(i in pathData)pathTag.setAttribute(i,pathData[i]);return pathTag},Pathformer.prototype.parseAttr=function(element){var attr,output={};for(var i=0;i<element.length;i++){attr=element[i];if(this.ATTR_WATCH.indexOf(attr.name)!==-1&&attr.value.indexOf("%")!==-1)throw new Error("Pathformer [parseAttr]: a SVG shape got values in percentage. This cannot be transformed into 'path' tags. Please use 'viewBox'.");output[attr.name]=attr.value}return output},"use strict";var setupEnv,requestAnimFrame,cancelAnimFrame,parsePositiveInt;Vivus.LINEAR=function(x){return x},Vivus.EASE=function(x){return-Math.cos(x*Math.PI)/2+.5},Vivus.EASE_OUT=function(x){return 1-Math.pow(1-x,3)},Vivus.EASE_IN=function(x){return Math.pow(x,3)},Vivus.EASE_OUT_BOUNCE=function(x){var base=-Math.cos(x*.5*Math.PI)+1,rate=Math.pow(base,1.5),rateR=Math.pow(1-x,2),progress=-Math.abs(Math.cos(rate*2.5*Math.PI))+1;return 1-rateR+progress*rateR},Vivus.prototype.setElement=function(element,options){var onLoad,self;if(typeof element=="undefined")throw new Error('Vivus [constructor]: "element" parameter is required');if(element.constructor===String){element=document.getElementById(element);if(!element)throw new Error('Vivus [constructor]: "element" parameter is not related to an existing ID')}this.parentEl=element;if(options&&options.file){var self=this;onLoad=function(e){var domSandbox=document.createElement("div");domSandbox.innerHTML=this.responseText;var svgTag=domSandbox.querySelector("svg");if(!svgTag)throw new Error("Vivus [load]: Cannot find the SVG in the loaded file:"+options.file);self.el=svgTag,self.el.setAttribute("width","100%"),self.el.setAttribute("height","100%"),self.parentEl.appendChild(self.el),self.isReady=!0,self.init(),self=null};var oReq=new window.XMLHttpRequest;oReq.addEventListener("load",onLoad),oReq.open("GET",options.file),oReq.send();return}switch(element.constructor){case window.SVGSVGElement:case window.SVGElement:case window.SVGGElement:this.el=element,this.isReady=!0;break;case window.HTMLObjectElement:self=this,onLoad=function(e){if(self.isReady)return;self.el=element.contentDocument&&element.contentDocument.querySelector("svg");if(!self.el&&e)throw new Error("Vivus [constructor]: object loaded does not contain any SVG");self.el&&(element.getAttribute("built-by-vivus")&&(self.parentEl.insertBefore(self.el,element),self.parentEl.removeChild(element),self.el.setAttribute("width","100%"),self.el.setAttribute("height","100%")),self.isReady=!0,self.init(),self=null)},onLoad()||element.addEventListener("load",onLoad);break;default:throw new Error('Vivus [constructor]: "element" parameter is not valid (or miss the "file" attribute)')}},Vivus.prototype.setOptions=function(options){var allowedTypes=["delayed","sync","async","nsync","oneByOne","scenario","scenario-sync"],allowedStarts=["inViewport","manual","autostart"];if(options!==undefined&&options.constructor!==Object)throw new Error('Vivus [constructor]: "options" parameter must be an object');options=options||{};if(options.type&&allowedTypes.indexOf(options.type)===-1)throw new Error("Vivus [constructor]: "+options.type+" is not an existing animation `type`");this.type=options.type||allowedTypes[0];if(options.start&&allowedStarts.indexOf(options.start)===-1)throw new Error("Vivus [constructor]: "+options.start+" is not an existing `start` option");this.start=options.start||allowedStarts[0],this.isIE=window.navigator.userAgent.indexOf("MSIE")!==-1||window.navigator.userAgent.indexOf("Trident/")!==-1||window.navigator.userAgent.indexOf("Edge/")!==-1,this.duration=parsePositiveInt(options.duration,120),this.delay=parsePositiveInt(options.delay,null),this.delayStart=parsePositiveInt(options.delayStart,null),this.dashGap=parsePositiveInt(options.dashGap,1),this.forceRender=options.hasOwnProperty("forceRender")?!!options.forceRender:this.isIE,this.reverseStack=!!options.reverseStack,this.selfDestroy=!!options.selfDestroy,this.onReady=options.onReady,this.map=[],this.frameLength=this.currentFrame=this.delayUnit=this.speed=this.handle=null,this.ignoreInvisible=options.hasOwnProperty("ignoreInvisible")?!!options.ignoreInvisible:!1,this.animTimingFunction=options.animTimingFunction||Vivus.LINEAR,this.pathTimingFunction=options.pathTimingFunction||Vivus.LINEAR;if(this.delay>=this.duration)throw new Error("Vivus [constructor]: delay must be shorter than duration")},Vivus.prototype.setCallback=function(callback){if(!!callback&&callback.constructor!==Function)throw new Error('Vivus [constructor]: "callback" parameter must be a function');this.callback=callback||function(){}},Vivus.prototype.mapping=function(){var i,paths,path,pAttrs,pathObj,totalLength,lengthMeter,timePoint;timePoint=totalLength=lengthMeter=0,paths=this.el.querySelectorAll("path");for(i=0;i<paths.length;i++){path=paths[i];if(this.isInvisible(path))continue;pathObj={el:path,length:Math.ceil(path.getTotalLength())};if(isNaN(pathObj.length)){window.console&&console.warn&&console.warn("Vivus [mapping]: cannot retrieve a path element length",path);continue}this.map.push(pathObj),path.style.strokeDasharray=pathObj.length+" "+(pathObj.length+this.dashGap*2),path.style.strokeDashoffset=pathObj.length+this.dashGap,pathObj.length+=this.dashGap,totalLength+=pathObj.length,this.renderPath(i)}totalLength=totalLength===0?1:totalLength,this.delay=this.delay===null?this.duration/3:this.delay,this.delayUnit=this.delay/(paths.length>1?paths.length-1:1),this.reverseStack&&this.map.reverse();for(i=0;i<this.map.length;i++){pathObj=this.map[i];switch(this.type){case"delayed":pathObj.startAt=this.delayUnit*i,pathObj.duration=this.duration-this.delay;break;case"oneByOne":pathObj.startAt=lengthMeter/totalLength*this.duration,pathObj.duration=pathObj.length/totalLength*this.duration;break;case"sync":case"async":case"nsync":pathObj.startAt=0,pathObj.duration=this.duration;break;case"scenario-sync":path=pathObj.el,pAttrs=this.parseAttr(path),pathObj.startAt=timePoint+(parsePositiveInt(pAttrs["data-delay"],this.delayUnit)||0),pathObj.duration=parsePositiveInt(pAttrs["data-duration"],this.duration),timePoint=pAttrs["data-async"]!==undefined?pathObj.startAt:pathObj.startAt+pathObj.duration,this.frameLength=Math.max(this.frameLength,pathObj.startAt+pathObj.duration);break;case"scenario":path=pathObj.el,pAttrs=this.parseAttr(path),pathObj.startAt=parsePositiveInt(pAttrs["data-start"],this.delayUnit)||0,pathObj.duration=parsePositiveInt(pAttrs["data-duration"],this.duration),this.frameLength=Math.max(this.frameLength,pathObj.startAt+pathObj.duration)}lengthMeter+=pathObj.length,this.frameLength=this.frameLength||this.duration}},Vivus.prototype.drawer=function(){var self=this;this.currentFrame+=this.speed;if(this.currentFrame<=0)this.stop(),this.reset();else{if(!(this.currentFrame>=this.frameLength)){this.trace(),this.handle=requestAnimFrame(function(){self.drawer()});return}this.stop(),this.currentFrame=this.frameLength,this.trace(),this.selfDestroy&&this.destroy()}this.callback(this),this.instanceCallback&&(this.instanceCallback(this),this.instanceCallback=null)},Vivus.prototype.trace=function(){var i,progress,path,currentFrame;currentFrame=this.animTimingFunction(this.currentFrame/this.frameLength)*this.frameLength;for(i=0;i<this.map.length;i++)path=this.map[i],progress=(currentFrame-path.startAt)/path.duration,progress=this.pathTimingFunction(Math.max(0,Math.min(1,progress))),path.progress!==progress&&(path.progress=progress,path.el.style.strokeDashoffset=Math.floor(path.length*(1-progress)),this.renderPath(i))},Vivus.prototype.renderPath=function(index){if(this.forceRender&&this.map&&this.map[index]){var pathObj=this.map[index],newPath=pathObj.el.cloneNode(!0);pathObj.el.parentNode.replaceChild(newPath,pathObj.el),pathObj.el=newPath}},Vivus.prototype.init=function(){this.frameLength=0,this.currentFrame=0,this.map=[],new Pathformer(this.el),this.mapping(),this.starter(),this.onReady&&this.onReady(this)},Vivus.prototype.starter=function(){switch(this.start){case"manual":return;case"autostart":this.play();break;case"inViewport":var self=this,listener=function(){self.isInViewport(self.parentEl,1)&&(self.play(),window.removeEventListener("scroll",listener),window.removeEventListener("fp-slide-changed",listener),window.removeEventListener("fp-slide-scroll",listener))};window.addEventListener("scroll",listener),window.addEventListener("fp-slide-changed",listener),window.addEventListener("fp-slide-scroll",listener),listener()}},Vivus.prototype.getStatus=function(){return this.currentFrame===0?"start":this.currentFrame===this.frameLength?"end":"progress"},Vivus.prototype.reset=function(){return this.setFrameProgress(0)},Vivus.prototype.finish=function(){return this.setFrameProgress(1)},Vivus.prototype.setFrameProgress=function(progress){return progress=Math.min(1,Math.max(0,progress)),this.currentFrame=Math.round(this.frameLength*progress),this.trace(),this},Vivus.prototype.play=function(speed,callback){this.instanceCallback=null;if(speed&&typeof speed=="function")this.instanceCallback=speed,speed=null;else if(speed&&typeof speed!="number")throw new Error("Vivus [play]: invalid speed");callback&&typeof callback=="function"&&!this.instanceCallback&&(this.instanceCallback=callback),this.speed=speed||1;if(!this.handle){var $this=this,delay=this.delayStart!=null?this.delayStart:0;setTimeout(function(){$this.drawer()},delay)}return this},Vivus.prototype.stop=function(){return this.handle&&(cancelAnimFrame(this.handle),this.handle=null),this},Vivus.prototype.destroy=function(){this.stop();var i,path;for(i=0;i<this.map.length;i++)path=this.map[i],path.el.style.strokeDashoffset=null,path.el.style.strokeDasharray=null,this.renderPath(i)},Vivus.prototype.isInvisible=function(el){var rect,ignoreAttr=el.getAttribute("data-ignore");return ignoreAttr!==null?ignoreAttr!=="false":this.ignoreInvisible?(rect=el.getBoundingClientRect(),!rect.width&&!rect.height):!1},Vivus.prototype.parseAttr=function(element){var attr,output={};if(element&&element.attributes)for(var i=0;i<element.attributes.length;i++)attr=element.attributes[i],output[attr.name]=attr.value;return output},Vivus.prototype.isInViewport=function(el,h){var scrolled=this.scrollY(),viewed=scrolled+this.getViewportH(),elBCR=el.getBoundingClientRect(),elHeight=elBCR.height,elTop=scrolled+elBCR.top,elBottom=elTop+elHeight;return h=h||0,elTop+elHeight*h<=viewed&&elBottom>=scrolled},Vivus.prototype.getViewportH=function(){var client=this.docElem.clientHeight,inner=window.innerHeight;return client<inner?inner:client},Vivus.prototype.scrollY=function(){return window.pageYOffset||this.docElem.scrollTop},setupEnv=function(){if(Vivus.prototype.docElem)return;Vivus.prototype.docElem=window.document.documentElement,requestAnimFrame=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(callback){return window.setTimeout(callback,1e3/60)}}(),cancelAnimFrame=function(){return window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.oCancelAnimationFrame||window.msCancelAnimationFrame||function(id){return window.clearTimeout(id)}}()},parsePositiveInt=function(value,defaultValue){var output=parseInt(value,10);return output>=0?output:defaultValue},typeof define=="function"&&define.amd?define([],function(){return Vivus}):typeof exports=="object"?module.exports=Vivus:window.Vivus=Vivus}(),!function(){"use strict";function i(r){var e;e="function"==typeof r?r:r?function(){var r=0,e=0,t=0,a=1,o=(i=4022871197,function(r){r=r.toString();for(var e=0;e<r.length;e++){var t=.02519603282416938*(i+=r.charCodeAt(e));t-=i=t>>>0,i=(t*=i)>>>0,i+=4294967296*(t-=i)}return 2.3283064365386963e-10*(i>>>0)}),i;r=o(" "),e=o(" "),t=o(" ");for(var n=0;n<arguments.length;n++)(r-=o(arguments[n]))<0&&(r+=1),(e-=o(arguments[n]))<0&&(e+=1),(t-=o(arguments[n]))<0&&(t+=1);return o=null,function(){var o=2091639*r+2.3283064365386963e-10*a;return r=e,e=t,t=o-(a=0|o)}}(r):Math.random,this.p=n(e),this.perm=new Uint8Array(512),this.permMod12=new Uint8Array(512);for(var t=0;t<512;t++)this.perm[t]=this.p[255&t],this.permMod12[t]=this.perm[t]%12}function n(r){var e,t=new Uint8Array(256);for(e=0;e<256;e++)t[e]=e;for(e=0;e<255;e++){var a=e+~~(r()*(256-e)),o=t[e];t[e]=t[a],t[a]=o}return t}var r=.5*(Math.sqrt(3)-1),e=(3-Math.sqrt(3))/6,t=1/6,a=(Math.sqrt(5)-1)/4,o=(5-Math.sqrt(5))/20;i.prototype={grad3:new Float32Array([1,1,0,-1,1,0,1,-1,0,-1,-1,0,1,0,1,-1,0,1,1,0,-1,-1,0,-1,0,1,1,0,-1,1,0,1,-1,0,-1,-1]),grad4:new Float32Array([0,1,1,1,0,1,1,-1,0,1,-1,1,0,1,-1,-1,0,-1,1,1,0,-1,1,-1,0,-1,-1,1,0,-1,-1,-1,1,0,1,1,1,0,1,-1,1,0,-1,1,1,0,-1,-1,-1,0,1,1,-1,0,1,-1,-1,0,-1,1,-1,0,-1,-1,1,1,0,1,1,1,0,-1,1,-1,0,1,1,-1,0,-1,-1,1,0,1,-1,1,0,-1,-1,-1,0,1,-1,-1,0,-1,1,1,1,0,1,1,-1,0,1,-1,1,0,1,-1,-1,0,-1,1,1,0,-1,1,-1,0,-1,-1,1,0,-1,-1,-1,0]),noise2D:function(t,a){var o,i,n=this.permMod12,f=this.perm,s=this.grad3,v=0,h=0,l=0,u=(t+a)*r,d=Math.floor(t+u),p=Math.floor(a+u),M=(d+p)*e,m=t-(d-M),c=a-(p-M);m>c?(o=1,i=0):(o=0,i=1);var y=m-o+e,w=c-i+e,g=m-1+2*e,A=c-1+2*e,x=255&d,q=255&p,D=.5-m*m-c*c;if(D>=0){var S=3*n[x+f[q]];v=(D*=D)*D*(s[S]*m+s[S+1]*c)}var U=.5-y*y-w*w;if(U>=0){var b=3*n[x+o+f[q+i]];h=(U*=U)*U*(s[b]*y+s[b+1]*w)}var F=.5-g*g-A*A;if(F>=0){var N=3*n[x+1+f[q+1]];l=(F*=F)*F*(s[N]*g+s[N+1]*A)}return 70*(v+h+l)},noise3D:function(r,e,a){var o,i,n,f,s,v,h,l,u,d,p=this.permMod12,M=this.perm,m=this.grad3,c=(r+e+a)*(1/3),y=Math.floor(r+c),w=Math.floor(e+c),g=Math.floor(a+c),A=(y+w+g)*t,x=r-(y-A),q=e-(w-A),D=a-(g-A);x>=q?q>=D?(s=1,v=0,h=0,l=1,u=1,d=0):x>=D?(s=1,v=0,h=0,l=1,u=0,d=1):(s=0,v=0,h=1,l=1,u=0,d=1):q<D?(s=0,v=0,h=1,l=0,u=1,d=1):x<D?(s=0,v=1,h=0,l=0,u=1,d=1):(s=0,v=1,h=0,l=1,u=1,d=0);var S=x-s+t,U=q-v+t,b=D-h+t,F=x-l+2*t,N=q-u+2*t,C=D-d+2*t,P=x-1+.5,T=q-1+.5,_=D-1+.5,j=255&y,k=255&w,z=255&g,B=.6-x*x-q*q-D*D;if(B<0)o=0;else{var E=3*p[j+M[k+M[z]]];o=(B*=B)*B*(m[E]*x+m[E+1]*q+m[E+2]*D)}var G=.6-S*S-U*U-b*b;if(G<0)i=0;else{var H=3*p[j+s+M[k+v+M[z+h]]];i=(G*=G)*G*(m[H]*S+m[H+1]*U+m[H+2]*b)}var I=.6-F*F-N*N-C*C;if(I<0)n=0;else{var J=3*p[j+l+M[k+u+M[z+d]]];n=(I*=I)*I*(m[J]*F+m[J+1]*N+m[J+2]*C)}var K=.6-P*P-T*T-_*_;if(K<0)f=0;else{var L=3*p[j+1+M[k+1+M[z+1]]];f=(K*=K)*K*(m[L]*P+m[L+1]*T+m[L+2]*_)}return 32*(o+i+n+f)},noise4D:function(r,e,t,i){var n,f,s,v,h,l,u,d,p,M,m,c,y,w,g,A,x,q=this.perm,D=this.grad4,S=(r+e+t+i)*a,U=Math.floor(r+S),b=Math.floor(e+S),F=Math.floor(t+S),N=Math.floor(i+S),C=(U+b+F+N)*o,P=r-(U-C),T=e-(b-C),_=t-(F-C),j=i-(N-C),k=0,z=0,B=0,E=0;P>T?k++:z++,P>_?k++:B++,P>j?k++:E++,T>_?z++:B++,T>j?z++:E++,_>j?B++:E++;var G=P-(l=k>=3?1:0)+o,H=T-(u=z>=3?1:0)+o,I=_-(d=B>=3?1:0)+o,J=j-(p=E>=3?1:0)+o,K=P-(M=k>=2?1:0)+2*o,L=T-(m=z>=2?1:0)+2*o,O=_-(c=B>=2?1:0)+2*o,Q=j-(y=E>=2?1:0)+2*o,R=P-(w=k>=1?1:0)+3*o,V=T-(g=z>=1?1:0)+3*o,W=_-(A=B>=1?1:0)+3*o,X=j-(x=E>=1?1:0)+3*o,Y=P-1+4*o,Z=T-1+4*o,$=_-1+4*o,rr=j-1+4*o,er=255&U,tr=255&b,ar=255&F,or=255&N,ir=.6-P*P-T*T-_*_-j*j;if(ir<0)n=0;else{var nr=q[er+q[tr+q[ar+q[or]]]]%32*4;n=(ir*=ir)*ir*(D[nr]*P+D[nr+1]*T+D[nr+2]*_+D[nr+3]*j)}var fr=.6-G*G-H*H-I*I-J*J;if(fr<0)f=0;else{var sr=q[er+l+q[tr+u+q[ar+d+q[or+p]]]]%32*4;f=(fr*=fr)*fr*(D[sr]*G+D[sr+1]*H+D[sr+2]*I+D[sr+3]*J)}var vr=.6-K*K-L*L-O*O-Q*Q;if(vr<0)s=0;else{var hr=q[er+M+q[tr+m+q[ar+c+q[or+y]]]]%32*4;s=(vr*=vr)*vr*(D[hr]*K+D[hr+1]*L+D[hr+2]*O+D[hr+3]*Q)}var lr=.6-R*R-V*V-W*W-X*X;if(lr<0)v=0;else{var ur=q[er+w+q[tr+g+q[ar+A+q[or+x]]]]%32*4;v=(lr*=lr)*lr*(D[ur]*R+D[ur+1]*V+D[ur+2]*W+D[ur+3]*X)}var dr=.6-Y*Y-Z*Z-$*$-rr*rr;if(dr<0)h=0;else{var pr=q[er+1+q[tr+1+q[ar+1+q[or+1]]]]%32*4;h=(dr*=dr)*dr*(D[pr]*Y+D[pr+1]*Z+D[pr+2]*$+D[pr+3]*rr)}return 27*(n+f+s+v+h)}},i._buildPermutationTable=n,"undefined"!=typeof define&&define.amd&&define(function(){return i}),"undefined"!=typeof exports?exports.SimplexNoise=i:"undefined"!=typeof window&&(window.SimplexNoise=i),"undefined"!=typeof module&&(module.exports=i)}();
(function($){"use strict";var UNCODE=window.UNCODE||{};window.UNCODE=UNCODE,window.requestAnimFrame=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(callback,element){window.setTimeout(callback,1e3/60)}}(),window.requestTimeout=function(fn,delay){function loop(){var current=(new Date).getTime(),delta=current-start;delta>=delay?fn.call():handle.value=requestAnimFrame(loop)}if(!window.requestAnimationFrame&&!window.webkitRequestAnimationFrame&&(!window.mozRequestAnimationFrame||!window.mozCancelRequestAnimationFrame)&&!window.oRequestAnimationFrame&&!window.msRequestAnimationFrame)return window.setTimeout(fn,delay);var start=(new Date).getTime(),handle=new Object;return handle.value=requestAnimFrame(loop),handle},window.clearRequestTimeout=function(handle){typeof handle!="undefined"&&(window.cancelAnimationFrame?window.cancelAnimationFrame(handle.value):window.webkitCancelAnimationFrame?window.webkitCancelAnimationFrame(handle.value):window.webkitCancelRequestAnimationFrame?window.webkitCancelRequestAnimationFrame(handle.value):window.mozCancelRequestAnimationFrame?window.mozCancelRequestAnimationFrame(handle.value):window.oCancelRequestAnimationFrame?window.oCancelRequestAnimationFrame(handle.value):window.msCancelRequestAnimationFrame?window.msCancelRequestAnimationFrame(handle.value):clearTimeout(handle))};if(SiteParameters.smoothScroll==="on"&&!SiteParameters.is_frontend_editor){window.lenis=new Lenis({duration:1}),UNCODE.hDoc=Math.max(document.body.scrollHeight,document.body.offsetHeight,document.documentElement.clientHeight,document.documentElement.scrollHeight,document.documentElement.offsetHeight);function raf(time){window.lenis.raf(time),requestAnimationFrame(raf),window.dispatchEvent(new CustomEvent("lenis-scroll"));if(SiteParameters.uncode_smooth_scroll_safe){var newHdoc=Math.max(document.body.scrollHeight,document.body.offsetHeight,document.documentElement.clientHeight,document.documentElement.scrollHeight,document.documentElement.offsetHeight);UNCODE.hDoc!==newHdoc&&(UNCODE.hDoc=newHdoc,window.lenis.resize())}}requestAnimationFrame(raf),$(window).on("unmodal-open",function(){window.lenis.stop()}),$(document).on("unmodal-close",function(){window.lenis.start()})}UNCODE.checkImgLoad=function(src,cb,err,el){var img=new Image;img.onload=function(){var result=img.width>0&&img.height>0;cb(el)},img.onerror=function(){err()},img.src=src},UNCODE.betterResize=function(){var setResize,doubleResize=!0,oldW=UNCODE.wwidth,oldH=UNCODE.wheight,setCTA;$(window).on("resize orientationchange",function(){if(oldW===UNCODE.wwidth)return;oldW=UNCODE.wwidth,$(window).trigger("wwResize");if(oldH===UNCODE.wheight)return;oldH=UNCODE.wheight,$(window).trigger("whResize")}),$(window).on("resize orientationchange",function(){clearRequestTimeout(setCTA),setCTA=requestTimeout(function(){$(window).trigger("resize-int")},100)})},UNCODE.shuffle=function(array){var currentIndex=array.length,randomIndex;while(currentIndex>0)randomIndex=Math.floor(Math.random()*currentIndex),currentIndex--,[array[currentIndex],array[randomIndex]]=[array[randomIndex],array[currentIndex]];return array},Number.isInteger=Number.isInteger||function(value){return typeof value=="number"&&isFinite(value)&&Math.floor(value)===value},UNCODE.utils=function(){$(document).on("mouseover","a",function(){$(this).hasClass("star")||($(this).attr("data-title",$(this).attr("title")),$(this).removeAttr("title"))}),$(document).on("mouseout","a",function(){$(this).hasClass("star")||($(this).attr("title",$(this).attr("data-title")),$(this).removeAttr("data-title"))}),this.get_scroll_offset=function(e){var scroll_offset=0,target,trigger;Number.isInteger(e)!==!0&&typeof e!="undefined"&&typeof e.target!="undefined"&&typeof e.currentTarget!="undefined"&&(target=e.target,trigger=e.currentTarget),($(".menu-hide").length||$(".menu-hide-vertical").length)&&UNCODE.bodyTop>UNCODE.wheight/2&&UNCODE.hideMenu(100);if(!$("body").hasClass("vmenu")||UNCODE.wwidth<UNCODE.mediaQuery)if(!($(".menu-desktop-transparent").length&&UNCODE.wwidth>UNCODE.mediaQuery))if($(".menu-sticky").length&&!$(".menu-hide").length&&!UNCODE.isMobile||$(".menu-sticky-mobile").length&&UNCODE.isMobile)$(".menu-hided").length||($("body").hasClass("hmenu-center")?scroll_offset+=$(".menu-sticky .menu-container").outerHeight():scroll_offset+=$(".logo-container:visible").outerHeight());else if($(".menu-sticky .menu-container:not(.menu-hide)").length&&!$(".menu-shrink").length){var shrink=typeof $(".navbar-brand").data("padding-shrink")!="undefined"?$(".navbar-brand").data("padding-shrink")*2:36;scroll_offset+=$(".menu-sticky .menu-container").outerHeight()-($(".navbar-brand").data("minheight")+shrink)}else $(".menu-sticky").length&&!$(".menu-hide").length||$(".menu-sticky-vertical").length&&!$(".menu-hide-vertical").length?scroll_offset+=UNCODE.menuMobileHeight:typeof target!="undefined"&&target.closest(".main-menu-container")!=null&&UNCODE.wwidth<UNCODE.mediaQuery&&!$("body").hasClass("vmenu")&&!$("body").hasClass("menu-mobile-transparent")&&!$(".menu-sticky").length||$(trigger)[0]!==$(document)[0]&&$(trigger).length&&typeof $(trigger).offset()!="undefined"&&window.scrollY>$(trigger).offset().top+UNCODE.menuMobileHeight&&(scroll_offset+=UNCODE.menuMobileHeight);return scroll_offset+=UNCODE.bodyBorder,scroll_offset},UNCODE.isFullPage||($(document).on("click",'a[href*="#"]:not(.woocommerce-review-link):not(.one-dot-link)',function(e){var hash=e.currentTarget.hash,is_scrolltop=$(e.currentTarget).hasClass("scroll-top")?!0:!1,anchor="";if($(e.currentTarget).data("toggle")=="tab"||$(e.currentTarget).data("toggle")=="collapse")return;if($(e.currentTarget).hasClass("woocommerce-review-link")&&$(".wootabs .tab-content").length){e.preventDefault(),$("#tab-reviews").is(":visible")||$('a[href="#tab-reviews"]').trigger("click");var calc_scroll=$(".wootabs .tab-content").offset().top;calc_scroll-=UNCODE.get_scroll_offset(e);if(!($(".menu-desktop-transparent").length&&UNCODE.wwidth>UNCODE.mediaQuery)&&!($(".menu-mobile-transparent").length&&UNCODE.wwidth<=UNCODE.mediaQueryMobile)){var shrink=typeof $(".navbar-brand").data("padding-shrink")!="undefined"?$(".navbar-brand").data("padding-shrink")*2:36;$(".menu-sticky .menu-container:not(.menu-hide)").length&&$(".menu-shrink").length&&(scrollTo+=UNCODE.menuHeight-($(".navbar-brand").data("minheight")+shrink))}var bodyTop=document.documentElement.scrollTop||document.body.scrollTop,delta=bodyTop-calc_scroll,scrollSpeed=SiteParameters.constant_scroll=="on"?Math.abs(delta)/parseFloat(SiteParameters.scroll_speed):SiteParameters.scroll_speed;scrollSpeed<1e3&&SiteParameters.constant_scroll=="on"&&(scrollSpeed=1e3),requestTimeout(function(){scrollSpeed==0?($("html, body").scrollTop(calc_scroll),UNCODE.scrolling=!1):$("html, body").on("scroll wheel DOMMouseScroll mousewheel touchmove",function(){$(this).stop()}).animate({scrollTop:calc_scroll},scrollSpeed,"easeInOutCubic",function(){$(this).off("scroll wheel DOMMouseScroll mousewheel touchmove"),UNCODE.scrolling=!1})},200);return}if(hash!=undefined){var specialFormat=/[ !@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?]/,anchor=this.hash.slice(1);!specialFormat.test(hash)&&location.pathname.replace(/^\//g,"")==this.pathname.replace(/^\//g,"")&&location.hostname==this.hostname&&(specialFormat.test(hash)||$(hash).length&&(anchor=$(hash)))}if(is_scrolltop||anchor!="")if(is_scrolltop){e.preventDefault();var bodyTop=document.documentElement.scrollTop||document.body.scrollTop,scrollSpeed=SiteParameters.constant_scroll=="on"?Math.abs(bodyTop)/parseFloat(SiteParameters.scroll_speed):SiteParameters.scroll_speed;scrollSpeed<1e3&&SiteParameters.constant_scroll=="on"&&(scrollSpeed=1e3),scrollSpeed==0?($("html, body").scrollTop(0),UNCODE.scrolling=!1):$("html, body").on("scroll wheel DOMMouseScroll mousewheel touchmove",function(){$(this).stop()}).animate({scrollTop:0},scrollSpeed,"easeInOutCubic",function(){$(this).off("scroll wheel DOMMouseScroll mousewheel touchmove"),UNCODE.scrolling=!1})}else{var scrollSection=typeof anchor=="string"?$('[data-name="'+anchor+'"]'):anchor;$.each($(".menu-container .menu-item > a, .widget_nav_menu .menu-smart .menu-item > a"),function(index,val){var get_href=$(val).attr("href");get_href!=undefined&&(get_href.substring(get_href.indexOf("#")+1)==anchor?$(val).parent().addClass("active"):$(val).parent().removeClass("active"))});if(scrollSection.length){$("body").hasClass("uncode-scroll-no-history")&&e.preventDefault(),UNCODE.menuOpened&&(UNCODE.wwidth<UNCODE.mediaQuery?window.dispatchEvent(UNCODE.menuMobileTriggerEvent):($(".mmb-container-overlay .overlay-close").trigger("click"),$(".mmb-container .trigger-overlay.close")[0].dispatchEvent(new Event("click"))));var calc_scroll=scrollSection.offset().top,getOffset=UNCODE.get_scroll_offset(e),$logo=$(".logo-container:visible"),logoH,$menu=$("#masthead .menu-container"),menuH;calc_scroll-=isNaN(getOffset)?0:getOffset;var bodyTop=document.documentElement.scrollTop||document.body.scrollTop,delta=bodyTop-calc_scroll,scrollSpeed=SiteParameters.constant_scroll=="on"?Math.abs(delta)/parseFloat(SiteParameters.scroll_speed):SiteParameters.scroll_speed;scrollSpeed<1e3&&SiteParameters.constant_scroll=="on"&&(scrollSpeed=1e3),!($(".menu-desktop-transparent").length&&UNCODE.wwidth>UNCODE.mediaQuery)&&!($(".menu-mobile-transparent").length&&UNCODE.wwidth<=UNCODE.mediaQueryMobile)&&$(".menu-sticky .menu-container:not(.menu-hide)").length&&!$(".menu-shrink").length&&!$("body").hasClass("vmenu")&&UNCODE.wwidth>UNCODE.mediaQuery&&(logoH=$logo.outerHeight(),menuH=$menu.outerHeight(),calc_scroll<logoH+menuH&&(calc_scroll=0)),UNCODE.menuStickyMobileOverlay===!1&&UNCODE.isMobile&&(calc_scroll-=parseFloat($(".overlay.overlay-menu").outerHeight())),scrollSpeed==0?($("html, body").scrollTop(calc_scroll),UNCODE.scrolling=!1):$("html, body").on("scroll wheel DOMMouseScroll mousewheel touchmove",function(){$(this).stop()}).animate({scrollTop:delta>0?calc_scroll-.1:calc_scroll},scrollSpeed,"easeInOutCubic",function(){$(this).off("scroll wheel DOMMouseScroll mousewheel touchmove"),UNCODE.scrolling=!1;if(getOffset!=UNCODE.get_scroll_offset(e)&&!($(".menu-desktop-transparent").length&&UNCODE.wwidth>UNCODE.mediaQuery)&&!($(".menu-mobile-transparent").length&&UNCODE.wwidth<=UNCODE.mediaQueryMobile)||$(".menu-hided").length)calc_scroll=scrollSection.offset().top,getOffset=UNCODE.get_scroll_offset(e),calc_scroll-=getOffset,$("html, body").on("scroll wheel DOMMouseScroll mousewheel touchmove",function(){$(this).stop()}).animate({scrollTop:delta>0?calc_scroll-.1:calc_scroll},scrollSpeed,"easeInOutCubic",function(){$(this).off("scroll wheel DOMMouseScroll mousewheel touchmove"),UNCODE.scrolling=!1})})}}}),$(".header-scrolldown").on("click",function(event){event.preventDefault();var pageHeader=$(event.target).closest("#page-header"),pageHeaderTop=pageHeader.offset().top,pageHeaderHeight=pageHeader.outerHeight(),scrollSpeed=SiteParameters.constant_scroll=="on"?Math.abs(pageHeaderTop+pageHeaderHeight)/parseFloat(SiteParameters.scroll_speed):SiteParameters.scroll_speed;scrollSpeed<1e3&&SiteParameters.constant_scroll=="on"&&(scrollSpeed=1e3);var calc_scroll=pageHeaderTop+pageHeaderHeight,getOffset=UNCODE.get_scroll_offset(event);calc_scroll-=getOffset;if(!($(".menu-desktop-transparent").length&&UNCODE.wwidth>UNCODE.mediaQuery)&&!($(".menu-mobile-transparent").length&&UNCODE.wwidth<=UNCODE.mediaQueryMobile)){var shrink=typeof $(".navbar-brand").data("padding-shrink")!="undefined"?$(".navbar-brand").data("padding-shrink")*2:36;$(".menu-sticky .menu-container:not(.menu-hide)").length&&$(".menu-shrink").length&&(scrollTo+=UNCODE.menuHeight-($(".navbar-brand").data("minheight")+shrink))}scrollSpeed==0?($("html, body").scrollTop(calc_scroll),UNCODE.scrolling=!1):$("html, body").on("scroll wheel DOMMouseScroll mousewheel touchmove",function(){$(this).stop()}).animate({scrollTop:calc_scroll},scrollSpeed,"easeInOutCubic",function(){$(this).off("scroll wheel DOMMouseScroll mousewheel touchmove"),UNCODE.scrolling=!1;if(getOffset!=UNCODE.get_scroll_offset(event)||$(".menu-hided").length)calc_scroll=pageHeaderTop+pageHeaderHeight,getOffset=UNCODE.get_scroll_offset(event),calc_scroll-=getOffset,$("html, body").on("scroll wheel DOMMouseScroll mousewheel touchmove",function(){$(this).stop()}).animate({scrollTop:calc_scroll},scrollSpeed,"easeInOutCubic",function(){$(this).off("scroll wheel DOMMouseScroll mousewheel touchmove"),UNCODE.scrolling=!1})})})),$(document).on("mouseenter",".col-link",function(e){var uncol=$(e.target).prev(".uncol"),el=uncol.find(".column-background");if(el){$(".btn-container .btn",uncol).addClass("active");var elOverlay=$(el[0]).find(".block-bg-overlay");if(elOverlay.length){var getOpacity=$(elOverlay).css("opacity");if(getOpacity!=1){getOpacity=Math.round(getOpacity*100)/100;var newOpacity=getOpacity+.1;$(elOverlay).data("data-opacity",getOpacity),$(elOverlay).css("opacity",newOpacity)}}}}).on("mouseleave",".col-link",function(e){var uncol=$(e.target).prev(".uncol"),el=uncol.find(".column-background");$(".btn-container .btn",uncol).removeClass("active");if(el){var elOverlay=$(el[0]).find(".block-bg-overlay");if(elOverlay.length){var getOpacity=$(elOverlay).data("data-opacity");$(elOverlay).css("opacity",getOpacity)}}});var fixAdminBar=function(){if($("html").hasClass("admin-mode")&&!SiteParameters.is_frontend_editor){var getAdminBar=$("#wpadminbar");if(getAdminBar.length&&getAdminBar.css("position")!=="hidden"){var getAdminBarHeight=getAdminBar.height();getAdminBar.css("position")==="fixed"?($("html").css({"margin-top":getAdminBarHeight+"px","padding-top":UNCODE.bodyBorder+"px"}),$(".body-borders .top-border").css({"margin-top":getAdminBarHeight+"px"})):($("html").css({"padding-top":UNCODE.bodyBorder+"px","margin-top":"0px"}),$(".body-borders .top-border").css({"margin-top":"0px"}))}}};window.addEventListener("load",fixAdminBar),window.addEventListener("resize",fixAdminBar);var beforePrint=function(){window.dispatchEvent(new CustomEvent("resize")),window.dispatchEvent(UNCODE.boxEvent)};if(window.matchMedia){var mediaQueryList=window.matchMedia("print");mediaQueryList.addListener(function(mql){mql.matches&&beforePrint()})}window.onbeforeprint=beforePrint;var safariSrcSet=function(){SiteParameters.is_frontend_editor||$("html.safari img[sizes]").each(function(){var $img=$(this),sizeImg=parseInt($img.attr("sizes"));typeof sizeImg=="number"&&$img.attr("sizes",sizeImg+"px")})};window.addEventListener("load",safariSrcSet)},UNCODE.lettering=function(){var setCTA,highlightStill=function(){var $heading_texts=$(".heading-text:not(.animate_inner_when_almost_visible)");$.each($heading_texts,function(key,el){var $heading=$(el);if(!$('.heading-text-highlight-inner[data-animated="yes"]',$heading).length)return;if(UNCODE.isUnmodalOpen&&!el.closest("#unmodal-content"))return;var waypoint=new Waypoint({context:UNCODE.isUnmodalOpen?document.getElementById("unmodal-content"):window,element:el,handler:function(){var $anims=$('.heading-text-highlight-inner[data-animated="yes"]',this.element),anims_l=$anims.length;$anims.each(function(_key_,_el_){var $anim=$(_el_);$anim.hasClass("heading-text-highlight-animated")||($anim.addClass("heading-text-highlight-animated"),$heading.data("animate")===!0?$anim.css({"-webkit-transition-duration":"0ms","-moz-transition-duration":"0ms","-o-transition-duration":"0ms","transition-duration":"0ms"}):$anim.css({"-webkit-transition-delay":(_key_+2)*200+"ms","-moz-transition-delay":(_key_+2)*200+"ms","-o-transition-delay":(_key_+2)*200+"ms","transition-delay":(_key_+2)*200+"ms"}))}),$anims.last().one("webkitTransitionEnd oTransitionEnd mozTransitionEnd msTransitionEnd transitionEnd",function(e){$heading.data("animate",!0)}),$anims.removeAttr("data-animated")},offset:"100%"})}),Waypoint.refreshAll(),$(document.body).trigger("uncode_waypoints")};requestTimeout(function(){highlightStill(),$(window).on("resize",function(){clearRequestTimeout(setCTA),setCTA=requestTimeout(highlightStill,100)})},400)},UNCODE.isUnmodalOpen=!1;var manageVideoSize=function(){var setVideoFit;$(".wp-block-embed").each(function(){var $this=$(this);if($("iframe",$this).length){var $iframe=$("> iframe, > a > iframe",$this),w=parseFloat($iframe.attr("width")),h=parseFloat($iframe.attr("height")),url=$iframe.attr("src"),ratio,frW;if(typeof url!="undefined"&&url.indexOf("soundcloud")==-1&&h!==0){ratio=h/w;var setResizeiFto,resizeiFrame=function(){frW=$iframe.width(),$iframe.css({height:frW*ratio})};resizeiFrame(),$(window).on("resize load",function(){clearRequestTimeout(setResizeiFto),setResizeiFto=requestTimeout(function(){resizeiFrame()},10)})}}})};manageVideoSize(),UNCODE.vivus=function(icon,time,delay,file){if(typeof Vivus!="undefined"){var icon_options={type:"delayed",pathTimingFunction:Vivus.EASE_OUT,animTimingFunction:Vivus.LINEAR,duration:time};delay&&(icon_options.delayStart=delay),file&&(icon_options.file=file),new Vivus(icon,icon_options)}},UNCODE.lastURL="",UNCODE.getURLParams=function(current_location,is_string){var params={};if(is_string)var url=current_location.split("?")[1];else{var url=current_location.search;url=url.substring(1)}if(url){var parts=url.split("&");for(var i=0;i<parts.length;i++){var nv=parts[i].split("=");if(!nv[0])continue;params[nv[0]]=nv[1]||!0}}return params},UNCODE.hasEqualURLParams=function(obj1,obj2){for(var i in obj1)if(obj1.hasOwnProperty(i)){if(!obj2.hasOwnProperty(i))return!1;if(obj1[i]!=obj2[i])return!1}for(var i in obj2)if(obj2.hasOwnProperty(i)){if(!obj1.hasOwnProperty(i))return!1;if(obj1[i]!=obj2[i])return!1}return!0},UNCODE.magnetic=function(){$(document).on("mousemove",".un-magnetic-zone",function(e){var $zone=$(this),zoneOff=$zone.offset(),$mgntcEl=$(".un-magnetic-el",this),elBound=this.getBoundingClientRect(),maxSize=Math.max($zone.outerWidth(),$zone.outerHeight()),Xvalue=e.pageX-(zoneOff.left+maxSize/2),Yvalue=e.pageY-(zoneOff.top+maxSize/2);$mgntcEl.each(function(key,val){var magneticValue=$(val).attr("data-mgntc")||.5;val.animate({transform:"translate("+Xvalue*magneticValue+"%, "+Yvalue*magneticValue+"%)"},{duration:500,fill:"forwards"})})}),$(document).on("mouseleave",".un-magnetic-zone",function(e){var $mgntcEl=$(".un-magnetic-el",this);$mgntcEl.each(function(key,val){val.animate({transform:"translate(0)"},{duration:500,fill:"forwards"})})})},UNCODE.rowParallax=function(){if(SiteParameters.is_frontend_editor||SiteParameters.smoothScroll!=="on")return;var $rows=$(".parallax-move"),stableHeight=UNCODE.wheight;$rows.each(function(){var $row=$(this),_row=$row[0],dataMove=$row.attr("data-parallax-move"),dataSafe=$row.attr("data-parallax-safe"),rowInViewport=!1,trans;if($row.find(".parallax-move").length)return;dataSafe=typeof dataSafe=="undefined"?"":dataSafe,dataMove=typeof dataMove=="undefined"||dataMove===""?3:dataMove,dataMove/=10;if("IntersectionObserver"in window){var observer=new IntersectionObserver(function(entries){entries.forEach(function(entry){entry.isIntersecting?rowInViewport=!0:rowInViewport=!1})},{root:document});observer.observe(_row)}else rowInViewport=!0;var loopRAF=function(){if(rowInViewport){var bound=_row.getBoundingClientRect(),bound_top=bound.top,bound_height=bound.height,move=!0,scrolled=window.pageYOffset||window.document.documentElement.scrollTop,docH=Math.max(document.body.scrollHeight,document.body.offsetHeight,document.documentElement.clientHeight,document.documentElement.scrollHeight,document.documentElement.offsetHeight),fromBottom=docH-(scrolled+bound_top+bound_height);bound_height>stableHeight&&dataSafe==="yes"&&($row.find(">div").css({transform:"none"}),move=!1),UNCODE.wwidth<SiteParameters.smoothScrollQuery&&($row.find(">div").css({transform:"none"}),move=!1),move&&(fromBottom<stableHeight?trans=(stableHeight-(bound_top+bound_height+fromBottom))*dataMove:scrolled+bound_top<stableHeight?trans=scrolled*dataMove:trans=(stableHeight/2-(bound_top+bound_height/2))*dataMove,$row.find(">div").css({transform:"translateY("+trans+"px) translateZ(0)"}))}requestAnimationFrame(loopRAF)};requestAnimationFrame(loopRAF)}),$(window).on("load resize",function(e){UNCODE.isMobile||(stableHeight=UNCODE.wheight)}),$(window).on("load wwResize",function(e){UNCODE.isMobile&&(stableHeight=UNCODE.wheight)})},UNCODE.changeSkinOnScroll=function(){if(UNCODE.isFullPage&&!UNCODE.isFullPageSnap)return;var $masthead=$("#masthead"),transDesktop,transMobile,changeSkin,checkTransparencyAndChange=function($col){transDesktop=$masthead.hasClass("menu-desktop-transparent")&&UNCODE.wwidth>=UNCODE.mediaQuery,transMobile=$masthead.hasClass("menu-mobile-transparent")&&UNCODE.wwidth<UNCODE.mediaQuery,changeSkin=$masthead.hasClass("menu-change-skin");if(!transDesktop&&!transMobile)return!1;if(!changeSkin)return!1;if($col.hasClass("style-light"))return $masthead.removeClass("style-dark-override").addClass("style-light-override"),!1;if($col.hasClass("style-dark"))return $masthead.removeClass("style-light-override").addClass("style-dark-override"),!1},prev_row="normal",odd=!0,$rows=$(".vc_row[data-parent]:visible");$.each($rows,function(index,row){var $row=$(row),$col=$(".uncol",$row).first(),$slider=$(".uncode-slider",$row),wayDown=new Waypoint({context:UNCODE.isUnmodalOpen?document.getElementById("unmodal-content"):window,element:row,handler:function(direction){direction=="down"&&(prev_row!=="normal"||!row.hasAttribute("data-bg-changer"))&&($slider.length&&($col=$(".owl-item.index-active .uncol",$slider).first()),checkTransparencyAndChange($col)),odd===!1?(row.hasAttribute("data-bg-changer")?prev_row="bg-changer":prev_row="normal",odd=!0):odd=!1},offset:function(){return UNCODE.menuHeight/2}}),wayUp=new Waypoint({context:UNCODE.isUnmodalOpen?document.getElementById("unmodal-content"):window,element:row,handler:function(direction){direction=="up"&&(prev_row!=="normal"||!row.hasAttribute("data-bg-changer"))&&($slider.length&&($col=$(".owl-item.index-active .uncol",$slider).first()),checkTransparencyAndChange($col)),odd===!1?(row.hasAttribute("data-bg-changer")?prev_row="bg-changer":prev_row="normal",odd=!0):odd=!1},offset:function(){return-row.clientHeight+UNCODE.menuHeight/2}})})},UNCODE.share=function(){if(typeof Share!="undefined"){var share_button_element=$(".share-button"),share_button_url=share_button_element.data("url"),share_button_config={ui:{flyout:"top center",button_font:!1,button_text:"",icon_font:!1}};share_button_url&&(share_button_config.url=share_button_url.replace("&","%26"));var share_button_top=new Share(".share-button",share_button_config)}},UNCODE.tooltip=function(){typeof jQuery.fn.tooltip!="undefined"&&$(".btn-tooltip").tooltip()},UNCODE.counters=function(){var $counters=$(".uncode-counter:not(.counter-init)");$counters.each(function(){var $counter=$(this).addClass("counter-init");SiteParameters.is_frontend_editor&&$counter.addClass("started");if($counter.closest(".owl-carousel").length)return;$counter.addClass("started").counterUp({delay:10,time:1500})})},UNCODE.countdowns=function(){var $countdowns=$("[data-uncode-countdown]:not(.counter-init)");$countdowns.each(function(){var $this=$(this).addClass("counter-init"),finalDate=$(this).data("uncode-countdown");$this.countdown(finalDate,function(event){$this.html(event.strftime("<span>%D <small>"+SiteParameters.days+"</small></span> <span>%H <small>"+SiteParameters.hours+"</small></span> <span>%M <small>"+SiteParameters.minutes+"</small></span> <span>%S <small>"+SiteParameters.seconds+"</small></span>"))})})},UNCODE.tabs=function(){var tabSwitcher=function($el){$(".tab-switch, .tab-active-anim, .nav-tabs.tab-no-border:not(.tabs-vertical):not(.tab-switch)",$el).each(function(key,value){var $navs=$(value),$active=$("li.active",$navs),$active_a=$("> a",$active),$active_span=$("> span",$active_a),vertical=$navs.closest(".vertical-tab-menu").length;!$(".switcher-cursor",$navs).length&&!vertical&&$navs.append('<span class="switcher-cursor" />');var $cursor=$(".switcher-cursor",$navs),active_w=$("a",$active).outerWidth(),span_w=$active_span.outerWidth(),active_pos=$active.position(),active_a_pos=$active_a.position(),span_pos=$active_span.position(),cursor_w=$navs.hasClass("tab-no-border")&&!$navs.hasClass("tab-switch")?span_w:active_w,cursor_left=$navs.hasClass("tab-no-border")&&!$navs.hasClass("tab-switch")?active_pos.left+span_pos.left:active_pos.left;cursor_left=cursor_left+active_a_pos.left+parseInt($active_a.css("marginLeft"),10),vertical||$cursor.css({left:cursor_left,width:cursor_w}),$navs.addClass("switch-init")})},$body=$("body");tabSwitcher($body);var tabHoverIntent=function(){var setHover;$('.tab-hover [data-toggle="tab"], .tab-hover [data-toggle="pill"]').on("mouseover",function(e){var $this=$(e.target);setHover=requestTimeout(function(){$this.trigger("hover-int")},50)}).on("mouseout",function(){clearRequestTimeout(setHover)})};tabHoverIntent();var tabInit=function(){$('[data-toggle="tab"], [data-toggle="pill"]').on("click.bs.tab.data-api hover-int",function(e){e.preventDefault();var $el=$(this);$el.tab("show");var $container=$el.closest(".uncode-tabs");tabSwitcher($container),requestTimeout(function(){window.dispatchEvent(UNCODE.boxEvent);var $tabs=$(e.currentTarget).closest(".uncode-tabs");$tabs.hasClass("tabs-trigger-box-resized")?window.dispatchEvent(new CustomEvent("boxResized")):$tabs.hasClass("tabs-trigger-window-resize")&&(window.dispatchEvent(new Event("resize")),$(window).trigger("uncode.re-layout"));var $active_panel=$(".tab-pane.active",$tabs);$.each($(".animate_when_almost_visible:not(.start_animation):not(.t-inside):not(.drop-image-separator), .index-scroll .animate_when_almost_visible, .tmb-media .animate_when_almost_visible:not(.start_animation), .animate_when_almost_visible.has-rotating-text, .custom-grid-container .animate_when_almost_visible:not(.start_animation)",$active_panel),function(index,val){var element=$(val),delayAttr=element.attr("data-delay");delayAttr==undefined&&(delayAttr=0),requestTimeout(function(){element.addClass("start_animation")},delayAttr)})},300);var $li=$el.closest("li"),mQuery=$el.closest(".tab-tablet-bp").length?UNCODE.mediaQuery:UNCODE.mediaQueryMobile;$("li",$container).not($li).find(".tab-pane").slideUp(250),$(".tab-pane",$li).slideDown(250);var completeSlideDown=requestTimeout(function(){if(UNCODE.wwidth<=mQuery&&typeof e.originalEvent!="undefined"){var pos=$el.offset(),rect=$el[0].getBoundingClientRect(),$masthead=$("#masthead > .menu-container"),considerMenu=$(".menu-wrapper .is_stuck").length&&$(".menu-wrapper .is_stuck > div").offset().top>50?UNCODE.menuMobileHeight:0;(rect.top-considerMenu<0||rect.bottom>(window.innerHeight||document.documentElement.clientHeight))&&$("html, body").animate({scrollTop:pos.top-considerMenu},{easing:"easeInOutQuad",duration:250})}},260)})};tabInit();var tabResponsive=function(){if(SiteParameters.is_frontend_editor)return!0;var $tabContainers=$(".tab-container.tabs-breakpoint");$tabContainers.each(function(){var $tabContainer=$(this),$tabContent=$(".tab-content",$tabContainer),$nav=$(".nav-tabs",$tabContainer),mQuery=$tabContainer.hasClass("tab-tablet-bp")?UNCODE.mediaQuery:UNCODE.mediaQueryMobile;$("> li",$nav).each(function(){var $li=$(this),dataID=$li.attr("data-tab-id");if(UNCODE.wwidth<=mQuery){if(!$(".tab-pane",$li).length){var $append_pane=$('[data-id="'+dataID+'"], #'+dataID,$tabContent);$tabContainer.addClass("tabs-appended"),$li.append($append_pane)}$li.hasClass("active")&&$("> a",$li).click()}else if(!$('[data-id="'+dataID+'"]',$tabContent).length){var $append_pane=$('[data-id="'+dataID+'"], #'+dataID,$nav);$tabContainer.removeClass("tabs-appended"),$tabContent.prepend($append_pane.removeAttr("style"))}})})};tabResponsive(),$(window).on("wwResize",function(){tabHoverIntent(),tabSwitcher($body)});var setCTA;$(window).on("resize",function(){clearRequestTimeout(setCTA),setCTA=requestTimeout(tabResponsive,100)}),$(".nav-tabs").each(function(){var $nav=$(this),$lis=$("> li:not(.active)",$nav),$links=$(".tab-excerpt-link",$nav);$(".tab-excerpt",$lis).slideUp(400,function(){$(this).addClass("init")}),$links.each(function(){var $link=$(this),$par_a=$link.closest("a"),href=$link.attr("data-href"),target=$link.attr("data-target");$par_a.addClass("inner-link"),$link.on("click",function(){var _link=document.createElement("a");_link.href=href,_link.target=typeof target=="undefined"||target===""?"_self":target,_link.click()})}),$nav.addClass("tab-init")}),$(".uncode-tabs.tabs-no-lazy").each(function(){var $tabs=$(this),$panes=$(".tab-pane:not(.active)",$tabs);$panes.each(function(){var $pane=$(this),$imgs=$('img[loading="lazy"]',$pane);$imgs.removeAttr("loading"),$imgs.removeAttr("decoding")})})},UNCODE.collapse=function(){$(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(e){var $this=$(this),href,target=$this.attr("data-target")||e.preventDefault()||(href=$this.attr("href"))&&href.replace(/.*(?=#[^\s]+$)/,""),$target=$(target),parent=$this.attr("data-parent"),$parent=parent&&$(parent),$title=$(this).parent(),$accordion=$(e.target).closest(".uncode-accordion"),$group=$this.closest(".group"),$panel_group=$this.closest(".panel-group");$parent&&($parent.find('[data-toggle="collapse"][data-parent="'+parent+'"]').not($this).addClass("collapsed"),!$title.hasClass("active")||$panel_group.attr("data-no-toggle")==1&&e.type!=="click"?($panel_group.attr("data-no-toggle")!=1&&($parent.find(".panel-title").removeClass("active"),$parent.find(".group").removeClass("active-group")),$title[$target.hasClass("in")?$panel_group.attr("data-no-toggle")!=1&&"removeClass":"addClass"]("active"),$group[$target.hasClass("in")?$panel_group.attr("data-no-toggle")!=1&&"removeClass":"addClass"]("active-group")):($title.removeClass("active"),$group.removeClass("active-group"))),$this[$target.hasClass("in")?"addClass":"removeClass"]("collapsed"),requestTimeout(function(){var $accordion=$(e.target).closest(".uncode-accordion");$accordion.hasClass("tabs-trigger-box-resized")?window.dispatchEvent(new CustomEvent("boxResized")):$accordion.hasClass("tabs-trigger-window-resize")&&(window.dispatchEvent(new Event("resize")),$(window).trigger("uncode.re-layout"));var $active_panel=$(".panel.active-group",$parent);$.each($(".animate_when_almost_visible:not(.start_animation):not(.t-inside):not(.drop-image-separator), .index-scroll .animate_when_almost_visible, .tmb-media .animate_when_almost_visible:not(.start_animation), .animate_when_almost_visible.has-rotating-text, .custom-grid-container .animate_when_almost_visible:not(.start_animation)",$active_panel),function(index,val){var element=$(val),delayAttr=element.attr("data-delay");delayAttr==undefined&&(delayAttr=0),requestTimeout(function(){element.addClass("start_animation")},delayAttr)})},500)}),$(".uncode-accordion.tabs-no-lazy").each(function(){var $accordion=$(this),$panes=$(".panel:not(.active-group)",$accordion);$panes.each(function(){var $pane=$(this),$imgs=$('img[loading="lazy"]',$pane);$imgs.removeAttr("loading"),$imgs.removeAttr("decoding")})})},UNCODE.bigText=function(el){var bigTextLaunch=function(){el==undefined&&(el=$("body")),$.each($(".bigtext",el),function(index,val){$(val).bigtext({minfontsize:24}),!$(val).parent().hasClass("blocks-animation")&&!$(val).hasClass("animate_when_almost_visible")&&$(val).css({opacity:1}),requestTimeout(function(){$(val).find(".animate_when_almost_visible").length!=0&&$(val).css({opacity:1})},400)})};UNCODE.wwidth>UNCODE.mediaQuery&&bigTextLaunch(),$(window).on("load",bigTextLaunch)},UNCODE.process_shortpixel_image=function(image){var data={action:"shortpixel_manual_optimization",image_id:image,cleanup:!0};$.get(SiteParameters.ajax_url,data)},UNCODE.menuSystem=function(){function menuMobile(){var $body=$("body"),scrolltop,$mobileToggleButton=$(".mobile-menu-button, .uncode-close-offcanvas-mobile"),$masthead=$("#masthead"),$box,$el,$el_transp,elHeight,offCanvasAnim,check,animating=!1,stickyMobile=!1,menuClose=new CustomEvent("menuMobileClose"),menuOpen=new CustomEvent("menuMobileOpen");UNCODE.menuOpened=!1,$mobileToggleButton.on("click",function(event){event.stopPropagation();var btn=this;if($(btn).hasClass("overlay-close"))return;event.preventDefault(),$(".overlay-search.open .menu-close-dd",$masthead).trigger("click");if(UNCODE.wwidth<=UNCODE.mediaQuery){$box=$(this).closest(".box-container").find(".main-menu-container"),$el=$(this).closest(".box-container").find(".menu-horizontal-inner:not(.row-brand), .menu-sidebar-inner"),$el_transp=$(".menu-absolute.menu-transparent"),UNCODE.isMobile?$(".menu-wrapper.menu-sticky, .menu-wrapper.menu-hide-only, .main-header .menu-sticky-vertical, .main-header .menu-hide-only-vertical, .menu-mobile-centered, .menu-sticky-mobile").length?(stickyMobile=!0,elHeight=window.innerHeight-UNCODE.menuMobileHeight-UNCODE.bodyBorder*2-UNCODE.adminBarHeight+1):(elHeight=0,$.each($box.find("> div"),function(index,val){elHeight+=$(val).outerHeight()})):(elHeight=0,$.each($el,function(index,val){elHeight+=$(val).outerHeight()}));var open=function(){clearTimeout(offCanvasAnim),animating||($body.addClass("open-overlay-menu").addClass("opening-overlay-menu"),scrolltop=$(window).scrollTop(),window.dispatchEvent(menuOpen),animating=!0,UNCODE.menuOpened=!0,$('body[class*="vmenu-"], body.hmenu-center').length&&$(".menu-hide, .menu-sticky, .menu-transparent").length&&(($body.hasClass("menu-sticky-mobile")||$("#masthead.menu-transparent").length&&!UNCODE.isMobile)&&$(".main-header > .vmenu-container").css({position:"fixed",top:$(".menu-container").outerHeight()+UNCODE.bodyBorder+UNCODE.adminBarHeight+"px"}),$("body.menu-offcanvas").length?($(".menu-container:not(.sticky-element):not(.grid-filters)").css({position:"fixed"}),$(".vmenu-container.menu-container:not(.sticky-element):not(.grid-filters)").css({position:"fixed",top:UNCODE.menuMobileHeight+UNCODE.bodyBorder+UNCODE.adminBarHeight+"px"})):$(".menu-hide, .menu-sticky").length&&UNCODE.wwidth>=960&&$(".menu-sticky").length&&$(".menu-container:not(.sticky-element):not(.grid-filters)").css({position:"fixed"})),$("body.hmenu-center").length&&(!UNCODE.isMobile&&$(".menu-hide, .menu-sticky").length||UNCODE.isMobile&&$(".menu-sticky-mobile").length)&&$(".menu-container:not(.sticky-element):not(.grid-filters)").css({position:"fixed",top:UNCODE.menuMobileHeight+UNCODE.bodyBorder+UNCODE.adminBarHeight+"px"}),$box.addClass("open-items"),$el_transp.length&&$("body.menu-mobile-transparent").length&&$el_transp.addClass("is_mobile_open"),$("body").hasClass("menu-mobile-off-canvas")?animating=!1:(btn.classList.add("close"),$box.animate({height:elHeight},600,"easeInOutCirc",function(){animating=!1,stickyMobile||$box.css("height","auto")})))},close=function(){clearTimeout(offCanvasAnim),animating||(window.dispatchEvent(menuClose),animating=!0,UNCODE.menuOpened=!1,$("body").hasClass("menu-mobile-off-canvas")||(btn.classList.remove("close"),btn.classList.add("closing")),$box.addClass("close"),requestTimeout(function(){$box.removeClass("close"),$box.removeClass("open-items"),btn.classList.remove("closing"),$el_transp.length&&$el_transp.removeClass("is_mobile_open")},500),$body.removeClass("opening-overlay-menu"),$("body").hasClass("menu-mobile-off-canvas")?(animating=!1,offCanvasAnim=setTimeout(function(){$body.removeClass("open-overlay-menu")},1e3)):$box.animate({height:0},{duration:600,easing:"easeInOutCirc",complete:function(elements){$(elements).css("height",""),animating=!1,$('body[class*="vmenu-"]').length&&UNCODE.wwidth>=960&&$(".main-header > .vmenu-container").add(".menu-container:not(.sticky-element):not(.grid-filters)").css("position","relative"),$body.removeClass("open-overlay-menu")}}))};check=UNCODE.menuOpened?close():open()}}),$("html").on("click",function(event){$("body").hasClass("menu-mobile-off-canvas")&&UNCODE.wwidth<960&&UNCODE.menuOpened&&event.clientX<SiteParameters.menu_mobile_offcanvas_gap&&$(".uncode-close-offcanvas-mobile").trigger("click")}),window.addEventListener("menuMobileTrigged",function(e){$(".mobile-menu-button.close, .opening-overlay-menu .uncode-close-offcanvas-mobile").trigger("click")}),window.addEventListener("orientationchange",function(e){$("#logo-container-mobile .mobile-menu-button.close").trigger("click")}),window.addEventListener("resize",function(){if($(window).width()<UNCODE.mediaQuery){if(UNCODE.isMobile){var $box=$(".box-container .main-menu-container"),$el=$(".box-container .menu-horizontal-inner, .box-container .menu-sidebar-inner");$($box).length&&$($box).hasClass("open-items")&&$($box).css("height")!="auto"&&!$("body").hasClass("menu-mobile-off-canvas")&&$(".menu-wrapper.menu-sticky, .menu-wrapper.menu-hide-only").length&&(elHeight=0,$.each($el,function(index,val){elHeight+=$(val).outerHeight()}),elHeight=window.innerHeight-$(".menu-wrapper.menu-sticky .menu-container .row-menu-inner, .menu-wrapper.menu-hide-only .menu-container .row-menu-inner").height()-UNCODE.bodyBorder*2+1,$($box).css("height",elHeight+"px"))}}else $(".menu-hide-vertical").removeAttr("style"),$(".menu-container-mobile").removeAttr("style"),$(".vmenu-container.menu-container").removeAttr("style")}),$(window).on("scroll",function(){if($body.hasClass("opening-overlay-menu")&&$body.hasClass("menu-mobile-off-canvas")&&UNCODE.wwidth<960)return $(window).scrollTop(scrolltop),!1})}function menuOffCanvas(){var menuClose=new CustomEvent("menuCanvasClose"),menuOpen=new CustomEvent("menuCanvasOpen");$(".menu-primary .menu-button-offcanvas:not(.menu-close-search)").on("click",function(event){$(window).width()>UNCODE.mediaQuery&&($("body.vmenu-offcanvas-overlay").length?$(event.currentTarget).hasClass("off-close")?($(event.currentTarget).removeClass("off-close"),requestTimeout(function(){window.dispatchEvent(menuClose)},500)):($(event.currentTarget).addClass("off-close"),window.dispatchEvent(menuOpen)):$(event.currentTarget).hasClass("close")?($(event.currentTarget).removeClass("close"),$(event.currentTarget).addClass("closing"),requestTimeout(function(){$(event.currentTarget).removeClass("closing"),window.dispatchEvent(menuClose)},500)):($(event.currentTarget).addClass("close"),window.dispatchEvent(menuOpen))),$("body").toggleClass("off-opened")}),$("body").off("click.menu-off-canvas-mobile").on("click.menu-off-canvas-mobile",function(e){if($(window).width()>UNCODE.mediaQuery&&$("body.menu-offcanvas.vmenu-offcanvas-overlay.off-opened").length){var $vMenuCont=$("#masthead .vmenu-container"),$close_menu=$(".uncode-close-offcanvas-overlay",$vMenuCont),vmenu_h=parseFloat($vMenuCont.outerHeight()),vmenu_w=parseFloat($vMenuCont.outerWidth()),vmenu_off=$vMenuCont.offset(),vmenu_l=parseFloat(vmenu_off.left),vmenu_t=parseFloat(vmenu_off.top),vmenu_r=vmenu_l+vmenu_w,vmenu_b=vmenu_t+vmenu_h,close_h=parseFloat($close_menu.outerHeight()),close_w=parseFloat($close_menu.outerWidth()),close_off=$close_menu.offset(),close_l=parseFloat(close_off.left),close_t=parseFloat(close_off.top),close_r=close_l+close_w,close_b=close_t+close_h;(!(e.clientX>vmenu_l&&e.clientX<vmenu_r&&e.clientY>vmenu_t&&e.clientY<vmenu_b)||e.clientX>close_l&&e.clientX<close_r&&e.clientY>close_t&&e.clientY<close_b)&&$(".menu-primary .menu-button-offcanvas:not(.menu-close-search)").trigger("click")}})}function menuOverlay(){$(".overlay").length&&$(".overlay").removeClass("hidden"),($(".overlay-sequential").length>0&&UNCODE.wwidth>=UNCODE.mediaQuery||$(".menu-mobile-animated").length>0&&UNCODE.wwidth<UNCODE.mediaQuery)&&$(".overlay-sequential .menu-smart > li, .menu-sticky .menu-container .menu-smart > li, .menu-hide.menu-container .menu-smart > li, .vmenu-container .menu-smart > li, .uncode-menu-additional-text").each(function(index,el){var transDelay=index/20+.1;$("body").hasClass("menu-mobile-centered")&&$(window).width()<UNCODE.mediaQuery&&(transDelay+=.3),$(this)[0].setAttribute("style","-webkit-transition-delay:"+transDelay+"s; -moz-transition-delay:"+transDelay+"s; -ms-transition-delay:"+transDelay+"s; -o-transition-delay:"+transDelay+"s; transition-delay:"+transDelay+"s")})}function menuAppend(){var $body=$("body"),$menuCont=$(".menu-container:not(.vmenu-container)"),$vMenuCont=$(".menu-container.vmenu-container"),$cta=$(".navbar-cta"),$socials=$(".navbar-social:not(.appended-navbar)"),$ul=$(".navbar-main ul.menu-primary-inner"),$ulCta,$ulSocials,$navLast,$firstMenu=$(".main-menu-container:first-child",$menuCont),$secondMenu=$(".main-menu-container:last-child",$menuCont),$firstNav=$(".navbar-nav:not(.uncode-close-offcanvas-mobile):first-child",$firstMenu),$secondNav=$(".navbar-nav:not(.uncode-close-offcanvas-mobile):first-child",$secondMenu),$ulFirst=$("> ul",$firstNav),$ulSecond=$("> ul",$secondNav),setCTA,appendCTA=function(){return!0},appendSocials=function(){return!0},appendSplit=function(){return!0};($body.hasClass("menu-offcanvas")||$body.hasClass("menu-overlay")||$body.hasClass("hmenu-center-split"))&&$cta.length&&($ulCta=$("> ul",$cta),$ulCta.parent().addClass("mobile-hidden").addClass("tablet-hidden"),appendCTA=function(){UNCODE.wwidth<UNCODE.mediaQuery?$ul.after($ulCta):$cta.append($ulCta)}),$body.hasClass("cta-not-appended")||appendCTA();var $smartSocial=$menuCont.add($vMenuCont).find(".menu-smart-social");$smartSocial.each(function(){var $_smartSocial=$(this);$("> li",$_smartSocial).each(function(){var $li=$(this);if(!$li.hasClass("mobile-hidden"))return $_smartSocial.removeClass("mobile-hidden"),!1;$_smartSocial.addClass("mobile-hidden")}),$("> li",$_smartSocial).each(function(){var $li=$(this);if(!$li.hasClass("tablet-hidden"))return $_smartSocial.removeClass("tablet-hidden"),!1;$_smartSocial.addClass("tablet-hidden")})});if(($body.hasClass("hmenu-center-split")||$body.hasClass("menu-overlay-center")||$body.hasClass("menu-offcanvas")||$body.hasClass("vmenu"))&&$socials.length){$ulSocials=$("> ul",$socials).addClass("menu-smart-social"),$body.hasClass("hmenu-center-split")?$navLast=$(".menu-horizontal-inner .navbar-nav-last",$menuCont):$navLast=$(".navbar-nav-last",$vMenuCont);if(!$navLast.length){var _navLast=$('<div class="nav navbar-nav navbar-social navbar-nav-last appended-navbar" />');$body.hasClass("hmenu-center-split")?($(".menu-horizontal-inner",$menuCont).append(_navLast),$navLast=$(".menu-horizontal-inner .navbar-nav-last",$menuCont)):($(".menu-sidebar-inner",$vMenuCont).last().append(_navLast),$navLast=$(".navbar-nav-last",$vMenuCont))}appendSocials=function(){$body.hasClass("menu-overlay-center")||(UNCODE.wwidth<UNCODE.mediaQuery?($socials.addClass("mobile-hidden").addClass("tablet-hidden"),$("> ul.menu-smart-social li",$socials).length||$("> ul.menu-smart-social li",$socials).remove(),$navLast.append($ulSocials)):($("> ul.menu-smart-social li",$navLast).length||$("> ul.menu-smart-social li",$navLast).remove(),$socials.append($ulSocials)))},appendSocials()}if($vMenuCont.length)var $accordion_secondary=$(".menu-accordion-secondary",$vMenuCont);else var $accordion_secondary=$(".menu-accordion-secondary",$menuCont);if($accordion_secondary.length){var $accordion_secondary_ph=$vMenuCont.add($menuCont).find(".accordion-secondary-ph");UNCODE.wwidth<UNCODE.mediaQuery?($accordion_secondary_ph.length||$accordion_secondary.after('<span class="accordion-secondary-ph" />'),$vMenuCont.length?$(".menu-sidebar-inner",$vMenuCont).first().find(".menu-accordion:not(.menu-accordion-secondary):not(.menu-accordion-extra-icons)").last().after($accordion_secondary):$(".navbar-nav.navbar-cta:not(.mobile-hidden)",$menuCont).length?$(".navbar-nav.navbar-cta",$menuCont).after($accordion_secondary):$(".navbar-nav.navbar-main",$menuCont).after($accordion_secondary)):typeof $accordion_secondary_ph!="undefined"&&$accordion_secondary_ph.length&&$accordion_secondary_ph.before($accordion_secondary)}if($vMenuCont.length)var $extra_icons=$(".menu-accordion-extra-icons",$vMenuCont);else var $extra_icons=$(".navbar-extra-icons",$menuCont);if($extra_icons.length)if($vMenuCont.length){if($("li:not(.social-icon)",$extra_icons).length)if(UNCODE.wwidth<UNCODE.mediaQuery){var $not_social=$("> ul > li:not(.social-icon)",$extra_icons),$primary_after=$(".menu-accordion-primary-after",$vMenuCont);$not_social.each(function(){$primary_after.length||($(".menu-accordion-primary",$vMenuCont).after('<div class="menu-accordion menu-accordion-primary-after" />'),$primary_after=$(".menu-accordion-primary-after",$vMenuCont),$primary_after.append('<ul class="menu-smart sm sm-vertical menu-smart-social" />'));var $extra_li=$(this);$primary_after.find("> ul").append($extra_li)})}else{var $primary_after=$(".menu-accordion-primary-after",$vMenuCont),$not_social=$("> ul > li:not(.social-icon)",$primary_after);$not_social.each(function(){var $extra_li=$(this);$extra_icons.find("> ul").append($extra_li)})}}else if(!$body.hasClass("hmenu-center-double"))if(UNCODE.wwidth<UNCODE.mediaQuery){var $not_social=$("> ul > li:not(.social-icon)",$extra_icons),$primary_after=$(".nav.navbar-main-after",$menuCont);!$primary_after.length&&$not_social.length&&($(".navbar-nav.navbar-cta:not(.mobile-hidden)",$menuCont).length?$(".navbar-nav.navbar-cta",$menuCont).after('<div class="nav navbar-main-after" />'):$(".navbar-nav.navbar-main",$menuCont).after('<div class="nav navbar-main-after" />'),$primary_after=$(".nav.navbar-main-after",$menuCont),$primary_after.append('<ul class="menu-smart sm menu-smart-social" />'));var tablet_hidden=!0,mobile_hidden=!0;$not_social.each(function(){var $extra_li=$(this);$primary_after.find("> ul").append($extra_li),$extra_li.hasClass("tablet-hidden")||(tablet_hidden=!1),$extra_li.hasClass("mobile-hidden")||(mobile_hidden=!1)}),tablet_hidden===!0&&$not_social.length&&$primary_after.addClass("tablet-hidden"),mobile_hidden===!0&&$not_social.length&&$primary_after.addClass("mobile-hidden")}else{var $primary_after=$(".nav.navbar-main-after",$menuCont);if($primary_after.length){var $not_social=$("> ul > li:not(.social-icon)",$primary_after);$not_social.each(function(){var $extra_li=$(this);$extra_icons.find("> ul").append($extra_li)}),$primary_after.remove()}}$body.hasClass("hmenu-center-double")&&(appendSplit=function(){if(UNCODE.wwidth<UNCODE.mediaQuery){if($extra_icons.length&&$("li:not(.social-icon):not(.tablet-hidden):not(.mobile-hidden)",$extra_icons).length){var $not_social=$("> ul > li:not(.social-icon)",$extra_icons),$append_ul=$('<ul class="menu-smart sm sm-vertical append-extra-icons" />');$not_social.each(function(){var $extra_li=$(this);$append_ul.append($extra_li)}),$secondNav.length?$secondNav.append($append_ul):$(".menu-horizontal-inner",$menuCont).prepend($append_ul)}$secondNav.length?$secondNav.prepend($ulFirst):$(".menu-horizontal-inner",$menuCont).prepend($ulFirst),$firstMenu.hide()}else{$firstNav.append($ulFirst);var $append_ul=$(".menu-horizontal-inner ul.append-extra-icons",$menuCont).eq(0);if($append_ul.length){var $not_social=$("> li:not(.social-icon)",$append_ul);$not_social.each(function(){var $extra_li=$(this);$extra_icons.find("> ul").append($extra_li)})}$(".menu-horizontal-inner ul.append-extra-icons",$menuCont).remove(),$(".menu-horizontal-inner > .menu-primary-inner",$menuCont).remove(),$firstMenu.css({display:"table-cell"})}}),appendSplit(),$(window).on("resize",function(){clearRequestTimeout(setCTA),setCTA=requestTimeout(function(){appendCTA(),appendSocials(),appendSplit()},10)})}var $secondary_parent;menuMobile(),menuOffCanvas(),menuAppend(),menuOverlay();var stickyDropdownSearch=function(){var $masthead=$("#masthead"),$ddSearch=$(".overlay.overlay-search",$masthead),$styles=$("#stickyDropdownSearch").remove();if($("body.hmenu-center.menu-sticky-mobile").length&&$ddSearch.length){var $menuWrapper=$(".menu-wrapper"),$navbar=$(".menu-container-mobile",$menuWrapper),navbarH=$navbar.outerHeight(),_css;_css='<style id="stickyDropdownSearch">',_css+="@media (max-width: 959px){",_css+="body.hmenu-center.menu-sticky-mobile #masthead .overlay.overlay-search {",_css+="margin-top: "+parseFloat(navbarH)+"px !important;",_css+="}",_css+="body.hmenu-center.menu-sticky-mobile .navbar.is_stuck + #masthead .overlay.overlay-search {",_css+="position: fixed;",_css+="top: 0;",_css+="}",_css+="</style>",$(_css).appendTo($("head"))}};stickyDropdownSearch();var setMenuOverlay;$(window).on("resize",function(){$(".overlay").length&&$(window).width()>1024&&$(".overlay").addClass("hidden"),clearRequestTimeout(setMenuOverlay),setMenuOverlay=requestTimeout(function(){menuOverlay(),menuAppend(),stickyDropdownSearch()},150)}),UNCODE.menuSmartInit()},UNCODE.menuSmartInit=function(){var $menusmart=$('[class*="menu-smart"]'),$masthead=$("#masthead"),$hMenu=$(".menu-horizontal-inner",$masthead),$focus=$(".overlay-menu-focus"),showTimeout=50,hideTimeout=50,showTimeoutFunc,hideTimeoutFunc;$("> li.menu-item-has-children",$menusmart).hover(function(){$(this).data("hover",!0)},function(){$(this).data("hover",!1)}),$('> li.menu-item a[href="#"]',$menusmart).on("click",function(e){e.preventDefault()});if($(window).width()>=UNCODE.mediaQuery&&$(".overlay-menu-focus").length){var $notLis=$("> .nav > ul > li a",$hMenu),$menuA=$("a",$masthead).not($notLis),$hoverSelector=$("> .nav > ul > li",$hMenu).has("> ul"),showFuncCond=function(){return!0};$("body").hasClass("focus-megamenu")?($hoverSelector=$("> .nav > ul > li",$hMenu).has(".mega-menu-inner"),showFuncCond=function($ul){return $ul.hasClass("mega-menu-inner")}):$("body").hasClass("focus-links")&&($hoverSelector=$("> .nav > ul > li",$hMenu).add($menuA)),$hoverSelector.hover(function(){clearRequestTimeout(hideTimeoutFunc),showTimeoutFunc=requestTimeout(function(){$("body").addClass("navbar-hover")},showTimeout*2)},function(){hideTimeoutFunc=requestTimeout(function(){$(".overlay-search.open",$masthead).length||$("body").removeClass("navbar-hover")},hideTimeout*2)})}else showFuncCond=function(){return!1};$menusmart.length>0&&($menusmart.smartmenus({subIndicators:!1,subIndicatorsPos:"append",subIndicatorsText:"",showTimeout:showTimeout,hideTimeout:hideTimeout,scrollStep:8,showFunction:function($ul,complete){clearRequestTimeout(showTimeoutFunc),$ul.fadeIn(0,"linear",function(){complete(),$ul.hasClass("vc_row")&&$ul.css({display:"table"}),$(".overlay-menu-focus").length&&$ul.hasClass("mega-menu-inner")&&$("body").addClass("open-megamenu"),$(".overlay-menu-focus").length&&showFuncCond($ul)&&$(window).width()>=UNCODE.mediaQuery&&$ul.closest(".main-menu-container").length&&$("body").addClass("navbar-hover")}).addClass("open-animated")},hideFunction:function($ul,complete){$(".overlay-menu-focus").length&&$ul.hasClass("mega-menu-inner")&&!$(".overlay-search.open",$masthead).length&&$("body").removeClass("open-megamenu");var fixIE=$("html.ie").length;if(fixIE){var $rowParent=$($ul).closest(".main-menu-container");$rowParent.height("auto")}$ul.fadeOut(0,"linear",function(){complete(),$ul.removeClass("open-animated"),$ul.closest("li.menu-item-has-children").data("hover")===!1&&$("body").removeClass("open-submenu")})},collapsibleShowFunction:function($ul,complete){$ul.slideDown(400,"easeInOutCirc",complete)},collapsibleHideFunction:function($ul,complete){$ul.slideUp(200,"easeInOutCirc",complete)},hideOnClick:SiteParameters.menuHideOnClick}),$("body").hasClass("menu-accordion-active")&&$menusmart.each(function(key,menu){$(menu).addClass("menu-smart-init"),$(menu).smartmenus("itemActivate",$(menu).find(".current-menu-item > a").eq(-1))}),$(document).on("uncode.smartmenu-appended",function(){requestTimeout(function(){$menusmart.smartmenus("refresh")},1e3)})),$(".main-menu-container").each(function(){var $main_cont=$(this),$uls=$("ul",$main_cont);$uls.each(function(){var $ul=$(this),mobile_hidden=!0,tablet_hidden=!0;$("> li:not(.hidden)",$ul).each(function(){if(!$(this).hasClass("mobile-hidden"))return mobile_hidden=!1,!1}),$("> li:not(.hidden)",$ul).each(function(){if(!$(this).hasClass("tablet-hidden"))return tablet_hidden=!1,!1}),mobile_hidden&&$ul.addClass("mobile-hidden"),tablet_hidden&&$ul.addClass("tablet-hidden")});var $divUlsMB=$("div:has(>ul.mobile-hidden)");$divUlsMB.each(function(){var $divUlMB=$(this),div_mobile_hidden=!0,div_tablet_hidden=!0;$("> ul:not(.hidden)",$divUlMB).each(function(){if(!$(this).hasClass("mobile-hidden"))return div_mobile_hidden=!1,!1}),$("> ul:not(.hidden)",$divUlMB).each(function(){if(!$(this).hasClass("tablet-hidden"))return div_tablet_hidden=!1,!1}),div_mobile_hidden&&$divUlMB.addClass("mobile-hidden"),div_tablet_hidden&&$divUlMB.addClass("tablet-hidden")})});var overlaySearchButton=function(){var $search_wrap=$(".overlay.overlay-search, .widget_search");$search_wrap.each(function(){var $form=$("form",this),$icon=$("i",$form);$icon.on("click",function(){$form.submit()})})};overlaySearchButton()},UNCODE.okvideo=function(ev){var BLANK_GIF="data:image/gif;base64,R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw%3D%3D";$.okvideo=function(options){typeof options!="object"&&(options={video:options});var base=this;base.init=function(){base.options=$.extend({},$.okvideo.options,options),base.options.video===null&&(base.options.video=base.options.source),base.setOptions();var target=base.options.target||$("body"),position=target[0]==$("body")[0]?"fixed":"absolute",zIndex=base.options.controls===3?-999:"auto";if($("#okplayer-"+base.options.id).length==0){var mask='<div id="okplayer-mask-'+base.options.id+'" style="position:'+position+';left:0;top:0;overflow:hidden;z-index:-998;height:100%;width:100%;"></div>';OKEvents.utils.isMobile()?target.append('<div id="okplayer-'+base.options.id+'" style="position:'+position+";left:0;top:0;overflow:hidden;z-index:"+zIndex+';height:100%;width:100%;"></div>'):(base.options.controls===3&&target.append(mask),base.options.adproof===1?target.append('<div id="okplayer-'+base.options.id+'" style="position:'+position+";left:-10%;top:-10%;overflow:hidden;z-index:"+zIndex+';height:120%;width:120%;"></div>'):target.append('<div id="okplayer-'+base.options.id+'" style="position:'+position+";left:0;top:0;overflow:hidden;z-index:"+zIndex+';height:100%;width:100%;"></div>')),$("#okplayer-mask-"+base.options.id).css("background-image","url("+BLANK_GIF+")"),base.options.playlist.list===null?base.options.video.provider==="youtube"?base.loadYouTubeAPI():base.options.video.provider==="vimeo"&&(base.options.volume/=100,base.loadVimeoAPI()):base.loadYouTubeAPI()}},base.setOptions=function(){for(var key in this.options)this.options[key]===!0&&(this.options[key]=1),this.options[key]===!1&&(this.options[key]=3);base.options.playlist.list===null&&(base.options.video=base.determineProvider()),$(window).data("okoptions-"+base.options.id,base.options)},base.insertJS=function(src,callback,provider){var tag;if(ev==="uncode-more-items-loaded"&&provider!=="youtube"){delete UNCODE.insertedSripts[src];var tags=document.getElementsByTagName("script");for(var i=tags.length;i>=0;i--)tags[i]&&tags[i].getAttribute("src")!=null&&tags[i].getAttribute("src").indexOf(src)!=-1&&tags[i].parentNode.removeChild(tags[i])}else if(UNCODE.insertedSripts&&UNCODE.insertedSripts[src]){tag=UNCODE.insertedSripts[src],callback&&(tag.readyState?tag.onreadystatechange=function(){if(tag.readyState==="loaded"||tag.readyState==="complete")tag.onreadystatechange=null,callback()}:$(tag).on("load",callback));return}tag=document.createElement("script"),callback&&(tag.readyState?tag.onreadystatechange=function(){if(tag.readyState==="loaded"||tag.readyState==="complete")tag.onreadystatechange=null,callback()}:tag.onload=function(){callback()}),tag.src=src;var firstScriptTag=document.getElementsByTagName("script")[0];firstScriptTag.parentNode.insertBefore(tag,firstScriptTag),UNCODE.insertedSripts||(UNCODE.insertedSripts=[]),UNCODE.insertedSripts[src]=tag},base.loadYouTubeAPI=function(callback){ev==="uncode-more-items-loaded"?onYouTubeIframeAPIReady():base.insertJS("https://www.youtube.com/player_api",!1,"youtube")},base.loadYouTubePlaylist=function(){player.loadPlaylist(base.options.playlist.list,base.options.playlist.index,base.options.playlist.startSeconds,base.options.playlist.suggestedQuality)},base.loadVimeoAPI=function(){var source="//player.vimeo.com/video/"+base.options.video.id+"?background=1&api=1&title=0&byline=0&portrait=0&playbar=0&loop="+base.options.loop+"&autoplay="+(base.options.autoplay===1?1:0)+"&player_id=okplayer-"+base.options.id+"&autopause=0",jIframe=$('<iframe data-src="'+source+'" frameborder="0" id="okplayer-'+base.options.id+'" style="visibility: hidden;" class="vimeo-background" webkitallowfullscreen mozallowfullscreen allowfullscreen >');$(window).data("okoptions-"+base.options.id).jobject=jIframe,$("#okplayer-"+base.options.id).replaceWith(jIframe[0]),base.insertJS("//player.vimeo.com/api/player.js",function(){vimeoPlayerReady(base.options.id)},"vimeo")},base.determineProvider=function(){var a=document.createElement("a");a.href=base.options.video;if(/youtube.com/.test(base.options.video)||/youtu.be/.test(base.options.video)){var videoid=a.href.split("/")[3].toString(),query=videoid.substring(videoid.indexOf("?")+1);if(query!=""){var vars=query.split("&");for(var i=0;i<vars.length;i++){var pair=vars[i].split("=");pair[0]=="v"&&(videoid=pair[1])}}return{provider:"youtube",id:videoid}}if(/vimeo.com/.test(base.options.video))return{provider:"vimeo",id:a.href.split("/")[3].toString().split("#")[0]};if(/[-A-Za-z0-9_]+/.test(base.options.video)){var id=new String(base.options.video.match(/[-A-Za-z0-9_]+/));if(id.length==11)return{provider:"youtube",id:id.toString()};for(var i=0;i<base.options.video.length;i++)if(typeof parseInt(base.options.video[i])!="number")throw"not vimeo but thought it was for a sec";return{provider:"vimeo",id:base.options.video}}throw"OKVideo: Invalid video source"},base.init()};var checkResize,newW=UNCODE.wwidth;$.okvideo.options={id:null,source:null,video:null,playlist:{list:null,index:0,startSeconds:0,suggestedQuality:"default"},disableKeyControl:1,captions:0,loop:1,hd:1,volume:0,adproof:!1,unstarted:null,onFinished:null,onReady:null,onPlay:null,onPause:null,buffering:null,controls:!1,autoplay:!0,annotations:!0,cued:null},$.fn.okvideo=function(options){return options.target=this,this.each(function(){new $.okvideo(options)})};var checkForVideos=function(){$(".uncode-video-container.video").each(function(index,el){var $this=$(this),mobile_ready=$this.hasClass("no-control-mobile-autoplay"),url=$this.attr("data-video"),id=$this.attr("data-id"),cloned=$this.closest(".owl-item");(mobile_ready||newW>=UNCODE.mediaQuery)&&(!cloned.hasClass("cloned")||cloned.length==0)&&$this.okvideo({id:id,source:url.split("#")[0],time:url.indexOf("#")>-1?url.substring(url.indexOf("#")+1):null,autoplay:1,controls:0,volume:0,adproof:0,caller:$this,hd:1,onReady:function(player){var getPlayer=player.c||player.h||player,$iframe,getContainer=$(getPlayer).closest(".background-element");getContainer.length&&UNCODE.initVideoComponent(getContainer[0],".uncode-video-container.video:not(.drop-move)");if($this.hasClass("drop-move")){var $iframe=$(getPlayer),w=parseFloat($iframe.attr("width")),h=parseFloat($iframe.attr("height")),ratio=h/w,setResizeiFto,resizeiFrame=function(){var dataW=$this.attr("data-w"),newW=UNCODE.wwidth/12*parseFloat(dataW),newH=newW*ratio;$iframe.css({width:newW,height:newH})};resizeiFrame(),$(window).on("load",resizeiFrame),$(window).on("resize",function(){clearRequestTimeout(setResizeiFto),setResizeiFto=requestTimeout(function(){resizeiFrame()},10)})}}})})};checkForVideos(),$(window).on("load",function(){$(".mejs-fullscreen-button button").on("click",function(){var $button=$(this),$stuck=$button.closest(".is_stucked");$stuck.length&&($stuck=$(this).trigger("sticky_kit:detach"),window.scrollTo(0,0))})});var checkVideoResize=function(){clearRequestTimeout(checkResize),checkResize=requestTimeout(function(){newW!==UNCODE.wwidth&&(newW=UNCODE.wwidth,checkForVideos())},1e3)};$(window).off("resize",checkVideoResize).on("resize",checkVideoResize)},UNCODE.backgroundSelfVideos=function($ctx){var backgroundSelfVideosInit=function($ctx){if(SiteParameters.block_mobile_videos===!0)return!1;if(typeof MediaElement=="function")typeof $ctx=="undefined"&&($ctx=document),$(".background-video-shortcode",$ctx).each(function(index,el){if($(this).closest("mediaelementwrapper").length)return!0;var $video_el=$(this),$parent_carousel=$video_el.parents(".uncode-slider").eq(0),$parent_drop_move=$video_el.closest(".t-entry-drop.drop-move"),video_id=$video_el.attr("id");SiteParameters.is_frontend_editor&&(video_id=video_id+"_"+index,$video_el.attr("id",video_id));var media=new MediaElement(video_id,{startVolume:0,loop:!0,success:function(mediaElement,domObject){domObject.volume=0,$(mediaElement).data("started",!1),mediaElement.addEventListener("timeupdate",function(e){$(e.target).data("started")||$(mediaElement).data("started",!0)}),mediaElement.addEventListener("loadedmetadata",function(e){$("body").removeClass("video-not-supported"),mediaElement.play()}),UNCODE.isMobile||requestTimeout(function(){UNCODE.initVideoComponent(document.body,".uncode-video-container.video:not(.drop-move), .uncode-video-container.self-video:not(.drop-move)")},100),$("html.firefox").length&&!$parent_carousel.length&&mediaElement.play();if($parent_drop_move.length){var setResizeMEto,resizeMediaElement=function(){var dataW=$parent_drop_move.attr("data-w"),videoW=domObject.width,videoH=domObject.height,newW=UNCODE.wwidth/12*parseFloat(dataW),newH=newW/(videoW/videoH);$(domObject).css({height:newH,width:newW})};$(window).on("resize load",function(){clearRequestTimeout(setResizeMEto),setResizeMEto=requestTimeout(function(){resizeMediaElement()},10)})}mediaElement.addEventListener("play",function(){$(mediaElement).closest(".uncode-video-container:not(.t-entry-drop)").css("opacity","1"),$(mediaElement).closest("#page-header").addClass("video-started"),$(mediaElement).closest(".background-wrapper").find(".block-bg-blend-mode.not-ie").css("opacity","1")},!0)},error:function(){}})});else{typeof $ctx=="undefined"&&($ctx=document);const videos=$ctx.querySelectorAll(".background-video-shortcode:not(.started)");Array.from(videos).forEach(function(video_el){video_el.addEventListener("loadedmetadata",function(e){$("body").removeClass("video-not-supported"),video_el.play()}),video_el.currentTime>0&&video_el.readyState>2?(video_el.muted=!0,video_el.loop=!0,$(video_el).closest(".uncode-video-container:not(.t-entry-drop)").css("opacity","1"),$(video_el).addClass("started").closest("#page-header").addClass("video-started"),$(video_el).closest(".background-wrapper").find(".block-bg-blend-mode.not-ie").css("opacity","1"),$("body").removeClass("video-not-supported"),video_el.play()):requestTimeout(function(){backgroundSelfVideosInit($ctx)},1e3)})}};backgroundSelfVideosInit($ctx),$("body").hasClass("compose-mode")&&typeof window.parent.vc!="undefined"&&window.parent.vc.events.on("shortcodeView:updated shortcodeView:ready",function(model){var $el=model.view.$el,shortcode=model.attributes.shortcode;typeof MediaElement=="function"?backgroundSelfVideosInit($el):backgroundSelfVideosInit($el[0])})},UNCODE.is_scrolling=!1,UNCODE.disableHoverScroll=function(){if(!UNCODE.isMobile&&!UNCODE.isFullPage&&!SiteParameters.is_frontend_editor&&(!SiteParameters.smoothScroll||SiteParameters.smoothScrollDisableHover)){var body=document.body,timer;window.addEventListener("scroll",function(){var delay=body.classList.contains("bg-changer-init")?SiteParameters.bg_changer_time:300;clearRequestTimeout(timer),body.classList&&!body.classList.contains("disable-hover")&&(body.classList.add("disable-hover"),window.dispatchEvent(new CustomEvent("disable-hover"))),UNCODE.is_scrolling=!0,timer=requestTimeout(function(){body.classList&&(body.classList.remove("disable-hover"),window.dispatchEvent(new CustomEvent("enable-hover"))),UNCODE.is_scrolling=!1},delay)},!1)}},UNCODE.isotopeLayout=function(){if($(".isotope-layout").length>0){var isotopeContainersArray=[],typeGridArray=[],layoutGridArray=[],screenLgArray=[],screenMdArray=[],screenSmArray=[],transitionDuration=[],$filterItems=[],$filters=$(".isotope-system .isotope-filters"),$itemSelector=".tmb-iso",$items,itemMargin,correctionFactor=0,firstLoad=!0,isOriginLeft=$("body").hasClass("rtl")?!1:!0;$('[class*="isotope-container"]').each(function(index){var _this=$(this),isoData=_this.data(),$data_lg,$data_md,$data_sm;_this.children(".tmb").addClass("tmb-iso"),isoData.lg!==undefined?$data_lg=_this.attr("data-lg"):$data_lg="1000",isoData.md!==undefined?$data_md=_this.attr("data-md"):$data_md="600",isoData.sm!==undefined?$data_sm=_this.attr("data-sm"):$data_sm="480",screenLgArray.push($data_lg),screenMdArray.push($data_md),screenSmArray.push($data_sm),transitionDuration.push($(".t-inside.animate_when_almost_visible",this).length>0?0:"0.5s"),isoData.type=="metro"?typeGridArray.push(!0):typeGridArray.push(!1),isoData.layout!==undefined?layoutGridArray.push(isoData.layout):layoutGridArray.push("masonry"),isotopeContainersArray.push(_this),_this.attr("data-iso-index",index)});var colWidth=function(index){$(isotopeContainersArray[index]).width("");var isPx=$(isotopeContainersArray[index]).parent().hasClass("px-gutter"),widthAvailable=$(isotopeContainersArray[index]).width(),columnNum=12,columnWidth=0,data_vp_height=$(isotopeContainersArray[index]).attr("data-vp-height"),consider_menu=$(isotopeContainersArray[index]).attr("data-vp-menu"),winHeight=UNCODE.wheight-UNCODE.adminBarHeight,$rowContainer,paddingRow,$colContainer,paddingCol;consider_menu&&(winHeight-=UNCODE.menuHeight),data_vp_height==="1"&&($rowContainer=$(isotopeContainersArray[index]).parents(".row-parent").eq(0),paddingRow=parseInt($rowContainer.css("padding-top"))+parseInt($rowContainer.css("padding-bottom")),$colContainer=$(isotopeContainersArray[index]).parents(".uncell").eq(0),paddingCol=parseInt($colContainer.css("padding-top"))+parseInt($colContainer.css("padding-bottom")),winHeight-=paddingRow+paddingCol),isPx?(columnWidth=Math.ceil(widthAvailable/columnNum),$(isotopeContainersArray[index]).width(columnNum*Math.ceil(columnWidth))):columnWidth=$("html.firefox").length?Math.floor(widthAvailable/columnNum):widthAvailable/columnNum,$items=$(isotopeContainersArray[index]).find(".tmb-iso:not(.tmb-carousel)"),itemMargin=parseInt($(isotopeContainersArray[index]).find(".t-inside").css("margin-top"));for(var i=0,len=$items.length;i<len;i++){var $item=$($items[i]),multiplier_w=$item.attr("class").match(/tmb-iso-w(\d{0,2})/),multiplier_h=$item.attr("class").match(/tmb-iso-h(\d{0,3})/),multiplier_fixed=multiplier_h!==null?multiplier_h[1]:1;multiplier_w!=null&&multiplier_w[1]!==undefined&&multiplier_w[1]==15&&(multiplier_w[1]=2.4),multiplier_h!=null&&multiplier_h[1]!==undefined&&multiplier_h[1]==15&&(multiplier_h[1]=2.4);if(widthAvailable>=screenMdArray[index]&&widthAvailable<screenLgArray[index]){if(multiplier_w!=null&&multiplier_w[1]!==undefined){switch(parseInt(multiplier_w[1])){case 5:case 4:case 3:typeGridArray[index]&&(multiplier_h[1]=6*multiplier_h[1]/multiplier_w[1]),multiplier_w[1]=6;break;case 2:case 1:typeGridArray[index]&&(multiplier_h[1]=3*multiplier_h[1]/multiplier_w[1]),multiplier_w[1]=3;break;default:typeGridArray[index]&&(multiplier_h[1]=12*multiplier_h[1]/multiplier_w[1]),multiplier_w[1]=12}multiplier_w[1]==2.4&&(typeGridArray[index]&&(multiplier_h[1]=6*multiplier_h[1]/multiplier_w[1]),multiplier_w[1]=6)}}else if(widthAvailable>=screenSmArray[index]&&widthAvailable<screenMdArray[index]){if(multiplier_w!=null&&multiplier_w[1]!==undefined){switch(parseInt(multiplier_w[1])){case 5:case 4:case 3:case 2:case 1:typeGridArray[index]&&(multiplier_h[1]=6*multiplier_h[1]/multiplier_w[1]),multiplier_w[1]=6;break;default:typeGridArray[index]&&(multiplier_h[1]=12*multiplier_h[1]/multiplier_w[1]),multiplier_w[1]=12}multiplier_w[1]==2.4&&(typeGridArray[index]&&(multiplier_h[1]=6*multiplier_h[1]/multiplier_w[1]),multiplier_w[1]=6)}}else widthAvailable<screenSmArray[index]&&multiplier_w!=null&&multiplier_w[1]!==undefined&&(multiplier_w[1]=12,typeGridArray[index]&&(multiplier_h[1]=12));var width=multiplier_w?Math.floor(columnWidth*multiplier_w[1]):columnWidth,height;data_vp_height==="1"&&typeof multiplier_h[1]!="undefined"?(height=multiplier_h?Math.ceil(winHeight/(100/multiplier_fixed))-itemMargin:columnWidth,widthAvailable<screenSmArray[index]&&(height=Math.ceil(2*Math.ceil(columnWidth/2)*12)-itemMargin)):height=multiplier_h?Math.ceil(2*Math.ceil(columnWidth/2)*multiplier_h[1])-itemMargin:columnWidth,width>=widthAvailable?($item.css({width:widthAvailable}),typeGridArray[index]&&$item.children().add($item.find(".backimg")).css({height:height})):($item.css({width:width}),typeGridArray[index]&&$item.children().add($item.find(".backimg")).css({height:height}))}return multiplier_w!=null&&multiplier_w[1]!==undefined&&multiplier_w[1]==2.4?columnWidth/60:columnWidth},init_isotope=function(){for(var i=0,len=isotopeContainersArray.length;i<len;i++){var isotopeSystem=$(isotopeContainersArray[i]).closest($(".isotope-system")),isotopeId=isotopeSystem.attr("id"),$layoutMode=layoutGridArray[i],setIsotopeFirstRowTimeOut,setIsotopeFirstRow=function(items){var firstRow=!0;$(items).each(function(index,val){var el=items[index].element,el_top=items[index].position.y,$el=$(el);index>0&&el_top>0&&firstRow?firstRow=!1:index==0&&el_top==0&&(firstRow=!0),firstRow?$el.removeClass("tmb-isotope-further-row"):$el.addClass("tmb-isotope-further-row")})};$(isotopeContainersArray[i]).not(".un-isotope-init").addClass("un-isotope-init").isotope({itemSelector:$itemSelector,layoutMode:$layoutMode,transitionDuration:transitionDuration[i],masonry:{columnWidth:colWidth(i)},vertical:{horizontalAlignment:.5},sortBy:"original-order",isOriginLeft:isOriginLeft}).on("layoutComplete",onLayout($(isotopeContainersArray[i]),0)).on("layoutComplete",function(event,items){typeof items[0]!="undefined"&&$(items[0].element).closest(".off-grid-layout:not(.off-grid-forced)").length&&setIsotopeFirstRow(items)}).on("arrangeComplete",function(event,items){typeof items[0]!="undefined"&&$(items[0].element).closest(".off-grid-layout:not(.off-grid-forced)").length&&(clearRequestTimeout(setIsotopeFirstRowTimeOut),setIsotopeFirstRowTimeOut=requestTimeout(function(){setIsotopeFirstRow(items)},100))});if($(isotopeContainersArray[i]).hasClass("isotope-infinite")&&$.fn.infinitescroll){$(isotopeContainersArray[i]).infinitescroll({navSelector:"#"+isotopeId+" .loadmore-button",nextSelector:"#"+isotopeId+" .loadmore-button a",itemSelector:"#"+isotopeId+" .isotope-layout .tmb, #"+isotopeId+" .isotope-filters li.filter-cat, #"+isotopeId+" .woocommerce-result-count-wrapper--default",animate:!1,behavior:"local",debug:!1,loading:{selector:"#"+isotopeId+".isotope-system .isotope-footer-inner",speed:0,finished:undefined,msg:$("#"+isotopeId+" .loadmore-button")},errorCallback:function(){var isotope_system=$(this).closest(".isotope-system");$(".loading-button",isotope_system).hide(),$(".loadmore-button",isotope_system).attr("style","display:none !important")}},function(newElements,opts){var $isotope=$(this),isotope_system=$isotope.closest(".isotope-system"),isotopeId=isotope_system.attr("id"),filters=new Array,$loading_button=isotope_system.find(".loading-button"),$infinite_button=isotope_system.find(".loadmore-button"),$numPages=$("a",$infinite_button).data("pages"),$woo_results,delay=300;$("a",$infinite_button).html($("a",$infinite_button).data("label")),$infinite_button.show(),$loading_button.hide(),$numPages!=undefined&&opts.state.currPage==$numPages&&$infinite_button.hide(),$("> li",$isotope).remove(),$(".isotope-container").find(".woocommerce-result-count-wrapper").remove(),$.each($(newElements),function(index,val){$(val).hasClass("woocommerce-result-count-wrapper")?($woo_results=$(val),delete newElements[index]):($(val).addClass("tmb-iso"),$(val).is("li")&&filters.push($(val)[0])),$(val).addClass("uncode-appended")}),newElements=newElements.filter(function(x){return filters.indexOf(x)<0}),$.each($(filters),function(index,val){$("#"+isotopeId+' a[data-filter="'+$("a",val).attr("data-filter")+'"]').length==0&&$("#"+isotopeId+" .isotope-filters ul").append($(val))});if($woo_results&&$woo_results.length>0){var old_count=isotope_system.find(".woocommerce-result-count").text(),new_count=$woo_results.find(".woocommerce-result-count").text(),old_start=old_count.match(/(\d+)–(\d+)/)[1],new_end=new_count.match(/(\d+)–(\d+)/)[2];function replaceMatch(match,p1,p2){return old_start+"–"+new_end}var new_count_text=old_count.replace(/(\d+)–(\d+)/,replaceMatch);isotope_system.find(".woocommerce-result-count").text(new_count_text)}$isotope.isotope("reloadItems",onLayout($isotope,newElements.length));if(typeof UNCODE.lightbox!="undefined"&&!SiteParameters.lbox_enhanced){var getLightbox=UNCODE.lightboxArray["ilightbox_"+isotopeId];typeof getLightbox=="object"?getLightbox.refresh():UNCODE.lightbox()}typeof twttr!="undefined"&&twttr.widgets.load(isotopeContainersArray[i]),requestTimeout(function(){Waypoint.refreshAll(),$isotope.trigger("more-items-loaded"),$(window).trigger("more-items-loaded"),window.dispatchEvent(new CustomEvent("uncode-more-items-loaded"))},1e3)});if($(isotopeContainersArray[i]).hasClass("isotope-infinite-button")){var $infinite_isotope=$(isotopeContainersArray[i]),$infinite_button=$infinite_isotope.closest(".isotope-system").find(".loadmore-button a");$infinite_isotope.infinitescroll("pause"),$infinite_button.on("click",function(event){event.preventDefault();var $infinite_system=$(event.target).closest(".isotope-system"),$infinite_isotope=$infinite_system.find(".isotope-container"),isotopeId=$infinite_system.attr("id");$(event.currentTarget).html(SiteParameters.loading),$infinite_isotope.infinitescroll("resume"),$infinite_isotope.infinitescroll("retrieve"),$infinite_isotope.infinitescroll("pause")})}}}},onLayout=function(isotopeObj,startIndex,needsReload){var needsReload=needsReload?!0:!1;typeof UNCODE.bigText!="undefined"&&UNCODE.bigText(),isotopeObj.css("opacity",1),isotopeObj.closest(".isotope-system").find(".isotope-footer").css("opacity",1),requestTimeout(function(){startIndex>0?(reloadIsotope(isotopeObj),SiteParameters.dynamic_srcset_active==="1"&&(UNCODE.refresh_dynamic_srcset_size(isotopeObj),UNCODE.adaptive_srcset(isotopeObj))):needsReload&&reloadIsotope(isotopeObj),UNCODE.adaptive(),SiteParameters.dynamic_srcset_active==="1"&&startIndex===0&&UNCODE.refresh_dynamic_srcset_size(isotopeObj),typeof MediaElement=="function"&&$(isotopeObj).find("audio,video").each(function(){$(this).mediaelementplayer({pauseOtherPlayers:!1})}),$(isotopeObj).find(".nested-carousel").length?(typeof UNCODE.carousel!="undefined"&&UNCODE.carousel($(isotopeObj).find(".nested-carousel")),requestTimeout(function(){boxAnimation($(".tmb-iso",isotopeObj),startIndex,!0,isotopeObj)},200)):boxAnimation($(".tmb-iso",isotopeObj),startIndex,!0,isotopeObj),isotopeObj.trigger("isotope-layout-complete")},100)},boxAnimation=function(items,startIndex,sequential,container){var $allItems=items.length-startIndex,showed=0,index=0;if(container.closest(".owl-item").length==1)return!1;$.each(items,function(index,val){var $this=$(val),elInner=$("> .t-inside",val);if(UNCODE.isUnmodalOpen&&!val.closest("#unmodal-content"))return;val[0]&&(val=val[0]),elInner.hasClass("animate_when_almost_visible")&&!elInner.hasClass("force-anim")?new Waypoint({context:UNCODE.isUnmodalOpen?document.getElementById("unmodal-content"):window,element:val,handler:function(){var element=$("> .t-inside",this.element),parent=$(this.element),currentIndex=parent.index(),delay=sequential?startIndex!==0?currentIndex-$allItems:currentIndex:index,delayAttr=parseInt(element.attr("data-delay"));isNaN(delayAttr)&&(delayAttr=100),delay-=showed;var objTimeout=requestTimeout(function(){element.removeClass("zoom-reverse").addClass("start_animation"),showed=parent.index(),container.data("isotope")&&container.isotope("layout")},delay*delayAttr);parent.data("objTimeout",objTimeout),UNCODE.isUnmodalOpen||this.destroy()},offset:"100%"}):(elInner.hasClass("force-anim")?elInner.addClass("start_animation"):elInner.css("opacity",1),container.isotope("layout")),index++})},reloadIsotope=function(isotopeObj){var isoIndex=$(isotopeObj).attr("data-iso-index"),$layoutMode=$(isotopeObj).data("layout");$layoutMode===undefined&&($layoutMode="masonry"),isotopeObj.data("isotope")&&isotopeObj.isotope({itemSelector:$itemSelector,layoutMode:$layoutMode,transitionDuration:transitionDuration[isoIndex],masonry:{columnWidth:colWidth(isoIndex)},vertical:{horizontalAlignment:.5},sortBy:"original-order",isOriginLeft:isOriginLeft})};$(".isotope-pagination").length>0&&$(".isotope-system").on("click",".pagination a",function(evt){evt.preventDefault();if(SiteParameters.index_pagination_disable_scroll!=="1"){var filterContainer=$(this).closest(".isotope-system").find(".isotope-filters"),container=$(this).closest(".isotope-system"),calc_scroll=SiteParameters.index_pagination_scroll_to!=0?eval(SiteParameters.index_pagination_scroll_to):container.closest(".row-parent").offset().top;calc_scroll-=UNCODE.get_scroll_offset();var menu_container=$(".menu-sticky"),menu=menu_container.find(".menu-container");menu_container.length>0&&menu.length>0&&(calc_scroll-=menu.outerHeight());var bodyTop=document.documentElement.scrollTop||document.body.scrollTop,delta=bodyTop-calc_scroll,scrollSpeed=SiteParameters.constant_scroll=="on"?Math.abs(delta)/parseFloat(SiteParameters.scroll_speed):SiteParameters.scroll_speed;scrollSpeed<1e3&&SiteParameters.constant_scroll=="on"&&(scrollSpeed=1e3),UNCODE.isFullPage||(scrollSpeed==0?$("html, body").scrollTop(calc_scroll):$("html, body").animate({scrollTop:calc_scroll},{easing:"easeInOutQuad",duration:scrollSpeed,complete:function(){UNCODE.scrolling=!1}}))}loadIsotope($(this),!0)}),$filters.on("click","a.isotope-nav-link",function(evt){if($(this).hasClass("no-isotope-filter"))return;var $filter=$(this),filterContainer=$filter.closest(".isotope-filters"),filterValue=$filter.attr("data-filter"),container=$filter.closest(".isotope-system").find($(".isotope-layout")),transitionDuration=container.data().isotope.options.transitionDuration,delay=300,filterItems=[],filter_items=function(){filterValue!==undefined?(container.addClass("grid-filtering"),$.each($("> .tmb-iso > .t-inside",container),function(index,val){var parent=$(val).parent(),objTimeout=parent.data("objTimeout");objTimeout&&($(val).removeClass("zoom-reverse").removeClass("start_animation"),clearRequestTimeout(objTimeout)),transitionDuration==0&&($(val).hasClass("animate_when_almost_visible")?$(val).addClass("zoom-reverse").removeClass("start_animation"):$(val).addClass("animate_when_almost_visible zoom-reverse zoom-anim force-anim"))}),requestTimeout(function(){filterValue=="*"?container.removeClass("isotope-filtered"):container.addClass("isotope-filtered"),container.isotope({filter:function(){var block=$(this),filterable=filterValue=="*"||block.hasClass(filterValue),lightboxElements=$("[data-lbox^=ilightbox]",block);return filterable?(lightboxElements.length&&(lightboxElements.removeClass("lb-disabled"),container.data("lbox",$(lightboxElements[0]).data("lbox"))),filterItems.push(block)):lightboxElements.length&&lightboxElements.addClass("lb-disabled"),container.trigger("more-items-loaded"),$(window).trigger("more-items-loaded"),window.dispatchEvent(new CustomEvent("uncode-more-items-loaded")),filterable}}),$(".t-inside.zoom-reverse",container).removeClass("zoom-reverse")},delay),container.isotope("once","arrangeComplete",function(){if(typeof UNCODE.lightbox!="undefined"&&!SiteParameters.lbox_enhanced){var getLightbox=UNCODE.lightboxArray[container.data("lbox")];typeof getLightbox=="object"?getLightbox.refresh():UNCODE.lightbox()}transitionDuration==0&&requestTimeout(function(){boxAnimation(filterItems,0,!1,container)},100),requestTimeout(function(){Waypoint.refreshAll(),container.removeClass("grid-filtering")},2e3)})):(typeof UNCODE.lightbox!="undefined"&&!SiteParameters.lbox_enhanced&&$.each(UNCODE.lightboxArray,function(index,val){UNCODE.lightboxArray[index].destroy()}),$.each($("> .tmb-iso > .t-inside",container),function(index,val){var parent=$(val).parent(),objTimeout=parent.data("objTimeout");objTimeout&&($(val).removeClass("zoom-reverse").removeClass("start_animation"),clearRequestTimeout(objTimeout)),transitionDuration==0&&($(val).hasClass("animate_when_almost_visible")?$(val).addClass("zoom-reverse").removeClass("start_animation"):$(val).addClass("animate_when_almost_visible zoom-reverse zoom-anim force-anim"))}),container.parent().addClass("grid-loading"),loadIsotope($filter))};if(!$filter.hasClass("active"))if(filterContainer.hasClass("filter-scroll")){var calc_scroll=SiteParameters.index_pagination_scroll_to!=0?eval(SiteParameters.index_pagination_scroll_to):container.closest(".row-parent").offset().top;calc_scroll-=UNCODE.get_scroll_offset();var bodyTop=document.documentElement.scrollTop||document.body.scrollTop,delta=bodyTop-calc_scroll,scrollSpeed=SiteParameters.constant_scroll=="on"?Math.abs(delta)/parseFloat(SiteParameters.scroll_speed):SiteParameters.scroll_speed,filterTolerance=!1,filter_timeout;scrollSpeed<1e3&&SiteParameters.constant_scroll=="on"&&(scrollSpeed=1e3),UNCODE.isFullPage||(scrollSpeed==0?($("html, body").scrollTop(calc_scroll),UNCODE.scrolling=!1,filter_items()):(bodyTop<=calc_scroll+20&&bodyTop>=calc_scroll-20&&(filter_items(),filterTolerance=!0),$("html, body").animate({scrollTop:calc_scroll},{easing:"easeInOutQuad",duration:scrollSpeed,complete:function(){UNCODE.scrolling=!1,filterTolerance||(filter_timeout=setTimeout(function(){clearTimeout(filter_timeout),filter_items()},200))}})))}else filter_items();evt.preventDefault()}),$(window).off("popstate.isotopegrid").on("popstate.isotopegrid",function(e){var params=UNCODE.getURLParams(window.location),old_params=UNCODE.getURLParams(UNCODE.lastURL,!0);UNCODE.lastURL=window.location.href;if(UNCODE.hasEqualURLParams(params,old_params)||$.isEmptyObject(params)&&$.isEmptyObject(old_params))return;params.id===undefined?$.each($(".isotope-system"),function(index,val){loadIsotope($(val))}):params.hasOwnProperty(SiteParameters.ajax_filter_key_unfilter)||loadIsotope($("#"+params.id))});var loadIsotope=function($href,$paginating){var is_paginating=!1;if(undefined!==$paginating&&$paginating)var is_paginating=$paginating;var href=$href.is("a")?$href.attr("href"):location,isotopeSystem=$href.is("a")?$href.closest($(".isotope-system")):$href,isotopeWrapper=isotopeSystem.find($(".isotope-wrapper")),isotopeFooter=isotopeSystem.find($(".isotope-footer-inner")),isotopeResultCount=isotopeSystem.find($(".woocommerce-result-count-wrapper")),isotopeContainer=isotopeSystem.find($(".isotope-layout")),isotopeId=isotopeSystem.attr("id");$href.is("a")&&!isotopeSystem.hasClass("un-no-history")&&(UNCODE.lastURL=href,history.pushState({myIsotope:!0},document.title,href)),is_paginating&&isotopeWrapper.addClass("grid-filtering"),$.ajax({url:href}).done(function(data){var $resultItems=$(data).find("#"+isotopeId+" .isotope-layout").html(),$resultPagination=$(data).find("#"+isotopeId+" .pagination")[0],$resultCount=$(data).find("#"+isotopeId+" .woocommerce-result-count")[0];isotopeWrapper.addClass("isotope-reloaded"),requestTimeout(function(){isotopeWrapper.removeClass("grid-loading"),isotopeWrapper.removeClass("isotope-reloaded"),isotopeWrapper.removeClass("grid-filtering")},500),$.each($("> .tmb > .t-inside",isotopeContainer),function(index,val){var parent=$(val).parent(),objTimeout=parent.data("objTimeout");objTimeout&&($(val).removeClass("zoom-reverse").removeClass("start_animation"),clearRequestTimeout(objTimeout)),$(val).hasClass("animate_when_almost_visible")?$(val).addClass("zoom-reverse").removeClass("start_animation"):$(val).addClass("animate_when_almost_visible zoom-reverse zoom-in force-anim")}),requestTimeout(function(){if(isotopeContainer.data("isotope")){isotopeContainer.html($resultItems).children(".tmb").addClass("tmb-iso"),isotopeContainer.isotope("reloadItems",onLayout(isotopeContainer,0,!0)),UNCODE.adaptive(),SiteParameters.dynamic_srcset_active==="1"&&UNCODE.adaptive_srcset(isotopeContainer);if(typeof UNCODE.lightbox!="undefined"&&!SiteParameters.lbox_enhanced){var getLightbox=UNCODE.lightboxArray["ilightbox_"+isotopeContainer.closest(".isotope-system").attr("id")];typeof getLightbox=="object"?getLightbox.refresh():UNCODE.lightbox()}}isotopeContainer.trigger("more-items-loaded"),$(window).trigger("more-items-loaded"),window.dispatchEvent(new CustomEvent("uncode-more-items-loaded"))},300),$(".pagination",isotopeFooter).remove(),isotopeFooter.append($resultPagination),isotopeResultCount.length>0&&($(".woocommerce-result-count",isotopeResultCount).remove(),isotopeResultCount.append($resultCount))})};$filters.each(function(i,buttonGroup){var $buttonGroup=$(buttonGroup);$buttonGroup.on("click","a:not(.no-isotope-filter)",function(){$buttonGroup.find(".active").removeClass("active"),$(this).addClass("active")});var $cats_mobile_trigger=$(".menu-smart--filter-cats_mobile-toggle-trigger",$buttonGroup),$cats_mobile_toggle=$(".menu-smart--filter-cats_mobile-toggle",$buttonGroup),$cats_filters=$(".menu-smart--filter-cats",$buttonGroup);$buttonGroup.on("click","a.menu-smart--filter-cats_mobile-toggle-trigger",function(e){e.preventDefault(),$cats_filters.slideToggle(400,"easeInOutCirc")})}),window.addEventListener("boxResized",function(e){if(UNCODE.printDialogOpen!==!1)return!1;$.each($(".isotope-layout"),function(index,val){var $layoutMode=$(this).data("layout");$layoutMode===undefined&&($layoutMode="masonry"),$(this).data("isotope")&&($(this).isotope({itemSelector:$itemSelector,layoutMode:$layoutMode,transitionDuration:transitionDuration[index],masonry:{columnWidth:colWidth(index)},vertical:{horizontalAlignment:.5},sortBy:"original-order",isOriginLeft:isOriginLeft}),$(this).isotope("unbindResize"),SiteParameters.dynamic_srcset_active==="1"&&UNCODE.refresh_dynamic_srcset_size($(this))),$(this).find(".mejs-video,.mejs-audio").each(function(){$(this).trigger("resize")})})},!1),init_isotope()}},UNCODE.lightbox=function(){if(SiteParameters.lbox_enhanced)return!0;UNCODE.lightboxArray={},requestTimeout(function(){var groupsArr={};$("[data-lbox^=ilightbox]:not(.lb-disabled):not([data-lbox-init]), .uncode-lbox:not(.lb-disabled):not([data-lbox-init])").each(function(){var group=this.getAttribute("data-lbox"),values=$(this).data();$(this).attr("data-lbox-init","true"),groupsArr[group]=values});for(var i in groupsArr){var skin=groupsArr[i].skin||"black",path=groupsArr[i].dir||"horizontal",thumbs=!groupsArr[i].notmb||!1,arrows=!groupsArr[i].noarr||!1,social=groupsArr[i].social||!1,deeplink=groupsArr[i].deep||!1,$els=$('[data-lbox="'+i+'"]:not(.lb-disabled), .uncode-lbox:not(.lb-disabled)'),counter=$els.length,dataAlbum=$els.attr("data-album");social&&(social={facebook:!0,twitter:!0,reddit:!0,digg:!0}),UNCODE.lightboxArray[i]=$els.iLightBox({selector:'[data-lbox="'+i+'"]:not(.lb-disabled), .uncode-lbox:not(.lb-disabled)',skin:skin,path:path,linkId:deeplink,infinite:!1,smartRecognition:!1,fullAlone:!0,maxScale:1,minScale:.02,overlay:{opacity:.94},controls:{arrows:counter>1||typeof dataAlbum!="undefined"?arrows:!1,fullscreen:!0,thumbnail:thumbs,slideshow:counter>1||typeof dataAlbum!="undefined"?!0:!1},show:{speed:200},hide:{speed:200},social:{start:!1,buttons:social},caption:{start:!1},styles:{nextOpacity:1,nextScale:1,prevOpacity:1,prevScale:1},effects:{switchSpeed:400},slideshow:{pauseTime:5e3},thumbnails:{maxWidth:60,maxHeight:60,activeOpacity:.2},html5video:{preload:!0},callback:{onOpen:function(){$(window).trigger("uncode-custom-cursor"),$("body").hasClass("ilb-no-bounce")&&typeof iNoBounce!="undefined"&&iNoBounce.enable()},onHide:function(){$("body").hasClass("ilb-no-bounce")&&typeof iNoBounce!="undefined"&&iNoBounce.disable()}}}),$(document).on("infinite-loaded",function(){UNCODE.lightboxArray[i].refresh()}),$(window).on("gdprOpen",function(){UNCODE.lightboxArray[i].close()})}},100),$(document).on("click",".lb-disabled",function(e){e.preventDefault()})},UNCODE.lightgallery=function($el){var createSelectors=function(){$("a[data-lbox]:not([data-lbox-init]):not([data-album])"+SiteParameters.uncode_lb_add_items).each(function(){!$(this).closest(".nested-carousel").length&&!$(this).closest(".owl-item.cloned").length&&!$(this).hasClass("lb-disabled")?$(this).addClass("lbox-trigger-item"):$(this).closest(".nested-carousel").length&&!$(this).closest(".owl-item.cloned").length&&!$(this).hasClass("lb-disabled")?$(this).addClass("lbox-nested-item"):($(this).removeClass("lbox-trigger-item"),$(this).removeClass("lbox-nested-item"))})};createSelectors();var galleries=[],nested_a=$("a[data-lbox]:not(.lb-disabled):not([data-lbox-init]):not([data-album])").filter(function(index){return!$(this).closest(".nested-carousel").length}),$_galleries=$(".isotope-container:not([data-lbox-init]), .owl-carousel:not([data-lbox-init]), .custom-grid-container:not([data-lbox-init]), .index-scroll-wrapper:not([data-lbox-init]), .justified-gallery:not([data-lbox-init]), .linear-container:not([data-lbox-init]), .uncode-single-media-wrapper:not([data-lbox-init]), .woocommerce-product-gallery:not([data-lbox-init]), .icon-box .icon-box-icon:not([data-lbox-init]), .icon-box .icon-box-content:not([data-lbox-init]), .grid-container:not([data-lbox-init]), .btn-container:not([data-lbox-init])"+SiteParameters.uncode_lb_add_galleries).has(".lbox-trigger-item").not(".isotope-container *, .owl-carousel *, .index-scroll-wrapper *, .justified-gallery *, .woocommerce-product-gallery *, .grid-container *, .linear-container *"),$galleries=$_galleries.filter(function(index){return!$(this).closest(".owl-carousel").length||$(this).is(".owl-carousel")}),$nested=$(".nested-carousel:not([data-lbox-init])").has(".lbox-nested-item");typeof $el=="undefined"&&($el=$galleries.add($nested));var $disabled=$("a.lb-disabled");$disabled.on("click",function(e){e.preventDefault()});var beforeSlide=function(event){var detail=event.detail,info=detail.info,item=detail.item,$slide=$(detail.currentSlide.selector),$video=$("video",$slide),$previous=$(detail.previousSlide.selector),$prevVideo=$("video",$previous),isAudio=!1;typeof info.src!="undefined"&&(isAudio=info.src.search(/.mp3|.m4a/i)>-1);if(!$video.length&&(info.video||isAudio)){if(info.video){if(typeof info.video=="object")var infoJson=info.video;else var infoJson=JSON.parse(info.video);var src=infoJson.source[0].src,autoplay=$(item).attr("data-autoplay")||event.target.autoplay===!0||$(item).closest("[data-lb-autoplay=yes]").length||$(event.target).attr("data-lb-autoplay")==="yes",muted=$(item).closest("[data-lb-muted=yes]").length||$(event.target).attr("data-lb-muted")==="yes",loop=$(item).attr("data-loop")}else if(isAudio)var src=info.src,autoplay=!0,loop=!1;if(typeof src!="undefined"){$slide.addClass("has-html5");var video=document.createElement("video");video.src=src,video.preload="auto",video.controls="controls",video.controlsList="nodownload",autoplay&&(video.autoplay="autoplay"),muted&&(video.muted="muted"),loop&&(video.loop="loop"),$(video).appendTo($slide)}}else{var $video=$("video",$slide);$video.length&&($video[0].currentTime=0,$video[0].autoplay&&$video[0].play())}$prevVideo.length&&($prevVideo[0].currentTime=0,$prevVideo[0].pause())},beforeOpen=function(event){var detail=event.detail,items=detail.items,galleryItems=detail.galleryItems,outer=detail.outer.selector,i,ii;for(i=0;i<galleryItems.length;i++){var item=galleryItems[i];(typeof item.video!="undefined"||item.oembed==="video")&&$(outer).find('.lg-thumb-item[data-lg-item-id="'+i+'"]').addClass("thumbnail-video")}for(ii=0;ii<items.length;ii++){var item=items[ii];$(item).attr("data-icon")==="video"&&$(outer).find('.lg-thumb-item[data-lg-item-id="'+ii+'"]').addClass("thumbnail-video")}},captionBuilder=function($el){$el.each(function(index,val){var $gallery=$(this).attr("data-lbox-init","true"),$_a=".lbox-trigger-item",$_nested_a=".lbox-nested-item";$gallery.find($_a,$_nested_a).each(function(){var $a=$(this),$img=$("img",$a).first(),imgw=$img.attr("data-width"),imgh=$img.attr("data-height"),caption=$a.attr("data-caption"),title=$a.attr("data-title");$img.length&&$img.attr("data-crop")!=1&&(typeof $img.attr("data-guid")!="undefined"&&$img.attr("data-guid")!==""?$a.attr("data-external-thumb-image",$img.attr("data-guid")):$img[0].src&&typeof $img.attr("data-srcset")=="undefined"&&$a.attr("data-external-thumb-image")==""&&$a.attr("data-external-thumb-image",$img[0].src)),typeof title!="undefined"&&title!==""?title="<h6>"+title+"</h6>":title="",typeof caption!="undefined"&&caption!==""&&(caption="<p>"+caption+"</p>",title+=caption),title!==""&&$a.attr("title",title),$img.attr("data-crop")!=1&&typeof imgw!="undefined"&&typeof imgh!="undefined"&&imgw!==""&&imgh!==""&&(typeof $a.attr("data-lg-size")=="undefined"||!$a.attr("data-lg-size"))&&$a.attr("data-lg-size",imgw+"-"+imgh)})})};captionBuilder($el),$el.each(function(index,val){var $gallery=$(this),$_a=".lbox-trigger-item",$_nested_a=".lbox-nested-item",$_first=$gallery.hasClass("nested-carousel")?$($_nested_a,$gallery).first():$($_a,$gallery).first(),galleryID=$_first.attr("data-lbox"),$_connected_a=$_a+'[data-lbox="'+galleryID+'"]',tmb=$_first.attr("data-notmb"),social=$_first.attr("data-social"),deep=$_first.attr("data-deep"),zoom=$_first.attr("data-zoom-origin"),actual=$_first.attr("data-actual-size"),download=$_first.attr("data-download"),controls=$_first.attr("data-arrows")!=="no",fullScreen=$_first.attr("data-full"),counter=$_first.attr("data-counter"),transition=typeof $_first.attr("data-transition")!="undefined"?$_first.attr("data-transition"):"lg-slide",containerClass=$_first.closest('[data-skin="white"]').length?"lg-light-skin":"",connect=$_first.attr("data-connect"),lgPlugins=[lgVideo],itemsLoadedTimeOut;typeof galleryID=="undefined"&&(galleryID=$gallery.attr("id")),containerClass+=$_first.attr("data-transparency")==="opaque"?" lg-opaque":"",containerClass+=controls&&$_first.attr("data-arrows-bg")==="semi-transparent"?" lg-semi-transparent-arrows":"",(typeof tmb=="undefined"||!tmb)&&lgPlugins.push(lgThumbnail),(typeof actual!="undefined"&&actual!=""||$gallery.is(".woocommerce-product-gallery"))&&lgPlugins.push(lgZoom),typeof deep!="undefined"&&deep!=""&&lgPlugins.push(lgHash),typeof fullScreen!="undefined"&&fullScreen!=""&&lgPlugins.push(lgFullscreen),social&&lgPlugins.push(lgShare);if(galleries.indexOf(galleryID)!==-1)return!0;galleries.push(galleryID);var $triggerGal=connect?$(".page-wrapper"):$gallery,$selector=$triggerGal.hasClass("nested-carousel")?$_nested_a:connect?$_connected_a:$_a,gallery=lightGallery($triggerGal[0],{addClass:containerClass,plugins:lgPlugins,mode:transition,selector:$selector,galleryId:galleryID,thumbnail:typeof tmb=="undefined"||!tmb,iframeWidth:"848px",iframeMaxWidth:"90%",iframeMaxHeight:"90%",exThumbImage:"data-external-thumb-image",loadYouTubeThumbnail:!1,autoplayVideoOnSlide:$gallery.attr("data-lb-autoplay")==="yes",pager:!1,startClass:"lg-start-opacity",zoomFromOrigin:zoom,controls:controls,download:typeof download!="undefined"&&download!="",thumbWidth:50,thumbHeight:"50px",counter:$triggerGal.find($selector).length>1?counter:!1,loadYouTubePoster:!1,enableDrag:$triggerGal.find($selector).length>1,mobileSettings:{showCloseIcon:$("body").hasClass("lightgallery-hide-close")?!1:!0}});$(".owl-item.cloned",$gallery).find(nested_a).on("click",function(e){e.preventDefault();var index=$(this).closest(".owl-item.cloned").attr("data-index");gallery.openGallery(index-1)}),$triggerGal.on("more-items-loaded",function(e,items){clearRequestTimeout(itemsLoadedTimeOut),itemsLoadedTimeOut=requestTimeout(function(){createSelectors(),captionBuilder($triggerGal),gallery.refresh()},100)}),$("body").hasClass("compose-mode")&&typeof window.parent.vc!="undefined"&&window.parent.vc.events.once("shortcodeView:beforeUpdate",function(model){$el=model.view.$el,$el.find($triggerGal).length&&gallery.destroy()}),$triggerGal[0].addEventListener("lgBeforeSlide",beforeSlide),$triggerGal[0].addEventListener("lgBeforeOpen",beforeOpen),$triggerGal[0].addEventListener("lgAfterOpen",function(){$(window).trigger("uncode-custom-cursor")})}),typeof $el!="undefined"&&($("a[data-album]:not([data-lbox-init])").each(function(index,val){var album=val,galleryID=index,$album=$(album),params=$album.attr("data-album"),tmb=$(val).attr("data-notmb"),social=$(val).attr("data-social"),deep=$(val).attr("data-deep"),actual=$(val).attr("data-actual-size"),download=$(val).attr("data-download"),controls=$(val).attr("data-arrows")!=="no",fullScreen=$(val).attr("data-full"),counter=$(val).attr("data-counter"),transition=typeof $(val).attr("data-transition")!="undefined"?$(val).attr("data-transition"):"lg-slide",containerClass=$(val).closest('[data-skin="white"]').length?"lg-light-skin":"",lgPlugins=[lgVideo];$(val).attr("data-lbox-init","true"),containerClass+=$(val).attr("data-transparency")==="opaque"?" lg-opaque":"",containerClass+=controls&&$(val).attr("data-arrows-bg")==="semi-transparent"?" lg-semi-transparent-arrows":"",(typeof tmb=="undefined"||!tmb)&&lgPlugins.push(lgThumbnail),typeof actual!="undefined"&&actual!=""&&lgPlugins.push(lgZoom),typeof deep!="undefined"&&deep!=""&&lgPlugins.push(lgHash),typeof fullScreen!="undefined"&&fullScreen!=""&&lgPlugins.push(lgFullscreen),social&&lgPlugins.push(lgShare);var gallery=window.lightGallery(album,{dynamic:!0,plugins:lgPlugins,dynamicEl:JSON.parse(params),galleryId:galleryID,addClass:containerClass,mode:transition,thumbnail:typeof tmb=="undefined"||!tmb,iframeWidth:"848px",iframeMaxWidth:"90%",iframeMaxHeight:"90%",loadYouTubeThumbnail:!1,autoplayVideoOnSlide:$album.attr("data-lb-autoplay")==="yes",pager:!1,startClass:"lg-start-opacity",zoomFromOrigin:!1,controls:controls,download:typeof download!="undefined"&&download!="",thumbWidth:50,thumbHeight:"50px",loadYouTubePoster:!1,counter:counter,exThumbImage:"data-external-thumb-image",loadYouTubePoster:!1,mobileSettings:{showCloseIcon:$("body").hasClass("lightgallery-hide-close")?!1:!0}});$album.on("click",function(){gallery.openGallery(0)}),album.addEventListener("lgBeforeSlide",beforeSlide),album.addEventListener("lgBeforeOpen",beforeOpen),album.addEventListener("lgAfterOpen",function(){$(window).trigger("uncode-custom-cursor")}),$("body").hasClass("compose-mode")&&typeof window.parent.vc!="undefined"&&window.parent.vc.events.once("shortcodeView:beforeUpdate",function(model){$el=model.view.$el,$el.find($album).length&&gallery.destroy()})}),$(".uncode-lbox:not(.lb-disabled):not([data-lbox-init])").each(function(index,val){var gallery=lightGallery($(".page-wrapper")[0],{selector:".uncode-lbox:not(.lb-disabled):not([data-lbox-init])",iframeWidth:"848px",iframeMaxWidth:"90%",iframeMaxHeight:"90%",loadYouTubeThumbnail:!1,startClass:"lg-start-opacity",thumbWidth:50,thumbHeight:"50px",download:!1,loadYouTubePoster:!1,counter:!1});$(".page-wrapper")[0].addEventListener("lgBeforeSlide",beforeSlide),$(".page-wrapper")[0].addEventListener("lgBeforeOpen",beforeOpen)}))},UNCODE.carousel=function(container){var $owlContainers=$(".owl-carousel-container",container);$owlContainers.each(function(){function firstLoaded(el,event){var el=$(el),uncode_slider=el.find(".uncode-slider");el.find(".owl-carousel").css("opacity",1),uncode_slider.addClass("slider-loaded"),typeof UNCODE.bigText!="undefined"&&UNCODE.bigText(el.find(".owl-item.active")),requestTimeout(function(){var lastDelayElems=animate_elems(el.find(".owl-item.index-active")),lastDelayThumb=animate_thumb(el.find(".owl-item.active .t-inside"),event);if(uncode_slider.length&&el.find(".owl-carousel").data("autoplay")){lastDelayElems==undefined&&(lastDelayElems=0),lastDelayThumb==undefined&&(lastDelayThumb=0);var maxDelay=Math.max(lastDelayElems,lastDelayThumb);$("> .owl-carousel",uncode_slider).trigger("stop.owl.autoplay"),requestTimeout(function(){$("> .owl-carousel",uncode_slider).trigger("play.owl.autoplay")},maxDelay)}},500)}function navHover(el){var $owlCont=el,$owlPrev=$owlCont.find(".owl-prev"),$owlNext=$owlCont.find(".owl-next"),$owlDots=$owlCont.find(".owl-dots-inside .owl-dots"),$owlPagination=$owlCont.next(),owlPrevW=$owlPrev.outerWidth(),owlNextW=$owlNext.outerWidth(),owlDotsH=$owlDots.innerHeight(),owlTime=400,owlNested=$owlCont.parent().parent().hasClass("nested-carousel");$("body").hasClass("rtl")?($owlPrev.css("margin-right",-owlPrevW),$owlNext.css("margin-left",-owlNextW)):($owlPrev.css("margin-left",-owlPrevW),$owlNext.css("margin-right",-owlNextW)),owlNested||$owlDots.css("bottom",-owlDotsH),$owlCont.mouseenter(function(){owlNested=$owlCont.parent().parent().hasClass("nested-carousel"),$owlPrev.add($owlNext).css({marginLeft:0,marginRight:0}),owlNested||$owlDots.css({opacity:1,bottom:0})}).mouseleave(function(){owlNested=$owlCont.parent().parent().hasClass("nested-carousel"),$("body").hasClass("rtl")?($owlPrev.css("margin-right",-owlPrevW),$owlNext.css("margin-left",-owlNextW)):($owlPrev.css("margin-left",-owlPrevW),$owlNext.css("margin-right",-owlNextW)),owlNested||$owlDots.css({opacity:1,bottom:-owlDotsH})})}function animate_elems($this){var lastDelay;return $.each($(".animate_when_almost_visible:not(.t-inside), .animate_inner_when_almost_visible:not(.t-inside), .animate_when_parent_almost_visible:not(.t-inside)",$this),function(index,val){var element=$(val),delayAttr=element.attr("data-delay"),$first_item=element.closest('.owl-item[data-index="1"]');if($first_item.length&&$first_item.attr("data-already-reached")!=="true"&&!$first_item.closest("#page-header").length)return!1;delayAttr==undefined&&(delayAttr=0),requestTimeout(function(){element.addClass("start_animation")},delayAttr),lastDelay=delayAttr}),lastDelay}function animate_thumb(items,event){var lastDelay,itemIndex,thiis=$(event.currentTarget),tempIndex=thiis.data("tempIndex")==undefined?$(".owl-item.active",thiis).first().index():thiis.data("tempIndex"),numActives=$(".owl-item.active",thiis).length,stagePadding=thiis.data("stagepadding");return stagePadding=stagePadding==undefined||stagePadding==0?!1:!0,thiis.data("tempIndex",event.item.index),$.each(items,function(index,val){var parent=$(val).closest(".owl-item");if(UNCODE.isUnmodalOpen&&!val.closest("#unmodal-content"))return;if(!$(val).hasClass("start_animation"))if(parent.hasClass("active")||stagePadding||$owlWrapper.hasClass("carousel-animation-first"))var thumbInView=new Waypoint.Inview({context:UNCODE.isUnmodalOpen?document.getElementById("unmodal-content"):window,element:val,enter:function(direction){var element=$(this.element),delayAttr=parseInt(element.attr("data-delay")),itemIndex=element.closest(".owl-item").index()+1,diffItem=Math.abs(itemIndex-tempIndex)-1;itemIndex>tempIndex&&thiis.data("tempIndex",itemIndex),isNaN(delayAttr)&&(delayAttr=100);if(stagePadding){var objTimeout=requestTimeout(function(){element.addClass("start_animation")},index*delayAttr);lastDelay=index*delayAttr}else{$('.owl-item.cloned[data-index="'+element.closest(".owl-item").data("index")+'"] .t-inside',thiis).addClass("start_animation");var objTimeout=requestTimeout(function(){element.addClass("start_animation")},diffItem*delayAttr);lastDelay=diffItem*delayAttr}parent.data("objTimeout",objTimeout),UNCODE.isUnmodalOpen||this.destroy()}})}),lastDelay}function setItemsHeight(item){$.each($(".owl-item",item),function(index,val){var availableThumbHeight=$(".t-inside",$(val)).height(),innerThumbHeight=$(".t-entry-text-tc",$(val)).outerHeight(),difference=availableThumbHeight-innerThumbHeight;if($(".tmb-content-under",val).length){var visualPart=$(".t-entry-visual",val);visualPart.length&&(difference-=$(".t-entry-visual",val).height())}$(".tmb-content-lateral",val).length||$(".t-entry > *:last-child",val).css("transform","translateY("+difference+"px)")})}function setItemsRelHeight(item){$.each($(".owl-item",item),function(index,val){var $rowContainer=$(item).parents(".row-parent").eq(0),paddingRow=parseInt($rowContainer.css("padding-top"))+parseInt($rowContainer.css("padding-bottom")),$colContainer=$(item).parents(".uncell").eq(0),paddingCol=parseInt($colContainer.css("padding-top"))+parseInt($colContainer.css("padding-bottom")),winHeight=UNCODE.wheight,multiplier_h=parseInt($(item).attr("data-vp-height")),data_viewport_h,consider_menu=$(item).data("vp-menu");consider_menu&&(winHeight-=UNCODE.menuHeight),data_viewport_h=Math.ceil(winHeight/(100/multiplier_h))-(paddingRow+paddingCol),$(".t-inside",val).css("height",data_viewport_h)})}function pauseOnHover(slider){var $owlCustomNavSels=slider.closest(".row").find(".uncode-nav-dots, .uncode-nav-prev, .uncode-nav-next");$(".owl-dots, .owl-prev, .owl-next",slider).add($owlCustomNavSels).on({mouseenter:function(){$(slider).addClass("owl-mouseenter"),$(slider).trigger("stop.owl.autoplay")},mouseleave:function(){$(slider).removeClass("owl-mouseenter"),$(slider).trigger("play.owl.autoplay")}})}var $owlContainer=$(this),$owlWrapper=$owlContainer.closest(".owl-carousel-wrapper"),$owlSelector=$('> [class*="owl-carousel"]',$owlContainer),values={},tempTimeStamp,newWidth=UNCODE.wwidth,$owlInsideEqual=[];$owlSelector.each(function(){function manageFluidCarouseHeight(){clearRequestTimeout(setFluidResize),setFluidResize=requestTimeout(function(){if(UNCODE.wwidth>UNCODE.mediaQuery||UNCODE.wwidth<=UNCODE.mediaQuery&&newWidth!==UNCODE.wwidth)newWidth=UNCODE.wwidth,setItemsRelHeight($elSelector)},100)}var itemID=$(this).attr("id"),$elSelector=$(("#"+itemID).toString());values.id=itemID,values.items=1,values.columns=3,values.fade=!1,values.nav=!1,values.navmobile=!1,values.navskin="light",values.navspeed=400,values.dots=!1,values.dotsmobile=!1,values.loop=!1,values.autoplay=!1,values.timeout=3e3,values.autoheight=!1,values.stagepadding=0,values.margin=0,values.lg=1,values.md=1,values.sm=1,$.each($(this).data(),function(i,v){values[i]=v}),$(this).closest(".uncode-slider").length?(values.navskin="",values.navmobile=!1):values.navskin=" style-"+values.navskin+" style-override";var setIndexActive=function(event,init){var init=typeof init=="undefined"?!1:init,thiis=$(event.currentTarget);if(tempTimeStamp!=event.timeStamp&&(init||!UNCODE.isFullPage||UNCODE.isFullPage&&thiis.closest(".fp-section").hasClass("uncode-scroll-active")))var scrolltop=$(document).scrollTop(),size=event.page.size,i,setIndex=requestTimeout(function(){for(i=0;i<size;i++){var itemCont=event.item.index!=null?event.item.index+i:i,currentItem=thiis.find("> .owl-stage-outer > .owl-stage > .owl-item")[itemCont];if(thiis.closest(".row-slider").length){currentItem==undefined&&(currentItem=thiis.children()[i]),$(currentItem).closest("#page-header").length&&($(".row-container > .row > .row-inner > div > .style-dark",currentItem).closest(".uncode-slider").length?UNCODE.switchColorsMenu(scrolltop,"dark"):$(".row-container > .row > .row-inner > div > .style-light",currentItem).closest(".uncode-slider").length&&UNCODE.switchColorsMenu(scrolltop,"light"));var owlCustomNav=$elSelector.closest(".owl-carousel-wrapper-nav").find(".uncode-owl-nav-out.skin-inherit");owlCustomNav.length&&($(".row-container > .row > .row-inner > div > .style-dark",currentItem).closest(".uncode-slider").length?owlCustomNav.addClass("style-dark").removeClass("style-light"):$(".row-container > .row > .row-inner > div > .style-light",currentItem).closest(".uncode-slider").length&&owlCustomNav.addClass("style-light").removeClass("style-dark"))}var itendIndex=$(currentItem).attr("data-index");isNaN(itendIndex)&&(itendIndex=1),$elSelector.find(".owl-item:not(.new-indexed)").removeClass("index-active"),$elSelector.find('.owl-item[data-index="'+itendIndex+'"]').addClass("index-active").addClass("new-indexed"),$.fn.counterUp&&$elSelector.find('.owl-item[data-index="'+itendIndex+'"] .uncode-counter').each(function(){var $counter=$(this);$counter.addClass("started").counterUp({delay:10,time:1500})})}$elSelector.find(".owl-item.new-indexed").removeClass("new-indexed")},200);tempTimeStamp=event.timeStamp};$elSelector.on("initialize.owl.carousel",function(event){typeof UNCODE.owlNav!="undefined"&&UNCODE.owlNav(itemID,event),$("body").hasClass("compose-mode")&&typeof window.parent.vc!="undefined"&&(window.parent.vc.events.on("shortcodeView:beforeUpdate shortcodeView:destroy",function(model){var shortcode=model.attributes.shortcode,$el=model.view.$el,$row_wrap=$el.closest(".row");shortcode==="uncode_carousel_nav"&&typeof UNCODE.owlNav!="undefined"&&$row_wrap.find(".owl-carousel-wrapper-nav .uncode-owl-nav-out").remove()}),window.parent.vc.events.on("shortcodeView:updated",function(model){var shortcode=model.attributes.shortcode;shortcode==="uncode_carousel_nav"&&typeof UNCODE.owlNav!="undefined"&&(tempTimeStamp=Math.floor(Date.now()/1e3))}),window.parent.vc.events.on("shortcodeView:updated shortcodeView:ready",function(model){var shortcode=model.attributes.shortcode;shortcode==="uncode_carousel_nav"&&typeof UNCODE.owlNav!="undefined"&&(UNCODE.owlNav(itemID,event),$elSelector.trigger("refresh.owl.carousel"))}))}),$elSelector.on("initialized.owl.carousel",function(event){$(".isotope-container",event.currentTarget).length&&window.dispatchEvent(UNCODE.boxEvent),$(".owl-dot.active",$elSelector).on("click",function(){return!1});var thiis=$(event.currentTarget),time=thiis.data("timer-id"),rowParent=thiis.closest(".row-parent");typeof rowParent[0]!="undefined"&&rowParent[0].dispatchEvent(new CustomEvent("owl-carousel-initialized")),time&&clearRequestTimeout(time),thiis.addClass("showControls");var new_time=requestTimeout(function(){thiis.closest(".owl-carousel-container").removeClass("owl-carousel-loading"),thiis.hasClass("owl-height-viewport")&&setItemsRelHeight(thiis),thiis.hasClass("owl-height-equal")&&setItemsHeight(thiis),!UNCODE.isMobile&&!$elSelector.closest(".header-wrapper").length&&navHover($elSelector.parent()),thiis.closest(".unequal, .unexpand").length&&UNCODE.setRowHeight(rowParent[0],!0),SiteParameters.dynamic_srcset_active==="1"&&UNCODE.refresh_dynamic_srcset_size(thiis)},350);thiis.data("timer-id",new_time);var scrolltop=$(document).scrollTop();thiis.closest(".uncode-slider").find("video").removeAttr("poster"),$(window).on("load",function(){thiis.data("autoplay")&&(thiis.closest(".sticky-element").length?thiis.trigger("play.owl.autoplay"):thiis.trigger("stop.autoplay.owl"));if(UNCODE.isUnmodalOpen&&!thiis.closest("#unmodal-content"))return;if(!thiis.closest(".sticky-element").length)var carouselInView=new Waypoint.Inview({context:UNCODE.isUnmodalOpen?document.getElementById("unmodal-content"):window,element:thiis[0],exited:function(){var el=$(this.element);el.data("autoplay")&&(el.trigger("stop.owl.autoplay"),el.data("stopped","true"))},enter:function(direction){var el=$(this.element);requestTimeout(function(){el.data("autoplay")&&(el.trigger("play.owl.autoplay"),el.data("stopped","false"))},100)}});typeof window.lenis!="undefined"&&window.lenis!==null&&setTimeout(function(){window.lenis.resize()},1e3)}),thiis.closest(".isotope-system").length?requestTimeout(function(){thiis.closest(".isotope-container").isotope("layout")},400):requestTimeout(function(){animate_thumb($(".t-inside",el),event)},400);var currentItem=thiis.find("> .owl-stage-outer > .owl-stage > .owl-item")[event.item.index],currentIndex=$(currentItem).attr("data-index");$.each($(".owl-item:not(.active) .start_animation",$(event.target)),function(index,val){$(val).closest(".uncode-slider").length&&$(val).removeClass("start_animation")}),$.each($(".owl-item:not(.active) .already-animated",$(event.target)),function(index,val){$(val).closest(".uncode-slider").length&&$(val).removeClass("already-animated")}),$.each($('.owl-item:not(.active) [data-animated="yes"]',$(event.target)),function(index,val){$(val).closest(".uncode-slider").length&&$(val).removeAttr("data-animated")}),$.each($(".owl-item.cloned",thiis),function(index,val){$(".t-entry-visual-cont > a",$(val)).attr("data-lbox-clone",!0)}),$.each($(".owl-item:not(.active)",thiis),function(index,val){$(val).attr("data-index")!=currentIndex&&($(".start_animation:not(.t-inside)",val).removeClass("start_animation"),$(".already-animated:not(.t-inside)",val).removeClass("already-animated")),$(val).attr("data-index")!=currentIndex&&$('[data-animated="yes"]:not(.t-inside)',val).removeAttr("data-animated"),$(val).attr("data-index")==currentIndex&&$(".animate_when_almost_visible:not(.t-inside), .animate_inner_when_almost_visible:not(.t-inside)",val).addClass("start_animation")});if(thiis.closest(".uncode-slider").length){var el=thiis.closest(".row-parent")[0];$(el).data("imgready")?firstLoaded(el,event):el.addEventListener("imgLoaded",function(el){firstLoaded(el.target,event)},!1);var transHeight=$(".hmenu .menu-transparent.menu-primary .menu-container").height()-UNCODE.bodyBorder;transHeight!=null&&requestTimeout(function(){thiis.closest(".uncode-slider").find(".owl-prev, .owl-next").css("paddingTop",transHeight/2+"px")},100)}else{var el=thiis;el.closest(".uncode-slider").addClass("slider-loaded")}requestTimeout(function(){typeof UNCODE.bigText!="undefined"&&UNCODE.bigText(thiis),(thiis.closest(".uncode-slider").length||thiis.closest(".row").find(".uncode-owl-nav-in").length)&&thiis.data("autoplay")&&pauseOnHover(thiis)},500),thiis.closest(".unequal").length&&$owlInsideEqual.push(thiis.closest(".row-parent"));var containerClasses="",containerStyle="";$(".owl-dots-classes",$owlContainer).length&&(containerClasses=$(".owl-dots-classes",$owlContainer).attr("class"),containerStyle=$(".owl-dots-classes",$owlContainer).attr("style"),$(".owl-dots-classes",$owlContainer).remove()),containerClasses!==""&&requestTimeout(function(){containerClasses!==""&&$(".owl-dots",$owlContainer).attr("style",containerStyle),containerStyle!==""&&$(".owl-dots",$owlContainer).addClass(containerClasses)},100),$.each($(".column_child.pos-bottom",thiis),function(index,val){$(val).closest(".row-inner").css({"margin-top":"-1px"})}),$.fn.isotope&&thiis.closest(".isotope-container").length&&(thiis.closest(".isotope-container").data("isotope")&&requestTimeout(function(){thiis.closest(".isotope-container").isotope("layout")},300),$(window).on("load",function(){thiis.closest(".isotope-container").data("isotope")&&thiis.closest(".isotope-container").isotope("layout")})),thiis.data("autoplay")&&$(window).on("menuOpen",function(){thiis.trigger("stop.owl.autoplay"),thiis.data("stopped","true")}).on("menuClose",function(){}),$(window).on("menuClose",function(){thiis.data("autoplay")&&(thiis.trigger("play.owl.autoplay"),thiis.data("stopped","false"))}),setIndexActive(event,!0);var nested_a=$("a[data-lbox]:not(.lb-disabled):not([data-lbox-init]):not([data-album])").filter(function(index){return!$(this).closest(".nested-carousel").length}),$_galleries=$(".isotope-container:not([data-lbox-init]), .owl-carousel:not([data-lbox-init]), .custom-grid-container:not([data-lbox-init]), .index-scroll-wrapper:not([data-lbox-init]), .justified-gallery:not([data-lbox-init]), .uncode-single-media-wrapper:not([data-lbox-init]), .woocommerce-product-gallery:not([data-lbox-init]), .icon-box:not([data-lbox-init]), .grid-container:not([data-lbox-init])",thiis).has(nested_a),$galleries=$_galleries.filter(function(index){return!$(this).closest(".owl-carousel").length||$(this).is(".owl-carousel")});typeof UNCODE.lightgallery!="undefined"&&SiteParameters.lbox_enhanced&&UNCODE.lightgallery($galleries)}),$elSelector.on("resized.owl.carousel",function(event){var thiis=$(event.currentTarget);thiis.hasClass("owl-height-equal")&&setItemsHeight(thiis);if(UNCODE.wwidth>UNCODE.mediaQuery||UNCODE.wwidth<=UNCODE.mediaQuery&&newWidth!==UNCODE.wwidth)newWidth=UNCODE.wwidth,setItemsRelHeight($elSelector);setIndexActive(event),SiteParameters.dynamic_srcset_active==="1"&&UNCODE.refresh_dynamic_srcset_size(thiis),$.fn.isotope&&$(window).on("load",function(){$(event.currentTarget).closest(".isotope-container").data("isotope")&&$(event.currentTarget).closest(".isotope-container").isotope("layout")}),typeof window.lenis!="undefined"&&window.lenis!==null&&setTimeout(function(){window.lenis.resize()},1e3)}),$elSelector.on("refreshed.owl.carousel",function(event){setIndexActive(event)});var setFluidResize;window.addEventListener("resize",manageFluidCarouseHeight),$elSelector.on("change.owl.carousel",function(event){UNCODE.isMobile||UNCODE.owlStopVideo(event.currentTarget)}),$elSelector.on("changed.owl.carousel",function(event){var $row=$elSelector.parents(".row")[0];typeof $row!="undefined"&&$row.dispatchEvent(new CustomEvent("owl-carousel-changed")),setIndexActive(event)});var checkDrag=function(e){$elSelector.addClass("owl-dragging")};$elSelector.on("drag.owl.carousel",function(event){document.addEventListener("mousemove",checkDrag)}),$elSelector.on("dragged.owl.carousel",function(event){$elSelector.removeClass("owl-dragging"),document.removeEventListener("mousemove",checkDrag)}),$elSelector.on("translate.owl.carousel",function(event){UNCODE.isMobile&&$(event.currentTarget).addClass("owl-translating")}),$elSelector.on("translated.owl.carousel",function(event){var thiis=$(event.currentTarget),currentItem=thiis.find("> .owl-stage-outer > .owl-stage > .owl-item")[event.item.index],currentIndex=$(currentItem).attr("data-index"),stagePadding=thiis.data("stagepadding");stagePadding=stagePadding==undefined||stagePadding==0?!1:!0,UNCODE.isMobile||UNCODE.owlPlayVideo(thiis),requestTimeout(function(){var lastDelayElems=animate_elems($(".owl-item.index-active",thiis)),lastDelayThumb=animate_thumb($(".owl-item"+(stagePadding?"":".active")+" .t-inside",thiis),event);if(thiis.closest(".uncode-slider").length&&thiis.data("autoplay")){lastDelayElems==undefined&&(lastDelayElems=0),lastDelayThumb==undefined&&(lastDelayThumb=0);var maxDelay=Math.max(lastDelayElems,lastDelayThumb);thiis.trigger("stop.owl.autoplay"),requestTimeout(function(){!thiis.hasClass("owl-mouseenter")&&thiis.data("stopped")!="true"&&thiis.trigger("play.owl.autoplay")},maxDelay)}},200),$.each($(".owl-item:not(.active) .start_animation",$(event.target)),function(index,val){$(val).closest(".uncode-slider").length&&$(val).removeClass("start_animation")}),$.each($(".owl-item:not(.active) .already-animated",$(event.target)),function(index,val){$(val).closest(".uncode-slider").length&&$(val).removeClass("already-animated")}),$.each($('.owl-item:not(.active) [data-animated="yes"]',$(event.target)),function(index,val){$(val).closest(".uncode-slider").length&&$(val).removeAttr("data-animated")}),$.each($(".owl-item:not(.active)",thiis),function(index,val){$(val).attr("data-index")!=currentIndex&&($(".start_animation:not(.t-inside)",val).removeClass("start_animation"),$(".already-animated:not(.t-inside)",val).removeClass("already-animated")),$(val).attr("data-index")!=currentIndex&&$('[data-animated="yes"]:not(.t-inside)',val).removeClass("start_animation"),$(val).attr("data-index")==currentIndex&&$(".animate_when_almost_visible:not(.t-inside), .animate_inner_when_almost_visible:not(.t-inside)",val).addClass("start_animation")}),UNCODE.isMobile&&thiis.removeClass("owl-translating"),setIndexActive(event)}),UNCODE.wwidth<UNCODE.mediaQuery&&$(this).data("stagepadding")>25&&(values.stagepadding=25),$elSelector.not(".showControls").owlCarousel({items:values.items,animateIn:values["fade"]==1?"fadeIn":null,animateOut:values["fade"]==1?"fadeOut":null,nav:values.nav,dots:values.dots,loop:values.loop,stagePadding:values.stagepadding,margin:0,video:!0,autoWidth:!1,autoplay:!1,autoplayTimeout:values.timeout,autoplaySpeed:values.navspeed,autoplayHoverPause:$(this).closest(".uncode-slider").length?!1:!0,autoHeight:$(this).hasClass("owl-height-equal")?!1:values.autoheight,rtl:$("body").hasClass("rtl")?!0:!1,fluidSpeed:!0,navSpeed:values.navspeed,dotsSpeed:values.navspeed/values.items,navClass:["owl-prev"+values.navskin,"owl-next"+values.navskin],navText:['<div class="owl-nav-container btn-default btn-hover-nobg"><i class="fa fa-fw fa-angle-left"></i></div>','<div class="owl-nav-container btn-default btn-hover-nobg"><i class="fa fa-fw fa-angle-right"></i></div>'],navContainer:values.nav&&!SiteParameters.is_frontend_editor?$elSelector:!1,responsiveClass:!0,responsiveBaseElement:".box-container",responsive:{0:{items:values.sm,nav:values.navmobile,dots:values.dotsmobile,dotsSpeed:values.navspeed/values.sm},480:{items:values.sm,nav:values.navmobile,dots:values.dotsmobile,dotsSpeed:values.navspeed/values.sm},570:{items:values.md,nav:values.navmobile,dots:values.dotsmobile,dotsSpeed:values.navspeed/values.md},960:{items:values.lg,dotsSpeed:values.navspeed/values.lg}}});var transDuration=parseFloat(values.navspeed)*.3,transDuration2=parseFloat(values.navspeed)*.8;$(".owl-item .tmb",$elSelector).css({"-webkit-transition-delay":transDuration+"ms","-moz-transition-delay":transDuration+"ms","-o-transition-delay":transDuration+"ms","transition-delay":transDuration+"ms","-webkit-transition-duration":transDuration2+"ms","-moz-transition-duration":transDuration2+"ms","-o-transition-duration":transDuration2+"ms","transition-duration":transDuration2+"ms"}),requestTimeout(function(){for(var i=$owlInsideEqual.length-1;i>=0;i--)UNCODE.setRowHeight($owlInsideEqual[i])},300),$(window).on("load",function(){var $elCarousel=$elSelector.data("owl.carousel");if(typeof $elCarousel!="undefined"){$elCarousel.trigger("refreshed");for(var i=$owlInsideEqual.length-1;i>=0;i--)UNCODE.setRowHeight($owlInsideEqual[i])}}),$(document.body).on("added-owl-item",function(e,carousel_id,$new_slide,randId){$("#"+carousel_id).data("added-id")!=randId&&($("#"+carousel_id).data("added-id",randId).trigger("add.owl.carousel",$new_slide).trigger("refresh.owl.carousel"),$("#"+carousel_id).find(".owl-item").each(function(){var $item=$(this),index=$item.index()+1;$item.attr("data-index",index)}))}),$("body").hasClass("compose-mode")&&typeof window.parent.vc!="undefined"&&window.parent.vc.events.on("removed-owl-item",function(carousel_id,item_index,randId){$("#"+carousel_id).data("added-id")!=randId&&($("#"+carousel_id).data("added-id",randId).trigger("remove.owl.carousel",[item_index-1]).trigger("refresh.owl.carousel"),$("#"+carousel_id).find(".owl-item").each(function(){var $item=$(this),index=$item.index()+1;$item.attr("data-index",index)}))})})})},UNCODE.owlPlayVideo=function(carousel){var player,iframe;$(".owl-item.active .uncode-video-container",carousel).each(function(index,val){var content=$(val).html();if(content==""){var getCloned=$('.owl-item:not(.active) .uncode-video-container[data-id="'+$(this).attr("data-id")+'"]').children().first().clone();$(val).append(getCloned)}if($(this).attr("data-provider")=="vimeo")iframe=$(this).find("iframe"),player=new Vimeo.Player(iframe[0]),player.play();else if($(this).attr("data-provider")=="youtube")youtubePlayers[$(this).attr("data-id")]!=undefined&&youtubePlayers[$(this).attr("data-id")].playVideo();else{var player=$(this).find("video");player.length&&($(this).find("video")[0].volume=0,$(this).find("video")[0].play(),$(val).css("opacity",1))}})},UNCODE.owlStopVideo=function(carousel){$(".owl-item .uncode-video-container",carousel).each(function(index,val){var player,iframe;if($(this).attr("data-provider")=="vimeo")iframe=$(this).find("iframe"),player=new Vimeo.Player(iframe[0]),player.pause();else if($(this).attr("data-provider")=="youtube")youtubePlayers[$(this).attr("data-id")]!=undefined&&youtubePlayers[$(this).attr("data-id")].pauseVideo();else{var player=$(this).find("video");player.length&&($(this).find("video")[0].volume=0,$(this).find("video")[0].play())}})},UNCODE.animations=function(){function animate_css_grids_on_load(){$(".cssgrid-system").each(function(){var grid=$(this),sequential=grid.hasClass("cssgrid-animate-sequential")?!0:!1;UNCODE.animate_css_grids(grid,grid.find(".tmb-grid"),0,sequential,!1)})}var runWaypoints_TO,runWaypoints_carousel_TO,runWaypoints_delay=0,highlightComplexFunc=function($wrap,ev){var $lines=$(".heading-line-wrap",$wrap),not_animate=!1;$wrap.data("animate")===!0&&(not_animate=!0);var $rotatingTxt=$(".uncode-rotating-text-start",$wrap);if($rotatingTxt.length&&$rotatingTxt.attr("data-animated")!=="true")return;$lines.each(function(_key,_value){var $line=$(_value),$inners=$(".split-word-inner",$line),$highlights=$(".heading-text-highlight-inner",$line),highlitInnerFunc=function(ev){var delay=0;$highlights.each(function(h_key,high){var $highlight=$(high),$split=$highlight.closest(".split-word:not(.uncode-rotating-span)"),$nextSplit=$split.nextUntil(),$next=$(".heading-text-highlight-inner",$nextSplit),countCh=$split.text().length;$highlight.css({"-webkit-transition-duration":30*countCh+"ms","-moz-transition-duration":30*countCh+"ms","-o-transition-duration":30*countCh+"ms","transition-duration":30*countCh+"ms"}),delay+=30*countCh,$next.css({"-webkit-transition-delay":delay+"ms","-moz-transition-delay":delay+"ms","-o-transition-delay":delay+"ms","transition-delay":delay+"ms"})}),$highlights.removeAttr("data-animated"),_key+1===$lines.length&&$wrap.data("animate",!0)};$('.heading-text-highlight-inner[data-animated="yes"]',$line).length&&(not_animate?($highlights.each(function(h_key,high){var $highlight=$(high);$highlight.css({"-webkit-transition-duration":"0ms","-moz-transition-duration":"0ms","-o-transition-duration":"0ms","transition-duration":"0ms"})}),$highlights.removeAttr("data-animated")):typeof ev!="undefined"&&ev.type==="defer-highlights"?highlitInnerFunc():$inners.last().one("webkitAnimationEnd oanimationend mozAnimationEnd msAnimationEnd animationEnd",highlitInnerFunc))})};$.each($(".header-content-inner"),function(index,val){var element=$(val),transition="";element.hasClass("top-t-bottom")&&(transition="top-t-bottom"),element.hasClass("bottom-t-top")&&(transition="bottom-t-top"),element.hasClass("left-t-right")&&(transition="left-t-right"),element.hasClass("right-t-left")&&(transition="right-t-left"),element.hasClass("zoom-in")&&(transition="zoom-in"),element.hasClass("zoom-out")&&(transition="zoom-out"),element.hasClass("alpha-anim")&&(transition="alpha-anim");if(transition!=""){$(val).removeClass(transition);var container=element,containerDelay=container.attr("data-delay"),containerSpeed=container.attr("data-speed"),items=$(".header-title > *, .post-info",container);$.each(items,function(index,val){var element=$(val),delayAttr=containerDelay!=undefined?containerDelay:400;element.hasClass("animate_when_almost_visible")||(delayAttr=Number(delayAttr)+400*index,containerSpeed!=undefined&&element.attr("data-speed",containerSpeed),element.addClass(transition+" animate_when_almost_visible").attr("data-delay",delayAttr))}),container.css("opacity",1)}}),window.waypoint_animation=function(ev){$.each($(".animate_when_almost_visible:not(.start_animation):not(.t-inside):not(.drop-image-separator), .index-scroll .animate_when_almost_visible, .tmb-media .animate_when_almost_visible:not(.start_animation), .animate_when_almost_visible.has-rotating-text, .custom-grid-container .animate_when_almost_visible:not(.start_animation)"),function(index,val){if($(val).hasClass("el-text-split")||($(val).closest(".unscroll-horizontal").length||$(val).closest(".index-scroll").length||$(val).closest(".tab-pane:not(.active)").length||$(val).closest(".panel:not(.active-group)").length)&&!SiteParameters.is_frontend_editor)return!0;if(UNCODE.isUnmodalOpen&&!val.closest("#unmodal-content"))return;var run=!0,$carousel=$(val).closest(".owl-carousel");$carousel.length&&(run=!1),run&&new Waypoint({context:UNCODE.isUnmodalOpen?document.getElementById("unmodal-content"):window,element:val,handler:function(){var element=$(this.element),index=element.index(),delayAttr=element.attr("data-delay");delayAttr==undefined&&(delayAttr=0),requestTimeout(function(){element.addClass("start_animation")},delayAttr),UNCODE.isUnmodalOpen||this.destroy()},offset:UNCODE.isFullPage?"100%":"90%"})}),$.each($(".animate_inner_when_almost_visible"),function(index,val){if(UNCODE.isUnmodalOpen&&!val.closest("#unmodal-content"))return;var run=!0,$carousel=$(val).closest(".owl-carousel");$carousel.length&&(run=!1),run&&new Waypoint({context:UNCODE.isUnmodalOpen?document.getElementById("unmodal-content"):window,element:val,handler:function(){var $element=$(this.element),$childs=$(".animate_when_parent_almost_visible",$element);$childs.each(function(key,el){var $child=$(el),delaySpeed=$child.attr("data-speed"),delayAttr=$child.attr("data-delay"),intervalAttr=$child.attr("data-interval");delayAttr==undefined&&(delayAttr=50*key),requestTimeout(function(){$child.addClass("start_animation"),$child.hasClass("anim-line-checker")&&$child.on("webkitAnimationEnd oanimationend mozAnimationEnd msAnimationEnd animationEnd",function(e){var $line=$child.closest(".heading-line-wrap")});var $wrapText=$child.closest(".animate_inner_when_almost_visible");highlightComplexFunc($wrapText,ev),$child.hasClass("anim-tot-checker")&&$child.on("webkitAnimationEnd oanimationend mozAnimationEnd msAnimationEnd animationEnd",function(e){$child.hasClass("anim-tot-checker")&&($wrapText.addClass("already-animated"),$element.trigger("already-animated"))})},delayAttr)}),$element.addClass("start_animation"),UNCODE.isUnmodalOpen||this.destroy()},offset:UNCODE.isFullPage?"100%":"90%"})})},window.waypoint_carousel_animation=function(ev){$.each($(".owl-carousel").find(".animate_when_almost_visible:not(.start_animation):not(.t-inside):not(.drop-image-separator), .tmb-media .animate_when_almost_visible:not(.start_animation)"),function(index,val){if($(val).hasClass("el-text-split"))return!0;if(UNCODE.isUnmodalOpen&&!val.closest("#unmodal-content"))return;var run=!0,$carousel=$(val).closest(".owl-carousel"),$first_item=$(val).closest('.owl-item[data-index="1"]'),$all_first=$('.owl-item[data-index="1"]',$carousel);(!$first_item.length||$first_item.attr("data-already-reached")==="true")&&$carousel.attr("data-front-edited")!=="true"&&(run=!1),run&&new Waypoint({context:UNCODE.isUnmodalOpen?document.getElementById("unmodal-content"):window,element:val,handler:function(){var element=$(this.element),index=element.index(),delayAttr=element.attr("data-delay");delayAttr==undefined&&(delayAttr=0),requestTimeout(function(){$first_item.length&&$first_item.attr("data-already-reached")!=="true"&&$all_first.attr("data-already-reached","true"),element.addClass("start_animation")},delayAttr),UNCODE.isUnmodalOpen||this.destroy()},offset:UNCODE.isFullPage?"100%":"90%"})}),$.each($(".owl-carousel").find(".animate_inner_when_almost_visible"),function(index,val){if(UNCODE.isUnmodalOpen&&!val.closest("#unmodal-content"))return;var run=!0,$carousel=$(val).closest(".owl-carousel"),$first_item=$(val).closest('.owl-item[data-index="1"]'),$all_first=$('.owl-item[data-index="1"]',$carousel);(!$first_item.length||$first_item.attr("data-already-reached")==="true")&&$carousel.attr("data-front-edited")!=="true"&&(run=!1),run&&new Waypoint({context:UNCODE.isUnmodalOpen?document.getElementById("unmodal-content"):window,element:val,handler:function(){var $element=$(this.element),$childs=$(".animate_when_parent_almost_visible",$element);$childs.each(function(key,el){var $child=$(el),delaySpeed=$child.attr("data-speed"),delayAttr=$child.attr("data-delay"),intervalAttr=$child.attr("data-interval");delayAttr==undefined&&(delayAttr=50*key),requestTimeout(function(){$first_item.length&&$first_item.attr("data-already-reached")!=="true"&&$all_first.attr("data-already-reached","true"),$child.addClass("start_animation"),$child.hasClass("anim-line-checker")&&$child.on("webkitAnimationEnd oanimationend mozAnimationEnd msAnimationEnd animationEnd",function(e){var $line=$child.closest(".heading-line-wrap")});var $wrapText=$child.closest(".animate_inner_when_almost_visible");highlightComplexFunc($wrapText,ev),$child.hasClass("anim-tot-checker")&&$child.on("webkitAnimationEnd oanimationend mozAnimationEnd msAnimationEnd animationEnd",function(e){$child.hasClass("anim-tot-checker")&&$wrapText.addClass("already-animated")})},delayAttr)}),$element.addClass("start_animation"),UNCODE.isUnmodalOpen||this.destroy()},offset:UNCODE.isFullPage?"100%":"90%"})})};var runWaypoints=function(ev){typeof runWaypoints_TO!="undefined"&&runWaypoints_TO!==""&&(runWaypoints_delay=400),clearRequestTimeout(runWaypoints_TO),runWaypoints_TO=requestTimeout(function(){window.waypoint_animation(ev)},runWaypoints_delay),clearRequestTimeout(runWaypoints_carousel_TO),runWaypoints_carousel_TO=requestTimeout(function(){window.waypoint_carousel_animation(ev)},400)};runWaypoints(),animate_css_grids_on_load(),$(document.body).on("uncode_waypoints defer-highlights",function(ev){runWaypoints(ev)}),$("body").hasClass("compose-mode")&&typeof window.parent.vc!="undefined"&&window.parent.vc.events.on("shortcodeView:updated",runWaypoints)},UNCODE.animate_css_grids=function(container,elements,startIndex,sequential,filtering){var $allItems=elements.length-startIndex,showed=0,index=0,use_index=!1;filtering&&(sequential&&(use_index=!0),sequential=!1),$.each(elements,function(index,val){var $this=$(val),elInner=$("> .t-inside",val);if(UNCODE.isUnmodalOpen&&!val.closest("#unmodal-content"))return;val[0]&&(val=val[0]),elInner.hasClass("animate_when_almost_visible")&&!elInner.hasClass("force-anim")&&new Waypoint({context:UNCODE.isUnmodalOpen?document.getElementById("unmodal-content"):window,element:val,handler:function(){var element=$("> .t-inside",this.element),parent=$(this.element),_index=use_index?index:0,delay=sequential?startIndex!==0?index-$allItems:index:_index,delayAttr=parseInt(element.attr("data-delay"));isNaN(delayAttr)&&(delayAttr=100);if(sequential||use_index)delay-=showed;var objTimeout=requestTimeout(function(){element.removeClass("zoom-reverse").addClass("start_animation"),showed=index},delay*delayAttr);parent.data("objTimeout",objTimeout),UNCODE.isUnmodalOpen||this.destroy()},offset:UNCODE.isFullPage?"100%":"90%"}),index++})},UNCODE.tapHover=function(){var $el=$("html.touch .tmb:not(.tmb-no-double-tap)").find(".t-entry-visual-cont > a, .drop-hover-link"),elClass="hover";$(window).on("click",function(){$el.removeClass(elClass)}),$el.on("click",function(e){e.stopPropagation();var link=$(this);if(!link.hasClass(elClass))return e.preventDefault(),link.addClass("hover"),$el.not(this).removeClass(elClass),!1})},UNCODE.onePage=function(isMobile){function init_onepage(){isSectionscroller&&!isMobile&&!$("body").hasClass("uncode-scroll-no-dots")&&!UNCODE.isFullPageSnap&&$("<ul class='onepage-pagination'></ul>").prependTo("body"),last=$(".onepage-pagination li").last().find("a").data("index"),$.each($('div[data-parent="true"]'),function(index,val){$(this).attr("data-section",index);if(isMobile)return;if(UNCODE.isUnmodalOpen&&!val.closest("#unmodal-content"))return;var sectionDown=new Waypoint({context:UNCODE.isUnmodalOpen?document.getElementById("unmodal-content"):window,element:val,handler:function(direction){direction=="down"&&changeMenuActive(this.element,index)},offset:function(){return 5+getOffset()}}),sectionUp=new Waypoint({context:UNCODE.isUnmodalOpen?document.getElementById("unmodal-content"):window,element:val,handler:function(direction){direction=="up"&&changeMenuActive(this.element,index)},offset:function(){return-5-getOffset()}});if(isSectionscroller){var label;$(this).attr("data-label")!=undefined?label=$(this).attr("data-label"):label="";var getName=$(this).attr("data-name");getName==undefined&&(getName=index),label!=""&&(isOnePage=!0,label='<span class="cd-label style-accent-bg border-accent-color">'+label+"</span>",$("ul.onepage-pagination").append("<li><a class='one-dot-link' data-index='"+index+"' href='#"+getName+"'><span class='cd-dot-cont'><span class='cd-dot'></span></span>"+label+"</a></li>"))}}),isSectionscroller&&$.each($("ul.onepage-pagination li"),function(index,val){var $this=$(val),$a=("a",$this);$a.on("click",function(evt){if($(".is-selected",$this).length)return!1;$("body").hasClass("uncode-scroll-no-history")&&evt.preventDefault(),Waypoint.refreshAll();var el=$("a",evt.currentTarget);current=lastScrolled=parseInt(el.attr("data-index")),lastScrolled+=1,scrollBody(current)})});var goToSection=parseInt(window.location.hash.replace(/[^\d.]/g,""));isNaN(goToSection)&&window.location.hash!=undefined&&window.location.hash!=""&&(goToSection=String(window.location.hash).replace(/^#/,""),goToSection=Number($('[data-name="'+goToSection+'"]').attr("data-section"))),typeof goToSection=="number"&&!isNaN(goToSection)&&!$("body").hasClass("uncode-no-hash-scroll")&&(current=lastScrolled=goToSection,$(window).on("load",function(){$(".owl-carousel").length?requestTimeout(function(){scrollBody(goToSection)},400):scrollBody(goToSection)}))}function changeMenuActive(section,index){current=lastScrolled=parseInt($(section).attr("data-section"));if(isOnePage){var newSection=$('.onepage-pagination li a[data-index="'+index+'"]');newSection.length&&($("ul.onepage-pagination li a").removeClass("is-selected"),newSection.addClass("is-selected"));var getName=$('[data-section="'+index+'"]').attr("data-name");getName!=undefined&&getName!==""&&$.each($(".menu-container .menu-item > a, .widget_nav_menu .menu-smart .menu-item > a"),function(i,val){var get_href=$(val).attr("href");get_href!=undefined&&get_href.substring(get_href.indexOf("#")+1)==getName&&($(val).closest(".menu-smart").find(".active").removeClass("active"),$(val).parent().addClass("active"))})}}var current=0,last=0,lastScrollTop=0,forceScroll=!1,lastScrolled=0,isSectionscroller=$(".main-onepage").length?!0:!1,isOnePage=!1,getOffset=function(){var calculateOffset=$(".menu-sticky .menu-container:not(.menu-hide):not(.vmenu-container)").length&&$(window).width()>UNCODE.mediaQuery?$(".menu-sticky .menu-container:not(.menu-hide):not(.vmenu-container").outerHeight():0;return calculateOffset};isMobile=SiteParameters.uncode_force_onepage_dots?!1:isMobile,isOnePage&&$(window).on("scroll",function(){var bodyTop=document.documentElement.scrollTop||document.body.scrollTop;if(bodyTop==0){$("ul.onepage-pagination li a").removeClass("is-selected"),$('.onepage-pagination li a[data-index="0"]').addClass("is-selected");var getName=$("[data-section=0]").attr("data-name");getName!=undefined&&getName!==""&&$.each($(".menu-container .menu-item > a"),function(i,val){var get_href=$(val).attr("href");get_href!=undefined&&get_href.substring(get_href.indexOf("#")+1)==getName&&($(val).closest("ul").find(".active").removeClass("active"),$(val).parent().addClass("active"))})}else if(window.innerHeight+bodyTop>=$(".box-container").height()){var lastSection=$('.onepage-pagination li a[data-index="'+last+'"]');lastSection.length&&($("ul.onepage-pagination li a").removeClass("is-selected"),lastSection.addClass("is-selected"))}});var scrollBody=function(index){$("ul.onepage-pagination li a").removeClass("is-selected"),$('.onepage-pagination li a[data-index="'+index+'"]').addClass("is-selected");var getSection=$("[data-section="+index+"]"),scrollTo;if(getSection==undefined)return;var body=$("html, body"),bodyTop=document.documentElement.scrollTop||document.body.scrollTop,delta=bodyTop-($('[data-section="'+index+'"]').length?$('[data-section="'+index+'"]').offset().top:0),getOffset=UNCODE.get_scroll_offset(index);if(typeof getSection.offset()=="undefined")return;scrollTo=getSection.offset().top;if(!($(".menu-desktop-transparent").length&&UNCODE.wwidth>UNCODE.mediaQuery)){var shrink=typeof $(".navbar-brand").data("padding-shrink")!="undefined"?$(".navbar-brand").data("padding-shrink")*2:36;$(".menu-sticky .menu-container:not(.menu-hide)").length&&$(".menu-shrink").length&&(scrollTo+=UNCODE.menuHeight-($(".navbar-brand").data("minheight")+shrink)),$(".menu-sticky .menu-container:not(.menu-hide)").length&&!$(".menu-shrink").length&&$(".body").hasClass("vmenu")?index===0?scrollTo=0:scrollTo-=$(".menu-sticky .menu-container").outerHeight():scrollTo-=getOffset}var scrollSpeed=SiteParameters.constant_scroll=="on"?Math.abs(delta)/parseFloat(SiteParameters.scroll_speed):SiteParameters.scroll_speed;scrollSpeed<1e3&&SiteParameters.constant_scroll=="on"&&(scrollSpeed=1e3),index!=0&&(UNCODE.scrolling=!0),scrollSpeed==0?(body.scrollTop(delta>0?scrollTo-.1:scrollTo),UNCODE.scrolling=!1):body.on("scroll wheel DOMMouseScroll mousewheel touchmove",function(){$(this).stop()}).animate({scrollTop:delta>0?scrollTo-.1:scrollTo},scrollSpeed,"easeInOutCubic",function(){$(this).off("scroll wheel DOMMouseScroll mousewheel touchmove"),UNCODE.scrolling=!1;if(scrollTo!=UNCODE.get_scroll_offset(index)&&!($(".menu-desktop-transparent").length&&UNCODE.wwidth>UNCODE.mediaQuery)&&!($(".menu-mobile-transparent").length&&UNCODE.wwidth<=UNCODE.mediaQueryMobile)||$(".menu-hided").length)scrollTo=getSection.offset().top,getOffset=UNCODE.get_scroll_offset(index),scrollTo-=getOffset,body.on("scroll wheel DOMMouseScroll mousewheel touchmove",function(){$(this).stop()}).animate({scrollTop:delta>0?scrollTo-.1:scrollTo},scrollSpeed,"easeInOutCubic",function(){$(this).off("scroll wheel DOMMouseScroll mousewheel touchmove"),UNCODE.scrolling=!1})})};init_onepage()},UNCODE.stickyElements=function(){var isMobile_wide=UNCODE.isMobile&&UNCODE.wwidth<1024;if(!isMobile_wide){var $pageHeader=$("#page-header"),$headerRow=$(".vc_row",$pageHeader),startSticky=!1;$headerRow.hasClass("sticky-element")&&($headerRow.removeClass("sticky-element"),$pageHeader.addClass("sticky-element"),startSticky=!0);var calculateOffset=function(el){var getRowPadding=$(el).hasClass("with-bg")?0:$(el).closest(".row-parent").css("padding-top"),sideOffset=getRowPadding!=undefined&&getRowPadding!=0?parseInt(getRowPadding.replace("px","")):0,shrink=typeof $(".navbar-brand").data("padding-shrink")!="undefined"?$(".navbar-brand").data("padding-shrink")*2:0,elTop=window.pageYOffset+el.getBoundingClientRect().top;return sideOffset+=UNCODE.bodyBorder,UNCODE.adminBarHeight>0&&(sideOffset+=UNCODE.adminBarHeight),$(".menu-sticky .menu-container:not(.menu-hide)").length&&elTop>sideOffset&&($(".menu-shrink").length?sideOffset+=parseFloat($(".navbar-brand").data("minheight"))+shrink:sideOffset+=$("body.hmenu-center").length?$("#masthead .menu-container").outerHeight():parseInt(UNCODE.menuMobileHeight)),sideOffset},initStickyElement=function($els){if($("body").hasClass("vc-safe-mode"))return!0;typeof $els=="undefined"&&($els=$(".sticky-element")),$.each($els,function(index,element){if($(element).closest(".tab-pane").length){var $paneParent=$(element).closest(".tab-pane");if(!$paneParent.hasClass("active"))return!0}$(element).stick_in_parent({sticky_class:"is_stucked",offset_top:calculateOffset(element),bottoming:!0,inner_scrolling:SiteParameters.sticky_elements==="on"})})},oldW=UNCODE.wwidth,oldH=UNCODE.wHeight;requestTimeout(function(){$(".sticky-element").length&&($(window).width()>UNCODE.mediaQuery&&(initStickyElement(),startSticky===!0&&$("#page-header").trigger("sticky_kit:recalc")),$(window).on("resize lateral_resize",function(event){if(oldW!==UNCODE.wwidth||oldH!==UNCODE.wHeight)$(".sticky-element").trigger("sticky_kit:detach"),$(window).width()>UNCODE.mediaQuery&&initStickyElement(),oldW=UNCODE.wwidth,oldH=UNCODE.wHeight}))},1e3),$(".sticky-element").length&&$(window).on("uncode_wc_variation_gallery_loaded",function(event){requestTimeout(function(){$(document.body).trigger("sticky_kit:recalc")},100)});var $panels=$(".panel-collapse");$panels.length&&$panels.each(function(){var $panel=$(this);$panel.on("shown.bs.collapse hidden.bs.collapse",function(){$(document.body).trigger("sticky_kit:recalc")})}),$(".nav-tabs a").on("shown.bs.tab",function(e){var $tabs=$(e.target).closest(".tab-container"),$panel=$(".tab-pane.active",$tabs),$els=$(e.target).nextAll(".sticky-element");$els.trigger("sticky_kit:detach"),initStickyElement($els)}),$(window).on("vc-safe-mode-on",function(){$(".sticky-element").trigger("sticky_kit:detach")}),$(window).on("vc-safe-mode-off",function(){initStickyElement()})}},UNCODE.twentytwenty=function(){if(!$(".twentytwenty-container").length)return;(function(fn){typeof define=="function"&&define.amd?define([],fn):typeof module!="undefined"&&module!==null&&module.exports?module.exports=fn:fn()})(function(){function createEvent(type){return new CustomEvent(type,eventOptions)}function getEvents(node){return node[eventsSymbol]||(node[eventsSymbol]={})}function on(node,types,fn,data,selector){function handler(e){fn(e,data)}types=types.split(rspaces);var events=getEvents(node),i=types.length,handlers,type;while(i--)type=types[i],handlers=events[type]||(events[type]=[]),handlers.push([fn,handler]),node.addEventListener(type,handler)}function off(node,types,fn,selector){types=types.split(rspaces);var events=getEvents(node),i=types.length,type,handlers,k;if(!events)return;while(i--){type=types[i],handlers=events[type];if(!handlers)continue;k=handlers.length;while(k--)handlers[k][0]===fn&&(node.removeEventListener(type,handlers[k][1]),handlers.splice(k,1))}}function trigger(node,type,properties){var event=createEvent(type);properties&&assign(event,properties),node.dispatchEvent(event)}function Timer(fn){function trigger(time){active?(callback(),requestFrame(trigger),running=!0,active=!1):running=!1}var callback=fn,active=!1,running=!1;this.kick=function(fn){active=!0,running||trigger()},this.end=function(fn){var cb=callback;if(!fn)return;running?(callback=active?function(){cb(),fn()}:fn,active=!0):fn()}}function noop(){}function preventDefault(e){e.preventDefault()}function isIgnoreTag(e){return!!ignoreTags[e.target.tagName.toLowerCase()]}function isPrimaryButton(e){return e.which===1&&!e.ctrlKey&&!e.altKey}function identifiedTouch(touchList,id){var i,l;if(touchList.identifiedTouch)return touchList.identifiedTouch(id);i=-1,l=touchList.length;while(++i<l)if(touchList[i].identifier===id)return touchList[i]}function changedTouch(e,data){var touch=identifiedTouch(e.changedTouches,data.identifier);if(!touch)return;if(touch.pageX===data.pageX&&touch.pageY===data.pageY)return;return touch}function mousedown(e){if(!isPrimaryButton(e))return;if(isIgnoreTag(e))return;on(document,mouseevents.move,mousemove,e),on(document,mouseevents.cancel,mouseend,e)}function mousemove(e,data){checkThreshold(e,data,e,removeMouse)}function mouseend(e,data){removeMouse()}function removeMouse(){off(document,mouseevents.move,mousemove),off(document,mouseevents.cancel,mouseend)}function touchstart(e){if(ignoreTags[e.target.tagName.toLowerCase()])return;var touch=e.changedTouches[0],data={target:touch.target,pageX:touch.pageX,pageY:touch.pageY,identifier:touch.identifier,touchmove:function(e,data){touchmove(e,data)},touchend:function(e,data){touchend(e,data)}};on(document,touchevents.move,data.touchmove,data),on(document,touchevents.cancel,data.touchend,data)}function touchmove(e,data){var touch=changedTouch(e,data);if(!touch)return;checkThreshold(e,data,touch,removeTouch)}function touchend(e,data){var touch=identifiedTouch(e.changedTouches,data.identifier);if(!touch)return;removeTouch(data)}function removeTouch(data){off(document,touchevents.move,data.touchmove),off(document,touchevents.cancel,data.touchend)}function checkThreshold(e,data,touch,fn){var distX=touch.pageX-data.pageX,distY=touch.pageY-data.pageY;if(distX*distX+distY*distY<threshold*threshold)return;triggerStart(e,data,touch,distX,distY,fn)}function triggerStart(e,data,touch,distX,distY,fn){var touches=e.targetTouches,time=e.timeStamp-data.timeStamp,template={altKey:e.altKey,ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,startX:data.pageX,startY:data.pageY,distX:distX,distY:distY,deltaX:distX,deltaY:distY,pageX:touch.pageX,pageY:touch.pageY,velocityX:distX/time,velocityY:distY/time,identifier:data.identifier,targetTouches:touches,finger:touches?touches.length:1,enableMove:function(){this.moveEnabled=!0,this.enableMove=noop,e.preventDefault()}};trigger(data.target,"movestart",template),fn(data)}function activeMousemove(e,data){var timer=data.timer;data.touch=e,data.timeStamp=e.timeStamp,timer.kick()}function activeMouseend(e,data){var target=data.target,event=data.event,timer=data.timer;removeActiveMouse(),endEvent(target,event,timer,function(){setTimeout(function(){off(target,"click",preventDefault)},0)})}function removeActiveMouse(){off(document,mouseevents.move,activeMousemove),off(document,mouseevents.end,activeMouseend)}function activeTouchmove(e,data){var event=data.event,timer=data.timer,touch=changedTouch(e,event);if(!touch)return;e.preventDefault(),event.targetTouches=e.targetTouches,data.touch=touch,data.timeStamp=e.timeStamp,timer.kick()}function activeTouchend(e,data){var target=data.target,event=data.event,timer=data.timer,touch=identifiedTouch(e.changedTouches,event.identifier);if(!touch)return;removeActiveTouch(data),endEvent(target,event,timer)}function removeActiveTouch(data){off(document,touchevents.move,data.activeTouchmove),off(document,touchevents.end,data.activeTouchend)}function updateEvent(event,touch,timeStamp){var time=timeStamp-event.timeStamp;event.distX=touch.pageX-event.startX,event.distY=touch.pageY-event.startY,event.deltaX=touch.pageX-event.pageX,event.deltaY=touch.pageY-event.pageY,event.velocityX=.3*event.velocityX+.7*event.deltaX/time,event.velocityY=.3*event.velocityY+.7*event.deltaY/time,event.pageX=touch.pageX,event.pageY=touch.pageY}function endEvent(target,event,timer,fn){timer.end(function(){return trigger(target,"moveend",event),fn&&fn()})}function movestart(e){function update(time){updateEvent(event,data.touch,data.timeStamp),trigger(data.target,"move",event)}if(e.defaultPrevented)return;if(!e.moveEnabled)return;var event={startX:e.startX,startY:e.startY,pageX:e.pageX,pageY:e.pageY,distX:e.distX,distY:e.distY,deltaX:e.deltaX,deltaY:e.deltaY,velocityX:e.velocityX,velocityY:e.velocityY,identifier:e.identifier,targetTouches:e.targetTouches,finger:e.finger},data={target:e.target,event:event,timer:new Timer(update),touch:undefined,timeStamp:e.timeStamp};e.identifier===undefined?(on(e.target,"click",preventDefault),on(document,mouseevents.move,activeMousemove,data),on(document,mouseevents.end,activeMouseend,data)):(data.activeTouchmove=function(e,data){activeTouchmove(e,data)},data.activeTouchend=function(e,data){activeTouchend(e,data)},on(document,touchevents.move,data.activeTouchmove,data),on(document,touchevents.end,data.activeTouchend,data))}function enableMove1(e){e.enableMove()}function enableMove2(e){e.enableMove()}function enableMove3(e){e.enableMove()}function add(handleObj){var handler=handleObj.handler;handleObj.handler=function(e){var i=properties.length,property;while(i--)property=properties[i],e[property]=e.originalEvent[property];handler.apply(this,arguments)}}var assign=Object.assign||window.jQuery&&jQuery.extend,threshold=8,requestFrame=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(fn,element){return window.setTimeout(function(){fn()},25)}}();(function(){function CustomEvent(event,params){params=params||{bubbles:!1,cancelable:!1,detail:undefined};var evt=document.createEvent("CustomEvent");return evt.initCustomEvent(event,params.bubbles,params.cancelable,params.detail),evt}if(typeof window.CustomEvent=="function")return!1;CustomEvent.prototype=window.Event.prototype,window.CustomEvent=CustomEvent})();var ignoreTags={textarea:!0,input:!0,select:!0,button:!0},mouseevents={move:"mousemove",cancel:"mouseup dragstart",end:"mouseup"},touchevents={move:"touchmove",cancel:"touchend",end:"touchend"},rspaces=/\s+/,eventOptions={bubbles:!0,cancelable:!0},eventsSymbol=typeof Symbol=="function"?Symbol("events"):{};on(document,"mousedown",mousedown),on(document,"touchstart",touchstart),on(document,"movestart",movestart);if(!window.jQuery)return;var properties="startX startY pageX pageY distX distY deltaX deltaY velocityX velocityY".split(" ");jQuery.event.special.movestart={setup:function(){return on(this,"movestart",enableMove1),!1},teardown:function(){return off(this,"movestart",enableMove1),!1},add:add},jQuery.event.special.move={setup:function(){return on(this,"movestart",enableMove2),!1},teardown:function(){return off(this,"movestart",enableMove2),!1},add:add},jQuery.event.special.moveend={setup:function(){return on(this,"movestart",enableMove3),!1},teardown:function(){return off(this,"movestart",enableMove3),!1},add:add}}),$.fn.twentytwenty=function(options){var options=$.extend({default_offset_pct:.5,orientation:"horizontal",before_label:"Before",after_label:"After",no_overlay:!1,move_slider_on_hover:!1,move_with_handle_only:!0,click_to_move:!1},options);return this.each(function(){var sliderPct=options.default_offset_pct,container=$(this),sliderOrientation=options.orientation,beforeDirection=sliderOrientation==="vertical"?"down":"left",afterDirection=sliderOrientation==="vertical"?"up":"right";container.wrap("<div class='twentytwenty-wrapper twentytwenty-"+sliderOrientation+"'></div>");if(!options.no_overlay){container.append("<div class='twentytwenty-overlay'></div>");var overlay=container.find(".twentytwenty-overlay");overlay.append("<div class='twentytwenty-before-label' data-content='"+options.before_label+"'></div>"),overlay.append("<div class='twentytwenty-after-label' data-content='"+options.after_label+"'></div>")}var beforeImg=container.find("img:first"),afterImg=container.find("img:last");container.append("<div class='twentytwenty-handle style-accent-bg border-accent-color'></div>");var slider=container.find(".twentytwenty-handle");slider.append("<span class='twentytwenty-"+beforeDirection+"-arrow'></span>"),slider.append("<span class='twentytwenty-"+afterDirection+"-arrow'></span>"),container.addClass("twentytwenty-container"),beforeImg.addClass("twentytwenty-before"),afterImg.addClass("twentytwenty-after");var calcOffset=function(dimensionPct){var w=beforeImg.width(),h=beforeImg.height();return{w:w+"px",h:h+"px",cw:dimensionPct*w+"px",ch:dimensionPct*h+"px"}},adjustContainer=function(offset){sliderOrientation==="vertical"?(beforeImg.css("clip","rect(0,"+offset.w+","+offset.ch+",0)"),afterImg.css("clip","rect("+offset.ch+","+offset.w+","+offset.h+",0)")):(beforeImg.css("clip","rect(0,"+offset.cw+","+offset.h+",0)"),afterImg.css("clip","rect(0,"+offset.w+","+offset.h+","+offset.cw+")")),container.css("height",offset.h)},adjustSlider=function(pct){var offset=calcOffset(pct);slider.css(sliderOrientation==="vertical"?"top":"left",sliderOrientation==="vertical"?offset.ch:offset.cw),adjustContainer(offset)},minMaxNumber=function(num,min,max){return Math.max(min,Math.min(max,num))},getSliderPercentage=function(positionX,positionY){var sliderPercentage=sliderOrientation==="vertical"?(positionY-offsetY)/imgHeight:(positionX-offsetX)/imgWidth;return minMaxNumber(sliderPercentage,0,1)};$(window).on("resize.twentytwenty",function(e){adjustSlider(sliderPct)});var offsetX=0,offsetY=0,imgWidth=0,imgHeight=0,onMoveStart=function(e){(e.distX>e.distY&&e.distX<-e.distY||e.distX<e.distY&&e.distX>-e.distY)&&sliderOrientation!=="vertical"?e.preventDefault():(e.distX<e.distY&&e.distX<-e.distY||e.distX>e.distY&&e.distX>-e.distY)&&sliderOrientation==="vertical"&&e.preventDefault(),container.addClass("active"),offsetX=container.offset().left,offsetY=container.offset().top,imgWidth=beforeImg.width(),imgHeight=beforeImg.height()},onMove=function(e){container.hasClass("active")&&(sliderPct=getSliderPercentage(e.pageX,e.pageY),adjustSlider(sliderPct))},onMoveEnd=function(){container.removeClass("active")},moveTarget=options.move_with_handle_only?slider:container;moveTarget.on("movestart",onMoveStart),moveTarget.on("move",onMove),moveTarget.on("moveend",onMoveEnd),options.move_slider_on_hover&&(container.on("mouseenter",onMoveStart),container.on("mousemove",onMove),container.on("mouseleave",onMoveEnd)),slider.on("touchmove",function(e){e.preventDefault()}),container.find("img").on("mousedown",function(event){event.preventDefault()}),options.click_to_move&&container.on("click",function(e){offsetX=container.offset().left,offsetY=container.offset().top,imgWidth=beforeImg.width(),imgHeight=beforeImg.height(),sliderPct=getSliderPercentage(e.pageX,e.pageY),adjustSlider(sliderPct)}),$(window).trigger("resize.twentytwenty")})},$(window).on("load",function(e){$(".twentytwenty-container").each(function(){var $container=$(this);$(".twentytwenty-wrapper",$container).length||$container.twentytwenty(),$("img",$container).on("async-done",function(){$(".twentytwenty-wrapper",$container).length||$container.twentytwenty()})})})},UNCODE.justifiedGallery=function(){var breakPointMe=function(val){val=parseInt(val);if(isNaN(val))return!1;if(val>=1500)return 1;if(val<1500&&val>=960)return 2;if(val<960&&val>=570)return 3;if(val<570)return 4},gutterByBreakpoint=function(bp,gutter){var ret;switch(gutter){case"no-gutter":ret=0;break;case"px-gutter":ret=1;break;case"half-gutter":ret=18;break;case"double-gutter":switch(bp){case 3:case 4:ret=36;break;default:ret=72}break;case"triple-gutter":switch(bp){case 3:case 4:ret=36;break;default:ret=108}break;case"quad-gutter":switch(bp){case 2:ret=108;break;case 3:ret=72;break;case 4:ret=36;break;default:ret=144}break;default:ret=36}return ret};if($(".justified-layout").length>0){var justifiedContainersArray=[],typeGridArray=[],layoutGridArray=[],transitionDuration=[],$filterItems=[],$filters=$(".justified-system .isotope-filters"),$itemSelector=".tmb",$items,itemMargin,correctionFactor=0,firstLoad=!0,isOriginLeft=$("body").hasClass("rtl")?!1:!0,prevW=breakPointMe(UNCODE.wwidth);$('[class*="justified-container"]').each(function(){var isoData=$(this).data();transitionDuration.push($(".t-inside.animate_when_almost_visible",this).length>0?0:"0.5s"),isoData.type=="metro"?typeGridArray.push(!0):typeGridArray.push(!1),isoData.layout!==undefined?layoutGridArray.push(isoData.layout):layoutGridArray.push("justified"),justifiedContainersArray.push($(this))});var init_justifiedGallery=function(){for(var i=0,len=justifiedContainersArray.length;i<len;i++){var justifiedSystem=$(justifiedContainersArray[i]).closest($(".justified-system")),justifiedId=justifiedSystem.attr("id"),$layoutMode=layoutGridArray[i],gutter=$(justifiedContainersArray[i]).data("gutter"),rowHeight=$(justifiedContainersArray[i]).data("row-height"),maxRowHeight=$(justifiedContainersArray[i]).data("max-row-height"),lastRow=$(justifiedContainersArray[i]).data("last-row"),margins;rowHeight=typeof rowHeight=="undefined"||rowHeight===""?250:parseFloat(rowHeight),maxRowHeight=typeof maxRowHeight=="undefined"||maxRowHeight===""?!1:parseFloat(maxRowHeight),lastRow=typeof lastRow=="undefined"||lastRow===""?"nojustify":lastRow,margins=gutterByBreakpoint(prevW,gutter),$(justifiedContainersArray[i]).justifiedGallery({rowHeight:rowHeight,maxRowHeight:maxRowHeight,margins:margins,cssAnimation:!0,lastRow:lastRow,waitThumbnailsLoad:!1}).one("jg.complete",function(){onLayout($(this),0)});if($(justifiedContainersArray[i]).hasClass("isotope-infinite")&&$.fn.infinitescroll){$(justifiedContainersArray[i]).infinitescroll({navSelector:"#"+justifiedId+" .loadmore-button",nextSelector:"#"+justifiedId+" .loadmore-button a",itemSelector:"#"+justifiedId+" .justified-layout .tmb, #"+justifiedId+" .isotope-filters li",animate:!1,behavior:"local",debug:!1,loading:{selector:"#"+justifiedId+".justified-system .justified-footer-inner",speed:0,finished:undefined,msg:$("#"+justifiedId+" .loadmore-button")},errorCallback:function(){var justified_system=$(this).closest(".justified-system");$(".loading-button",justified_system).hide(),$(".loadmore-button",justified_system).attr("style","display:none !important")}},function(newElements,opts){var $galleryJustified=$(this),justifiedId=$galleryJustified.closest(".justified-system").attr("id"),filters=new Array,$loading_button=$galleryJustified.closest(".justified-system").find(".loading-button"),$infinite_button=$galleryJustified.closest(".justified-system").find(".loadmore-button"),$numPages=$("a",$infinite_button).data("pages"),delay=300;$("a",$infinite_button).html($("a",$infinite_button).data("label")),$infinite_button.show(),$loading_button.hide(),$numPages!=undefined&&opts.state.currPage==$numPages&&$infinite_button.hide(),$("> li",$galleryJustified).remove(),$.each($(newElements),function(index,val){$(val).addClass("tmb-iso"),$(val).is("li")&&filters.push($(val)[0]),$(val).addClass("uncode-appended")}),newElements=newElements.filter(function(x){return filters.indexOf(x)<0}),$.each($(filters),function(index,val){$("#"+justifiedId+' a[data-filter="'+$("a",val).attr("data-filter")+'"]').length==0&&$("#"+justifiedId+" .isotope-filters ul").append($(val))}),$galleryJustified.justifiedGallery("norewind",onLayout($galleryJustified,newElements.length));if(typeof UNCODE.lightbox!="undefined"&&!SiteParameters.lbox_enhanced){var getLightbox=UNCODE.lightboxArray["ilightbox_"+justifiedId];typeof getLightbox=="object"?getLightbox.refresh():UNCODE.lightbox()}typeof twttr!="undefined"&&twttr.widgets.load(justifiedContainersArray[i]),requestTimeout(function(){$galleryJustified.trigger("more-items-loaded"),$(window).trigger("more-items-loaded"),window.dispatchEvent(new CustomEvent("uncode-more-items-loaded"))},1e3)});if($(justifiedContainersArray[i]).hasClass("isotope-infinite-button")){var $infinite_justified=$(justifiedContainersArray[i]),$infinite_button=$infinite_justified.closest(".justified-system").find(".loadmore-button a");$infinite_justified.infinitescroll("pause"),$infinite_button.on("click",function(event){typeof UNCODE.lightbox!="undefined"&&!SiteParameters.lbox_enhanced&&$.each(UNCODE.lightboxArray,function(index,val){UNCODE.lightboxArray[index].destroy()}),event.preventDefault();var $justified_system=$(event.target).closest(".justified-system"),$infinite_justified=$justified_system.find(".justified-container"),justifiedId=$justified_system.attr("id");$(event.currentTarget).html(SiteParameters.loading),$infinite_justified.infinitescroll("resume"),$infinite_justified.infinitescroll("retrieve"),$infinite_justified.infinitescroll("pause"),$infinite_justified.trigger("more-items-loaded"),$(window).trigger("more-items-loaded"),window.dispatchEvent(new CustomEvent("uncode-more-items-loaded"))})}}}},onLayout=function(justifiedObj,startIndex){justifiedObj.css("opacity",1),justifiedObj.closest(".justified-system").find(".justified-footer").css("opacity",1),$(".tmb",justifiedObj).addClass("justified-object-loaded"),requestTimeout(function(){UNCODE.adaptive(),SiteParameters.dynamic_srcset_active==="1"&&UNCODE.refresh_dynamic_srcset_size(justifiedObj),typeof MediaElement=="function"&&$(justifiedObj).find("audio,video").each(function(){$(this).mediaelementplayer({pauseOtherPlayers:!1})}),$(justifiedObj).find(".nested-carousel").length?(typeof UNCODE.carousel!="undefined"&&UNCODE.carousel($(justifiedObj).find(".nested-carousel")),requestTimeout(function(){boxAnimation($(".tmb",justifiedObj),startIndex,!0,justifiedObj),justifiedObj.addClass("justified-gallery-finished"),Waypoint.refreshAll()},200)):requestTimeout(function(){boxAnimation($(".tmb",justifiedObj),startIndex,!0,justifiedObj),justifiedObj.addClass("justified-gallery-finished"),Waypoint.refreshAll()},300)},100)},boxAnimation=function(items,startIndex,sequential,container){var $allItems=items.length-startIndex,showed=0,index=0;if(container.closest(".owl-item").length==1)return!1;$.each(items,function(index,val){var elInner=$("> .t-inside",val);if(UNCODE.isUnmodalOpen&&!val.closest("#unmodal-content"))return;val[0]&&(val=val[0]),elInner.hasClass("animate_when_almost_visible")&&!elInner.hasClass("force-anim")?new Waypoint({context:UNCODE.isUnmodalOpen?document.getElementById("unmodal-content"):window,element:val,handler:function(){var element=$("> .t-inside",this.element),parent=$(this.element),currentIndex=parent.index(),delay=sequential?startIndex!==0?currentIndex-$allItems:currentIndex:index,delayAttr=parseInt(element.attr("data-delay"));isNaN(delayAttr)&&(delayAttr=100),delay-=showed;var objTimeout=requestTimeout(function(){element.removeClass("zoom-reverse").addClass("start_animation"),showed=parent.index()},delay*delayAttr);parent.data("objTimeout",objTimeout),UNCODE.isUnmodalOpen||this.destroy()},offset:"100%"}):(elInner.removeClass("animate_when_almost_visible"),$(val).addClass("no-waypoint-animation")),index++})};$filters.on("click","a[data-filter]",function(evt){var $filter=$(this),filterContainer=$filter.closest(".isotope-filters"),filterValue=$filter.attr("data-filter"),container=$filter.closest(".justified-system").find($(".justified-layout")),lastRow=container.data("last-row"),transitionDuration=0,delay=300,filterItems=[];lastRow=typeof lastRow=="undefined"||lastRow===""?"nojustify":lastRow;var filter_items=function(){filterValue!==undefined?($.each($("> .tmb > .t-inside",container),function(index,val){var parent=$(val).parent(),objTimeout=parent.data("objTimeout");objTimeout&&($(val).removeClass("zoom-reverse"),clearRequestTimeout(objTimeout)),transitionDuration==0&&($(val).hasClass("animate_when_almost_visible")?$(val).addClass("zoom-reverse").removeClass("start_animation"):$(val).addClass("animate_when_almost_visible zoom-reverse zoom-anim force-anim"))}),requestTimeout(function(){var $block,selector,lightboxElements,$boxes;filterValue!==""&&filterValue!=="*"?($("[data-lbox^=ilightbox]",container).addClass("lb-disabled"),selector="."+filterValue,$.each($(selector,container),function(index,block){lightboxElements=$("[data-lbox^=ilightbox]",block),lightboxElements.length&&(lightboxElements.removeClass("lb-disabled"),container.data("lbox",$(lightboxElements[0]).data("lbox"))),filterItems.push(block)}),container.justifiedGallery({filter:selector,lastRow:"nojustify"})):(container.justifiedGallery({filter:!1,lastRow:lastRow}),$("[data-lbox^=ilightbox]",$block).removeClass("lb-disabled"),filterItems=$("> .tmb",container)),container.trigger("more-items-loaded"),$(window).trigger("more-items-loaded"),window.dispatchEvent(new CustomEvent("uncode-more-items-loaded")),$(".t-inside.zoom-reverse",container).removeClass("zoom-reverse");if(typeof UNCODE.lightbox!="undefined"&&!SiteParameters.lbox_enhanced){var getLightbox=UNCODE.lightboxArray[container.data("lbox")];typeof getLightbox=="object"?getLightbox.refresh():UNCODE.lightbox()}transitionDuration==0&&requestTimeout(function(){boxAnimation(filterItems,0,!1,container)},100),requestTimeout(function(){Waypoint.refreshAll(),container.trigger("more-items-loaded"),$(window).trigger("more-items-loaded"),window.dispatchEvent(new CustomEvent("uncode-more-items-loaded"))},2e3)},delay)):(typeof UNCODE.lightbox!="undefined"&&!SiteParameters.lbox_enhanced&&$.each(UNCODE.lightboxArray,function(index,val){UNCODE.lightboxArray[index].destroy()}),$.each($("> .tmb > .t-inside",container),function(index,val){var parent=$(val).parent(),objTimeout=parent.data("objTimeout");objTimeout&&($(val).removeClass("zoom-reverse").removeClass("start_animation"),clearRequestTimeout(objTimeout)),transitionDuration==0&&($(val).hasClass("animate_when_almost_visible")?$(val).addClass("zoom-reverse").removeClass("start_animation"):$(val).addClass("animate_when_almost_visible zoom-reverse zoom-anim force-anim"))}),typeof UNCODE.lightbox!="undefined"&&!SiteParameters.lbox_enhanced&&UNCODE.lightbox(),container.parent().addClass("justified-loading"),container.trigger("more-items-loaded"),$(window).trigger("more-items-loaded"),window.dispatchEvent(new CustomEvent("uncode-more-items-loaded")))};if(!$filter.hasClass("active"))if(filterContainer.hasClass("filter-scroll")){var calc_scroll=SiteParameters.index_pagination_scroll_to!=0?eval(SiteParameters.index_pagination_scroll_to):container.closest(".row-parent").offset().top;calc_scroll-=UNCODE.get_scroll_offset();var bodyTop=document.documentElement.scrollTop||document.body.scrollTop,delta=bodyTop-calc_scroll,scrollSpeed=SiteParameters.constant_scroll=="on"?Math.abs(delta)/parseFloat(SiteParameters.scroll_speed):SiteParameters.scroll_speed,filterTolerance=!1,filter_timeout;scrollSpeed<1e3&&SiteParameters.constant_scroll=="on"&&(scrollSpeed=1e3),UNCODE.isFullPage||(scrollSpeed==0?($("html, body").scrollTop(calc_scroll),UNCODE.scrolling=!1,filter_items()):(bodyTop<=calc_scroll+20&&bodyTop>=calc_scroll-20&&(filter_items(),filterTolerance=!0),$("html, body").animate({scrollTop:calc_scroll},{easing:"easeInOutQuad",duration:scrollSpeed,complete:function(){UNCODE.scrolling=!1,filterTolerance||(filter_timeout=setTimeout(function(){clearTimeout(filter_timeout),filter_items()},200))}})))}else filter_items();evt.preventDefault()}),$filters.each(function(i,buttonGroup){var $buttonGroup=$(buttonGroup);$buttonGroup.on("click","a",function(){$buttonGroup.find(".active").removeClass("active"),$(this).addClass("active")});var $cats_mobile_trigger=$(".menu-smart--filter-cats_mobile-toggle-trigger",$buttonGroup),$cats_mobile_toggle=$(".menu-smart--filter-cats_mobile-toggle",$buttonGroup),$cats_filters=$(".menu-smart--filter-cats",$buttonGroup);$buttonGroup.on("click","a.menu-smart--filter-cats_mobile-toggle-trigger",function(e){e.preventDefault(),$cats_filters.slideToggle(400,"easeInOutCirc")})}),window.addEventListener("boxResized",function(e){prevW!==breakPointMe(UNCODE.wwidth)&&(prevW=breakPointMe(UNCODE.wwidth),$.each($(".justified-layout"),function(index,val){var gutter=$(this).data("gutter"),margins=gutterByBreakpoint(prevW,gutter);$(this).justifiedGallery({margins:margins}),$(this).find(".mejs-video,.mejs-audio").each(function(){$(this).trigger("resize")})}))},!1),init_justifiedGallery()}},UNCODE.cssGrid=function(){if($(".cssgrid-layout").length>0){var cssGridContainersArray=[],transitionDuration=[],$filters=$(".cssgrid-system .cssgrid-filters");$('[class*="cssgrid-container"]').each(function(){cssGridContainersArray.push($(this)),transitionDuration.push($(".t-inside.animate_when_almost_visible",this).length>0?0:"0.5s")});var init_cssGridAjax=function(){for(var i=0,len=cssGridContainersArray.length;i<len;i++){var cssGridSystem=$(cssGridContainersArray[i]).closest($(".cssgrid-system")),cssGridId=cssGridSystem.attr("id");cssGridSystem.data("transitionDuration",transitionDuration[i]);if($(cssGridContainersArray[i]).hasClass("cssgrid-infinite")&&$.fn.infinitescroll){$(cssGridContainersArray[i]).infinitescroll({navSelector:"#"+cssGridId+" .loadmore-button",nextSelector:"#"+cssGridId+" .loadmore-button a",itemSelector:"#"+cssGridId+" .cssgrid-layout .tmb, #"+cssGridId+" .grid-filters li.filter-cat, #"+cssGridId+" .woocommerce-result-count-wrapper--default",animate:!1,behavior:"local",debug:!1,loading:{selector:"#"+cssGridId+".cssgrid-system .cssgrid-footer-inner",speed:0,finished:undefined,msg:$("#"+cssGridId+" .loadmore-button")},errorCallback:function(){var cssgrid_system=$(this).closest(".cssgrid-system");$(".loading-button",cssgrid_system).hide(),$(".loadmore-button",cssgrid_system).attr("style","display:none !important")}},function(newElements,opts){var $cssGrid=$(this),cssGridSystemCont=$cssGrid.closest(".cssgrid-system"),cssGridId=cssGridSystemCont.attr("id"),filters=new Array,$loading_button=cssGridSystemCont.find(".loading-button"),$infinite_button=cssGridSystemCont.find(".loadmore-button"),$numPages=$("a",$infinite_button).data("pages"),$woo_results,delay=300;$("a",$infinite_button).html($("a",$infinite_button).data("label")),$infinite_button.show(),$loading_button.hide(),$numPages!=undefined&&opts.state.currPage==$numPages&&$infinite_button.hide(),$("> li",$cssGrid).remove(),$(".cssgrid-container").find(".woocommerce-result-count-wrapper").remove(),$.each($(newElements),function(index,val){$(val).hasClass("woocommerce-result-count-wrapper")?($woo_results=$(val),delete newElements[index]):($(val).addClass("tmb-grid"),$(val).is("li")&&filters.push($(val)[0])),$(val).addClass("uncode-appended")}),newElements=newElements.filter(function(x){return filters.indexOf(x)<0}),$.each($(filters),function(index,val){$("#"+cssGridId+' a[data-filter="'+$("a",val).attr("data-filter")+'"]').length==0&&$("#"+cssGridId+" .grid-filters ul").append($(val))});if($woo_results&&$woo_results.length>0){var old_count=cssGridSystemCont.find(".woocommerce-result-count").text(),new_count=$woo_results.find(".woocommerce-result-count").text(),old_start=old_count.match(/(\d+)–(\d+)/)[1],new_end=new_count.match(/(\d+)–(\d+)/)[2];function replaceMatch(match,p1,p2){return old_start+"–"+new_end}var new_count_text=old_count.replace(/(\d+)–(\d+)/,replaceMatch);cssGridSystemCont.find(".woocommerce-result-count").text(new_count_text)}var filterValue=cssGridSystemCont.find(".grid-nav-link.active").attr("data-filter"),sequential=cssGridSystemCont.hasClass("cssgrid-animate-sequential")?!0:!1;if(filterValue!==undefined&&filterValue!="*"){$(newElements).hide();var els_to_show=$();$(newElements).each(function(){var el=$(this);el.hasClass(filterValue)&&(els_to_show=els_to_show.add(el),el.show())}),UNCODE.animate_css_grids(cssGridSystemCont,els_to_show,els_to_show.length,sequential,!0)}else UNCODE.animate_css_grids(cssGridSystemCont,$(newElements),$(newElements).length,sequential,!0);UNCODE.adaptive(),SiteParameters.dynamic_srcset_active==="1"&&UNCODE.refresh_dynamic_srcset_size($cssGrid);if(typeof UNCODE.lightbox!="undefined"&&!SiteParameters.lbox_enhanced){var getLightbox=UNCODE.lightboxArray["ilightbox_"+cssGridId];typeof getLightbox=="object"?getLightbox.refresh():UNCODE.lightbox()}typeof twttr!="undefined"&&twttr.widgets.load(cssGridContainersArray[i]),UNCODE.carousel($(newElements)),requestTimeout(function(){$cssGrid.trigger("more-items-loaded"),$(window).trigger("more-items-loaded"),window.dispatchEvent(new CustomEvent("uncode-more-items-loaded"))},1e3)});if($(cssGridContainersArray[i]).hasClass("cssgrid-infinite-button")){var $cssgrid_el=$(cssGridContainersArray[i]),$infinite_button=$cssgrid_el.closest(".cssgrid-system").find(".loadmore-button a");$cssgrid_el.infinitescroll("pause"),$infinite_button.on("click",function(event){event.preventDefault();var $cssgrid_system=$(event.target).closest(".cssgrid-system"),$cssgrid_el=$cssgrid_system.find(".cssgrid-container"),cssGridId=$cssgrid_system.attr("id");$(event.currentTarget).html(SiteParameters.loading),$cssgrid_el.infinitescroll("resume"),$cssgrid_el.infinitescroll("retrieve"),$cssgrid_el.infinitescroll("pause")})}}}};init_cssGridAjax(),$(".cssgrid-pagination").length>0&&$(".cssgrid-system").on("click",".pagination a",function(evt){evt.preventDefault();if(SiteParameters.index_pagination_disable_scroll!=="1"){var container=$(this).closest(".cssgrid-system"),calc_scroll=SiteParameters.index_pagination_scroll_to!=0?eval(SiteParameters.index_pagination_scroll_to):container.closest(".row-parent").offset().top;calc_scroll-=UNCODE.get_scroll_offset();var menu_container=$(".menu-sticky"),menu=menu_container.find(".menu-container");menu_container.length>0&&menu.length>0&&(calc_scroll-=menu.outerHeight());var bodyTop=document.documentElement.scrollTop||document.body.scrollTop,delta=bodyTop-calc_scroll,scrollSpeed=SiteParameters.constant_scroll=="on"?Math.abs(delta)/parseFloat(SiteParameters.scroll_speed):SiteParameters.scroll_speed;scrollSpeed<1e3&&SiteParameters.constant_scroll=="on"&&(scrollSpeed=1e3),UNCODE.isFullPage||(scrollSpeed==0?$("html, body").scrollTop(calc_scroll):$("html, body").animate({scrollTop:calc_scroll},{easing:"easeInOutQuad",duration:scrollSpeed,complete:function(){UNCODE.scrolling=!1}}))}loadCssGrid($(this),!0)}),$filters.on("click","a.grid-nav-link",function(evt){if($(this).hasClass("no-grid-filter"))return;var $filter=$(this),filterContainer=$filter.closest(".cssgrid-filters"),filterValue=$filter.attr("data-filter"),containerSystem=$filter.closest(".cssgrid-system"),container=containerSystem.find($(".cssgrid-layout")),transitionDuration=containerSystem.data("transitionDuration"),delay=300,filterItems=[],all_thumbs=container.find(".tmb-grid"),filter_items=function(){filterValue!==undefined?($.each($("> .tmb-grid > .t-inside",container),function(index,val){var parent=$(val).parent(),objTimeout=parent.data("objTimeout");objTimeout&&($(val).removeClass("zoom-reverse").removeClass("start_animation"),clearRequestTimeout(objTimeout)),transitionDuration==0&&($(val).hasClass("animate_when_almost_visible")?$(val).addClass("zoom-reverse").removeClass("start_animation"):$(val).addClass("animate_when_almost_visible zoom-reverse zoom-anim force-anim"))}),requestTimeout(function(){filterValue=="*"?(all_thumbs.show(),all_thumbs.each(function(index,val){$(val).find("[data-lbox^=ilightbox]").removeClass("lb-disabled"),filterItems.push($(this))})):all_thumbs.each(function(){var _tmb=$(this);_tmb.hasClass(filterValue)?(_tmb.show(),_tmb.find("[data-lbox^=ilightbox]").removeClass("lb-disabled"),filterItems.push(_tmb)):(_tmb.find("[data-lbox^=ilightbox]").addClass("lb-disabled"),_tmb.hide())}),$(".t-inside.zoom-reverse",container).removeClass("zoom-reverse");var sequential=containerSystem.hasClass("cssgrid-animate-sequential")?!0:!1;UNCODE.animate_css_grids(containerSystem,filterItems,0,sequential,!0);var lightboxElements=$("[data-lbox^=ilightbox]",container);if(lightboxElements.length){container.data("lbox",$(lightboxElements[0]).data("lbox"));if(typeof UNCODE.lightbox!="undefined"&&!SiteParameters.lbox_enhanced){var getLightbox=UNCODE.lightboxArray["ilightbox_"+container.closest(".cssgrid-system").attr("id")];typeof getLightbox=="object"?getLightbox.refresh():UNCODE.lightbox()}}container.trigger("more-items-loaded"),$(window).trigger("more-items-loaded"),window.dispatchEvent(new CustomEvent("uncode-more-items-loaded"))},delay)):($.each($("> .tmb-grid > .t-inside",container),function(index,val){var parent=$(val).parent(),objTimeout=parent.data("objTimeout");objTimeout&&($(val).removeClass("zoom-reverse").removeClass("start_animation"),clearRequestTimeout(objTimeout)),transitionDuration==0&&($(val).hasClass("animate_when_almost_visible")?$(val).addClass("zoom-reverse").removeClass("start_animation"):$(val).addClass("animate_when_almost_visible zoom-reverse zoom-anim force-anim"))}),loadCssGrid($filter))};if(!$filter.hasClass("active"))if(filterContainer.hasClass("filter-scroll")){var calc_scroll=SiteParameters.index_pagination_scroll_to!=0?eval(SiteParameters.index_pagination_scroll_to):container.closest(".row-parent").offset().top;calc_scroll-=UNCODE.get_scroll_offset();var bodyTop=document.documentElement.scrollTop||document.body.scrollTop,delta=bodyTop-calc_scroll,scrollSpeed=SiteParameters.constant_scroll=="on"?Math.abs(delta)/parseFloat(SiteParameters.scroll_speed):SiteParameters.scroll_speed,filterTolerance=!1,filter_timeout;scrollSpeed<1e3&&SiteParameters.constant_scroll=="on"&&(scrollSpeed=1e3),UNCODE.isFullPage||(scrollSpeed==0?($("html, body").scrollTop(calc_scroll),UNCODE.scrolling=!1,filter_items()):(bodyTop<=calc_scroll+20&&bodyTop>=calc_scroll-20&&(filter_items(),filterTolerance=!0),$("html, body").animate({scrollTop:calc_scroll},{easing:"easeInOutQuad",duration:scrollSpeed,complete:function(){UNCODE.scrolling=!1,filterTolerance||(filter_timeout=setTimeout(function(){clearTimeout(filter_timeout),filter_items()},200))}})))}else filter_items();evt.preventDefault()}),$(window).off("popstate.cssgrid").on("popstate.cssgrid",function(e){var params=UNCODE.getURLParams(window.location),old_params=UNCODE.getURLParams(UNCODE.lastURL,!0);UNCODE.lastURL=window.location.href;if(UNCODE.hasEqualURLParams(params,old_params)||$.isEmptyObject(params)&&$.isEmptyObject(old_params))return;params.id===undefined?$.each($(".cssgrid-system"),function(index,val){loadCssGrid($(val))}):params.hasOwnProperty(SiteParameters.ajax_filter_key_unfilter)||loadCssGrid($("#"+params.id))});var loadCssGrid=function($href,$paginating){var is_paginating=!1;if(undefined!==$paginating&&$paginating)var is_paginating=$paginating;var href=$href.is("a")?$href.attr("href"):location,cssgridSystem=$href.is("a")?$href.closest($(".cssgrid-system")):$href,cssgridWrapper=cssgridSystem.find($(".cssgrid-wrapper")),cssgridFooter=cssgridSystem.find($(".cssgrid-footer-inner")),cssgridResultCount=cssgridSystem.find($(".woocommerce-result-count-wrapper")),cssgridContainer=cssgridSystem.find($(".cssgrid-layout")),cssgridId=cssgridSystem.attr("id");$href.is("a")&&!cssgridSystem.hasClass("un-no-history")&&(UNCODE.lastURL=href,history.pushState({myCSSgrid:!0},document.title,href)),cssgridWrapper.addClass("cssgrid-loading"),is_paginating&&cssgridWrapper.addClass("grid-filtering"),$.ajax({url:href}).done(function(data){var $resultItems=$(data).find("#"+cssgridId+" .cssgrid-layout").html(),$resultPagination=$(data).find("#"+cssgridId+" .pagination")[0],$resultCount=$(data).find("#"+cssgridId+" .woocommerce-result-count")[0];requestTimeout(function(){cssgridContainer.html($resultItems),cssgridWrapper.removeClass("cssgrid-loading"),cssgridWrapper.removeClass("grid-filtering");var sequential=cssgridSystem.hasClass("cssgrid-animate-sequential")?!0:!1;UNCODE.animate_css_grids(cssgridSystem,cssgridContainer.find(".tmb-grid"),0,sequential,!1),UNCODE.adaptive(),SiteParameters.dynamic_srcset_active==="1"&&UNCODE.refresh_dynamic_srcset_size(cssgridContainer);if(typeof UNCODE.lightbox!="undefined"&&!SiteParameters.lbox_enhanced){var getLightbox=UNCODE.lightboxArray["ilightbox_"+cssgridContainer.closest(".cssgrid-system").attr("id")];typeof getLightbox=="object"?getLightbox.refresh():UNCODE.lightbox()}cssgridContainer.trigger("more-items-loaded"),$(window).trigger("more-items-loaded"),window.dispatchEvent(new CustomEvent("uncode-more-items-loaded"))},300),$(".pagination",cssgridFooter).remove(),cssgridFooter.append($resultPagination),cssgridResultCount.length>0&&($(".woocommerce-result-count",cssgridResultCount).remove(),cssgridResultCount.append($resultCount))})};$filters.each(function(i,buttonGroup){var $buttonGroup=$(buttonGroup);$buttonGroup.on("click","a:not(.no-grid-filter)",function(){$buttonGroup.find(".active").removeClass("active"),$(this).addClass("active")});var $cats_mobile_trigger=$(".menu-smart--filter-cats_mobile-toggle-trigger",$buttonGroup),$cats_mobile_toggle=$(".menu-smart--filter-cats_mobile-toggle",$buttonGroup),$cats_filters=$(".menu-smart--filter-cats",$buttonGroup);$buttonGroup.on("click","a.menu-smart--filter-cats_mobile-toggle-trigger",function(e){e.preventDefault(),$cats_filters.slideToggle(400,"easeInOutCirc")})})}},UNCODE.linearGrid=function(){$(".linear-wrapper").each(function(){var $wrap=$(this),$system=$wrap.closest(".linear-system"),$row=$wrap.closest(".vc_row[data-parent]"),_row=$row[0],$cont=$(".linear-container.cont-leader:not(.cont-appended)",$wrap),vertical=$cont.hasClass("linear-or-vertical"),clone=$wrap.attr("data-infinite")==="yes"||vertical,freezedDesktop=$wrap.attr("data-freeze")==="always"||$wrap.attr("data-freeze")==="desktop",freezedMobile=$wrap.attr("data-freeze")==="always"||$wrap.attr("data-freeze")==="mobile",dataSpeed=parseFloat($wrap.attr("data-speed")),isInViewport=!1,isHover=!1,init=!1,stableHeight=UNCODE.wheight,wCont,hCont,docH,marqueeTL;dataSpeed=isNaN(dataSpeed)?0:dataSpeed;var dataX=dataSpeed;dataSpeed+=5;var checkLinearGridSize=function(){if(!$wrap.is(":visible"))return;$wrap.find(".cont-appended").remove();if(vertical){if(!SiteParameters.is_frontend_editor){hCont=$cont.outerHeight(),docH=Math.max($row.outerHeight(),stableHeight)+hCont*dataSpeed;if(hCont<docH)var res=docH-hCont*3,times=2*Math.round((res/hCont+1)/2);for(var i=0;i<times;i++){var $cloneCont=$cont.clone(),$cloneCont2=$cont.clone(),trans=(i+2)*100;$wrap.append($cloneCont.addClass("cont-appended").css({transform:"translateY("+trans+"%)"})),$wrap.append($cloneCont2.addClass("cont-appended").css({transform:"translateY(-"+trans+"%)"})),$cloneCont.find("a[data-lbox]").each(function(){var dataLbox=$(this).attr("data-lbox");$(this).attr("data-lbox",dataLbox+"_"+i)}),$cloneCont.find(".wp-video-shortcode").each(function(){var thisID=$(this).attr("id");$(this).attr("id",thisID+"_"+i)}),$cloneCont2.find("a[data-lbox]").each(function(){var dataLbox=$(this).attr("data-lbox");$(this).attr("data-lbox",dataLbox+"_2"+i)}),$cloneCont2.find(".wp-video-shortcode").each(function(){var thisID=$(this).attr("id");$(this).attr("id",thisID+"__"+i)}),$(".lbox-trigger-item",$cloneCont).length&&(UNCODE.lightgallery($cloneCont),UNCODE.lightgallery($cloneCont2))}}}else{wCont=$cont.outerWidth();if(wCont<UNCODE.wwidth*2)var res=UNCODE.wwidth*2-wCont,times=2*Math.round((res/wCont+1)/2);for(var i=0;i<times;i++){var $cloneCont=$cont.clone(),$cloneCont2=$cont.clone(),trans=(i+2)*100;$wrap.append($cloneCont.addClass("cont-appended").css({transform:"translateX("+trans+"%)"})),$wrap.append($cloneCont2.addClass("cont-appended").css({transform:"translateX(-"+trans+"%)"})),$cloneCont.find("a[data-lbox]").each(function(){var dataLbox=$(this).attr("data-lbox");$(this).attr("data-lbox",dataLbox+"_"+i)}),$cloneCont.find("[id]").each(function(){var thisID=$(this).attr("id");$(this).attr("id",thisID+"_"+i)}),$cloneCont2.find("a[data-lbox]").each(function(){var dataLbox=$(this).attr("data-lbox");$(this).attr("data-lbox",dataLbox+"_2"+i)}),$cloneCont2.find("[id]").each(function(){var thisID=$(this).attr("id");$(this).attr("id",thisID+"__"+i)}),$(".lbox-trigger-item",$cloneCont).length&&(UNCODE.lightgallery($cloneCont),UNCODE.lightgallery($cloneCont2))}}};clone&&(checkLinearGridSize(),$(window).on("resize.linearGrid",function(){checkLinearGridSize()}));var continuousLinearMarquee=function(_xStrt){if(!$wrap.is(":visible"))return;var ease="none";wCont=$cont.outerWidth(),hCont=$cont.outerHeight();var xStrt=typeof _xStrt=="undefined"?0:_xStrt,xEnd=vertical?hCont:wCont,direction=$wrap.attr("data-animation").indexOf("opposite")>0?-1:1,speed=(xEnd+xStrt)/(dataSpeed*dataSpeed*dataSpeed)/5*dataSpeed,speedSlow=(xEnd+xStrt)/45,freezed=freezedDesktop&&UNCODE.wwidth>=UNCODE.mediaQuery||freezedMobile&&UNCODE.wwidth<UNCODE.mediaQuery;marqueeTL=new TimelineMax({paused:!0,reversed:!0});if(isInViewport&&!isHover&&!freezed){marqueeTL.play();if($wrap.attr("data-hover")==="yes"||$wrap.attr("data-hover")==="pause"){var $column=$wrap.closest(".wpb_column"),$col_link=$(".col-link",$column),$hover_sel=$wrap;$col_link.length&&($hover_sel=$wrap.add($column)),$hover_sel.on("mouseover",function(){$wrap.attr("data-hover")==="yes"?(ease="power2.out",marqueeTL.duration(speedSlow)):marqueeTL.pause(),isHover=!0}).on("mouseout",function(){$wrap.attr("data-hover")==="yes"?(speed=(xEnd+xStrt)/(dataSpeed*dataSpeed*dataSpeed)/5*dataSpeed,ease="power2.in",marqueeTL.duration(speed)):marqueeTL.play(),isHover=!1})}}gsap.killTweensOf($wrap),vertical?marqueeTL.fromTo($wrap,{y:xStrt*direction},{duration:speed,y:xEnd*direction*-1,onComplete:function(){continuousLinearMarquee()},ease:ease,paused:freezed}):marqueeTL.fromTo($wrap,{x:xStrt*direction},{duration:speed,x:xEnd*direction*-1,onComplete:function(){continuousLinearMarquee()},ease:ease,paused:freezed})},dragLinearContinuous=function(){if(!$wrap.is(":visible"))return;var matrix,_x,_y,dragAction=!1;Draggable.create($wrap[0],{type:vertical?"y":"x",bounds:document.getElementById("container"),inertia:!1,onPress:function(e){},onRelease:function(e){dragAction===!0&&(matrix=$wrap.css("transform").replace(/[^0-9\-.,]/g,"").split(","),_x=matrix[12]||matrix[4],_y=matrix[13]||matrix[5],vertical?continuousLinearMarquee(_y*-1):continuousLinearMarquee(_x*-1),$wrap.removeClass("linear-dragging"))},onDrag:function(e){dragAction=!0,$wrap.addClass("linear-dragging")},onDragEnd:function(e){matrix=$wrap.css("transform").replace(/[^0-9\-.,]/g,"").split(","),_x=matrix[12]||matrix[4],_y=matrix[13]||matrix[5],wCont=$cont.outerWidth(),hCont=$cont.outerHeight(),vertical?(Math.abs(_y)>hCont&&(_y<0?_y=hCont+parseFloat(_y):_y=parseFloat(_y)-hCont),continuousLinearMarquee(_y*-1)):(Math.abs(_x)>wCont&&(_x<0?_x=wCont+parseFloat(_x):_x=parseFloat(_x)-wCont),continuousLinearMarquee(_x*-1)),$wrap.removeClass("linear-dragging"),dragAction=!1}})},runScrollLinear=function(){var freezed=freezedDesktop&&UNCODE.wwidth>=UNCODE.mediaQuery||freezedMobile&&UNCODE.wwidth<UNCODE.mediaQuery;if(!$wrap.is(":visible")||freezed)return;var direction=$wrap.attr("data-animation").indexOf("opposite")>0?-1:1,dataMove=dataX>=0?1+dataX:-1*5/(dataX-.5)*.25,linearGridScroll=function(){if(isInViewport){var bound=_row.getBoundingClientRect(),bound_top=bound.top,gsap_calc=parseFloat((stableHeight*.35-bound_top)*dataMove*.5*direction);vertical?$wrap.css({transform:"translateY("+gsap_calc*-1+"px) translateZ(0px)"}):$wrap.css({transform:"translateX("+gsap_calc*-1+"px) translateZ(0px)"}),"IntersectionObserver"in window&&!UNCODE.isMobile&&requestAnimationFrame(linearGridScroll)}"IntersectionObserver"in window&&!UNCODE.isMobile||window.addEventListener("scroll",linearGridScroll)};$(window).on("load wwResize",function(e){stableHeight=UNCODE.wheight,linearGridScroll()}),"IntersectionObserver"in window&&!UNCODE.isMobile&&requestAnimationFrame(linearGridScroll)},dragLinear=function(){if(!$wrap.is(":visible"))return;var matrix,_x,_y;Draggable.create($system[0],{type:vertical?"y":"x",bounds:document.getElementById("container"),inertia:!1,onPress:function(e){},onRelease:function(e){},onDrag:function(e){$wrap.addClass("linear-dragging")},onDragEnd:function(e){matrix=$system.css("transform").replace(/[^0-9\-.,]/g,"").split(","),_x=matrix[12]||matrix[4],_y=matrix[13]||matrix[5],wCont=$cont.outerWidth(),hCont=$cont.outerHeight(),vertical?Math.abs(_y)>hCont&&(_y<0?_y=hCont+parseFloat(_y):_y=parseFloat(_y)-hCont,gsap.to($system[0],{duration:0,y:_y})):Math.abs(_x)>wCont&&(_x<0?_x=wCont+parseFloat(_x):_x=parseFloat(_x)-wCont,gsap.to($system[0],{duration:0,x:_x})),$wrap.removeClass("linear-dragging")}})};if(!$("body").hasClass("compose-mode")){if($wrap.attr("data-animation")==="marquee"||$wrap.attr("data-animation")==="marquee-opposite")continuousLinearMarquee(),$(window).on("wwResize",function(e){continuousLinearMarquee()}),$wrap.attr("data-draggable")==="yes"&&dragLinearContinuous();if($wrap.attr("data-animation")==="marquee-scroll"||$wrap.attr("data-animation")==="marquee-scroll-opposite")runScrollLinear(),$wrap.attr("data-draggable")==="yes"&&dragLinear();if("IntersectionObserver"in window&&!UNCODE.isMobile){var observer=new IntersectionObserver(function(entries){entries.forEach(function(entry){entry.isIntersecting?(isInViewport=!0,init?typeof marqueeTL!="undefined"&&marqueeTL.play():(init=!0,continuousLinearMarquee()),($wrap.attr("data-animation")==="marquee-scroll"||$wrap.attr("data-animation")==="marquee-scroll-opposite")&&requestAnimFrame(runScrollLinear)):(isInViewport=!1,typeof marqueeTL!="undefined"&&marqueeTL.pause())})},{root:document});observer.observe(_row)}else{var checkVisible=function(el,off){typeof jQuery=="function"&&el instanceof jQuery&&(el=el[0]),off=typeof off=="undefined"?50:off;var rect=el.getBoundingClientRect();return rect.top>=0&&rect.top+off<=(window.innerHeight||document.documentElement.clientHeight)||rect.bottom>=off&&rect.bottom<=(window.innerHeight||document.documentElement.clientHeight)||rect.top<=0&&rect.bottom>=(window.innerHeight||document.documentElement.clientHeight)},checkVisibility=function(){checkVisible($row)?(isInViewport=!0,typeof marqueeTL!="undefined"&&marqueeTL.play()):(isInViewport=!1,typeof marqueeTL!="undefined"&&marqueeTL.pause())};window.addEventListener("scroll",checkVisibility)}}})},UNCODE.preventDoubleTransition=function(){$(".sticky-element .animate_when_almost_visible").each(function(){var $el=$(this).one("webkitAnimationEnd mozAnimationEnd oAnimationEnd animationEnd",function(e){$el.addClass("do_not_reanimate")})})},UNCODE.checkScrollForTabs=function(){var goToSection=window.location.hash.replace("#",""),$index;goToSection=goToSection.replace(/[^-A-Za-z0-9+&@#/%?=~_]/g,""),goToSection=encodeURIComponent(goToSection),$index=$('[data-id="'+goToSection+'"]').closest(".uncode-tabs, .uncode-accordion"),$index.attr("data-parent","parent-"+goToSection),window.location.hash!=undefined&&window.location.hash!=""&&requestTimeout(function(){scrollBody("parent-"+goToSection)},500),$('.page-body a[href*="#"]').not("[data-tab-history]").not(".scroll-top").click(function(e){var hash=e.currentTarget.hash,index=e.currentTarget.closest(".uncode-tabs");$('.uncode-tabs a[href="'+hash+'"][data-tab-history]').length&&($('a[href="'+hash+'"][data-tab-history]').click(),scrollBody(index))});var scrollBody=function(index){var getSection=$('a[href="'+index+'"][data-tab-history]'),scrollTo,safeGap=27;getSection.length||(getSection=$('div[data-parent="'+index+'"]'),getSection.attr("data-target")=="row"&&(getSection=getSection.closest(".vc_row"),safeGap=0));if(typeof getSection=="undefined"||!getSection.length)return;var body=$("html, body"),bodyTop=document.documentElement.scrollTop||document.body.scrollTop,delta=bodyTop-(getSection.length?getSection.offset().top:0),getOffset=UNCODE.get_scroll_offset();if(typeof getSection.offset()=="undefined")return;scrollTo=getSection.offset().top-safeGap,scrollTo-=getOffset;var scrollSpeed=SiteParameters.constant_scroll=="on"?Math.abs(delta)/parseFloat(SiteParameters.scroll_speed):SiteParameters.scroll_speed;scrollSpeed<1e3&&SiteParameters.constant_scroll=="on"&&(scrollSpeed=1e3),index!=0&&(UNCODE.scrolling=!0),scrollSpeed==0?(body.scrollTop(delta>0?scrollTo-.1:scrollTo),UNCODE.scrolling=!1):body.animate({scrollTop:delta>0?scrollTo-.1:scrollTo},scrollSpeed,"easeInOutQuad",function(){requestTimeout(function(){UNCODE.scrolling=!1,getOffset!=UNCODE.get_scroll_offset()&&scrollBody(index)},100)})}},UNCODE.printScreen=function(){function changeMediaStyle(){clearRequestTimeout(setResize),setResize=requestTimeout(function(){var $head=document.getElementsByTagName("head")[0],$newStyle=document.createElement("style"),winW=window.innerWidth,printH=window.innerHeight;$newStyle.setAttribute("type","text/css"),$newStyle.setAttribute("media","print"),$newStyle.appendChild(document.createTextNode("@page { size: "+winW+"px "+printH+"px; margin: 0; }")),inlineMediaStyle!=null?$head.replaceChild($newStyle,inlineMediaStyle):$head.appendChild($newStyle),inlineMediaStyle=$newStyle},1e3)}var inlineMediaStyle=null,setResize;changeMediaStyle(),window.addEventListener("resize",changeMediaStyle)},UNCODE.fullPage=function(){if(!UNCODE.isFullPage&&!UNCODE.isFullPageSnap||SiteParameters.is_frontend_editor)return $("body").removeClass("uncode-fullpage").removeClass("uncode-fullpage-slide").removeClass("fp-waiting"),!1;requestTimeout(function(){window.scrollTo(0,0)},10);var $masthead=$("#masthead"),$logo=$("#logo-container-mobile"),$logolink=$("[data-minheight]",$logo),logoMinScale=$logolink.data("minheight"),logoMaxScale=$("[data-maxheight]",$logo).data("maxheight"),$container=$(".main-container .post-content"),$rows=$container.find(".vc_row[data-parent]").addClass("uncode-scroll-lock fp-auto-height"),$header=$("#page-header").addClass("uncode-scroll-lock fp-auto-height"),headerName=$(".vc_row[data-name]",$header).attr("data-name"),headerLabel=$(".vc_row[data-label]",$header).attr("data-label"),headerWithOpacity=$(".header-scroll-opacity",$header).length,menuHidden=!$("body").hasClass("vmenu")&&$("body").hasClass("uncode-fp-menu-hide")?!0:!1,$footer=$("#colophon").addClass("uncode-scroll-lock fp-auto-height"),scrollBar=!0,effect,animationEndTimeOut,fp_anim_time=900,fp_easing="cubic-bezier(0.37, 0.31, 0.2, 0.85)",is_scrolling=!1,dataNames=[],is_first=!0,no_history=$("body").hasClass("uncode-scroll-no-history"),theres_footer=!0;($("> div",$footer).outerHeight()<2||!$footer.length)&&$("> div",$footer).each(function(index,el){$(el).outerHeight()<2?theres_footer=!1:theres_footer=!0}),$footer.length||(theres_footer=!1),UNCODE.isFullPageSnap||($("body").hasClass("uncode-fullpage-zoom")?effect="scaleDown":$("body").hasClass("uncode-fullpage-parallax")?effect="moveparallax":effect="movecurtain"),$("body").hasClass("uncode-fullpage-trid")&&(fp_anim_time*=2),$header.length&&(headerName!==""&&$header.attr("data-name",headerName),headerLabel!==""&&$header.attr("data-label",headerLabel),$container.prepend($header)),theres_footer&&($container.append($footer),$footer.attr("data-anchor",SiteParameters.slide_footer).data("name",SiteParameters.slide_footer),$("aside.widget ul",$footer).addClass("no-list"));var $all=$rows.add($header);theres_footer&&($all=$all.add($footer)),$all.each(function(index,row){index===0&&$(row).addClass("uncode-scroll-active")});var isMobile=SiteParameters.uncode_force_onepage_dots?!1:UNCODE.isMobile;!isMobile&&!$("body").hasClass("uncode-scroll-no-dots")&&$("<ul class='onepage-pagination'></ul>").prependTo("body"),$all.each(function(index,val){var getName=$(val).data("name"),label;if(typeof getName=="undefined"||getName=="undefined")getName=SiteParameters.slide_name+"-"+index;dataNames.indexOf(getName)>0&&(getName+="_"+index,$(val).data("name",getName)),dataNames.push(getName),$(val).attr("data-section",index+1).attr("data-anchor",getName),typeof $(val).attr("data-label")!="undefined"?label=$(val).attr("data-label"):label="";if($(val).is($footer))return;label!=""?(label='<span class="cd-label style-accent-bg border-accent-color">'+label+"</span>",$("ul.onepage-pagination").append("<li><a class='one-dot-link' data-index='"+index+"' href='#"+getName+"'><span class='cd-dot-cont'><span class='cd-dot'></span></span>"+label+"</a></li>")):label==""&&$("body").hasClass("uncode-empty-dots")&&$("ul.onepage-pagination").append("<li><a class='one-dot-link' data-index='"+index+"' href='#"+getName+"'><span class='cd-dot-cont'><span class='cd-dot'></span></span></a></li>")});var checkVisible=function(el,off){typeof jQuery=="function"&&el instanceof jQuery&&(el=el[0]),off=typeof off=="undefined"?50:off;var rect=el.getBoundingClientRect();return rect.top>=0&&rect.top+off<=(window.innerHeight||document.documentElement.clientHeight)||rect.bottom>=off&&rect.bottom<=(window.innerHeight||document.documentElement.clientHeight)||rect.top<=0&&rect.bottom>=(window.innerHeight||document.documentElement.clientHeight)},animationEndAction=function(index,nextIndex){var $currentSlide=$('.uncode-scroll-lock[data-section="'+index+'"]',$container),$nextSlide=$('.uncode-scroll-lock[data-section="'+nextIndex+'"]',$container),player,iframe;$nextSlide.is($footer)||$(".no-scrolloverflow").removeClass("no-scrolloverflow"),UNCODE.isFullPageSnap||activateKBurns(nextIndex),$("body:not(.uncode-fullpage-zoom) .background-video-shortcode, .uncode-video-container.video",$currentSlide).each(function(index,val){$(this).attr("data-provider")=="vimeo"?(iframe=$(this).find("iframe"),player=new Vimeo.Player(iframe[0]),player.pause()):$(this).attr("data-provider")=="youtube"?youtubePlayers[$(this).attr("data-id")]!=undefined&&youtubePlayers[$(this).attr("data-id")].pauseVideo():$(this).is("video")&&($(this)[0].volume=0,$(this)[0].pause())}),!UNCODE.isMobile&&headerWithOpacity&&$nextSlide.is($header)&&$header.removeClass("header-scrolled");var $otherEl=$(".uncode-scroll-lock:not(.hidden-scroll)",$container).not($nextSlide);$otherEl.each(function(){var $otherThis=$(this),$bgwrapperOther=$(".background-inner",$otherThis);checkVisible($otherThis)||$bgwrapperOther.removeClass("uncode-kburns").removeClass("uncode-zoomout")});if(!checkVisible($currentSlide)){$currentSlide.removeClass("uncode-scroll-visible");var currentScroll=$(".fp-scrollable",$currentSlide).data("iscrollInstance");typeof currentScroll!="undefined"&&!UNCODE.isFullPageSnap&&currentScroll.scrollTo(0,0,0)}clearRequestTimeout(animationEndTimeOut),animationEndTimeOut=requestTimeout(function(){Waypoint.refreshAll(),$(document.body).trigger("uncode_waypoints");var eventFP=new CustomEvent("fp-slide-changed");window.dispatchEvent(eventFP),is_scrolling=!1,is_first&&($("ul.onepage-pagination a").removeClass("is-selected"),$('ul.onepage-pagination a[data-index="'+(nextIndex-1)+'"]').addClass("is-selected"),is_first=!1)},500)},postLeaveActions=function(nextIndex){if(menuHidden&&!UNCODE.isMobile)return!1;var $el=$('.uncode-scroll-lock[data-section="'+nextIndex+'"]',$container),$cols=$(".uncol",$el),anchor=$el.data("anchor");UNCODE.isFullPageSnap||$.each($cols,function(index,val){if($(val).hasClass("style-light"))return $masthead.removeClass("style-dark-override").addClass("style-light-override"),!1;if($(val).hasClass("style-dark"))return $masthead.removeClass("style-light-override").addClass("style-dark-override"),!1}),typeof anchor!="undefined"&&anchor!==""&&$('.menu-item > a[href*="#'+anchor+'"]').length&&($(".menu-item").removeClass("active"),$('.menu-item > a[href*="#'+anchor+'"]').closest(".menu-item").addClass("active")),UNCODE.isFullPageSnap||activateBackWash(nextIndex)},activateBackWash=function(nextIndex){var $el=$('.uncode-scroll-lock[data-section="'+nextIndex+'"]',$container),$bgwrapper;if(!$el.length)return!1;if($el.hasClass("with-zoomout"))$bgwrapper=$(".background-inner:nth-child(1)",$el);else{if(!$(".with-zoomout",$el).length)return!1;$bgwrapper=$(".with-zoomout .background-inner:nth-child(1)",$el)}$bgwrapper.addClass("uncode-zoomout")},activateKBurns=function(nextIndex){var $el=$('.uncode-scroll-lock[data-section="'+nextIndex+'"]',$container),$bgwrapper;if(!$el.length)return!1;if($el.hasClass("with-kburns"))$bgwrapper=$(".background-inner:nth-child(1)",$el);else{if(!$(".with-kburns",$el).length)return!1;$bgwrapper=$(".with-kburns .background-inner:nth-child(1)",$el)}$bgwrapper.addClass("uncode-kburns")},activateParallax=function(nextIndex,direction){var $el=$('.uncode-scroll-lock[data-section="'+nextIndex+'"]',$container),$cell=$(".fp-tableCell",$el),animationEnd="webkitAnimationEnd animationend",cellAnim;switch(direction){case"up":cellAnim="moveFromTopInner";break;default:cellAnim="moveFromBottomInner"}$cell.css({"animation-name":cellAnim,"animation-duration":fp_anim_time+"ms","animation-delay":"","animation-timing-function":fp_easing,"animation-fill-mode":"both"}).off(animationEnd).on(animationEnd,function(event){event.originalEvent.animationName===cellAnim&&$cell.css({"animation-name":"","animation-duration":"","animation-delay":"","animation-timing-function":"","animation-fill-mode":""})})},scrollHashes=function(){var hash=window.location.hash.replace("#","").split("/"),hashInd;hash[0]!==""&&hash[0]!==SiteParameters.slide_footer?$('.uncode-scroll-lock[data-anchor="'+hash[0]+'"]').length&&(hashInd=$('.uncode-scroll-lock[data-anchor="'+hash[0]+'"]').index("[data-anchor]"),$.fn.fullpage.moveTo(hashInd+1)):hash[0]===""&&$.fn.fullpage.moveTo(1)},hideMenu=function(index,nextIndex){if($("body").hasClass("vmenu")||UNCODE.isFullPageSnap||!$("body").hasClass("uncode-fp-menu-hide"))return!1;var hMenu=UNCODE.menuHeight,transTime=hMenu*2;if(index===1&&nextIndex>1)hMenu*=-1;else{if(index===1||nextIndex!==1)return!1;hMenu=0}$masthead.css({"-webkit-transform":"translate3d(0, "+hMenu+"px, 0)",transform:"translate3d(0, "+hMenu+"px, 0)","-webkit-transition":"transform 0.5s ease-in-out",transition:"transform 0.5s ease-in-out"})},shrinkMenu=function(index,nextIndex){if($("body").hasClass("vmenu")||!$("body").hasClass("uncode-fp-menu-shrink"))return!1;if(index===1&&nextIndex>1)$logo.addClass("shrinked"),$("div",$logo).each(function(index,val){$(val).css({height:logoMinScale,"line-height":logoMinScale}),$(val).hasClass("text-logo")&&$(val).css({"font-size":logoMinScale+"px"})}),requestTimeout(function(){UNCODE.menuMobileHeight=$masthead.outerHeight()},300);else{if(index===1||nextIndex!==1)return!1;$logo.removeClass("shrinked"),$("div",$logo).each(function(index,val){$(val).css({height:logoMaxScale,"line-height":logoMaxScale}),$(val).hasClass("text-logo")&&$(val).css({"font-size":logoMaxScale+"px"})}),requestTimeout(function(){UNCODE.menuMobileHeight=$masthead.outerHeight()},300)}},anchorLink=function(){$container.add(".menu-item").find('a[href*="#"]').click(function(e){var $this=$(e.currentTarget),hash=e.currentTarget.href.split("#"),current=window.location.href.split("#"),ind,currentMenuOpened=UNCODE.menuOpened,go=!1,hash_url=hash[0].replace(/\/?$/,"/"),current_url=current[0].replace(/\/?$/,"/");(hash_url==current_url||hash_url=="")&&hash[1]!=""&&(hash="#"+hash[1],e.preventDefault(),go=!0),go&&($(hash).length?ind=$(hash).closest(".fp-section").index():(hash=hash.slice(1),ind=$('.fp-section[data-anchor="'+hash+'"]').index(".fp-section")),typeof $this.attr("data-filter")!="undefined"&&$this.attr("data-filter")!=""&&(ind=$this.closest(".fp-section").index()),UNCODE.menuOpened=!1,$.fn.fullpage.moveTo(ind+1),UNCODE.menuOpened=currentMenuOpened,UNCODE.menuOpened&&(UNCODE.wwidth<UNCODE.mediaQuery?window.dispatchEvent(UNCODE.menuMobileTriggerEvent):($(".mmb-container-overlay .overlay-close").trigger("click"),$(".mmb-container .trigger-overlay.close")[0].dispatchEvent(new Event("click")))))}),$(".header-scrolldown").on("click",function(event){event.preventDefault();var scrollDown=$(this),ind=scrollDown.closest(".fp-section").index();$.fn.fullpage.moveTo(ind+2)});var anchor=$(".fp-section.active").data("anchor");typeof anchor!="undefined"&&anchor!==""&&$('.menu-item > a[href="#'+anchor+'"]').length&&($(".menu-item").removeClass("active"),$('.menu-item > a[href="#'+anchor+'"]').closest(".menu-item").addClass("active"))},slideLeave=function(index,nextIndex,direction){var $currentSlide=$('.uncode-scroll-lock[data-section="'+index+'"]',$container),$nextSlide=$('.uncode-scroll-lock[data-section="'+nextIndex+'"]',$container),animationEnd="webkitAnimationEnd animationend",transitionEnd="webkitTransitionEnd transitionend",animOut=effect!="scaleDown"?effect+direction:effect,animIn,isFooter=!1,isFooterNext=!1,footerH=$footer.outerHeight(),timeout,player,iframe,footerCoeff;switch(direction){case"up":animIn="moveFromTop";break;default:animIn="moveFromBottom"}$("body").hasClass("uncode-fullpage-trid")?(animOut=animIn+"trid",animIn=animOut+"In"):UNCODE.isFullPageSnap&&(animIn=animOut="none"),hideMenu(index,nextIndex),shrinkMenu(index,nextIndex),$(".uncode-fullpage-zoom .background-video-shortcode, .uncode-video-container.video",$currentSlide).each(function(index,val){$(this).attr("data-provider")=="vimeo"?(iframe=$(this).find("iframe"),player=new Vimeo.Player(iframe[0]),player.pause()):$(this).attr("data-provider")=="youtube"?youtubePlayers[$(this).attr("data-id")]!=undefined&&youtubePlayers[$(this).attr("data-id")].pauseVideo():$(this).is("video")&&($(this)[0].volume=0,$(this)[0].pause())}),$(".background-video-shortcode, .uncode-video-container.video",$nextSlide).each(function(index,val){$(this).attr("data-provider")=="vimeo"?(iframe=$(this).find("iframe"),iframe.on("load",function(){player=new Vimeo.Player(iframe),player.setVolume(0),player.play()}),player=new Vimeo.Player(iframe),player.setVolume(0),player.play()):$(this).attr("data-provider")=="youtube"?youtubePlayers[$(this).attr("data-id")]!=undefined&&youtubePlayers[$(this).attr("data-id")].playVideo():$(this).is("video")&&($(this)[0].volume=0,$(this)[0].play())}),$currentSlide.is($footer)&&(isFooter=!0),$nextSlide.is($footer)&&(isFooterNext=!0),!UNCODE.isMobile&&headerWithOpacity&&$currentSlide.is($header)&&$header.addClass("header-scrolled"),footerCoeff=footerH;if(UNCODE.isFullPageSnap)postLeaveActions(nextIndex),activateBackWash(nextIndex),activateKBurns(nextIndex),requestTimeout(function(){animationEndAction(index,nextIndex)},fp_anim_time+150);else if(isFooterNext){var $iscrollWrapper=$currentSlide.find(".fp-scrollable");$iscrollWrapper.addClass("no-scrolloverflow"),$nextSlide.add($currentSlide).addClass("uncode-scroll-front").addClass("uncode-scroll-active").addClass("uncode-scroll-visible"),$container.css({"-webkit-transform":"translate3d(0, -"+footerCoeff+"px, 0)",transform:"translate3d(0, -"+footerCoeff+"px, 0)","-webkit-transition":"transform "+footerCoeff*2+"ms "+fp_easing,transition:"transform "+footerCoeff*2+"ms "+fp_easing}).off(transitionEnd).one(transitionEnd,function(){animationEndAction(index,nextIndex)})}else if(isFooter)$('.uncode-scroll-lock[data-section="'+(index-1)+'"]',$container).add($currentSlide).addClass("uncode-scroll-front").addClass("uncode-scroll-active").addClass("uncode-scroll-visible"),$container.css({"-webkit-transform":"translate3d(0, 0, 0)",transform:"translate3d(0, 0, 0)","-webkit-transition":"transform "+footerCoeff*2+"ms "+fp_easing,transition:"transform "+footerCoeff*2+"ms "+fp_easing}).one(transitionEnd,function(){nextIndex!==index-1&&(clearRequestTimeout(timeout),timeout=requestTimeout(function(){$.fn.fullpage.moveTo(nextIndex),slideLeave(index-1,nextIndex,"up"),$container.off(transitionEnd)},50)),animationEndAction(index,nextIndex)});else{postLeaveActions(nextIndex),$("body").hasClass("uncode-fullpage-trid")||activateParallax(nextIndex,direction);var $outBg=$(".background-wrapper",$currentSlide);$nextSlide.addClass("uncode-scroll-front").addClass("uncode-scroll-active").addClass("uncode-scroll-visible").addClass("uncode-scroll-animating-in").css({"z-index":4,"animation-name":animIn,"animation-duration":fp_anim_time+"ms","animation-delay":"","animation-timing-function":fp_easing,"animation-fill-mode":"both",transition:"initial"}).off(animationEnd).on(animationEnd,function(event){event.originalEvent.animationName===animIn&&($(this).addClass("uncode-scroll-already").removeClass("uncode-scroll-front").removeClass("uncode-scroll-animating-in").css({"animation-name":"","animation-duration":"","animation-delay":"","animation-timing-function":"","animation-fill-mode":"",transition:"initial"}),$currentSlide.removeClass("uncode-scroll-active").add($outBg).css({"animation-name":"","animation-duration":"","animation-delay":"","animation-timing-function":"","animation-fill-mode":"",transition:"initial"}),animationEndAction(index,nextIndex)),nextIndex>1?$("body").addClass("window-scrolled"):$("body").removeClass("window-scrolled")}),$currentSlide.addClass("uncode-scroll-animating-out").removeClass("uncode-scroll-front").css({"z-index":"1","animation-name":animOut,"animation-duration":fp_anim_time+"ms","animation-delay":"","animation-timing-function":fp_easing,"animation-fill-mode":"both",transition:"initial","will-change":"auto"}).off(animationEnd).on(animationEnd,function(event){event.originalEvent.animationName===animOut&&$currentSlide.removeClass("uncode-scroll-animating-out")}),$("body").hasClass("uncode-fp-opacity")&&$currentSlide.find("> div").css({"animation-name":"opacityout","animation-duration":fp_anim_time+"ms","animation-delay":"","animation-timing-function":fp_easing,"animation-fill-mode":"both",transition:"initial"}).off(animationEnd).on(animationEnd,function(event){event.originalEvent.animationName==="opacityout"&&$(event.currentTarget).css({"animation-name":"","animation-duration":"","animation-delay":"","animation-timing-function":"","animation-fill-mode":"",transition:""})})}$(".scroll-top").on("click",function(e){return $.fn.fullpage.moveTo(1),!1})},init_fullPage=function(mode){var checkFPeffects;$container.fullpage({sectionSelector:".uncode-scroll-lock",scrollOverflow:!0,scrollOverflowOptions:{click:!1,preventDefaultException:{tagName:/.*/}},navigation:!1,scrollBar:scrollBar,scrollingSpeed:fp_anim_time,verticalCentered:!0,anchors:no_history?!1:dataNames,recordHistory:!no_history,afterRender:function(){$("body").removeClass("fp-waiting"),$(".uncode-scroll-lock",$container).not(":visible").each(function(){var $invisible=$(this).addClass("hidden-scroll")}),$(".uncode-scroll-lock.active",$container).filter(":visible").each(function(){var $visible=$(this).addClass("uncode-scroll-visible"),visIndex=$visible.index(".uncode-scroll-lock:not(.hidden-scroll)");$('ul.onepage-pagination a[data-index="'+visIndex+'"]').addClass("is-selected")}),$("ul.onepage-pagination a").on("click",function(e){e.preventDefault();var $a=$(this),toIndex=$a.data("index");$.fn.fullpage.moveTo(toIndex+1)}),requestTimeout(function(){scrollHashes()},1e3),$(window).on("hashchange",function(e){requestTimeout(function(){scrollHashes()},500)}),anchorLink(),$("body").hasClass("uncode-fp-opacity")&&$all.each(function(index,row){var testmatch=$(row)[0].className.match(/\bstyle-.*?-bg\b/g,""),classBg;typeof testmatch!="undefined"&&testmatch!==null&&(classBg=testmatch[0],$(row).removeClass(classBg).find(".fp-tableCell").addClass(classBg))}),!$("body").hasClass("vmenu")&&!$("body").hasClass("menu-offcanvas")&&$(window).on("menuOpen gdprOpen",function(){$.fn.fullpage.setAutoScrolling(!1)}).on("menuClose gdprClose",function(){$.fn.fullpage.setAutoScrolling(!0)}),$(window).on("menuMobileOpen menuCanvasOpen unmodal-open uncode-sidecart-open",function(){requestTimeout(function(){$.fn.fullpage.setAutoScrolling(!1)},1e3)}).on("menuMobileClose menuCanvasClose unmodal-close uncode-sidecart-closed",function(){$.fn.fullpage.setAutoScrolling(!0)}),UNCODE.isFullPageSnap||(clearRequestTimeout(checkFPeffects),checkFPeffects=requestTimeout(function(){activateBackWash(1),activateKBurns(1)},100))},onLeave:function(index,nextIndex,direction){if(UNCODE.menuOpened||is_scrolling)return!1;is_scrolling=!0;var event=new CustomEvent("fp-slide-leave");window.dispatchEvent(event),slideLeave(index,nextIndex,direction);if($(".uncode-scroll-lock",$container).eq(nextIndex-1).hasClass("hidden-scroll"))return direction==="up"?$.fn.fullpage.moveTo(nextIndex-1):$.fn.fullpage.moveTo(nextIndex+1),!1;$("ul.onepage-pagination a").removeClass("is-selected"),$('ul.onepage-pagination a[data-index="'+(nextIndex-1)+'"]').addClass("is-selected")}})};init_fullPage(),$(window).on("load",function(){requestTimeout(function(){$.fn.fullpage.reBuild()},3e3)});var addScrollingClass,removeScrollingClass;window.addEventListener("fp-slide-scroll",function(){addScrollingClass=requestTimeout(function(){$("body").addClass("fp-slide-scrolling")},10),clearRequestTimeout(removeScrollingClass),removeScrollingClass=requestTimeout(function(){$("body").removeClass("fp-slide-scrolling")},150),Waypoint.refreshAll()},!1);var setFPheight=function(){var $body=document.body,$footer=document.getElementById("colophon"),$maincontainer=document.querySelector(".main-wrapper"),$boxcontainer=document.querySelector(".box-container"),$sections=document.querySelectorAll(".fp-section"),rect=$maincontainer.getBoundingClientRect(),rect2=$boxcontainer.getBoundingClientRect(),$masthead=document.getElementById("masthead"),_hideMenu=!1,menuHeight=UNCODE.menuHeight;$body.style.height=UNCODE.wheight+"px",!document.body.classList.contains("vmenu")&&document.body.classList.contains("uncode-fp-menu-hide")&&(_hideMenu=!0);if($masthead.classList.contains("menu-transparent")||_hideMenu===!0)menuHeight=0;theres_footer&&($footer.style.top=(rect.height||rect2.height)+"px");for(var i=0;i<$sections.length;i++)$sections[i].style.maxHeight=UNCODE.wheight-menuHeight+"px"};setFPheight(),window.addEventListener("resize",setFPheight,!1),window.addEventListener("orientationchange",setFPheight,!1)},UNCODE.particles=function(){$(".vc-particles-background").each(function(){var $particle=$(this),$parent=$particle.closest("[data-parent]");$parent.prepend($particle)})},UNCODE.readMoreCol=function($el){if(typeof $el=="undefined"||$el===null)$el=$("body");var $readMoreCols=$(".uncont.overflow-hidden-mask[data-ov-height]",$el);$readMoreCols.each(function(){var $uncont=$(this),$row=$uncont.closest(".row-container"),max_h=$uncont.attr("data-ov-height"),max_h_mobile=$uncont.attr("data-ov-height-mobile"),actual_max_h=$uncont.outerHeight(),inner_h,$read_more=$("+ .btn-more-wrap",$uncont),read_more_resize=$read_more.hasClass("trigger-resize"),marginClosedBtn=$uncont.attr("data-margin-closed"),marginClosed=0,marginOpenBtn=$uncont.attr("data-margin-open"),marginOpen=0,anim_t=250,resized=!1;max_h_mobile=typeof max_h_mobile=="undefined"||max_h_mobile===null?"":max_h_mobile;switch(marginClosedBtn){case"sm":marginClosed=18;break;case"std":marginClosed=36;break;case"lg":marginClosed=72;break;case"":default:marginClosed=0}switch(marginOpenBtn){case"sm":marginOpen=18;break;case"std":marginOpen=36;break;case"lg":marginOpen=72;break;case"no":marginOpen=0}var checkToggleMobile=function(){UNCODE.wwidth<=UNCODE.mediaQuery&&max_h_mobile!==""&&(resized=!0,$read_more.hasClass("state-closed")&&($uncont[0].style.height="",$uncont[0].style.maxHeight=max_h_mobile)),resized===!0&&UNCODE.wwidth>UNCODE.mediaQuery&&($read_more.hasClass("state-closed")&&($uncont[0].style.height="",$uncont[0].style.maxHeight=max_h),resized=!1)};checkToggleMobile(),$(window).on("resize",function(){checkToggleMobile()}),$("a",$read_more).on("click",function(e){e.preventDefault();var $a=$(this);if($read_more.hasClass("state-closed"))$read_more.removeClass("state-closed").addClass("state-open"),$uncont.css({"max-height":"none",height:"auto"}),inner_h=parseFloat($uncont.outerHeight()),$uncont.css({height:UNCODE.wwidth<=UNCODE.mediaQuery&&max_h_mobile!==""?max_h_mobile:max_h}),anim_t=inner_h-actual_max_h,anim_t<250?anim_t=250:anim_t>1e3&&(anim_t=1e3),$uncont.css({"transition-duration":anim_t+"ms"}).addClass("overflow-mask-animation").animate({height:inner_h},anim_t,"easeInOutCubic",function(){$uncont.css({height:"auto"}).removeClass("overflow-mask"),read_more_resize===!0&&(window.dispatchEvent(new Event("resize")),typeof ScrollTrigger!="undefined"&&ScrollTrigger!==null&&ScrollTrigger.refresh(!0))}),marginOpen!=""&&$read_more.animate({"margin-top":marginOpen},anim_t,"easeInOutCubic");else{$read_more.removeClass("state-open").addClass("state-closed"),$uncont.addClass("overflow-mask").removeClass("overflow-mask-animation").animate({height:UNCODE.wwidth<=UNCODE.mediaQuery&&max_h_mobile!==""?max_h_mobile:max_h},anim_t,"easeInOutCubic",function(){read_more_resize===!0&&(window.dispatchEvent(new Event("resize")),typeof ScrollTrigger!="undefined"&&ScrollTrigger!==null&&ScrollTrigger.refresh(!0))}),marginClosed!==""&&$read_more.animate({"margin-top":marginClosed},anim_t,"easeInOutCubic");if($a.hasClass("toggle-scroll")){var $masthead=$("#masthead > div:first-child"),headH=$masthead.outerHeight(),rectTop=$row[0].getBoundingClientRect().top,checkNavBar=$a.hasClass("toggle-navbar"),checkNavBarMobile=$a.hasClass("toggle-navbar-mobile"),offCont=$row.offset().top;UNCODE.wwidth<=UNCODE.mediaQuery&&(checkNavBar=checkNavBarMobile),checkNavBar&&(offCont-=headH),rectTop<headH&&$("html, body").on("scroll wheel DOMMouseScroll mousewheel touchmove",function(){$(this).stop()}).animate({scrollTop:offCont},anim_t,"easeInOutCubic")}}})})},UNCODE.filters=function(){var $systems=$(".isotope-system, .cssgrid-system");$systems.each(function(index,val){var $system=$(this),$widget_trgr=$(".uncode-woocommerce-toggle-widgetized-cb__link",$system),$widgets=$(".widgetized-cb-wrapper",$system),$sorting_trgr=$(".uncode-woocommerce-sorting__link",$system),$sorting_dd=$(".uncode-woocommerce-sorting-dropdown",$system),$cats_trigger=$(".menu-smart--filter-cats_mobile-toggle-trigger",$system),$cats_filters=$(".menu-smart--filter-cats-mobile-dropdown",$system);if($system.hasClass("isotope-processed"))return;$cats_trigger.on("click",function(e){$("html").hasClass("screen-sm")||(e.preventDefault(),$widgets.slideUp(400,"easeInOutCirc"))}),$(".filters-toggle-trigger",$system).on("click",function(e){e.preventDefault();var $filters=$(".isotope-filters .menu-horizontal",$system);$filters.slideToggle(400,"easeInOutCirc"),$widgets.add($cats_filters).slideUp(400,"easeInOutCirc")}),$widget_trgr.on("click",function(e){e.preventDefault(),$widgets.slideToggle(400,"easeInOutCirc"),$("html").hasClass("screen-sm")||$cats_filters.slideUp(400,"easeInOutCirc"),window.dispatchEvent(new CustomEvent("boxResized"))}),$sorting_trgr.on("click",function(e){e.preventDefault(),$("html").hasClass("screen-sm")||$widgets.add($cats_filters).slideUp(400,"easeInOutCirc")}),$system.addClass("isotope-processed")})},UNCODE.widgets=function(){var widget_collapses=$(".widget-collapse");widget_collapses.each(function(){var widget_collapse=$(this),widget_title=widget_collapse.find(".widget-title"),widget=widget_title.closest(".widget"),content=widget.children().not(".widget-title"),setCTA;widget_collapse.hasClass("widget-tablet-collapse-open")&&UNCODE.wwidth<=UNCODE.mediaQuery&&UNCODE.wwidth>UNCODE.mediaQueryMobile&&widget_title.toggleClass("open"),widget_title.each(function(){var _this=$(this),content=_this.closest(".widget").find(".widget-collapse-content");$(window).on("load resize",function(){clearRequestTimeout(setCTA),setCTA=requestTimeout(function(){content.is(":visible")?_this.addClass("open"):_this.removeClass("open")},10)}),_this.on("click",function(){var icon_content=window.getComputedStyle(_this[0],":after").getPropertyValue("content");if(icon_content==="none"||!icon_content)return!1;_this.toggleClass("open");var isOpen=_this.hasClass("open"),hasBorder=_this.closest(".widget-no-separator").length?9:27;return content.animate({height:"toggle",padding:"toggle",opacity:"toggle",top:isOpen?0:hasBorder},{duration:400,easing:"easeInOutCirc"}),!1})})});var $widgets_without_title=$(".collapse-init").removeClass("collapse-init")},UNCODE.unmodal=function(){$(document).off("click",".open-unmodal").on("click",".open-unmodal",function(){$(".unmodal-overlay").fadeIn(),$(".unmodal-overlay").addClass("loading"),$("body").addClass("uncode-unmodal-overlay-visible"),$(window).trigger("unmodal-open")}),$(document).off("click",".unmodal-overlay").on("click",".unmodal-overlay, .unmodal-close",function(){$(".unmodal-overlay").fadeOut(),$(".unmodal").fadeOut(),$("body").removeClass("uncode-unmodal-overlay-visible"),$("body").removeClass("uncode-unmodal-open"),$("html").removeClass("uncode-unmodal-body-disable-scroll"),$(document).trigger("unmodal-close"),UNCODE.isUnmodalOpen=!1}),$(document).on("uncode-unmodal-show-content",function(){$(".unmodal-overlay").removeClass("loading"),$(".unmodal").show(),$(".unmodal").addClass("show-unmodal-with-animation"),$(".unmodal-content")[0].scrollTop=0,$("body").addClass("uncode-unmodal-open"),UNCODE.isUnmodalOpen=!0,$("body").hasClass("qw-body-scroll-disabled")&&$("html").addClass("uncode-unmodal-body-disable-scroll"),$(".unmodal").hasClass("auto-height")&&set_modal_height()});var set_modal_height=function(){var modal=$(".unmodal").css({height:"auto"}),window_height=$(window).outerHeight(),modal_height=modal.outerHeight();modal.css("height","auto"),modal_height>window_height&&modal.outerHeight(window_height)};if($(".unmodal").hasClass("auto-height")){var setCTA;$(window).on("resize",function(){clearRequestTimeout(setCTA),setCTA=requestTimeout(function(){set_modal_height()},100)})}},UNCODE.bgChanger=function(){var $bg_changers=$(".vc_row[data-bg-changer]:visible"),$bg_first=$(".vc_row[data-bg-remove]"),bg_remove=$bg_first.attr("data-bg-remove"),$first=$bg_changers.first(),$last=$bg_changers.last(),$bg_wrapper=$("#changer-back-color"),$bg_changings=$("div[data-bg-changing]",$bg_wrapper),setCTA,localH=UNCODE.wheight,isScrolling;$bg_first.removeClass(bg_remove);var bgChange=function($col,bgColor,skin,tmbskin){$bg_wrapper.attr("class",bgColor);var menuskin;typeof skin!="undefined"&&(menuskin=skin.replace("style","menu")),$col.length&&($(".uncol[data-skin-change]").each(function(){var $isoFooter=$(".isotope-footer",this);$(this).add($isoFooter).removeClass("style-dark").removeClass("style-light").addClass(skin),menuskin!==""&&$(this).find(".isotope-filters:not(.with-bg)").removeClass("menu-dark").removeClass("menu-light").addClass(menuskin)}),$(".tmb[data-skin-change]").each(function(){$(this).removeClass("tmb-dark").removeClass("tmb-light").addClass(tmbskin)}))},$masthead=$("#masthead"),transDesktop,transMobile,changeSkin,checkTransparencyAndChange=function(skin){transDesktop=$masthead.hasClass("menu-desktop-transparent")&&UNCODE.wwidth>=UNCODE.mediaQuery,transMobile=$masthead.hasClass("menu-mobile-transparent")&&UNCODE.wwidth<UNCODE.mediaQuery,changeSkin=$masthead.hasClass("menu-change-skin");if(!transDesktop&&!transMobile)return!1;if(!changeSkin)return!1;if(skin==="style-light")return $masthead.removeClass("style-dark-override").addClass("style-light-override"),!1;if(skin==="style-dark")return $masthead.removeClass("style-light-override").addClass("style-dark-override"),!1},bg_waypoints=function(){$bg_changers.length&&!SiteParameters.is_frontend_editor&&($.each($bg_changers,function(index,row){var $row=$(row),$col=$(".uncol[data-skin-change]",$row).eq(0),skin,$tmbs,tmbskin,bgColor=$row.attr("data-bg-color");if(!$row.is(":visible"))return!1;$col.length&&(skin=$col.attr("data-skin-change"),$tmbs=$(".tmb[data-skin-change]",$row),tmbskin=skin.replace("style","tmb")),$row.hasClass("unscroll-horizontal")||($row.waypoint(function(dir){if(dir!=="down")return;bgChange($col,bgColor,skin,tmbskin),checkTransparencyAndChange(skin)},{offset:"50%"}),$row.waypoint(function(dir){if(dir!=="up")return;bgChange($col,bgColor,skin,tmbskin),checkTransparencyAndChange(skin)},{offset:function(){var clH=this.element.clientHeight,wH=window.innerHeight,ret=clH>200?-100:clH*-0.5;return wH/2-clH}}))}),$("body").addClass("bg-changer-init"))},body=document.body,edges=!1,throttle=function(fn,wait){var time=Date.now();return function(){time+wait-Date.now()<0&&(fn(),time=Date.now())}},$wrapper=document.querySelector(".main-wrapper"),currentPixel=window.pageYOffset||window.document.documentElement.scrollTop,$title=document.querySelector("#rotating");$title!==null&&($title.style.whiteSpace="nowrap",$title.style.transition="transform 200ms linear"),window.addEventListener("scroll",throttle(function(){window.clearRequestTimeout(isScrolling),isScrolling=requestTimeout(function(){var scrolled=window.pageYOffset||window.document.documentElement.scrollTop,body=document.body,html=document.documentElement,docH=Math.max(body.scrollHeight,body.offsetHeight,html.clientHeight,html.scrollHeight,html.offsetHeight),$row=!1,firstOff,lastOff;if(scrolled<100&&$first.length){firstOff=$first.offset().top;if(firstOff<100)var $row=$first}else if(scrolled+UNCODE.wheight>docH-100&&$last.length){lastOff=$last.offset().top+$last.outerHeight();if(lastOff>docH-100)var $row=$last}if($row.length){var $col=$(".uncol[data-skin-change]",$row).eq(0),skin,$tmbs,tmbskin,bgColor=$row.attr("data-bg-color");$col.length&&(skin=$col.attr("data-skin-change"),$tmbs=$(".tmb[data-skin-change]",$row),tmbskin=skin.replace("style","tmb")),bgChange($col,bgColor,skin,tmbskin),checkTransparencyAndChange(skin),edges=!0}},150),edges===!0&&(bg_waypoints(),Waypoint.refreshAll(),edges=!1)},100),!1),$(window).on("resize",function(){clearRequestTimeout(setCTA),setCTA=requestTimeout(function(){localH!=UNCODE.wheight&&(localH=UNCODE.wheight,bg_waypoints(),Waypoint.refreshAll())},100)}),bg_waypoints()},UNCODE.skewIt=function(){if($("body").hasClass("compose-mode"))return;var justscrolled=!1,loadSkewIt=function(){var $pageHeader=$("#page-header"),$page_body=$(".page-body"),$header_skew=$(".uncode-skew.vc_row[data-parent]",$pageHeader);$header_skew.length&&($pageHeader.addClass("uncode-skew").css({position:"relative",zIndex:1}),$header_skew.removeClass("uncode-skew"),$page_body.css({position:"relative",zIndex:0}));var $skew=$(".uncode-skew"),$horizontal=$skew.hasClass("index-scroll")?$skew:$skew.closest(".index-scroll"),horizontal=$horizontal.length,stopSkewing,lastOffset=0,lastDate=Date.now();if(!$skew.length)return;var dropSkew=function(){if(UNCODE.wwidth<UNCODE.mediaQuery)return;$skew.each(function(){var $this=$(this),$drop=$(".t-entry-drop:not(.drop-parent)",$this);if($drop.length){$this.css({transform:"skew(0)"});var bound=$this[0].getBoundingClientRect();$drop.css({left:bound.x*-1,top:bound.y*-1})}})};dropSkew(),$(window).on("resize",dropSkew),window.addEventListener("scroll",function(){if(justscrolled!==!0){justscrolled=!0;return}window.clearRequestTimeout(stopSkewing);var now=Date.now(),delayInMs=now-lastDate,offset=window.pageYOffset||window.document.documentElement.scrollTop,newOffset=offset-lastOffset,speed=Math.pow(newOffset/delayInMs,3)*-1,body=document.body,html=document.documentElement,docH=Math.max(body.scrollHeight,body.offsetHeight,html.clientHeight,html.scrollHeight,html.offsetHeight),wait=50,maxSpeed=UNCODE.wwidth>UNCODE.mediaQuery?1:2;if(lastDate+wait-now<0){lastDate=now,lastOffset=offset,speed>6?speed=6:speed<-6&&(speed=-6),speed>2&&offset<UNCODE.wheight?speed=2:speed<-2&&offset+UNCODE.wheight*2>docH&&(speed=-2);var speedY=speed,speedX=speed*1.25;if(horizontal){speedY=0;if($horizontal.hasClass("row-scroll-no-md")&&UNCODE.wwidth<=UNCODE.mediaQuery){speedX=0;return}if($horizontal.hasClass("row-scroll-no-sm")&&UNCODE.wwidth<=UNCODE.mediaQueryMobile){speedX=0;return}}else speedX=0;$skew.closest(".enter-st").length||(speedX=0),gsap.killTweensOf($skew),gsap.to($skew,{duration:.2,skewY:speedY*maxSpeed+"deg",skewX:speedX*maxSpeed+"deg",ease:Power0.easeNone,transformOrigin:"center"})}stopSkewing=requestTimeout(function(){gsap.killTweensOf($skew),gsap.to($skew,{duration:.5,skewY:"0deg",skewX:"0deg",transformOrigin:"center",ease:Expo.easeOut}),$skew.each(function(){var $this=$(this),$drop=$(".t-entry-drop:not(.drop-parent)",$this);if($drop.length){var bound=$this[0].getBoundingClientRect();$drop.css({left:bound.x*-1,top:bound.y*-1})}})},200)},!1)};$(window).on("load",loadSkewIt)},UNCODE.rotateIt=function(){if($("body").hasClass("compose-mode"))return;var frameRotate=!1,loadRotateIt=function(){var $toRotate=$(".uncode-rotate");$toRotate.each(function(){var $rotate=$(this),deg=0,dir=!0,coeff=1,lastOffset=0,lastDate=Date.now(),checkScroll=function($rotate){var now=Date.now(),delayInMs=now-lastDate,offset=window.pageYOffset||window.document.documentElement.scrollTop,newOffset=offset-lastOffset,speed=newOffset/delayInMs*5,body=document.body,html=document.documentElement,docH=Math.max(body.scrollHeight,body.offsetHeight,html.clientHeight,html.scrollHeight,html.offsetHeight);lastDate=now,lastOffset=offset;if(Math.abs(deg)>359||isNaN(deg))deg=0;if($rotate.hasClass("uncode-rotate-scroll")||$rotate.hasClass("uncode-rotate-speed"))deg=parseFloat(deg)+parseFloat(speed);$rotate.hasClass("uncode-rotate-hover")&&$rotate.hover(function(){coeff=1.75},function(){coeff=1}),$rotate.hasClass("uncode-rotate-scroll")||(deg+=coeff);if($rotate.closest(".un-text-marquee").length&&UNCODE.wwidth<=UNCODE.mediaQuery)return!1;if($rotate.closest(".un-text-marquee").length&&!$rotate.closest(".un-marquee-scroll, .un-marquee-opposite").length){var undeg=deg*-1;$rotate[0].style.transform="rotate("+undeg+"deg)"}else $rotate[0].style.transform="rotate("+deg+"deg)";requestAnimationFrame(function(){if(frameRotate===!0){frameRotate=!1;return}checkScroll($rotate)})};checkScroll($rotate)})};$(window).on("load",loadRotateIt);var checkRotate,resizeRotate=function(){var $inlineRotates=$(".inline-rotate");$inlineRotates.each(function(){$(this).addClass("inline-rotate-standby")}),clearTimeout(checkRotate),checkRotate=setTimeout(function(){$(".inline-rotate").each(function(){$(this).removeClass("inline-rotate-standby"),frameRotate=!0}),loadRotateIt()},500)};$(window).off("resize.inline-rotate",resizeRotate).on("resize.inline-rotate",resizeRotate)};var marqueeAttempts=0,marqueeTO,marqueeCheckResize;UNCODE.textMarquee=function($titles){var initTextMarquee=function($titles){typeof $titles=="undefined"&&($titles=$(".un-text-marquee"));if(!$titles.length)return;var stableHeight=UNCODE.wheight;$titles.each(function(){var $title=$(this),$span=$("> span, > i > span",$title),txt,first=!0,dataSpeed=parseFloat($title.closest(".heading-text").attr("data-marquee-speed")),dataSpace=parseFloat($title.closest(".heading-text").attr("data-marquee-space")),dataTrigger=$title.closest(".heading-text").attr("data-marquee-trigger"),hasSticky=!1,dataNavBar=$title.closest(".heading-text").attr("data-marquee-navbar"),dataNavBarMobile=$title.closest(".heading-text").attr("data-marquee-navbar-mobile"),newW=UNCODE.wwidth,marqueeTL,inview;if($title.closest(".sticky-trigger").length||$title.closest(".sticky-element").length||$title.closest(".pin-spacer").length)hasSticky=!0,dataTrigger="row";UNCODE.wwidth<=UNCODE.mediaQuery&&(dataNavBar=dataNavBarMobile),dataSpeed=isNaN(dataSpeed)?0:dataSpeed,dataSpace=isNaN(dataSpace)?"default":dataSpace;var dataX=dataSpeed;dataSpeed+=5,$(".marquee-clone-wrap",$title).remove(),txt=$span.html(),$(".marquee-original-core",$span).length?txt=$(".marquee-original-core",$span).html():(txt=$span.html(),$span=$("> span, > i > span",$title).wrapInner('<span class="marquee-original-core" />').addClass("marquee-original"));var spanW,$prepended=$('<span class="marquee-clone-wrap wrap-prepended" />'),$appended=$('<span class="marquee-clone-wrap wrap-appended" />'),speed=10-dataSpeed;$span.prepend($prepended),$span.append($appended);var continuousTextMarquee=function(){var bound=$title.css({transform:"none",opacity:0}).offset(),ease="none",xStrt=first||$title.hasClass("un-marquee-infinite")?0:UNCODE.wwidth-bound.left,xEnd=$title.hasClass("un-marquee-infinite")?spanW:spanW+bound.left,xSpeed=(xEnd+xStrt)/(dataSpeed*dataSpeed*dataSpeed)/5*dataSpeed,direction=$title.hasClass("un-marquee-opposite")?1:-1,speedSlow=(xEnd+xStrt)/45,transFormVal,translX;marqueeTL=new TimelineMax({paused:!0,reversed:!0});var inViewElement=dataTrigger==="row"?hasSticky?$title.closest(".sticky-trigger, .sticky-element").parent()[0]:$title.closest(".vc_row")[0]:$title[0],wayOff=dataTrigger==="row"&&dataNavBar==="yes"?UNCODE.menuHeight:0;inview=new Waypoint.Inview({element:inViewElement,offset:wayOff,enter:function(direction){marqueeTL.play()},exited:function(direction){$title.closest(".pin-spacer").length||marqueeTL.pause()}});if($title.hasClass("un-marquee-hover")){var $column=$title.closest(".wpb_column"),$col_link=$(".col-link",$column),$hover_sel=$title;$col_link.length&&($hover_sel=$title.add($column)),$hover_sel.on("mouseover",function(){ease="power2.out",transFormVal=$title.css("transform").split(/[()]/)[1],translX=transFormVal.split(",")[4],speedSlow=(xEnd+(xStrt-translX))/45,marqueeTL.duration(speedSlow)}).on("mouseout",function(){ease="power2.in",transFormVal=$title.css("transform").split(/[()]/)[1],translX=transFormVal.split(",")[4],speedSlow=(xEnd+(xStrt-translX))/(dataSpeed*dataSpeed*dataSpeed)/5*dataSpeed,marqueeTL.duration(speedSlow)})}gsap.killTweensOf($title),marqueeTL.fromTo($title,{opacity:1,x:xStrt*direction*-1},{duration:xSpeed,x:xEnd*direction,onComplete:function(){first=!1,continuousTextMarquee()},ease:ease})},runTextMarquee=function(){var time=Date.now(),textMarqueeScroll=function(){var $row=$title.closest(".vc_row");hasSticky&&($row=$title.closest(".sticky-trigger, .sticky-element").parent());var $bound=dataTrigger==="row"||dataTrigger==="row-middle"?$row:$title;if(!$bound.length)return;var bound=$bound[0].getBoundingClientRect(),wait=100,direction=$title.hasClass("un-marquee-scroll-opposite")?-1:1,dataMove=dataX>=0?1+dataX:-1*5/(dataX-.5)*.25;bound.top===0&&bound.bottom===0&&bound.left===0&&bound.right===0&&bound.height===0&&bound.width===0&&bound.x===0&&bound.y===0&&marqueeAttempts<2&&(clearRequestTimeout(marqueeTO),marqueeTO=requestTimeout(function(){marqueeAttempts++,initTextMarquee()},100));var bound_top=bound.top,gsap_calc=(stableHeight*.35-bound_top)*dataMove*.5*direction;if(dataTrigger==="row"||dataTrigger==="row-middle")dataTrigger==="row-middle"&&(bound_top=bound.top+bound.height*.5-stableHeight*.5),dataNavBar==="yes"&&(bound_top-=UNCODE.menuHeight),gsap_calc=bound_top*dataMove*.5*direction;gsap.killTweensOf($title),gsap.to($title,{duration:.24,x:gsap_calc})};textMarqueeScroll(),$(window).on("load scroll",function(e){textMarqueeScroll()})},cloneSpan=function($_title,cntnt){$_title.hasClass("un-marquee-infinite")&&$("> span.marquee-clone-wrap",$_title).text(""),gsap.to($_title,{duration:0,x:0}),spanW=$span.outerWidth();if(!spanW)return;var part=Math.ceil(UNCODE.wwidth/spanW)*2,spaceSpan=dataSpace!=="default"?'<span class="marquee-space-'+dataSpace+'"> </span>':" ";if($_title.hasClass("un-marquee-infinite"))for(var i=0;i<part;i++)$prepended.append(cntnt+spaceSpan),$appended.append(cntnt+spaceSpan);if($("body").hasClass("compose-mode")){$(".uncode_fe_safe").remove();return}if($title.closest(".marquee-freezed").length)return;($_title.hasClass("un-marquee")||$_title.hasClass("un-marquee-opposite"))&&continuousTextMarquee(),($_title.hasClass("un-marquee-scroll")||$_title.hasClass("un-marquee-scroll-opposite"))&&runTextMarquee()},marqueeResize=function(e){clearRequestTimeout(marqueeCheckResize),marqueeCheckResize=requestTimeout(function(){newW!==UNCODE.wwidth&&(gsap.killTweensOf($title),typeof inview!="undefined"&&inview!==null&&inview.destroy(),typeof marqueeTL!="undefined"&&marqueeTL!==null&&marqueeTL.kill(),first=!0,initTextMarquee(),newW=UNCODE.wwidth)},1e3)};$(window).off("resize uncode.re-layout",marqueeResize).on("resize uncode.re-layout",marqueeResize),cloneSpan($title,txt),$("body").hasClass("compose-mode")&&typeof window.parent.vc!="undefined"&&window.parent.vc.events.on("shortcodeView:updated",function(e){var $_titles=$(".un-text-marquee",e.view.$el);clearRequestTimeout(marqueeCheckResize),marqueeCheckResize=requestTimeout(function(){initTextMarquee($_titles)},1e3)})}),$(window).on("load wwResize",function(e){stableHeight=UNCODE.wheight})};document.addEventListener("DOMContentLoaded",function(){initTextMarquee()}),$(window).on("focus",function(){setTimeout(function(){initTextMarquee()},500)}),$(document).on("pumAfterOpen pumAfterClose",function(args){initTextMarquee()})},UNCODE.parallax=function(){if(!UNCODE.isFullPage&&!UNCODE.isFullPageSnap&&(UNCODE.wwidth>UNCODE.mediaQuery||SiteParameters.mobile_parallax_animation==="1")&&$(".parallax-el").length>0){var parallax_elements=new Rellax(".parallax-el");$(document.body).trigger("uncode_parallax_done",parallax_elements),window.addEventListener("boxResized",function(e){parallax_elements.refresh()},!1),$(window).on("uncode_wc_variation_gallery_loaded",function(event){requestTimeout(function(){parallax_elements.refresh()},100)}),typeof UNCODE.hDoc=="undefined"&&(UNCODE.hDoc=Math.max(document.body.scrollHeight,document.body.offsetHeight,document.documentElement.clientHeight,document.documentElement.scrollHeight,document.documentElement.offsetHeight));function paralraf(time){requestAnimationFrame(paralraf);var newHdoc=Math.max(document.body.scrollHeight,document.body.offsetHeight,document.documentElement.clientHeight,document.documentElement.scrollHeight,document.documentElement.offsetHeight);UNCODE.hDoc!==newHdoc&&(UNCODE.hDoc=newHdoc,parallax_elements.refresh())}requestAnimationFrame(paralraf)}},UNCODE.magicCursor=function(){function delayChangeCursor(cursorType,cursorTitle,cursorBg,delayt_time,dataTitle,fontClass){currentBg!==!1&&cursorBg===!1&&cursorType==="auto"&&($tooltip.css({opacity:0}),delayt_time+=400),clearRequestTimeout(setTime),setTime=requestTimeout(function(){$tooltip.css({opacity:""}),$customCursor.find("> span:first-child").add($tooltip).removeClass("tooltip-boing"),cursorTitle!==""?(fromTitle&&dataTitle==="boing"&&setTimeout(function(){$customCursor.find("> span:first-child").add($tooltip).addClass("tooltip-boing")},5),$cursorSpan.attr("class",fontClass).html(cursorTitle)):cursorType!=="auto"&&$cursorSpan.html(""),$cursorSpan.addClass("in-tooltip"),$customCursor.attr("data-cursor",cursorType),fromTitle?$customCursor.addClass("from-tooltip-title"):$customCursor.removeClass("from-tooltip-title"),cursorBg!==!1?$customCursor.attr("data-bg","transparent"):$customCursor.removeAttr("data-bg"),currentBg=cursorBg,cursorTitle!==""?(fromTitle=!0,$customCursor.attr("data-cursor",cursorType),$customCursor.attr("data-title","true"),$cursorSpan.css({width:""})):(fromTitle=!1,$customCursor.removeAttr("data-title")),spanW=$cursorSpan.outerWidth(),spanW>=maxW&&maxW!==!1?($customCursor.find("> span:first-child").add($tooltip).addClass("max-width"),$customCursor.find("> span:first-child").add($tooltip).add($cursorSpan).css({width:maxW}),spanW=maxW):$customCursor.find("> span:first-child").removeClass("max-width"),spanH=$cursorSpan.outerHeight(),spanW&&spanH&&cursorTitle!==""&&cursorType.indexOf("icon-")>=0?$customCursor.find("> span:first-child").add($tooltip).css({width:spanW,height:spanH}):$customCursor.find("> span:first-child").add($tooltip).removeAttr("style"),$customPilot.length&&$customPilot.attr("data-cursor",cursorType)},delayt_time)}function changeCursor($wrap){$wrap=typeof $wrap=="undefined"?$("body"):$wrap;var href=SiteParameters.custom_cursor_selector!=""?SiteParameters.custom_cursor_selector:"[href], a[data-lbox]",$href=$wrap.find(href),cursorType,cursorTitle="",tooltip_class="",cursorBg=!1;$href.filter(":not(.cursor-init)").on("mouseenter.cursor",function(e){var $this=$(this).addClass("cursor-init"),$tmb=$this.closest(".tmb"),data_cursor=$this.closest("[data-cursor]").attr("data-cursor")||$this.attr("data-cursor"),cursor_bg=$this.closest("[data-cursor]").attr("data-cursor-transparent")||$this.attr("data-cursor-transparent"),data_title=$this.closest("[data-cursor]").attr("data-cursor-title")||$this.attr("data-cursor-title"),data_class=$this.closest("[data-cursor]").attr("data-tooltip-class")||$this.attr("data-tooltip-class"),custom_text=$this.closest("[data-cursor]").attr("data-tooltip-text")||$this.attr("data-tooltip-text"),$title=$(".t-entry-title",$tmb),is_frontend_editor=$this.closest(".vc_controls").length,hasSrcOrClck=$("[src]",$this).length||$(".t-background-cover",$this).length||$this.closest(".tmb-click-row").length,$parent_cursor=$this.closest('[class*="custom-cursor"]');is_frontend_editor?cursorType="auto":typeof data_cursor!="undefined"&&data_cursor!==""&&hasSrcOrClck?cursorType=data_cursor:$parent_cursor.length?$parent_cursor.hasClass("custom-cursor-light")?cursorType="icon-light":$parent_cursor.hasClass("custom-cursor-diff")?cursorType="icon-diff":$parent_cursor.hasClass("custom-cursor-accent")?cursorType="icon-accent":cursorType="icon-dark":cursorType="pointer",typeof data_title!="undefined"&&data_title!==""?typeof custom_text!="undefined"&&custom_text!==""?cursorTitle=custom_text:(cursorTitle=$title.clone(),$("a",cursorTitle).replaceWith(function(){return this.childNodes}),$("*",cursorTitle).replaceWith(function(){return $(this).removeAttr("class")}),cursorTitle=cursorTitle.html()):cursorTitle="",typeof data_class!="undefined"&&data_class!==""?tooltip_class=data_class:tooltip_class="",cursor_bg=="true"?cursorBg=!0:cursorBg=!1,delayChangeCursor(cursorType,cursorTitle,cursorBg,0,data_title,tooltip_class)}).on("mouseleave.cursor",function(){var outTime=150;currentBg!==!1&&cursorBg===!1&&(outTime=0),delayChangeCursor("auto","",!1,outTime,!1,"")}),$(window).on("disable-hover",function(event){document.addEventListener("mousemove",function(e){mouseEvent=e}),delayChangeCursor("auto",cursorTitle,cursorBg,0,!1,"")}),$(window).on("enable-hover",function(event){if(typeof mouseEvent!="undefined"){var x=mouseEvent.clientX,y=mouseEvent.clientY,elements=document.elementsFromPoint(x,y),$element=$(elements[0]);$element.closest(href).trigger("mouseenter")}})}var $customCursor=$("#uncode-custom-cursor"),$customPilot=$("#uncode-custom-cursor-pilot"),$tooltip=$(".title-tooltip",$customCursor),$cursorSpan=$("> span",$tooltip),currentBg=!1,fromTitle=!1,setTime,mouseEvent,spanW,spanH,maxW=!1;$(window).on("load uncode-custom-cursor uncode-quick-view-loaded",function(event){changeCursor()}),$(document).ajaxComplete(function(event,xhr,settings){changeCursor()}),$(".isotope-container").on("isotope-layout-complete",function(){var $this=$(this);changeCursor($this)})},UNCODE.magneticCursor=function(){function magneticCursor($wrap){$wrap=typeof $wrap=="undefined"?$("body"):$wrap;var $magnetics=$wrap.find(".tmb-image-anim-magnetic .t-entry-visual").has("img:not(.avatar), .t-background-cover, .dummy.secondary-dummy-image, .t-secondary-background-cover").add($(".magnetic").has(".background-inner, .header-bg"));$magnetics.on("mousemove",function(e){var $this=$(this),$el,bound=e.currentTarget.getBoundingClientRect(),coeff=30,hor=bound.width/2-(e.clientX-bound.left),ver=bound.height/2-(e.clientY-bound.top),toX=hor/bound.width*coeff,toY=ver/bound.height*coeff,scaleX=((bound.width+coeff+5)/bound.width).toFixed(2),scaleY=((bound.height+coeff+5)/bound.height).toFixed(2),toScale=Math.max(scaleX,scaleY);$this.hasClass("magnetic")?$el=$(".background-inner, .header-bg",$this):$el=$("img:not(.avatar), .t-background-cover, .fluid-object, .dummy.secondary-dummy-image, .t-secondary-background-cover",$this),gsap.killTweensOf($el),gsap.to($el,{duration:.75,x:toX,y:toY,scale:toScale,ease:Power1.easeOut,transformPerspective:900,transformOrigin:"center",force3D:!0})}).on("mouseout",function(e){var $this=$(this),$el;$this.hasClass("magnetic")?$el=$(".background-inner, .header-bg",$this):$el=$("img:not(.avatar), .t-background-cover, .fluid-object, .dummy.secondary-dummy-image, .t-secondary-background-cover",$this),gsap.killTweensOf($el),gsap.to($el,{duration:.6,y:0,x:0,scale:1,ease:Power1.easeOut,transformPerspective:900,transformOrigin:"center",force3D:!0})})}$(window).on("load uncode-custom-cursor uncode-quick-view-loaded",function(event){magneticCursor()}),$(document).ajaxComplete(function(event,xhr,settings){magneticCursor()}),$(".isotope-container").on("isotope-layout-complete",function(){var $this=$(this);magneticCursor($this)})},UNCODE.dropImage=function(){function imageHover(){if($("body").hasClass("compose-mode")&&typeof window.parent.vc!="undefined")return;var $postLists=$(".uncode-post-titles");$postLists.each(function(){function manageVideos($el,start){var videoElem=$("video",$el),$iframe=$("iframe",$el),iframeID=$iframe.attr("id");videoElem.length&&(Object.prototype.toString.call(videoElem[0].setCurrentTime)=="[object Function]"?start?(videoElem[0].setCurrentTime(0),videoElem[0].play()):(videoElem[0].pause(),videoElem[0].setCurrentTime(0)):start?(videoElem[0].currentTime=0,videoElem[0].play()):(videoElem[0].pause(),videoElem[0].currentTime=0)),$el.data("active",start);if($el.attr("data-provider")==="vimeo"&&typeof iframeID!="undefined"&&iframeID!==null){var iframeIDv=iframeID.replace("okplayer-",""),optionsV=$(window).data("okoptions-"+iframeIDv),vimeo=$iframe[0],playerV=new Vimeo.Player(vimeo),timeV=0;if(optionsV.time!=null){var timeArr=optionsV.time.replace("t=","").split(/([^\d.-])/);for(var i=0;i<timeArr.length;i++)timeArr[i]==="h"?timeV+=parseFloat(timeArr[i-1])*3600:timeArr[i]==="m"?timeV+=parseFloat(timeArr[i-1])*60:timeArr[i]==="s"&&(timeV+=parseFloat(timeArr[i-1]))}playerV.setCurrentTime(timeV),start?(playerV.setVolume(0),playerV.play()):playerV.pause()}else $el.attr("data-provider")==="youtube"&&(start?$el.trigger("uncode-resume"):$el.trigger("uncode-pause"))}var $list=$(this),timing=parseFloat($list.attr("data-timing")),default_image=$list.hasClass("uncode-post-titles-default-image"),default_title=$list.hasClass("uncode-post-titles-default-title"),$tmbs=$(".tmb",$list),$drop_moves=$(".t-entry-drop:not(.drop-parent)",$tmbs),clientX,clientY,$row_parent=$list.closest(".vc_row"),$drop_row_parents=$(".drop-parent.drop-parent-row",$list),$col_parent=$list.closest(".uncell"),$drop_col_parents=$(".drop-parent.drop-parent-column",$list),setCTA;timing*=.001;var drop_bgs=function(){$drop_row_parents.add($drop_col_parents).filter("[data-bgset]").each(function(e){var $drop=$(this),srcset=$drop.attr("data-bgset"),setArr=srcset.split(","),setArrOrder=[],biggest=0,checkBg=!1,desktopBG=$drop.data("[data-background-image]"),mobileBG=$drop.data("[data-mobile-background-image]");if($drop.hasClass("srcset-bg-async"))if(UNCODE.wwidth<UNCODE.mediaQuery&&typeof mobileBG!="undefined"&&mobileBG!==""||UNCODE.wwidth>=UNCODE.mediaQuery&&typeof desktopBG!="undefined"&&desktopBG!=="")return;if(SiteParameters.uncode_adaptive==1)typeof setArr[0]!="undefined"&&setArr[0]!==null&&$drop.css({"background-image":"url("+setArr[0]+")"});else{for(var i=0;i<setArr.length;i++){var setLoop=setArr[i].trim().split(" ");if(typeof setLoop[1]!="undefined"&&setLoop[1]!==""){var parseSet=parseFloat(setLoop[1]);biggest<parseSet&&(biggest=parseSet),setArrOrder[parseSet]=setLoop[0],screenInfo.width<=parseSet&&typeof setLoop[0]!="undefined"&&setLoop[0]!==null&&(checkBg=!0,$drop.css({"background-image":"url("+setLoop[0]+")"}))}}!checkBg&&typeof setArrOrder[biggest]!="undefined"&&setArrOrder[biggest]!==null&&$drop.css({"background-image":"url("+setArrOrder[biggest]+")"})}})};drop_bgs();var dropMovesSize=function(){if(UNCODE.wwidth<UNCODE.mediaQuery)return;$drop_moves.each(function(){var $drop_move=$(this),dataW=$drop_move.attr("data-w"),$anim_parent=$drop_move.closest(".animate_when_almost_visible:not(.uncode-skew):not(.t-inside), .parallax-el");typeof dataW!="undefined"&&dataW!==null&&(dataW=screenInfo.width/12*parseFloat(dataW)),$drop_moves.css({width:dataW}),$anim_parent.length&&$anim_parent.css("transform")!==""&&$anim_parent.css("transform")!=="none"&&$anim_parent.on("animationend",function(){var bound=$anim_parent[0].getBoundingClientRect();$drop_move.css({left:bound.x*-1,top:bound.y*-1})})})};dropMovesSize(),$(window).on("resize",function(){clearRequestTimeout(setCTA),setCTA=requestTimeout(function(){drop_bgs(),dropMovesSize()},100)}),$drop_row_parents.length&&$row_parent.addClass("drop-added"),$drop_row_parents.each(function(index,val){var $drop=$(val);$row_parent.prepend($drop),manageVideos($drop,!1),typeof UNCODE.initVideoComponent!="undefined"&&UNCODE.initVideoComponent($row_parent[0],".uncode-video-container.video, .uncode-video-container.self-video");if(default_image&&index==0){manageVideos($drop,!0);var bg_img=$drop.css("background-image").match(/url\(["']?([^"']*)["']?\)/)[1],image_ph=new Image;typeof bg_img!="undefined"&&bg_img!==null&&(image_ph.onload=function(){$drop.addClass("active"),default_title&&($list.addClass("drop-hover"),$tmbs.first().addClass("drop-active"))},image_ph.src=bg_img)}}),$drop_col_parents.length&&$col_parent.addClass("drop-added"),$drop_col_parents.each(function(index,val){var $drop=$(this);$col_parent.prepend($drop),manageVideos($drop,!1),typeof UNCODE.initVideoComponent!="undefined"&&UNCODE.initVideoComponent($col_parent[0],".uncode-video-container.video, .uncode-video-container.self-video");if(default_image&&index==0){manageVideos($drop,!0);var bg_img=$drop.css("background-image").match(/url\(["']?([^"']*)["']?\)/)[1],image_ph=new Image;typeof bg_img!="undefined"&&bg_img!==null&&(image_ph.onload=function(){$drop.addClass("active"),default_title&&($list.addClass("drop-hover"),$tmbs.first().addClass("drop-active"))},image_ph.src=bg_img)}}),UNCODE.wwidth>=UNCODE.mediaQuery?document.addEventListener("mousemove",function(e){$drop_moves.each(function(){var $drop_move=$(this),duration=.4;$("#uncode-custom-cursor:not(.in-content)").length&&(duration=.8),clientX=e.clientX,clientY=e.clientY,gsap.to($drop_move,{duration:duration,x:clientX,y:clientY,ease:Power1.easeOut})})}):($(window).on("touchend scroll",function(e){$list.removeClass("drop-hover"),$drop_moves.removeClass("active"),$tmbs.removeClass("drop-active")}),$drop_moves.each(function(){var $drop_move=$(this),$tmb=$drop_move.closest(".tmb"),$anim_parent=$drop_move.closest(".animate_when_almost_visible, .uncode-skew, .parallax-el");$anim_parent.hasClass("uncode-skew")&&$anim_parent.css({transform:"skew(0)"}),$tmb.on("touchend",function(e){e.stopPropagation(),$drop_moves.removeClass("active"),$tmbs.removeClass("drop-active"),$list.addClass("drop-hover"),$tmb.addClass("drop-active"),$drop_move.addClass("active"),manageVideos($drop_move,!0),clientX=e.changedTouches[0].clientX,clientY=e.changedTouches[0].clientY;if($anim_parent.length&&$anim_parent.css("transform")!==""&&$anim_parent.css("transform")!=="none"){var bound=$anim_parent[0].getBoundingClientRect();clientX-=bound.x,clientY-=bound.y}$drop_move.css({left:clientX,top:clientY})})})),$tmbs.each(function(e){var $tmb=$(this),$trgr=$tmb,$drop_move=$(".t-entry-drop:not(.drop-parent)",$tmb),$anim_parent=$drop_move.closest(".animate_when_almost_visible:not(.uncode-skew):not(.t-inside), .parallax-el"),$video=$("video",$tmb),$iframe=$("iframe",$tmb),$entryTxt=$(".t-entry-text",$tmb),stopBounding;$entryTxt.add($drop_move).css({"transition-duration":timing+"s"});if($video.length){var vidH=$video[0].videoHeight,vidW=$video[0].videoWidth;$video.css({height:vidH,width:vidW})}if($iframe.length){var vidH=$drop_move.attr("data-height"),vidW=$drop_move.attr("data-width");$iframe.css({height:vidH,width:vidW})}$iframe.each(function(){var $video=$(this),vidH=$video[0].videoHeight,vidW=$video[0].videoWidth;$video.css({height:vidH,width:vidW})}),$drop_move.length&&UNCODE.wwidth>=UNCODE.mediaQuery&&($trgr.on("mouseenter",function(e){$list.addClass("drop-hover"),$tmbs.removeClass("drop-active"),$tmb.addClass("drop-active"),$drop_move.addClass("active"),manageVideos($drop_move,!0);var clientX=e.clientX,clientY=e.clientY;$drop_move.css({transform:"translate3d("+clientX+"px, "+clientY+"px, 0px)"})}).on("mouseleave",function(e){$list.removeClass("drop-hover"),$drop_move.css({"transition-duration":timing*1.25+"s"}),$drop_move.removeClass("active"),$tmb.removeClass("drop-active"),$drop_move.on("transitionend",function(e){$drop_move.off("transitionend"),$drop_move.css({"transition-duration":timing+"s"}),manageVideos($drop_move,!1)})}),document.addEventListener("visibilitychange",function(){document.visibilityState=="hidden"&&$drop_move.data("active")===!0&&($drop_move.css({"transition-duration":"0s"}),$drop_move.removeClass("active"),manageVideos($drop_move,!1))}),document.addEventListener("scroll",function(){window.clearRequestTimeout(stopBounding),$drop_move.hasClass("active")&&($list.removeClass("drop-hover"),$tmbs.removeClass("drop-active"),$drop_move.removeClass("active"),$drop_move.on("transitionend",function(e){$drop_move.off("transitionend"),$drop_move.css({"transition-duration":timing+"s"}),manageVideos($drop_move,!1)})),stopBounding=requestTimeout(function(){if($anim_parent.length&&$anim_parent.css("transform")!==""&&$anim_parent.css("transform")!=="none"){var bound=$anim_parent[0].getBoundingClientRect();$drop_move.css({left:bound.x*-1,top:bound.y*-1})}},200)}));var datatarget=$trgr.closest("[data-drop-target]").attr("data-drop-target"),$drop=$('[data-drop="'+datatarget+'"]',$row_parent);$drop.css({"transition-duration":timing+"s"}),($drop_row_parents.length||$drop_col_parents.length)&&$drop.length&&($trgr.on("mouseenter",function(e){$row_parent.add($col_parent).addClass("drop-list-loaded"),$list.addClass("drop-hover");if(!$tmb.hasClass("drop-active")){$tmbs.removeClass("drop-active"),$tmb.addClass("drop-active");if(default_image&&!$drop.hasClass("active")){var $prev=$("[data-drop].active",$row_parent);$prev.css({"transition-duration":timing*1.5+"s"}),$prev.removeClass("active"),$prev.on("transitionend",function(e){$prev.off("transitionend"),manageVideos($prev,!1)})}$drop.css({"transition-duration":timing+"s"}),$drop.off("transitionend"),$drop.addClass("active"),manageVideos($drop,!0)}}).on("mouseleave",function(e){if(default_image&&!default_title||!default_image)$list.removeClass("drop-hover"),$tmb.removeClass("drop-active");default_image||($drop.css({"transition-duration":timing*1.5+"s"}),$drop.removeClass("active"),$drop.on("transitionend",function(e){$drop.off("transitionend"),manageVideos($drop,!1)}))}),document.addEventListener("visibilitychange",function(){document.visibilityState=="hidden"&&$drop.data("active")===!0&&!default_image&&($drop.css({"transition-duration":"0s"}),$drop.removeClass("active"),manageVideos($drop,!1))}))})})}$(window).on("load",function(event){imageHover()});var drop_wp_animation=function(){var $postLists=$(".uncode-post-titles");$postLists.each(function(){$.each($(".t-inside.animate_when_almost_visible",$postLists),function(index,val){new Waypoint({context:UNCODE.isUnmodalOpen?document.getElementById("unmodal-content"):window,element:val,handler:function(){var element=$(this.element),parent=element.closest(".tmb"),currentIndex=parent.index(),delay=currentIndex,delayAttr=parseInt(element.attr("data-delay"));isNaN(delayAttr)&&(delayAttr=100);var objTimeout=requestTimeout(function(){element.addClass("start_animation");var nextTimeout=requestTimeout(function(){$(".drop-image-separator",parent).addClass("start_animation")},50)},delay*delayAttr);UNCODE.isUnmodalOpen||this.destroy()},offset:UNCODE.isFullPage?"100%":"90%"})})})},runWaypoints_TO,runWaypoints_delay=0,runWaypoints=function(){typeof runWaypoints_TO!="undefined"&&runWaypoints_TO!==""&&(runWaypoints_delay=400),clearRequestTimeout(runWaypoints_TO),runWaypoints_TO=requestTimeout(function(){drop_wp_animation()},runWaypoints_delay)};runWaypoints(),$(document.body).on("uncode_waypoints",runWaypoints),$("body").hasClass("compose-mode")&&typeof window.parent.vc!="undefined"&&window.parent.vc.events.on("shortcodeView:ready shortcodeView:updated",function(){runWaypoints()})},UNCODE.postTable=function(){var clickRow=function(){var $postLists=$(".uncode-post-table");$postLists.each(function(){var $postList=$(this),$tmbClicks=$(".tmb.tmb-click-row",$postList);$tmbClicks.each(function(){var $tmb=$(this),$click=$(".table-click-row",$tmb);$("*:not(.table-click-row)",$tmb).on("click",function(e){return e.preventDefault(),e.stopPropagation(),$click[0].click(),!1})})})};clickRow();var hoverRow=function(){var $postLists=$(".uncode-post-table.uncode-post-table-hover");$postLists.on("mouseenter",function(){$(this).addClass("post-table-hover")}),$postLists.on("mouseleave",function(){$(this).removeClass("post-table-hover")})};hoverRow();var drop_wp_animation=function(){var $postLists=$(".uncode-post-table");$postLists.each(function(){$.each($(".t-inside.animate_when_almost_visible",$postLists),function(index,val){new Waypoint({context:UNCODE.isUnmodalOpen?document.getElementById("unmodal-content"):window,element:val,handler:function(){var element=$(this.element),parent=element.closest(".tmb"),currentIndex=parent.index(),delay=currentIndex,delayAttr=parseInt(element.attr("data-delay"));isNaN(delayAttr)&&(delayAttr=100);var objTimeout=requestTimeout(function(){element.addClass("start_animation")},delay*delayAttr);UNCODE.isUnmodalOpen||this.destroy()},offset:UNCODE.isFullPage?"100%":"90%"})})})},runWaypoints_TO,runWaypoints_delay=0,runWaypoints=function(){typeof runWaypoints_TO!="undefined"&&runWaypoints_TO!==""&&(runWaypoints_delay=400),clearRequestTimeout(runWaypoints_TO),runWaypoints_TO=requestTimeout(function(){drop_wp_animation()},runWaypoints_delay)};runWaypoints(),$(document.body).on("uncode_waypoints",runWaypoints),$("body").hasClass("compose-mode")&&typeof window.parent.vc!="undefined"&&window.parent.vc.events.on("shortcodeView:ready shortcodeView:updated",function(){runWaypoints()})},UNCODE.rotatingTxt=function($ctxt){if($("body").hasClass("compose-mode"))return;$ctxt=typeof $ctxt=="undefined"?$("body"):$ctxt;var setCTA;$(".el-text",$ctxt).has(".uncode-rotating-text-start[data-text]").each(function(){var $heading=$(this),cycle=0,$trgt,$toMove,$highl,$col=$heading.closest(".uncont"),txt,arrTxt,textFadeIn,textFadeOut,removeWraps,defineObjs=function(){$(".uncode-rotating-text-start[data-text]",$heading).each(function(){var $rtx=$(this),fx=$rtx.attr("data-fx"),wait=$rtx.attr("data-wait"),$prev=$(this).prev().addClass("prev-rotating-start"),splitToMove=[],splitArray=[],lineArray=[],lineIndex=0,lineStart=!0,lineEnd=!1,startSplit=!1,$line_wrap=$rtx.closest(".heading-line-wrap"),same_line=!0,$splits=$rtx.closest(".el-text").find(".split-word").removeClass("empty-span-hidden"),indexRtx=$splits.index($rtx);fx=typeof fx=="undefined"?"":fx,wait=typeof wait=="undefined"?"":wait,$splits.each(function(key,val){var $split=$(this),$new_line_wrap=$split.closest(".heading-line-wrap");$split.text()==""&&!$split.hasClass("uncode-rotating-text-end")&&!$split.hasClass("uncode-rotating-text-start")&&!splitArray.length&&splitArray.push($split),$split.hasClass("uncode-rotating-text-end")&&startSplit===!0&&(startSplit=!1),!$split.hasClass("uncode-rotating-text-end")&&startSplit===!0&&(splitArray.push($split),same_line&&(!$new_line_wrap.length||$line_wrap[0]==$new_line_wrap[0])?same_line=!0:same_line=!1),key==indexRtx&&(/\S/.test($split.text())?(startSplit=!0,$line_wrap=$split.closest(".heading-line-wrap"),splitArray.push($split)):indexRtx++),$line_wrap=$new_line_wrap}),$toMove=$($.map(splitToMove,function(el){return el.get()})),$trgt=$($.map(splitArray,function(el){return el.get()})),same_line&&($trgt.wrapAll('<span class="uncode-rotating-wrap" data-fx="'+fx+'" data-wait="'+wait+'" />'),$trgt.wrapAll('<span class="uncode-rotating-wrap-inner" />')),$prev.hasClass("split-word-empty")&&$rtx.is(":last-child")&&$prev.addClass("empty-span-hidden"),$highl=$(".heading-text-highlight-inner",$trgt),$rtx.attr("data-animated","true");if(cycle==0){$(document.body).trigger("defer-highlights"),cycle++,defineObjs();return}cycle++,txt=$rtx.attr("data-text"),arrTxt=txt.split("|"),textFadeOut($trgt)})};removeWraps=function(){var $wraps=$heading[0].querySelectorAll(".uncode-rotating-wrap, .uncode-rotating-wrap-inner");for(var wrap_k=0;wrap_k<$wraps.length;wrap_k++){var $temp_highl=$($wraps[wrap_k]).find("> .heading-text-highlight-inner").clone(),$splitFlow=$($wraps[wrap_k]).find(".split-word-flow");$($wraps[wrap_k]).find("> .heading-text-highlight-inner").remove(),$splitFlow.each(function(){$(this).append($temp_highl)});var $line_wrap=$wraps[wrap_k],$parent_wrap=$line_wrap.parentNode;if($parent_wrap!==null){while($line_wrap.firstChild)$parent_wrap.insertBefore($line_wrap.firstChild,$line_wrap);$parent_wrap.removeChild($line_wrap)}}defineObjs()};var loop=0;textFadeIn=function($trgt){var word=arrTxt[loop].split(" "),worsSpan="",$wrap=$trgt.closest(".uncode-rotating-wrap"),$wrap_inner=$trgt.closest(".uncode-rotating-wrap-inner"),fx=$trgt.closest(".uncode-rotating-wrap").attr("data-fx");for(var w=0;w<word.length;w++){var highl;$highl.length?highl=$highl[0].outerHTML:highl="",w>0&&(worsSpan+='<span class="split-word"><span class="split-word-flow"><span class="split-word-inner split-empty-inner">&nbsp;</span>'+highl+"</span></span>");var charachters=word[w].split("");worsSpan+='<span class="split-word"><span class="split-word-flow"><span class="split-word-inner">';for(var c=0;c<charachters.length;c++)worsSpan+='<span class="split-char">'+charachters[c]+"</span>";worsSpan+="</span>"+highl+"</span></span>"}if($wrap.length&&$wrap_inner.length){var words_w=$wrap_inner.outerWidth();$wrap.css({width:words_w}),$highl=$(".heading-text-highlight-inner",$wrap),$highl.prependTo($wrap),$wrap_inner.css({opacity:0}),$wrap_inner.html(worsSpan),$(".heading-text-highlight-inner",$wrap_inner).remove(),words_w=$wrap_inner.innerWidth();var duration=.45;$heading.removeClass("auto-width"),words_w>$col.width()&&($heading.addClass("auto-width"),words_w="auto",duration=0),$wrap.css({width:words_w,transition:"width "+duration*1e3+"ms cubic-bezier(0.16, 1, 0.3, 1)"});var $word_inner=$(".split-word-inner",$wrap_inner),$extra_wrap_inner=$wrap_inner.closest(".uncode-rotating-wrap-inner"),$target_fx=fx==="zoom"?$wrap_inner:$word_inner;if(!$target_fx.length)return;gsap.killTweensOf($target_fx);if(fx!=="zoom"){gsap.fromTo($target_fx,{y:fx==="opacity"?"0%":"-10%"},{delay:duration,duration:.25,y:"0%",ease:Circ.easeOut});if(!$wrap_inner.length)return;gsap.fromTo($wrap_inner,{opacity:0},{delay:duration,duration:.25,opacity:1,ease:Circ.easeOut,onComplete:function(){$("> .heading-text-highlight-inner",$wrap).remove(),$wrap_inner.html(worsSpan),removeWraps()}})}else gsap.fromTo($target_fx,{transformOrigin:"50%",opacity:0,scale:.875},{opacity:1,delay:duration,duration:.25,scale:1,ease:Circ.easeOut,onComplete:function(){$("> .heading-text-highlight-inner",$wrap).remove(),$wrap_inner.html(worsSpan),removeWraps()}})}else{if(!$wrap_inner.length)return;gsap.to($wrap_inner,{duration:.4,opacity:0,ease:Power1.easeOut,onComplete:function(){$wrap_inner.html(worsSpan),words_w=$wrap_inner.innerWidth(),gsap.to($wrap_inner,{duration:.2,opacity:1,ease:Power1.easeOut,onComplete:function(){$("> .heading-text-highlight-inner",$wrap).remove(),$wrap_inner.html(worsSpan),removeWraps()}})}})}loop<arrTxt.length-1?loop++:loop=0},textFadeOut=function($trgt){var $word_inner=$(".split-word-inner",$trgt),$wrap=$trgt.closest(".uncode-rotating-wrap"),$wrap_inner=$trgt.closest(".uncode-rotating-wrap-inner"),fx=$trgt.closest(".uncode-rotating-wrap").attr("data-fx"),wait=$trgt.closest(".uncode-rotating-wrap").attr("data-wait");wait=typeof wait=="undefined"||wait===""?3:parseFloat(wait)/1e3;var gsap_param={delay:wait,duration:.25,y:fx===""?"10%":"0%",opacity:0,ease:Circ.easeOut,onStart:function(){$wrap.length&&$wrap_inner.length&&fx==="zoom"&&($highl=$(".heading-text-highlight-inner",$wrap),$highl.prependTo($wrap))},onComplete:textFadeIn,onCompleteParams:[$trgt]},$target_fx=fx==="zoom"?$wrap_inner:$word_inner;fx===""?gsap_param.y="10%":fx==="zoom"&&(gsap_param.scale="1.045");if(!$target_fx.length)return;if($heading.data("waypoint")!==!0)var textInView=new Waypoint.Inview({context:UNCODE.isUnmodalOpen?document.getElementById("unmodal-content"):window,element:$heading[0],enter:function(direction){$heading.data("waypoint",!0),gsap.fromTo($target_fx,{transformOrigin:"50%"},gsap_param)}});else gsap.fromTo($target_fx,{transformOrigin:"50%"},gsap_param)},$("body").hasClass("compose-mode")&&typeof window.parent.vc!="undefined"?window.parent.vc.events.on("shortcodeView:updated shortcodeView:ready",function(model){var $el=model.view.$el,shortcode=model.attributes.shortcode;UNCODE.rotatingTxt($el)}):$heading.hasClass("animate_inner_when_almost_visible")?$heading.on("already-animated",function(){removeWraps(),window.addEventListener("removeOldLines",function(){clearRequestTimeout(setCTA),setCTA=requestTimeout(removeWraps,150)})}):$(window).on("load",function(){removeWraps(),window.addEventListener("removeOldLines",function(){clearRequestTimeout(setCTA),setCTA=requestTimeout(removeWraps,150)})})})},UNCODE.verticalText=function(){$(window).on("menuCanvasOpen",function(){$(".vertical-text--fixed").fadeOut(500),$(".horizontal-text--fixed").fadeOut(500)}).on("menuCanvasClose",function(){$(".vertical-text--fixed").fadeIn(500),$(".horizontal-text--fixed").fadeIn(500)});var hideOnBottomVerticalTexts=$(".vertical-text--vis-hide-bottom"),showOnTopVerticalTexts=$(".vertical-text--vis-show-top"),hideOnBottomHorizontalTexts=$(".horizontal-text--vis-hide-bottom"),showOnTopHorizontalTexts=$(".horizontal-text--vis-show-top");(hideOnBottomVerticalTexts.length>0||showOnTopVerticalTexts.length>0||hideOnBottomHorizontalTexts.length>0||showOnTopHorizontalTexts.length>0)&&window.addEventListener("scroll",function(e){var totalPageHeight=document.body.scrollHeight,scrollPoint=window.scrollY+window.innerHeight;window.scrollY>0?(showOnTopVerticalTexts.fadeOut(),showOnTopHorizontalTexts.fadeOut()):(showOnTopVerticalTexts.fadeIn(),showOnTopHorizontalTexts.fadeIn()),scrollPoint>=totalPageHeight?(hideOnBottomVerticalTexts.fadeOut(),hideOnBottomHorizontalTexts.fadeOut()):(hideOnBottomVerticalTexts.fadeIn(),hideOnBottomHorizontalTexts.fadeIn())},!1)},UNCODE.stickyScroll=function($el){if(typeof $el=="undefined"||$el===null)$el=$("body");var checkVisible=function(el,dir){typeof jQuery=="function"&&el instanceof jQuery&&(el=el[0]);var off=50;dir=typeof dir=="undefined"?"right":dir;var rect=el.getBoundingClientRect();return(rect.top>=0&&rect.top+off<=(window.innerHeight||document.documentElement.clientHeight)||rect.bottom>=off&&rect.bottom<=(window.innerHeight||document.documentElement.clientHeight)||rect.top<=0&&rect.bottom>=(window.innerHeight||document.documentElement.clientHeight))&&(rect.left>=0&&rect.left+(window.innerWidth||document.documentElement.clientWidth)/2<=(window.innerWidth||document.documentElement.clientWidth)||rect.left>=0&&rect.right<=(window.innerWidth||document.documentElement.clientWidth)||rect.right<=window.innerWidth&&rect.right-off>=0||rect.right<=window.innerWidth&&rect.left>=0)},setItemsRelHeight=function(reset){var $_el=$el;if($el.is(".index-scroll"))var $_el=$el.closest(".uncont");$(".index-scroll:not(.hor-scroll-vh) .index-row",$_el).each(function(i,item){$.each($(".tmb",item),function(index,val){reset===!0?$(val).css("visibility","hidden"):$(val).css("visibility","visible")})}),$(".index-scroll.hor-scroll-vh .index-row",$_el).each(function(i,item){$.each($(".tmb",item),function(index,val){if(reset===!0)$(val).css("visibility","hidden"),$("img:not(.avatar), picture, .t-background-cover",val).css("height","auto");else{var $rowParent=$(item).closest(".row-parent"),rowRatio=$rowParent.attr("data-height-ratio"),$rowInner=$(item).closest(".row-child"),rowRatioInner=$rowInner.attr("data-height"),paddingRow=parseInt($rowParent.css("padding-top"))+parseInt($rowParent.css("padding-bottom")),$colContainer=$(item).closest(".uncell"),$uncont=$(item).closest(".uncont"),paddingCol=parseInt($colContainer.css("padding-top"))+parseInt($colContainer.css("padding-bottom")),safe_heigth=$(item).data("safe-height"),winHeight=safe_heigth?UNCODE.wheight:$("#vh_layout_help").outerHeight(),offSet=$(item).offset().top-$uncont.offset().top,multiplier_h,data_viewport_h,body_border=$(".body-borders .top-border").outerHeight()*2,remove_menu=$(item).data("vp-menu");rowRatio==="full"||rowRatio===""?rowRatio=1:rowRatio/=100,typeof rowRatioInner=="undefined"||rowRatioInner==="full"||rowRatioInner===""||rowRatioInner==null?rowRatio=rowRatio:rowRatio=rowRatio*rowRatioInner/100,winHeight*=rowRatio,UNCODE.wwidth>=UNCODE.mediaQuery?multiplier_h=parseInt($(item).attr("data-vp-height")):UNCODE.wwidth<UNCODE.mediaQuery&&UNCODE.wwidth>=UNCODE.mediaQueryMobile?multiplier_h=parseInt($(item).attr("data-vp-height-md")):UNCODE.wwidth<UNCODE.mediaQueryMobile&&(multiplier_h=parseInt($(item).attr("data-vp-height-sm"))),typeof multiplier_h!="undefined"&&multiplier_h!==null&&multiplier_h>0?(data_viewport_h=winHeight*(multiplier_h/100)-(paddingRow+paddingCol+body_border+offSet),remove_menu===!0&&(data_viewport_h-=UNCODE.menuHeight),$("img:not(.avatar), picture, .t-background-cover, .fluid-object",val).css("height",data_viewport_h)):$("img:not(.avatar), picture, .t-background-cover, .fluid-object",val).css("height","auto")}})}),$(".index-scroll",$_el).each(function(i,item){var $uncoltable=$(item).closest(".uncoltable"),$rowParent=$(item).closest(".row-parent"),paddingRow=parseInt($rowParent.css("padding-top"))+parseInt($rowParent.css("padding-bottom")),body_border=$(".body-borders .top-border").outerHeight()*2,$index_row=$(".index-row",item),safe_heigth=$index_row.data("safe-height"),winHeight=safe_heigth?UNCODE.wheight:$("#vh_layout_help").outerHeight();if(UNCODE.wwidth<UNCODE.mediaQuery){var data_viewport_h=winHeight-(paddingRow+body_border);$uncoltable.css({"min-height":data_viewport_h})}else $uncoltable.css({"min-height":"auto"})})};setItemsRelHeight();var $index_scrolls=$(".index-scroll",$el);$index_scrolls.each(function(key,value){var $index=$(this),$parent_row=$index.closest(".vc_row[data-parent]"),$index_row=$(".index-row",$index),dir=$index_row.attr("data-direction");dir=typeof dir=="undefined"?"right":dir,$parent_row.addClass("unscroll-horizontal").attr("data-direction",dir)});var $horScrolls=$(".unscroll-horizontal",$el);if($horScrolls.length){$("body").addClass("scrolling-trigger"),$horScrolls.each(function(key,value){var $section=$(this),$index_scroll=$(".index-scroll",$section),$index_row=$(".index-row",$index_scroll),dir=$section.attr("data-direction"),wrap=$index_row.attr("data-wrap"),$pinWrap,$pinTrigger;dir=typeof dir=="undefined"?"right":dir,$pinTrigger=$('<div class="pin-trigger" data-direction="'+dir+'" />'),$pinWrap=$('<div class="pin-wrap" />');if(SiteParameters.is_frontend_editor){var gutterClass=$(".index-wrapper",$index_scroll).attr("class").match(/\b([^\s]+)-gutter\b/g,"");$(".index-wrapper",$index_scroll).wrapInner($pinWrap.addClass(gutterClass[0]))}else wrap==="column"?$index_scroll.wrapInner($pinWrap):$("> .row",$section).wrap($pinWrap),$section.wrapInner($pinTrigger)});var $pinWraps=$(".pin-wrap",$el),horScrollSizes=function(){$pinWraps.each(function(key,val){var $pinWrap=$(this).attr("id","pin_wrap_"+key),$pinTrigger=$pinWrap.closest(".pin-trigger"),dir=$pinTrigger.length?$pinTrigger.attr("data-direction"):$pinWrap.closest("[data-direction]").attr("data-direction"),$index_scroll=SiteParameters.is_frontend_editor?$pinWrap.closest(".index-scroll"):$(".index-scroll",$pinTrigger),$boxContainer=$(".box-container"),box_m=$boxContainer.css("margin-left"),st_active=!0,setHorW,horWidth=function(){$index_scroll.each(function(){var $this=$(this),$index_row=$(".index-row",$this),$rowContainer=$index_row.closest(".vc_row"),$rowInner=$index_row.closest(".wpb_row"),$rowParent=$index_row.closest(".row-parent"),$tmbs=$(".tmb",$index_row),padding_tmb=parseFloat($tmbs.first().css("padding-right")),$uncont=$index_row.closest(".uncont"),$parent_col=$index_row.closest(".wpb_column"),col_w=$uncont.width(),data_lg=parseFloat($index_row.attr("data-lg")),data_md=$this.hasClass("row-scroll-no-md")?1:parseFloat($index_row.attr("data-md")),data_sm=$this.hasClass("row-scroll-no-sm")?1:parseFloat($index_row.attr("data-sm")),tmb_w;col_w=col_w>UNCODE.wwidth?UNCODE.wwidth:col_w,tmb_w=(col_w+padding_tmb)/data_lg,typeof data_sm!="undefined"&&data_sm!==""&&UNCODE.wwidth<570?tmb_w=(col_w+padding_tmb)/data_sm:typeof data_md!="undefined"&&data_md!==""&&UNCODE.wwidth>=570&&UNCODE.wwidth<960&&(tmb_w=(col_w+padding_tmb)/data_md),isNaN(tmb_w)||$tmbs.css({width:tmb_w}),$tmbs.css({visibility:"visible"})})};horWidth(),clearRequestTimeout(setHorW),setHorW=requestTimeout(function(){setItemsRelHeight(),horWidth()},100);if(SiteParameters.is_frontend_editor)return;var $vmenu=$("body.vmenu .vmenu-container"),vmenuW=$vmenu.length&&UNCODE.wwidth>UNCODE.mediaQuery?$vmenu.width():0,winWidth=window.innerWidth-vmenuW,$tmb=$(".tmb",$index_scroll).eq(0),paddingRight=parseFloat($tmb.css("padding-right")),stickyScrollLength=$(".index-row",$index_scroll).width()-($index_scroll.width()+paddingRight),remove_menu=$(".index-row",$index_scroll).data("vp-menu"),scroll_anim;$("body").hasClass("rtl")?dir==="left"?scroll_anim=gsap.fromTo($pinWrap,{x:stickyScrollLength},{x:0,ease:"none"}):scroll_anim=gsap.fromTo($pinWrap,{x:0},{x:stickyScrollLength,ease:"none"}):dir==="left"?scroll_anim=gsap.fromTo($pinWrap,{x:-stickyScrollLength},{x:0,ease:"none"}):scroll_anim=gsap.fromTo($pinWrap,{x:0},{x:-stickyScrollLength,ease:"none"}),typeof ScrollTrigger.getById("stickySectionScrolling"+key)!="undefined"&&ScrollTrigger.getById("stickySectionScrolling"+key).kill(!0);var animationIncrease,checkForAnimations=function(){animationIncrease=0,$(".animate_when_almost_visible:not(.start_animation)",$pinTrigger).each(function(){var _this=this,isScrolling;if(ScrollTrigger.isInViewport($pinTrigger[0])&&ScrollTrigger.isInViewport(_this,.5,!0)){var delayAttr=parseFloat($(_this).attr("data-delay"));if(delayAttr==undefined||isNaN(delayAttr))delayAttr=0;requestTimeout(function(){$(_this).addClass("start_animation")},delayAttr+animationIncrease),animationIncrease+=150}})};checkForAnimations();var start=0,horST=ScrollTrigger.create({id:"stickySectionScrolling"+key,scrub:!0,trigger:$pinTrigger[0],pin:!0,anticipatePin:1,start:function(){return"top top+="+parseFloat($(".top-border").height()+(remove_menu===!0?UNCODE.menuHeight:0))},end:function(){return"+="+stickyScrollLength},animation:scroll_anim,ease:Sine.easeOut,onUpdate:checkForAnimations,invalidateOnRefresh:!0,onEnter:function(){$pinTrigger.addClass("enter-st")},onEnterBack:function(){$pinTrigger.addClass("enter-st")},onLeave:function(){$pinTrigger.removeClass("enter-st")},onLeaveBack:function(){$pinTrigger.removeClass("enter-st")}});window.dispatchEvent(new CustomEvent("dynamic_srcset_load")),window.dispatchEvent(new CustomEvent("boxResized"));var testSecondTrigger=function(){animationIncrease=0,$(".animate_when_almost_visible:not(.start_animation)",$pinTrigger).each(function(){var _this=this;if(checkVisible(_this)){var delayAttr=parseFloat($(_this).attr("data-delay"));if(delayAttr==undefined||isNaN(delayAttr))delayAttr=0;requestTimeout(function(){$(_this).addClass("start_animation")},delayAttr+animationIncrease),animationIncrease+=150}})},verST=ScrollTrigger.create({id:"verticalSectionScrolling"+key,trigger:$pinTrigger[0],start:"top center",end:function(){return"+="+UNCODE.wheight},onUpdate:testSecondTrigger,invalidateOnRefresh:!0}),setCTA,dis_enable_ST=function(){$(".row-scroll-no-md",$pinTrigger).length&&UNCODE.wwidth<=UNCODE.mediaQuery?(horST.kill(),verST.kill(),$pinTrigger.addClass("disabled"),st_active=!1):$(".row-scroll-no-sm",$pinTrigger).length&&UNCODE.wwidth<=UNCODE.mediaQueryMobile&&(horST.kill(),verST.kill(),$pinTrigger.addClass("disabled"),st_active=!1)};$(window).on("resize load",function(){clearRequestTimeout(setCTA),setCTA=requestTimeout(function(){dis_enable_ST(),checkForAnimations()},500)})})};$(window).on("load",function(){horScrollSizes()});var setResize,setReLayout,doubleResize=!0,oldW=UNCODE.wwidth,isResized=!0;$(window).on("load",function(){if($(".body-borders .top-border").outerHeight()>0){var $row_inners=document.querySelectorAll(".pin-spacer .row-inner");Array.prototype.forEach.call($row_inners,function(el){el.style.height="",el.style.marginBottom=""}),setItemsRelHeight(),horScrollSizes(),ScrollTrigger.refresh()}var carousel=document.querySelector(".owl-carousel"),grid=document.querySelector(".isotope-container"),stickyAll=document.querySelectorAll(".index-scroll");if(stickyAll.length)var sticky=stickyAll[stickyAll.length-1];if(typeof sticky!="undefined"){if(typeof carousel!="undefined"&&carousel!==null)var carousel_position=sticky.compareDocumentPosition(carousel);if(typeof grid!="undefined"&&grid!==null)var grid_position=sticky.compareDocumentPosition(grid);(carousel_position===2||grid_position===2)&&setTimeout(function(){ScrollTrigger.refresh()},500)}}),$(window).on("resize orientationchange",function(){isResized=oldW!==UNCODE.wwidth;if("onorientationchange"in window&&oldW===UNCODE.wwidth)return;oldW=UNCODE.wwidth,setItemsRelHeight(!0);var $row_inners=document.querySelectorAll(".pin-spacer .row-inner");Array.prototype.forEach.call($row_inners,function(el){el.style.height="",el.style.marginBottom=""}),clearRequestTimeout(setResize),setResize=requestTimeout(function(){setItemsRelHeight(),horScrollSizes(),ScrollTrigger.refresh(),doubleResize===!0?(window.dispatchEvent(new Event("resize")),doubleResize=!1):doubleResize=!0,UNCODE.setRowHeight(document.querySelectorAll(".page-wrapper .row-parent"),!1,isResized)},100)});var show_pins=function(){$(".index-scroll").css({opacity:"1"})};ScrollTrigger.addEventListener("refresh",show_pins),$(window).on("uncode.re-layout",function(){$(".pin-spacer").each(function(){var space_h=$(this).outerHeight(),$row=$(this).closest(".row-container");$row.css({height:space_h,overflow:"hidden"})}),ScrollTrigger.refresh(!0),clearRequestTimeout(setReLayout),setReLayout=requestTimeout(function(){$(".row-container").each(function(){$(this).css({height:"",overflow:""})})},1e3)})}},UNCODE.stickyTrigger=function($el){if(SiteParameters.is_frontend_editor)return!1;var stickyTrigger=function(){var stickyTrick=$(".sticky-trigger").each(function(){var $sticky=$(this),$inside=$("> div",$sticky),insideH=$inside.outerHeight(),$row=$sticky.closest(".vc_row"),$uncont=$sticky.closest(".uncont"),rowBottom,uncontBottom,diffBottom;ScrollTrigger.create({trigger:$sticky,start:function(){return"top center-="+insideH/2},endTrigger:$row,end:function(){return rowBottom=$row.offset().top+$row.outerHeight(),uncontBottom=$uncont.offset().top+$uncont.outerHeight(),diffBottom=rowBottom-uncontBottom,"bottom center+="+(insideH/2+diffBottom)},anticipatePin:!0,pin:!0,pinSpacing:!1,scrub:!0,invalidateOnRefresh:!0})})},setResizeSticky;$(window).on("load",function(){stickyTrigger();var carousel=document.querySelector(".owl-carousel"),grid=document.querySelector(".isotope-container"),stickyAll=document.querySelectorAll(".sticky-trigger");if(stickyAll.length)var sticky=stickyAll[stickyAll.length-1];if(typeof sticky!="undefined"){if(typeof carousel!="undefined"&&carousel!==null)var carousel_position=sticky.compareDocumentPosition(carousel);if(typeof grid!="undefined"&&grid!==null)var grid_position=sticky.compareDocumentPosition(grid);(carousel_position===2||grid_position===2)&&setTimeout(function(){ScrollTrigger.refresh()},500)}});var oldW=UNCODE.wwidth;$(window).on("resize uncode.re-layout",function(e){clearRequestTimeout(setResizeSticky);if(e.type==="resize"&&oldW===UNCODE.wwidth)return;oldW=UNCODE.wwidth,setResizeSticky=requestTimeout(function(){stickyTrigger(),ScrollTrigger.refresh()},1e3)})},UNCODE.revslider=function(){var revSliderIn=function(){$("rs-module").each(function(){var $slider=$(this);$slider.on("revolution.slide.onloaded",function(e,data){if($(e.currentTarget).closest(".header-revslider").length){var style=$(e.currentTarget).find("rs-slide").eq(0).attr("data-skin"),scrolltop=$(document).scrollTop();style!=undefined&&UNCODE.switchColorsMenu(scrolltop,style)}}),$slider.on("revolution.slide.onchange",function(e,data){if($(e.currentTarget).closest(".header-revslider").length){var style=$(e.currentTarget).find("rs-slide").eq(data.slideIndex-1).attr("data-skin"),scrolltop=$(document).scrollTop();style!=undefined&&UNCODE.switchColorsMenu(scrolltop,style)}})})};revSliderIn(),$(window).on("load",revSliderIn)},UNCODE.layerslider=function(){$(window).on("load",function(){$(".ls-wp-container").on("slideTimelineDidStart",function(event,slider){var slideData=slider.slides.current.data,scrolltop=$(document).scrollTop();slideData&&slideData.skin&&UNCODE.switchColorsMenu(scrolltop,slideData.skin)})})},UNCODE.ajax_filters=function(){function init_filters(){$(document).on("click",".term-filter-link",function(e){var _this=$(this),widget=_this.closest(".uncode_widget"),container=get_filters_container();if(widget.hasClass("widget-ajax-filters--no-ajax"))return!0;e.preventDefault();if(widget.hasClass("widget-ajax-filters--checkbox"))_this.parent().find('input[type="checkbox"]').trigger("click");else{_this.hasClass("term-filter-link--active")?_this.removeClass("term-filter-link--active"):(_this.addClass("term-filter-link--active"),widget.hasClass("widget-ajax-filters--single")&&widget.find(".term-filter-link").not(_this).removeClass("term-filter-link--active"));var url=_this.attr("href");reload_items(container,url,!0)}}),$(document).on("click",'.term-filter input[type="checkbox"]',function(e){var _this=$(this),widget=_this.closest(".uncode_widget"),link=_this.closest(".term-filter").find(".term-filter-link"),url=link.attr("href"),container=get_filters_container();if(widget.hasClass("widget-ajax-filters--no-ajax")){window.location=url;return}widget.hasClass("widget-ajax-filters--single")&&widget.find('input[type="checkbox"]').each(function(){_this.attr("id")!==$(this).attr("id")&&($(this).prop("checked",!1),$(this).closest(".term-filter").find(".term-filter-link").removeClass("term-filter-link--active"))}),_this.prop("checked")?link.addClass("term-filter-link--active"):link.removeClass("term-filter-link--active"),reload_items(container,url,!0)}),$(document).on("change","select.select--term-filters",function(e){var _this=$(this),selected=_this.find("option:selected"),option=$(selected),url=option.attr("data-term-filter-url"),container=get_filters_container(),widget=_this.closest(".uncode_widget");widget.hasClass("widget-ajax-filters--no-ajax")?window.location=url:reload_items(container,url,!0)}),$(document).on("click",".filter-list__link",function(e){if(SiteParameters.is_frontend_editor)return!1;e.preventDefault();var _this=$(this),container=get_filters_container(),url=_this.attr("href");reload_items(container,url,!0)}),$(".ajax-filter-sidebar__button--clear").on("uncode-ajax-clear-filters",function(e){var _this=$(this),container=get_filters_container(),url=_this.attr("href");reload_items(container,url,!0)}),$(document).on("click",".uncode-woocommerce-sorting-dropdown__link",function(e){var _this=$(this),container=get_filters_container(),url=_this.attr("href");container.length&&(e.preventDefault(),reload_items(container,url,!0))}),$(document).on("click",".uncode_woocommerce_widget--price-filter .button",function(e){var _this=$(this),container=get_filters_container();if(container.length>0){e.preventDefault();var min_price=$("#min_price").val(),max_price=$("#max_price").val(),location=window.location,url=location.href,page_uri=location.origin+location.pathname,is_filtered=page_uri!==url;is_filtered&&(url=remove_parameter_from_url(url,"min_price"),url=remove_parameter_from_url(url,"max_price"));var concat=page_uri===url?"?":"&",params={min_price:min_price,max_price:max_price};url=url+concat+$.param(params),reload_items(container,url,!0)}});var search_timer;$(document).on("keyup",".term-filters-search-input",function(e){var _this=$(this),container=get_filters_container(),value=_this.val();search_timer&&clearTimeout(search_timer),search_timer=setTimeout(function(){update_search_url(container,value)},500)})}function update_search_url(container,search_value){var location=window.location,url=location.href,page_uri=location.origin+location.pathname,is_filtered=page_uri!==url,key_search=SiteParameters.ajax_filter_key_search,key_unfilter=SiteParameters.ajax_filter_key_unfilter;is_filtered&&(url=remove_parameter_from_url(url,key_search),url=remove_parameter_from_url(url,key_unfilter));if(search_value){var concat=page_uri===url?"?":"&",params={};params[key_search]=search_value,params[key_unfilter]=1,url=url+concat+$.param(params)}else url=remove_parameter_from_url(url,key_search);reload_items(container,url,!0)}function remove_parameter_from_url(url,parameter){return url.replace(new RegExp("[?&]"+parameter+"=[^&#]*(#.*)?$"),"$1").replace(new RegExp("([?&])"+parameter+"=[^&]*&"),"$1")}function get_filters_container(){var container=$(".ajax-grid-system");return container.length==0&&(container=$(".ajax-filters")),container}function update_widgets_state(widgets_states,container){for(var i=widgets_states.length-1;i>=0;i--){var state=widgets_states[i];if(!state.collapse)continue;var new_widget=container.find('.uncode_widget[data-id="'+state.id+'"');state.open?(new_widget.find(".widget-title").addClass("open"),state.css&&new_widget.find(".widget-collapse-content").attr("style",state.css)):(new_widget.find(".widget-title").removeClass("open"),state.css&&new_widget.find(".widget-collapse-content").attr("style",state.css))}}function reload_items(container,url,push){if(isAjaxing)return;isAjaxing=!0,container.addClass("grid-filtering"),$.ajax({url:url,success:function(response){if(!response)return;$(document).trigger("uncode-ajax-pre-filtered");var container_id=container.attr("id"),pagination=$(".row-navigation");if(container_id){var container_to_append=$(response).find("#"+container_id),pagination_to_append=$(response).find(".row-navigation"),offcanvas_sidebar_wrapper=$(".ajax-filter-sidebar--offcanvas"),widgets=$(".uncode_widget"),widgets_container=widgets.closest(".ajax-filter-sidebar--offcanvas").length>0?$(".ajax-filter-sidebar--offcanvas"):container_to_append,widgets_states=[];widgets.each(function(){var widget=$(this),id=widget.attr("data-id"),state={id:id,collapse:!1,open:!1,css:!1},collapse_wrapper=widget.find(".widget-collapse-content");if(collapse_wrapper.length>0){state.collapse=!0;var collapse_wrapper_css=collapse_wrapper.attr("style"),title=widget.find(".widget-title");state.css=collapse_wrapper_css,title.hasClass("open")?state.open=!0:state.open=!1}widgets_states.push(state)}),offcanvas_sidebar_wrapper.length===0&&update_widgets_state(widgets_states,container_to_append),container.hasClass("ajax-hide-filters")||container_to_append.removeClass("ajax-hide-filters"),container.hasClass("ajax-hide-filters-blanks")||container_to_append.removeClass("ajax-hide-filters-blanks");var horizontal_sidebar_wrapper=$(".ajax-filter-position-horizontal");if(horizontal_sidebar_wrapper.length>0){var horizontal_sidebar_wrapper=horizontal_sidebar_wrapper.find(".ajax-filter-sidebar"),horizontal_sidebar_wrapper_style=horizontal_sidebar_wrapper.attr("style"),horizontal_sidebar_row=horizontal_sidebar_wrapper.find(".ajax-filter-sidebar-body .vc_row").eq(0),horizontal_sidebar_row_style=horizontal_sidebar_row.attr("style");container_to_append.find(".ajax-filter-position-horizontal .ajax-filter-sidebar").attr("style",horizontal_sidebar_wrapper_style),container_to_append.find(".ajax-filter-position-horizontal .ajax-filter-sidebar-body .vc_row").eq(0).attr("style",horizontal_sidebar_row_style)}container.replaceWith(container_to_append),SiteParameters.dynamic_srcset_active==="1"&&container_to_append.find(".tmb-woocommerce-variable-product").addClass("srcset-lazy-animations"),container_to_append.find("img").attr("loading",""),pagination.length>0?pagination_to_append.length>0?pagination.html(pagination_to_append.html()):pagination.html(""):pagination_to_append.length>0&&$(".post-wrapper").append(pagination_to_append);var offcanvas_sidebar_wrapper=$(".ajax-filter-sidebar--offcanvas");if(offcanvas_sidebar_wrapper.length>0||UNCODE.wwidth<UNCODE.mediaQuery){var sidebar_container=offcanvas_sidebar_wrapper.find(".vc_row").eq(0),sidebar_to_append=$(response).find(".ajax-filter-sidebar-body").find(".vc_row").eq(0);container_to_append.find(".ajax-filter-sidebar-wrapper").after('<span class="ajax-sidebar-placeholder" />'),container_to_append.find(".ajax-filter-sidebar-wrapper").remove(),update_widgets_state(widgets_states,sidebar_to_append),sidebar_container.html(sidebar_to_append.html())}push&&(UNCODE.lastURL=url,window.history.pushState({pageTitle:document.title},"",url)),typeof UNCODE.isotopeLayout!="undefined"&&UNCODE.isotopeLayout(),typeof UNCODE.justifiedGallery!="undefined"&&UNCODE.justifiedGallery(),typeof UNCODE.cssGrid!="undefined"&&UNCODE.cssGrid(),typeof UNCODE.lightbox!="undefined"&&!SiteParameters.lbox_enhanced&&UNCODE.lightbox(),typeof UNCODE.lightgallery!="undefined"&&SiteParameters.lbox_enhanced&&UNCODE.lightgallery(),typeof UNCODE.carousel!="undefined"&&UNCODE.carousel($("body")),UNCODE.animations(),typeof UNCODE.filters!="undefined"&&UNCODE.filters(),typeof UNCODE.widgets!="undefined"&&UNCODE.widgets(),SiteParameters.dynamic_srcset_active==="1"&&UNCODE.refresh_dynamic_srcset_size(),typeof UNCODE.menuSmartInit!="undefined"&&UNCODE.menuSmartInit(),typeof UNCODE.parallax!="undefined"&&UNCODE.parallax(),maybe_scroll_to_top();var woo_select2_cats=$(".dropdown_product_cat");if(woo_select2_cats.length>0){woo_select2_cats.on("change",function(){if($(this).val()!=""){var this_page="",home_url=UncodeWCParameters.uncode_wc_widget_product_categories_home_url;home_url.indexOf("?")>0?this_page=home_url+"&product_cat="+$(this).val():this_page=home_url+"?product_cat="+$(this).val(),location.href=this_page}else location.href=UncodeWCParameters.uncode_wc_widget_product_categories_shop_url});if($().selectWoo){var wc_product_cat_select=function(){woo_select2_cats.selectWoo({placeholder:UncodeWCParameters.uncode_wc_widget_product_categories_placeholder,minimumResultsForSearch:5,width:"100%",allowClear:!0,language:{noResults:function(){return UncodeWCParameters.uncode_wc_widget_product_categories_no_results}}})};wc_product_cat_select()}}$(document).trigger("uncode-ajax-filtered"),$(document.body).trigger("init_price_filter"),window.dispatchEvent(new CustomEvent("uncode-ajax-filtered")),isAjaxing=!1}},error:function(){container.removeClass("grid-filtering"),isAjaxing=!1,SiteParameters.enable_debug==1&&console.log("There was an error retrieving the products")}})}function maybe_scroll_to_top(){var offcanvas_sidebar_wrapper=$(".ajax-filter-sidebar--offcanvas");if(offcanvas_sidebar_wrapper.length>0)return;var container=get_filters_container(),bound=container[0].getBoundingClientRect();bound.y<0&&$(window).scrollTop(container.offset().top)}var isAjaxing=!1,clear_clicked=!1,init_ajax_grid=function(){var $grids=$(".ajax-grid-system:not(.init-ajax-grid)");$grids.each(function(index,val){var $body=$("body"),$grid=$(val).addClass("init-ajax-grid"),starting_point=$grid.attr("data-toggle"),$trigger=$(".uncode-toggle-ajax-filters",$grid),$sidebar_wrapper=$(".ajax-filter-sidebar-wrapper",$grid),$isotope_wrapper=$(".isotope-wrapper",$grid),$sidebar=$(".ajax-filter-sidebar",$sidebar_wrapper),$sorting_trgr=$(".uncode-woocommerce-sorting__link",$grid),$footprint=$(".ajax-filter-footprint",$grid),sidebar_w,data_w=parseFloat($sidebar.attr("data-max-width")),$firstCol=$grid.closest(".uncol.style-light, .uncol.style-dark"),skin=$firstCol.hasClass("style-light")?"style-light":"style-dark",$positioned_top=$(".ajax-filter-position-horizontal",$grid),overlay_desktop=$(".ajax-filter-position-left-overlay, .ajax-filter-position-right-overlay",$grid).length,$close_btn=$(".close-ajax-filter-sidebar",$sidebar_wrapper),$vc_row=$(".vc_row",$sidebar_wrapper).eq(0),sidew,$inside_row=$("> .row-parent",$vc_row),bg_row,$side_header=$(".ajax-filter-sidebar-header",$sidebar_wrapper),$side_footer=$(".ajax-filter-sidebar-footer",$sidebar_wrapper),$apply_filters=$(".ajax-filter-sidebar__button",$side_footer),sidebar_overlay=!1,sidebar_hover=!1,switchMobile=!1,scrollTop;$vc_row.attr("class")&&(bg_row=$vc_row.attr("class").match(/style-color-([^-]+)-bg/)),bg_row!=null&&$side_header.add($side_footer).addClass(bg_row[0]),$trigger.add($apply_filters).on("click",function(e){return e.preventDefault(),e.stopPropagation(),$grid=$(".ajax-grid-system").eq(0),$positioned_top=$(".ajax-filter-position-horizontal",$grid),overlay_desktop=$(".ajax-filter-position-left-overlay, .ajax-filter-position-right-overlay",$grid).length,$sidebar_wrapper=$(".ajax-filter-sidebar-wrapper").eq(0),sidebar_w=$sidebar_wrapper.width(),$sidebar=$(".ajax-filter-sidebar",$sidebar_wrapper),$(this).hasClass("ajax-filter-sidebar__button--clear")&&$(this).trigger("uncode-ajax-clear-filters"),$positioned_top.length&&UNCODE.wwidth>=UNCODE.mediaQuery?($grid.toggleClass("ajax-hide-filters-blanks"),$sidebar.slideToggle({duration:400,easing:"easeOutQuad"})):($grid.removeClass("ajax-hide-filters-blanks"),$grid.toggleClass("ajax-hide-filters"),$grid.hasClass("ajax-hide-filters")?$body.addClass("ajax-hide-filters"):(scrollTop=$("html, body").scrollTop(),$body.removeClass("ajax-hide-filters"))),(overlay_desktop||UNCODE.wwidth<UNCODE.mediaQuery)&&$("html, body").scrollTop(scrollTop),!1}),$close_btn.on("click",function(e){e.preventDefault(),$grid=$(".ajax-grid-system").eq(0),$grid.addClass("ajax-hide-filters"),$grid.hasClass("ajax-hide-filters")?$body.addClass("ajax-hide-filters"):(scrollTop=$("html, body").scrollTop(),$body.removeClass("ajax-hide-filters")),$("html, body").scrollTop(scrollTop)}),$sidebar_wrapper.on("mouseover",function(){sidebar_hover=!0}).on("mouseout",function(){sidebar_hover=!1}),$body.off("click.ajax-filter-sidebar").on("click.ajax-filter-sidebar",function(e,from){if($(e.target).closest(".ajax-filter-sidebar").length)return;if(undefined!==from&&from==="select_active_attributes")return;if($(e.target).closest(".select2-container--open").length)return;!$body.hasClass("ajax-hide-filters")&&!sidebar_hover&&$body.hasClass("ajax-filter-sidebar-overlay")&&$grid.add($body).addClass("ajax-hide-filters")}),$sorting_trgr.on("click",function(e){e.preventDefault()});var inside_width=function(){$sidebar_wrapper=$(".ajax-filter-sidebar-wrapper").eq(0),$sidebar=$(".ajax-filter-sidebar",$sidebar_wrapper),$vc_row=$(".vc_row",$sidebar_wrapper).eq(0),$inside_row=$("> .row-parent",$vc_row),UNCODE.wwidth<UNCODE.mediaQuery||overlay_desktop?(sidew=$sidebar.width(),$inside_row.css({width:sidew})):$inside_row.css({width:""})};inside_width();var ajax_sidebar_position=function(e,f_editor){$grid=$(".ajax-grid-system").eq(0),$sidebar_wrapper=$(".ajax-filter-sidebar-wrapper").eq(0),$positioned_top=$(".ajax-filter-position-horizontal",$grid),$sidebar=$(".ajax-filter-sidebar",$sidebar_wrapper),$vc_row=$(".vc_row",$sidebar_wrapper).eq(0),$inside_row=$("> .row-parent",$vc_row),scrollTop=$("html, body").scrollTop();if(f_editor!==!0&&(UNCODE.wwidth<UNCODE.mediaQuery&&switchMobile!==!0||overlay_desktop)){$grid.add($body).addClass("ajax-hide-filters"),$sidebar_wrapper.after('<span class="ajax-sidebar-placeholder" />'),$body.append($sidebar_wrapper.addClass("main-container ajax-filter-sidebar--offcanvas")),sidebar_overlay=!0,$body.addClass("ajax-filter-sidebar-overlay"),$sidebar_wrapper.addClass(skin);var sideHeadH=$side_header.outerHeight(),sideFooterH=$side_footer.outerHeight();data_w!==""&&data_w>0&&(UNCODE.wwidth>=UNCODE.mediaQuery?$sidebar.css({"max-width":data_w}):$sidebar.css({"max-width":"none"})),$vc_row.css({"padding-top":sideHeadH,"padding-bottom":sideFooterH});var sidew=$sidebar.width();$inside_row.css({width:sidew}),switchMobile=!0}else{if(typeof e!="undefined"&&e.type==="wwResize"&&starting_point==="hidden"||f_editor===!0)scrollTop=$("html, body").scrollTop(),$grid.add($body).removeClass("ajax-hide-filters");typeof e!="undefined"&&e.type==="wwResize"&&$positioned_top.length&&UNCODE.wwidth<UNCODE.mediaQuery&&($grid.addClass("ajax-hide-filters-blanks"),$sidebar.hide()),$(".ajax-sidebar-placeholder",$grid).after($sidebar_wrapper.removeClass("main-container ajax-filter-sidebar--offcanvas")),$(".ajax-sidebar-placeholder",$grid).remove(),sidebar_overlay=!1,$body.removeClass("ajax-filter-sidebar-overlay"),$sidebar_wrapper.removeClass(skin),data_w!==""&&data_w>0&&$sidebar.css({"max-width":"none"}),$vc_row.css({"padding-top":0,"padding-bottom":0}),$inside_row.css({width:""}),f_editor===!0&&UNCODE.ajax_filters(),switchMobile=!1}(overlay_desktop||UNCODE.wwidth<UNCODE.mediaQuery)&&$("html, body").scrollTop(scrollTop)},sidebar_width=function(){!$body.hasClass("ajax-filter-sidebar-overlay")&&!$positioned_top.length&&UNCODE.wwidth>=UNCODE.mediaQuery?(sidebar_w=$footprint.width(),$sidebar.css({width:sidebar_w})):$sidebar.css({width:""})};sidebar_width(),SiteParameters.is_frontend_editor&&ajax_sidebar_position(),$(window).off("load.ajax_filters wwResize.ajax_filters").on("load.ajax_filters wwResize.ajax_filters",function(e){(!SiteParameters.is_frontend_editor||e.type==="wwResize")&&ajax_sidebar_position(e),sidebar_width()}),$(window).off("uncode.ajax_filters").one("uncode.ajax_filters",function(e){ajax_sidebar_position(e,!0)}),$isotope_wrapper.on("transitionend",function(e){return $(e.target).hasClass("isotope-wrapper")&&window.dispatchEvent(new CustomEvent("boxResized")),!1});if(UNCODE.wwidth<UNCODE.mediaQuery&&$body.hasClass("ajax-hide-filters")){var $grid=$(".ajax-grid-system").eq(0);$grid.addClass("ajax-hide-filters")}})};init_ajax_grid(),$(document).on("uncode-ajax-filtered",init_ajax_grid);var widget_hover_hack=function(){$(".widget, .uncode_widget").each(function(){var $widget=$(this),class_w=$widget.attr("class"),$lis=$("ul:not(.menu-horizontal) > li",$widget).has("a"),$footer=$widget.closest("#colophon");if(class_w.indexOf("widget_yith")>0)return!0;$lis.each(function(){var $li=$(this),$a=$("a",$li),$label=$a.closest("label");$footer.length||$li.addClass("no-evts"),$("span",$a).length||$li.addClass("li-hover"),$("li",$li).hover(function(e){$(e.target).parents("li").each(function(){$(this).addClass("parent-li-hover")})},function(e){$(e.target).parents("li").each(function(key,val){key===0&&$(val).removeClass("parent-li-hover")})}),$li.off("mouseup").on("mouseup",function(e){if(e.which!==3){e.stopPropagation();var $a=$("a",this).first();$a[0].click()}})})})};SiteParameters.disable_hover_hack!=="1"&&(widget_hover_hack(),$(document).on("uncode-ajax-filtered",widget_hover_hack)),$(window).on("popstate.ajaxfilters",function(e){var location=window.location,url=location.href,params=UNCODE.getURLParams(window.location),old_params=UNCODE.getURLParams(UNCODE.lastURL,!0);UNCODE.lastURL=url;if(UNCODE.hasEqualURLParams(params,old_params)||$.isEmptyObject(params)&&$.isEmptyObject(old_params))return;var container=get_filters_container();reload_items(container,url,!1)}),$(window).on("uncode-ajax-pre-filtered",function(){$.fn.infinitescroll&&$(".cssgrid-infinite, .isotope-infinite").infinitescroll("destroy")}),init_filters()},UNCODE.videoThumbs=function(){var checkResize,newW=UNCODE.wwidth,checkForVideos=function(){$(window).on("okevents.y.change",function(e,y){var $video=$(y.target.g),$video_wrap=$video.closest(".fluid-object.is-no-control.play-on-hover"),$mobile_video_wrap=$video.closest(".fluid-object.is-no-control.no-control-mobile-autoplay"),restart=!$video_wrap.hasClass("play-pause"),$tmb=$video.closest(".tmb-all-hover.tmb-content-under").length?$video.closest(".t-inside"):$video.closest(".t-entry-visual, .un-inline-image"),setTime;newW>=UNCODE.mediaQuery?$video_wrap.length&&$video_wrap.data("hovered")!==!0&&($video_wrap.data("hovered",!0),$video_wrap.addClass("played-on"),y.target.pauseVideo(),$tmb.on("mouseenter",function(){restart&&y.target.seekTo(0),y.target.playVideo()}).on("mouseleave",function(){clearTimeout(setTime),setTime=setTimeout(function(){y.target.pauseVideo()},300)})):$mobile_video_wrap.length&&($video_wrap.addClass("played-on"),y.target.playVideo())}),$(window).on("okevents.v.loaded",function(e,playerV){var $video=$(playerV.element),$video_wrap=$video.closest(".fluid-object.is-no-control.play-on-hover"),$mobile_video_wrap=$video.closest(".fluid-object.is-no-control.no-control-mobile-autoplay"),restart=!$video_wrap.hasClass("play-pause"),$tmb=$video.closest(".tmb-all-hover.tmb-content-under").length?$video.closest(".t-inside"):$video.closest(".t-entry-visual, .un-inline-image"),setTime;if(newW>=UNCODE.mediaQuery){if($video_wrap.length){var playPromise=playerV.play();playPromise!==undefined&&playPromise.then(function(value){playerV.pause()}),$video_wrap.addClass("played-on"),$tmb.on("mouseenter",function(){restart&&playerV.setCurrentTime(0),playerV.play()}).on("mouseleave",function(){clearTimeout(setTime),setTime=setTimeout(function(){playerV.pause()},300)})}}else if($mobile_video_wrap.length){var playPromise=playerV.play();playPromise!==undefined&&playPromise.then(function(value){playerV.play()}),$video_wrap.addClass("played-on")}}),$(".fluid-object.self-video.is-no-control video").each(function(key,video){var $video=$(video),$noscript=$("noscript",$video),$video_wrap=$video.closest(".fluid-object.is-no-control.play-on-hover"),restart=!$video_wrap.hasClass("play-pause"),$mobile_video_wrap=$video.closest(".fluid-object.is-no-control.no-control-mobile-autoplay"),$tmb=$video.closest(".tmb-all-hover.tmb-content-under").length?$video.closest(".t-inside"):$video.closest(".t-entry-visual, .un-inline-image"),setTime,manageVideo=function(){video.currentTime=0,video.pause(),newW>=UNCODE.mediaQuery?$video_wrap.length?($video_wrap.addClass("played-on"),$tmb.on("mouseenter",function(){restart&&(video.currentTime=0),video.play()}).on("mouseleave",function(){clearTimeout(setTime),setTime=setTimeout(function(){video.pause()},300)})):video.play():$mobile_video_wrap.length&&($mobile_video_wrap.addClass("played-on"),video.play())};$noscript.length&&newW>=UNCODE.mediaQuery&&$noscript.each(function(key,val){$noscript.after(val.textContent||val.innerText||val.innerHTML),$noscript.remove()}),typeof MediaElement=="function"&&$video.has("source[src]").mediaelementplayer({pauseOtherPlayers:!1}),video.readyState>0?manageVideo():$video.on("loadedmetadata",function(_event){manageVideo()})})};checkForVideos();var checkVideoResize=function(){clearRequestTimeout(checkResize),checkResize=requestTimeout(function(){newW!==UNCODE.wwidth&&(checkForVideos(),newW=UNCODE.wwidth)},1e3)};$(window).off("resize.videos",checkVideoResize).on("resize.videos",checkVideoResize),$(window).off("more-items-loaded.videos",checkForVideos).on("more-items-loaded.videos",checkForVideos)},UNCODE.inlineImgs=function(){var linkInlineImgs=function(){$(".un-inline-image").each(function(){var $img=$(this),href=$(this).attr("data-link-href"),dataImg=$img.data();if(dataImg!=""&&href!=null&&href!==""){var class_stra_a="unline-image-link";$(this).hasClass("un-inline-space-over")?class_stra_a+=" un-inline-space-over":$(this).hasClass("un-inline-space-gutter")&&(class_stra_a+=" un-inline-space-gutter");var str_a='<a class="'+class_stra_a+'" ';for(var key in dataImg)dataImg.hasOwnProperty(key)&&key.startsWith("link")&&(str_a+=" "+key.slice(4).toLowerCase()+'="'+dataImg[key]+'"');str_a+=" />",$img.wrap(str_a)}})};$(window).on("load",linkInlineImgs)},UNCODE.lottie=function(){if(SiteParameters.is_frontend_editor){var $lottie_wraps=$("div.uncode-lottie-wrap");$lottie_wraps.each(function(){var $lottie_wrap=$(this),$div_player=$("div.uncode-lottie-player",$lottie_wrap),$player_clone=$div_player.clone(),player_id=$div_player.attr("data-id"),$lottie_players=$("lottie-player",$lottie_wrap).remove();$div_player.attr("data-init")!==!0&&$player_clone.length&&($("#"+player_id).length&&(player_id+="_"+Math.floor(Math.random()*1e16)),$player_clone.attr("id",player_id),$player_clone=$player_clone[0].outerHTML.replace("<div","<lottie-player").replace("</div","</lottie-player"),$div_player.after($player_clone),$div_player.attr("data-init",!0))})}var $players=$(".uncode-lottie-wrap lottie-player");$players.each(function(){var player=this,this_id=$(player).attr("id"),_player=document.getElementById(this_id),trigger=$(player).attr("data-trigger"),pFrames=$(player).attr("data-frames").split(","),srcPlayer=$(player).attr("src");_player.load(srcPlayer),_player.addEventListener("ready",function(){var $_shadow=_player.shadowRoot;$($_shadow).find(".error").remove();var tFrames=_player.getLottie().totalFrames/100,pFrame_from=Math.round(tFrames*pFrames[0]),pFrame_to=Math.round(tFrames*pFrames[1])-1,loop=$(player).attr("loop"),mode,actions;typeof trigger!="undefined"&&typeof LottieInteractivity!="undefined"?(trigger==="scroll"?(mode="scroll",actions=[{visibility:[0,1],type:"seek",frames:[pFrame_from,pFrame_to]}]):trigger==="viewport"?(mode="scroll",actions=[{visibility:[.2,1],frames:[pFrame_from,pFrame_to],type:loop?"loop":"play"}]):trigger==="hover"&&($(player).on("mouseenter",function(){_player.play()}).on("mouseleave",function(){_player.pause()}),pFrame_from>0&&pFrame_from<99&&(_player.seek(pFrame_from),_player.addEventListener("frame",function(){_player.getLottie().currentFrame>=pFrame_to&&_player.seek(pFrame_from)}))),LottieInteractivity.create({player:"#"+this_id,mode:mode,actions:actions})):pFrame_from>0&&pFrame_from<99&&(_player.seek(pFrame_from),_player.addEventListener("frame",function(){_player.getLottie().currentFrame>=pFrame_to&&_player.seek(pFrame_from)}))}),$(window).on("unlottie-destroy",function(){_player.destroy()})})},UNCODE.animatedBgGradient=function(_el){var ev;typeof _el=="undefined"||_el===null?(_el=document,ev=!1):(_el=_el[0],ev="shortcode:update");var simplex=new SimplexNoise,Uncode_BG_Animated_Gradient=function(blockOverlay,canvasWrap){this.block=blockOverlay,this.wrap=canvasWrap,this.config(),this.checker(),this.loopRAF(),this.animLoader()},AnimGradient=Uncode_BG_Animated_Gradient.prototype;AnimGradient.config=function(){this.canvas=document.createElement("canvas"),this.wrap.appendChild(this.canvas),this.ctx=this.canvas.getContext("2d"),this.count=0,this.isOrientationChanged=!1,this.res=UNCODE.isMobile?90:110,this.resPercent=100/this.res,this.resAround=this.resPercent/100,this.size=typeof this.block.getAttribute("data-bg-noise-size")!="undefined"&&this.block.getAttribute("data-bg-noise-size")!==null&&this.block.getAttribute("data-bg-noise-size")!==""?this.block.getAttribute("data-bg-noise-size"):1,this.canvas.classList.add("uncode-bg-animated-gradient"),this.canvas.setAttribute("height",this.res),this.canvas.setAttribute("width",this.res),this.canvas.style="height: 100%; position: relative; width:100%;",this.imgdata=this.ctx.getImageData(0,0,this.canvas.width,this.canvas.height),this.cx=this.canvas.width/2,this.cy=this.canvas.height/2,this.data=this.imgdata.data,this.opts={col_1st:typeof this.block.getAttribute("data-bg-noise-1")!="undefined"&&this.block.getAttribute("data-bg-noise-1")!==null&&this.block.getAttribute("data-bg-noise-1")!==""?this.block.getAttribute("data-bg-noise-1"):!1,col_2nd:typeof this.block.getAttribute("data-bg-noise-2")!="undefined"&&this.block.getAttribute("data-bg-noise-2")!==null&&this.block.getAttribute("data-bg-noise-2")!==""?this.block.getAttribute("data-bg-noise-2"):!1,time:typeof this.block.getAttribute("data-bg-noise-speed")!="undefined"&&this.block.getAttribute("data-bg-noise-speed")!==null&&this.block.getAttribute("data-bg-noise-speed")!==""?parseFloat(this.block.getAttribute("data-bg-noise-speed")):250},this.lavaTime=1,this.bg_colors=[];if(this.opts.col_1st===!1&&this.opts.col_2nd===!1)return;if(this.opts.col_1st===this.opts.col_2nd||this.opts.col_2nd==0)this.singleColor=!0;if(this.opts.col_1st){var rgbColor1=this.hexToRGB(this.opts.col_1st);this.bg_colors.push({r:rgbColor1.r,g:rgbColor1.g,b:rgbColor1.b})}if(this.opts.col_2nd){var rgbColor2=this.hexToRGB(this.opts.col_2nd);this.bg_colors.push({r:rgbColor2.r,g:rgbColor2.g,b:rgbColor2.b})}},AnimGradient.checker=function(){var scope=this;this.checkInViewPort(),window.addEventListener("resize",function(){if(UNCODE.isMobile&&!scope.isOrientationChanged)return;scope.ratioCalc()}),window.addEventListener("orientationchange",function(){scope.isOrientationChanged=!0}),this.ratioCalc()},AnimGradient.ratioCalc=function(){var blockW=this.block.clientWidth,blockH=this.block.clientHeight,blockRatio=blockH/blockW;blockRatio<1?this.ratioParam={x:1.4,y:blockRatio*1.4}:this.ratioParam={x:blockRatio/3,y:1}},AnimGradient.checkInViewPort=function(){if("IntersectionObserver"in window){var scope=this,observer=new IntersectionObserver(function(entries){entries.forEach(function(entry){entry.isIntersecting?scope.isInViewport=!0:scope.isInViewport=!1})},{root:document});observer.observe(this.block)}},AnimGradient.hexToRGB=function(hexval){var hexecuted=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hexval);return hexecuted?{r:parseInt(hexecuted[1],16),g:parseInt(hexecuted[2],16),b:parseInt(hexecuted[3],16)}:!1},AnimGradient.factor=function(val_1,val_2,lava){return val_1*(1-lava)+val_2*lava},AnimGradient.factorNoise=function(wave_l,x,y,noise){return this.singleColor?this.bg_colors[0][wave_l]:this.factor(this.bg_colors[0][wave_l],this.bg_colors[1][wave_l],this.lava(x,y,this.count*this.lavaTime)*this.resAround*3.5*noise/2)},AnimGradient.lava=function(x,y,grade){var radians=Math.PI/180*grade,cos=Math.cos(radians),sin=Math.sin(radians),nx=cos*(x-this.cx)+sin*(y-this.cy)+this.cx;return nx},AnimGradient.loopRAF=function(){var scope=this;if(this.isInViewport){for(var x=0;x<this.res;x++)for(var y=0;y<this.res;y++){var noise=simplex.noise3D(x/this.res*this.ratioParam.x*this.size,y/this.res*this.ratioParam.y*this.size,this.count/this.opts.time);this.data[(x+y*this.res)*4+0]=this.factorNoise("r",x,y,noise),this.data[(x+y*this.res)*4+1]=this.factorNoise("g",x,y,noise),this.data[(x+y*this.res)*4+2]=this.factorNoise("b",x,y,noise),this.data[(x+y*this.res)*4+3]=noise*265}this.count++,this.ctx.putImageData(this.imgdata,0,0)}requestAnimationFrame(function(){scope.loopRAF()})},AnimGradient.animLoader=function(){this.wrap.classList.add("uncode-canvas-bg-noise-wrap-loaded")};var anim_init=function(){var bgs=_el.querySelectorAll(".block-bg-overlay");bgs.forEach(function(blockOverlay){var canvasWrap=blockOverlay.querySelector(".uncode-canvas-bg-noise-wrap");if(!blockOverlay||!canvasWrap)return;new Uncode_BG_Animated_Gradient(blockOverlay,canvasWrap)})};$(window).on("load",function(){anim_init()}),ev==="shortcode:update"&&anim_init()},UNCODE.multibg=function(){var $bgsWraps=$(".uncode-multi-bgs"),$body=$("body");$bgsWraps.each(function(){var $bgWrap=$(this),transition=$bgWrap.attr("data-transition"),transitionTime=$bgWrap.attr("data-transition-time"),dataPace=$bgWrap.attr("data-transition-pace"),dataThreshold=$bgWrap.attr("data-transition-threshold"),dataTime=$bgWrap.attr("data-carousel-time"),dataMobileCarousel=$bgWrap.attr("data-carousel-mobile"),random=$bgWrap.attr("data-multi-random"),_bgWrap=$bgWrap[0],$multiBgs=$(".multi-background",$bgWrap),imgFirst,bgAmount=$multiBgs.length,isInViewport=!1,lastScrollTop=0,counter=0,totMove=0,autoScroll=typeof dataPace=="undefined"&&transition==="scroll",pace=typeof dataPace!="undefined"&&dataPace!==""?parseFloat(dataPace):transition==="scroll"?20:200,threshold=typeof dataThreshold!="undefined"&&dataThreshold!==""?parseFloat(dataThreshold):0,offX,offY,wait=typeof transitionTime!="undefined"&&transitionTime!==""?parseFloat(transitionTime)+1:250,carouselTime=typeof dataTime!="undefined"&&dataTime!==""?parseFloat(dataTime):5e3,requestCarousel,is_header=$bgWrap.closest("#page-header").length,startTime=new Date;transition=typeof transition=="undefined"?"":transition,random==="true"&&UNCODE.shuffle($multiBgs),imgFirst=$multiBgs.first().find(".background-inner").css("background-image").replace("url(","").replace(")","").replace(/\"/gi,"");var loadFirst=function(){$multiBgs.first().attr("data-load","loaded").stop(!0,!1).animate({opacity:1},250,"easeInQuad").css({zIndex:1})},loadError=function(){console.log("Multi BG loading error")};UNCODE.checkImgLoad(imgFirst,loadFirst,loadError);var loadSlides=function($thisBg){$thisBg.attr("data-load","loaded")};$multiBgs.not('[data-load="loaded"]').each(function(ind,val){var $thisBg=$(val);if(typeof $thisBg!="undefined"&&$thisBg.length){var _imgBg=$(val).find(".background-inner").css("background-image");typeof _imgBg=="undefined"||_imgBg===""||_imgBg==="none"?$thisBg.attr("data-load","loaded"):(_imgBg=_imgBg.replace("url(","").replace(")","").replace(/\"/gi,""),typeof _imgBg!="undefined"&&UNCODE.checkImgLoad(_imgBg,loadSlides,loadError,$thisBg))}});var multiCarousel=function(e){clearRequestTimeout(requestCarousel);var checkTime=new Date;if(checkTime-startTime>=carouselTime&&isInViewport){var $checkEl=$multiBgs.eq((counter+1)%bgAmount);if($checkEl.attr("data-load")!=="loaded"){requestTimeout(function(){multiCarousel()},100);return}counter++,$multiBgs.each(function(ind,val){ind===counter%bgAmount?$(val).stop(!0,!1).animate({opacity:1},wait,"easeInQuad").css({zIndex:1}):$(val).stop(!0,!1).animate({opacity:0},wait,"easeInQuad").css({zIndex:0})})}if(transition===""||UNCODE.wwidth<=UNCODE.mediaQueryMobile)requestCarousel=requestTimeout(multiCarousel,carouselTime)},multiMove=function(e){if($body.hasClass("navbar-hover"))return;var checkTime=new Date,bound=$bgWrap[0].getBoundingClientRect(),windowTop=window.clientYOffset||document.documentElement.scrollTop;offX&&(totMove+=Math.sqrt(Math.pow(offY-e.clientY,2)+Math.pow(offX-e.clientX,2))),totMove>=pace&&checkTime-startTime>=wait&&e.clientX<=bound.left+bound.width&&e.clientX>=bound.left&&e.clientY<=bound.top+bound.height&&e.clientY>=bound.top&&(counter++,startTime=checkTime,$multiBgs.each(function(ind,val){ind===counter%bgAmount?$(val).stop(!0,!1).animate({opacity:1},wait,"easeInQuad").css({zIndex:1}):$(val).stop(!0,!1).animate({opacity:0},wait,"easeInQuad").css({zIndex:0})}),totMove=0),offX=e.clientX,offY=e.clientY};transition==="mouse"&&UNCODE.wwidth>UNCODE.mediaQueryMobile&&document.addEventListener("mousemove",multiMove),window.addEventListener("resize",function(){transition==="mouse"&&UNCODE.wwidth>UNCODE.mediaQueryMobile&&(document.removeEventListener("mousemove",multiMove),document.addEventListener("mousemove",multiMove))});var lightLoopRAF=function(){var scrollTop=(window.clientYOffset||document.documentElement.scrollTop)-(document.documentElement.clientTop||0),checkTime=new Date,bound=$bgWrap[0].getBoundingClientRect(),thresholdHeader=is_header?100:threshold,rePace=(bound.height-bound.height*threshold/100)/100*pace+(bound.height-bound.height*thresholdHeader/100)/100*pace;Math.abs(lastScrollTop-scrollTop)>=rePace&&(counter++,lastScrollTop=scrollTop,startTime=checkTime,$multiBgs.each(function(ind,val){ind===counter%bgAmount?$(val).stop(!0,!1).animate({opacity:1},wait,"easeInQuad").css({zIndex:1}):$(val).stop(!0,!1).animate({opacity:0},wait,"easeInQuad").css({zIndex:0})})),requestAnimationFrame(function(){isInViewport&&lightLoopRAF()})},currentInd=0,loopRAF=function(){var multiBgRotate=function(slideInd){currentInd=slideInd,$multiBgs.each(function(ind,val){ind===slideInd?$(val).stop(!0,!1).animate({opacity:1},wait,"easeInQuad").css({zIndex:1}):$(val).stop(!0,!1).animate({opacity:0},wait,"easeInQuad").css({zIndex:0})})},bound=$bgWrap[0].getBoundingClientRect(),thresholdPX=UNCODE.wheight*threshold/100,totMove=UNCODE.wheight+bound.height-thresholdPX*parseFloat(2-is_header),movePX=totMove/bgAmount,moving=UNCODE.wheight-(bound.top+thresholdPX),slideInd=0;UNCODE.wheight-bound.top<thresholdPX&&0!==currentInd?multiBgRotate(0):bound.top+bound.height<thresholdPX&&bgAmount-1!==currentInd?multiBgRotate(bgAmount-1):(slideInd=Math.ceil(moving/movePX)-1,slideInd<0?slideInd=0:slideInd>=bgAmount&&(slideInd=bgAmount-1),slideInd!==currentInd&&multiBgRotate(slideInd)),requestAnimationFrame(function(){isInViewport&&loopRAF()})};if("IntersectionObserver"in window){var observer=new IntersectionObserver(function(entries){entries.forEach(function(entry){entry.isIntersecting?(isInViewport=!0,transition==="scroll"?autoScroll?loopRAF():lightLoopRAF():multiCarousel()):isInViewport=!1})},{root:document,rootMargin:is_header?"-"+threshold+"% 0px 100% 0px":"-"+threshold+"% 0px"});(transition!=="mouse"||transition==="mouse"&&UNCODE.wwidth<=UNCODE.mediaQueryMobile&&dataMobileCarousel==="yes")&&observer.observe(_bgWrap),window.addEventListener("resize",function(){observer.unobserve(_bgWrap),(transition!=="mouse"||transition==="mouse"&&UNCODE.wwidth<=UNCODE.mediaQueryMobile&&dataMobileCarousel==="yes")&&observer.observe(_bgWrap)})}})},UNCODE.owlNav=function(target,ev){target=target.replace(/#\S+/g,"");var $carousel=$("#"+target),$slider=$carousel.closest(".uncode-slider"),$checkNavs=$(".uncode-owl-nav");if(!$checkNavs.length)return;$slider.length&&(target=$slider.attr("id"));var $navs=$('.uncode-owl-nav[data-target="#'+target+'"]'),$row;$navs.length||($row=$carousel.closest(".vc_row.row-container"),$navs=$(".uncode-owl-nav:not([data-target])",$row));if(!$navs.length)return;$navs.each(function(){function counter(event){if(!event.namespace)return;var slides=event.relatedTarget,current=slides._current,loop=SiteParameters.is_frontend_editor&&slides.closest(".uncode-slider").length?!1:slides.settings.loop,item=event.item,page=event.page,countPages=Math.ceil(item.count/page.size),$currentSlide=$carousel.find(".owl-item").eq(current),itemIndex=Math.floor($currentSlide.attr("data-index")),activeSlide=Math.ceil(itemIndex/page.size),$prev=$nav.find(".uncode-nav-prev"),$next=$nav.find(".uncode-nav-next"),$col=$currentSlide.find(".uncol").first();if(totalSlides!=countPages){totalSlides=countPages,$navDots.html("");var nav_html="";for(var sl_ind=0;sl_ind<countPages;sl_ind++){var padN=sl_ind+1;digit&&digit>1&&(padN=String(padN).padStart(digit,"0")),nav_html+='<span class="uncode-nav-index" data-key="'+Math.floor(sl_ind*page.size)+'"><span>'+padN+"</span></span>"}$navDots.html(nav_html);var totalSlidesDigit=totalSlides;counterDigit&&counterDigit>1&&(totalSlidesDigit=String(totalSlidesDigit).padStart(counterDigit,"0")),$counterTotal.html(totalSlidesDigit)}loop!==!0&&($nav.find(".uncode-nav-disabled").removeClass("uncode-nav-disabled"),itemIndex===1?$prev.addClass("uncode-nav-disabled"):itemIndex-1+page.size>=item.count&&($next.addClass("uncode-nav-disabled"),activeSlide=Math.ceil(item.count/page.size))),$nav.find(".uncode-nav-index").removeClass("active-index").eq(activeSlide-1).addClass("active-index");var activeSlideDigit=activeSlide;counterDigit&&counterDigit>1&&(activeSlideDigit=String(activeSlideDigit).padStart(counterDigit,"0")),$counterIndex.html(activeSlideDigit),skinInherit&&($col.hasClass("style-light")?$nav.removeClass("style-dark").addClass("style-light"):$col.hasClass("style-dark")&&$nav.removeClass("style-light").addClass("style-dark")),$inner.removeClass("uncode-owl-nav-waiting");if($nav.hasClass("outer-width")){var navW=$nav.outerWidth(),nexW=$next.outerWidth(),prevW=$prev.outerWidth(),margins=Math.abs(parseFloat($next.css("margin-left")))+Math.abs(parseFloat($next.css("margin-right")));$nav.hasClass("h-align-justify")?($inner.css({"max-width":"calc(100vw - "+(nexW+prevW+margins*2)+"px)"}),navW+nexW+prevW+margins*2>UNCODE.wwidth?$inner.css({margin:"auto"}):$inner.css({margin:""})):($inner.css({"max-width":"calc(100vw - "+2*(nexW+prevW+margins)+"px)"}),navW+2*(nexW+prevW+margins)>UNCODE.wwidth?$inner.css({margin:"auto"}):$inner.css({margin:""}))}}var $nav=$(this),$outer=$nav.closest(".uncode-owl-nav-out"),$inner=$nav.find(".uncode-owl-nav-in"),$navDots=$(".uncode-nav-dots",$nav),$navCounter=$(".uncode-nav-counter",$nav),$counterIndex=$(".uncode-nav-counter-index",$navCounter),$counterTotal=$(".uncode-nav-counter-total",$navCounter),skinInherit=$nav.hasClass("skin-inherit"),digit=parseFloat($nav.attr("data-digit")),counterDigit=parseFloat($nav.attr("data-counter-digit")),navSpeed=parseFloat($carousel.attr("data-navspeed"));navSpeed=typeof navSpeed!="undefined"&&navSpeed!==""?navSpeed:400,$nav.hasClass("pos-abs")&&($carousel.closest(".owl-carousel-wrapper-nav").length||$carousel.closest(".owl-carousel-wrapper").wrap('<div class="owl-carousel-wrapper-nav" />'),$carousel.closest(".owl-carousel-wrapper-nav").append($outer)),$carousel.on("refreshed.owl.carousel",counter),$carousel.on("resized.owl.carousel",counter),$carousel.on("changed.owl.carousel",counter);var totalSlides=0;$nav.on("click",".uncode-nav-index",function(){var $bullet=$(this),slide_index=parseFloat($bullet.attr("data-key"));$carousel.trigger("to.owl.carousel",[slide_index,navSpeed,!0])}),$nav.on("click",".uncode-nav-prev",function(){$carousel.trigger("prev.owl.carousel",[navSpeed])}),$nav.on("click",".uncode-nav-next",function(){$carousel.trigger("next.owl.carousel",[navSpeed])}),$nav.hasClass("animated-arrows")&&$(".uncode-nav-prev, .uncode-nav-next",$nav).on("mouseenter",function(){$(this).addClass("hover")}).on("animationend",function(){$(this).removeClass("hover")});var positionNav=function(){if($nav.hasClass("window-width")){var navOff=parseFloat($nav.offset().left)*-1;navOff>0?$inner.css({transform:"translateX("+navOff+"px)"}):$inner.css({transform:"none"})}};positionNav(),$(window).on("resize",positionNav)}),$carousel.closest(".owl-carousel-container").find(".uncode-owl-nav").addClass("appended")},UNCODE.init=function(){var wfl_check=!1,wfl_request,waypoint_request;UNCODE.preventDoubleTransition(),UNCODE.betterResize(),UNCODE.utils(),UNCODE.magnetic(),typeof UNCODE.rowParallax!="undefined"&&UNCODE.rowParallax(),typeof UNCODE.changeSkinOnScroll!="undefined"&&UNCODE.changeSkinOnScroll(),typeof UNCODE.share!="undefined"&&UNCODE.share(),typeof UNCODE.tooltip!="undefined"&&UNCODE.tooltip(),typeof UNCODE.counters!="undefined"&&UNCODE.counters(),typeof UNCODE.countdowns!="undefined"&&UNCODE.countdowns(),typeof UNCODE.tabs!="undefined"&&UNCODE.tabs(),typeof UNCODE.collapse!="undefined"&&UNCODE.collapse(),typeof UNCODE.bigText!="undefined"&&UNCODE.bigText(),UNCODE.menuSystem(),typeof UNCODE.bgChanger!="undefined"&&UNCODE.bgChanger(),typeof UNCODE.magicCursor!="undefined"&&UNCODE.magicCursor(),typeof UNCODE.magneticCursor!="undefined"&&UNCODE.magneticCursor(),typeof UNCODE.dropImage!="undefined"&&UNCODE.dropImage(),typeof UNCODE.postTable!="undefined"&&UNCODE.postTable(),typeof UNCODE.rotatingTxt!="undefined"&&UNCODE.rotatingTxt(),typeof UNCODE.okvideo!="undefined"&&(UNCODE.okvideo(),window.addEventListener("uncode-more-items-loaded",function(){UNCODE.okvideo("uncode-more-items-loaded")})),typeof UNCODE.backgroundSelfVideos!="undefined"&&UNCODE.backgroundSelfVideos(),UNCODE.tapHover(),typeof UNCODE.isotopeLayout!="undefined"&&UNCODE.isotopeLayout(),typeof UNCODE.justifiedGallery!="undefined"&&UNCODE.justifiedGallery(),typeof UNCODE.cssGrid!="undefined"&&UNCODE.cssGrid(),typeof UNCODE.linearGrid!="undefined"&&UNCODE.linearGrid(),typeof UNCODE.lightbox!="undefined"&&!SiteParameters.lbox_enhanced&&UNCODE.lightbox(),typeof UNCODE.lightgallery!="undefined"&&SiteParameters.lbox_enhanced&&$(window).on("load more-items-loaded",function(){UNCODE.lightgallery()}),typeof UNCODE.carousel!="undefined"&&UNCODE.carousel($("body")),typeof UNCODE.lettering!="undefined"&&UNCODE.lettering(),UNCODE.animations(),typeof UNCODE.stickyElements!="undefined"&&!SiteParameters.is_frontend_editor&&UNCODE.stickyElements(),typeof UNCODE.twentytwenty!="undefined"&&UNCODE.twentytwenty(),UNCODE.disableHoverScroll(),UNCODE.printScreen(),typeof UNCODE.particles!="undefined"&&UNCODE.particles(),typeof UNCODE.filters!="undefined"&&UNCODE.filters(),typeof UNCODE.ajax_filters!="undefined"&&UNCODE.ajax_filters(),typeof UNCODE.widgets!="undefined"&&UNCODE.widgets(),typeof UNCODE.unmodal!="undefined"&&UNCODE.unmodal(),typeof UNCODE.checkScrollForTabs!="undefined"&&(UNCODE.isFullPage||UNCODE.checkScrollForTabs()),typeof UNCODE.onePage!="undefined"&&UNCODE.onePage(UNCODE.isMobile),typeof UNCODE.fullPage!="undefined"&&$(document).ready(function(){UNCODE.fullPage()}),typeof UNCODE.skewIt!="undefined"&&UNCODE.skewIt(),typeof UNCODE.rotateIt!="undefined"&&UNCODE.rotateIt(),typeof UNCODE.textMarquee!="undefined"&&UNCODE.textMarquee(),typeof UNCODE.stickyScroll!="undefined"&&UNCODE.stickyScroll(),typeof UNCODE.stickyTrigger!="undefined"&&UNCODE.stickyTrigger(),typeof UNCODE.verticalText!="undefined"&&UNCODE.verticalText(),typeof UNCODE.videoThumbs!="undefined"&&UNCODE.videoThumbs(),typeof UNCODE.revslider!="undefined"&&UNCODE.revslider(),typeof UNCODE.layerslider!="undefined"&&UNCODE.layerslider(),typeof UNCODE.lottie!="undefined"&&UNCODE.lottie(),typeof UNCODE.inlineImgs!="undefined"&&UNCODE.inlineImgs(),typeof UNCODE.animatedBgGradient!="undefined"&&UNCODE.animatedBgGradient(),typeof UNCODE.readMoreCol!="undefined"&&UNCODE.readMoreCol(),typeof UNCODE.multibg!="undefined"&&UNCODE.multibg(),typeof UNCODE.flexEqual!="undefined"&&UNCODE.flexEqual(),$(window).on("load",function(){clearRequestTimeout(waypoint_request),waypoint_request=requestTimeout(function(){Waypoint.refreshAll()},1e3)}),$(window).one("load",function(){typeof UNCODE.parallax!="undefined"&&UNCODE.parallax()})},SiteParameters.is_frontend_editor||UNCODE.init()})(jQuery);
var showLoader=!1;function pwaforwp_play_loader(){var e=!!navigator.userAgent.match(/Version\/[\d\.]+.*Safari/),a=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream;if(e&&a){let l=document.querySelectorAll("a,input,button");for(let t=0;t<l.length;t++)l[t].addEventListener("click",handle_ios_clicks_for_loader);"disabled"!=window.localStorage.getItem("pwaforwp_defaultload")&&(document.getElementsByClassName("pwaforwp-loading-wrapper")&&void 0!==document.getElementsByClassName("pwaforwp-loading-wrapper")[0]&&(document.getElementsByClassName("pwaforwp-loading-wrapper")[0].style.display="flex"),document.getElementById("pwaforwp_loading_div")&&(document.getElementById("pwaforwp_loading_div").style.display="flex"),document.getElementById("pwaforwp_loading_icon")&&(document.getElementById("pwaforwp_loading_icon").style.display="flex"),setInterval(function(){if(document.getElementById("pwaforwp_loading_div")&&(document.getElementById("pwaforwp_loading_div").style.display="none"),document.getElementById("pwaforwp_loading_icon")&&(document.getElementById("pwaforwp_loading_icon").style.display="none"),document.getElementsByClassName("pwaforwp-loading-wrapper")&&document.getElementsByClassName("pwaforwp-loading-wrapper").length){let e=document.getElementsByClassName("pwaforwp-loading-wrapper");for(let a=0;a<e.length;a++)e[a].style.display="none"}},1e3,!0)),window.addEventListener("pagehide",function(){if(document.getElementById("pwaforwp_loading_div")&&(document.getElementById("pwaforwp_loading_div").style.display="none"),document.getElementById("pwaforwp_loading_icon")&&(document.getElementById("pwaforwp_loading_icon").style.display="none"),document.getElementsByClassName("pwaforwp-loading-wrapper")&&document.getElementsByClassName("pwaforwp-loading-wrapper").length){let e=document.getElementsByClassName("pwaforwp-loading-wrapper");for(let a=0;a<e.length;a++)e[a].style.display="none"}}),window.localStorage.setItem("pwaforwp_defaultload","enabled")}else window.addEventListener("beforeunload",function(){document.getElementsByClassName("pwaforwp-loading-wrapper")&&void 0!==document.getElementsByClassName("pwaforwp-loading-wrapper")[0]&&(document.getElementsByClassName("pwaforwp-loading-wrapper")[0].style.display="flex"),document.getElementById("pwaforwp_loading_div")&&(document.getElementById("pwaforwp_loading_div").style.display="flex"),document.getElementById("pwaforwp_loading_icon")&&(document.getElementById("pwaforwp_loading_icon").style.display="flex")}),setInterval(function(){if(document.getElementsByClassName("pwaforwp-loading-wrapper")&&document.getElementsByClassName("pwaforwp-loading-wrapper").length>0)for(var e=document.getElementsByClassName("pwaforwp-loading-wrapper"),a=0;a<e.length;a++)e[a].style.display="none";document.getElementById("pwaforwp_loading_div")&&(document.getElementById("pwaforwp_loading_div").style.display="none"),document.getElementById("pwaforwp_loading_icon")&&(document.getElementById("pwaforwp_loading_icon").style.display="none")},5e3,!0)}pwaforwp_is_mobile()&&"1"==pwaforwp_js_obj.loader_mobile&&screen.availWidth<521&&(console.log(screen.availWidth),pwaforwp_play_loader()),"1"==pwaforwp_js_obj.loader_desktop&&screen.availWidth>520&&pwaforwp_play_loader(),"1"==pwaforwp_js_obj.loader_admin&&"1"==pwaforwp_js_obj.user_admin&&pwaforwp_play_loader(),"1"==pwaforwp_js_obj.loader_only_pwa&&(window.matchMedia("(display-mode: standalone)").matches||window.matchMedia("(display-mode: fullscreen)").matches||window.matchMedia("(display-mode: minimal-ui)").matches)&&pwaforwp_play_loader();var close_btns=document.getElementsByClassName(".pwaforwp_add_home_close");function pwaforwp_is_mobile(){var e=!1;return(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|ipad|iris|kindle|Android|Silk|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm(os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(navigator.userAgent)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s)|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp(i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac(|\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt(|\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg(g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v)|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v)|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-|)|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(navigator.userAgent.substr(0,4)))&&(e=!0),e}function handle_ios_clicks_for_loader(e){var a="",l="";a=e.target.getAttribute("href"),l=e.target.getAttribute("type"),(is_valid_url(a)||"submit"==l)&&(window.localStorage.setItem("pwaforwp_defaultload","disabled"),document.getElementsByClassName("pwaforwp-loading-wrapper")&&document.getElementsByClassName("pwaforwp-loading-wrapper").length&&(document.getElementsByClassName("pwaforwp-loading-wrapper")[0].style.display="flex"),document.getElementById("pwaforwp_loading_div")&&(document.getElementById("pwaforwp_loading_div").style.display="flex"),document.getElementById("pwaforwp_loading_icon")&&(document.getElementById("pwaforwp_loading_icon").style.display="flex"))}function is_valid_url(e){return!!RegExp("^(https?:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[;&a-z\\d%_.~+=-]*)?(\\#[-a-z\\d_]*)?$","i").test(e)}close_btns.length&&(close_btns[0].addEventListener("click",function(e){document.cookie="pwaforwp_prompt_close="+new Date,close_btns[0].parentNode.style.display="none"}),0==close_btns[0].offsetWidth&&0==close_btns[0].offsetHeight?document.getElementsByClassName("pwaforwp-sticky-banner").style.display="none":document.getElementsByClassName("pwaforwp-sticky-banner").style.display="block",1==pwaforwp_js_obj.reset_cookies&&(document.cookie="pwaforwp_prompt_close=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;"));
setTimeout(()=>{if((window.matchMedia("(display-mode: standalone)").matches||window.matchMedia("(display-mode: fullscreen)").matches||window.matchMedia("(display-mode: minimal-ui)").matches)&&!navigator.onLine){var e;Array.from(document.getElementsByTagName("video")).forEach(function(e){console.log("Each Loop",e);var a,t,i,o=e.src;console.log(o),!0==(a=o,"mp4"===(t=a,i=t.split("."),i[i.length-1]).toLowerCase())&&(e.setAttribute("src",""),e.parentElement.append("<p>MP4 video is not supported in service worker app</p>"))})}},1e3);
setTimeout(()=>{(window.matchMedia("(display-mode: standalone)").matches||window.matchMedia("(display-mode: fullscreen)").matches||window.matchMedia("(display-mode: minimal-ui)").matches)&&document.addEventListener("click",function(e){if("A"===e.target.tagName){var t=e.target.attributes.download;if(1==(t?"1":"0")){e.preventDefault();var a=e.target.attributes.href.value;e.target.removeAttribute("href"),e.target.setAttribute("link",a);var r=new XMLHttpRequest;r.open("GET",a,!0),r.responseType="blob",r.onload=function(e){if(200==this.status){var a=this.response,r=document.createElement("a");r.href=window.URL.createObjectURL(a),r.download=t,r.click()}},r.send()}}})},1e3),document.addEventListener("DOMContentLoaded",function(){if(pwaforwp_download_js_obj&&pwaforwp_download_js_obj.hasOwnProperty("force_rememberme")&&1==pwaforwp_download_js_obj.force_rememberme){var e=document.getElementById("rememberme"),t=document.querySelector('[name="rememberme"]');e&&(e.checked=!0),t&&(t.checked=!0)}});
jQuery(function(e){if("undefined"==typeof wc_cart_fragments_params)return!1;var t=!0,r=wc_cart_fragments_params.cart_hash_key;try{t="sessionStorage"in window&&null!==window.sessionStorage,window.sessionStorage.setItem("wc","test"),window.sessionStorage.removeItem("wc"),window.localStorage.setItem("wc","test"),window.localStorage.removeItem("wc")}catch(f){t=!1}function n(){t&&sessionStorage.setItem("wc_cart_created",(new Date).getTime())}function o(e){t&&(localStorage.setItem(r,e),sessionStorage.setItem(r,e))}var a={url:wc_cart_fragments_params.wc_ajax_url.toString().replace("%%endpoint%%","get_refreshed_fragments"),type:"POST",data:{time:(new Date).getTime()},timeout:wc_cart_fragments_params.request_timeout,success:function(r){r&&r.fragments&&(e.each(r.fragments,function(t,r){e(t).replaceWith(r)}),t&&(sessionStorage.setItem(wc_cart_fragments_params.fragment_name,JSON.stringify(r.fragments)),o(r.cart_hash),r.cart_hash&&n()),e(document.body).trigger("wc_fragments_refreshed"))},error:function(){e(document.body).trigger("wc_fragments_ajax_error")}};function s(){e.ajax(a)}if(t){var i=null;e(document.body).on("wc_fragment_refresh updated_wc_div",function(){s()}),e(document.body).on("added_to_cart removed_from_cart",function(e,t,a){var s=sessionStorage.getItem(r);null!==s&&s!==undefined&&""!==s||n(),sessionStorage.setItem(wc_cart_fragments_params.fragment_name,JSON.stringify(t)),o(a)}),e(document.body).on("wc_fragments_refreshed",function(){clearTimeout(i),i=setTimeout(s,864e5)}),e(window).on("storage onstorage",function(e){r===e.originalEvent.key&&localStorage.getItem(r)!==sessionStorage.getItem(r)&&s()}),e(window).on("pageshow",function(t){t.originalEvent.persisted&&(e(".widget_shopping_cart_content").empty(),e(document.body).trigger("wc_fragment_refresh"))});try{var c=JSON.parse(sessionStorage.getItem(wc_cart_fragments_params.fragment_name)),_=sessionStorage.getItem(r),g=Cookies.get("woocommerce_cart_hash"),m=sessionStorage.getItem("wc_cart_created");if(null!==_&&_!==undefined&&""!==_||(_=""),null!==g&&g!==undefined&&""!==g||(g=""),_&&(null===m||m===undefined||""===m))throw"No cart_created";if(m){var d=1*m+864e5,w=(new Date).getTime();if(d<w)throw"Fragment expired";i=setTimeout(s,d-w)}if(!c||!c["div.widget_shopping_cart_content"]||_!==g)throw"No fragment";e.each(c,function(t,r){e(t).replaceWith(r)}),e(document.body).trigger("wc_fragments_loaded")}catch(f){s()}}else s();Cookies.get("woocommerce_items_in_cart")>0?e(".hide_cart_widget_if_empty").closest(".widget_shopping_cart").show():e(".hide_cart_widget_if_empty").closest(".widget_shopping_cart").hide(),e(document.body).on("adding_to_cart",function(){e(".hide_cart_widget_if_empty").closest(".widget_shopping_cart").show()}),"undefined"!=typeof wp&&wp.customize&&wp.customize.selectiveRefresh&&wp.customize.widgetsPreview&&wp.customize.widgetsPreview.WidgetPartial&&wp.customize.selectiveRefresh.bind("partial-content-rendered",function(){s()})});
(function($){"use strict";function get_cart(){var ajaxurl="";window.wc_add_to_cart_params!=undefined&&(ajaxurl=wc_add_to_cart_params.ajax_url),window.woocommerce_params!=undefined&&(ajaxurl=woocommerce_params.ajax_url),ajaxurl&&$.post({url:ajaxurl,dataType:"JSON",data:{action:"woomenucart_ajax"},success:function(data,textStatus,XMLHttpRequest){$(".uncode-cart-dropdown").html(data.cart),data!=""&&(SiteParameters.uncode_wc_popup_cart_qty?($(".uncode-cart .badge, .mobile-shopping-cart .badge").length?$(".uncode-cart .badge, .mobile-shopping-cart .badge").html(data.articles):$(".uncode-cart .cart-icon-container").append('<span class="badge init-product-counter">'+data.articles+"</span>"),$(document.body).trigger("uncode_get_cart",[data.articles])):$(".uncode-cart .badge, .mobile-shopping-cart .badge").length?data.articles>0?($(".uncode-cart .badge, .mobile-shopping-cart .badge").html(data.articles),$(".uncode-cart .badge, .mobile-shopping-cart .badge").show()):$(".uncode-cart .badge, .mobile-shopping-cart .badge").hide():$(".uncode-cart .cart-icon-container").append('<span class="badge">'+data.articles+"</span>"))}})}function remove_from_cart(){$(document).on("click",".uncode-cart-dropdown a.remove",function(e){var $remove=$(this),product_id=$remove.attr("data-product_id"),item_key=$remove.attr("data-item_key"),$li=$remove.parents(".cart-item-list").eq(0).addClass("removing-item").animate({opacity:.5},150);return $.post({dataType:"json",url:wc_add_to_cart_params.ajax_url,data:{action:"woomenucart_remove_ajax",item_key:item_key},success:function(html){$li.slideUp(200,function(){get_cart()})}}),!1})}function reset_product_image(event,variation){var $target=event.target,$row=$target.closest(".row-parent",$row),get_href=$("a.woocommerce-main-image",$row),image_variable=$("> img",get_href),getLightbox=typeof UNCODE.lightbox!="undefined"&&!SiteParameters.lbox_enhanced?UNCODE.lightboxArray[get_href.data("lbox")]:!1;SiteParameters.uncode_adaptive==1&&(image_variable.removeClass(["async-done","woocommerce-product-gallery__image-first__img"]).addClass("adaptive-async"),image_variable.wc_reset_variation_attr("src"),image_variable.wc_reset_variation_attr("data-path"),image_variable.wc_reset_variation_attr("data-guid"),UNCODE.adaptive()),getLightbox!=undefined&&getLightbox!==!1?getLightbox.refresh():SiteParameters.lbox_enhanced&&get_href.closest(".woocommerce-product-gallery").trigger("more-items-loaded")}function change_images(event,variation){if($(this).closest(".tmb-woocommerce").length>0)return;UNCODE.single_product_variation_already_changed=!0;if(variation.image_src!==""){var $target=event.target,$row=$target.closest(".row-parent",$row),get_href=$("a.woocommerce-main-image",$row),$col_bg=$(".uncol-featured-image .background-inner",$row),image_variable=$("> img",get_href),image_thumb=variation.image.thumb_src,gallery_thumb=variation.image.gallery_thumbnail_src,image_srcset=variation.image.thumb_srcset,getLightbox=typeof UNCODE.lightbox!="undefined"&&!SiteParameters.lbox_enhanced?UNCODE.lightboxArray[get_href.data("lbox")]:!1;get_href.data("options","thumbnail: '"+variation.image_src+"'"),SiteParameters.uncode_adaptive==1&&(image_variable.wc_set_variation_attr("src",variation.image_src),image_variable.wc_set_variation_attr("data-path",variation.uncode_image_path),image_variable.wc_set_variation_attr("data-guid",variation.uncode_image_guid),image_variable.removeClass(["async-done","woocommerce-product-gallery__image-first__img"]).addClass("adaptive-async"),UNCODE.adaptive()),getLightbox!=undefined&&getLightbox!==!1?getLightbox.refresh():SiteParameters.lbox_enhanced&&get_href.closest(".woocommerce-product-gallery").trigger("more-items-loaded"),$(window).trigger("focus");var $woocommerce_product_gallery_nav=$(".woocommerce-product-gallery-nav");if($woocommerce_product_gallery_nav.length){var $first_thumb=$woocommerce_product_gallery_nav.find(".woocommerce-product-gallery__wrapper-nav li.woocommerce-product-gallery__first-thumb img",$row);if(SiteParameters.uncode_adaptive==1){var data_crop=$first_thumb.attr("data-crop"),data_singlew=$first_thumb.attr("data-singlew"),data_singleh=$first_thumb.attr("data-singleh");$first_thumb.attr("src",gallery_thumb).attr("data-path",variation.uncode_image_path).attr("data-guid",variation.uncode_image_guid).attr("data-uniqueid",variation.data_uniqueid).attr("data-width",variation.data_width).attr("data-height",variation.data_height).attr("data-singlew",variation.data_singlew).attr("data-singleh",variation.data_singleh).attr("data-crop",variation.data_crop),$woocommerce_product_gallery_nav.hasClass("lateral-nav-wrapper")||($first_thumb.removeClass(["async-done","adaptive-fetching"]).addClass("adaptive-async"),UNCODE.adaptive())}else $first_thumb.attr("src",gallery_thumb),image_srcset&&$first_thumb.attr("srcset",image_srcset),$(window).trigger("woocommerce_variation_has_loaded")}if($col_bg.length){var objImg=new Image,bg_img_src;$col_bg.hasClass("async-done")?bg_img_src=variation.image_link:bg_img_src=variation.image_src,objImg.src=bg_img_src,objImg.onload=function(){$col_bg.animate({opacity:0},100,function(){$col_bg.css({"background-image":"url("+bg_img_src+")"}),$col_bg.animate({opacity:1},250)})}}}}function reset_data(event){if(UNCODE.single_product_variation_already_changed){var $col_bg=$(".uncol-featured-image .background-inner"),$first_thumb=$(".woocommerce-product-gallery__first-thumb img"),bg_img_src,bg_img_srcset,objImg=new Image;$col_bg.length?(bg_img_src=$col_bg.attr("data-o_src"),objImg=new Image,objImg.src=bg_img_src,objImg.onload=function(){$col_bg.animate({opacity:0},100,function(){$col_bg.css({"background-image":"url("+bg_img_src+")"}),$col_bg.animate({opacity:1},250)})}):$first_thumb.length&&(bg_img_src=$first_thumb.attr("data-o_src"),bg_img_srcset=$first_thumb.attr("data-o_srcset"),objImg=new Image,objImg.src=bg_img_src,objImg.onload=function(){$first_thumb.attr("src",bg_img_src).attr("srcset",bg_img_srcset),$(window).trigger("woocommerce_variation_has_loaded")})}}function check_variation_values(event){var $selects=$(event.currentTarget).find("select"),checkSelectValues=!1;$selects.each(function(){var $select=$(this);$select.val()!==""&&(checkSelectValues=!0)}),checkSelectValues?$(event.currentTarget).removeClass("hide-clear"):$(event.currentTarget).addClass("hide-clear"),setTimeout(function(){$(window).trigger("woocommerce_variation_has_loaded")},1250)}function reloadVariations(){remove_from_cart(),$("body").on("added_to_cart wc_fragments_refreshed removed_from_cart",get_cart),$("body").hasClass("uncode-default-product-gallery")||$(".variations_form").on("show_variation",change_images).on("reset_data",reset_data).on("check_variations",check_variation_values).on("reset_image",reset_product_image)}function handleRatings(){$("#rating").length&&setTimeout(function(){$(".comment-form-rating").each(function(){var $wrap=$(this),$stars=$("p.stars",$wrap).remove();$('select[name="rating"]',$wrap).hide().before('<p class="stars"><span><a class="star-1" href="#">1</a><a class="star-2" href="#">2</a><a class="star-3" href="#">3</a><a class="star-4" href="#">4</a><a class="star-5" href="#">5</a></span></p>')})},10)}function redirect_to_custom_empty_cart(){UncodeWCParameters.empty_cart_url!==""&&window.location.replace(UncodeWCParameters.empty_cart_url)}function variation_price_font(){var $forms=$("form.variations_form");$forms.each(function(){var $form=$(this);$form.on("woocommerce_variation_has_changed wc_variation_form",function(){var $var_price=$(".woocommerce-variation-price .woocommerce-Price-amount"),$row=$form.closest(".vc_row"),$main_price=$(".heading-text .woocommerce-Price-amount",$row);if($main_price.length){var $price_wrap=$main_price.closest(".heading-text"),$price_nest=$("> *:first-child",$price_wrap),font_class=$price_nest.attr("class").split(" "),i;for(i=0;i<font_class.length;i++)font_class[i].indexOf("font")!==-1&&font_class[i].indexOf("fontsize")===-1&&$var_price.addClass(font_class[i])}})})}var UNCODE_WC=window.UNCODE_WC||{};window.UNCODE_WC=UNCODE_WC,$(document).ready(reloadVariations),$(document).on("uncode-quick-view-loaded",reloadVariations),$(document).ready(handleRatings),$(document).on("vc-uncode_single_product_reviews",handleRatings),$(document).on("vc-uncode_single_product_reviews",function(e,el){if(el!=="undefined"){var $tabContainer=$(el).closest(".tab-container");$tabContainer.addClass("wootabs")}});var scrollToReviews=function(){if($(".wootabs, .wpb_accordion").length){var hash=window.location.hash,url=window.location.href,$tabs=$(this).find("ul.nav-tabs").first(),$accordion=$(this).find(".panel-group").first(),scrollAction=!1,$tabs_wrapper=$tabs.closest(".wootabs"),$both_wrapper,$li,$panel,$click_trigger=!1,scrollToReviewsInside=function(clicked){if($tabs.length&&$("#reviews",$tabs_wrapper).length){var tab_reviews=$("#reviews",$tabs_wrapper).first().closest(".tab-pane").attr("id");$('[data-tab-id="'+tab_reviews+'"]',$tabs).addClass("reviews_tab"),$li=$(".reviews_tab",$tabs),$both_wrapper=$tabs_wrapper,$click_trigger=!0}else if($accordion.length&&$("#reviews",$accordion).length){var tab_reviews=$("#reviews",$accordion).first().closest(".tab-pane").attr("id");$panel=$("#reviews",$accordion).first().closest(".panel"),$li=$(".panel-title",$panel),$both_wrapper=$accordion,$click_trigger=!0}else{if(!$("div#reviews").length||!clicked)return!1;$both_wrapper=$("div#reviews"),scrollAction=!0}$click_trigger&&(hash.toLowerCase().indexOf("comment-")>=0||hash==="#reviews"||hash==="#tab-reviews")?($("a",$li).click(),scrollAction=!0):$click_trigger&&(url.indexOf("comment-page-")>0||url.indexOf("cpage=")>0)&&($("a",$li).click(),scrollAction=!0);if(!scrollAction)return!1;var body=$("html, body"),bodyTop=document.documentElement.scrollTop||document.body.scrollTop,delta=bodyTop-($both_wrapper.length?$both_wrapper.offset().top:0),getOffset=UNCODE.get_scroll_offset();if(typeof $both_wrapper.offset()=="undefined")return;scrollTo=$both_wrapper.offset().top-27,scrollTo-=getOffset;var scrollSpeed=SiteParameters.constant_scroll=="on"?Math.abs(delta)/parseFloat(SiteParameters.scroll_speed):SiteParameters.scroll_speed;scrollSpeed<1e3&&SiteParameters.constant_scroll=="on"&&(scrollSpeed=1e3),scrollSpeed==0?body.scrollTop(delta>0?scrollTo-.1:scrollTo):body.animate({scrollTop:delta>0?scrollTo-.1:scrollTo},scrollSpeed,"easeInOutQuad")};scrollToReviewsInside(!1),$("a.woocommerce-review-link").on("click",function(e){e.preventDefault(),hash="#reviews",scrollToReviewsInside(!0)})}};$(document).ready(scrollToReviews);var qtyPlusMinus=function(){$(".qty-inset:not(.qty-inset-active)").each(function(){var $qtyInsets=$(this).addClass("qty-inset-active"),$input=$("input.qty",$qtyInsets),$minus=$(".qty-minus",$qtyInsets),$plus=$(".qty-plus",$qtyInsets),step=parseFloat($input.attr("step")),min=parseFloat($input.attr("min")),max=parseFloat($input.attr("max")),value=parseFloat($input.val());isNaN(step)&&(step=1),isNaN(min)&&(min=1),isNaN(value)&&(value=0,$input.val(value)),$minus.on("click",function(){UncodeWCParameters.activate_input_check_on_click&&(step=parseFloat($input.attr("step")),min=parseFloat($input.attr("min")),max=parseFloat($input.attr("max")),isNaN(step)&&(step=1),isNaN(min)&&(min=1)),value=parseFloat($input.val())-step,value<min&&(value=min),$input.val(value).trigger("change")}),$plus.on("click",function(){UncodeWCParameters.activate_input_check_on_click&&(console.log("click"),step=parseFloat($input.attr("step")),min=parseFloat($input.attr("min")),max=parseFloat($input.attr("max")),isNaN(step)&&(step=1),isNaN(min)&&(min=1)),value=parseFloat($input.val())+step,!isNaN(max)&&value>max&&(value=max),$input.val(value).trigger("change")})})},resizeCartRow=function(){$("form.woocommerce-cart-form").length>0&&window.dispatchEvent(new CustomEvent("vc-resize"))};$(document.body).on("updated_cart_totals",qtyPlusMinus),$(document.body).on("updated_cart_totals",resizeCartRow),$(document).ready(qtyPlusMinus),$(document).on("vc-frontend:vc_button",qtyPlusMinus);var woocommerce_product_gallery=function(){$("body:not(.single-uncodeblock) .woocommerce-product-gallery").each(function(){if($("body").hasClass("uncode-default-product-gallery"))return;var $slider=$(this);UNCODE_WC.product_gallery($slider)})};UNCODE_WC.product_gallery=function($slider){var $parent=$slider.closest(".uncode-wrapper").length?$slider.closest(".uncode-wrapper"):$slider.closest(".uncont"),cols=parseFloat($slider.attr("data-columns")),dots=$parent.attr("data-dots")=="true",gutter=$parent.length&&typeof $parent.attr("data-gutter")!="undefined"?parseFloat($parent.attr("data-gutter")):18,$main=$(".woocommerce-product-gallery__wrapper.owl-carousel",$parent),$stack=$(".woocommerce-layout-images-stack-lateral .woocommerce-product-gallery__wrapper",$parent),mainL=$main.find(".woocommerce-product-gallery__image").length,$thumbs=$(".woocommerce-product-gallery__wrapper-nav:not(.lateral-nav)",$parent),$thumbs_nav=$(".woocommerce-product-gallery__wrapper-nav",$parent),thumbsL=$thumbs.find("li").length;$.fn.owlCarousel&&mainL>1&&$slider.hasClass("owl-carousel-wrapper")&&($main.owlCarousel({items:1,autoHeight:!0,rtl:$("body").hasClass("rtl")?!0:!1,responsiveRefreshRate:200,responsive:{0:{dots:$(".woocommerce-product-gallery__wrapper-nav.lateral-nav",$parent).length||dots===!0},960:{dots:dots}}}).on("changed.owl.carousel",function(event){if(event.namespace&&event.property.name==="position"){var target=event.relatedTarget.relative(event.property.value,!0),data=$thumbs.data("owl.carousel");$(".owl-item",$thumbs).eq(target).hasClass("active")||$thumbs.owlCarousel("to",target,300,!0)}}),$main.on("translate.owl.carousel",function(event){$(event.currentTarget).addClass("owl-translating")}),$main.on("translated.owl.carousel",function(event){$(event.currentTarget).removeClass("owl-translating")}),$thumbs.on("initialized.owl.carousel",function(event){$thumbs.closest(".woocommerce-product-gallery-nav-wrapper").css({opacity:1})}).owlCarousel({items:cols,margin:gutter,autoHeight:!0,nav:!0,rtl:$("body").hasClass("rtl")?!0:!1,mouseDrag:cols<thumbsL,navText:['<div class="owl-nav-container btn-default btn-hover-nobg"><i class="fa fa-fw fa-angle-left"></i></div>','<div class="owl-nav-container btn-default btn-hover-nobg"><i class="fa fa-fw fa-angle-right"></i></div>'],responsiveRefreshRate:100}),$(window).on("load uncode-quick-view-first-hover woocommerce_variation_has_loaded",function(){$main.trigger("refresh.owl.carousel"),$thumbs.trigger("refresh.owl.carousel");var product_div=$main.closest("div.woocommerce-product-gallery--with-variation-gallery");!product_div.length>0&&($(".owl-item",$main).eq(0).hasClass("active")||$main.owlCarousel("to",0,300,!0),$(".owl-item",$thumbs).eq(0).hasClass("active")||$thumbs.owlCarousel("to",0,300,!0))}));var scrollBody=function(index){$(".woocommerce-product-gallery__thumb",$thumbs_nav).removeClass("is-selected"),$(".woocommerce-product-gallery__thumb",$thumbs_nav).eq(index).addClass("is-selected");var top_gutter=parseInt($stack.closest(".row").css("padding-top")),getSection=$(".woocommerce-product-gallery__image",$stack).eq(index),scrollTo;if(getSection==undefined)return;var body=$("html, body"),bodyTop=document.documentElement.scrollTop||document.body.scrollTop,delta=bodyTop-($(".woocommerce-product-gallery__image",$stack).eq(index).length?$(".woocommerce-product-gallery__image",$stack).eq(index).offset().top:0),getOffset=UNCODE.get_scroll_offset(index);if(typeof getSection.offset()=="undefined")return;scrollTo=getSection.offset().top;if(!($(".menu-desktop-transparent").length&&UNCODE.wwidth>UNCODE.mediaQuery)&&!($(".menu-mobile-transparent").length&&UNCODE.wwidth<=UNCODE.mediaQueryMobile)){var shrink=typeof $(".navbar-brand").data("padding-shrink")!="undefined"?$(".navbar-brand").data("padding-shrink")*2:36;$(".menu-sticky .menu-container:not(.menu-hide)").length&&$(".menu-shrink").length&&(scrollTo+=UNCODE.menuHeight-($(".navbar-brand").data("minheight")+shrink)),$(".menu-sticky .menu-container:not(.menu-hide)").length&&!$(".menu-shrink").length&&$(".body").hasClass("vmenu")?index===0?scrollTo=0:scrollTo-=$(".menu-sticky .menu-container").outerHeight():scrollTo-=getOffset}scrollTo-=top_gutter;var scrollSpeed=SiteParameters.constant_scroll=="on"?Math.abs(delta)/parseFloat(SiteParameters.scroll_speed):SiteParameters.scroll_speed;scrollSpeed<1e3&&SiteParameters.constant_scroll=="on"&&(scrollSpeed=1e3),index!=0&&(UNCODE.scrolling=!0),scrollSpeed==0?(body.scrollTop(delta>0?scrollTo-.1:scrollTo),UNCODE.scrolling=!1):body.on("scroll wheel DOMMouseScroll mousewheel touchmove",function(){$(this).stop()}).stop(!0,!1).animate({scrollTop:delta>0?scrollTo-.1:scrollTo},scrollSpeed,"easeInOutCubic",function(){UNCODE.scrolling=!1})},changeThumbActive=function(section,index){var newSection=$(".woocommerce-product-gallery__thumb",$thumbs_nav).eq(index);newSection.length&&($(".woocommerce-product-gallery__thumb",$thumbs_nav).removeClass("is-selected"),newSection.addClass("is-selected"))};$(".woocommerce-product-gallery__image",$stack).each(function(index,val){new Waypoint({context:UNCODE.isUnmodalOpen?document.getElementById("unmodal-content"):window,element:val,handler:function(direction){changeThumbActive(this.element,index)}})}),$thumbs_nav.on("click",".woocommerce-product-gallery__thumb",function(e){e.preventDefault();var number=$(this).index();$main.length?(number=$(this).closest(".owl-item").index(),number<0&&(number=$(this).index()),$main.owlCarousel("to",number,300,!0)):$stack.length&&scrollBody(number)});var uncodeZoom=function(){if($.fn.zoom&&$("body").hasClass("wc-zoom-enabled")){var $zoomTrgt=$(".woocommerce-product-gallery__image",$slider);$(".thumbnails",$slider).length&&($zoomTrgt=$zoomTrgt.first()),$zoomTrgt.trigger("zoom.destroy"),$zoomTrgt.zoom();var checkForZoom=function(){if($parent.hasClass("no-zoom-mobile")&&UNCODE.wwidth<960)return $zoomTrgt.trigger("zoom.destroy").addClass("mouse-moving"),$(".zoom-overlay",$zoomTrgt).remove(),!1;$(".woocommerce-product-gallery__image").each(function(){var $wrap=$(this),$zoomImg=$(".zoomImg",$wrap);(UNCODE.isMobile||!$zoomImg.length)&&$wrap.addClass("mouse-moving")});var galleryWidth=$zoomTrgt.width(),zoom_options={touch:!0,callback:function(){$(".woocommerce-product-gallery__image").each(function(){var $wrap=$(this),$zoomImg=$(".zoomImg",$wrap),$overZoom=$(".zoom-overlay",$wrap),$imageIL=$("a[data-lbox]",$wrap),$carousel=$wrap.closest(".owl-carousel");$wrap.prepend($zoomImg);if(UNCODE.isMobile||!$zoomImg.length)$wrap.addClass("mouse-moving"),$zoomImg.css({visibility:"hidden"});var onlongtouch,timer,now,touchduration=500,startX=0,startY,newX,newY;$wrap.parent().on("mousemove.zoom",function(){$wrap.hasClass("mouse-moving")||(startX==0&&(startX=event.clientX,startY=event.clientY),newX=event.clientX,newY=event.clientY,Math.abs(newX-startX)>50&&Math.abs(newY-startY)>50&&$wrap.addClass("mouse-moving"))}),$overZoom.on("touchstart.zoom",function(e){now=(new Date).getTime()}).on("touchmove.zoom",function(e){setTimeout(function(){$zoomImg.css({visibility:"visible"})},100)}).on("touchend.zoom",function(e){var newTap=(new Date).getTime();newTap-now<75&&!$("body").hasClass("ilightbox-noscroll")&&$imageIL.trigger("itap.iL"),UNCODE.isMobile&&$zoomImg.css({visibility:"hidden"})})})}};"ontouchstart"in window&&(zoom_options.on="click"),$zoomTrgt.trigger("zoom.destroy"),$zoomTrgt.each(function(){var $thisTrgt=$(this),$img=$("img",$thisTrgt);$img.data("large_image_width")>galleryWidth?$thisTrgt.zoom(zoom_options):$thisTrgt.trigger("zoom.destroy")})};checkForZoom();var setCheckForZoom;$(window).on("resize",function(){clearTimeout(setCheckForZoom),setCheckForZoom=setTimeout(checkForZoom,500)})}};uncodeZoom(),window.addEventListener("load",uncodeZoom)},woocommerce_product_gallery(),$(window).on("unmodal-open",function(){$("#unmodal-content .woocommerce-product-gallery__image").removeClass("mouse-moving")}),$(document).on("unmodal-close",function(){$("#unmodal-content .woocommerce-product-gallery__image").removeClass("mouse-moving")}),$(document.body).on("wc_cart_emptied",redirect_to_custom_empty_cart),$(document).ready(function(){variation_price_font()});var cartShow,cartHover,sideCart_scrollTop=$("html, body").scrollTop(),minicart_notify=function(){var $body=$("body");if(!$body.hasClass("minicart-notification"))return!1;var $sidecart=$("#uncode_sidecart"),$miniCart=$(".menu-smart .uncode-cart-dropdown"),$smartMenu=$miniCart.closest(".menu-smart");$miniCart.on("hover",function(){clearTimeout(cartHover)});var show_added_to_cart=function(e){clearTimeout(cartShow),clearTimeout(cartHover),$sidecart.length&&!($body.hasClass("uncode-sidecart-mobile-disabled")&&UNCODE.wwidth<=UNCODE.mediaQuery)&&$sidecart.imagesLoaded().done(function(instance){setTimeout(function(){sideCart_scrollTop=$("html, body").scrollTop(),$body.addClass("uncode-sidecart-open"),$(window).trigger("uncode-sidecart-open"),$("html, body").scrollTop(sideCart_scrollTop)},500)});var show_added_to_cart_timeout=function(){cartShow=setTimeout(function(){$miniCart.imagesLoaded().done(function(instance){$smartMenu.smartmenus("itemActivate",$(".uncode-cart > a")),cartHover=setTimeout(function(){$smartMenu.smartmenus("menuHideAll")},4e3)})},500)};UNCODE.wwidth>=960&&(e=="uncode-wc-added-to-cart"?show_added_to_cart_timeout():$(document.body).on("wc_fragments_loaded",function(){show_added_to_cart_timeout()}))};$("body").hasClass("uncode-wc-disable-added-to-cart-trigger")?$(document.body).on("added_to_cart",function(){setTimeout(function(){$(document.body).trigger("wc_fragment_refresh")},500)}):$(document.body).on("added_to_cart",show_added_to_cart),$(document).ready(function(){$("body").hasClass("uncode-wc-added-to-cart")&&show_added_to_cart("uncode-wc-added-to-cart")})};minicart_notify(),$(document.body).on("wc_cart_button_updated",function(e,$button){if($(document.body).hasClass("minicart-notification")||wc_add_to_cart_params==undefined)return!1;$button.addClass("added_and_noted").removeClass("ajax_add_to_cart").find(".added_to_cart").text(wc_add_to_cart_params.i18n_view_cart).on("click",function(e){return e.preventDefault(),window.location.href=wc_add_to_cart_params.cart_url,!1})});var init_sidecart=function(){var $body=$("body.uncode-sidecart-enabled");if(!$body.length)return!1;var $cart_icon=$(".mobile-shopping-cart, .uncode-cart.menu-item-link > a"),$sidecart=$("#uncode_sidecart"),$view_cart=$("a.wc-forward:not(.checkout)",$sidecart).removeClass("btn-sm"),$checkout=$("a.checkout",$sidecart).removeClass("btn-sm").addClass("btn-flat"),$overlay=$("#uncode_sidecart_overlay"),$close_cart=$(".close-mini-cart",$sidecart),sidecart_hover=!1;$cart_icon.off("click").on("click",function(e){$sidecart.length&&!($(this).closest(".overlay").length&&UNCODE.wwidth>UNCODE.mediaQuery)&&!($body.hasClass("uncode-sidecart-mobile-disabled")&&UNCODE.wwidth<=UNCODE.mediaQuery)&&(e.preventDefault(),e.stopPropagation(),sideCart_scrollTop=$("html, body").scrollTop(),$body.addClass("uncode-sidecart-open"),$(window).trigger("uncode-sidecart-open"),$("html, body").scrollTop(sideCart_scrollTop))}),$sidecart.on("mouseover",function(){sidecart_hover=!0}).on("mouseout",function(){sidecart_hover=!1}),$body.on("click",function(e){$body.hasClass("uncode-sidecart-open")&&!sidecart_hover&&($body.removeClass("uncode-sidecart-open"),$(window).trigger("uncode-sidecart-closed"),$("html, body").scrollTop(sideCart_scrollTop))}),$close_cart.on("click",function(e){e.preventDefault(),$body.removeClass("uncode-sidecart-open"),$(window).trigger("uncode-sidecart-closed"),$("html, body").scrollTop(sideCart_scrollTop)})};$(document).ready(function(){init_sidecart()}),$(document.body).on("wc_fragments_refreshed added_to_cart removed_from_cart",function(){init_sidecart(),requestTimeout(init_sidecart,1)});var sidecart_size=function(){var $body=$("body.uncode-sidecart-enabled"),$widget_cart=$(".widget_shopping_cart_content"),$mini_cart_item=$(".mini_cart_item",$widget_cart);$widget_cart.length&&$mini_cart_item.each(function(){var $this=$(this),$img_product=$(".attachment-woocommerce_thumbnail",$this),imgH=$img_product.height();$this.css({"min-height":imgH+6})});if($body.length){var $sidecart=$("#uncode_sidecart"),$cart_header=$(".woocommerce-mini-cart-header",$sidecart),headerH=$cart_header.outerHeight(),$cart_footer=$(".woocommerce-mini-cart-footer",$sidecart),footerH=$cart_footer.outerHeight(),$cart_body=$(".woocommerce-mini-cart-body",$sidecart);$cart_body.css({"padding-top":headerH,"padding-bottom":footerH})}};$(document).ready(function(){var setCTA;sidecart_size(),requestTimeout(function(){$(window).on("resize",function(){clearRequestTimeout(setCTA),setCTA=requestTimeout(sidecart_size,100)})},400)}),$(document.body).on("wc_fragments_refreshed added_to_cart removed_from_cart",function(){sidecart_size(),requestTimeout(sidecart_size,1)});var modal_quick_view_content=$(".quick-view-content"),last_viewed_product_id;$(document).off("click",".quick-view-button").on("click",".quick-view-button",function(){var _this=$(this),product_id=_this.data("post-id"),post_type=_this.data("post-type"),post_url=_this.attr("data-post-url"),single_variation_atts=_this.attr("data-single-variation");modal_quick_view_content.length>0&&modal_quick_view_content.html("");var data={action:"uncode_load_ajax_quick_view",post_id:product_id,post_type:post_type,post_url:post_url};if(single_variation_atts){var variation_atts_obj=JSON.parse(single_variation_atts);for(var att_key in variation_atts_obj)variation_atts_obj[att_key]&&(data["attribute_"+att_key]=variation_atts_obj[att_key])}return $.ajax({url:woocommerce_params.ajax_url,data:data,type:"post",error:function(data){SiteParameters.enable_debug==1&&console.log("AJAX error on quick view response")},success:function(response){if(response&&response.success===!1)SiteParameters.enable_debug==1&&(response.data.error?console.log(response.data.error):console.log("Unknown error on quick view response"));else{var html=response.data.html;modal_quick_view_content.length>0&&modal_quick_view_content.html(html),last_viewed_product_id=product_id,modal_quick_view_content.imagesLoaded().done(function(instance){$(document).trigger("uncode-unmodal-show-content"),$(document).trigger("uncode-quick-view-loaded"),window.dispatchEvent(new CustomEvent("uncode-quick-view-loaded")),setTimeout(function(){modal_quick_view_content.one("mousemove",function(){window.dispatchEvent(new CustomEvent("uncode-quick-view-first-hover"))})},10)})}}}),!1}),$(document).on("uncode-quick-view-loaded",function(){var form_variation=modal_quick_view_content.find(".variations_form");form_variation.each(function(){$(this).wc_variation_form()}),form_variation.trigger("check_variations"),form_variation.trigger("reset_image"),typeof $.fn.wc_product_gallery!="undefined"&&modal_quick_view_content.find(".woocommerce-product-gallery").each(function(){$(this).wc_product_gallery()}),$("#unmodal-content").on("change",".quantity .qty",function(){jQuery(this).closest("form.cart").find(".add_to_cart_button").attr("data-quantity",jQuery(this).val())}),woocommerce_product_gallery(),variation_price_font(),qtyPlusMinus(),UNCODE.preventDoubleTransition(),UNCODE.utils(),typeof UNCODE.share!="undefined"&&UNCODE.share(),typeof UNCODE.tooltip!="undefined"&&UNCODE.tooltip(),typeof UNCODE.counters!="undefined"&&UNCODE.counters(),typeof UNCODE.countdowns!="undefined"&&UNCODE.countdowns(),typeof UNCODE.tabs!="undefined"&&UNCODE.tabs(),typeof UNCODE.collapse!="undefined"&&UNCODE.collapse(),typeof UNCODE.okvideo!="undefined"&&UNCODE.okvideo(),typeof UNCODE.backgroundSelfVideos!="undefined"&&UNCODE.backgroundSelfVideos(),UNCODE.tapHover(),typeof UNCODE.isotopeLayout!="undefined"&&UNCODE.isotopeLayout(),typeof UNCODE.justifiedGallery!="undefined"&&UNCODE.justifiedGallery(),typeof UNCODE.cssGrid!="undefined"&&UNCODE.cssGrid(),typeof UNCODE.lightbox!="undefined"&&!SiteParameters.lbox_enhanced&&UNCODE.lightbox(),typeof UNCODE.lightgallery!="undefined"&&SiteParameters.lbox_enhanced&&UNCODE.lightgallery(),typeof UNCODE.carousel!="undefined"&&UNCODE.carousel($("body")),UNCODE.lettering(),UNCODE.animations(),UNCODE.stickyElements(),typeof UNCODE.twentytwenty!="undefined"&&UNCODE.twentytwenty(),UNCODE.disableHoverScroll(),typeof uncode_progress_bar!="undefined"&&uncode_progress_bar(),typeof UNCODE.filters!="undefined"&&UNCODE.filters(),typeof UNCODE.ajax_filters!="undefined"&&UNCODE.ajax_filters(),typeof UNCODE.widgets!="undefined"&&UNCODE.widgets(),$(document).trigger("yith_wcwl_init")}),SiteParameters.update_wc_fragments==1&&$(document).ready(function(){$(document.body).trigger("wc_fragment_refresh")}),$(document).ready(function(){SiteParameters.uncode_wc_popup_cart_qty&&$(document.body).on("wc_fragments_loaded",function(){$(".cart-icon-container .badge").removeClass("init-product-counter")}).on("uncode_get_cart",function(e,data){$(".cart-icon-container .badge").text()!==""||data>0?$(".cart-icon-container .badge").addClass("init-product-counter"):$(".cart-icon-container .badge").removeClass("init-product-counter")})})})(jQuery);
!function(t,e){"object"==typeof module&&module.exports?module.exports=e():t.EvEmitter=e()}("undefined"!=typeof window?window:this,(function(){function t(){}let e=t.prototype;return e.on=function(t,e){if(!t||!e)return this;let i=this._events=this._events||{},s=i[t]=i[t]||[];return s.includes(e)||s.push(e),this},e.once=function(t,e){if(!t||!e)return this;this.on(t,e);let i=this._onceEvents=this._onceEvents||{};return(i[t]=i[t]||{})[e]=!0,this},e.off=function(t,e){let i=this._events&&this._events[t];if(!i||!i.length)return this;let s=i.indexOf(e);return-1!=s&&i.splice(s,1),this},e.emitEvent=function(t,e){let i=this._events&&this._events[t];if(!i||!i.length)return this;i=i.slice(0),e=e||[];let s=this._onceEvents&&this._onceEvents[t];for(let n of i){s&&s[n]&&(this.off(t,n),delete s[n]),n.apply(this,e)}return this},e.allOff=function(){return delete this._events,delete this._onceEvents,this},t})),
function(t,e){"object"==typeof module&&module.exports?module.exports=e(t,require("ev-emitter")):t.imagesLoaded=e(t,t.EvEmitter)}("undefined"!=typeof window?window:this,(function(t,e){let i=t.jQuery,s=t.console;function n(t,e,o){if(!(this instanceof n))return new n(t,e,o);let r=t;var h;("string"==typeof t&&(r=document.querySelectorAll(t)),r)?(this.elements=(h=r,Array.isArray(h)?h:"object"==typeof h&&"number"==typeof h.length?[...h]:[h]),this.options={},"function"==typeof e?o=e:Object.assign(this.options,e),o&&this.on("always",o),this.getImages(),i&&(this.jqDeferred=new i.Deferred),setTimeout(this.check.bind(this))):s.error(`Bad element for imagesLoaded ${r||t}`)}n.prototype=Object.create(e.prototype),n.prototype.getImages=function(){this.images=[],this.elements.forEach(this.addElementImages,this)};const o=[1,9,11];n.prototype.addElementImages=function(t){"IMG"===t.nodeName&&this.addImage(t),!0===this.options.background&&this.addElementBackgroundImages(t);let{nodeType:e}=t;if(!e||!o.includes(e))return;let i=t.querySelectorAll("img");for(let t of i)this.addImage(t);if("string"==typeof this.options.background){let e=t.querySelectorAll(this.options.background);for(let t of e)this.addElementBackgroundImages(t)}};const r=/url\((['"])?(.*?)\1\)/gi;function h(t){this.img=t}function d(t,e){this.url=t,this.element=e,this.img=new Image}return n.prototype.addElementBackgroundImages=function(t){let e=getComputedStyle(t);if(!e)return;let i=r.exec(e.backgroundImage);for(;null!==i;){let s=i&&i[2];s&&this.addBackground(s,t),i=r.exec(e.backgroundImage)}},n.prototype.addImage=function(t){let e=new h(t);this.images.push(e)},n.prototype.addBackground=function(t,e){let i=new d(t,e);this.images.push(i)},n.prototype.check=function(){if(this.progressedCount=0,this.hasAnyBroken=!1,!this.images.length)return void this.complete();let t=(t,e,i)=>{setTimeout((()=>{this.progress(t,e,i)}))};this.images.forEach((function(e){e.once("progress",t),e.check()}))},n.prototype.progress=function(t,e,i){this.progressedCount++,this.hasAnyBroken=this.hasAnyBroken||!t.isLoaded,this.emitEvent("progress",[this,t,e]),this.jqDeferred&&this.jqDeferred.notify&&this.jqDeferred.notify(this,t),this.progressedCount===this.images.length&&this.complete(),this.options.debug&&s&&s.log(`progress: ${i}`,t,e)},n.prototype.complete=function(){let t=this.hasAnyBroken?"fail":"done";if(this.isComplete=!0,this.emitEvent(t,[this]),this.emitEvent("always",[this]),this.jqDeferred){let t=this.hasAnyBroken?"reject":"resolve";this.jqDeferred[t](this)}},h.prototype=Object.create(e.prototype),h.prototype.check=function(){this.getIsImageComplete()?this.confirm(0!==this.img.naturalWidth,"naturalWidth"):(this.proxyImage=new Image,this.img.crossOrigin&&(this.proxyImage.crossOrigin=this.img.crossOrigin),this.proxyImage.addEventListener("load",this),this.proxyImage.addEventListener("error",this),this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.proxyImage.src=this.img.currentSrc||this.img.src)},h.prototype.getIsImageComplete=function(){return this.img.complete&&this.img.naturalWidth},h.prototype.confirm=function(t,e){this.isLoaded=t;let{parentNode:i}=this.img,s="PICTURE"===i.nodeName?i:this.img;this.emitEvent("progress",[this,s,e])},h.prototype.handleEvent=function(t){let e="on"+t.type;this[e]&&this[e](t)},h.prototype.onload=function(){this.confirm(!0,"onload"),this.unbindEvents()},h.prototype.onerror=function(){this.confirm(!1,"onerror"),this.unbindEvents()},h.prototype.unbindEvents=function(){this.proxyImage.removeEventListener("load",this),this.proxyImage.removeEventListener("error",this),this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},d.prototype=Object.create(h.prototype),d.prototype.check=function(){this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.img.src=this.url,this.getIsImageComplete()&&(this.confirm(0!==this.img.naturalWidth,"naturalWidth"),this.unbindEvents())},d.prototype.unbindEvents=function(){this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},d.prototype.confirm=function(t,e){this.isLoaded=t,this.emitEvent("progress",[this,this.element,e])},n.makeJQueryPlugin=function(e){(e=e||t.jQuery)&&(i=e,i.fn.imagesLoaded=function(t,e){return new n(this,t,e).jqDeferred.promise(i(this))})},n.makeJQueryPlugin(),n}));
window.wp=window.wp||{},function(r){var t="undefined"==typeof _wpUtilSettings?{}:_wpUtilSettings;wp.template=_.memoize(function(a){var n,s={evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g,variable:"data"};return function(t){var e=document.querySelector("script#tmpl-"+a);if(e)return(n=n||_.template(r(e).html(),s))(t);throw new Error("Template not found: #tmpl-"+a)}}),wp.ajax={settings:t.ajax||{},post:function(t,e){return wp.ajax.send({data:_.isObject(t)?t:_.extend(e||{},{action:t})})},send:function(n,t){var e,a;return _.isObject(n)?t=n:(t=t||{}).data=_.extend(t.data||{},{action:n}),t=_.defaults(t||{},{type:"POST",url:wp.ajax.settings.url,context:this}),(e=(a=r.Deferred(function(a){t.success&&a.done(t.success),t.error&&a.fail(t.error),delete t.success,delete t.error,a.jqXHR=r.ajax(t).done(function(t){var e;"1"!==t&&1!==t||(t={success:!0}),_.isObject(t)&&!_.isUndefined(t.success)?(e=this,a.done(function(){n&&n.data&&"query-attachments"===n.data.action&&a.jqXHR.hasOwnProperty("getResponseHeader")&&a.jqXHR.getResponseHeader("X-WP-Total")?e.totalAttachments=parseInt(a.jqXHR.getResponseHeader("X-WP-Total"),10):e.totalAttachments=0}),a[t.success?"resolveWith":"rejectWith"](this,[t.data])):a.rejectWith(this,[t])}).fail(function(){a.rejectWith(this,arguments)})})).promise()).abort=function(){return a.jqXHR.abort(),this},e}}}(jQuery);
!function(t,a,i,e){var r=function(t){var a=this;a.$form=t,a.$attributeFields=t.find(".variations select"),a.$singleVariation=t.find(".single_variation"),a.$singleVariationWrap=t.find(".single_variation_wrap"),a.$resetVariations=t.find(".reset_variations"),a.$resetAlert=t.find(".reset_variations_alert"),a.$product=t.closest(".product"),a.variationData=t.data("product_variations"),a.useAjax=!1===a.variationData,a.xhr=!1,a.loading=!0,a.$singleVariationWrap.show(),a.$form.off(".wc-variation-form"),a.getChosenAttributes=a.getChosenAttributes.bind(a),a.findMatchingVariations=a.findMatchingVariations.bind(a),a.isMatch=a.isMatch.bind(a),a.toggleResetLink=a.toggleResetLink.bind(a),a.showNoMatchingVariationsMsg=a.showNoMatchingVariationsMsg.bind(a),t.on("click.wc-variation-form",".reset_variations",{variationForm:a},a.onReset),t.on("reload_product_variations",{variationForm:a},a.onReload),t.on("hide_variation",{variationForm:a},a.onHide),t.on("show_variation",{variationForm:a},a.onShow),t.on("click",".single_add_to_cart_button",{variationForm:a},a.onAddToCart),t.on("reset_data",{variationForm:a},a.onResetDisplayedVariation),t.on("reset_focus",{variationForm:a},a.onResetVariationFocus),t.on("announce_reset",{variationForm:a},a.onAnnounceReset),t.on("clear_reset_announcement",{variationForm:a},a.onClearResetAnnouncement),t.on("reset_image",{variationForm:a},a.onResetImage),t.on("change.wc-variation-form",".variations select",{variationForm:a},a.onChange),t.on("found_variation.wc-variation-form",{variationForm:a},a.onFoundVariation),t.on("check_variations.wc-variation-form",{variationForm:a},a.onFindVariation),t.on("update_variation_values.wc-variation-form",{variationForm:a},a.onUpdateAttributes),t.on("keydown.wc-variation-form",".reset_variations",{variationForm:a},a.onResetKeyDown),setTimeout(function(){t.trigger("check_variations"),t.trigger("wc_variation_form",a),a.loading=!1},100)};r.prototype.onReset=function(t){t.preventDefault(),t.data.variationForm.$attributeFields.val("").trigger("change"),t.data.variationForm.$form.trigger("announce_reset"),t.data.variationForm.$form.trigger("reset_data"),t.data.variationForm.$form.trigger("reset_focus")},r.prototype.onReload=function(t){var a=t.data.variationForm;a.variationData=a.$form.data("product_variations"),a.useAjax=!1===a.variationData,a.$form.trigger("check_variations")},r.prototype.onHide=function(t){t.preventDefault(),t.data.variationForm.$form.find(".single_add_to_cart_button").removeClass("wc-variation-is-unavailable").addClass("disabled wc-variation-selection-needed"),t.data.variationForm.$form.find(".woocommerce-variation-add-to-cart").removeClass("woocommerce-variation-add-to-cart-enabled").addClass("woocommerce-variation-add-to-cart-disabled")},r.prototype.onShow=function(a,i,e){a.preventDefault(),e?(a.data.variationForm.$form.find(".single_add_to_cart_button").removeClass("disabled wc-variation-selection-needed wc-variation-is-unavailable"),a.data.variationForm.$form.find(".woocommerce-variation-add-to-cart").removeClass("woocommerce-variation-add-to-cart-disabled").addClass("woocommerce-variation-add-to-cart-enabled")):(a.data.variationForm.$form.find(".single_add_to_cart_button").removeClass("wc-variation-selection-needed").addClass("disabled wc-variation-is-unavailable"),a.data.variationForm.$form.find(".woocommerce-variation-add-to-cart").removeClass("woocommerce-variation-add-to-cart-enabled").addClass("woocommerce-variation-add-to-cart-disabled")),wp.mediaelement&&a.data.variationForm.$form.find(".wp-audio-shortcode, .wp-video-shortcode").not(".mejs-container").filter(function(){return!t(this).parent().hasClass("mejs-mediaelement")}).mediaelementplayer(wp.mediaelement.settings)},r.prototype.onAddToCart=function(i){t(this).is(".disabled")&&(i.preventDefault(),t(this).is(".wc-variation-is-unavailable")?a.alert(wc_add_to_cart_variation_params.i18n_unavailable_text):t(this).is(".wc-variation-selection-needed")&&a.alert(wc_add_to_cart_variation_params.i18n_make_a_selection_text))},r.prototype.onResetDisplayedVariation=function(t){var a=t.data.variationForm;a.$product.find(".product_meta").find(".sku").wc_reset_content(),a.$product.find(".product_weight, .woocommerce-product-attributes-item--weight .woocommerce-product-attributes-item__value").wc_reset_content(),a.$product.find(".product_dimensions, .woocommerce-product-attributes-item--dimensions .woocommerce-product-attributes-item__value").wc_reset_content(),a.$form.trigger("reset_image"),a.$singleVariation.slideUp(200).trigger("hide_variation")},r.prototype.onAnnounceReset=function(t){t.data.variationForm.$resetAlert.text(wc_add_to_cart_variation_params.i18n_reset_alert_text)},r.prototype.onResetVariationFocus=function(t){t.data.variationForm.$attributeFields[0].focus()},r.prototype.onClearResetAnnouncement=function(t){t.data.variationForm.$resetAlert.text("")},r.prototype.onResetImage=function(t){t.data.variationForm.$form.wc_variations_image_update(!1)},r.prototype.onFindVariation=function(a,i){var e=a.data.variationForm,r=void 0!==i?i:e.getChosenAttributes(),o=r.data;if(r.count&&r.count===r.chosenCount)if(e.useAjax)e.xhr&&e.xhr.abort(),e.$form.block({message:null,overlayCSS:{background:"#fff",opacity:.6}}),o.product_id=parseInt(e.$form.data("product_id"),10),o.custom_data=e.$form.data("custom_data"),e.xhr=t.ajax({url:wc_add_to_cart_variation_params.wc_ajax_url.toString().replace("%%endpoint%%","get_variation"),type:"POST",data:o,success:function(t){t?e.$form.trigger("found_variation",[t]):(e.$form.trigger("reset_data"),r.chosenCount=0,e.loading||e.showNoMatchingVariationsMsg())},complete:function(){e.$form.unblock()}});else{e.$form.trigger("update_variation_values");var n=e.findMatchingVariations(e.variationData,o).shift();n?e.$form.trigger("found_variation",[n]):(e.$form.trigger("reset_data"),r.chosenCount=0,e.loading||e.showNoMatchingVariationsMsg())}else e.$form.trigger("update_variation_values"),e.$form.trigger("reset_data");e.toggleResetLink(r.chosenCount>0)},r.prototype.onFoundVariation=function(a,i){var e=a.data.variationForm,r=e.$product.find(".product_meta").find(".sku"),n=e.$product.find(".product_weight, .woocommerce-product-attributes-item--weight .woocommerce-product-attributes-item__value"),s=e.$product.find(".product_dimensions, .woocommerce-product-attributes-item--dimensions .woocommerce-product-attributes-item__value"),c=e.$singleVariationWrap.find('.quantity input.qty[name="quantity"]'),_=c.closest(".quantity"),d=!0,m=!1,v="";if(i.sku?r.wc_set_content(i.sku):r.wc_reset_content(),i.weight?n.wc_set_content(i.weight_html):n.wc_reset_content(),i.dimensions?s.wc_set_content(t.parseHTML(i.dimensions_html)[0].data):s.wc_reset_content(),e.$form.wc_variations_image_update(i),i.variation_is_visible?(m=o("variation-template"),i.variation_id):m=o("unavailable-variation-template"),v=(v=(v=m({variation:i})).replace("/*<![CDATA[*/","")).replace("/*]]>*/",""),e.$singleVariation.html(v),e.$form.find('input[name="variation_id"], input.variation_id').val(i.variation_id).trigger("change"),"yes"===i.is_sold_individually)c.val("1").attr("min","1").attr("max","").trigger("change"),_.hide();else{var l=parseFloat(c.val());l=isNaN(l)?i.min_qty:(l=l>parseFloat(i.max_qty)?i.max_qty:l)<parseFloat(i.min_qty)?i.min_qty:l,c.attr("min",i.min_qty).attr("max",i.max_qty).val(l).trigger("change"),_.show()}i.is_purchasable&&i.is_in_stock&&i.variation_is_visible||(d=!1),e.$singleVariation.text().trim()?e.$singleVariation.slideDown(200).trigger("show_variation",[i,d]):e.$singleVariation.show().trigger("show_variation",[i,d])},r.prototype.onChange=function(t){var a=t.data.variationForm;a.$form.find('input[name="variation_id"], input.variation_id').val("").trigger("change"),a.$form.trigger("clear_reset_announcement"),a.$form.find(".wc-no-matching-variations").parent().remove(),a.useAjax?a.$form.trigger("check_variations"):(a.$form.trigger("woocommerce_variation_select_change"),a.$form.trigger("check_variations")),a.$form.trigger("woocommerce_variation_has_changed")},r.prototype.addSlashes=function(t){return t=(t=t.replace(/'/g,"\\'")).replace(/"/g,'\\"')},r.prototype.onUpdateAttributes=function(a){var i=a.data.variationForm,e=i.getChosenAttributes().data;i.useAjax||(i.$attributeFields.each(function(a,r){var o,n=t(r),s=n.data("attribute_name")||n.attr("name"),c=t(r).data("show_option_none"),_=":gt(0)",d=t("<select/>"),m=n.val()||"",v=!0;if(!n.data("attribute_html")){var l=n.clone();l.find("option").removeAttr("attached").prop("disabled",!1).prop("selected",!1),n.data("attribute_options",l.find("option"+_).get()),n.data("attribute_html",l.html())}d.html(n.data("attribute_html"));var g=t.extend(!0,{},e);g[s]="";var u=i.findMatchingVariations(i.variationData,g);for(var f in u)if("undefined"!=typeof u[f]){var h=u[f].attributes;for(var p in h)if(h.hasOwnProperty(p)){var w=h[p],b="";if(p===s)if(u[f].variation_is_active&&(b="enabled"),w){w=t("<div/>").html(w).text();var $=d.find("option");if($.length)for(var y=0,F=$.length;y<F;y++){var x=t($[y]);if(w===x.val()){x.addClass("attached "+b);break}}}else d.find("option:gt(0)").addClass("attached "+b)}}o=d.find("option.attached").length,m&&(v=!1,0!==o&&d.find("option.attached.enabled").each(function(){var a=t(this).val();if(m===a)return v=!0,!1})),o>0&&m&&v&&"no"===c&&(d.find("option:first").remove(),_=""),d.find("option"+_+":not(.attached)").remove(),n.html(d.html()),n.find("option"+_+":not(.enabled)").prop("disabled",!0),m?v?n.val(m):n.val("").trigger("change"):n.val("")}),i.$form.trigger("woocommerce_update_variation_values"))},r.prototype.getChosenAttributes=function(){var a={},i=0,e=0;return this.$attributeFields.each(function(){var r=t(this).data("attribute_name")||t(this).attr("name"),o=t(this).val()||"";o.length>0&&e++,i++,a[r]=o}),{count:i,chosenCount:e,data:a}},r.prototype.findMatchingVariations=function(t,a){for(var i=[],e=0;e<t.length;e++){var r=t[e];this.isMatch(r.attributes,a)&&i.push(r)}return i},r.prototype.isMatch=function(t,a){var i=!0;for(var e in t)if(t.hasOwnProperty(e)){var r=t[e],o=a[e];void 0!==r&&void 0!==o&&0!==r.length&&0!==o.length&&r!==o&&(i=!1)}return i},r.prototype.toggleResetLink=function(t){t?"hidden"===this.$resetVariations.css("visibility")&&this.$resetVariations.css("visibility","visible").hide().fadeIn():this.$resetVariations.css("visibility","hidden")},r.prototype.showNoMatchingVariationsMsg=function(){this.$form.find(".single_variation").after('<div role="alert"><p class="wc-no-matching-variations woocommerce-info">'+wc_add_to_cart_variation_params.i18n_no_matching_variations_text+"</p></div>").next("div").find(".wc-no-matching-variations").slideDown(200)},r.prototype.onResetKeyDown=function(t){"Enter"!==t.code&&"Space"!==t.code||(t.preventDefault(),t.data.variationForm.onReset(t))},t.fn.wc_variation_form=function(){return new r(this),this},t.fn.wc_set_content=function(t){void 0===this.attr("data-o_content")&&this.attr("data-o_content",this.text()),this.text(t)},t.fn.wc_reset_content=function(){void 0!==this.attr("data-o_content")&&this.text(this.attr("data-o_content"))},t.fn.wc_set_variation_attr=function(t,a){void 0===this.attr("data-o_"+t)&&this.attr("data-o_"+t,this.attr(t)?this.attr(t):""),!1===a?this.removeAttr(t):this.attr(t,a)},t.fn.wc_reset_variation_attr=function(t){void 0!==this.attr("data-o_"+t)&&this.attr(t,this.attr("data-o_"+t))},t.fn.wc_maybe_trigger_slide_position_reset=function(a){var i=t(this),e=i.closest(".product").find(".images"),r=!1,o=a&&a.image_id?a.image_id:"";i.attr("current-image")!==o&&(r=!0),i.attr("current-image",o),r&&e.trigger("woocommerce_gallery_reset_slide_position")},t.fn.wc_variations_image_update=function(i){var e=this,r=e.closest(".product"),o=r.find(".images"),n=r.find(".flex-control-nav"),s=n.find("li:eq(0) img"),c=o.find(".woocommerce-product-gallery__image, .woocommerce-product-gallery__image--placeholder").eq(0),_=c.find(".wp-post-image"),d=c.find("a").eq(0);if(i&&i.image&&i.image.src&&i.image.src.length>1){n.find('li img[data-o_src="'+i.image.gallery_thumbnail_src+'"]').length>0&&e.wc_variations_image_reset();var m=n.find('li img[src="'+i.image.gallery_thumbnail_src+'"]');if(m.length>0)return m.trigger("flexslider-click"),e.attr("current-image",i.image_id),void a.setTimeout(function(){t(a).trigger("resize"),o.trigger("woocommerce_gallery_init_zoom")},20);_.wc_set_variation_attr("src",i.image.src),_.wc_set_variation_attr("height",i.image.src_h),_.wc_set_variation_attr("width",i.image.src_w),_.wc_set_variation_attr("srcset",i.image.srcset),_.wc_set_variation_attr("sizes",i.image.sizes),_.wc_set_variation_attr("title",i.image.title),_.wc_set_variation_attr("data-caption",i.image.caption),_.wc_set_variation_attr("alt",i.image.alt),_.wc_set_variation_attr("data-src",i.image.full_src),_.wc_set_variation_attr("data-large_image",i.image.full_src),_.wc_set_variation_attr("data-large_image_width",i.image.full_src_w),_.wc_set_variation_attr("data-large_image_height",i.image.full_src_h),c.wc_set_variation_attr("data-thumb",i.image.src),s.wc_set_variation_attr("src",i.image.gallery_thumbnail_src),d.wc_set_variation_attr("href",i.image.full_src)}else e.wc_variations_image_reset();a.setTimeout(function(){t(a).trigger("resize"),e.wc_maybe_trigger_slide_position_reset(i),o.trigger("woocommerce_gallery_init_zoom")},20)},t.fn.wc_variations_image_reset=function(){var t=this.closest(".product"),a=t.find(".images"),i=t.find(".flex-control-nav").find("li:eq(0) img"),e=a.find(".woocommerce-product-gallery__image, .woocommerce-product-gallery__image--placeholder").eq(0),r=e.find(".wp-post-image"),o=e.find("a").eq(0);r.wc_reset_variation_attr("src"),r.wc_reset_variation_attr("width"),r.wc_reset_variation_attr("height"),r.wc_reset_variation_attr("srcset"),r.wc_reset_variation_attr("sizes"),r.wc_reset_variation_attr("title"),r.wc_reset_variation_attr("data-caption"),r.wc_reset_variation_attr("alt"),r.wc_reset_variation_attr("data-src"),r.wc_reset_variation_attr("data-large_image"),r.wc_reset_variation_attr("data-large_image_width"),r.wc_reset_variation_attr("data-large_image_height"),e.wc_reset_variation_attr("data-thumb"),i.wc_reset_variation_attr("src"),o.wc_reset_variation_attr("href")},t(function(){"undefined"!=typeof wc_add_to_cart_variation_params&&t(".variations_form").each(function(){t(this).wc_variation_form()})});var o=function(t){var e=i.getElementById("tmpl-"+t).textContent,r=!1;return(r=(r=(r=r||/<#\s?data\./.test(e))||/{{{?\s?data\.(?!variation\.).+}}}?/.test(e))||/{{{?\s?data\.variation\.[\w-]*[^\s}]/.test(e))?wp.template(t):function(t){var i=t.variation||{};return e.replace(/({{{?)\s?data\.variation\.([\w-]*)\s?(}}}?)/g,function(t,e,r,o){if(e.length!==o.length)return"";var n=i[r]||"";return 2===e.length?a.escape(n):n})}}}(jQuery,window,document);
(function($){"use strict";var Utils={get_single_variation_from_attribute:function(variation,attribute,attribute_value){if(variation)for(var attr_name in variation)if(attr_name==="attributes"&&variation.hasOwnProperty(attr_name)){var variation_attr=variation[attr_name],attribute_name="attribute_"+attribute;if(variation_attr.hasOwnProperty(attribute_name)&&variation_attr[attribute_name]===attribute_value)return variation}return!1},get_url_parameter:function(key){var url=window.location.search.substring(1),url_variables=url.split("&"),param_key,i;for(i=0;i<url_variables.length;i++){param_key=url_variables[i].split("=");if(param_key[0]===key)return param_key[1]===undefined?!0:decodeURIComponent(param_key[1])}return!1}},Single_Product={has_variation_changed:!1,doing_clear:!1,first_load:!0,variable_add_to_cart:function(){window.wc_add_to_cart_params!=undefined&&window.UncodeWCParameters!=undefined&&UncodeWCParameters.variations_ajax_add_to_cart==="1"&&$("form.variations_form").on("submit",function(e){var form=$(this),product_wrapper=form.closest(".tmb-woocommerce"),is_loop=!1;if(product_wrapper.length===0){product_wrapper=form.closest(".product-type-variable");if(product_wrapper.length===0)return}else is_loop=!0;e.preventDefault();var form_button=form.find(".single_add_to_cart_button"),form_data=form.serialize();form_data+="&action=uncode_ajax_add_to_cart",form_button.val()&&(form_data+="&add-to-cart="+form_button.val()),form_button.removeClass("added","added-error"),form_button.addClass("loading");if(is_loop){var loop_button=product_wrapper.find(".add_to_cart_button").not(":button");loop_button.removeClass("added","added-error"),loop_button.addClass("loading")}$.ajax({url:wc_add_to_cart_params.ajax_url,data:form_data,method:"POST",success:function(response){if(!response)return;if(UncodeWCParameters.redirect_after_add==="1")window.location=UncodeWCParameters.cart_url;else{form_button.removeClass("loading"),is_loop&&loop_button.removeClass("loading"),fragments&&$.each(fragments,function(key){$(key).addClass("updating")}),fragments&&$.each(fragments,function(key,value){$(key).replaceWith(value)});var fragments=response.fragments,cart_hash=response.cart_hash,notices_wrapper=$(".woocommerce-notices-wrapper");notices_wrapper.length>0&&notices_wrapper.empty(),response.notices.indexOf("error")>0?(notices_wrapper.length>0&&notices_wrapper.append(response.notices),form_button.addClass("added-error"),is_loop&&loop_button.addClass("added-error")):(form_button.addClass("added"),is_loop&&loop_button.addClass("added"),$(document.body).trigger("added_to_cart",[fragments,cart_hash,form_button]))}},error:function(){SiteParameters.enable_debug==1&&console.log("There was an error when adding the product to the cart")}})})},update_variation_gallery:function(event,variation,form,gallery_params,clear){if(clear&&!Single_Product.has_variation_changed){var form=$(event.target);$(".product-gallery-placeholder").removeClass("product-gallery-placeholder"),$(window).trigger("uncode_wc_variation_gallery_loaded"),form.removeClass("is-updating-gallery");return}if(clear&&Single_Product.doing_clear){form.removeClass("is-updating-gallery");return}clear&&(Single_Product.doing_clear=!0),clear||(Single_Product.doing_clear=!1);var quick_view_container=form.closest(".quick-view-container"),old_gallery=quick_view_container.length>0?quick_view_container.find(".uncode-single-product-gallery"):$(".uncode-single-product-gallery");old_gallery.addClass("product-gallery-placeholder");var product_id=form.attr("data-product_id"),parent_gallery=old_gallery.parent();$.ajax({url:UncodeWCParameters.ajax_url,data:{action:"uncode_get_variation_gallery",variation:typeof variation!="undefined"?variation:0,product_id:product_id,clear:clear,gallery_params:gallery_params,is_quick_view:quick_view_container.length>0?!0:!1},type:"post",success:function(response){if(!response){form.removeClass("is-updating-gallery");return}if(response.data&&response.data.html){var new_gallery=$(response.data.html);if(new_gallery.length>0){new_gallery.addClass("hidden"),parent_gallery.append(new_gallery);var appended_gallery=parent_gallery.find(".uncode-single-product-gallery");appended_gallery.imagesLoaded().done(function(instance){var main_gallery=appended_gallery.find(".woocommerce-product-gallery");appended_gallery.removeClass("hidden"),$(".product-gallery-placeholder").removeClass("product-gallery-placeholder"),$(window).trigger("uncode_wc_variation_gallery_loaded"),old_gallery.remove(),typeof UNCODE_WC.product_gallery!="undefined"&&(UNCODE_WC.product_gallery(main_gallery),main_gallery.css("opacity","1")),typeof UNCODE.adaptive!="undefined"&&UNCODE.adaptive(),typeof UNCODE.lightbox!="undefined"&&!SiteParameters.lbox_enhanced?UNCODE.lightbox():typeof UNCODE.lightgallery!="undefined"&&SiteParameters.lbox_enhanced&&UNCODE.lightgallery(),form.removeClass("is-updating-gallery")})}else form.removeClass("is-updating-gallery");Single_Product.has_variation_changed=!0,UNCODE.stickyElements()}},error:function(){form.removeClass("is-updating-gallery"),SiteParameters.enable_debug==1&&console.log("There was an error retrieving the variation gallery")}})},variation_gallery:function(){$("body").hasClass("uncode-default-product-gallery")||$("form.variations_form").each(function(){var form=$(this),product_div=form.closest("div.woocommerce-product-gallery--with-variation-gallery");if(product_div.length>0){var original_values=form.find("select").serialize(),gallery_params=product_div.find(".woocommerce-product-gallery.images").data("gallery-options"),default_images=gallery_params.default_images,original_images=default_images;form.on("found_variation.wc-variation-form",function(event,variation){if(!form.hasClass("is-updating-gallery")){form.addClass("is-updating-gallery");var new_values=form.find("select").serialize(),new_images=[];variation.image_id&&new_images.push(variation.image_id);if(variation.variation_gallery)for(var variation_gallery_id in variation.variation_gallery)new_images.push(variation.variation_gallery[variation_gallery_id]);var has_new_images=Single_Product.has_new_images(original_images,new_images);new_values!=original_values||Single_Product.first_load?(original_values=new_values,Single_Product.first_load=!1,has_new_images?(Single_Product.update_variation_gallery(event,variation,form,gallery_params,!1),original_images=new_images):($(".product-gallery-placeholder").removeClass("product-gallery-placeholder"),$(window).trigger("uncode_wc_variation_gallery_loaded"),form.removeClass("is-updating-gallery"))):form.removeClass("is-updating-gallery")}}).on("reset_image",function(event,variation){Single_Product.update_variation_gallery(event,variation,form,gallery_params,!0),original_images=default_images})}})},has_new_images:function(original_images,new_images){if(!original_images instanceof Array)return!0;if(!new_images instanceof Array)return!0;if(original_images.length!==new_images.length)return!0;for(var i=0;i<original_images.length;i++)if(new_images.indexOf(original_images[i])<0)return!0;return!1}},Loop_Variations={init_forms:function(){$("form.variations_form").each(function(){var form=$(this),tmb_wrapper=form.closest(".tmb-woocommerce");if(tmb_wrapper.length===0)return;var form_button=form.find(".single_add_to_cart_button"),button_to_connect=tmb_wrapper.find(".add_to_cart_button").not(":button");button_to_connect.on("click",function(e){e.preventDefault(),form_button.trigger("click")});var product_img=tmb_wrapper.find("img[class*=wp-image], .uncode-picture-image").last(),picture_el=product_img.closest("picture"),source_el=picture_el.find("source"),bg_el=tmb_wrapper.find("div.t-background-cover").last(),prices=tmb_wrapper.find("span.price");prices=prices.filter(function(){return $(this).closest(".t-entry-variations").length>0?!1:!0});var original_price=prices.last().clone(),original_price_value=original_price.children(),stock=tmb_wrapper.find(".t-entry-stock"),original_stock=stock.clone(),original_stock_value=original_stock.children(),title=tmb_wrapper.find(".t-entry-title"),original_title=title.clone(),original_title_value=original_title.html(),url=tmb_wrapper.find(".t-entry-visual-cont > a").attr("href");form.on("hide_variation",function(){button_to_connect.find(".add_to_cart_text").html(UncodeWCParameters.i18n_variation_add_to_cart_text),Loop_Variations.reset_variation_price(prices,original_price_value),Loop_Variations.reset_variation_stock(stock,original_stock_value),Loop_Variations.reset_variation_title(title,original_title_value),Loop_Variations.reset_product_urls(tmb_wrapper,url)}).on("show_variation",function(event,variation,purchasable){purchasable?button_to_connect.find(".add_to_cart_text").html(UncodeWCParameters.i18n_add_to_cart_text):button_to_connect.find(".add_to_cart_text").html(UncodeWCParameters.i18n_variation_add_to_cart_text),Loop_Variations.update_variation_price(prices,original_price_value,variation),Loop_Variations.update_variation_stock(stock,original_stock_value,variation),Loop_Variations.update_variation_title(title,original_title_value,variation),Loop_Variations.update_product_urls(tmb_wrapper,variation)}).on("found_variation.wc-variation-form",function(event,variation){Loop_Variations.update_variation_image(product_img,bg_el,picture_el,source_el,variation)}).on("reset_image",function(event,variation){Loop_Variations.update_variation_image(product_img,bg_el,picture_el,source_el,!1)})})},init_single_attributes:function(){$(".single-attribute-selector").each(function(){var selector=$(this),tmb_wrapper=selector.closest(".tmb-woocommerce"),selector_type="";if(tmb_wrapper.length===0)return;var select_attr=selector.find("select");if(select_attr.length>0){var selected_attr=select_attr.val();selector_type="select"}else{var swatches=selector.find(".swatch"),active_swatch=selector.find(".swatch--active");swatches.length>0&&(selector_type="swatch")}var product_img=tmb_wrapper.find("img[class*=wp-image], .uncode-picture-image").last(),picture_el=product_img.closest("picture"),source_el=picture_el.find("source"),bg_el=tmb_wrapper.find("div.t-background-cover").last(),prices=tmb_wrapper.find("span.price");prices=prices.filter(function(){return $(this).closest(".t-entry-variations").length>0?!1:!0});var original_price=prices.last().clone(),original_price_value=original_price.children(),stock=tmb_wrapper.find(".t-entry-stock"),original_stock=stock.clone(),original_stock_value=original_stock.children(),title=tmb_wrapper.find(".t-entry-title"),original_title=title.clone(),original_title_value=original_title.html(),url=tmb_wrapper.find(".t-entry-visual-cont > a").attr("href");SiteParameters.dynamic_srcset_active==="1"?picture_el.length>0?picture_el.on("srcset-done",function(){picture_el.hasClass("adaptive-fixed")||(selector_type==="select"&&selected_attr?Loop_Variations.init_single_select_variation(tmb_wrapper,select_attr,selected_attr,product_img,bg_el,picture_el,source_el,prices,original_price_value,stock,original_stock_value,title,original_title_value,url):selector_type==="swatch"&&active_swatch.length>0&&Loop_Variations.init_single_swatch_variation(tmb_wrapper,selector,active_swatch,product_img,bg_el,picture_el,source_el,prices,original_price_value,stock,original_stock_value,title,original_title_value,url),picture_el.addClass("adaptive-fixed"))}):product_img.on("srcset-done",function(){product_img.hasClass("adaptive-fixed")||(selector_type==="select"&&selected_attr?Loop_Variations.init_single_select_variation(tmb_wrapper,select_attr,selected_attr,product_img,bg_el,picture_el,source_el,prices,original_price_value,stock,original_stock_value,title,original_title_value,url):selector_type==="swatch"&&active_swatch.length>0&&Loop_Variations.init_single_swatch_variation(tmb_wrapper,selector,active_swatch,product_img,bg_el,picture_el,source_el,prices,original_price_value,stock,original_stock_value,title,original_title_value,url),product_img.addClass("adaptive-fixed"))}):SiteParameters.uncode_adaptive_async==="1"?bg_el.length>0?bg_el.on("async-done",function(){bg_el.hasClass("adaptive-fixed")||(selector_type==="select"&&selected_attr?Loop_Variations.init_single_select_variation(tmb_wrapper,select_attr,selected_attr,product_img,bg_el,picture_el,source_el,prices,original_price_value,stock,original_stock_value,title,original_title_value,url):selector_type==="swatch"&&active_swatch.length>0&&Loop_Variations.init_single_swatch_variation(tmb_wrapper,selector,active_swatch,product_img,bg_el,picture_el,source_el,prices,original_price_value,stock,original_stock_value,title,original_title_value,url),bg_el.addClass("adaptive-fixed"))}):product_img.length>0&&product_img.on("async-done",function(){product_img.hasClass("adaptive-fixed")||(selector_type==="select"&&selected_attr?Loop_Variations.init_single_select_variation(tmb_wrapper,select_attr,selected_attr,product_img,bg_el,picture_el,source_el,prices,original_price_value,stock,original_stock_value,title,original_title_value,url):selector_type==="swatch"&&active_swatch.length>0&&Loop_Variations.init_single_swatch_variation(tmb_wrapper,selector,active_swatch,product_img,bg_el,picture_el,source_el,prices,original_price_value,stock,original_stock_value,title,original_title_value,url),product_img.addClass("adaptive-fixed"))}):selector_type==="select"&&selected_attr?Loop_Variations.init_single_select_variation(tmb_wrapper,select_attr,selected_attr,product_img,bg_el,picture_el,source_el,prices,original_price_value,stock,original_stock_value,title,original_title_value,url):selector_type==="swatch"&&active_swatch.length>0&&Loop_Variations.init_single_swatch_variation(tmb_wrapper,selector,active_swatch,product_img,bg_el,picture_el,source_el,prices,original_price_value,stock,original_stock_value,title,original_title_value,url),selector_type==="select"&&select_attr.on("change",function(){var selected_attr=$(this).val();Loop_Variations.init_single_select_variation(tmb_wrapper,select_attr,selected_attr,product_img,bg_el,picture_el,source_el,prices,original_price_value,stock,original_stock_value,title,original_title_value,url)}),selector_type==="swatch"&&(!selector.hasClass("single-attribute-selector--hover")||"ontouchstart"in window?swatches.on("click",function(){var active_swatch=$(this);Loop_Variations.set_single_swatch_variation(tmb_wrapper,swatches,selector,active_swatch,product_img,bg_el,picture_el,source_el,prices,original_price_value,stock,original_stock_value,title,original_title_value,url)}):swatches.on("mouseenter",function(){var active_swatch=$(this);Loop_Variations.set_single_swatch_variation(tmb_wrapper,swatches,selector,active_swatch,product_img,bg_el,picture_el,source_el,prices,original_price_value,stock,original_stock_value,title,original_title_value,url)}).on("click",function(e,from){if(undefined===from||from!=="select_active_attributes")window.location=$(this).attr("data-variation-link")}))})},init_single_select_variation:function(wrapper,select,selected_attr,product_img,bg_el,picture_el,source_el,prices,original_price_value,stock,original_stock_value,title,original_title_value,original_url){var option=select.find("option[value='"+selected_attr+"']"),variation=option.data("variation"),attribute=select.attr("id"),found_variation=Utils.get_single_variation_from_attribute(variation,attribute,selected_attr);found_variation?(Loop_Variations.update_variation_image(product_img,bg_el,picture_el,source_el,found_variation),Loop_Variations.update_variation_price(prices,original_price_value,found_variation),Loop_Variations.update_variation_stock(stock,original_stock_value,found_variation),Loop_Variations.update_variation_title(title,original_title_value,found_variation),Loop_Variations.update_product_urls(wrapper,found_variation)):(Loop_Variations.update_variation_image(product_img,bg_el,picture_el,source_el,!1),Loop_Variations.reset_variation_price(prices,original_price_value),Loop_Variations.reset_variation_stock(stock,original_stock_value),Loop_Variations.reset_variation_title(title,original_title_value),Loop_Variations.reset_product_urls(wrapper,original_url))},init_single_swatch_variation:function(wrapper,selector,active_swatch,product_img,bg_el,picture_el,source_el,prices,original_price_value,stock,original_stock_value,title,original_title_value,original_url){var variation=active_swatch.data("variation"),attribute=selector.find(".swatches-select").data("swatch-id"),attribute_value=active_swatch.data("swatch-value"),found_variation=Utils.get_single_variation_from_attribute(variation,attribute,attribute_value);found_variation?(Loop_Variations.update_variation_image(product_img,bg_el,picture_el,source_el,found_variation),Loop_Variations.update_variation_price(prices,original_price_value,found_variation),Loop_Variations.update_variation_stock(stock,original_stock_value,found_variation),Loop_Variations.update_variation_title(title,original_title_value,found_variation),Loop_Variations.update_product_urls(wrapper,found_variation)):(Loop_Variations.update_variation_image(product_img,bg_el,picture_el,source_el,!1),Loop_Variations.reset_variation_price(prices,original_price_value),Loop_Variations.reset_variation_stock(stock,original_stock_value),Loop_Variations.reset_variation_title(title,original_title_value),Loop_Variations.reset_product_urls(wrapper,original_url))},set_single_swatch_variation:function(wrapper,swatches,selector,active_swatch,product_img,bg_el,picture_el,source_el,prices,original_price_value,stock,original_stock_value,title,original_title_value,original_url){swatches.removeClass("swatch--active"),active_swatch.addClass("swatch--active"),Loop_Variations.init_single_swatch_variation(wrapper,selector,active_swatch,product_img,bg_el,picture_el,source_el,prices,original_price_value,stock,original_stock_value,title,original_title_value,original_url)},update_variation_price:function(prices,original_price,variation){var new_price=variation&&variation.price_html&&prices.length>0?$(variation.price_html).children():original_price;prices.html(new_price)},reset_variation_price:function(prices,original_price){prices.html(original_price)},update_variation_stock:function(stock,original_stock,variation){var new_stock=variation&&variation.availability_html&&stock.length>0?$(variation.availability_html):original_stock;new_stock.hasClass("in-stock")?stock.addClass("t-entry-stock--in-stock"):stock.removeClass("t-entry-stock--in-stock"),stock.html(new_stock)},reset_variation_stock:function(stock,original_stock){original_stock.hasClass("in-stock")?stock.addClass("t-entry-stock--in-stock"):stock.removeClass("t-entry-stock--in-stock"),stock.html(original_stock)},update_variation_title:function(title,original_title,variation){if(title.length>0&&title.closest(".tmb").find(".t-entry-variations").hasClass("single-attribute-selector--dynamic-title")){var new_title=variation&&variation.variation_name&&title.length>0?variation.variation_name:original_title,price=title.find(".price");title.text(new_title),price.length>0&&title.append(price)}},reset_variation_title:function(title,original_title){title.length>0&&title.closest(".tmb").find(".t-entry-variations").hasClass("single-attribute-selector--dynamic-title")&&title.html(original_title)},update_product_urls:function(wrapper,variation){if(variation.variation_selected_url){var links=wrapper.find("a").not(".t-entry-category a").not(".t-entry-attribute-image__link"),quick_view_button=wrapper.find(".quick-view-button");links.attr("href",variation.variation_selected_url),quick_view_button.attr("data-post-url",variation.variation_selected_url)}},reset_product_urls:function(wrapper,original_url){var links=wrapper.find("a").not(".t-entry-category a").not(".t-entry-attribute-image__link"),quick_view_button=wrapper.find(".quick-view-button");links.attr("href",original_url),quick_view_button.attr("data-post-url",original_url)},update_variation_image:function(img,bg,picture,source,variation){var is_bg=bg.length>0?!0:!1,is_picture=picture.length>0?!0:!1,variations_imgs="";is_bg?variations_imgs=bg.data("product_variations"):is_picture?variations_imgs=picture.data("product_variations"):variations_imgs=img.data("product_variations");if(variations_imgs&&variation&&variation.image_id&&variation.image)for(var variations_img_key in variations_imgs){var variations_img=variations_imgs[variations_img_key];parseInt(variations_img_key,10)===variation.image_id&&(is_bg?Loop_Variations.update_bg_attributes(bg,variations_img,variation):is_picture?Loop_Variations.update_picture_attributes(img,picture,source,variations_img,variation):Loop_Variations.update_img_attributes(img,variations_img,variation))}else is_bg?Loop_Variations.reset_variation_bg(bg):is_picture?Loop_Variations.reset_variation_picture(img,picture,source):Loop_Variations.reset_variation_img(img)},set_variation_attr:function(el,attr,value){undefined===el.attr("data-o_"+attr)&&el.attr("data-o_"+attr,el.attr(attr)?el.attr(attr):""),!1===value?el.removeAttr(attr):el.attr(attr,value)},reset_variation_attr:function(el,attr,value){undefined!==el.attr("data-o_"+attr)&&el.attr(attr,el.attr("data-o_"+attr))},update_img_attributes:function(img,variations_img,variation){SiteParameters.dynamic_srcset_active==="1"?(img.removeClass("srcset-sizes-done"),img.addClass("srcset-async")):SiteParameters.uncode_adaptive_async==="1"&&(img.removeClass("async-done"),img.removeClass("adaptive-fetching"),img.addClass("adaptive-async")),Loop_Variations.set_variation_attr(img,"src",variations_img.src),Loop_Variations.set_variation_attr(img,"alt",variation.image.alt),Loop_Variations.set_variation_attr(img,"width",variations_img.width),Loop_Variations.set_variation_attr(img,"height",variations_img.height),Loop_Variations.set_variation_attr(img,"srcset",variations_img.srcset),Loop_Variations.set_variation_attr(img,"data-uniqueid",variations_img.uniqueid),Loop_Variations.set_variation_attr(img,"data-guid",variations_img.guid),Loop_Variations.set_variation_attr(img,"data-path",variations_img.path),Loop_Variations.set_variation_attr(img,"data-no-bp",variations_img.no_bp),Loop_Variations.set_variation_attr(img,"data-bp",variations_img.bp),Loop_Variations.set_variation_attr(img,"data-width",variations_img.orig_w),Loop_Variations.set_variation_attr(img,"data-height",variations_img.orig_h),Loop_Variations.set_variation_attr(img,"data-singlew",variations_img.singlew),Loop_Variations.set_variation_attr(img,"data-singleh",variations_img.singleh),SiteParameters.dynamic_srcset_active==="1"?UNCODE.adaptive_srcset(img.closest(".tmb")):SiteParameters.uncode_adaptive_async==="1"&&UNCODE.adaptive()},reset_variation_img:function(img){Loop_Variations.reset_variation_attr(img,"src"),Loop_Variations.reset_variation_attr(img,"srcset"),Loop_Variations.reset_variation_attr(img,"alt"),Loop_Variations.reset_variation_attr(img,"width"),Loop_Variations.reset_variation_attr(img,"height"),Loop_Variations.reset_variation_attr(img,"data-uniqueid"),Loop_Variations.reset_variation_attr(img,"data-guid"),Loop_Variations.reset_variation_attr(img,"data-path"),Loop_Variations.reset_variation_attr(img,"data-no-bp"),Loop_Variations.reset_variation_attr(img,"data-bp"),Loop_Variations.reset_variation_attr(img,"data-width"),Loop_Variations.reset_variation_attr(img,"data-height"),Loop_Variations.reset_variation_attr(img,"data-singlew"),Loop_Variations.reset_variation_attr(img,"data-singleh")},update_picture_attributes:function(img,picture,source,variations_img,variation){SiteParameters.dynamic_srcset_active==="1"&&(picture.addClass("srcset-async"),source.removeClass("srcset-sizes-done")),Loop_Variations.set_variation_attr(img,"src",variations_img.src),Loop_Variations.set_variation_attr(source,"srcset",variations_img.srcset),Loop_Variations.set_variation_attr(img,"alt",variation.image.alt),Loop_Variations.set_variation_attr(img,"width",variations_img.width),Loop_Variations.set_variation_attr(img,"height",variations_img.height),Loop_Variations.set_variation_attr(picture,"data-uniqueid",variations_img.uniqueid),Loop_Variations.set_variation_attr(picture,"data-guid",variations_img.guid),Loop_Variations.set_variation_attr(picture,"data-path",variations_img.path),Loop_Variations.set_variation_attr(picture,"data-no-bp",variations_img.no_bp),Loop_Variations.set_variation_attr(picture,"data-bp",variations_img.bp),Loop_Variations.set_variation_attr(picture,"data-width",variations_img.orig_w),Loop_Variations.set_variation_attr(picture,"data-height",variations_img.orig_h),SiteParameters.dynamic_srcset_active==="1"&&UNCODE.adaptive_srcset(img.closest(".tmb"))},reset_variation_picture:function(img,picture,source){Loop_Variations.reset_variation_attr(img,"src"),Loop_Variations.reset_variation_attr(source,"srcset"),Loop_Variations.reset_variation_attr(img,"alt"),Loop_Variations.reset_variation_attr(img,"width"),Loop_Variations.reset_variation_attr(img,"height"),Loop_Variations.reset_variation_attr(picture,"data-uniqueid"),Loop_Variations.reset_variation_attr(picture,"data-guid"),Loop_Variations.reset_variation_attr(picture,"data-path"),Loop_Variations.reset_variation_attr(picture,"data-no-bp"),Loop_Variations.reset_variation_attr(picture,"data-bp"),Loop_Variations.reset_variation_attr(picture,"data-width"),Loop_Variations.reset_variation_attr(picture,"data-height")},update_bg_attributes:function(bg,variations_img,variation){SiteParameters.uncode_adaptive_async==="1"&&(bg.removeClass("async-done"),bg.addClass("adaptive-async"));var new_style="background-image:url('"+variations_img.src+"')";Loop_Variations.set_variation_attr(bg,"style",new_style),Loop_Variations.set_variation_attr(bg,"data-uniqueid",variations_img.uniqueid),Loop_Variations.set_variation_attr(bg,"data-guid",variations_img.guid),Loop_Variations.set_variation_attr(bg,"data-path",variations_img.path),Loop_Variations.set_variation_attr(bg,"data-width",variations_img["data-width"]),Loop_Variations.set_variation_attr(bg,"data-height",variations_img["data-height"]),Loop_Variations.set_variation_attr(bg,"data-singlew",variations_img.singlew),Loop_Variations.set_variation_attr(bg,"data-singleh",variations_img.singleh),SiteParameters.uncode_adaptive_async==="1"&&UNCODE.adaptive()},reset_variation_bg:function(bg){Loop_Variations.reset_variation_attr(bg,"style"),Loop_Variations.reset_variation_attr(bg,"data-uniqueid"),Loop_Variations.reset_variation_attr(bg,"data-guid"),Loop_Variations.reset_variation_attr(bg,"data-path"),Loop_Variations.reset_variation_attr(bg,"data-width"),Loop_Variations.reset_variation_attr(bg,"data-height"),Loop_Variations.reset_variation_attr(bg,"data-singlew"),Loop_Variations.reset_variation_attr(bg,"data-singleh")},select_active_attributes:function(){$(".single-attribute-selector").each(function(){var selector=$(this),tmb_wrapper=selector.closest(".tmb-woocommerce"),selector_type="";if(tmb_wrapper.length===0)return;var select_attr=selector.find("select");if(select_attr.length>0){var selected_attr=select_attr.val();selector_type="select"}else{var swatches=selector.find(".swatch"),active_swatch=selector.find(".swatch--active");swatches.length>0&&(selector_type="swatch")}if(selector_type==="select"){var attribute=select_attr.attr("data-attribute_name"),filter_attribute_key=UncodeWCParameters.pa_filter_prefix+attribute.replace("attribute_pa_",""),selected_atts=Utils.get_url_parameter(filter_attribute_key);if(typeof selected_atts=="string"){var selected_atts_arr=selected_atts.split(","),selected_att=!1;selected_atts_arr&&(selected_att=selected_atts_arr[selected_atts_arr.length-1]),selected_att&&select_attr.find("option").each(function(){var _this=$(this),_val=_this.val();if(_val===selected_att)return select_attr.val(_val).trigger("change"),!1})}}if(selector_type==="swatch"){var attribute=selector.find(".swatches-select").attr("data-swatch-id"),filter_attribute_key=UncodeWCParameters.pa_filter_prefix+attribute.replace("pa_",""),selected_atts=Utils.get_url_parameter(filter_attribute_key);if(typeof selected_atts=="string"){var selected_atts_arr=selected_atts.split(","),selected_att=!1;selected_atts_arr&&(selected_att=selected_atts_arr[selected_atts_arr.length-1]),selected_att&&swatches.each(function(){var _this=$(this);if(_this.attr("data-swatch-value")===selected_att)return!selector.hasClass("single-attribute-selector--hover")||"ontouchstart"in window?_this.trigger("click","select_active_attributes"):_this.trigger("mouseenter","select_active_attributes"),!1})}}})}};$(document).ready(function(){Single_Product.variable_add_to_cart(),Single_Product.variation_gallery(),Loop_Variations.init_forms(),Loop_Variations.init_single_attributes(),Loop_Variations.select_active_attributes()}),$(document).on("uncode-quick-view-loaded",function(){Single_Product.has_variation_changed=!1,Single_Product.doing_clear=!1,Single_Product.first_load=!0,Single_Product.variable_add_to_cart(),Single_Product.variation_gallery(),Loop_Variations.init_forms(),Loop_Variations.init_single_attributes()}),$(document).on("uncode-ajax-filtered more-items-loaded",function(){Loop_Variations.init_forms(),Loop_Variations.init_single_attributes(),Loop_Variations.select_active_attributes()})})(jQuery);
(function($){"use strict";function find_select(variation_form,id){var selects=variation_form.find("select"),select=!1;return selects.each(function(){var _this=$(this);if(_this.attr("id").toLowerCase()==encodeURIComponent(id).toLowerCase())return select=_this,!0}),select}function find_swatch(swatch_selector,value){var swatches=swatch_selector.find(".swatch"),swatch=!1;return swatches.each(function(){var _this=$(this);if(_this.attr("data-swatch-value")==value)return swatch=_this,!0}),swatch}function init_general_swatches(){var variation_forms=$(".variations_form");variation_forms.each(function(){var variation_form=$(this);if(variation_form.data("swatches"))return;variation_form.data("swatches",!0),variation_form.on("click",".swatches-select > .swatch",function(){var _this=$(this),value=_this.data("swatch-value"),id=_this.parent().data("swatch-id"),title=_this.data("swatch-title");if(variation_form.hasClass("is-updating-gallery"))return;reset_general_swatches(variation_form);if(_this.hasClass("swatch--active"))return;if(_this.hasClass("swatch--disabled"))return;if(window.UncodeWCParameters!=undefined&&window.UncodeWCParameters.swatches_use_custom_find==="1"){var select=find_select(variation_form,id);select.val(value).trigger("change")}else variation_form.find("select#"+id).val(value).trigger("change");_this.parent().find(".swatch--active").removeClass("swatch--active"),_this.addClass("swatch--active"),reset_general_swatches(variation_form)}).on("woocommerce_update_variation_values",function(){reset_general_swatches(variation_form)}).on("click",".reset_variations",function(){variation_form.find(".swatch--active").removeClass("swatch--active")})})}function reset_general_swatches(variation_form){if(variation_form.data("product_variations")===!1)return;var has_hidden_swatch=!1;variation_form.find(".variations select").each(function(){var select=$(this),swatch_selector=select.parent().find(".swatches-select"),options=select.html();options=$(options),swatch_selector.find("> .swatch").removeClass("swatch--enabled").addClass("swatch--disabled"),options.each(function(){var value=$(this).val();if($(this).hasClass("enabled"))if(window.UncodeWCParameters!=undefined&&window.UncodeWCParameters.swatches_use_custom_find==="1"){var swatch=find_swatch(swatch_selector,value);swatch&&swatch.removeClass("swatch--disabled").addClass("swatch--enabled")}else swatch_selector.find('.swatch[data-swatch-value="'+value+'"]').removeClass("swatch--disabled").addClass("swatch--enabled");else if(window.UncodeWCParameters!=undefined&&window.UncodeWCParameters.swatches_use_custom_find==="1"){var swatch=find_swatch(swatch_selector,value);swatch&&swatch.removeClass("swatch--disabled").addClass("swatch--enabled")}else swatch_selector.find('.swatch[data-swatch-value="'+value+'"]').addClass("swatch--disabled").removeClass("swatch--enabled")});var hidden_swatches=swatch_selector.find("> .swatch--active.hidden");hidden_swatches.length>0&&(hidden_swatches.remove(),has_hidden_swatch=!0)}),has_hidden_swatch&&$(".swatch--active").removeClass("swatch--active")}function init_more_swacthes_link(){var more_link=$(".swatches-more-link");more_link.on("click",function(){var link=$(this).data("link");link&&(window.location=link)})}init_more_swacthes_link(),init_general_swatches(),$(document).on("uncode-quick-view-loaded more-items-loaded",function(){init_more_swacthes_link(),init_general_swatches()})})(jQuery);